@angular/compiler-cli 15.2.0-rc.0 → 16.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/bundles/{chunk-JYL7IHZC.js → chunk-2DMH5JXJ.js} +16 -23
  2. package/bundles/chunk-2DMH5JXJ.js.map +6 -0
  3. package/bundles/{chunk-ZB4CDKOH.js → chunk-4TCRZYAK.js} +2 -2
  4. package/bundles/{chunk-NJMZRTB6.js → chunk-54RHUHYB.js} +1 -2
  5. package/bundles/{chunk-64X67E3N.js → chunk-6CARGXRJ.js} +5 -5
  6. package/bundles/{chunk-O4JLZZWJ.js → chunk-EDWIBG7R.js} +1 -10
  7. package/bundles/chunk-EDWIBG7R.js.map +6 -0
  8. package/bundles/{chunk-6ZJFIQBG.js → chunk-GYHDNUIK.js} +1 -2
  9. package/bundles/{chunk-HYFCMILZ.js → chunk-IS6KZYEA.js} +384 -614
  10. package/bundles/chunk-IS6KZYEA.js.map +6 -0
  11. package/bundles/{chunk-Q6W3UCXI.js → chunk-JHMH3CX2.js} +92 -125
  12. package/bundles/chunk-JHMH3CX2.js.map +6 -0
  13. package/bundles/chunk-K2A5WD7L.js +872 -0
  14. package/bundles/chunk-K2A5WD7L.js.map +6 -0
  15. package/bundles/chunk-PSGRCFPQ.js +714 -0
  16. package/bundles/chunk-PSGRCFPQ.js.map +6 -0
  17. package/bundles/index.js +13 -12
  18. package/bundles/index.js.map +1 -1
  19. package/bundles/linker/babel/index.js +8 -7
  20. package/bundles/linker/babel/index.js.map +1 -1
  21. package/bundles/linker/index.js +4 -3
  22. package/bundles/private/bazel.js +1 -1
  23. package/bundles/private/localize.js +1 -1
  24. package/bundles/private/migrations.js +5 -4
  25. package/bundles/private/tooling.js +4 -2
  26. package/bundles/src/bin/ng_xi18n.js +7 -6
  27. package/bundles/src/bin/ng_xi18n.js.map +1 -1
  28. package/bundles/src/bin/ngc.js +7 -6
  29. package/bundles/src/bin/ngc.js.map +1 -1
  30. package/bundles_metadata.json +1 -1
  31. package/package.json +2 -15
  32. package/src/ngtsc/annotations/ng_module/src/handler.d.ts +1 -3
  33. package/src/ngtsc/core/api/src/adapter.d.ts +0 -7
  34. package/src/ngtsc/core/api/src/options.d.ts +2 -2
  35. package/src/ngtsc/core/api/src/public_options.d.ts +0 -25
  36. package/src/ngtsc/core/src/host.d.ts +3 -5
  37. package/src/ngtsc/imports/index.d.ts +1 -0
  38. package/src/ngtsc/imports/src/default.d.ts +6 -10
  39. package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +61 -0
  40. package/src/ngtsc/shims/api.d.ts +0 -19
  41. package/src/ngtsc/shims/index.d.ts +0 -2
  42. package/src/transformers/api.d.ts +0 -5
  43. package/bundles/chunk-7DUI3BSX.js +0 -29
  44. package/bundles/chunk-7DUI3BSX.js.map +0 -6
  45. package/bundles/chunk-BEXFRTBC.js +0 -2187
  46. package/bundles/chunk-BEXFRTBC.js.map +0 -6
  47. package/bundles/chunk-HYFCMILZ.js.map +0 -6
  48. package/bundles/chunk-JYL7IHZC.js.map +0 -6
  49. package/bundles/chunk-O4JLZZWJ.js.map +0 -6
  50. package/bundles/chunk-OAZD7RII.js +0 -5263
  51. package/bundles/chunk-OAZD7RII.js.map +0 -6
  52. package/bundles/chunk-Q6W3UCXI.js.map +0 -6
  53. package/bundles/chunk-YRDMG3GM.js +0 -115
  54. package/bundles/chunk-YRDMG3GM.js.map +0 -6
  55. package/bundles/chunk-Z534TW2O.js +0 -1540
  56. package/bundles/chunk-Z534TW2O.js.map +0 -6
  57. package/bundles/ngcc/index.js +0 -51
  58. package/bundles/ngcc/index.js.map +0 -6
  59. package/bundles/ngcc/main-ngcc.js +0 -48
  60. package/bundles/ngcc/main-ngcc.js.map +0 -6
  61. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +0 -113
  62. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +0 -6
  63. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +0 -34
  64. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +0 -6
  65. package/ngcc/index.d.ts +0 -19
  66. package/ngcc/main-ngcc.d.ts +0 -2
  67. package/ngcc/src/analysis/decoration_analyzer.d.ts +0 -80
  68. package/ngcc/src/analysis/migration_host.d.ts +0 -22
  69. package/ngcc/src/analysis/module_with_providers_analyzer.d.ts +0 -61
  70. package/ngcc/src/analysis/ngcc_references_registry.d.ts +0 -34
  71. package/ngcc/src/analysis/ngcc_trait_compiler.d.ts +0 -42
  72. package/ngcc/src/analysis/private_declarations_analyzer.d.ts +0 -29
  73. package/ngcc/src/analysis/types.d.ts +0 -29
  74. package/ngcc/src/analysis/util.d.ts +0 -11
  75. package/ngcc/src/command_line_options.d.ts +0 -3
  76. package/ngcc/src/constants.d.ts +0 -9
  77. package/ngcc/src/dependencies/commonjs_dependency_host.d.ts +0 -20
  78. package/ngcc/src/dependencies/dependency_host.d.ts +0 -77
  79. package/ngcc/src/dependencies/dependency_resolver.d.ts +0 -102
  80. package/ngcc/src/dependencies/dts_dependency_host.d.ts +0 -20
  81. package/ngcc/src/dependencies/esm_dependency_host.d.ts +0 -93
  82. package/ngcc/src/dependencies/module_resolver.d.ts +0 -134
  83. package/ngcc/src/dependencies/umd_dependency_host.d.ts +0 -9
  84. package/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.d.ts +0 -41
  85. package/ngcc/src/entry_point_finder/entry_point_collector.d.ts +0 -41
  86. package/ngcc/src/entry_point_finder/interface.d.ts +0 -14
  87. package/ngcc/src/entry_point_finder/program_based_entry_point_finder.d.ts +0 -61
  88. package/ngcc/src/entry_point_finder/targeted_entry_point_finder.d.ts +0 -95
  89. package/ngcc/src/entry_point_finder/tracing_entry_point_finder.d.ts +0 -67
  90. package/ngcc/src/entry_point_finder/utils.d.ts +0 -38
  91. package/ngcc/src/execution/analyze_entry_points.d.ts +0 -9
  92. package/ngcc/src/execution/api.d.ts +0 -27
  93. package/ngcc/src/execution/cluster/api.d.ts +0 -51
  94. package/ngcc/src/execution/cluster/executor.d.ts +0 -29
  95. package/ngcc/src/execution/cluster/master.d.ts +0 -57
  96. package/ngcc/src/execution/cluster/ngcc_cluster_worker.d.ts +0 -8
  97. package/ngcc/src/execution/cluster/package_json_updater.d.ts +0 -22
  98. package/ngcc/src/execution/cluster/utils.d.ts +0 -44
  99. package/ngcc/src/execution/cluster/worker.d.ts +0 -10
  100. package/ngcc/src/execution/create_compile_function.d.ts +0 -10
  101. package/ngcc/src/execution/single_process_executor.d.ts +0 -34
  102. package/ngcc/src/execution/tasks/api.d.ts +0 -141
  103. package/ngcc/src/execution/tasks/completion.d.ts +0 -41
  104. package/ngcc/src/execution/tasks/queues/base_task_queue.d.ts +0 -38
  105. package/ngcc/src/execution/tasks/queues/parallel_task_queue.d.ts +0 -27
  106. package/ngcc/src/execution/tasks/queues/serial_task_queue.d.ts +0 -16
  107. package/ngcc/src/execution/tasks/utils.d.ts +0 -57
  108. package/ngcc/src/host/commonjs_host.d.ts +0 -69
  109. package/ngcc/src/host/commonjs_umd_utils.d.ts +0 -146
  110. package/ngcc/src/host/delegating_host.d.ts +0 -43
  111. package/ngcc/src/host/esm2015_host.d.ts +0 -935
  112. package/ngcc/src/host/esm5_host.d.ts +0 -299
  113. package/ngcc/src/host/ngcc_host.d.ts +0 -87
  114. package/ngcc/src/host/umd_host.d.ts +0 -85
  115. package/ngcc/src/host/utils.d.ts +0 -9
  116. package/ngcc/src/locking/async_locker.d.ts +0 -34
  117. package/ngcc/src/locking/lock_file.d.ts +0 -31
  118. package/ngcc/src/locking/lock_file_with_child_process/index.d.ts +0 -44
  119. package/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.d.ts +0 -1
  120. package/ngcc/src/locking/lock_file_with_child_process/util.d.ts +0 -16
  121. package/ngcc/src/locking/sync_locker.d.ts +0 -35
  122. package/ngcc/src/main.d.ts +0 -17
  123. package/ngcc/src/migrations/migration.d.ts +0 -59
  124. package/ngcc/src/migrations/missing_injectable_migration.d.ts +0 -35
  125. package/ngcc/src/migrations/undecorated_child_migration.d.ts +0 -15
  126. package/ngcc/src/migrations/undecorated_parent_migration.d.ts +0 -51
  127. package/ngcc/src/migrations/utils.d.ts +0 -41
  128. package/ngcc/src/ngcc_options.d.ts +0 -155
  129. package/ngcc/src/packages/adjust_cjs_umd_exports.d.ts +0 -16
  130. package/ngcc/src/packages/build_marker.d.ts +0 -44
  131. package/ngcc/src/packages/bundle_program.d.ts +0 -35
  132. package/ngcc/src/packages/configuration.d.ts +0 -222
  133. package/ngcc/src/packages/entry_point.d.ts +0 -109
  134. package/ngcc/src/packages/entry_point_bundle.d.ts +0 -46
  135. package/ngcc/src/packages/entry_point_manifest.d.ts +0 -79
  136. package/ngcc/src/packages/ngcc_compiler_host.d.ts +0 -36
  137. package/ngcc/src/packages/patch_ts_expando_initializer.d.ts +0 -41
  138. package/ngcc/src/packages/source_file_cache.d.ts +0 -97
  139. package/ngcc/src/packages/transformer.d.ts +0 -70
  140. package/ngcc/src/path_mappings.d.ts +0 -19
  141. package/ngcc/src/rendering/commonjs_rendering_formatter.d.ts +0 -34
  142. package/ngcc/src/rendering/dts_renderer.d.ts +0 -51
  143. package/ngcc/src/rendering/esm5_rendering_formatter.d.ts +0 -35
  144. package/ngcc/src/rendering/esm_rendering_formatter.d.ts +0 -84
  145. package/ngcc/src/rendering/ngcc_import_rewriter.d.ts +0 -13
  146. package/ngcc/src/rendering/renderer.d.ts +0 -72
  147. package/ngcc/src/rendering/rendering_formatter.d.ts +0 -37
  148. package/ngcc/src/rendering/source_maps.d.ts +0 -23
  149. package/ngcc/src/rendering/umd_rendering_formatter.d.ts +0 -54
  150. package/ngcc/src/rendering/utils.d.ts +0 -24
  151. package/ngcc/src/utils.d.ts +0 -112
  152. package/ngcc/src/writing/cleaning/cleaning_strategies.d.ts +0 -44
  153. package/ngcc/src/writing/cleaning/package_cleaner.d.ts +0 -38
  154. package/ngcc/src/writing/cleaning/utils.d.ts +0 -15
  155. package/ngcc/src/writing/file_writer.d.ts +0 -28
  156. package/ngcc/src/writing/in_place_file_writer.d.ts +0 -28
  157. package/ngcc/src/writing/new_entry_point_file_writer.d.ts +0 -48
  158. package/ngcc/src/writing/package_json_updater.d.ts +0 -98
  159. package/src/ngtsc/shims/src/factory_generator.d.ts +0 -24
  160. package/src/ngtsc/shims/src/summary_generator.d.ts +0 -15
  161. package/src/transformers/downlevel_decorators_transform/patch_alias_reference_resolution.d.ts +0 -14
  162. /package/bundles/{chunk-ZB4CDKOH.js.map → chunk-4TCRZYAK.js.map} +0 -0
  163. /package/bundles/{chunk-NJMZRTB6.js.map → chunk-54RHUHYB.js.map} +0 -0
  164. /package/bundles/{chunk-64X67E3N.js.map → chunk-6CARGXRJ.js.map} +0 -0
  165. /package/bundles/{chunk-6ZJFIQBG.js.map → chunk-GYHDNUIK.js.map} +0 -0
@@ -1,61 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { AbsoluteFsPath, ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
9
- import { Logger } from '../../../src/ngtsc/logging';
10
- import { ParsedConfiguration } from '../../../src/perform_compile';
11
- import { EntryPointWithDependencies } from '../dependencies/dependency_host';
12
- import { DependencyResolver } from '../dependencies/dependency_resolver';
13
- import { NgccConfiguration } from '../packages/configuration';
14
- import { EntryPointManifest } from '../packages/entry_point_manifest';
15
- import { EntryPointCollector } from './entry_point_collector';
16
- import { TracingEntryPointFinder } from './tracing_entry_point_finder';
17
- /**
18
- * An EntryPointFinder that starts from the files in the program defined by the given tsconfig.json
19
- * and only returns entry-points that are dependencies of these files.
20
- *
21
- * This is faster than searching the entire file-system for all the entry-points,
22
- * and is used primarily by the CLI integration.
23
- */
24
- export declare class ProgramBasedEntryPointFinder extends TracingEntryPointFinder {
25
- private entryPointCollector;
26
- private entryPointManifest;
27
- private tsConfig;
28
- private entryPointsWithDependencies;
29
- constructor(fs: ReadonlyFileSystem, config: NgccConfiguration, logger: Logger, resolver: DependencyResolver, entryPointCollector: EntryPointCollector, entryPointManifest: EntryPointManifest, basePath: AbsoluteFsPath, tsConfig: ParsedConfiguration, projectPath: AbsoluteFsPath);
30
- /**
31
- * Return an array containing the external import paths that were extracted from the source-files
32
- * of the program defined by the tsconfig.json.
33
- */
34
- protected getInitialEntryPointPaths(): AbsoluteFsPath[];
35
- /**
36
- * For the given `entryPointPath`, compute, or retrieve, the entry-point information, including
37
- * paths to other entry-points that this entry-point depends upon.
38
- *
39
- * In this entry-point finder, we use the `EntryPointManifest` to avoid computing each
40
- * entry-point's dependencies in the case that this had been done previously.
41
- *
42
- * @param entryPointPath the path to the entry-point whose information and dependencies are to be
43
- * retrieved or computed.
44
- *
45
- * @returns the entry-point and its dependencies or `null` if the entry-point is not compiled by
46
- * Angular or cannot be determined.
47
- */
48
- protected getEntryPointWithDeps(entryPointPath: AbsoluteFsPath): EntryPointWithDependencies | null;
49
- /**
50
- * Walk the base paths looking for entry-points or load this information from an entry-point
51
- * manifest, if available.
52
- */
53
- private findOrLoadEntryPoints;
54
- /**
55
- * Search the `basePath` for possible Angular packages and entry-points.
56
- *
57
- * @param basePath The path at which to start the search.
58
- * @returns an array of `EntryPoint`s that were found within `basePath`.
59
- */
60
- walkBasePathForPackages(basePath: AbsoluteFsPath): EntryPointWithDependencies[];
61
- }
@@ -1,95 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { AbsoluteFsPath, ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
9
- import { Logger } from '../../../src/ngtsc/logging';
10
- import { EntryPointWithDependencies } from '../dependencies/dependency_host';
11
- import { DependencyResolver, SortedEntryPointsInfo } from '../dependencies/dependency_resolver';
12
- import { NgccConfiguration } from '../packages/configuration';
13
- import { EntryPointJsonProperty } from '../packages/entry_point';
14
- import { PathMappings } from '../path_mappings';
15
- import { TracingEntryPointFinder } from './tracing_entry_point_finder';
16
- /**
17
- * An EntryPointFinder that starts from a target entry-point and only finds
18
- * entry-points that are dependencies of the target.
19
- *
20
- * This is faster than searching the entire file-system for all the entry-points,
21
- * and is used primarily by the CLI integration.
22
- */
23
- export declare class TargetedEntryPointFinder extends TracingEntryPointFinder {
24
- private targetPath;
25
- constructor(fs: ReadonlyFileSystem, config: NgccConfiguration, logger: Logger, resolver: DependencyResolver, basePath: AbsoluteFsPath, pathMappings: PathMappings | undefined, targetPath: AbsoluteFsPath);
26
- /**
27
- * Search for Angular entry-points that can be reached from the entry-point specified by the given
28
- * `targetPath`.
29
- */
30
- findEntryPoints(): SortedEntryPointsInfo;
31
- /**
32
- * Determine whether the entry-point at the given `targetPath` needs to be processed.
33
- *
34
- * @param propertiesToConsider the package.json properties that should be considered for
35
- * processing.
36
- * @param compileAllFormats true if all formats need to be processed, or false if it is enough for
37
- * one of the formats covered by the `propertiesToConsider` is processed.
38
- */
39
- targetNeedsProcessingOrCleaning(propertiesToConsider: EntryPointJsonProperty[], compileAllFormats: boolean): boolean;
40
- /**
41
- * Return an array containing the `targetPath` from which to start the trace.
42
- */
43
- protected getInitialEntryPointPaths(): AbsoluteFsPath[];
44
- /**
45
- * For the given `entryPointPath`, compute, or retrieve, the entry-point information, including
46
- * paths to other entry-points that this entry-point depends upon.
47
- *
48
- * @param entryPointPath the path to the entry-point whose information and dependencies are to be
49
- * retrieved or computed.
50
- *
51
- * @returns the entry-point and its dependencies or `null` if the entry-point is not compiled by
52
- * Angular or cannot be determined.
53
- */
54
- protected getEntryPointWithDeps(entryPointPath: AbsoluteFsPath): EntryPointWithDependencies | null;
55
- /**
56
- * Compute the path to the package that contains the given entry-point.
57
- *
58
- * In this entry-point finder it is not trivial to find the containing package, since it is
59
- * possible that this entry-point is not directly below the directory containing the package.
60
- * Moreover, the import path could be affected by path-mapping.
61
- *
62
- * @param entryPointPath the path to the entry-point, whose package path we want to compute.
63
- */
64
- private computePackagePath;
65
- /**
66
- * Compute whether the `test` path is contained within the `base` path.
67
- *
68
- * Note that this doesn't use a simple `startsWith()` since that would result in a false positive
69
- * for `test` paths such as `a/b/c-x` when the `base` path is `a/b/c`.
70
- *
71
- * Since `fs.relative()` can be quite expensive we check the fast possibilities first.
72
- */
73
- private isPathContainedBy;
74
- /**
75
- * Search down to the `entryPointPath` from the `containingPath` for the first `package.json` that
76
- * we come to. This is the path to the entry-point's containing package. For example if
77
- * `containingPath` is `/a/b/c` and `entryPointPath` is `/a/b/c/d/e` and there exists
78
- * `/a/b/c/d/package.json` and `/a/b/c/d/e/package.json`, then we will return `/a/b/c/d`.
79
- *
80
- * To account for nested `node_modules` we actually start the search at the last `node_modules` in
81
- * the `entryPointPath` that is below the `containingPath`. E.g. if `containingPath` is `/a/b/c`
82
- * and `entryPointPath` is `/a/b/c/d/node_modules/x/y/z`, we start the search at
83
- * `/a/b/c/d/node_modules`.
84
- */
85
- private computePackagePathFromContainingPath;
86
- /**
87
- * Search up the directory tree from the `entryPointPath` looking for a `node_modules` directory
88
- * that we can use as a potential starting point for computing the package path.
89
- */
90
- private computePackagePathFromNearestNodeModules;
91
- /**
92
- * Split the given `path` into path segments using an FS independent algorithm.
93
- */
94
- private splitPath;
95
- }
@@ -1,67 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { AbsoluteFsPath, ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
9
- import { Logger } from '../../../src/ngtsc/logging';
10
- import { EntryPointWithDependencies } from '../dependencies/dependency_host';
11
- import { DependencyResolver, SortedEntryPointsInfo } from '../dependencies/dependency_resolver';
12
- import { NgccConfiguration } from '../packages/configuration';
13
- import { PathMappings } from '../path_mappings';
14
- import { EntryPointFinder } from './interface';
15
- /**
16
- * An EntryPointFinder that starts from a set of initial files and only returns entry-points that
17
- * are dependencies of these files.
18
- *
19
- * This is faster than processing all entry-points in the entire file-system, and is used primarily
20
- * by the CLI integration.
21
- *
22
- * There are two concrete implementations of this class.
23
- *
24
- * * `TargetEntryPointFinder` - is given a single entry-point as the initial entry-point. This can
25
- * be used in the synchronous CLI integration where the build tool has identified an external
26
- * import to one of the source files being built.
27
- * * `ProgramBasedEntryPointFinder` - computes the initial entry-points from the source files
28
- * computed from a `tsconfig.json` file. This can be used in the asynchronous CLI integration
29
- * where the `tsconfig.json` to be used to do the build is known.
30
- */
31
- export declare abstract class TracingEntryPointFinder implements EntryPointFinder {
32
- protected fs: ReadonlyFileSystem;
33
- protected config: NgccConfiguration;
34
- protected logger: Logger;
35
- protected resolver: DependencyResolver;
36
- protected basePath: AbsoluteFsPath;
37
- protected pathMappings: PathMappings | undefined;
38
- private basePaths;
39
- constructor(fs: ReadonlyFileSystem, config: NgccConfiguration, logger: Logger, resolver: DependencyResolver, basePath: AbsoluteFsPath, pathMappings: PathMappings | undefined);
40
- /**
41
- * Search for Angular package entry-points.
42
- */
43
- findEntryPoints(): SortedEntryPointsInfo;
44
- /**
45
- * Return an array of entry-point paths from which to start the trace.
46
- */
47
- protected abstract getInitialEntryPointPaths(): AbsoluteFsPath[];
48
- /**
49
- * For the given `entryPointPath`, compute, or retrieve, the entry-point information, including
50
- * paths to other entry-points that this entry-point depends upon.
51
- *
52
- * @param entryPointPath the path to the entry-point whose information and dependencies are to be
53
- * retrieved or computed.
54
- *
55
- * @returns the entry-point and its dependencies or `null` if the entry-point is not compiled by
56
- * Angular or cannot be determined.
57
- */
58
- protected abstract getEntryPointWithDeps(entryPointPath: AbsoluteFsPath): EntryPointWithDependencies | null;
59
- /**
60
- * Parse the path-mappings to compute the base-paths that need to be considered when finding
61
- * entry-points.
62
- *
63
- * This processing can be time-consuming if the path-mappings are complex or extensive.
64
- * So the result is cached locally once computed.
65
- */
66
- protected getBasePaths(): AbsoluteFsPath[];
67
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
9
- import { Logger } from '../../../src/ngtsc/logging';
10
- import { PathMappings } from '../path_mappings';
11
- /**
12
- * Extract all the base-paths that we need to search for entry-points.
13
- *
14
- * This always contains the standard base-path (`sourceDirectory`).
15
- * But it also parses the `paths` mappings object to guess additional base-paths.
16
- *
17
- * For example:
18
- *
19
- * ```
20
- * getBasePaths('/node_modules', {baseUrl: '/dist', paths: {'*': ['lib/*', 'lib/generated/*']}})
21
- * > ['/node_modules', '/dist/lib']
22
- * ```
23
- *
24
- * Notice that `'/dist'` is not included as there is no `'*'` path,
25
- * and `'/dist/lib/generated'` is not included as it is covered by `'/dist/lib'`.
26
- *
27
- * @param sourceDirectory The standard base-path (e.g. node_modules).
28
- * @param pathMappings Path mapping configuration, from which to extract additional base-paths.
29
- */
30
- export declare function getBasePaths(logger: Logger, sourceDirectory: AbsoluteFsPath, pathMappings: PathMappings | undefined): AbsoluteFsPath[];
31
- /**
32
- * Run a task and track how long it takes.
33
- *
34
- * @param task The task whose duration we are tracking.
35
- * @param log The function to call with the duration of the task.
36
- * @returns The result of calling `task`.
37
- */
38
- export declare function trackDuration<T = void>(task: () => T extends Promise<unknown> ? never : T, log: (duration: number) => void): T;
@@ -1,9 +0,0 @@
1
- import { FileSystem } from '../../../src/ngtsc/file_system';
2
- import { Logger } from '../../../src/ngtsc/logging';
3
- import { EntryPointFinder } from '../entry_point_finder/interface';
4
- import { EntryPointJsonProperty } from '../packages/entry_point';
5
- import { AnalyzeEntryPointsFn } from './api';
6
- /**
7
- * Create the function for performing the analysis of the entry-points.
8
- */
9
- export declare function getAnalyzeEntryPointsFn(logger: Logger, finder: EntryPointFinder, fileSystem: FileSystem, supportedPropertiesToConsider: EntryPointJsonProperty[], typingsOnly: boolean, compileAllFormats: boolean, propertiesToConsider: string[], inParallel: boolean): AnalyzeEntryPointsFn;
@@ -1,27 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { FileToWrite } from '../rendering/utils';
9
- import { Task, TaskCompletedCallback, TaskQueue } from './tasks/api';
10
- /**
11
- * The type of the function that analyzes entry-points and creates the list of tasks.
12
- *
13
- * @return A list of tasks that need to be executed in order to process the necessary format
14
- * properties for all entry-points.
15
- */
16
- export type AnalyzeEntryPointsFn = () => TaskQueue;
17
- /** The type of the function that can process/compile a task. */
18
- export type CompileFn<T> = (task: Task) => void | T;
19
- /** The type of the function that creates the `CompileFn` function used to process tasks. */
20
- export type CreateCompileFn = <T extends void | Promise<void>>(beforeWritingFiles: (transformedFiles: FileToWrite[]) => T, onTaskCompleted: TaskCompletedCallback) => CompileFn<T>;
21
- /**
22
- * A class that orchestrates and executes the required work (i.e. analyzes the entry-points,
23
- * processes the resulting tasks, does book-keeping and validates the final outcome).
24
- */
25
- export interface Executor {
26
- execute(analyzeEntryPoints: AnalyzeEntryPointsFn, createCompileFn: CreateCompileFn): void | Promise<void>;
27
- }
@@ -1,51 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { AbsoluteFsPath } from '../../../../src/ngtsc/file_system';
9
- import { JsonObject } from '../../utils';
10
- import { PackageJsonChange } from '../../writing/package_json_updater';
11
- import { Task, TaskProcessingOutcome } from '../tasks/api';
12
- /** A message reporting that the worker is ready for retrieving tasks. */
13
- export interface ReadyMessage extends JsonObject {
14
- type: 'ready';
15
- }
16
- /** A message reporting that an unrecoverable error occurred. */
17
- export interface ErrorMessage extends JsonObject {
18
- type: 'error';
19
- error: string;
20
- }
21
- /** A message requesting the processing of a task. */
22
- export interface ProcessTaskMessage extends JsonObject {
23
- type: 'process-task';
24
- task: Task;
25
- }
26
- /**
27
- * A message reporting the result of processing the currently assigned task.
28
- *
29
- * NOTE: To avoid the communication overhead, the task is not included in the message. Instead, the
30
- * master is responsible for keeping a mapping of workers to their currently assigned tasks.
31
- */
32
- export interface TaskCompletedMessage extends JsonObject {
33
- type: 'task-completed';
34
- outcome: TaskProcessingOutcome;
35
- message: string | null;
36
- }
37
- /** A message listing the paths to transformed files about to be written to disk. */
38
- export interface TransformedFilesMessage extends JsonObject {
39
- type: 'transformed-files';
40
- files: AbsoluteFsPath[];
41
- }
42
- /** A message requesting the update of a `package.json` file. */
43
- export interface UpdatePackageJsonMessage extends JsonObject {
44
- type: 'update-package-json';
45
- packageJsonPath: AbsoluteFsPath;
46
- changes: PackageJsonChange[];
47
- }
48
- /** The type of messages sent from cluster workers to the cluster master. */
49
- export type MessageFromWorker = ReadyMessage | ErrorMessage | TaskCompletedMessage | TransformedFilesMessage | UpdatePackageJsonMessage;
50
- /** The type of messages sent from the cluster master to cluster workers. */
51
- export type MessageToWorker = ProcessTaskMessage;
@@ -1,29 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { PathManipulation } from '../../../../src/ngtsc/file_system';
9
- import { Logger } from '../../../../src/ngtsc/logging';
10
- import { AsyncLocker } from '../../locking/async_locker';
11
- import { FileWriter } from '../../writing/file_writer';
12
- import { PackageJsonUpdater } from '../../writing/package_json_updater';
13
- import { AnalyzeEntryPointsFn, CreateCompileFn, Executor } from '../api';
14
- import { CreateTaskCompletedCallback } from '../tasks/api';
15
- /**
16
- * An `Executor` that processes tasks in parallel (on multiple processes) and completes
17
- * asynchronously.
18
- */
19
- export declare class ClusterExecutor implements Executor {
20
- private workerCount;
21
- private fileSystem;
22
- private logger;
23
- private fileWriter;
24
- private pkgJsonUpdater;
25
- private lockFile;
26
- private createTaskCompletedCallback;
27
- constructor(workerCount: number, fileSystem: PathManipulation, logger: Logger, fileWriter: FileWriter, pkgJsonUpdater: PackageJsonUpdater, lockFile: AsyncLocker, createTaskCompletedCallback: CreateTaskCompletedCallback);
28
- execute(analyzeEntryPoints: AnalyzeEntryPointsFn, _createCompileFn: CreateCompileFn): Promise<void>;
29
- }
@@ -1,57 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { AbsoluteFsPath, PathManipulation } from '../../../../src/ngtsc/file_system';
9
- import { Logger } from '../../../../src/ngtsc/logging';
10
- import { FileWriter } from '../../writing/file_writer';
11
- import { PackageJsonUpdater } from '../../writing/package_json_updater';
12
- import { AnalyzeEntryPointsFn } from '../api';
13
- import { CreateTaskCompletedCallback } from '../tasks/api';
14
- /**
15
- * The cluster master is responsible for analyzing all entry-points, planning the work that needs to
16
- * be done, distributing it to worker-processes and collecting/post-processing the results.
17
- */
18
- export declare class ClusterMaster {
19
- private maxWorkerCount;
20
- private fileSystem;
21
- private logger;
22
- private fileWriter;
23
- private pkgJsonUpdater;
24
- private finishedDeferred;
25
- private processingStartTime;
26
- private taskAssignments;
27
- private taskQueue;
28
- private onTaskCompleted;
29
- private remainingRespawnAttempts;
30
- constructor(maxWorkerCount: number, fileSystem: PathManipulation, logger: Logger, fileWriter: FileWriter, pkgJsonUpdater: PackageJsonUpdater, analyzeEntryPoints: AnalyzeEntryPointsFn, createTaskCompletedCallback: CreateTaskCompletedCallback);
31
- run(): Promise<void>;
32
- /** Try to find available (idle) workers and assign them available (non-blocked) tasks. */
33
- private maybeDistributeWork;
34
- /** Handle a worker's exiting. (Might be intentional or not.) */
35
- private onWorkerExit;
36
- /** Handle a message from a worker. */
37
- private onWorkerMessage;
38
- /** Handle a worker's coming online and ready for retrieving IPC messages. */
39
- private onWorkerReady;
40
- /** Handle a worker's having completed their assigned task. */
41
- private onWorkerTaskCompleted;
42
- /** Handle a worker's message regarding the files transformed while processing its task. */
43
- private onWorkerTransformedFiles;
44
- /** Handle a worker's request to update a `package.json` file. */
45
- private onWorkerUpdatePackageJson;
46
- /** Stop all workers and stop listening on cluster events. */
47
- private stopWorkers;
48
- /**
49
- * Wrap an event handler to ensure that `finishedDeferred` will be rejected on error (regardless
50
- * if the handler completes synchronously or asynchronously).
51
- */
52
- private wrapEventHandler;
53
- }
54
- /** Wrapper for resolving the cluster worker script. Useful for test patching. */
55
- export declare class ClusterWorkerScriptResolver {
56
- static resolve(fileSystem: PathManipulation): AbsoluteFsPath;
57
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- export {};
@@ -1,22 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { AbsoluteFsPath } from '../../../../src/ngtsc/file_system';
9
- import { JsonObject } from '../../utils';
10
- import { PackageJsonChange, PackageJsonUpdate, PackageJsonUpdater } from '../../writing/package_json_updater';
11
- /**
12
- * A `PackageJsonUpdater` for cluster workers that will send update changes to the master process so
13
- * that it can safely handle update operations on multiple processes.
14
- */
15
- export declare class ClusterWorkerPackageJsonUpdater implements PackageJsonUpdater {
16
- constructor();
17
- createUpdate(): PackageJsonUpdate;
18
- /**
19
- * Apply the changes in-memory (if necessary) and send a message to the master process.
20
- */
21
- writeChanges(changes: PackageJsonChange[], packageJsonPath: AbsoluteFsPath, preExistingParsedJson?: JsonObject): void;
22
- }
@@ -1,44 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { MessageFromWorker, MessageToWorker } from './api';
9
- /** Expose a `Promise` instance as well as APIs for resolving/rejecting it. */
10
- export declare class Deferred<T> {
11
- /**
12
- * Resolve the associated promise with the specified value.
13
- * If the value is a rejection (constructed with `Promise.reject()`), the promise will be rejected
14
- * instead.
15
- *
16
- * @param value The value to resolve the promise with.
17
- */
18
- resolve: (value: T) => void;
19
- /**
20
- * Rejects the associated promise with the specified reason.
21
- *
22
- * @param reason The rejection reason.
23
- */
24
- reject: (reason: any) => void;
25
- /** The `Promise` instance associated with this deferred. */
26
- promise: Promise<T>;
27
- }
28
- /**
29
- * Send a message to the cluster master.
30
- * (This function should be invoked from cluster workers only.)
31
- *
32
- * @param msg The message to send to the cluster master.
33
- * @return A promise that is resolved once the message has been sent.
34
- */
35
- export declare const sendMessageToMaster: (msg: MessageFromWorker) => Promise<void>;
36
- /**
37
- * Send a message to a cluster worker.
38
- * (This function should be invoked from the cluster master only.)
39
- *
40
- * @param workerId The ID of the recipient worker.
41
- * @param msg The message to send to the worker.
42
- * @return A promise that is resolved once the message has been sent.
43
- */
44
- export declare const sendMessageToWorker: (workerId: number, msg: MessageToWorker) => Promise<void>;
@@ -1,10 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { Logger } from '../../../../src/ngtsc/logging';
9
- import { CreateCompileFn } from '../api';
10
- export declare function startWorker(logger: Logger, createCompileFn: CreateCompileFn): Promise<void>;
@@ -1,10 +0,0 @@
1
- import { FileSystem } from '../../../src/ngtsc/file_system';
2
- import { Logger } from '../../../src/ngtsc/logging';
3
- import { ParsedConfiguration } from '../../../src/perform_compile';
4
- import { PathMappings } from '../path_mappings';
5
- import { FileWriter } from '../writing/file_writer';
6
- import { CreateCompileFn } from './api';
7
- /**
8
- * The function for creating the `compile()` function.
9
- */
10
- export declare function getCreateCompileFn(fileSystem: FileSystem, logger: Logger, fileWriter: FileWriter, enableI18nLegacyMessageIdFormat: boolean, tsConfig: ParsedConfiguration | null, pathMappings: PathMappings | undefined): CreateCompileFn;
@@ -1,34 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright Google LLC All Rights Reserved.
4
- *
5
- * Use of this source code is governed by an MIT-style license that can be
6
- * found in the LICENSE file at https://angular.io/license
7
- */
8
- import { Logger } from '../../../src/ngtsc/logging';
9
- import { AsyncLocker } from '../locking/async_locker';
10
- import { SyncLocker } from '../locking/sync_locker';
11
- import { AnalyzeEntryPointsFn, CreateCompileFn, Executor } from './api';
12
- import { CreateTaskCompletedCallback } from './tasks/api';
13
- export declare abstract class SingleProcessorExecutorBase {
14
- private logger;
15
- private createTaskCompletedCallback;
16
- constructor(logger: Logger, createTaskCompletedCallback: CreateTaskCompletedCallback);
17
- doExecute(analyzeEntryPoints: AnalyzeEntryPointsFn, createCompileFn: CreateCompileFn): void | Promise<void>;
18
- }
19
- /**
20
- * An `Executor` that processes all tasks serially and completes synchronously.
21
- */
22
- export declare class SingleProcessExecutorSync extends SingleProcessorExecutorBase implements Executor {
23
- private lockFile;
24
- constructor(logger: Logger, lockFile: SyncLocker, createTaskCompletedCallback: CreateTaskCompletedCallback);
25
- execute(analyzeEntryPoints: AnalyzeEntryPointsFn, createCompileFn: CreateCompileFn): void;
26
- }
27
- /**
28
- * An `Executor` that processes all tasks serially, but still completes asynchronously.
29
- */
30
- export declare class SingleProcessExecutorAsync extends SingleProcessorExecutorBase implements Executor {
31
- private lockFile;
32
- constructor(logger: Logger, lockFile: AsyncLocker, createTaskCompletedCallback: CreateTaskCompletedCallback);
33
- execute(analyzeEntryPoints: AnalyzeEntryPointsFn, createCompileFn: CreateCompileFn): Promise<void>;
34
- }