1 | import type { JsonDocs } from './stencil-public-docs';
|
2 | import type { PrerenderUrlResults } from '../internal';
|
3 | import type { ConfigFlags } from '../cli/config-flags';
|
4 | export * from './stencil-public-docs';
|
5 |
|
6 |
|
7 |
|
8 | export interface StencilConfig {
|
9 | |
10 |
|
11 |
|
12 |
|
13 | allowInlineScripts?: boolean;
|
14 | |
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | autoprefixCss?: boolean | any;
|
22 | |
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | bundles?: ConfigBundle[];
|
36 | |
37 |
|
38 |
|
39 |
|
40 | enableCache?: boolean;
|
41 | |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 | globalStyle?: string;
|
51 | |
52 |
|
53 |
|
54 |
|
55 | hashedFileNameLength?: number;
|
56 | |
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 | hashFileNames?: boolean;
|
65 | |
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 | namespace?: string;
|
72 | |
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 | outputTargets?: OutputTarget[];
|
80 | |
81 |
|
82 |
|
83 |
|
84 |
|
85 | plugins?: any[];
|
86 | |
87 |
|
88 |
|
89 | sourceMap?: boolean;
|
90 | |
91 |
|
92 |
|
93 |
|
94 | srcDir?: string;
|
95 | |
96 |
|
97 |
|
98 |
|
99 | commonjs?: BundlingConfig;
|
100 | |
101 |
|
102 |
|
103 |
|
104 | nodeResolve?: NodeResolveConfig;
|
105 | |
106 |
|
107 |
|
108 | rollupConfig?: RollupConfig;
|
109 | |
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 | buildEs5?: boolean | 'prod';
|
117 | |
118 |
|
119 |
|
120 |
|
121 | minifyJs?: boolean;
|
122 | |
123 |
|
124 |
|
125 |
|
126 | minifyCss?: boolean;
|
127 | |
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 | devMode?: boolean;
|
134 | |
135 |
|
136 |
|
137 |
|
138 | logger?: Logger;
|
139 | |
140 |
|
141 |
|
142 |
|
143 |
|
144 | extras?: ConfigExtras;
|
145 | |
146 |
|
147 |
|
148 |
|
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 | hydratedFlag?: HydratedFlag;
|
155 | |
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 | invisiblePrehydration?: boolean;
|
165 | |
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 | taskQueue?: 'async' | 'immediate' | 'congestionAsync';
|
193 | |
194 |
|
195 |
|
196 | env?: {
|
197 | [prop: string]: string | undefined;
|
198 | };
|
199 | globalScript?: string;
|
200 | srcIndexHtml?: string;
|
201 | watch?: boolean;
|
202 | testing?: TestingConfig;
|
203 | maxConcurrentWorkers?: number;
|
204 | preamble?: string;
|
205 | rollupPlugins?: {
|
206 | before?: any[];
|
207 | after?: any[];
|
208 | };
|
209 | entryComponentsHint?: string[];
|
210 | buildDist?: boolean;
|
211 | buildLogFilePath?: string;
|
212 | cacheDir?: string;
|
213 | devInspector?: boolean;
|
214 | devServer?: StencilDevServerConfig;
|
215 | enableCacheStats?: boolean;
|
216 | sys?: CompilerSystem;
|
217 | tsconfig?: string;
|
218 | validateTypes?: boolean;
|
219 | |
220 |
|
221 |
|
222 |
|
223 |
|
224 | watchIgnoredRegex?: RegExp | RegExp[];
|
225 | excludeUnusedDependencies?: boolean;
|
226 | stencilCoreResolvedId?: string;
|
227 | }
|
228 | export interface ConfigExtras {
|
229 | |
230 |
|
231 |
|
232 |
|
233 |
|
234 |
|
235 |
|
236 | appendChildSlotFix?: boolean;
|
237 | |
238 |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 | cloneNodeFix?: boolean;
|
245 | |
246 |
|
247 |
|
248 |
|
249 | cssVarsShim?: boolean;
|
250 | |
251 |
|
252 |
|
253 |
|
254 | dynamicImportShim?: boolean;
|
255 | |
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 | experimentalImportInjection?: boolean;
|
262 | |
263 |
|
264 |
|
265 | lifecycleDOMEvents?: boolean;
|
266 | |
267 |
|
268 |
|
269 |
|
270 |
|
271 |
|
272 | safari10?: boolean;
|
273 | |
274 |
|
275 |
|
276 |
|
277 |
|
278 | scriptDataOpts?: boolean;
|
279 | |
280 |
|
281 |
|
282 |
|
283 | scopedSlotTextContentFix?: boolean;
|
284 | |
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 | shadowDomShim?: boolean;
|
291 | |
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 | initializeNextTick?: boolean;
|
298 | |
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 | slotChildNodesFix?: boolean;
|
305 | |
306 |
|
307 |
|
308 |
|
309 | tagNameTransform?: boolean;
|
310 | }
|
311 | export interface Config extends StencilConfig {
|
312 | buildAppCore?: boolean;
|
313 | buildDocs?: boolean;
|
314 | configPath?: string;
|
315 | writeLog?: boolean;
|
316 | devServer?: DevServerConfig;
|
317 | flags?: ConfigFlags;
|
318 | fsNamespace?: string;
|
319 | logLevel?: LogLevel;
|
320 | rootDir?: string;
|
321 | packageJsonFilePath?: string;
|
322 | suppressLogs?: boolean;
|
323 | profile?: boolean;
|
324 | tsCompilerOptions?: any;
|
325 | _isValidated?: boolean;
|
326 | _isTesting?: boolean;
|
327 | }
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 |
|
350 |
|
351 |
|
352 |
|
353 |
|
354 | declare type Loose<T extends Object> = Record<string, any> & Partial<T>;
|
355 |
|
356 |
|
357 |
|
358 |
|
359 | export declare type UnvalidatedConfig = Loose<Config>;
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 | declare type RequireFields<T, K extends keyof T> = T & {
|
370 | [P in K]-?: T[P];
|
371 | };
|
372 |
|
373 |
|
374 |
|
375 | declare type StrictConfigFields = 'flags' | 'logger' | 'outputTargets' | 'rootDir' | 'sys' | 'testing';
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 |
|
382 | export declare type ValidatedConfig = RequireFields<Config, StrictConfigFields>;
|
383 | export interface HydratedFlag {
|
384 | |
385 |
|
386 |
|
387 | name?: string;
|
388 | |
389 |
|
390 |
|
391 | selector?: 'class' | 'attribute';
|
392 | |
393 |
|
394 |
|
395 |
|
396 |
|
397 |
|
398 | property?: string;
|
399 | |
400 |
|
401 |
|
402 |
|
403 | initialValue?: string;
|
404 | |
405 |
|
406 |
|
407 |
|
408 | hydratedValue?: string;
|
409 | }
|
410 | export interface StencilDevServerConfig {
|
411 | |
412 |
|
413 |
|
414 |
|
415 | address?: string;
|
416 | |
417 |
|
418 |
|
419 | basePath?: string;
|
420 | |
421 |
|
422 |
|
423 |
|
424 |
|
425 |
|
426 |
|
427 | experimentalDevModules?: boolean;
|
428 | |
429 |
|
430 |
|
431 | gzip?: boolean;
|
432 | |
433 |
|
434 |
|
435 |
|
436 | https?: Credentials;
|
437 | |
438 |
|
439 |
|
440 | initialLoadUrl?: string;
|
441 | |
442 |
|
443 |
|
444 |
|
445 | logRequests?: boolean;
|
446 | |
447 |
|
448 |
|
449 |
|
450 | openBrowser?: boolean;
|
451 | |
452 |
|
453 |
|
454 | port?: number;
|
455 | |
456 |
|
457 |
|
458 |
|
459 |
|
460 | reloadStrategy?: PageReloadStrategy;
|
461 | |
462 |
|
463 |
|
464 |
|
465 |
|
466 |
|
467 |
|
468 |
|
469 |
|
470 |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 |
|
477 |
|
478 |
|
479 |
|
480 |
|
481 |
|
482 |
|
483 |
|
484 |
|
485 | requestListenerPath?: string;
|
486 | |
487 |
|
488 |
|
489 | root?: string;
|
490 | |
491 |
|
492 |
|
493 |
|
494 |
|
495 |
|
496 | ssr?: boolean;
|
497 | |
498 |
|
499 |
|
500 |
|
501 | startupTimeout?: number;
|
502 | |
503 |
|
504 |
|
505 | websocket?: boolean;
|
506 | |
507 |
|
508 |
|
509 |
|
510 | worker?: boolean;
|
511 | }
|
512 | export interface DevServerConfig extends StencilDevServerConfig {
|
513 | browserUrl?: string;
|
514 | devServerDir?: string;
|
515 | excludeHmr?: string[];
|
516 | historyApiFallback?: HistoryApiFallback;
|
517 | openBrowser?: boolean;
|
518 | prerenderConfig?: string;
|
519 | protocol?: 'http' | 'https';
|
520 | srcIndexHtml?: string;
|
521 | }
|
522 | export interface HistoryApiFallback {
|
523 | index?: string;
|
524 | disableDotRule?: boolean;
|
525 | }
|
526 | export interface DevServerEditor {
|
527 | id: string;
|
528 | name?: string;
|
529 | supported?: boolean;
|
530 | priority?: number;
|
531 | }
|
532 | export declare type TaskCommand = 'build' | 'docs' | 'generate' | 'g' | 'help' | 'info' | 'prerender' | 'serve' | 'telemetry' | 'test' | 'version';
|
533 | export declare type PageReloadStrategy = 'hmr' | 'pageReload' | null;
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 |
|
556 |
|
557 |
|
558 |
|
559 |
|
560 |
|
561 |
|
562 |
|
563 |
|
564 | export interface PrerenderConfig {
|
565 | |
566 |
|
567 |
|
568 |
|
569 | afterHydrate?(document: Document, url: URL, results: PrerenderUrlResults): any | Promise<any>;
|
570 | |
571 |
|
572 |
|
573 | beforeHydrate?(document: Document, url: URL): any | Promise<any>;
|
574 | |
575 |
|
576 |
|
577 |
|
578 |
|
579 | afterSerializeTemplate?(html: string): string | Promise<string>;
|
580 | |
581 |
|
582 |
|
583 |
|
584 |
|
585 | beforeSerializeTemplate?(document: Document): Document | Promise<Document>;
|
586 | |
587 |
|
588 |
|
589 |
|
590 |
|
591 | canonicalUrl?(url: URL): string | null;
|
592 | |
593 |
|
594 |
|
595 |
|
596 | crawlUrls?: boolean;
|
597 | |
598 |
|
599 |
|
600 | entryUrls?: string[];
|
601 | |
602 |
|
603 |
|
604 | filterAnchor?(attrs: {
|
605 | [attrName: string]: string;
|
606 | }, base?: URL): boolean;
|
607 | |
608 |
|
609 |
|
610 | filterUrl?(url: URL, base: URL): boolean;
|
611 | |
612 |
|
613 |
|
614 |
|
615 | filePath?(url: URL, filePath: string): string;
|
616 | |
617 |
|
618 |
|
619 | hydrateOptions?(url: URL): PrerenderHydrateOptions;
|
620 | |
621 |
|
622 |
|
623 |
|
624 | loadTemplate?(filePath: string): string | Promise<string>;
|
625 | |
626 |
|
627 |
|
628 |
|
629 |
|
630 | normalizeUrl?(href: string, base: URL): URL;
|
631 | robotsTxt?(opts: RobotsTxtOpts): string | RobotsTxtResults;
|
632 | sitemapXml?(opts: SitemapXmpOpts): string | SitemapXmpResults;
|
633 | |
634 |
|
635 |
|
636 |
|
637 | staticSite?: boolean;
|
638 | |
639 |
|
640 |
|
641 | trailingSlash?: boolean;
|
642 | }
|
643 | export interface HydrateDocumentOptions {
|
644 | |
645 |
|
646 |
|
647 |
|
648 | buildId?: string;
|
649 | |
650 |
|
651 |
|
652 |
|
653 |
|
654 | canonicalUrl?: string;
|
655 | |
656 |
|
657 |
|
658 |
|
659 |
|
660 | clientHydrateAnnotations?: boolean;
|
661 | |
662 |
|
663 |
|
664 |
|
665 |
|
666 | constrainTimeouts?: boolean;
|
667 | |
668 |
|
669 |
|
670 | cookie?: string;
|
671 | |
672 |
|
673 |
|
674 | direction?: string;
|
675 | |
676 |
|
677 |
|
678 |
|
679 |
|
680 | excludeComponents?: string[];
|
681 | |
682 |
|
683 |
|
684 | language?: string;
|
685 | |
686 |
|
687 |
|
688 | maxHydrateCount?: number;
|
689 | |
690 |
|
691 |
|
692 | referrer?: string;
|
693 | |
694 |
|
695 |
|
696 | removeScripts?: boolean;
|
697 | |
698 |
|
699 |
|
700 | removeUnusedStyles?: boolean;
|
701 | |
702 |
|
703 |
|
704 | resourcesUrl?: string;
|
705 | |
706 |
|
707 |
|
708 | runtimeLogging?: boolean;
|
709 | |
710 |
|
711 |
|
712 |
|
713 |
|
714 |
|
715 |
|
716 | staticComponents?: string[];
|
717 | |
718 |
|
719 |
|
720 |
|
721 | timeout?: number;
|
722 | |
723 |
|
724 |
|
725 | title?: string;
|
726 | |
727 |
|
728 |
|
729 | url?: string;
|
730 | |
731 |
|
732 |
|
733 | userAgent?: string;
|
734 | }
|
735 | export interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
736 | |
737 |
|
738 |
|
739 | afterHydrate?(document: any): any | Promise<any>;
|
740 | |
741 |
|
742 |
|
743 |
|
744 |
|
745 |
|
746 |
|
747 | approximateLineWidth?: number;
|
748 | |
749 |
|
750 |
|
751 | beforeHydrate?(document: any): any | Promise<any>;
|
752 | |
753 |
|
754 |
|
755 |
|
756 | prettyHtml?: boolean;
|
757 | |
758 |
|
759 |
|
760 |
|
761 | removeAttributeQuotes?: boolean;
|
762 | |
763 |
|
764 |
|
765 |
|
766 | removeBooleanAttributeQuotes?: boolean;
|
767 | |
768 |
|
769 |
|
770 |
|
771 | removeEmptyAttributes?: boolean;
|
772 | |
773 |
|
774 |
|
775 | removeHtmlComments?: boolean;
|
776 | }
|
777 | export interface HydrateFactoryOptions extends SerializeDocumentOptions {
|
778 | serializeToHtml: boolean;
|
779 | destroyWindow: boolean;
|
780 | destroyDocument: boolean;
|
781 | }
|
782 | export interface PrerenderHydrateOptions extends SerializeDocumentOptions {
|
783 | |
784 |
|
785 |
|
786 |
|
787 | addModulePreloads?: boolean;
|
788 | |
789 |
|
790 |
|
791 |
|
792 |
|
793 |
|
794 |
|
795 | hashAssets?: 'querystring';
|
796 | |
797 |
|
798 |
|
799 |
|
800 | inlineExternalStyleSheets?: boolean;
|
801 | |
802 |
|
803 |
|
804 | minifyStyleElements?: boolean;
|
805 | |
806 |
|
807 |
|
808 | minifyScriptElements?: boolean;
|
809 | |
810 |
|
811 |
|
812 |
|
813 |
|
814 |
|
815 | staticDocument?: boolean;
|
816 | }
|
817 | export interface RobotsTxtOpts {
|
818 | urls: string[];
|
819 | sitemapUrl: string;
|
820 | baseUrl: string;
|
821 | dir: string;
|
822 | }
|
823 | export interface RobotsTxtResults {
|
824 | content: string;
|
825 | filePath: string;
|
826 | url: string;
|
827 | }
|
828 | export interface SitemapXmpOpts {
|
829 | urls: string[];
|
830 | baseUrl: string;
|
831 | dir: string;
|
832 | }
|
833 | export interface SitemapXmpResults {
|
834 | content: string;
|
835 | filePath: string;
|
836 | url: string;
|
837 | }
|
838 |
|
839 |
|
840 |
|
841 |
|
842 |
|
843 |
|
844 |
|
845 |
|
846 |
|
847 | export interface CompilerSystem {
|
848 | name: 'node' | 'in-memory';
|
849 | version: string;
|
850 | events?: BuildEvents;
|
851 | details?: SystemDetails;
|
852 | |
853 |
|
854 |
|
855 | addDestory(cb: () => void): void;
|
856 | |
857 |
|
858 |
|
859 | access(p: string): Promise<boolean>;
|
860 | |
861 |
|
862 |
|
863 | accessSync(p: string): boolean;
|
864 | applyGlobalPatch?(fromDir: string): Promise<void>;
|
865 | applyPrerenderGlobalPatch?(opts: {
|
866 | devServerHostUrl: string;
|
867 | window: any;
|
868 | }): void;
|
869 | cacheStorage?: CacheStorage;
|
870 | checkVersion?: (logger: Logger, currentVersion: string) => Promise<() => void>;
|
871 | copy?(copyTasks: Required<CopyTask>[], srcDir: string): Promise<CopyResults>;
|
872 | |
873 |
|
874 |
|
875 | copyFile(src: string, dst: string): Promise<boolean>;
|
876 | |
877 |
|
878 |
|
879 | destroy(): Promise<void>;
|
880 | |
881 |
|
882 |
|
883 | createDir(p: string, opts?: CompilerSystemCreateDirectoryOptions): Promise<CompilerSystemCreateDirectoryResults>;
|
884 | |
885 |
|
886 |
|
887 | createDirSync(p: string, opts?: CompilerSystemCreateDirectoryOptions): CompilerSystemCreateDirectoryResults;
|
888 | homeDir(): string;
|
889 | |
890 |
|
891 |
|
892 | isTTY(): boolean;
|
893 | |
894 |
|
895 |
|
896 | dynamicImport?(p: string): Promise<any>;
|
897 | |
898 |
|
899 |
|
900 | createWorkerController?(maxConcurrentWorkers: number): WorkerMainController;
|
901 | encodeToBase64(str: string): string;
|
902 | ensureDependencies?(opts: {
|
903 | rootDir: string;
|
904 | logger: Logger;
|
905 | dependencies: CompilerDependency[];
|
906 | }): Promise<{
|
907 | stencilPath: string;
|
908 | diagnostics: Diagnostic[];
|
909 | }>;
|
910 | ensureResources?(opts: {
|
911 | rootDir: string;
|
912 | logger: Logger;
|
913 | dependencies: CompilerDependency[];
|
914 | }): Promise<void>;
|
915 | |
916 |
|
917 |
|
918 | exit(exitCode: number): Promise<void>;
|
919 | |
920 |
|
921 |
|
922 |
|
923 |
|
924 | fetch?(input: string | any, init?: any): Promise<any>;
|
925 | |
926 |
|
927 |
|
928 | generateContentHash?(content: string | any, length?: number): Promise<string>;
|
929 | |
930 |
|
931 |
|
932 | generateFileHash?(filePath: string | any, length?: number): Promise<string>;
|
933 | |
934 |
|
935 |
|
936 | getCurrentDirectory(): string;
|
937 | |
938 |
|
939 |
|
940 | getCompilerExecutingPath(): string;
|
941 | |
942 |
|
943 |
|
944 | getDevServerExecutingPath?(): string;
|
945 | getEnvironmentVar?(key: string): string;
|
946 | |
947 |
|
948 |
|
949 | getLocalModulePath(opts: {
|
950 | rootDir: string;
|
951 | moduleId: string;
|
952 | path: string;
|
953 | }): string;
|
954 | |
955 |
|
956 |
|
957 | getRemoteModuleUrl(opts: {
|
958 | moduleId: string;
|
959 | path?: string;
|
960 | version?: string;
|
961 | }): string;
|
962 | |
963 |
|
964 |
|
965 | glob?(pattern: string, options: {
|
966 | cwd?: string;
|
967 | nodir?: boolean;
|
968 | [key: string]: any;
|
969 | }): Promise<string[]>;
|
970 | |
971 |
|
972 |
|
973 | hardwareConcurrency: number;
|
974 | |
975 |
|
976 |
|
977 | isSymbolicLink(p: string): Promise<boolean>;
|
978 | lazyRequire?: LazyRequire;
|
979 | nextTick(cb: () => void): void;
|
980 | |
981 |
|
982 |
|
983 | normalizePath(p: string): string;
|
984 | onProcessInterrupt?(cb: () => void): void;
|
985 | parseYarnLockFile?: (content: string) => {
|
986 | type: 'success' | 'merge' | 'conflict';
|
987 | object: any;
|
988 | };
|
989 | platformPath: PlatformPath;
|
990 | |
991 |
|
992 |
|
993 | readDir(p: string): Promise<string[]>;
|
994 | |
995 |
|
996 |
|
997 | readDirSync(p: string): string[];
|
998 | |
999 |
|
1000 |
|
1001 | readFile(p: string): Promise<string>;
|
1002 | readFile(p: string, encoding: 'utf8'): Promise<string>;
|
1003 | readFile(p: string, encoding: 'binary'): Promise<any>;
|
1004 | |
1005 |
|
1006 |
|
1007 | readFileSync(p: string, encoding?: string): string;
|
1008 | |
1009 |
|
1010 |
|
1011 | realpath(p: string): Promise<CompilerSystemRealpathResults>;
|
1012 | |
1013 |
|
1014 |
|
1015 | realpathSync(p: string): CompilerSystemRealpathResults;
|
1016 | |
1017 |
|
1018 |
|
1019 | removeDestory(cb: () => void): void;
|
1020 | |
1021 |
|
1022 |
|
1023 | rename(oldPath: string, newPath: string): Promise<CompilerSystemRenameResults>;
|
1024 | resolveModuleId?(opts: ResolveModuleIdOptions): Promise<ResolveModuleIdResults>;
|
1025 | resolvePath(p: string): string;
|
1026 | |
1027 |
|
1028 |
|
1029 | removeDir(p: string, opts?: CompilerSystemRemoveDirectoryOptions): Promise<CompilerSystemRemoveDirectoryResults>;
|
1030 | |
1031 |
|
1032 |
|
1033 | removeDirSync(p: string, opts?: CompilerSystemRemoveDirectoryOptions): CompilerSystemRemoveDirectoryResults;
|
1034 | |
1035 |
|
1036 |
|
1037 | removeFile(p: string): Promise<CompilerSystemRemoveFileResults>;
|
1038 | |
1039 |
|
1040 |
|
1041 | removeFileSync(p: string): CompilerSystemRemoveFileResults;
|
1042 | setupCompiler?: (c: {
|
1043 | ts: any;
|
1044 | }) => void;
|
1045 | |
1046 |
|
1047 |
|
1048 | stat(p: string): Promise<CompilerFsStats>;
|
1049 | |
1050 |
|
1051 |
|
1052 | statSync(p: string): CompilerFsStats;
|
1053 | tmpDirSync(): string;
|
1054 | watchDirectory?(p: string, callback: CompilerFileWatcherCallback, recursive?: boolean): CompilerFileWatcher;
|
1055 | watchFile?(p: string, callback: CompilerFileWatcherCallback): CompilerFileWatcher;
|
1056 | |
1057 |
|
1058 |
|
1059 | watchTimeout?: number;
|
1060 | |
1061 |
|
1062 |
|
1063 | writeFile(p: string, content: string): Promise<CompilerSystemWriteFileResults>;
|
1064 | |
1065 |
|
1066 |
|
1067 | writeFileSync(p: string, content: string): CompilerSystemWriteFileResults;
|
1068 | }
|
1069 | export interface TranspileOnlyResults {
|
1070 | diagnostics: Diagnostic[];
|
1071 | output: string;
|
1072 | sourceMap: any;
|
1073 | }
|
1074 | export interface ParsedPath {
|
1075 | root: string;
|
1076 | dir: string;
|
1077 | base: string;
|
1078 | ext: string;
|
1079 | name: string;
|
1080 | }
|
1081 | export interface PlatformPath {
|
1082 | normalize(p: string): string;
|
1083 | join(...paths: string[]): string;
|
1084 | resolve(...pathSegments: string[]): string;
|
1085 | isAbsolute(p: string): boolean;
|
1086 | relative(from: string, to: string): string;
|
1087 | dirname(p: string): string;
|
1088 | basename(p: string, ext?: string): string;
|
1089 | extname(p: string): string;
|
1090 | parse(p: string): ParsedPath;
|
1091 | sep: string;
|
1092 | delimiter: string;
|
1093 | posix: any;
|
1094 | win32: any;
|
1095 | }
|
1096 | export interface CompilerDependency {
|
1097 | name: string;
|
1098 | version: string;
|
1099 | main: string;
|
1100 | resources?: string[];
|
1101 | }
|
1102 | export interface ResolveModuleIdOptions {
|
1103 | moduleId: string;
|
1104 | containingFile?: string;
|
1105 | exts?: string[];
|
1106 | packageFilter?: (pkg: any) => void;
|
1107 | }
|
1108 | export interface ResolveModuleIdResults {
|
1109 | moduleId: string;
|
1110 | resolveId: string;
|
1111 | pkgData: {
|
1112 | name: string;
|
1113 | version: string;
|
1114 | [key: string]: any;
|
1115 | };
|
1116 | pkgDirPath: string;
|
1117 | }
|
1118 | export interface WorkerMainController {
|
1119 | send(...args: any[]): Promise<any>;
|
1120 | handler(name: string): (...args: any[]) => Promise<any>;
|
1121 | destroy(): void;
|
1122 | maxWorkers: number;
|
1123 | }
|
1124 | export interface CopyResults {
|
1125 | diagnostics: Diagnostic[];
|
1126 | filePaths: string[];
|
1127 | dirPaths: string[];
|
1128 | }
|
1129 | export interface SystemDetails {
|
1130 | cpuModel: string;
|
1131 | freemem(): number;
|
1132 | platform: 'darwin' | 'windows' | 'linux' | '';
|
1133 | release: string;
|
1134 | totalmem: number;
|
1135 | }
|
1136 | export interface BuildOnEvents {
|
1137 | on(cb: (eventName: CompilerEventName, data: any) => void): BuildOnEventRemove;
|
1138 | on(eventName: CompilerEventFileAdd, cb: (path: string) => void): BuildOnEventRemove;
|
1139 | on(eventName: CompilerEventFileDelete, cb: (path: string) => void): BuildOnEventRemove;
|
1140 | on(eventName: CompilerEventFileUpdate, cb: (path: string) => void): BuildOnEventRemove;
|
1141 | on(eventName: CompilerEventDirAdd, cb: (path: string) => void): BuildOnEventRemove;
|
1142 | on(eventName: CompilerEventDirDelete, cb: (path: string) => void): BuildOnEventRemove;
|
1143 | on(eventName: CompilerEventBuildStart, cb: (buildStart: CompilerBuildStart) => void): BuildOnEventRemove;
|
1144 | on(eventName: CompilerEventBuildFinish, cb: (buildResults: CompilerBuildResults) => void): BuildOnEventRemove;
|
1145 | on(eventName: CompilerEventBuildLog, cb: (buildLog: BuildLog) => void): BuildOnEventRemove;
|
1146 | on(eventName: CompilerEventBuildNoChange, cb: () => void): BuildOnEventRemove;
|
1147 | }
|
1148 | export interface BuildEmitEvents {
|
1149 | emit(eventName: CompilerEventFileAdd, path: string): void;
|
1150 | emit(eventName: CompilerEventFileDelete, path: string): void;
|
1151 | emit(eventName: CompilerEventFileUpdate, path: string): void;
|
1152 | emit(eventName: CompilerEventDirAdd, path: string): void;
|
1153 | emit(eventName: CompilerEventDirDelete, path: string): void;
|
1154 | emit(eventName: CompilerEventBuildStart, buildStart: CompilerBuildStart): void;
|
1155 | emit(eventName: CompilerEventBuildFinish, buildResults: CompilerBuildResults): void;
|
1156 | emit(eventName: CompilerEventBuildNoChange, buildNoChange: BuildNoChangeResults): void;
|
1157 | emit(eventName: CompilerEventBuildLog, buildLog: BuildLog): void;
|
1158 | emit(eventName: CompilerEventFsChange, fsWatchResults: FsWatchResults): void;
|
1159 | }
|
1160 | export interface FsWatchResults {
|
1161 | dirsAdded: string[];
|
1162 | dirsDeleted: string[];
|
1163 | filesUpdated: string[];
|
1164 | filesAdded: string[];
|
1165 | filesDeleted: string[];
|
1166 | }
|
1167 | export interface BuildLog {
|
1168 | buildId: number;
|
1169 | messages: string[];
|
1170 | progress: number;
|
1171 | }
|
1172 | export interface BuildNoChangeResults {
|
1173 | buildId: number;
|
1174 | noChange: boolean;
|
1175 | }
|
1176 | export interface CompilerBuildResults {
|
1177 | buildId: number;
|
1178 | componentGraph?: BuildResultsComponentGraph;
|
1179 | diagnostics: Diagnostic[];
|
1180 | dirsAdded: string[];
|
1181 | dirsDeleted: string[];
|
1182 | duration: number;
|
1183 | filesAdded: string[];
|
1184 | filesChanged: string[];
|
1185 | filesDeleted: string[];
|
1186 | filesUpdated: string[];
|
1187 | hasError: boolean;
|
1188 | hasSuccessfulBuild: boolean;
|
1189 | hmr?: HotModuleReplacement;
|
1190 | hydrateAppFilePath?: string;
|
1191 | isRebuild: boolean;
|
1192 | namespace: string;
|
1193 | outputs: BuildOutput[];
|
1194 | rootDir: string;
|
1195 | srcDir: string;
|
1196 | timestamp: string;
|
1197 | }
|
1198 | export interface BuildResultsComponentGraph {
|
1199 | [scopeId: string]: string[];
|
1200 | }
|
1201 | export interface BuildOutput {
|
1202 | type: string;
|
1203 | files: string[];
|
1204 | }
|
1205 | export interface HotModuleReplacement {
|
1206 | componentsUpdated?: string[];
|
1207 | excludeHmr?: string[];
|
1208 | externalStylesUpdated?: string[];
|
1209 | imagesUpdated?: string[];
|
1210 | indexHtmlUpdated?: boolean;
|
1211 | inlineStylesUpdated?: HmrStyleUpdate[];
|
1212 | reloadStrategy: PageReloadStrategy;
|
1213 | scriptsAdded?: string[];
|
1214 | scriptsDeleted?: string[];
|
1215 | serviceWorkerUpdated?: boolean;
|
1216 | versionId?: string;
|
1217 | }
|
1218 | export interface HmrStyleUpdate {
|
1219 | styleId: string;
|
1220 | styleTag: string;
|
1221 | styleText: string;
|
1222 | }
|
1223 | export declare type BuildOnEventRemove = () => boolean;
|
1224 | export interface BuildEvents extends BuildOnEvents, BuildEmitEvents {
|
1225 | unsubscribeAll(): void;
|
1226 | }
|
1227 | export interface CompilerBuildStart {
|
1228 | buildId: number;
|
1229 | timestamp: string;
|
1230 | }
|
1231 | export declare type CompilerFileWatcherCallback = (fileName: string, eventKind: CompilerFileWatcherEvent) => void;
|
1232 | export declare type CompilerFileWatcherEvent = CompilerEventFileAdd | CompilerEventFileDelete | CompilerEventFileUpdate | CompilerEventDirAdd | CompilerEventDirDelete;
|
1233 | export declare type CompilerEventName = CompilerEventFsChange | CompilerEventFileUpdate | CompilerEventFileAdd | CompilerEventFileDelete | CompilerEventDirAdd | CompilerEventDirDelete | CompilerEventBuildStart | CompilerEventBuildFinish | CompilerEventBuildNoChange | CompilerEventBuildLog;
|
1234 | export declare type CompilerEventFsChange = 'fsChange';
|
1235 | export declare type CompilerEventFileUpdate = 'fileUpdate';
|
1236 | export declare type CompilerEventFileAdd = 'fileAdd';
|
1237 | export declare type CompilerEventFileDelete = 'fileDelete';
|
1238 | export declare type CompilerEventDirAdd = 'dirAdd';
|
1239 | export declare type CompilerEventDirDelete = 'dirDelete';
|
1240 | export declare type CompilerEventBuildStart = 'buildStart';
|
1241 | export declare type CompilerEventBuildFinish = 'buildFinish';
|
1242 | export declare type CompilerEventBuildLog = 'buildLog';
|
1243 | export declare type CompilerEventBuildNoChange = 'buildNoChange';
|
1244 | export interface CompilerFileWatcher {
|
1245 | close(): void | Promise<void>;
|
1246 | }
|
1247 | export interface CompilerFsStats {
|
1248 | |
1249 |
|
1250 |
|
1251 | isDirectory: boolean;
|
1252 | |
1253 |
|
1254 |
|
1255 | isFile: boolean;
|
1256 | |
1257 |
|
1258 |
|
1259 | isSymbolicLink: boolean;
|
1260 | |
1261 |
|
1262 |
|
1263 | size: number;
|
1264 | |
1265 |
|
1266 |
|
1267 | mtimeMs?: number;
|
1268 | |
1269 |
|
1270 |
|
1271 | error: any;
|
1272 | }
|
1273 | export interface CompilerSystemCreateDirectoryOptions {
|
1274 | |
1275 |
|
1276 |
|
1277 |
|
1278 | recursive?: boolean;
|
1279 | |
1280 |
|
1281 |
|
1282 |
|
1283 | mode?: number;
|
1284 | }
|
1285 | export interface CompilerSystemCreateDirectoryResults {
|
1286 | basename: string;
|
1287 | dirname: string;
|
1288 | path: string;
|
1289 | newDirs: string[];
|
1290 | error: any;
|
1291 | }
|
1292 | export interface CompilerSystemRemoveDirectoryOptions {
|
1293 | |
1294 |
|
1295 |
|
1296 |
|
1297 | recursive?: boolean;
|
1298 | }
|
1299 | export interface CompilerSystemRemoveDirectoryResults {
|
1300 | basename: string;
|
1301 | dirname: string;
|
1302 | path: string;
|
1303 | removedDirs: string[];
|
1304 | removedFiles: string[];
|
1305 | error: any;
|
1306 | }
|
1307 | export interface CompilerSystemRenameResults extends CompilerSystemRenamedPath {
|
1308 | renamed: CompilerSystemRenamedPath[];
|
1309 | oldDirs: string[];
|
1310 | oldFiles: string[];
|
1311 | newDirs: string[];
|
1312 | newFiles: string[];
|
1313 | error: any;
|
1314 | }
|
1315 | export interface CompilerSystemRenamedPath {
|
1316 | oldPath: string;
|
1317 | newPath: string;
|
1318 | isFile: boolean;
|
1319 | isDirectory: boolean;
|
1320 | }
|
1321 | export interface CompilerSystemRealpathResults {
|
1322 | path: string;
|
1323 | error: any;
|
1324 | }
|
1325 | export interface CompilerSystemRemoveFileResults {
|
1326 | basename: string;
|
1327 | dirname: string;
|
1328 | path: string;
|
1329 | error: any;
|
1330 | }
|
1331 | export interface CompilerSystemWriteFileResults {
|
1332 | path: string;
|
1333 | error: any;
|
1334 | }
|
1335 | export interface Credentials {
|
1336 | key: string;
|
1337 | cert: string;
|
1338 | }
|
1339 | export interface ConfigBundle {
|
1340 | components: string[];
|
1341 | }
|
1342 | export interface CopyTask {
|
1343 | src: string;
|
1344 | dest?: string;
|
1345 | warn?: boolean;
|
1346 | keepDirStructure?: boolean;
|
1347 | }
|
1348 | export interface BundlingConfig {
|
1349 | namedExports?: {
|
1350 | [key: string]: string[];
|
1351 | };
|
1352 | }
|
1353 | export interface NodeResolveConfig {
|
1354 | module?: boolean;
|
1355 | jsnext?: boolean;
|
1356 | main?: boolean;
|
1357 | browser?: boolean;
|
1358 | extensions?: string[];
|
1359 | preferBuiltins?: boolean;
|
1360 | jail?: string;
|
1361 | only?: Array<string | RegExp>;
|
1362 | modulesOnly?: boolean;
|
1363 | /**
|
1364 | * @see https://github.com/browserify/resolve#resolveid-opts-cb
|
1365 | */
|
1366 | customResolveOptions?: {
|
1367 | basedir?: string;
|
1368 | package?: string;
|
1369 | extensions?: string[];
|
1370 | readFile?: Function;
|
1371 | isFile?: Function;
|
1372 | isDirectory?: Function;
|
1373 | packageFilter?: Function;
|
1374 | pathFilter?: Function;
|
1375 | paths?: Function | string[];
|
1376 | moduleDirectory?: string | string[];
|
1377 | preserveSymlinks?: boolean;
|
1378 | };
|
1379 | }
|
1380 | export interface RollupConfig {
|
1381 | inputOptions?: RollupInputOptions;
|
1382 | outputOptions?: RollupOutputOptions;
|
1383 | }
|
1384 | export interface RollupInputOptions {
|
1385 | context?: string;
|
1386 | moduleContext?: ((id: string) => string) | {
|
1387 | [id: string]: string;
|
1388 | };
|
1389 | treeshake?: boolean;
|
1390 | }
|
1391 | export interface RollupOutputOptions {
|
1392 | globals?: {
|
1393 | [name: string]: string;
|
1394 | } | ((name: string) => string);
|
1395 | }
|
1396 | export interface Testing {
|
1397 | run(opts: TestingRunOptions): Promise<boolean>;
|
1398 | destroy(): Promise<void>;
|
1399 | }
|
1400 | export interface TestingRunOptions {
|
1401 | e2e?: boolean;
|
1402 | screenshot?: boolean;
|
1403 | spec?: boolean;
|
1404 | updateScreenshot?: boolean;
|
1405 | }
|
1406 | export interface JestConfig {
|
1407 | /**
|
1408 | * This option tells Jest that all imported modules in your tests should be mocked automatically.
|
1409 | * All modules used in your tests will have a replacement implementation, keeping the API surface. Default: false
|
1410 | */
|
1411 | automock?: boolean;
|
1412 | /**
|
1413 | * By default, Jest runs all tests and produces all errors into the console upon completion.
|
1414 | * The bail config option can be used here to have Jest stop running tests after the first failure. Default: false
|
1415 | */
|
1416 | bail?: boolean;
|
1417 | /**
|
1418 | * The directory where Jest should store its cached dependency information. Jest attempts to scan your dependency tree once (up-front)
|
1419 | * and cache it in order to ease some of the filesystem raking that needs to happen while running tests. This config option lets you
|
1420 | * customize where Jest stores that cache data on disk. Default: "/tmp/<path>"
|
1421 | */
|
1422 | cacheDirectory?: string;
|
1423 | /**
|
1424 | * Automatically clear mock calls and instances between every test. Equivalent to calling jest.clearAllMocks()
|
1425 | * between each test. This does not remove any mock implementation that may have been provided. Default: false
|
1426 | */
|
1427 | clearMocks?: boolean;
|
1428 | /**
|
1429 | * Indicates whether the coverage information should be collected while executing the test. Because this retrofits all
|
1430 | * executed files with coverage collection statements, it may significantly slow down your tests. Default: false
|
1431 | */
|
1432 | collectCoverage?: boolean;
|
1433 | /**
|
1434 | * An array of glob patterns indicating a set of files for which coverage information should be collected.
|
1435 | * If a file matches the specified glob pattern, coverage information will be collected for it even if no tests exist
|
1436 | * for this file and it's never required in the test suite. Default: undefined
|
1437 | */
|
1438 | collectCoverageFrom?: any[];
|
1439 | /**
|
1440 | * The directory where Jest should output its coverage files. Default: undefined
|
1441 | */
|
1442 | coverageDirectory?: string;
|
1443 | /**
|
1444 | * An array of regexp pattern strings that are matched against all file paths before executing the test. If the file path matches
|
1445 | * any of the patterns, coverage information will be skipped. These pattern strings match against the full path.
|
1446 | * Use the <rootDir> string token to include the path to your project's root directory to prevent it from accidentally
|
1447 | * ignoring all of your files in different environments that may have different root directories.
|
1448 | * Example: ["<rootDir>/build/", "<rootDir>/node_modules/"]. Default: ["/node_modules/"]
|
1449 | */
|
1450 | coveragePathIgnorePatterns?: any[];
|
1451 | /**
|
1452 | * A list of reporter names that Jest uses when writing coverage reports. Any istanbul reporter can be used.
|
1453 | * Default: ["json", "lcov", "text"]
|
1454 | */
|
1455 | coverageReporters?: any[];
|
1456 | /**
|
1457 | * This will be used to configure minimum threshold enforcement for coverage results. Thresholds can be specified as global,
|
1458 | * as a glob, and as a directory or file path. If thresholds aren't met, jest will fail. Thresholds specified as a positive
|
1459 | * number are taken to be the minimum percentage required. Thresholds specified as a negative number represent the maximum
|
1460 | * number of uncovered entities allowed. Default: undefined
|
1461 | */
|
1462 | coverageThreshold?: any;
|
1463 | errorOnDeprecated?: boolean;
|
1464 | forceCoverageMatch?: any[];
|
1465 | globals?: any;
|
1466 | globalSetup?: string;
|
1467 | globalTeardown?: string;
|
1468 | /**
|
1469 | * An array of directory names to be searched recursively up from the requiring module's location. Setting this option will
|
1470 | * override the default, if you wish to still search node_modules for packages include it along with any other
|
1471 | * options: ["node_modules", "bower_components"]. Default: ["node_modules"]
|
1472 | */
|
1473 | moduleDirectories?: string[];
|
1474 | /**
|
1475 | * An array of file extensions your modules use. If you require modules without specifying a file extension,
|
1476 | * these are the extensions Jest will look for. Default: ['ts', 'tsx', 'js', 'json']
|
1477 | */
|
1478 | moduleFileExtensions?: string[];
|
1479 | moduleNameMapper?: any;
|
1480 | modulePaths?: any[];
|
1481 | modulePathIgnorePatterns?: any[];
|
1482 | notify?: boolean;
|
1483 | notifyMode?: string;
|
1484 | preset?: string;
|
1485 | prettierPath?: string;
|
1486 | projects?: any;
|
1487 | reporters?: any;
|
1488 | resetMocks?: boolean;
|
1489 | resetModules?: boolean;
|
1490 | resolver?: string;
|
1491 | restoreMocks?: string;
|
1492 | rootDir?: string;
|
1493 | roots?: any[];
|
1494 | runner?: string;
|
1495 | /**
|
1496 | * The paths to modules that run some code to configure or set up the testing environment before each test.
|
1497 | * Since every test runs in its own environment, these scripts will be executed in the testing environment
|
1498 | * immediately before executing the test code itself. Default: []
|
1499 | */
|
1500 | setupFiles?: string[];
|
1501 | setupFilesAfterEnv?: string[];
|
1502 | snapshotSerializers?: any[];
|
1503 | testEnvironment?: string;
|
1504 | testEnvironmentOptions?: any;
|
1505 | testMatch?: string[];
|
1506 | testPathIgnorePatterns?: string[];
|
1507 | testPreset?: string;
|
1508 | testRegex?: string;
|
1509 | testResultsProcessor?: string;
|
1510 | testRunner?: string;
|
1511 | testURL?: string;
|
1512 | timers?: string;
|
1513 | transform?: {
|
1514 | [key: string]: string;
|
1515 | };
|
1516 | transformIgnorePatterns?: any[];
|
1517 | unmockedModulePathPatterns?: any[];
|
1518 | verbose?: boolean;
|
1519 | watchPathIgnorePatterns?: any[];
|
1520 | }
|
1521 | export interface TestingConfig extends JestConfig {
|
1522 | /**
|
1523 | * The `allowableMismatchedPixels` value is used to determine an acceptable
|
1524 | * number of pixels that can be mismatched before the image is considered
|
1525 | * to have changes. Realistically, two screenshots representing the same
|
1526 | * content may have a small number of pixels that are not identical due to
|
1527 | * anti-aliasing, which is perfectly normal. If the `allowableMismatchedRatio`
|
1528 | * is provided it will take precedence, otherwise `allowableMismatchedPixels`
|
1529 | * will be used.
|
1530 | */
|
1531 | allowableMismatchedPixels?: number;
|
1532 | /**
|
1533 | * The `allowableMismatchedRatio` ranges from `0` to `1` and is used to
|
1534 | * determine an acceptable ratio of pixels that can be mismatched before
|
1535 | * the image is considered to have changes. Realistically, two screenshots
|
1536 | * representing the same content may have a small number of pixels that
|
1537 | * are not identical due to anti-aliasing, which is perfectly normal. The
|
1538 | * `allowableMismatchedRatio` is the number of pixels that were mismatched,
|
1539 | * divided by the total number of pixels in the screenshot. For example,
|
1540 | * a ratio value of `0.06` means 6% of the pixels can be mismatched before
|
1541 | * the image is considered to have changes. If the `allowableMismatchedRatio`
|
1542 | * is provided it will take precedence, otherwise `allowableMismatchedPixels`
|
1543 | * will be used.
|
1544 | */
|
1545 | allowableMismatchedRatio?: number;
|
1546 | /**
|
1547 | * Matching threshold while comparing two screenshots. Value ranges from `0` to `1`.
|
1548 | * Smaller values make the comparison more sensitive. The `pixelmatchThreshold`
|
1549 | * value helps to ignore anti-aliasing. Default: `0.1`
|
1550 | */
|
1551 | pixelmatchThreshold?: number;
|
1552 | /**
|
1553 | * Additional arguments to pass to the browser instance.
|
1554 | */
|
1555 | browserArgs?: string[];
|
1556 | /**
|
1557 | * Path to a Chromium or Chrome executable to run instead of the bundled Chromium.
|
1558 | */
|
1559 | browserExecutablePath?: string;
|
1560 | /**
|
1561 | * Url of remote Chrome instance to use instead of local Chrome.
|
1562 | */
|
1563 | browserWSEndpoint?: string;
|
1564 | /**
|
1565 | * Whether to run browser e2e tests in headless mode. Defaults to true.
|
1566 | */
|
1567 | browserHeadless?: boolean;
|
1568 | /**
|
1569 | * Slows down e2e browser operations by the specified amount of milliseconds.
|
1570 | * Useful so that you can see what is going on.
|
1571 | */
|
1572 | browserSlowMo?: number;
|
1573 | /**
|
1574 | * By default, all E2E pages wait until the "load" event, this global setting can be used
|
1575 | * to change the default `waitUntil` behavior.
|
1576 | */
|
1577 | browserWaitUntil?: 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
|
1578 | /**
|
1579 | * Whether to auto-open a DevTools panel for each tab.
|
1580 | * If this option is true, the headless option will be set false
|
1581 | */
|
1582 | browserDevtools?: boolean;
|
1583 | /**
|
1584 | * Array of browser emulations to be using during e2e tests. A full e2e
|
1585 | * test is ran for each emulation.
|
1586 | */
|
1587 | emulate?: EmulateConfig[];
|
1588 | /**
|
1589 | * Path to the Screenshot Connector module.
|
1590 | */
|
1591 | screenshotConnector?: string;
|
1592 | /**
|
1593 | * Amount of time in milliseconds to wait before a screenshot is taken.
|
1594 | */
|
1595 | waitBeforeScreenshot?: number;
|
1596 | }
|
1597 | export interface EmulateConfig {
|
1598 | /**
|
1599 | * Predefined device descriptor name, such as "iPhone X" or "Nexus 10".
|
1600 | * For a complete list please see: https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts
|
1601 | */
|
1602 | device?: string;
|
1603 | /**
|
1604 | * User-Agent to be used. Defaults to the user-agent of the installed Puppeteer version.
|
1605 | */
|
1606 | userAgent?: string;
|
1607 | viewport?: EmulateViewport;
|
1608 | }
|
1609 | export interface EmulateViewport {
|
1610 | /**
|
1611 | * Page width in pixels.
|
1612 | */
|
1613 | width: number;
|
1614 | /**
|
1615 | * page height in pixels.
|
1616 | */
|
1617 | height: number;
|
1618 | /**
|
1619 | * Specify device scale factor (can be thought of as dpr). Defaults to 1.
|
1620 | */
|
1621 | deviceScaleFactor?: number;
|
1622 | /**
|
1623 | * Whether the meta viewport tag is taken into account. Defaults to false.
|
1624 | */
|
1625 | isMobile?: boolean;
|
1626 | /**
|
1627 | * Specifies if viewport supports touch events. Defaults to false
|
1628 | */
|
1629 | hasTouch?: boolean;
|
1630 | /**
|
1631 | * Specifies if viewport is in landscape mode. Defaults to false.
|
1632 | */
|
1633 | isLandscape?: boolean;
|
1634 | }
|
1635 | /**
|
1636 | * This sets the log level hierarchy for our terminal logger, ranging from
|
1637 | * most to least verbose.
|
1638 | *
|
1639 | * Ordering the levels like this lets us easily check whether we should log a
|
1640 | * message at a given time. For instance, if the log level is set to `'warn'`,
|
1641 | * then anything passed to the logger with level `'warn'` or `'error'` should
|
1642 | * be logged, but we should _not_ log anything with level `'info'` or `'debug'`.
|
1643 | *
|
1644 | * If we have a current log level `currentLevel` and a message with level
|
1645 | * `msgLevel` is passed to the logger, we can determine whether or not we should
|
1646 | * log it by checking if the log level on the message is further up or at the
|
1647 | * same level in the hierarchy than `currentLevel`, like so:
|
1648 | *
|
1649 | * ```ts
|
1650 | * LOG_LEVELS.indexOf(msgLevel) >= LOG_LEVELS.indexOf(currentLevel)
|
1651 | * ```
|
1652 | *
|
1653 | * NOTE: for the reasons described above, do not change the order of the entries
|
1654 | * in this array without good reason!
|
1655 | */
|
1656 | export declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error"];
|
1657 | export declare type LogLevel = typeof LOG_LEVELS[number];
|
1658 | /**
|
1659 | * Common logger to be used by the compiler, dev-server and CLI. The CLI will use a
|
1660 | * NodeJS based console logging and colors, and the web will use browser based
|
1661 | * logs and colors.
|
1662 | */
|
1663 | export interface Logger {
|
1664 | enableColors: (useColors: boolean) => void;
|
1665 | setLevel: (level: LogLevel) => void;
|
1666 | getLevel: () => LogLevel;
|
1667 | debug: (...msg: any[]) => void;
|
1668 | info: (...msg: any[]) => void;
|
1669 | warn: (...msg: any[]) => void;
|
1670 | error: (...msg: any[]) => void;
|
1671 | createTimeSpan: (startMsg: string, debug?: boolean, appendTo?: string[]) => LoggerTimeSpan;
|
1672 | printDiagnostics: (diagnostics: Diagnostic[], cwd?: string) => void;
|
1673 | red: (msg: string) => string;
|
1674 | green: (msg: string) => string;
|
1675 | yellow: (msg: string) => string;
|
1676 | blue: (msg: string) => string;
|
1677 | magenta: (msg: string) => string;
|
1678 | cyan: (msg: string) => string;
|
1679 | gray: (msg: string) => string;
|
1680 | bold: (msg: string) => string;
|
1681 | dim: (msg: string) => string;
|
1682 | bgRed: (msg: string) => string;
|
1683 | emoji: (e: string) => string;
|
1684 | setLogFilePath?: (p: string) => void;
|
1685 | writeLogs?: (append: boolean) => void;
|
1686 | createLineUpdater?: () => Promise<LoggerLineUpdater>;
|
1687 | }
|
1688 | export interface LoggerLineUpdater {
|
1689 | update(text: string): Promise<void>;
|
1690 | stop(): Promise<void>;
|
1691 | }
|
1692 | export interface LoggerTimeSpan {
|
1693 | duration(): number;
|
1694 | finish(finishedMsg: string, color?: string, bold?: boolean, newLineSuffix?: boolean): number;
|
1695 | }
|
1696 | export interface OutputTargetDist extends OutputTargetBase {
|
1697 | type: 'dist';
|
1698 | buildDir?: string;
|
1699 | dir?: string;
|
1700 | collectionDir?: string | null;
|
1701 | |
1702 |
|
1703 |
|
1704 |
|
1705 |
|
1706 |
|
1707 |
|
1708 |
|
1709 |
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 |
|
1715 |
|
1716 |
|
1717 |
|
1718 |
|
1719 |
|
1720 |
|
1721 | transformAliasedImportPathsInCollection?: boolean | null;
|
1722 | typesDir?: string;
|
1723 | esmLoaderPath?: string;
|
1724 | copy?: CopyTask[];
|
1725 | polyfills?: boolean;
|
1726 | empty?: boolean;
|
1727 | }
|
1728 | export interface OutputTargetDistCollection extends OutputTargetBase {
|
1729 | type: 'dist-collection';
|
1730 | empty?: boolean;
|
1731 | dir: string;
|
1732 | collectionDir: string;
|
1733 | |
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 |
|
1739 |
|
1740 |
|
1741 |
|
1742 |
|
1743 |
|
1744 |
|
1745 |
|
1746 |
|
1747 |
|
1748 |
|
1749 |
|
1750 |
|
1751 |
|
1752 | transformAliasedImportPaths?: boolean | null;
|
1753 | }
|
1754 | export interface OutputTargetDistTypes extends OutputTargetBase {
|
1755 | type: 'dist-types';
|
1756 | dir: string;
|
1757 | typesDir: string;
|
1758 | }
|
1759 | export interface OutputTargetDistLazy extends OutputTargetBase {
|
1760 | type: 'dist-lazy';
|
1761 | dir?: string;
|
1762 | esmDir?: string;
|
1763 | esmEs5Dir?: string;
|
1764 | systemDir?: string;
|
1765 | cjsDir?: string;
|
1766 | polyfills?: boolean;
|
1767 | isBrowserBuild?: boolean;
|
1768 | esmIndexFile?: string;
|
1769 | cjsIndexFile?: string;
|
1770 | systemLoaderFile?: string;
|
1771 | legacyLoaderFile?: string;
|
1772 | empty?: boolean;
|
1773 | }
|
1774 | export interface OutputTargetDistGlobalStyles extends OutputTargetBase {
|
1775 | type: 'dist-global-styles';
|
1776 | file: string;
|
1777 | }
|
1778 | export interface OutputTargetDistLazyLoader extends OutputTargetBase {
|
1779 | type: 'dist-lazy-loader';
|
1780 | dir: string;
|
1781 | esmDir: string;
|
1782 | esmEs5Dir?: string;
|
1783 | cjsDir: string;
|
1784 | componentDts: string;
|
1785 | empty: boolean;
|
1786 | }
|
1787 | export interface OutputTargetHydrate extends OutputTargetBase {
|
1788 | type: 'dist-hydrate-script';
|
1789 | dir?: string;
|
1790 | |
1791 |
|
1792 |
|
1793 |
|
1794 |
|
1795 | external?: string[];
|
1796 | empty?: boolean;
|
1797 | }
|
1798 | export interface OutputTargetCustom extends OutputTargetBase {
|
1799 | type: 'custom';
|
1800 | name: string;
|
1801 | validate?: (config: Config, diagnostics: Diagnostic[]) => void;
|
1802 | generator: (config: Config, compilerCtx: any, buildCtx: any, docs: any) => Promise<void>;
|
1803 | copy?: CopyTask[];
|
1804 | }
|
1805 |
|
1806 |
|
1807 |
|
1808 |
|
1809 | export interface OutputTargetDocsVscode extends OutputTargetBase {
|
1810 | |
1811 |
|
1812 |
|
1813 |
|
1814 | type: 'docs-vscode';
|
1815 | |
1816 |
|
1817 |
|
1818 | file: string;
|
1819 | |
1820 |
|
1821 |
|
1822 | sourceCodeBaseUrl?: string;
|
1823 | }
|
1824 | export interface OutputTargetDocsReadme extends OutputTargetBase {
|
1825 | type: 'docs-readme';
|
1826 | dir?: string;
|
1827 | dependencies?: boolean;
|
1828 | footer?: string;
|
1829 | strict?: boolean;
|
1830 | }
|
1831 | export interface OutputTargetDocsJson extends OutputTargetBase {
|
1832 | type: 'docs-json';
|
1833 | file: string;
|
1834 | typesFile?: string | null;
|
1835 | strict?: boolean;
|
1836 | }
|
1837 | export interface OutputTargetDocsCustom extends OutputTargetBase {
|
1838 | type: 'docs-custom';
|
1839 | generator: (docs: JsonDocs, config: Config) => void | Promise<void>;
|
1840 | strict?: boolean;
|
1841 | }
|
1842 | export interface OutputTargetStats extends OutputTargetBase {
|
1843 | type: 'stats';
|
1844 | file?: string;
|
1845 | }
|
1846 | export interface OutputTargetBaseNext {
|
1847 | type: string;
|
1848 | dir?: string;
|
1849 | }
|
1850 | export interface OutputTargetDistCustomElements extends OutputTargetBaseNext {
|
1851 | type: 'dist-custom-elements';
|
1852 | empty?: boolean;
|
1853 | externalRuntime?: boolean;
|
1854 | copy?: CopyTask[];
|
1855 | inlineDynamicImports?: boolean;
|
1856 | includeGlobalScripts?: boolean;
|
1857 | minify?: boolean;
|
1858 | |
1859 |
|
1860 |
|
1861 |
|
1862 |
|
1863 | autoDefineCustomElements?: boolean;
|
1864 | |
1865 |
|
1866 |
|
1867 | generateTypeDeclarations?: boolean;
|
1868 | }
|
1869 | export interface OutputTargetDistCustomElementsBundle extends OutputTargetBaseNext {
|
1870 | type: 'dist-custom-elements-bundle';
|
1871 | empty?: boolean;
|
1872 | externalRuntime?: boolean;
|
1873 | copy?: CopyTask[];
|
1874 | inlineDynamicImports?: boolean;
|
1875 | includeGlobalScripts?: boolean;
|
1876 | minify?: boolean;
|
1877 | }
|
1878 |
|
1879 |
|
1880 |
|
1881 | export interface OutputTargetBase {
|
1882 | |
1883 |
|
1884 |
|
1885 | type: string;
|
1886 | }
|
1887 | export declare type OutputTargetBuild = OutputTargetDistCollection | OutputTargetDistLazy;
|
1888 | export interface OutputTargetAngular extends OutputTargetBase {
|
1889 | type: 'angular';
|
1890 | componentCorePackage: string;
|
1891 | directivesProxyFile?: string;
|
1892 | directivesArrayFile?: string;
|
1893 | directivesUtilsFile?: string;
|
1894 | excludeComponents?: string[];
|
1895 | }
|
1896 | export interface OutputTargetCopy extends OutputTargetBase {
|
1897 | type: 'copy';
|
1898 | dir: string;
|
1899 | copy?: CopyTask[];
|
1900 | copyAssets?: 'collection' | 'dist';
|
1901 | }
|
1902 | export interface OutputTargetWww extends OutputTargetBase {
|
1903 | |
1904 |
|
1905 |
|
1906 | type: 'www';
|
1907 | |
1908 |
|
1909 |
|
1910 |
|
1911 |
|
1912 | buildDir?: string;
|
1913 | |
1914 |
|
1915 |
|
1916 |
|
1917 |
|
1918 | dir?: string;
|
1919 | |
1920 |
|
1921 |
|
1922 |
|
1923 | empty?: boolean;
|
1924 | |
1925 |
|
1926 |
|
1927 |
|
1928 |
|
1929 | indexHtml?: string;
|
1930 | |
1931 |
|
1932 |
|
1933 |
|
1934 |
|
1935 |
|
1936 |
|
1937 |
|
1938 |
|
1939 |
|
1940 |
|
1941 | copy?: CopyTask[];
|
1942 | |
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 |
|
1948 | baseUrl?: string;
|
1949 | |
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 | polyfills?: boolean;
|
1955 | |
1956 |
|
1957 |
|
1958 |
|
1959 |
|
1960 |
|
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 | prerenderConfig?: string;
|
1966 | |
1967 |
|
1968 |
|
1969 |
|
1970 |
|
1971 |
|
1972 | serviceWorker?: ServiceWorkerConfig | null | false;
|
1973 | appDir?: string;
|
1974 | }
|
1975 | export declare type OutputTarget = OutputTargetAngular | OutputTargetCopy | OutputTargetCustom | OutputTargetDist | OutputTargetDistCollection | OutputTargetDistCustomElements | OutputTargetDistCustomElementsBundle | OutputTargetDistLazy | OutputTargetDistGlobalStyles | OutputTargetDistLazyLoader | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetWww | OutputTargetHydrate | OutputTargetStats | OutputTargetDistTypes;
|
1976 | export interface ServiceWorkerConfig {
|
1977 | unregister?: boolean;
|
1978 | swDest?: string;
|
1979 | swSrc?: string;
|
1980 | globPatterns?: string[];
|
1981 | globDirectory?: string | string[];
|
1982 | globIgnores?: string | string[];
|
1983 | templatedUrls?: any;
|
1984 | maximumFileSizeToCacheInBytes?: number;
|
1985 | manifestTransforms?: any;
|
1986 | modifyUrlPrefix?: any;
|
1987 | dontCacheBustURLsMatching?: RegExp;
|
1988 | navigateFallback?: string;
|
1989 | navigateFallbackWhitelist?: RegExp[];
|
1990 | navigateFallbackBlacklist?: RegExp[];
|
1991 | cacheId?: string;
|
1992 | skipWaiting?: boolean;
|
1993 | clientsClaim?: boolean;
|
1994 | directoryIndex?: string;
|
1995 | runtimeCaching?: any[];
|
1996 | ignoreUrlParametersMatching?: any[];
|
1997 | handleFetch?: boolean;
|
1998 | }
|
1999 | export interface LoadConfigInit {
|
2000 | |
2001 |
|
2002 |
|
2003 |
|
2004 | config?: UnvalidatedConfig;
|
2005 | |
2006 |
|
2007 |
|
2008 |
|
2009 | configPath?: string;
|
2010 | logger?: Logger;
|
2011 | sys?: CompilerSystem;
|
2012 | |
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 | initTsConfig?: boolean;
|
2018 | }
|
2019 |
|
2020 |
|
2021 |
|
2022 |
|
2023 |
|
2024 | export interface LoadConfigResults {
|
2025 | config: ValidatedConfig;
|
2026 | diagnostics: Diagnostic[];
|
2027 | tsconfig: {
|
2028 | path: string;
|
2029 | compilerOptions: any;
|
2030 | files: string[];
|
2031 | include: string[];
|
2032 | exclude: string[];
|
2033 | extends: string;
|
2034 | };
|
2035 | }
|
2036 | export interface Diagnostic {
|
2037 | level: 'error' | 'warn' | 'info' | 'log' | 'debug';
|
2038 | type: string;
|
2039 | header?: string;
|
2040 | language?: string;
|
2041 | messageText: string;
|
2042 | debugText?: string;
|
2043 | code?: string;
|
2044 | absFilePath?: string;
|
2045 | relFilePath?: string;
|
2046 | lineNumber?: number;
|
2047 | columnNumber?: number;
|
2048 | lines?: {
|
2049 | lineIndex: number;
|
2050 | lineNumber: number;
|
2051 | text?: string;
|
2052 | errorCharStart: number;
|
2053 | errorLength?: number;
|
2054 | }[];
|
2055 | }
|
2056 | export interface CacheStorage {
|
2057 | get(key: string): Promise<any>;
|
2058 | set(key: string, value: any): Promise<void>;
|
2059 | }
|
2060 | export interface WorkerOptions {
|
2061 | maxConcurrentWorkers?: number;
|
2062 | maxConcurrentTasksPerWorker?: number;
|
2063 | logger?: Logger;
|
2064 | }
|
2065 | export interface RollupInterface {
|
2066 | rollup: {
|
2067 | (config: any): Promise<any>;
|
2068 | };
|
2069 | plugins: {
|
2070 | nodeResolve(opts: any): any;
|
2071 | replace(opts: any): any;
|
2072 | commonjs(opts: any): any;
|
2073 | json(): any;
|
2074 | };
|
2075 | }
|
2076 | export interface ResolveModuleOptions {
|
2077 | manuallyResolve?: boolean;
|
2078 | packageJson?: boolean;
|
2079 | }
|
2080 | export interface PrerenderStartOptions {
|
2081 | buildId?: string;
|
2082 | hydrateAppFilePath: string;
|
2083 | componentGraph: BuildResultsComponentGraph;
|
2084 | srcIndexHtmlPath: string;
|
2085 | }
|
2086 | export interface PrerenderResults {
|
2087 | buildId: string;
|
2088 | diagnostics: Diagnostic[];
|
2089 | urls: number;
|
2090 | duration: number;
|
2091 | average: number;
|
2092 | }
|
2093 |
|
2094 |
|
2095 |
|
2096 |
|
2097 |
|
2098 | export interface OptimizeCssInput {
|
2099 | input: string;
|
2100 | filePath?: string;
|
2101 | autoprefixer?: boolean | null | AutoprefixerOptions;
|
2102 | minify?: boolean;
|
2103 | sourceMap?: boolean;
|
2104 | resolveUrl?: (url: string) => Promise<string> | string;
|
2105 | }
|
2106 |
|
2107 |
|
2108 |
|
2109 |
|
2110 |
|
2111 |
|
2112 |
|
2113 |
|
2114 | export declare type AutoprefixerOptions = Object;
|
2115 |
|
2116 |
|
2117 |
|
2118 |
|
2119 | export interface OptimizeCssOutput {
|
2120 | output: string;
|
2121 | diagnostics: Diagnostic[];
|
2122 | }
|
2123 | export interface OptimizeJsInput {
|
2124 | input: string;
|
2125 | filePath?: string;
|
2126 | target?: 'es5' | 'latest';
|
2127 | pretty?: boolean;
|
2128 | sourceMap?: boolean;
|
2129 | }
|
2130 | export interface OptimizeJsOutput {
|
2131 | output: string;
|
2132 | sourceMap: any;
|
2133 | diagnostics: Diagnostic[];
|
2134 | }
|
2135 | export interface LazyRequire {
|
2136 | ensure(fromDir: string, moduleIds: string[]): Promise<Diagnostic[]>;
|
2137 | require(fromDir: string, moduleId: string): any;
|
2138 | getModulePath(fromDir: string, moduleId: string): string;
|
2139 | }
|
2140 | export interface FsWatcherItem {
|
2141 | close(): void;
|
2142 | }
|
2143 | export interface MakeDirectoryOptions {
|
2144 | |
2145 |
|
2146 |
|
2147 |
|
2148 | recursive?: boolean;
|
2149 | |
2150 |
|
2151 |
|
2152 |
|
2153 | mode?: number;
|
2154 | }
|
2155 | export interface FsStats {
|
2156 | isFile(): boolean;
|
2157 | isDirectory(): boolean;
|
2158 | isBlockDevice(): boolean;
|
2159 | isCharacterDevice(): boolean;
|
2160 | isSymbolicLink(): boolean;
|
2161 | isFIFO(): boolean;
|
2162 | isSocket(): boolean;
|
2163 | dev: number;
|
2164 | ino: number;
|
2165 | mode: number;
|
2166 | nlink: number;
|
2167 | uid: number;
|
2168 | gid: number;
|
2169 | rdev: number;
|
2170 | size: number;
|
2171 | blksize: number;
|
2172 | blocks: number;
|
2173 | atime: Date;
|
2174 | mtime: Date;
|
2175 | ctime: Date;
|
2176 | birthtime: Date;
|
2177 | }
|
2178 | export interface Compiler {
|
2179 | build(): Promise<CompilerBuildResults>;
|
2180 | createWatcher(): Promise<CompilerWatcher>;
|
2181 | destroy(): Promise<void>;
|
2182 | sys: CompilerSystem;
|
2183 | }
|
2184 | export interface CompilerWatcher extends BuildOnEvents {
|
2185 | start: () => Promise<WatcherCloseResults>;
|
2186 | close: () => Promise<WatcherCloseResults>;
|
2187 | request: (data: CompilerRequest) => Promise<CompilerRequestResponse>;
|
2188 | }
|
2189 | export interface CompilerRequest {
|
2190 | path?: string;
|
2191 | }
|
2192 | export interface WatcherCloseResults {
|
2193 | exitCode: number;
|
2194 | }
|
2195 | export interface CompilerRequestResponse {
|
2196 | path: string;
|
2197 | nodeModuleId: string;
|
2198 | nodeModuleVersion: string;
|
2199 | nodeResolvedPath: string;
|
2200 | cachePath: string;
|
2201 | cacheHit: boolean;
|
2202 | content: string;
|
2203 | status: number;
|
2204 | }
|
2205 | export interface TranspileOptions {
|
2206 | |
2207 |
|
2208 |
|
2209 |
|
2210 | componentExport?: 'customelement' | 'module' | string | undefined;
|
2211 | |
2212 |
|
2213 |
|
2214 |
|
2215 |
|
2216 |
|
2217 | componentMetadata?: 'runtimestatic' | 'compilerstatic' | string | undefined;
|
2218 | |
2219 |
|
2220 |
|
2221 |
|
2222 | coreImportPath?: string;
|
2223 | |
2224 |
|
2225 |
|
2226 | currentDirectory?: string;
|
2227 | |
2228 |
|
2229 |
|
2230 | file?: string;
|
2231 | |
2232 |
|
2233 |
|
2234 |
|
2235 | module?: 'cjs' | 'esm' | string;
|
2236 | /**
|
2237 | * Sets how and if any properties, methods and events are proxied on the
|
2238 | * component class. The `defineproperty` value sets the getters and setters
|
2239 | * using Object.defineProperty. Default is `defineproperty`.
|
2240 | */
|
2241 | proxy?: 'defineproperty' | string | undefined;
|
2242 | /**
|
2243 | * How component styles should be associated to the component. The `static`
|
2244 | * setting will assign the styles as a static getter on the component class.
|
2245 | */
|
2246 | style?: 'static' | string | undefined;
|
2247 | /**
|
2248 | * How style data should be added for imports. For example, the `queryparams` value
|
2249 | * adds the component's tagname and encapsulation info as querystring parameter
|
2250 | * to the style's import, such as `style.css?tag=my-tag&encapsulation=shadow`. This
|
2251 | * style data can be used by bundlers to further optimize each component's css.
|
2252 | * Set to `null` to not include the querystring parameters. Default is `queryparams`.
|
2253 | */
|
2254 | styleImportData?: 'queryparams' | string | undefined;
|
2255 | /**
|
2256 | * The JavaScript source target TypeScript should to transpile to. Values can be
|
2257 | * `latest`, `esnext`, `es2017`, `es2015`, or `es5`. Defaults to `latest`.
|
2258 | */
|
2259 | target?: CompileTarget;
|
2260 | /**
|
2261 | * Create a source map. Using `inline` will inline the source map into the
|
2262 | * code, otherwise the source map will be in the returned `map` property.
|
2263 | * Default is `true`.
|
2264 | */
|
2265 | sourceMap?: boolean | 'inline';
|
2266 | /**
|
2267 | * Base directory to resolve non-relative module names. Same as the `baseUrl`
|
2268 | * TypeScript compiler option: https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
|
2269 | */
|
2270 | baseUrl?: string;
|
2271 | /**
|
2272 | * List of path mapping entries for module names to locations relative to the `baseUrl`.
|
2273 | * Same as the `paths` TypeScript compiler option:
|
2274 | * https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
|
2275 | */
|
2276 | paths?: {
|
2277 | [key: string]: string[];
|
2278 | };
|
2279 | |
2280 |
|
2281 |
|
2282 | sys?: CompilerSystem;
|
2283 | }
|
2284 | export declare type CompileTarget = 'latest' | 'esnext' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | 'es2015' | 'es5' | string | undefined;
|
2285 | export interface TranspileResults {
|
2286 | code: string;
|
2287 | data?: any[];
|
2288 | diagnostics: Diagnostic[];
|
2289 | imports?: {
|
2290 | path: string;
|
2291 | }[];
|
2292 | inputFileExtension: string;
|
2293 | inputFilePath: string;
|
2294 | map: any;
|
2295 | outputFilePath: string;
|
2296 | }
|
2297 | export interface TransformOptions {
|
2298 | coreImportPath: string;
|
2299 | componentExport: 'lazy' | 'module' | 'customelement' | null;
|
2300 | componentMetadata: 'runtimestatic' | 'compilerstatic' | null;
|
2301 | currentDirectory: string;
|
2302 | file?: string;
|
2303 | isolatedModules?: boolean;
|
2304 | module?: 'cjs' | 'esm';
|
2305 | proxy: 'defineproperty' | null;
|
2306 | style: 'static' | null;
|
2307 | styleImportData: 'queryparams' | null;
|
2308 | target?: string;
|
2309 | }
|
2310 | export interface CompileScriptMinifyOptions {
|
2311 | target?: CompileTarget;
|
2312 | pretty?: boolean;
|
2313 | }
|
2314 | export interface DevServer extends BuildEmitEvents {
|
2315 | address: string;
|
2316 | basePath: string;
|
2317 | browserUrl: string;
|
2318 | protocol: string;
|
2319 | port: number;
|
2320 | root: string;
|
2321 | close(): Promise<void>;
|
2322 | }
|
2323 | export interface CliInitOptions {
|
2324 | args: string[];
|
2325 | logger: Logger;
|
2326 | sys: CompilerSystem;
|
2327 | }
|