@angular/compiler-cli 13.2.0-next.2 → 13.2.0-rc.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.
- package/bundles/{chunk-O4XVCXRT.js → chunk-7UHLQOIO.js} +4 -4
- package/bundles/{chunk-O4XVCXRT.js.map → chunk-7UHLQOIO.js.map} +0 -0
- package/bundles/{chunk-QDWL7SZJ.js → chunk-BPCUCINV.js} +2 -2
- package/bundles/{chunk-QDWL7SZJ.js.map → chunk-BPCUCINV.js.map} +0 -0
- package/bundles/{chunk-GLCRIILX.js → chunk-J6CW3T62.js} +5 -5
- package/bundles/{chunk-GLCRIILX.js.map → chunk-J6CW3T62.js.map} +0 -0
- package/bundles/{chunk-SKBLJA43.js → chunk-JTYUTYS2.js} +3 -3
- package/bundles/{chunk-SKBLJA43.js.map → chunk-JTYUTYS2.js.map} +0 -0
- package/bundles/{chunk-UESD6FVI.js → chunk-KU4D2JVX.js} +31 -31
- package/bundles/{chunk-UESD6FVI.js.map → chunk-KU4D2JVX.js.map} +0 -0
- package/bundles/{chunk-ZWPDFY6U.js → chunk-N2FK756V.js} +5 -5
- package/bundles/{chunk-ZWPDFY6U.js.map → chunk-N2FK756V.js.map} +0 -0
- package/bundles/{chunk-L5DQYLOG.js → chunk-PRLCFFMX.js} +438 -832
- package/bundles/chunk-PRLCFFMX.js.map +6 -0
- package/bundles/{chunk-ADHVDA4A.js → chunk-RDTZZXLZ.js} +7 -7
- package/bundles/{chunk-ADHVDA4A.js.map → chunk-RDTZZXLZ.js.map} +0 -0
- package/bundles/{chunk-676MI6WZ.js → chunk-RGGJJ7ZZ.js} +7 -7
- package/bundles/{chunk-676MI6WZ.js.map → chunk-RGGJJ7ZZ.js.map} +0 -0
- package/bundles/{chunk-A5PL3TE6.js → chunk-RNVIUKDY.js} +6 -6
- package/bundles/{chunk-A5PL3TE6.js.map → chunk-RNVIUKDY.js.map} +0 -0
- package/bundles/{chunk-L2JNRKLG.js → chunk-SJCYXGJE.js} +577 -163
- package/bundles/chunk-SJCYXGJE.js.map +6 -0
- package/bundles/{chunk-QBU7RUKB.js → chunk-VUEDWBJP.js} +26 -26
- package/bundles/{chunk-QBU7RUKB.js.map → chunk-VUEDWBJP.js.map} +0 -0
- package/bundles/{chunk-NU7DCJLY.js → chunk-XDDLTG6N.js} +40 -40
- package/bundles/{chunk-NU7DCJLY.js.map → chunk-XDDLTG6N.js.map} +0 -0
- package/bundles/{chunk-QGM254OS.js → chunk-XDGHBAZ6.js} +194 -147
- package/bundles/{chunk-QGM254OS.js.map → chunk-XDGHBAZ6.js.map} +2 -2
- package/bundles/{chunk-7PY7XEFH.js → chunk-XXMNTCYN.js} +6 -6
- package/bundles/{chunk-7PY7XEFH.js.map → chunk-XXMNTCYN.js.map} +0 -0
- package/bundles/index.js +14 -13
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +12 -12
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js +12 -12
- package/bundles/ngcc/main-ngcc.js +13 -13
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13 -13
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/ngcc/src/packages/adjust_cjs_umd_exports.d.ts +17 -0
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/source_file_cache.d.ts +2 -1
- package/package.json +2 -2
- package/bundles/chunk-L2JNRKLG.js.map +0 -6
- package/bundles/chunk-L5DQYLOG.js.map +0 -6
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
MetadataDtsModuleScopeResolver,
|
|
11
11
|
TypeCheckScopeRegistry,
|
|
12
12
|
readConfiguration
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-PRLCFFMX.js";
|
|
14
14
|
import {
|
|
15
15
|
CompilationMode,
|
|
16
16
|
ComponentDecoratorHandler,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
TraitState,
|
|
32
32
|
forwardRefResolver,
|
|
33
33
|
readBaseClass
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-SJCYXGJE.js";
|
|
35
35
|
import {
|
|
36
36
|
ClassMemberKind,
|
|
37
37
|
KnownDeclaration,
|
|
@@ -42,15 +42,15 @@ import {
|
|
|
42
42
|
isNamedFunctionDeclaration,
|
|
43
43
|
isNamedVariableDeclaration,
|
|
44
44
|
reflectObjectLiteral
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-XXMNTCYN.js";
|
|
46
46
|
import {
|
|
47
47
|
ConsoleLogger,
|
|
48
48
|
LogLevel
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JTYUTYS2.js";
|
|
50
50
|
import {
|
|
51
51
|
ContentOrigin,
|
|
52
52
|
SourceFileLoader
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-RDTZZXLZ.js";
|
|
54
54
|
import {
|
|
55
55
|
AbsoluteModuleStrategy,
|
|
56
56
|
ImportManager,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
translateStatement,
|
|
72
72
|
translateType,
|
|
73
73
|
validateAndRewriteCoreSymbol
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-VUEDWBJP.js";
|
|
75
75
|
import {
|
|
76
76
|
LogicalFileSystem,
|
|
77
77
|
NgtscCompilerHost,
|
|
@@ -83,25 +83,25 @@ import {
|
|
|
83
83
|
isRooted,
|
|
84
84
|
relative,
|
|
85
85
|
toRelativeImport
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-RGGJJ7ZZ.js";
|
|
87
87
|
import {
|
|
88
88
|
NOOP_PERF_RECORDER
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-J6CW3T62.js";
|
|
90
90
|
import {
|
|
91
91
|
__spreadProps,
|
|
92
92
|
__spreadValues
|
|
93
93
|
} from "./chunk-WQ3TNYTD.js";
|
|
94
94
|
|
|
95
|
-
// bazel-out/
|
|
96
|
-
import
|
|
95
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/create_compile_function.mjs
|
|
96
|
+
import ts23 from "typescript";
|
|
97
97
|
|
|
98
|
-
// bazel-out/
|
|
98
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/entry_point.mjs
|
|
99
99
|
import ts7 from "typescript";
|
|
100
100
|
|
|
101
|
-
// bazel-out/
|
|
101
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/umd_host.mjs
|
|
102
102
|
import ts6 from "typescript";
|
|
103
103
|
|
|
104
|
-
// bazel-out/
|
|
104
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/utils.mjs
|
|
105
105
|
import ts from "typescript";
|
|
106
106
|
function isDefined(value) {
|
|
107
107
|
return value !== void 0 && value !== null;
|
|
@@ -172,7 +172,7 @@ function stripExtension(fileName) {
|
|
|
172
172
|
return fileName.replace(/\..+$/, "");
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
// bazel-out/
|
|
175
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/commonjs_umd_utils.mjs
|
|
176
176
|
import ts2 from "typescript";
|
|
177
177
|
function findNamespaceOfIdentifier(id) {
|
|
178
178
|
return id.parent && ts2.isPropertyAccessExpression(id.parent) && id.parent.name === id && ts2.isIdentifier(id.parent.expression) ? id.parent.expression : null;
|
|
@@ -258,10 +258,10 @@ function skipAliases(node) {
|
|
|
258
258
|
return node;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
// bazel-out/
|
|
261
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/esm2015_host.mjs
|
|
262
262
|
import ts4 from "typescript";
|
|
263
263
|
|
|
264
|
-
// bazel-out/
|
|
264
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/util.mjs
|
|
265
265
|
function isWithinPackage(packagePath, filePath) {
|
|
266
266
|
const relativePath = relative(packagePath, filePath);
|
|
267
267
|
return isLocalRelativePath(relativePath) && !relativePath.startsWith("node_modules/");
|
|
@@ -276,13 +276,13 @@ var NoopDependencyTracker = class {
|
|
|
276
276
|
};
|
|
277
277
|
var NOOP_DEPENDENCY_TRACKER = new NoopDependencyTracker();
|
|
278
278
|
|
|
279
|
-
// bazel-out/
|
|
279
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/utils.mjs
|
|
280
280
|
import ts3 from "typescript";
|
|
281
281
|
function stripParentheses(node) {
|
|
282
282
|
return ts3.isParenthesizedExpression(node) ? node.expression : node;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
// bazel-out/
|
|
285
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/esm2015_host.mjs
|
|
286
286
|
var DECORATORS = "decorators";
|
|
287
287
|
var PROP_DECORATORS = "propDecorators";
|
|
288
288
|
var CONSTRUCTOR = "__constructor";
|
|
@@ -1510,7 +1510,7 @@ function getOuterNodeFromInnerDeclaration(node) {
|
|
|
1510
1510
|
return outerNode;
|
|
1511
1511
|
}
|
|
1512
1512
|
|
|
1513
|
-
// bazel-out/
|
|
1513
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/esm5_host.mjs
|
|
1514
1514
|
import ts5 from "typescript";
|
|
1515
1515
|
var Esm5ReflectionHost = class extends Esm2015ReflectionHost {
|
|
1516
1516
|
getBaseClassExpression(clazz) {
|
|
@@ -1844,7 +1844,7 @@ function getIifeFn(classSymbol) {
|
|
|
1844
1844
|
return iifeWrapper && ts5.isFunctionExpression(iifeWrapper) ? iifeWrapper : null;
|
|
1845
1845
|
}
|
|
1846
1846
|
|
|
1847
|
-
// bazel-out/
|
|
1847
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/umd_host.mjs
|
|
1848
1848
|
var UmdReflectionHost = class extends Esm5ReflectionHost {
|
|
1849
1849
|
constructor(logger, isCore, src, dts = null) {
|
|
1850
1850
|
super(logger, isCore, src, dts);
|
|
@@ -2344,7 +2344,7 @@ function isExportsIdentifier(node) {
|
|
|
2344
2344
|
return ts6.isIdentifier(node) && node.text === "exports";
|
|
2345
2345
|
}
|
|
2346
2346
|
|
|
2347
|
-
// bazel-out/
|
|
2347
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/entry_point.mjs
|
|
2348
2348
|
var SUPPORTED_FORMAT_PROPERTIES = ["fesm2015", "fesm5", "es2015", "esm2015", "esm5", "main", "module", "browser"];
|
|
2349
2349
|
var NO_ENTRY_POINT = "no-entry-point";
|
|
2350
2350
|
var IGNORED_ENTRY_POINT = "ignored-entry-point";
|
|
@@ -2503,7 +2503,7 @@ function getRepositoryUrl(packageJson) {
|
|
|
2503
2503
|
return packageJson.repository.url;
|
|
2504
2504
|
}
|
|
2505
2505
|
|
|
2506
|
-
// bazel-out/
|
|
2506
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/tasks/api.mjs
|
|
2507
2507
|
var DtsProcessing;
|
|
2508
2508
|
(function(DtsProcessing2) {
|
|
2509
2509
|
DtsProcessing2[DtsProcessing2["Yes"] = 0] = "Yes";
|
|
@@ -2512,21 +2512,58 @@ var DtsProcessing;
|
|
|
2512
2512
|
})(DtsProcessing || (DtsProcessing = {}));
|
|
2513
2513
|
var TaskDependencies = Map;
|
|
2514
2514
|
|
|
2515
|
-
// bazel-out/
|
|
2516
|
-
import ts9 from "typescript";
|
|
2517
|
-
|
|
2518
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/patch_ts_expando_initializer.mjs
|
|
2515
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/adjust_cjs_umd_exports.mjs
|
|
2519
2516
|
import ts8 from "typescript";
|
|
2517
|
+
function adjustElementAccessExports(sourceText) {
|
|
2518
|
+
if (!/exports\[["']/.test(sourceText)) {
|
|
2519
|
+
return sourceText;
|
|
2520
|
+
}
|
|
2521
|
+
const replacements = [];
|
|
2522
|
+
const sf = ts8.createSourceFile("input.js", sourceText, ts8.ScriptTarget.ES5, false, ts8.ScriptKind.JS);
|
|
2523
|
+
ts8.forEachChild(sf, function visitNode(node) {
|
|
2524
|
+
if (ts8.isElementAccessExpression(node) && isExportsIdentifier2(node.expression) && ts8.isStringLiteral(node.argumentExpression) && isJsIdentifier(node.argumentExpression.text)) {
|
|
2525
|
+
replacements.push({
|
|
2526
|
+
start: node.getStart(sf),
|
|
2527
|
+
end: node.getEnd(),
|
|
2528
|
+
identifier: node.argumentExpression.text
|
|
2529
|
+
});
|
|
2530
|
+
}
|
|
2531
|
+
ts8.forEachChild(node, visitNode);
|
|
2532
|
+
});
|
|
2533
|
+
replacements.sort((a, b) => a.start - b.start);
|
|
2534
|
+
const parts = [];
|
|
2535
|
+
let currentIndex = 0;
|
|
2536
|
+
for (const replacement of replacements) {
|
|
2537
|
+
parts.push(sourceText.substring(currentIndex, replacement.start));
|
|
2538
|
+
parts.push(`exports. ${replacement.identifier} `);
|
|
2539
|
+
currentIndex = replacement.end;
|
|
2540
|
+
}
|
|
2541
|
+
parts.push(sourceText.substring(currentIndex));
|
|
2542
|
+
return parts.join("");
|
|
2543
|
+
}
|
|
2544
|
+
function isExportsIdentifier2(expr) {
|
|
2545
|
+
return ts8.isIdentifier(expr) && expr.text === "exports";
|
|
2546
|
+
}
|
|
2547
|
+
var identifierPattern = /^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/;
|
|
2548
|
+
function isJsIdentifier(text) {
|
|
2549
|
+
return identifierPattern.test(text);
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/bundle_program.mjs
|
|
2553
|
+
import ts10 from "typescript";
|
|
2554
|
+
|
|
2555
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/patch_ts_expando_initializer.mjs
|
|
2556
|
+
import ts9 from "typescript";
|
|
2520
2557
|
function patchTsGetExpandoInitializer() {
|
|
2521
2558
|
if (isTs31778GetExpandoInitializerFixed()) {
|
|
2522
2559
|
return null;
|
|
2523
2560
|
}
|
|
2524
|
-
const originalGetExpandoInitializer =
|
|
2561
|
+
const originalGetExpandoInitializer = ts9.getExpandoInitializer;
|
|
2525
2562
|
if (originalGetExpandoInitializer === void 0) {
|
|
2526
2563
|
throw makeUnsupportedTypeScriptError();
|
|
2527
2564
|
}
|
|
2528
|
-
|
|
2529
|
-
if (
|
|
2565
|
+
ts9.getExpandoInitializer = (initializer, isPrototypeAssignment) => {
|
|
2566
|
+
if (ts9.isParenthesizedExpression(initializer) && ts9.isCallExpression(initializer.expression)) {
|
|
2530
2567
|
initializer = initializer.expression;
|
|
2531
2568
|
}
|
|
2532
2569
|
return originalGetExpandoInitializer(initializer, isPrototypeAssignment);
|
|
@@ -2535,7 +2572,7 @@ function patchTsGetExpandoInitializer() {
|
|
|
2535
2572
|
}
|
|
2536
2573
|
function restoreGetExpandoInitializer(originalGetExpandoInitializer) {
|
|
2537
2574
|
if (originalGetExpandoInitializer !== null) {
|
|
2538
|
-
|
|
2575
|
+
ts9.getExpandoInitializer = originalGetExpandoInitializer;
|
|
2539
2576
|
}
|
|
2540
2577
|
}
|
|
2541
2578
|
var ts31778FixedResult = null;
|
|
@@ -2566,7 +2603,7 @@ function checkIfExpandoPropertyIsPresent() {
|
|
|
2566
2603
|
}());
|
|
2567
2604
|
A.expando = true;
|
|
2568
2605
|
}());`;
|
|
2569
|
-
const sourceFile =
|
|
2606
|
+
const sourceFile = ts9.createSourceFile("test.js", sourceText, ts9.ScriptTarget.ES5, true, ts9.ScriptKind.JS);
|
|
2570
2607
|
const host = {
|
|
2571
2608
|
getSourceFile() {
|
|
2572
2609
|
return sourceFile;
|
|
@@ -2599,14 +2636,14 @@ function checkIfExpandoPropertyIsPresent() {
|
|
|
2599
2636
|
}
|
|
2600
2637
|
};
|
|
2601
2638
|
const options = { noResolve: true, noLib: true, noEmit: true, allowJs: true };
|
|
2602
|
-
const program =
|
|
2639
|
+
const program = ts9.createProgram(["test.js"], options, host);
|
|
2603
2640
|
function visitor(node) {
|
|
2604
|
-
if (
|
|
2641
|
+
if (ts9.isVariableDeclaration(node) && hasNameIdentifier(node) && node.name.text === "A") {
|
|
2605
2642
|
return node;
|
|
2606
2643
|
}
|
|
2607
|
-
return
|
|
2644
|
+
return ts9.forEachChild(node, visitor);
|
|
2608
2645
|
}
|
|
2609
|
-
const declaration =
|
|
2646
|
+
const declaration = ts9.forEachChild(sourceFile, visitor);
|
|
2610
2647
|
if (declaration === void 0) {
|
|
2611
2648
|
throw new Error("Unable to find declaration of outer A");
|
|
2612
2649
|
}
|
|
@@ -2620,12 +2657,12 @@ function makeUnsupportedTypeScriptError() {
|
|
|
2620
2657
|
return new Error("The TypeScript version used is not supported by ngcc.");
|
|
2621
2658
|
}
|
|
2622
2659
|
|
|
2623
|
-
// bazel-out/
|
|
2660
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/bundle_program.mjs
|
|
2624
2661
|
function makeBundleProgram(fs, isCore, pkg, path, r3FileName, options, host, additionalFiles = []) {
|
|
2625
2662
|
const r3SymbolsPath = isCore ? findR3SymbolsPath(fs, fs.dirname(path), r3FileName) : null;
|
|
2626
2663
|
let rootPaths = r3SymbolsPath ? [path, r3SymbolsPath, ...additionalFiles] : [path, ...additionalFiles];
|
|
2627
2664
|
const originalGetExpandoInitializer = patchTsGetExpandoInitializer();
|
|
2628
|
-
const program =
|
|
2665
|
+
const program = ts10.createProgram(rootPaths, options, host);
|
|
2629
2666
|
program.getTypeChecker();
|
|
2630
2667
|
restoreGetExpandoInitializer(originalGetExpandoInitializer);
|
|
2631
2668
|
const file = program.getSourceFile(path);
|
|
@@ -2650,8 +2687,8 @@ function findR3SymbolsPath(fs, directory, filename) {
|
|
|
2650
2687
|
return null;
|
|
2651
2688
|
}
|
|
2652
2689
|
|
|
2653
|
-
// bazel-out/
|
|
2654
|
-
import
|
|
2690
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/ngcc_compiler_host.mjs
|
|
2691
|
+
import ts11 from "typescript";
|
|
2655
2692
|
var NgccSourcesCompilerHost = class extends NgtscCompilerHost {
|
|
2656
2693
|
constructor(fs, options, cache, moduleResolutionCache, packagePath) {
|
|
2657
2694
|
super(fs, options);
|
|
@@ -2664,14 +2701,14 @@ var NgccSourcesCompilerHost = class extends NgtscCompilerHost {
|
|
|
2664
2701
|
}
|
|
2665
2702
|
resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference) {
|
|
2666
2703
|
return moduleNames.map((moduleName) => {
|
|
2667
|
-
const { resolvedModule } =
|
|
2668
|
-
if ((resolvedModule == null ? void 0 : resolvedModule.extension) ===
|
|
2704
|
+
const { resolvedModule } = ts11.resolveModuleName(moduleName, containingFile, this.options, this, this.moduleResolutionCache, redirectedReference);
|
|
2705
|
+
if ((resolvedModule == null ? void 0 : resolvedModule.extension) === ts11.Extension.Dts && containingFile.endsWith(".js") && isRelativePath(moduleName)) {
|
|
2669
2706
|
const jsFile = resolvedModule.resolvedFileName.replace(/\.d\.ts$/, ".js");
|
|
2670
2707
|
if (this.fileExists(jsFile)) {
|
|
2671
|
-
return __spreadProps(__spreadValues({}, resolvedModule), { resolvedFileName: jsFile, extension:
|
|
2708
|
+
return __spreadProps(__spreadValues({}, resolvedModule), { resolvedFileName: jsFile, extension: ts11.Extension.Js });
|
|
2672
2709
|
}
|
|
2673
2710
|
}
|
|
2674
|
-
if ((resolvedModule == null ? void 0 : resolvedModule.extension) ===
|
|
2711
|
+
if ((resolvedModule == null ? void 0 : resolvedModule.extension) === ts11.Extension.Js && !isWithinPackage(this.packagePath, this.fs.resolve(resolvedModule.resolvedFileName))) {
|
|
2675
2712
|
return void 0;
|
|
2676
2713
|
}
|
|
2677
2714
|
return resolvedModule;
|
|
@@ -2689,14 +2726,14 @@ var NgccDtsCompilerHost = class extends NgtscCompilerHost {
|
|
|
2689
2726
|
}
|
|
2690
2727
|
resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference) {
|
|
2691
2728
|
return moduleNames.map((moduleName) => {
|
|
2692
|
-
const { resolvedModule } =
|
|
2729
|
+
const { resolvedModule } = ts11.resolveModuleName(moduleName, containingFile, this.options, this, this.moduleResolutionCache, redirectedReference);
|
|
2693
2730
|
return resolvedModule;
|
|
2694
2731
|
});
|
|
2695
2732
|
}
|
|
2696
2733
|
};
|
|
2697
2734
|
|
|
2698
|
-
// bazel-out/
|
|
2699
|
-
import
|
|
2735
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/source_file_cache.mjs
|
|
2736
|
+
import ts12 from "typescript";
|
|
2700
2737
|
var SharedFileCache = class {
|
|
2701
2738
|
constructor(fs) {
|
|
2702
2739
|
this.fs = fs;
|
|
@@ -2718,7 +2755,7 @@ var SharedFileCache = class {
|
|
|
2718
2755
|
if (content === void 0) {
|
|
2719
2756
|
return void 0;
|
|
2720
2757
|
}
|
|
2721
|
-
const sf =
|
|
2758
|
+
const sf = ts12.createSourceFile(absPath, content, ts12.ScriptTarget.ES2015);
|
|
2722
2759
|
this.sfCache.set(absPath, sf);
|
|
2723
2760
|
}
|
|
2724
2761
|
return this.sfCache.get(absPath);
|
|
@@ -2729,7 +2766,7 @@ var SharedFileCache = class {
|
|
|
2729
2766
|
return void 0;
|
|
2730
2767
|
}
|
|
2731
2768
|
if (!this.sfCache.has(absPath) || this.sfCache.get(absPath).text !== content) {
|
|
2732
|
-
const sf =
|
|
2769
|
+
const sf = ts12.createSourceFile(absPath, content, ts12.ScriptTarget.ES2015);
|
|
2733
2770
|
this.sfCache.set(absPath, sf);
|
|
2734
2771
|
}
|
|
2735
2772
|
return this.sfCache.get(absPath);
|
|
@@ -2761,9 +2798,10 @@ function isFile(path, segments, fs) {
|
|
|
2761
2798
|
return true;
|
|
2762
2799
|
}
|
|
2763
2800
|
var EntryPointFileCache = class {
|
|
2764
|
-
constructor(fs, sharedFileCache) {
|
|
2801
|
+
constructor(fs, sharedFileCache, processSourceText) {
|
|
2765
2802
|
this.fs = fs;
|
|
2766
2803
|
this.sharedFileCache = sharedFileCache;
|
|
2804
|
+
this.processSourceText = processSourceText;
|
|
2767
2805
|
this.sfCache = /* @__PURE__ */ new Map();
|
|
2768
2806
|
}
|
|
2769
2807
|
getCachedSourceFile(fileName, languageVersion) {
|
|
@@ -2779,7 +2817,8 @@ var EntryPointFileCache = class {
|
|
|
2779
2817
|
if (content === void 0) {
|
|
2780
2818
|
return void 0;
|
|
2781
2819
|
}
|
|
2782
|
-
const
|
|
2820
|
+
const processed = this.processSourceText(content);
|
|
2821
|
+
const sf = ts12.createSourceFile(fileName, processed, languageVersion);
|
|
2783
2822
|
this.sfCache.set(absPath, sf);
|
|
2784
2823
|
return sf;
|
|
2785
2824
|
}
|
|
@@ -2791,16 +2830,24 @@ function readFile(absPath, fs) {
|
|
|
2791
2830
|
return fs.readFile(absPath);
|
|
2792
2831
|
}
|
|
2793
2832
|
function createModuleResolutionCache(fs) {
|
|
2794
|
-
return
|
|
2833
|
+
return ts12.createModuleResolutionCache(fs.pwd(), (fileName) => {
|
|
2795
2834
|
return fs.isCaseSensitive() ? fileName : fileName.toLowerCase();
|
|
2796
2835
|
});
|
|
2797
2836
|
}
|
|
2798
2837
|
|
|
2799
|
-
// bazel-out/
|
|
2838
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/entry_point_bundle.mjs
|
|
2839
|
+
function createSourceTextProcessor(format) {
|
|
2840
|
+
if (format === "umd" || format === "commonjs") {
|
|
2841
|
+
return adjustElementAccessExports;
|
|
2842
|
+
} else {
|
|
2843
|
+
return (sourceText) => sourceText;
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2800
2846
|
function makeEntryPointBundle(fs, entryPoint, sharedFileCache, moduleResolutionCache, formatPath, isCore, format, dtsProcessing, pathMappings, mirrorDtsFromSrc = false, enableI18nLegacyMessageIdFormat = true) {
|
|
2801
2847
|
const rootDir = entryPoint.packagePath;
|
|
2802
2848
|
const options = __spreadValues({ allowJs: true, maxNodeModuleJsDepth: Infinity, rootDir }, pathMappings);
|
|
2803
|
-
const
|
|
2849
|
+
const processSourceText = createSourceTextProcessor(format);
|
|
2850
|
+
const entryPointCache = new EntryPointFileCache(fs, sharedFileCache, processSourceText);
|
|
2804
2851
|
const dtsHost = new NgccDtsCompilerHost(fs, options, entryPointCache, moduleResolutionCache);
|
|
2805
2852
|
const srcHost = new NgccSourcesCompilerHost(fs, options, entryPointCache, moduleResolutionCache, entryPoint.packagePath);
|
|
2806
2853
|
const absFormatPath = fs.resolve(entryPoint.path, formatPath);
|
|
@@ -2837,14 +2884,14 @@ function computePotentialDtsFilesFromJsFiles(fs, srcProgram, formatPath, typings
|
|
|
2837
2884
|
return additionalFiles;
|
|
2838
2885
|
}
|
|
2839
2886
|
|
|
2840
|
-
// bazel-out/
|
|
2841
|
-
import
|
|
2887
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/transformer.mjs
|
|
2888
|
+
import ts22 from "typescript";
|
|
2842
2889
|
|
|
2843
|
-
// bazel-out/
|
|
2890
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/decoration_analyzer.mjs
|
|
2844
2891
|
import { ConstantPool } from "@angular/compiler";
|
|
2845
2892
|
|
|
2846
|
-
// bazel-out/
|
|
2847
|
-
import
|
|
2893
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/utils.mjs
|
|
2894
|
+
import ts13 from "typescript";
|
|
2848
2895
|
function isClassDeclaration(clazz) {
|
|
2849
2896
|
return isNamedClassDeclaration(clazz) || isNamedFunctionDeclaration(clazz) || isNamedVariableDeclaration(clazz);
|
|
2850
2897
|
}
|
|
@@ -2869,7 +2916,7 @@ function createDirectiveDecorator(clazz, metadata) {
|
|
|
2869
2916
|
if (metadata.exportAs !== null) {
|
|
2870
2917
|
metaArgs.push(property("exportAs", metadata.exportAs.join(", ")));
|
|
2871
2918
|
}
|
|
2872
|
-
args.push(reifySourceFile(
|
|
2919
|
+
args.push(reifySourceFile(ts13.createObjectLiteral(metaArgs)));
|
|
2873
2920
|
}
|
|
2874
2921
|
return {
|
|
2875
2922
|
name: "Directive",
|
|
@@ -2897,7 +2944,7 @@ function createComponentDecorator(clazz, metadata) {
|
|
|
2897
2944
|
node: null,
|
|
2898
2945
|
synthesizedFor: clazz.name,
|
|
2899
2946
|
args: [
|
|
2900
|
-
reifySourceFile(
|
|
2947
|
+
reifySourceFile(ts13.createObjectLiteral(metaArgs))
|
|
2901
2948
|
]
|
|
2902
2949
|
};
|
|
2903
2950
|
}
|
|
@@ -2912,21 +2959,21 @@ function createInjectableDecorator(clazz) {
|
|
|
2912
2959
|
};
|
|
2913
2960
|
}
|
|
2914
2961
|
function property(name, value) {
|
|
2915
|
-
return
|
|
2962
|
+
return ts13.createPropertyAssignment(name, ts13.createStringLiteral(value));
|
|
2916
2963
|
}
|
|
2917
|
-
var EMPTY_SF =
|
|
2964
|
+
var EMPTY_SF = ts13.createSourceFile("(empty)", "", ts13.ScriptTarget.Latest);
|
|
2918
2965
|
function reifySourceFile(expr) {
|
|
2919
|
-
const printer =
|
|
2920
|
-
const exprText = printer.printNode(
|
|
2921
|
-
const sf =
|
|
2966
|
+
const printer = ts13.createPrinter();
|
|
2967
|
+
const exprText = printer.printNode(ts13.EmitHint.Unspecified, expr, EMPTY_SF);
|
|
2968
|
+
const sf = ts13.createSourceFile("(synthetic)", `const expr = ${exprText};`, ts13.ScriptTarget.Latest, true, ts13.ScriptKind.JS);
|
|
2922
2969
|
const stmt = sf.statements[0];
|
|
2923
|
-
if (!
|
|
2924
|
-
throw new Error(`Expected VariableStatement, got ${
|
|
2970
|
+
if (!ts13.isVariableStatement(stmt)) {
|
|
2971
|
+
throw new Error(`Expected VariableStatement, got ${ts13.SyntaxKind[stmt.kind]}`);
|
|
2925
2972
|
}
|
|
2926
2973
|
return stmt.declarationList.declarations[0].initializer;
|
|
2927
2974
|
}
|
|
2928
2975
|
|
|
2929
|
-
// bazel-out/
|
|
2976
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/missing_injectable_migration.mjs
|
|
2930
2977
|
var MissingInjectableMigration = class {
|
|
2931
2978
|
apply(clazz, host) {
|
|
2932
2979
|
const decorators = host.reflectionHost.getDecoratorsOfDeclaration(clazz);
|
|
@@ -3031,7 +3078,7 @@ function getAngularCoreDecoratorName(decorator) {
|
|
|
3031
3078
|
return decorator.import.name;
|
|
3032
3079
|
}
|
|
3033
3080
|
|
|
3034
|
-
// bazel-out/
|
|
3081
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/undecorated_child_migration.mjs
|
|
3035
3082
|
var UndecoratedChildMigration = class {
|
|
3036
3083
|
apply(clazz, host) {
|
|
3037
3084
|
const moduleMeta = host.metadata.getNgModuleMetadata(new Reference(clazz));
|
|
@@ -3066,7 +3113,7 @@ var UndecoratedChildMigration = class {
|
|
|
3066
3113
|
}
|
|
3067
3114
|
};
|
|
3068
3115
|
|
|
3069
|
-
// bazel-out/
|
|
3116
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/undecorated_parent_migration.mjs
|
|
3070
3117
|
var UndecoratedParentMigration = class {
|
|
3071
3118
|
apply(clazz, host) {
|
|
3072
3119
|
if (!hasDirectiveDecorator(host, clazz) || hasConstructor(host, clazz)) {
|
|
@@ -3099,8 +3146,8 @@ function determineBaseClass(clazz, host) {
|
|
|
3099
3146
|
return baseClass;
|
|
3100
3147
|
}
|
|
3101
3148
|
|
|
3102
|
-
// bazel-out/
|
|
3103
|
-
import
|
|
3149
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/migration_host.mjs
|
|
3150
|
+
import ts14 from "typescript";
|
|
3104
3151
|
var DefaultMigrationHost = class {
|
|
3105
3152
|
constructor(reflectionHost, metadata, evaluator, compiler, entryPointPath) {
|
|
3106
3153
|
this.reflectionHost = reflectionHost;
|
|
@@ -3131,14 +3178,14 @@ function createMigrationDiagnostic(diagnostic, source, decorator) {
|
|
|
3131
3178
|
const clone = __spreadValues({}, diagnostic);
|
|
3132
3179
|
const chain = [{
|
|
3133
3180
|
messageText: `Occurs for @${decorator.name} decorator inserted by an automatic migration`,
|
|
3134
|
-
category:
|
|
3181
|
+
category: ts14.DiagnosticCategory.Message,
|
|
3135
3182
|
code: 0
|
|
3136
3183
|
}];
|
|
3137
3184
|
if (decorator.args !== null) {
|
|
3138
3185
|
const args = decorator.args.map((arg) => arg.getText()).join(", ");
|
|
3139
3186
|
chain.push({
|
|
3140
3187
|
messageText: `@${decorator.name}(${args})`,
|
|
3141
|
-
category:
|
|
3188
|
+
category: ts14.DiagnosticCategory.Message,
|
|
3142
3189
|
code: 0
|
|
3143
3190
|
});
|
|
3144
3191
|
}
|
|
@@ -3159,7 +3206,7 @@ function createMigrationDiagnostic(diagnostic, source, decorator) {
|
|
|
3159
3206
|
return clone;
|
|
3160
3207
|
}
|
|
3161
3208
|
|
|
3162
|
-
// bazel-out/
|
|
3209
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/ngcc_trait_compiler.mjs
|
|
3163
3210
|
var NgccTraitCompiler = class extends TraitCompiler {
|
|
3164
3211
|
constructor(handlers, ngccReflector) {
|
|
3165
3212
|
super(handlers, ngccReflector, NOOP_PERF_RECORDER, new NoIncrementalBuild(), true, CompilationMode.FULL, new DtsTransformRegistry(), null);
|
|
@@ -3204,10 +3251,10 @@ var NoIncrementalBuild = class {
|
|
|
3204
3251
|
}
|
|
3205
3252
|
};
|
|
3206
3253
|
|
|
3207
|
-
// bazel-out/
|
|
3254
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/types.mjs
|
|
3208
3255
|
var DecorationAnalyses = Map;
|
|
3209
3256
|
|
|
3210
|
-
// bazel-out/
|
|
3257
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/decoration_analyzer.mjs
|
|
3211
3258
|
var NgccResourceLoader = class {
|
|
3212
3259
|
constructor(fs) {
|
|
3213
3260
|
this.fs = fs;
|
|
@@ -3363,8 +3410,8 @@ var DecorationAnalyzer = class {
|
|
|
3363
3410
|
}
|
|
3364
3411
|
};
|
|
3365
3412
|
|
|
3366
|
-
// bazel-out/
|
|
3367
|
-
import
|
|
3413
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/module_with_providers_analyzer.mjs
|
|
3414
|
+
import ts15 from "typescript";
|
|
3368
3415
|
var ModuleWithProvidersAnalyses = Map;
|
|
3369
3416
|
var ModuleWithProvidersAnalyzer = class {
|
|
3370
3417
|
constructor(host, typeChecker, referencesRegistry, processDts) {
|
|
@@ -3386,7 +3433,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3386
3433
|
if (this.processDts) {
|
|
3387
3434
|
const dtsFn = this.getDtsModuleWithProvidersFunction(fn);
|
|
3388
3435
|
const dtsFnType = dtsFn.declaration.type;
|
|
3389
|
-
const typeParam = dtsFnType &&
|
|
3436
|
+
const typeParam = dtsFnType && ts15.isTypeReferenceNode(dtsFnType) && dtsFnType.typeArguments && dtsFnType.typeArguments[0] || null;
|
|
3390
3437
|
if (!typeParam || isAnyKeyword(typeParam)) {
|
|
3391
3438
|
const dtsFile = dtsFn.declaration.getSourceFile();
|
|
3392
3439
|
const analysis = analyses.has(dtsFile) ? analyses.get(dtsFile) : [];
|
|
@@ -3431,7 +3478,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3431
3478
|
return infos;
|
|
3432
3479
|
}
|
|
3433
3480
|
parseForModuleWithProviders(name, node, implementation = node, container = null) {
|
|
3434
|
-
if (implementation === null || !
|
|
3481
|
+
if (implementation === null || !ts15.isFunctionDeclaration(implementation) && !ts15.isMethodDeclaration(implementation) && !ts15.isFunctionExpression(implementation)) {
|
|
3435
3482
|
return null;
|
|
3436
3483
|
}
|
|
3437
3484
|
const declaration = implementation;
|
|
@@ -3444,7 +3491,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3444
3491
|
return null;
|
|
3445
3492
|
}
|
|
3446
3493
|
const lastStatement = body[body.length - 1];
|
|
3447
|
-
if (!
|
|
3494
|
+
if (!ts15.isReturnStatement(lastStatement) || lastStatement.expression === void 0) {
|
|
3448
3495
|
return null;
|
|
3449
3496
|
}
|
|
3450
3497
|
const result = this.evaluator.evaluate(lastStatement.expression);
|
|
@@ -3466,7 +3513,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3466
3513
|
const containerClass = fn.container && this.host.getClassSymbol(fn.container);
|
|
3467
3514
|
if (containerClass) {
|
|
3468
3515
|
const dtsClass = this.host.getDtsDeclaration(containerClass.declaration.valueDeclaration);
|
|
3469
|
-
dtsFn = dtsClass &&
|
|
3516
|
+
dtsFn = dtsClass && ts15.isClassDeclaration(dtsClass) ? dtsClass.members.find((member) => ts15.isMethodDeclaration(member) && ts15.isIdentifier(member.name) && member.name.text === fn.name) : null;
|
|
3470
3517
|
} else {
|
|
3471
3518
|
dtsFn = this.host.getDtsDeclaration(fn.declaration);
|
|
3472
3519
|
}
|
|
@@ -3496,13 +3543,13 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3496
3543
|
}
|
|
3497
3544
|
};
|
|
3498
3545
|
function isFunctionOrMethod(declaration) {
|
|
3499
|
-
return
|
|
3546
|
+
return ts15.isFunctionDeclaration(declaration) || ts15.isMethodDeclaration(declaration);
|
|
3500
3547
|
}
|
|
3501
3548
|
function isAnyKeyword(typeParam) {
|
|
3502
|
-
return typeParam.kind ===
|
|
3549
|
+
return typeParam.kind === ts15.SyntaxKind.AnyKeyword;
|
|
3503
3550
|
}
|
|
3504
3551
|
|
|
3505
|
-
// bazel-out/
|
|
3552
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/ngcc_references_registry.mjs
|
|
3506
3553
|
var NgccReferencesRegistry = class {
|
|
3507
3554
|
constructor(host) {
|
|
3508
3555
|
this.host = host;
|
|
@@ -3523,7 +3570,7 @@ var NgccReferencesRegistry = class {
|
|
|
3523
3570
|
}
|
|
3524
3571
|
};
|
|
3525
3572
|
|
|
3526
|
-
// bazel-out/
|
|
3573
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/private_declarations_analyzer.mjs
|
|
3527
3574
|
var PrivateDeclarationsAnalyzer = class {
|
|
3528
3575
|
constructor(host, referencesRegistry) {
|
|
3529
3576
|
this.host = host;
|
|
@@ -3564,8 +3611,8 @@ var PrivateDeclarationsAnalyzer = class {
|
|
|
3564
3611
|
}
|
|
3565
3612
|
};
|
|
3566
3613
|
|
|
3567
|
-
// bazel-out/
|
|
3568
|
-
import
|
|
3614
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/commonjs_host.mjs
|
|
3615
|
+
import ts16 from "typescript";
|
|
3569
3616
|
var CommonJsReflectionHost = class extends Esm5ReflectionHost {
|
|
3570
3617
|
constructor(logger, isCore, src, dts = null) {
|
|
3571
3618
|
super(logger, isCore, src, dts);
|
|
@@ -3639,7 +3686,7 @@ var CommonJsReflectionHost = class extends Esm5ReflectionHost {
|
|
|
3639
3686
|
}
|
|
3640
3687
|
extractCommonJsWildcardReexports(statement, containingFile) {
|
|
3641
3688
|
const reexportArg = statement.expression.arguments[0];
|
|
3642
|
-
const requireCall = isRequireCall(reexportArg) ? reexportArg :
|
|
3689
|
+
const requireCall = isRequireCall(reexportArg) ? reexportArg : ts16.isIdentifier(reexportArg) ? findRequireCallReference(reexportArg, this.checker) : null;
|
|
3643
3690
|
if (requireCall === null) {
|
|
3644
3691
|
return [];
|
|
3645
3692
|
}
|
|
@@ -3722,13 +3769,13 @@ var CommonJsReflectionHost = class extends Esm5ReflectionHost {
|
|
|
3722
3769
|
const moduleInfo = this.compilerHost.resolveModuleNames([moduleName], containingFile.fileName, void 0, void 0, this.program.getCompilerOptions())[0];
|
|
3723
3770
|
return moduleInfo && this.program.getSourceFile(absoluteFrom(moduleInfo.resolvedFileName));
|
|
3724
3771
|
} else {
|
|
3725
|
-
const moduleInfo =
|
|
3772
|
+
const moduleInfo = ts16.resolveModuleName(moduleName, containingFile.fileName, this.program.getCompilerOptions(), this.compilerHost);
|
|
3726
3773
|
return moduleInfo.resolvedModule && this.program.getSourceFile(absoluteFrom(moduleInfo.resolvedModule.resolvedFileName));
|
|
3727
3774
|
}
|
|
3728
3775
|
}
|
|
3729
3776
|
};
|
|
3730
3777
|
|
|
3731
|
-
// bazel-out/
|
|
3778
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/delegating_host.mjs
|
|
3732
3779
|
var DelegatingReflectionHost = class {
|
|
3733
3780
|
constructor(tsHost, ngccHost) {
|
|
3734
3781
|
this.tsHost = tsHost;
|
|
@@ -3849,16 +3896,16 @@ var DelegatingReflectionHost = class {
|
|
|
3849
3896
|
}
|
|
3850
3897
|
};
|
|
3851
3898
|
|
|
3852
|
-
// bazel-out/
|
|
3899
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/commonjs_rendering_formatter.mjs
|
|
3900
|
+
import ts19 from "typescript";
|
|
3901
|
+
|
|
3902
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm5_rendering_formatter.mjs
|
|
3853
3903
|
import ts18 from "typescript";
|
|
3854
3904
|
|
|
3855
|
-
// bazel-out/
|
|
3905
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.mjs
|
|
3856
3906
|
import ts17 from "typescript";
|
|
3857
3907
|
|
|
3858
|
-
// bazel-out/
|
|
3859
|
-
import ts16 from "typescript";
|
|
3860
|
-
|
|
3861
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/ngcc_import_rewriter.mjs
|
|
3908
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/ngcc_import_rewriter.mjs
|
|
3862
3909
|
var NgccFlatImportRewriter = class {
|
|
3863
3910
|
shouldImportSymbol(symbol, specifier) {
|
|
3864
3911
|
if (specifier === "@angular/core") {
|
|
@@ -3879,7 +3926,7 @@ var NgccFlatImportRewriter = class {
|
|
|
3879
3926
|
}
|
|
3880
3927
|
};
|
|
3881
3928
|
|
|
3882
|
-
// bazel-out/
|
|
3929
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/utils.mjs
|
|
3883
3930
|
function getImportRewriter(r3SymbolsFile, isCore, isFlat) {
|
|
3884
3931
|
if (isCore && isFlat) {
|
|
3885
3932
|
return new NgccFlatImportRewriter();
|
|
@@ -3893,13 +3940,13 @@ function stripExtension2(filePath) {
|
|
|
3893
3940
|
return filePath.replace(/\.(js|d\.ts)$/, "");
|
|
3894
3941
|
}
|
|
3895
3942
|
|
|
3896
|
-
// bazel-out/
|
|
3943
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.mjs
|
|
3897
3944
|
var EsmRenderingFormatter = class {
|
|
3898
3945
|
constructor(fs, host, isCore) {
|
|
3899
3946
|
this.fs = fs;
|
|
3900
3947
|
this.host = host;
|
|
3901
3948
|
this.isCore = isCore;
|
|
3902
|
-
this.printer =
|
|
3949
|
+
this.printer = ts17.createPrinter({ newLine: ts17.NewLineKind.LineFeed });
|
|
3903
3950
|
}
|
|
3904
3951
|
addImports(output, imports, sf) {
|
|
3905
3952
|
if (imports.length === 0) {
|
|
@@ -3959,14 +4006,14 @@ export {${e.symbolName} as ${e.asAlias}} from '${e.fromModule}';`;
|
|
|
3959
4006
|
}
|
|
3960
4007
|
removeDecorators(output, decoratorsToRemove) {
|
|
3961
4008
|
decoratorsToRemove.forEach((nodesToRemove, containerNode) => {
|
|
3962
|
-
if (
|
|
4009
|
+
if (ts17.isArrayLiteralExpression(containerNode)) {
|
|
3963
4010
|
const items = containerNode.elements;
|
|
3964
4011
|
if (items.length === nodesToRemove.length) {
|
|
3965
4012
|
const statement = findStatement(containerNode);
|
|
3966
4013
|
if (statement) {
|
|
3967
|
-
if (
|
|
4014
|
+
if (ts17.isExpressionStatement(statement)) {
|
|
3968
4015
|
output.remove(statement.getFullStart(), statement.getEnd());
|
|
3969
|
-
} else if (
|
|
4016
|
+
} else if (ts17.isReturnStatement(statement) && statement.expression && isAssignment2(statement.expression)) {
|
|
3970
4017
|
const startOfRemoval = statement.expression.left.getEnd();
|
|
3971
4018
|
const endOfRemoval = getEndExceptSemicolon(statement);
|
|
3972
4019
|
output.remove(startOfRemoval, endOfRemoval);
|
|
@@ -3999,7 +4046,7 @@ export {${e.symbolName} as ${e.asAlias}} from '${e.fromModule}';`;
|
|
|
3999
4046
|
const importPath = info.ngModule.ownedByModuleGuess || (declarationFile !== ngModuleFile ? stripExtension2(relativeImport) : null);
|
|
4000
4047
|
const ngModule = generateImportString(importManager, importPath, ngModuleName);
|
|
4001
4048
|
if (info.declaration.type) {
|
|
4002
|
-
const typeName = info.declaration.type &&
|
|
4049
|
+
const typeName = info.declaration.type && ts17.isTypeReferenceNode(info.declaration.type) ? info.declaration.type.typeName : null;
|
|
4003
4050
|
if (this.isCoreModuleWithProvidersType(typeName)) {
|
|
4004
4051
|
outputText.overwrite(info.declaration.type.getStart(), info.declaration.type.getEnd(), `ModuleWithProviders<${ngModule}>`);
|
|
4005
4052
|
} else {
|
|
@@ -4008,32 +4055,32 @@ export {${e.symbolName} as ${e.asAlias}} from '${e.fromModule}';`;
|
|
|
4008
4055
|
}
|
|
4009
4056
|
} else {
|
|
4010
4057
|
const lastToken = info.declaration.getLastToken();
|
|
4011
|
-
const insertPoint = lastToken && lastToken.kind ===
|
|
4058
|
+
const insertPoint = lastToken && lastToken.kind === ts17.SyntaxKind.SemicolonToken ? lastToken.getStart() : info.declaration.getEnd();
|
|
4012
4059
|
outputText.appendLeft(insertPoint, `: ${generateImportString(importManager, "@angular/core", "ModuleWithProviders")}<${ngModule}>`);
|
|
4013
4060
|
}
|
|
4014
4061
|
});
|
|
4015
4062
|
}
|
|
4016
4063
|
printStatement(stmt, sourceFile, importManager) {
|
|
4017
4064
|
const node = translateStatement(stmt, importManager);
|
|
4018
|
-
const code = this.printer.printNode(
|
|
4065
|
+
const code = this.printer.printNode(ts17.EmitHint.Unspecified, node, sourceFile);
|
|
4019
4066
|
return code;
|
|
4020
4067
|
}
|
|
4021
4068
|
findEndOfImports(sf) {
|
|
4022
4069
|
for (const stmt of sf.statements) {
|
|
4023
|
-
if (!
|
|
4070
|
+
if (!ts17.isImportDeclaration(stmt) && !ts17.isImportEqualsDeclaration(stmt) && !ts17.isNamespaceImport(stmt)) {
|
|
4024
4071
|
return stmt.getStart();
|
|
4025
4072
|
}
|
|
4026
4073
|
}
|
|
4027
4074
|
return 0;
|
|
4028
4075
|
}
|
|
4029
4076
|
isCoreModuleWithProvidersType(typeName) {
|
|
4030
|
-
const id = typeName &&
|
|
4077
|
+
const id = typeName && ts17.isIdentifier(typeName) ? this.host.getImportOfIdentifier(typeName) : null;
|
|
4031
4078
|
return id && id.name === "ModuleWithProviders" && (this.isCore || id.from === "@angular/core");
|
|
4032
4079
|
}
|
|
4033
4080
|
};
|
|
4034
4081
|
function findStatement(node) {
|
|
4035
4082
|
while (node) {
|
|
4036
|
-
if (
|
|
4083
|
+
if (ts17.isExpressionStatement(node) || ts17.isReturnStatement(node)) {
|
|
4037
4084
|
return node;
|
|
4038
4085
|
}
|
|
4039
4086
|
node = node.parent;
|
|
@@ -4050,10 +4097,10 @@ function getNextSiblingInArray(node, array) {
|
|
|
4050
4097
|
}
|
|
4051
4098
|
function getEndExceptSemicolon(statement) {
|
|
4052
4099
|
const lastToken = statement.getLastToken();
|
|
4053
|
-
return lastToken && lastToken.kind ===
|
|
4100
|
+
return lastToken && lastToken.kind === ts17.SyntaxKind.SemicolonToken ? statement.getEnd() - 1 : statement.getEnd();
|
|
4054
4101
|
}
|
|
4055
4102
|
|
|
4056
|
-
// bazel-out/
|
|
4103
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm5_rendering_formatter.mjs
|
|
4057
4104
|
var Esm5RenderingFormatter = class extends EsmRenderingFormatter {
|
|
4058
4105
|
addDefinitions(output, compiledClass, definitions) {
|
|
4059
4106
|
const classSymbol = this.host.getClassSymbol(compiledClass.declaration);
|
|
@@ -4064,10 +4111,10 @@ Expected an ES5 IIFE wrapped function. But got:
|
|
|
4064
4111
|
}
|
|
4065
4112
|
const declarationStatement = getContainingStatement(classSymbol.implementation.valueDeclaration);
|
|
4066
4113
|
const iifeBody = declarationStatement.parent;
|
|
4067
|
-
if (!iifeBody || !
|
|
4114
|
+
if (!iifeBody || !ts18.isBlock(iifeBody)) {
|
|
4068
4115
|
throw new Error(`Compiled class declaration is not inside an IIFE: ${compiledClass.name} in ${compiledClass.declaration.getSourceFile().fileName}`);
|
|
4069
4116
|
}
|
|
4070
|
-
const returnStatement = iifeBody.statements.find(
|
|
4117
|
+
const returnStatement = iifeBody.statements.find(ts18.isReturnStatement);
|
|
4071
4118
|
if (!returnStatement) {
|
|
4072
4119
|
throw new Error(`Compiled class wrapper IIFE does not have a return statement: ${compiledClass.name} in ${compiledClass.declaration.getSourceFile().fileName}`);
|
|
4073
4120
|
}
|
|
@@ -4076,12 +4123,12 @@ Expected an ES5 IIFE wrapped function. But got:
|
|
|
4076
4123
|
}
|
|
4077
4124
|
printStatement(stmt, sourceFile, importManager) {
|
|
4078
4125
|
const node = translateStatement(stmt, importManager, { downlevelTaggedTemplates: true, downlevelVariableDeclarations: true });
|
|
4079
|
-
const code = this.printer.printNode(
|
|
4126
|
+
const code = this.printer.printNode(ts18.EmitHint.Unspecified, node, sourceFile);
|
|
4080
4127
|
return code;
|
|
4081
4128
|
}
|
|
4082
4129
|
};
|
|
4083
4130
|
|
|
4084
|
-
// bazel-out/
|
|
4131
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/commonjs_rendering_formatter.mjs
|
|
4085
4132
|
var CommonJsRenderingFormatter = class extends Esm5RenderingFormatter {
|
|
4086
4133
|
constructor(fs, commonJsHost, isCore) {
|
|
4087
4134
|
super(fs, commonJsHost, isCore);
|
|
@@ -4118,10 +4165,10 @@ exports.${e.asAlias} = ${importNamespace}${namedImport.symbol};`;
|
|
|
4118
4165
|
}
|
|
4119
4166
|
findEndOfImports(sf) {
|
|
4120
4167
|
for (const statement of sf.statements) {
|
|
4121
|
-
if (
|
|
4168
|
+
if (ts19.isExpressionStatement(statement) && isRequireCall(statement.expression)) {
|
|
4122
4169
|
continue;
|
|
4123
4170
|
}
|
|
4124
|
-
const declarations =
|
|
4171
|
+
const declarations = ts19.isVariableStatement(statement) ? Array.from(statement.declarationList.declarations) : [];
|
|
4125
4172
|
if (declarations.some((d) => !d.initializer || !isRequireCall(d.initializer))) {
|
|
4126
4173
|
return statement.getStart();
|
|
4127
4174
|
}
|
|
@@ -4130,15 +4177,15 @@ exports.${e.asAlias} = ${importNamespace}${namedImport.symbol};`;
|
|
|
4130
4177
|
}
|
|
4131
4178
|
};
|
|
4132
4179
|
|
|
4133
|
-
// bazel-out/
|
|
4180
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/dts_renderer.mjs
|
|
4134
4181
|
import MagicString from "magic-string";
|
|
4135
|
-
import
|
|
4182
|
+
import ts20 from "typescript";
|
|
4136
4183
|
|
|
4137
|
-
// bazel-out/
|
|
4184
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/constants.mjs
|
|
4138
4185
|
var IMPORT_PREFIX = "\u0275ngcc";
|
|
4139
4186
|
var NGCC_TIMED_OUT_EXIT_CODE = 177;
|
|
4140
4187
|
|
|
4141
|
-
// bazel-out/
|
|
4188
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/source_maps.mjs
|
|
4142
4189
|
import mapHelpers from "convert-source-map";
|
|
4143
4190
|
function renderSourceAndMap(logger, fs, sourceFile, generatedMagicString) {
|
|
4144
4191
|
var _a;
|
|
@@ -4173,7 +4220,7 @@ ${sourceMapComment}` },
|
|
|
4173
4220
|
}
|
|
4174
4221
|
}
|
|
4175
4222
|
|
|
4176
|
-
// bazel-out/
|
|
4223
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/dts_renderer.mjs
|
|
4177
4224
|
var DtsRenderInfo = class {
|
|
4178
4225
|
constructor() {
|
|
4179
4226
|
this.classInfo = [];
|
|
@@ -4203,14 +4250,14 @@ var DtsRenderer = class {
|
|
|
4203
4250
|
}
|
|
4204
4251
|
renderDtsFile(dtsFile, renderInfo) {
|
|
4205
4252
|
const outputText = new MagicString(dtsFile.text);
|
|
4206
|
-
const printer =
|
|
4253
|
+
const printer = ts20.createPrinter();
|
|
4207
4254
|
const importManager = new ImportManager(getImportRewriter(this.bundle.dts.r3SymbolsFile, this.bundle.isCore, false), IMPORT_PREFIX);
|
|
4208
4255
|
renderInfo.classInfo.forEach((dtsClass) => {
|
|
4209
4256
|
const endOfClass = dtsClass.dtsDeclaration.getEnd();
|
|
4210
4257
|
dtsClass.compilation.forEach((declaration) => {
|
|
4211
4258
|
const type = translateType(declaration.type, importManager);
|
|
4212
4259
|
markForEmitAsSingleLine(type);
|
|
4213
|
-
const typeStr = printer.printNode(
|
|
4260
|
+
const typeStr = printer.printNode(ts20.EmitHint.Unspecified, type, dtsFile);
|
|
4214
4261
|
const newStatement = ` static ${declaration.name}: ${typeStr};
|
|
4215
4262
|
`;
|
|
4216
4263
|
outputText.appendRight(endOfClass - 1, newStatement);
|
|
@@ -4270,18 +4317,18 @@ The simplest fix for this is to ensure that this class is exported from the pack
|
|
|
4270
4317
|
}
|
|
4271
4318
|
};
|
|
4272
4319
|
function markForEmitAsSingleLine(node) {
|
|
4273
|
-
|
|
4274
|
-
|
|
4320
|
+
ts20.setEmitFlags(node, ts20.EmitFlags.SingleLine);
|
|
4321
|
+
ts20.forEachChild(node, markForEmitAsSingleLine);
|
|
4275
4322
|
}
|
|
4276
4323
|
|
|
4277
|
-
// bazel-out/
|
|
4324
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/renderer.mjs
|
|
4278
4325
|
import { jsDocComment, WrappedNodeExpr, WritePropExpr } from "@angular/compiler";
|
|
4279
4326
|
import MagicString2 from "magic-string";
|
|
4280
4327
|
|
|
4281
|
-
// bazel-out/
|
|
4328
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/rendering_formatter.mjs
|
|
4282
4329
|
var RedundantDecoratorMap = Map;
|
|
4283
4330
|
|
|
4284
|
-
// bazel-out/
|
|
4331
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/renderer.mjs
|
|
4285
4332
|
var Renderer = class {
|
|
4286
4333
|
constructor(host, srcFormatter, fs, logger, bundle, tsConfig = null) {
|
|
4287
4334
|
this.host = host;
|
|
@@ -4384,8 +4431,8 @@ function createAssignmentStatement(receiverName, propName, initializer, leadingC
|
|
|
4384
4431
|
return statement;
|
|
4385
4432
|
}
|
|
4386
4433
|
|
|
4387
|
-
// bazel-out/
|
|
4388
|
-
import
|
|
4434
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/umd_rendering_formatter.mjs
|
|
4435
|
+
import ts21 from "typescript";
|
|
4389
4436
|
var UmdRenderingFormatter = class extends Esm5RenderingFormatter {
|
|
4390
4437
|
constructor(fs, umdHost, isCore) {
|
|
4391
4438
|
super(fs, umdHost, isCore);
|
|
@@ -4469,7 +4516,7 @@ function renderAmdDependencies(output, amdDefineCall, imports) {
|
|
|
4469
4516
|
const importString = imports.map((i) => `'${i.specifier}'`).join(",");
|
|
4470
4517
|
const factoryIndex = amdDefineCall.arguments.length - 1;
|
|
4471
4518
|
const dependencyArray = amdDefineCall.arguments[factoryIndex - 1];
|
|
4472
|
-
if (dependencyArray === void 0 || !
|
|
4519
|
+
if (dependencyArray === void 0 || !ts21.isArrayLiteralExpression(dependencyArray)) {
|
|
4473
4520
|
const injectionPoint = amdDefineCall.arguments[factoryIndex].getFullStart();
|
|
4474
4521
|
output.appendLeft(injectionPoint, `[${importString}],`);
|
|
4475
4522
|
} else {
|
|
@@ -4500,7 +4547,7 @@ function getGlobalIdentifier(i) {
|
|
|
4500
4547
|
return i.specifier.replace(/^@angular\//, "ng.").replace(/^@/, "").replace(/\//g, ".").replace(/[-_]+(.?)/g, (_, c) => c.toUpperCase()).replace(/^./, (c) => c.toLowerCase());
|
|
4501
4548
|
}
|
|
4502
4549
|
|
|
4503
|
-
// bazel-out/
|
|
4550
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/transformer.mjs
|
|
4504
4551
|
var Transformer = class {
|
|
4505
4552
|
constructor(fs, logger, tsConfig = null) {
|
|
4506
4553
|
this.fs = fs;
|
|
@@ -4578,10 +4625,10 @@ var Transformer = class {
|
|
|
4578
4625
|
}
|
|
4579
4626
|
};
|
|
4580
4627
|
function hasErrors(diagnostics) {
|
|
4581
|
-
return diagnostics.some((d) => d.category ===
|
|
4628
|
+
return diagnostics.some((d) => d.category === ts22.DiagnosticCategory.Error);
|
|
4582
4629
|
}
|
|
4583
4630
|
|
|
4584
|
-
// bazel-out/
|
|
4631
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/create_compile_function.mjs
|
|
4585
4632
|
function getCreateCompileFn(fileSystem, logger, fileWriter, enableI18nLegacyMessageIdFormat, tsConfig, pathMappings) {
|
|
4586
4633
|
return (beforeWritingFiles, onTaskCompleted) => {
|
|
4587
4634
|
const transformer = new Transformer(fileSystem, logger, tsConfig);
|
|
@@ -4602,7 +4649,7 @@ function getCreateCompileFn(fileSystem, logger, fileWriter, enableI18nLegacyMess
|
|
|
4602
4649
|
const result = transformer.transform(bundle);
|
|
4603
4650
|
if (result.success) {
|
|
4604
4651
|
if (result.diagnostics.length > 0) {
|
|
4605
|
-
logger.warn(replaceTsWithNgInErrors(
|
|
4652
|
+
logger.warn(replaceTsWithNgInErrors(ts23.formatDiagnosticsWithColorAndContext(result.diagnostics, bundle.src.host)));
|
|
4606
4653
|
}
|
|
4607
4654
|
const writeBundle = () => {
|
|
4608
4655
|
fileWriter.writeBundle(bundle, result.transformedFiles, formatPropertiesToMarkAsProcessed);
|
|
@@ -4612,7 +4659,7 @@ function getCreateCompileFn(fileSystem, logger, fileWriter, enableI18nLegacyMess
|
|
|
4612
4659
|
const beforeWritingResult = beforeWritingFiles(result.transformedFiles);
|
|
4613
4660
|
return beforeWritingResult instanceof Promise ? beforeWritingResult.then(writeBundle) : writeBundle();
|
|
4614
4661
|
} else {
|
|
4615
|
-
const errors = replaceTsWithNgInErrors(
|
|
4662
|
+
const errors = replaceTsWithNgInErrors(ts23.formatDiagnosticsWithColorAndContext(result.diagnostics, bundle.src.host));
|
|
4616
4663
|
onTaskCompleted(task, 1, `compilation errors:
|
|
4617
4664
|
${errors}`);
|
|
4618
4665
|
}
|
|
@@ -4620,10 +4667,10 @@ ${errors}`);
|
|
|
4620
4667
|
};
|
|
4621
4668
|
}
|
|
4622
4669
|
|
|
4623
|
-
// bazel-out/
|
|
4670
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/ngcc_options.mjs
|
|
4624
4671
|
import * as os from "os";
|
|
4625
4672
|
|
|
4626
|
-
// bazel-out/
|
|
4673
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/path_mappings.mjs
|
|
4627
4674
|
function getPathMappingsFromTsConfig(fs, tsConfig, projectPath) {
|
|
4628
4675
|
if (tsConfig !== null && tsConfig.options.baseUrl !== void 0 && tsConfig.options.paths !== void 0) {
|
|
4629
4676
|
return {
|
|
@@ -4633,7 +4680,7 @@ function getPathMappingsFromTsConfig(fs, tsConfig, projectPath) {
|
|
|
4633
4680
|
}
|
|
4634
4681
|
}
|
|
4635
4682
|
|
|
4636
|
-
// bazel-out/
|
|
4683
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/writing/in_place_file_writer.mjs
|
|
4637
4684
|
var NGCC_BACKUP_EXTENSION = ".__ivy_ngcc_bak";
|
|
4638
4685
|
var InPlaceFileWriter = class {
|
|
4639
4686
|
constructor(fs, logger, errorOnFailedEntryPoint) {
|
|
@@ -4682,7 +4729,7 @@ This error may be caused by one of the following:
|
|
|
4682
4729
|
}
|
|
4683
4730
|
};
|
|
4684
4731
|
|
|
4685
|
-
// bazel-out/
|
|
4732
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/writing/new_entry_point_file_writer.mjs
|
|
4686
4733
|
var NGCC_DIRECTORY = "__ivy_ngcc__";
|
|
4687
4734
|
var NGCC_PROPERTY_EXTENSION = "_ivy_ngcc";
|
|
4688
4735
|
var NewEntryPointFileWriter = class extends InPlaceFileWriter {
|
|
@@ -4790,7 +4837,7 @@ var NewEntryPointFileWriter = class extends InPlaceFileWriter {
|
|
|
4790
4837
|
}
|
|
4791
4838
|
};
|
|
4792
4839
|
|
|
4793
|
-
// bazel-out/
|
|
4840
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/ngcc_options.mjs
|
|
4794
4841
|
function getSharedSetup(options) {
|
|
4795
4842
|
const fileSystem = getFileSystem();
|
|
4796
4843
|
const absBasePath = absoluteFrom(options.basePath);
|
|
@@ -4866,7 +4913,7 @@ function getMaxNumberOfWorkers() {
|
|
|
4866
4913
|
return numericMaxWorkers;
|
|
4867
4914
|
}
|
|
4868
4915
|
|
|
4869
|
-
// bazel-out/
|
|
4916
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/tasks/utils.mjs
|
|
4870
4917
|
var stringifyTask = (task) => `{entryPoint: ${task.entryPoint.name}, formatProperty: ${task.formatProperty}, processDts: ${DtsProcessing[task.processDts]}}`;
|
|
4871
4918
|
function computeTaskDependencies(tasks, graph) {
|
|
4872
4919
|
const dependencies = new TaskDependencies();
|
|
@@ -4926,7 +4973,7 @@ function sortTasksByPriority(tasks, dependencies) {
|
|
|
4926
4973
|
});
|
|
4927
4974
|
}
|
|
4928
4975
|
|
|
4929
|
-
// bazel-out/
|
|
4976
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/cluster/utils.mjs
|
|
4930
4977
|
import cluster from "cluster";
|
|
4931
4978
|
var Deferred = class {
|
|
4932
4979
|
constructor() {
|
|
@@ -4960,7 +5007,7 @@ var sendMessageToWorker = (workerId, msg) => {
|
|
|
4960
5007
|
});
|
|
4961
5008
|
};
|
|
4962
5009
|
|
|
4963
|
-
// bazel-out/
|
|
5010
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/writing/package_json_updater.mjs
|
|
4964
5011
|
var PackageJsonUpdate = class {
|
|
4965
5012
|
constructor(writeChangesImpl) {
|
|
4966
5013
|
this.writeChangesImpl = writeChangesImpl;
|
|
@@ -5094,4 +5141,4 @@ export {
|
|
|
5094
5141
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5095
5142
|
* found in the LICENSE file at https://angular.io/license
|
|
5096
5143
|
*/
|
|
5097
|
-
//# sourceMappingURL=chunk-
|
|
5144
|
+
//# sourceMappingURL=chunk-XDGHBAZ6.js.map
|