@angular/compiler-cli 15.2.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 (154) hide show
  1. package/bundles/{chunk-PKSKJEUS.js → chunk-2DMH5JXJ.js} +9 -18
  2. package/bundles/{chunk-PKSKJEUS.js.map → chunk-2DMH5JXJ.js.map} +1 -1
  3. package/bundles/{chunk-P6SWFK2U.js → chunk-4TCRZYAK.js} +2 -2
  4. package/bundles/{chunk-NJMZRTB6.js → chunk-54RHUHYB.js} +1 -2
  5. package/bundles/{chunk-2PLRZDNU.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-2OF2AI57.js → chunk-IS6KZYEA.js} +377 -609
  10. package/bundles/chunk-IS6KZYEA.js.map +6 -0
  11. package/bundles/{chunk-J3L7WZP3.js → chunk-JHMH3CX2.js} +3 -3
  12. package/bundles/{chunk-ZCBRXUPO.js → chunk-K2A5WD7L.js} +1 -6
  13. package/bundles/chunk-K2A5WD7L.js.map +6 -0
  14. package/bundles/{chunk-QRHWLC7U.js → chunk-PSGRCFPQ.js} +2 -2
  15. package/bundles/index.js +13 -13
  16. package/bundles/linker/babel/index.js +8 -8
  17. package/bundles/linker/index.js +4 -4
  18. package/bundles/private/bazel.js +1 -1
  19. package/bundles/private/localize.js +1 -1
  20. package/bundles/private/migrations.js +5 -5
  21. package/bundles/private/tooling.js +3 -3
  22. package/bundles/src/bin/ng_xi18n.js +7 -7
  23. package/bundles/src/bin/ngc.js +7 -7
  24. package/bundles_metadata.json +1 -1
  25. package/package.json +2 -15
  26. package/src/ngtsc/annotations/ng_module/src/handler.d.ts +1 -3
  27. package/src/ngtsc/core/api/src/adapter.d.ts +0 -7
  28. package/src/ngtsc/core/api/src/options.d.ts +2 -2
  29. package/src/ngtsc/core/api/src/public_options.d.ts +0 -25
  30. package/src/ngtsc/core/src/host.d.ts +3 -5
  31. package/src/ngtsc/shims/api.d.ts +0 -19
  32. package/src/ngtsc/shims/index.d.ts +0 -2
  33. package/src/transformers/api.d.ts +0 -5
  34. package/bundles/chunk-2OF2AI57.js.map +0 -6
  35. package/bundles/chunk-7DUI3BSX.js +0 -29
  36. package/bundles/chunk-7DUI3BSX.js.map +0 -6
  37. package/bundles/chunk-MLCT4AWL.js +0 -2187
  38. package/bundles/chunk-MLCT4AWL.js.map +0 -6
  39. package/bundles/chunk-NXCQCU6C.js +0 -5265
  40. package/bundles/chunk-NXCQCU6C.js.map +0 -6
  41. package/bundles/chunk-O4JLZZWJ.js.map +0 -6
  42. package/bundles/chunk-YRDMG3GM.js +0 -115
  43. package/bundles/chunk-YRDMG3GM.js.map +0 -6
  44. package/bundles/chunk-ZCBRXUPO.js.map +0 -6
  45. package/bundles/ngcc/index.js +0 -52
  46. package/bundles/ngcc/index.js.map +0 -6
  47. package/bundles/ngcc/main-ngcc.js +0 -49
  48. package/bundles/ngcc/main-ngcc.js.map +0 -6
  49. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +0 -114
  50. package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +0 -6
  51. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +0 -34
  52. package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js.map +0 -6
  53. package/ngcc/index.d.ts +0 -19
  54. package/ngcc/main-ngcc.d.ts +0 -2
  55. package/ngcc/src/analysis/decoration_analyzer.d.ts +0 -80
  56. package/ngcc/src/analysis/migration_host.d.ts +0 -22
  57. package/ngcc/src/analysis/module_with_providers_analyzer.d.ts +0 -61
  58. package/ngcc/src/analysis/ngcc_references_registry.d.ts +0 -34
  59. package/ngcc/src/analysis/ngcc_trait_compiler.d.ts +0 -42
  60. package/ngcc/src/analysis/private_declarations_analyzer.d.ts +0 -29
  61. package/ngcc/src/analysis/types.d.ts +0 -29
  62. package/ngcc/src/analysis/util.d.ts +0 -11
  63. package/ngcc/src/command_line_options.d.ts +0 -3
  64. package/ngcc/src/constants.d.ts +0 -9
  65. package/ngcc/src/dependencies/commonjs_dependency_host.d.ts +0 -20
  66. package/ngcc/src/dependencies/dependency_host.d.ts +0 -77
  67. package/ngcc/src/dependencies/dependency_resolver.d.ts +0 -102
  68. package/ngcc/src/dependencies/dts_dependency_host.d.ts +0 -20
  69. package/ngcc/src/dependencies/esm_dependency_host.d.ts +0 -93
  70. package/ngcc/src/dependencies/module_resolver.d.ts +0 -134
  71. package/ngcc/src/dependencies/umd_dependency_host.d.ts +0 -9
  72. package/ngcc/src/entry_point_finder/directory_walker_entry_point_finder.d.ts +0 -41
  73. package/ngcc/src/entry_point_finder/entry_point_collector.d.ts +0 -41
  74. package/ngcc/src/entry_point_finder/interface.d.ts +0 -14
  75. package/ngcc/src/entry_point_finder/program_based_entry_point_finder.d.ts +0 -61
  76. package/ngcc/src/entry_point_finder/targeted_entry_point_finder.d.ts +0 -95
  77. package/ngcc/src/entry_point_finder/tracing_entry_point_finder.d.ts +0 -67
  78. package/ngcc/src/entry_point_finder/utils.d.ts +0 -38
  79. package/ngcc/src/execution/analyze_entry_points.d.ts +0 -9
  80. package/ngcc/src/execution/api.d.ts +0 -27
  81. package/ngcc/src/execution/cluster/api.d.ts +0 -51
  82. package/ngcc/src/execution/cluster/executor.d.ts +0 -29
  83. package/ngcc/src/execution/cluster/master.d.ts +0 -57
  84. package/ngcc/src/execution/cluster/ngcc_cluster_worker.d.ts +0 -8
  85. package/ngcc/src/execution/cluster/package_json_updater.d.ts +0 -22
  86. package/ngcc/src/execution/cluster/utils.d.ts +0 -44
  87. package/ngcc/src/execution/cluster/worker.d.ts +0 -10
  88. package/ngcc/src/execution/create_compile_function.d.ts +0 -10
  89. package/ngcc/src/execution/single_process_executor.d.ts +0 -34
  90. package/ngcc/src/execution/tasks/api.d.ts +0 -141
  91. package/ngcc/src/execution/tasks/completion.d.ts +0 -41
  92. package/ngcc/src/execution/tasks/queues/base_task_queue.d.ts +0 -38
  93. package/ngcc/src/execution/tasks/queues/parallel_task_queue.d.ts +0 -27
  94. package/ngcc/src/execution/tasks/queues/serial_task_queue.d.ts +0 -16
  95. package/ngcc/src/execution/tasks/utils.d.ts +0 -57
  96. package/ngcc/src/host/commonjs_host.d.ts +0 -69
  97. package/ngcc/src/host/commonjs_umd_utils.d.ts +0 -146
  98. package/ngcc/src/host/delegating_host.d.ts +0 -43
  99. package/ngcc/src/host/esm2015_host.d.ts +0 -935
  100. package/ngcc/src/host/esm5_host.d.ts +0 -299
  101. package/ngcc/src/host/ngcc_host.d.ts +0 -87
  102. package/ngcc/src/host/umd_host.d.ts +0 -85
  103. package/ngcc/src/host/utils.d.ts +0 -9
  104. package/ngcc/src/locking/async_locker.d.ts +0 -34
  105. package/ngcc/src/locking/lock_file.d.ts +0 -31
  106. package/ngcc/src/locking/lock_file_with_child_process/index.d.ts +0 -44
  107. package/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.d.ts +0 -1
  108. package/ngcc/src/locking/lock_file_with_child_process/util.d.ts +0 -16
  109. package/ngcc/src/locking/sync_locker.d.ts +0 -35
  110. package/ngcc/src/main.d.ts +0 -17
  111. package/ngcc/src/migrations/migration.d.ts +0 -59
  112. package/ngcc/src/migrations/missing_injectable_migration.d.ts +0 -35
  113. package/ngcc/src/migrations/undecorated_child_migration.d.ts +0 -15
  114. package/ngcc/src/migrations/undecorated_parent_migration.d.ts +0 -51
  115. package/ngcc/src/migrations/utils.d.ts +0 -41
  116. package/ngcc/src/ngcc_options.d.ts +0 -155
  117. package/ngcc/src/packages/adjust_cjs_umd_exports.d.ts +0 -16
  118. package/ngcc/src/packages/build_marker.d.ts +0 -44
  119. package/ngcc/src/packages/bundle_program.d.ts +0 -35
  120. package/ngcc/src/packages/configuration.d.ts +0 -222
  121. package/ngcc/src/packages/entry_point.d.ts +0 -109
  122. package/ngcc/src/packages/entry_point_bundle.d.ts +0 -46
  123. package/ngcc/src/packages/entry_point_manifest.d.ts +0 -79
  124. package/ngcc/src/packages/ngcc_compiler_host.d.ts +0 -36
  125. package/ngcc/src/packages/patch_ts_expando_initializer.d.ts +0 -41
  126. package/ngcc/src/packages/source_file_cache.d.ts +0 -97
  127. package/ngcc/src/packages/transformer.d.ts +0 -70
  128. package/ngcc/src/path_mappings.d.ts +0 -19
  129. package/ngcc/src/rendering/commonjs_rendering_formatter.d.ts +0 -34
  130. package/ngcc/src/rendering/dts_renderer.d.ts +0 -51
  131. package/ngcc/src/rendering/esm5_rendering_formatter.d.ts +0 -35
  132. package/ngcc/src/rendering/esm_rendering_formatter.d.ts +0 -84
  133. package/ngcc/src/rendering/ngcc_import_rewriter.d.ts +0 -13
  134. package/ngcc/src/rendering/renderer.d.ts +0 -72
  135. package/ngcc/src/rendering/rendering_formatter.d.ts +0 -37
  136. package/ngcc/src/rendering/source_maps.d.ts +0 -23
  137. package/ngcc/src/rendering/umd_rendering_formatter.d.ts +0 -54
  138. package/ngcc/src/rendering/utils.d.ts +0 -24
  139. package/ngcc/src/utils.d.ts +0 -112
  140. package/ngcc/src/writing/cleaning/cleaning_strategies.d.ts +0 -44
  141. package/ngcc/src/writing/cleaning/package_cleaner.d.ts +0 -38
  142. package/ngcc/src/writing/cleaning/utils.d.ts +0 -15
  143. package/ngcc/src/writing/file_writer.d.ts +0 -28
  144. package/ngcc/src/writing/in_place_file_writer.d.ts +0 -28
  145. package/ngcc/src/writing/new_entry_point_file_writer.d.ts +0 -48
  146. package/ngcc/src/writing/package_json_updater.d.ts +0 -98
  147. package/src/ngtsc/shims/src/factory_generator.d.ts +0 -24
  148. package/src/ngtsc/shims/src/summary_generator.d.ts +0 -15
  149. /package/bundles/{chunk-P6SWFK2U.js.map → chunk-4TCRZYAK.js.map} +0 -0
  150. /package/bundles/{chunk-NJMZRTB6.js.map → chunk-54RHUHYB.js.map} +0 -0
  151. /package/bundles/{chunk-2PLRZDNU.js.map → chunk-6CARGXRJ.js.map} +0 -0
  152. /package/bundles/{chunk-6ZJFIQBG.js.map → chunk-GYHDNUIK.js.map} +0 -0
  153. /package/bundles/{chunk-J3L7WZP3.js.map → chunk-JHMH3CX2.js.map} +0 -0
  154. /package/bundles/{chunk-QRHWLC7U.js.map → chunk-PSGRCFPQ.js.map} +0 -0
@@ -1,114 +0,0 @@
1
-
2
- import {createRequire as __cjsCompatRequire} from 'module';
3
- const require = __cjsCompatRequire(import.meta.url);
4
-
5
- import {
6
- parseCommandLineOptions
7
- } from "../../../../chunk-YRDMG3GM.js";
8
- import {
9
- PackageJsonUpdate,
10
- applyChange,
11
- getCreateCompileFn,
12
- getSharedSetup,
13
- sendMessageToMaster,
14
- stringifyTask
15
- } from "../../../../chunk-NXCQCU6C.js";
16
- import "../../../../chunk-2OF2AI57.js";
17
- import "../../../../chunk-PKSKJEUS.js";
18
- import "../../../../chunk-O4JLZZWJ.js";
19
- import "../../../../chunk-SBDNBITT.js";
20
- import "../../../../chunk-6ZJFIQBG.js";
21
- import "../../../../chunk-QRHWLC7U.js";
22
- import "../../../../chunk-ZCBRXUPO.js";
23
- import "../../../../chunk-EC5K6QPP.js";
24
- import "../../../../chunk-NJMZRTB6.js";
25
- import "../../../../chunk-SRFZMXHZ.js";
26
-
27
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/cluster/package_json_updater.mjs
28
- import cluster from "cluster";
29
- var ClusterWorkerPackageJsonUpdater = class {
30
- constructor() {
31
- if (cluster.isMaster) {
32
- throw new Error("Tried to create cluster worker PackageJsonUpdater on the master process.");
33
- }
34
- }
35
- createUpdate() {
36
- return new PackageJsonUpdate((...args) => this.writeChanges(...args));
37
- }
38
- writeChanges(changes, packageJsonPath, preExistingParsedJson) {
39
- if (preExistingParsedJson) {
40
- for (const [propPath, value] of changes) {
41
- if (propPath.length === 0) {
42
- throw new Error(`Missing property path for writing value to '${packageJsonPath}'.`);
43
- }
44
- applyChange(preExistingParsedJson, propPath, value, "unimportant");
45
- }
46
- }
47
- sendMessageToMaster({
48
- type: "update-package-json",
49
- packageJsonPath,
50
- changes
51
- });
52
- }
53
- };
54
-
55
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/cluster/worker.mjs
56
- import cluster2 from "cluster";
57
- async function startWorker(logger, createCompileFn) {
58
- if (cluster2.isMaster || !cluster2.worker) {
59
- throw new Error("Tried to run cluster worker on the master process.");
60
- }
61
- const worker = cluster2.worker;
62
- const compile = createCompileFn((transformedFiles) => sendMessageToMaster({
63
- type: "transformed-files",
64
- files: transformedFiles.map((f) => f.path)
65
- }), (_task, outcome, message) => sendMessageToMaster({ type: "task-completed", outcome, message }));
66
- worker.on("message", async (msg) => {
67
- try {
68
- switch (msg.type) {
69
- case "process-task":
70
- logger.debug(`[Worker #${worker.id}] Processing task: ${stringifyTask(msg.task)}`);
71
- return await compile(msg.task);
72
- default:
73
- throw new Error(`[Worker #${worker.id}] Invalid message received: ${JSON.stringify(msg)}`);
74
- }
75
- } catch (err) {
76
- switch (err && err.code) {
77
- case "ENOMEM":
78
- logger.warn(`[Worker #${worker.id}] ${err.stack || err.message}`);
79
- return process.exit(1);
80
- default:
81
- await sendMessageToMaster({
82
- type: "error",
83
- error: err instanceof Error ? err.stack || err.message : err
84
- });
85
- }
86
- }
87
- });
88
- await sendMessageToMaster({ type: "ready" });
89
- return new Promise(() => void 0);
90
- }
91
-
92
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/cluster/ngcc_cluster_worker.mjs
93
- (async () => {
94
- process.title = "ngcc (worker)";
95
- try {
96
- const { logger, pathMappings, enableI18nLegacyMessageIdFormat, fileSystem, tsConfig, getFileWriter } = getSharedSetup(parseCommandLineOptions(process.argv.slice(2)));
97
- const pkgJsonUpdater = new ClusterWorkerPackageJsonUpdater();
98
- const fileWriter = getFileWriter(pkgJsonUpdater);
99
- const createCompileFn = getCreateCompileFn(fileSystem, logger, fileWriter, enableI18nLegacyMessageIdFormat, tsConfig, pathMappings);
100
- await startWorker(logger, createCompileFn);
101
- process.exitCode = 0;
102
- } catch (e) {
103
- console.error(e.stack || e.message);
104
- process.exit(1);
105
- }
106
- })();
107
- /**
108
- * @license
109
- * Copyright Google LLC All Rights Reserved.
110
- *
111
- * Use of this source code is governed by an MIT-style license that can be
112
- * found in the LICENSE file at https://angular.io/license
113
- */
114
- //# sourceMappingURL=ngcc_cluster_worker.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../../../packages/compiler-cli/ngcc/src/execution/cluster/package_json_updater.ts", "../../../../../../../../../../packages/compiler-cli/ngcc/src/execution/cluster/worker.ts", "../../../../../../../../../../packages/compiler-cli/ngcc/src/execution/cluster/ngcc_cluster_worker.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,OAAO,aAAa;AAad,IAAO,kCAAP,MAAsC;EAC1C,cAAA;AACE,QAAI,QAAQ,UAAU;AACpB,YAAM,IAAI,MAAM,0EAA0E;;EAE9F;EAEA,eAAY;AACV,WAAO,IAAI,kBAAkB,IAAI,SAAS,KAAK,aAAa,GAAG,IAAI,CAAC;EACtE;EAKA,aACI,SAA8B,iBAC9B,uBAAkC;AACpC,QAAI,uBAAuB;AACzB,iBAAW,CAAC,UAAU,KAAK,KAAK,SAAS;AACvC,YAAI,SAAS,WAAW,GAAG;AACzB,gBAAM,IAAI,MAAM,+CAA+C,mBAAmB;;AAIpF,oBAAY,uBAAuB,UAAU,OAAO,aAAa;;;AAIrE,wBAAoB;MAClB,MAAM;MACN;MACA;KACD;EACH;;;;AC/CF,OAAOA,cAAa;AASpB,eAAsB,YAAY,QAAgB,iBAAgC;AAChF,MAAIC,SAAQ,YAAY,CAACA,SAAQ,QAAQ;AACvC,UAAM,IAAI,MAAM,oDAAoD;;AAGtE,QAAM,SAASA,SAAQ;AACvB,QAAM,UAAU,gBACZ,sBAAoB,oBAAoB;IACtC,MAAM;IACN,OAAO,iBAAiB,IAAI,OAAK,EAAE,IAAI;GACxC,GACD,CAAC,OAAO,SAAS,YAAY,oBAAoB,EAAC,MAAM,kBAAkB,SAAS,QAAO,CAAC,CAAC;AAGhG,SAAO,GAAG,WAAW,OAAO,QAAwB;AAClD,QAAI;AACF,cAAQ,IAAI,MAAM;QAChB,KAAK;AACH,iBAAO,MAAM,YAAY,OAAO,wBAAwB,cAAc,IAAI,IAAI,GAAG;AACjF,iBAAO,MAAM,QAAQ,IAAI,IAAI;QAC/B;AACE,gBAAM,IAAI,MACN,YAAY,OAAO,iCAAiC,KAAK,UAAU,GAAG,GAAG;;aAE1E,KAAP;AACA,cAAQ,OAAO,IAAI,MAAM;QACvB,KAAK;AAMH,iBAAO,KAAK,YAAY,OAAO,OAAO,IAAI,SAAS,IAAI,SAAS;AAChE,iBAAO,QAAQ,KAAK,CAAC;QACvB;AACE,gBAAM,oBAAoB;YACxB,MAAM;YACN,OAAQ,eAAe,QAAU,IAAI,SAAS,IAAI,UAAW;WAC9D;;;EAGT,CAAC;AAGD,QAAM,oBAAoB,EAAC,MAAM,QAAO,CAAC;AAIzC,SAAO,IAAI,QAAQ,MAAM,MAAS;AACpC;;;CCnDC,YAAW;AACV,UAAQ,QAAQ;AAEhB,MAAI;AACF,UAAM,EACJ,QACA,cACA,iCACA,YACA,UACA,cAAa,IACX,eAAe,wBAAwB,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;AAKjE,UAAM,iBAAiB,IAAI,gCAA+B;AAC1D,UAAM,aAAa,cAAc,cAAc;AAG/C,UAAM,kBAAkB,mBACpB,YAAY,QAAQ,YAAY,iCAAiC,UAAU,YAAY;AAE3F,UAAM,YAAY,QAAQ,eAAe;AACzC,YAAQ,WAAW;WACZ,GAAP;AACA,YAAQ,MAAO,EAAY,SAAU,EAAY,OAAO;AACxD,YAAQ,KAAK,CAAC;;AAElB,GAAE;",
5
- "names": ["cluster", "cluster"]
6
- }
@@ -1,34 +0,0 @@
1
-
2
- import {createRequire as __cjsCompatRequire} from 'module';
3
- const require = __cjsCompatRequire(import.meta.url);
4
-
5
- import {
6
- removeLockFile
7
- } from "../../../../chunk-7DUI3BSX.js";
8
- import {
9
- ConsoleLogger
10
- } from "../../../../chunk-SBDNBITT.js";
11
- import {
12
- NodeJSFileSystem
13
- } from "../../../../chunk-EC5K6QPP.js";
14
- import "../../../../chunk-SRFZMXHZ.js";
15
-
16
- // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.mjs
17
- var fs = new NodeJSFileSystem();
18
- var logLevel = parseInt(process.argv.pop(), 10);
19
- var logger = new ConsoleLogger(logLevel);
20
- var ppid = process.ppid.toString();
21
- var lockFilePath = fs.resolve(process.argv.pop());
22
- logger.debug(`Starting unlocker at process ${process.pid} on behalf of process ${ppid}`);
23
- logger.debug(`The lock-file path is ${lockFilePath}`);
24
- process.on("disconnect", () => {
25
- removeLockFile(fs, logger, lockFilePath, ppid);
26
- });
27
- /**
28
- * @license
29
- * Copyright Google LLC All Rights Reserved.
30
- *
31
- * Use of this source code is governed by an MIT-style license that can be
32
- * found in the LICENSE file at https://angular.io/license
33
- */
34
- //# sourceMappingURL=ngcc_lock_unlocker.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../../../../packages/compiler-cli/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;AAkBA,IAAM,KAAK,IAAI,iBAAgB;AAI/B,IAAM,WAAW,SAAS,QAAQ,KAAK,IAAG,GAAK,EAAE;AACjD,IAAM,SAAS,IAAI,cAAc,QAAQ;AAGzC,IAAM,OAAO,QAAQ,KAAK,SAAQ;AAGlC,IAAM,eAAe,GAAG,QAAQ,QAAQ,KAAK,IAAG,CAAG;AAEnD,OAAO,MAAM,gCAAgC,QAAQ,4BAA4B,MAAM;AACvF,OAAO,MAAM,yBAAyB,cAAc;AAMpD,QAAQ,GAAG,cAAc,MAAK;AAC5B,iBAAe,IAAI,QAAQ,cAAc,IAAI;AAC/C,CAAC;",
5
- "names": []
6
- }
package/ngcc/index.d.ts DELETED
@@ -1,19 +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 { AsyncNgccOptions, SyncNgccOptions } from './src/ngcc_options';
9
- export { ConsoleLogger, Logger, LogLevel } from '../src/ngtsc/logging';
10
- export { AsyncNgccOptions, clearTsConfigCache, NgccOptions, SyncNgccOptions } from './src/ngcc_options';
11
- export { PathMappings } from './src/path_mappings';
12
- export declare function process<T extends AsyncNgccOptions | SyncNgccOptions>(options: T): T extends AsyncNgccOptions ? Promise<void> : void;
13
- /**
14
- * Absolute file path that points to the `ngcc` command line entry-point.
15
- *
16
- * This can be used by the Angular CLI to spawn a process running ngcc using
17
- * command line options.
18
- */
19
- export declare const ngccMainFilePath: string;
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,80 +0,0 @@
1
- import ts from 'typescript';
2
- import { ParsedConfiguration } from '../../..';
3
- import { ReferencesRegistry, ResourceLoader } from '../../../src/ngtsc/annotations';
4
- import { InjectableClassRegistry } from '../../../src/ngtsc/annotations/common';
5
- import { CycleAnalyzer, ImportGraph } from '../../../src/ngtsc/cycles';
6
- import { ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
7
- import { ModuleResolver, PrivateExportAliasingHost, ReferenceEmitter } from '../../../src/ngtsc/imports';
8
- import { SemanticSymbol } from '../../../src/ngtsc/incremental/semantic_graph';
9
- import { CompoundMetadataReader, CompoundMetadataRegistry, DtsMetadataReader, HostDirectivesResolver, LocalMetadataRegistry } from '../../../src/ngtsc/metadata';
10
- import { PartialEvaluator } from '../../../src/ngtsc/partial_evaluator';
11
- import { LocalModuleScopeRegistry, MetadataDtsModuleScopeResolver, TypeCheckScopeRegistry } from '../../../src/ngtsc/scope';
12
- import { DecoratorHandler } from '../../../src/ngtsc/transform';
13
- import { NgccReflectionHost } from '../host/ngcc_host';
14
- import { Migration } from '../migrations/migration';
15
- import { EntryPointBundle } from '../packages/entry_point_bundle';
16
- import { NgccTraitCompiler } from './ngcc_trait_compiler';
17
- import { CompiledFile, DecorationAnalyses } from './types';
18
- /**
19
- * Simple class that resolves and loads files directly from the filesystem.
20
- */
21
- declare class NgccResourceLoader implements ResourceLoader {
22
- private fs;
23
- constructor(fs: ReadonlyFileSystem);
24
- canPreload: boolean;
25
- canPreprocess: boolean;
26
- preload(): undefined | Promise<void>;
27
- preprocessInline(): Promise<string>;
28
- load(url: string): string;
29
- resolve(url: string, containingFile: string): string;
30
- }
31
- /**
32
- * This Analyzer will analyze the files that have decorated classes that need to be transformed.
33
- */
34
- export declare class DecorationAnalyzer {
35
- private fs;
36
- private bundle;
37
- private reflectionHost;
38
- private referencesRegistry;
39
- private diagnosticHandler;
40
- private tsConfig;
41
- private program;
42
- private options;
43
- private host;
44
- private typeChecker;
45
- private rootDirs;
46
- private packagePath;
47
- private isCore;
48
- private compilerOptions;
49
- moduleResolver: ModuleResolver;
50
- resourceManager: NgccResourceLoader;
51
- metaRegistry: LocalMetadataRegistry;
52
- dtsMetaReader: DtsMetadataReader;
53
- fullMetaReader: CompoundMetadataReader;
54
- refEmitter: ReferenceEmitter;
55
- aliasingHost: PrivateExportAliasingHost | null;
56
- dtsModuleScopeResolver: MetadataDtsModuleScopeResolver;
57
- scopeRegistry: LocalModuleScopeRegistry;
58
- fullRegistry: CompoundMetadataRegistry;
59
- evaluator: PartialEvaluator;
60
- importGraph: ImportGraph;
61
- cycleAnalyzer: CycleAnalyzer;
62
- injectableRegistry: InjectableClassRegistry;
63
- hostDirectivesResolver: HostDirectivesResolver;
64
- typeCheckScopeRegistry: TypeCheckScopeRegistry;
65
- handlers: DecoratorHandler<unknown, unknown, SemanticSymbol | null, unknown>[];
66
- compiler: NgccTraitCompiler;
67
- migrations: Migration[];
68
- constructor(fs: ReadonlyFileSystem, bundle: EntryPointBundle, reflectionHost: NgccReflectionHost, referencesRegistry: ReferencesRegistry, diagnosticHandler?: (error: ts.Diagnostic) => void, tsConfig?: ParsedConfiguration | null);
69
- /**
70
- * Analyze a program to find all the decorated files should be transformed.
71
- *
72
- * @returns a map of the source files to the analysis for those files.
73
- */
74
- analyzeProgram(): DecorationAnalyses;
75
- protected applyMigrations(): void;
76
- protected reportDiagnostics(): void;
77
- protected compileFile(sourceFile: ts.SourceFile): CompiledFile;
78
- private getReexportsForSourceFile;
79
- }
80
- export {};
@@ -1,22 +0,0 @@
1
- import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
2
- import { MetadataReader } from '../../../src/ngtsc/metadata';
3
- import { PartialEvaluator } from '../../../src/ngtsc/partial_evaluator';
4
- import { ClassDeclaration, Decorator } from '../../../src/ngtsc/reflection';
5
- import { HandlerFlags } from '../../../src/ngtsc/transform';
6
- import { NgccReflectionHost } from '../host/ngcc_host';
7
- import { MigrationHost } from '../migrations/migration';
8
- import { NgccTraitCompiler } from './ngcc_trait_compiler';
9
- /**
10
- * The standard implementation of `MigrationHost`, which is created by the `DecorationAnalyzer`.
11
- */
12
- export declare class DefaultMigrationHost implements MigrationHost {
13
- readonly reflectionHost: NgccReflectionHost;
14
- readonly metadata: MetadataReader;
15
- readonly evaluator: PartialEvaluator;
16
- private compiler;
17
- private entryPointPath;
18
- constructor(reflectionHost: NgccReflectionHost, metadata: MetadataReader, evaluator: PartialEvaluator, compiler: NgccTraitCompiler, entryPointPath: AbsoluteFsPath);
19
- injectSyntheticDecorator(clazz: ClassDeclaration, decorator: Decorator, flags?: HandlerFlags): void;
20
- getAllDecorators(clazz: ClassDeclaration): Decorator[] | null;
21
- isInScope(clazz: ClassDeclaration): boolean;
22
- }
@@ -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 ts from 'typescript';
9
- import { ReferencesRegistry } from '../../../src/ngtsc/annotations';
10
- import { Reference } from '../../../src/ngtsc/imports';
11
- import { ClassDeclaration, DeclarationNode } from '../../../src/ngtsc/reflection';
12
- import { NgccReflectionHost } from '../host/ngcc_host';
13
- /**
14
- * A structure returned from `getModuleWithProvidersFunctions()` that describes functions
15
- * that return ModuleWithProviders objects.
16
- */
17
- export interface ModuleWithProvidersInfo {
18
- /**
19
- * The name of the declared function.
20
- */
21
- name: string;
22
- /**
23
- * The declaration of the function that returns the `ModuleWithProviders` object.
24
- */
25
- declaration: ts.SignatureDeclaration;
26
- /**
27
- * Declaration of the containing class (if this is a method)
28
- */
29
- container: DeclarationNode | null;
30
- /**
31
- * The declaration of the class that the `ngModule` property on the `ModuleWithProviders` object
32
- * refers to.
33
- */
34
- ngModule: Reference<ClassDeclaration>;
35
- }
36
- export type ModuleWithProvidersAnalyses = Map<ts.SourceFile, ModuleWithProvidersInfo[]>;
37
- export declare const ModuleWithProvidersAnalyses: MapConstructor;
38
- export declare class ModuleWithProvidersAnalyzer {
39
- private host;
40
- private typeChecker;
41
- private referencesRegistry;
42
- private processDts;
43
- private evaluator;
44
- constructor(host: NgccReflectionHost, typeChecker: ts.TypeChecker, referencesRegistry: ReferencesRegistry, processDts: boolean);
45
- analyzeProgram(program: ts.Program): ModuleWithProvidersAnalyses;
46
- private getRootFiles;
47
- private getModuleWithProvidersFunctions;
48
- /**
49
- * Parse a function/method node (or its implementation), to see if it returns a
50
- * `ModuleWithProviders` object.
51
- * @param name The name of the function.
52
- * @param node the node to check - this could be a function, a method or a variable declaration.
53
- * @param implementation the actual function expression if `node` is a variable declaration.
54
- * @param container the class that contains the function, if it is a method.
55
- * @returns info about the function if it does return a `ModuleWithProviders` object; `null`
56
- * otherwise.
57
- */
58
- private parseForModuleWithProviders;
59
- private getDtsModuleWithProvidersFunction;
60
- private resolveNgModuleReference;
61
- }
@@ -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 ts from 'typescript';
9
- import { ReferencesRegistry } from '../../../src/ngtsc/annotations';
10
- import { Reference } from '../../../src/ngtsc/imports';
11
- import { Declaration, DeclarationNode, ReflectionHost } from '../../../src/ngtsc/reflection';
12
- /**
13
- * This is a place for DecoratorHandlers to register references that they
14
- * find in their analysis of the code.
15
- *
16
- * This registry is used to ensure that these references are publicly exported
17
- * from libraries that are compiled by ngcc.
18
- */
19
- export declare class NgccReferencesRegistry implements ReferencesRegistry {
20
- private host;
21
- private map;
22
- constructor(host: ReflectionHost);
23
- /**
24
- * Register one or more references in the registry.
25
- * Only `ResolveReference` references are stored. Other types are ignored.
26
- * @param references A collection of references to register.
27
- */
28
- add(source: DeclarationNode, ...references: Reference<DeclarationNode>[]): void;
29
- /**
30
- * Create and return a mapping for the registered resolved references.
31
- * @returns A map of reference identifiers to reference declarations.
32
- */
33
- getDeclarationMap(): Map<ts.Identifier, Declaration>;
34
- }
@@ -1,42 +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 ts from 'typescript';
9
- import { SemanticSymbol } from '../../../src/ngtsc/incremental/semantic_graph';
10
- import { ClassDeclaration, Decorator } from '../../../src/ngtsc/reflection';
11
- import { DecoratorHandler, HandlerFlags, Trait, TraitCompiler } from '../../../src/ngtsc/transform';
12
- import { NgccReflectionHost } from '../host/ngcc_host';
13
- /**
14
- * Specializes the `TraitCompiler` for ngcc purposes. Mainly, this includes an alternative way of
15
- * scanning for classes to compile using the reflection host's `findClassSymbols`, together with
16
- * support to inject synthetic decorators into the compilation for ad-hoc migrations that ngcc
17
- * performs.
18
- */
19
- export declare class NgccTraitCompiler extends TraitCompiler {
20
- private ngccReflector;
21
- constructor(handlers: DecoratorHandler<unknown, unknown, SemanticSymbol | null, unknown>[], ngccReflector: NgccReflectionHost);
22
- get analyzedFiles(): ts.SourceFile[];
23
- /**
24
- * Analyzes the source file in search for classes to process. For any class that is found in the
25
- * file, a `ClassRecord` is created and the source file is included in the `analyzedFiles` array.
26
- */
27
- analyzeFile(sf: ts.SourceFile): void;
28
- /**
29
- * Associate a new synthesized decorator, which did not appear in the original source, with a
30
- * given class.
31
- * @param clazz the class to receive the new decorator.
32
- * @param decorator the decorator to inject.
33
- * @param flags optional bitwise flag to influence the compilation of the decorator.
34
- */
35
- injectSyntheticDecorator(clazz: ClassDeclaration, decorator: Decorator, flags?: HandlerFlags): Trait<unknown, unknown, SemanticSymbol | null, unknown>[];
36
- /**
37
- * Returns all decorators that have been recognized for the provided class, including any
38
- * synthetically injected decorators.
39
- * @param clazz the declaration for which the decorators are returned.
40
- */
41
- getAllDecorators(clazz: ClassDeclaration): Decorator[] | null;
42
- }
@@ -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 ts from 'typescript';
9
- import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
10
- import { NgccReflectionHost } from '../host/ngcc_host';
11
- import { NgccReferencesRegistry } from './ngcc_references_registry';
12
- export interface ExportInfo {
13
- identifier: string;
14
- from: AbsoluteFsPath;
15
- dtsFrom?: AbsoluteFsPath | null;
16
- }
17
- export type PrivateDeclarationsAnalyses = ExportInfo[];
18
- /**
19
- * This class will analyze a program to find all the declared classes
20
- * (i.e. on an NgModule) that are not publicly exported via an entry-point.
21
- */
22
- export declare class PrivateDeclarationsAnalyzer {
23
- private host;
24
- private referencesRegistry;
25
- constructor(host: NgccReflectionHost, referencesRegistry: NgccReferencesRegistry);
26
- analyzeProgram(program: ts.Program): PrivateDeclarationsAnalyses;
27
- private getRootFiles;
28
- private getPrivateDeclarations;
29
- }
@@ -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 { ConstantPool } from '@angular/compiler';
9
- import ts from 'typescript';
10
- import { Reexport } from '../../../src/ngtsc/imports';
11
- import { ClassDeclaration, Decorator } from '../../../src/ngtsc/reflection';
12
- import { CompileResult } from '../../../src/ngtsc/transform';
13
- export interface CompiledClass {
14
- name: string;
15
- decorators: Decorator[] | null;
16
- declaration: ClassDeclaration;
17
- compilation: CompileResult[];
18
- }
19
- export interface CompiledFile {
20
- compiledClasses: CompiledClass[];
21
- sourceFile: ts.SourceFile;
22
- constantPool: ConstantPool;
23
- /**
24
- * Any re-exports which should be added next to this class, both in .js and (if possible) .d.ts.
25
- */
26
- reexports: Reexport[];
27
- }
28
- export type DecorationAnalyses = Map<ts.SourceFile, CompiledFile>;
29
- export declare const DecorationAnalyses: MapConstructor;
@@ -1,11 +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 { DependencyTracker } from '../../../src/ngtsc/incremental/api';
10
- export declare function isWithinPackage(packagePath: AbsoluteFsPath, filePath: AbsoluteFsPath): boolean;
11
- export declare const NOOP_DEPENDENCY_TRACKER: DependencyTracker;
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- import { NgccOptions } from './ngcc_options';
3
- export declare function parseCommandLineOptions(args: string[]): NgccOptions;
@@ -1,9 +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 declare const IMPORT_PREFIX = "\u0275ngcc";
9
- export declare const NGCC_TIMED_OUT_EXIT_CODE = 177;
@@ -1,20 +0,0 @@
1
- import { AbsoluteFsPath } from '../../../src/ngtsc/file_system';
2
- import { DependencyHostBase } from './dependency_host';
3
- /**
4
- * Helper functions for computing dependencies.
5
- */
6
- export declare class CommonJsDependencyHost extends DependencyHostBase {
7
- protected canSkipFile(fileContents: string): boolean;
8
- protected extractImports(file: AbsoluteFsPath, fileContents: string): Set<string>;
9
- }
10
- /**
11
- * Check whether a source file needs to be parsed for imports.
12
- * This is a performance short-circuit, which saves us from creating
13
- * a TypeScript AST unnecessarily.
14
- *
15
- * @param source The content of the source file to check.
16
- *
17
- * @returns false if there are definitely no require calls
18
- * in this file, true otherwise.
19
- */
20
- export declare function hasRequireCalls(source: string): boolean;
@@ -1,77 +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, PathSegment, ReadonlyFileSystem } from '../../../src/ngtsc/file_system';
9
- import { EntryPoint } from '../packages/entry_point';
10
- import { ModuleResolver } from './module_resolver';
11
- export interface DependencyHost {
12
- collectDependencies(entryPointPath: AbsoluteFsPath, { dependencies, missing, deepImports }: DependencyInfo): void;
13
- }
14
- export interface DependencyInfo {
15
- dependencies: Set<AbsoluteFsPath>;
16
- missing: Set<AbsoluteFsPath | PathSegment>;
17
- deepImports: Set<AbsoluteFsPath>;
18
- }
19
- export interface EntryPointWithDependencies {
20
- entryPoint: EntryPoint;
21
- depInfo: DependencyInfo;
22
- }
23
- export declare function createDependencyInfo(): DependencyInfo;
24
- export declare abstract class DependencyHostBase implements DependencyHost {
25
- protected fs: ReadonlyFileSystem;
26
- protected moduleResolver: ModuleResolver;
27
- constructor(fs: ReadonlyFileSystem, moduleResolver: ModuleResolver);
28
- /**
29
- * Find all the dependencies for the entry-point at the given path.
30
- *
31
- * @param entryPointPath The absolute path to the JavaScript file that represents an entry-point.
32
- * @param dependencyInfo An object containing information about the dependencies of the
33
- * entry-point, including those that were missing or deep imports into other entry-points. The
34
- * sets in this object will be updated with new information about the entry-point's dependencies.
35
- */
36
- collectDependencies(entryPointPath: AbsoluteFsPath, { dependencies, missing, deepImports }: DependencyInfo): void;
37
- /**
38
- * Find all the dependencies for the provided paths.
39
- *
40
- * @param files The list of absolute paths of JavaScript files to scan for dependencies.
41
- * @param dependencyInfo An object containing information about the dependencies of the
42
- * entry-point, including those that were missing or deep imports into other entry-points. The
43
- * sets in this object will be updated with new information about the entry-point's dependencies.
44
- */
45
- collectDependenciesInFiles(files: AbsoluteFsPath[], { dependencies, missing, deepImports }: DependencyInfo): void;
46
- /**
47
- * Compute the dependencies of the given file.
48
- *
49
- * @param file An absolute path to the file whose dependencies we want to get.
50
- * @param dependencies A set that will have the absolute paths of resolved entry points added to
51
- * it.
52
- * @param missing A set that will have the dependencies that could not be found added to it.
53
- * @param deepImports A set that will have the import paths that exist but cannot be mapped to
54
- * entry-points, i.e. deep-imports.
55
- * @param alreadySeen A set that is used to track internal dependencies to prevent getting stuck
56
- * in a circular dependency loop.
57
- */
58
- protected recursivelyCollectDependencies(file: AbsoluteFsPath, dependencies: Set<AbsoluteFsPath>, missing: Set<string>, deepImports: Set<string>, alreadySeen: Set<AbsoluteFsPath>): void;
59
- protected abstract canSkipFile(fileContents: string): boolean;
60
- protected abstract extractImports(file: AbsoluteFsPath, fileContents: string): Set<string>;
61
- /**
62
- * Resolve the given `importPath` from `file` and add it to the appropriate set.
63
- *
64
- * If the import is local to this package then follow it by calling
65
- * `recursivelyCollectDependencies()`.
66
- *
67
- * @returns `true` if the import was resolved (to an entry-point, a local import, or a
68
- * deep-import), `false` otherwise.
69
- */
70
- protected processImport(importPath: string, file: AbsoluteFsPath, dependencies: Set<AbsoluteFsPath>, missing: Set<string>, deepImports: Set<string>, alreadySeen: Set<AbsoluteFsPath>): boolean;
71
- /**
72
- * Processes the file if it has not already been seen. This will also recursively process
73
- * all files that are imported from the file, while taking the set of already seen files
74
- * into account.
75
- */
76
- protected processFile(file: AbsoluteFsPath, dependencies: Set<AbsoluteFsPath>, missing: Set<string>, deepImports: Set<string>, alreadySeen: Set<AbsoluteFsPath>): void;
77
- }