@angular/compiler-cli 19.0.0-next.9 → 19.0.0-rc.1
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-UJ2J6WV4.js → chunk-37JMVF7H.js} +9 -7
- package/bundles/chunk-37JMVF7H.js.map +6 -0
- package/bundles/{chunk-3Z25BX6N.js → chunk-77D5CI2U.js} +19 -12
- package/bundles/chunk-77D5CI2U.js.map +6 -0
- package/bundles/{chunk-ZQ7CP635.js → chunk-AJPANXTD.js} +2 -2
- package/bundles/{chunk-U6J7NRJM.js → chunk-BQXOZNTE.js} +233 -102
- package/bundles/chunk-BQXOZNTE.js.map +6 -0
- package/bundles/{chunk-RT2QTF73.js → chunk-FKXFEX7K.js} +2 -1
- package/bundles/{chunk-RT2QTF73.js.map → chunk-FKXFEX7K.js.map} +1 -1
- package/bundles/{chunk-5W3ITOS7.js → chunk-FYHKIXOX.js} +2 -2
- package/bundles/{chunk-GCXHOI3T.js → chunk-HIY6A3BW.js} +896 -280
- package/bundles/chunk-HIY6A3BW.js.map +6 -0
- package/bundles/{chunk-JF4LKQQP.js → chunk-IZRNIUQB.js} +61 -24
- package/bundles/chunk-IZRNIUQB.js.map +6 -0
- package/bundles/{chunk-OSPR7JSU.js → chunk-KFTXE4DT.js} +115 -47
- package/bundles/chunk-KFTXE4DT.js.map +6 -0
- package/bundles/{chunk-XI2RTGAL.js → chunk-KPQ72R34.js} +9 -2
- package/bundles/{chunk-XP6IMCQP.js → chunk-LZMAR6SN.js} +3 -3
- package/bundles/{chunk-XSNUHRLJ.js → chunk-Q2WE7ECN.js} +8 -2
- package/bundles/{chunk-XSNUHRLJ.js.map → chunk-Q2WE7ECN.js.map} +1 -1
- package/bundles/index.js +15 -14
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +25 -25
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +7 -7
- package/bundles/src/bin/ng_xi18n.js +8 -8
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/util.d.ts +2 -1
- package/package.json +3 -3
- package/src/ngtsc/annotations/common/src/debug_info.d.ts +2 -1
- package/src/ngtsc/annotations/common/src/util.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/handler.d.ts +8 -3
- package/src/ngtsc/annotations/directive/src/handler.d.ts +2 -1
- package/src/ngtsc/annotations/directive/src/shared.d.ts +1 -1
- package/src/ngtsc/annotations/src/pipe.d.ts +2 -1
- package/src/ngtsc/core/src/compiler.d.ts +7 -0
- package/src/ngtsc/hmr/index.d.ts +9 -0
- package/src/ngtsc/hmr/src/extract_locals.d.ts +20 -0
- package/src/ngtsc/hmr/src/metadata.d.ts +23 -0
- package/src/ngtsc/hmr/src/update_declaration.d.ts +17 -0
- package/src/ngtsc/imports/src/core.d.ts +6 -0
- package/src/ngtsc/metadata/src/api.d.ts +5 -0
- package/src/ngtsc/metadata/src/util.d.ts +5 -2
- package/src/ngtsc/reflection/src/typescript.d.ts +6 -0
- package/src/ngtsc/transform/src/api.d.ts +4 -0
- package/src/ngtsc/transform/src/compilation.d.ts +1 -0
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +2 -2
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +2 -2
- package/src/ngtsc/util/src/path.d.ts +9 -0
- package/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.d.ts +5 -3
- package/bundles/chunk-3Z25BX6N.js.map +0 -6
- package/bundles/chunk-GCXHOI3T.js.map +0 -6
- package/bundles/chunk-JF4LKQQP.js.map +0 -6
- package/bundles/chunk-OSPR7JSU.js.map +0 -6
- package/bundles/chunk-U6J7NRJM.js.map +0 -6
- package/bundles/chunk-UJ2J6WV4.js.map +0 -6
- /package/bundles/{chunk-ZQ7CP635.js.map → chunk-AJPANXTD.js.map} +0 -0
- /package/bundles/{chunk-5W3ITOS7.js.map → chunk-FYHKIXOX.js.map} +0 -0
- /package/bundles/{chunk-XI2RTGAL.js.map → chunk-KPQ72R34.js.map} +0 -0
- /package/bundles/{chunk-XP6IMCQP.js.map → chunk-LZMAR6SN.js.map} +0 -0
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
ImportManager,
|
|
13
13
|
Reference,
|
|
14
14
|
TypeEmitter,
|
|
15
|
+
TypeEntityToDeclarationError,
|
|
15
16
|
addDiagnosticChain,
|
|
16
17
|
assertSuccessfulReferenceEmit,
|
|
17
18
|
attachDefaultImportDeclaration,
|
|
@@ -20,6 +21,7 @@ import {
|
|
|
20
21
|
entityNameToValue,
|
|
21
22
|
filterToMembersWithDecorator,
|
|
22
23
|
getDefaultImportDeclaration,
|
|
24
|
+
getProjectRelativePath,
|
|
23
25
|
getSourceFile,
|
|
24
26
|
getSourceFileOrNull,
|
|
25
27
|
getTokenAtPosition,
|
|
@@ -45,18 +47,21 @@ import {
|
|
|
45
47
|
translateStatement,
|
|
46
48
|
translateType,
|
|
47
49
|
typeNodeToValueExpr
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-KFTXE4DT.js";
|
|
49
51
|
import {
|
|
50
52
|
PerfCheckpoint,
|
|
51
53
|
PerfEvent,
|
|
52
54
|
PerfPhase
|
|
53
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-Q2WE7ECN.js";
|
|
54
56
|
import {
|
|
55
57
|
absoluteFrom,
|
|
56
58
|
absoluteFromSourceFile,
|
|
57
59
|
getSourceFileOrError,
|
|
58
60
|
relative
|
|
59
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-37JMVF7H.js";
|
|
62
|
+
import {
|
|
63
|
+
__publicField
|
|
64
|
+
} from "./chunk-KPQ72R34.js";
|
|
60
65
|
|
|
61
66
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
|
|
62
67
|
import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
|
|
@@ -263,7 +268,7 @@ function createSourceSpan(node) {
|
|
|
263
268
|
const parseSf = new ParseSourceFile(sf.getFullText(), sf.fileName);
|
|
264
269
|
return new ParseSourceSpan(new ParseLocation(parseSf, startOffset, startLine + 1, startCol + 1), new ParseLocation(parseSf, endOffset, endLine + 1, endCol + 1));
|
|
265
270
|
}
|
|
266
|
-
function compileResults(fac, def, metadataStmt, propName, additionalFields, deferrableImports, debugInfo = null) {
|
|
271
|
+
function compileResults(fac, def, metadataStmt, propName, additionalFields, deferrableImports, debugInfo = null, hmrInitializer = null) {
|
|
267
272
|
const statements = def.statements;
|
|
268
273
|
if (metadataStmt !== null) {
|
|
269
274
|
statements.push(metadataStmt);
|
|
@@ -271,6 +276,9 @@ function compileResults(fac, def, metadataStmt, propName, additionalFields, defe
|
|
|
271
276
|
if (debugInfo !== null) {
|
|
272
277
|
statements.push(debugInfo);
|
|
273
278
|
}
|
|
279
|
+
if (hmrInitializer !== null) {
|
|
280
|
+
statements.push(hmrInitializer);
|
|
281
|
+
}
|
|
274
282
|
const results = [
|
|
275
283
|
fac,
|
|
276
284
|
{
|
|
@@ -319,6 +327,9 @@ function isAbstractClassDeclaration(clazz) {
|
|
|
319
327
|
|
|
320
328
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
|
|
321
329
|
var DynamicValue = class {
|
|
330
|
+
node;
|
|
331
|
+
reason;
|
|
332
|
+
code;
|
|
322
333
|
constructor(node, reason, code) {
|
|
323
334
|
this.node = node;
|
|
324
335
|
this.reason = reason;
|
|
@@ -412,6 +423,8 @@ import ts2 from "typescript";
|
|
|
412
423
|
|
|
413
424
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
|
|
414
425
|
var ResolvedModule = class {
|
|
426
|
+
exports;
|
|
427
|
+
evaluate;
|
|
415
428
|
constructor(exports, evaluate) {
|
|
416
429
|
this.exports = exports;
|
|
417
430
|
this.evaluate = evaluate;
|
|
@@ -431,6 +444,9 @@ var ResolvedModule = class {
|
|
|
431
444
|
}
|
|
432
445
|
};
|
|
433
446
|
var EnumValue = class {
|
|
447
|
+
enumRef;
|
|
448
|
+
name;
|
|
449
|
+
resolved;
|
|
434
450
|
constructor(enumRef, name, resolved) {
|
|
435
451
|
this.enumRef = enumRef;
|
|
436
452
|
this.name = name;
|
|
@@ -442,6 +458,7 @@ var KnownFn = class {
|
|
|
442
458
|
|
|
443
459
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
|
|
444
460
|
var ArraySliceBuiltinFn = class extends KnownFn {
|
|
461
|
+
lhs;
|
|
445
462
|
constructor(lhs) {
|
|
446
463
|
super();
|
|
447
464
|
this.lhs = lhs;
|
|
@@ -455,6 +472,7 @@ var ArraySliceBuiltinFn = class extends KnownFn {
|
|
|
455
472
|
}
|
|
456
473
|
};
|
|
457
474
|
var ArrayConcatBuiltinFn = class extends KnownFn {
|
|
475
|
+
lhs;
|
|
458
476
|
constructor(lhs) {
|
|
459
477
|
super();
|
|
460
478
|
this.lhs = lhs;
|
|
@@ -474,6 +492,7 @@ var ArrayConcatBuiltinFn = class extends KnownFn {
|
|
|
474
492
|
}
|
|
475
493
|
};
|
|
476
494
|
var StringConcatBuiltinFn = class extends KnownFn {
|
|
495
|
+
lhs;
|
|
477
496
|
constructor(lhs) {
|
|
478
497
|
super();
|
|
479
498
|
this.lhs = lhs;
|
|
@@ -494,6 +513,7 @@ var StringConcatBuiltinFn = class extends KnownFn {
|
|
|
494
513
|
|
|
495
514
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
|
|
496
515
|
var SyntheticValue = class {
|
|
516
|
+
value;
|
|
497
517
|
constructor(value) {
|
|
498
518
|
this.value = value;
|
|
499
519
|
}
|
|
@@ -537,6 +557,9 @@ var UNARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
|
537
557
|
[ts2.SyntaxKind.ExclamationToken, (a) => !a]
|
|
538
558
|
]);
|
|
539
559
|
var StaticInterpreter = class {
|
|
560
|
+
host;
|
|
561
|
+
checker;
|
|
562
|
+
dependencyTracker;
|
|
540
563
|
constructor(host, checker, dependencyTracker) {
|
|
541
564
|
this.host = host;
|
|
542
565
|
this.checker = checker;
|
|
@@ -950,11 +973,11 @@ var StaticInterpreter = class {
|
|
|
950
973
|
}
|
|
951
974
|
}
|
|
952
975
|
visitBindingElement(node, context) {
|
|
953
|
-
const
|
|
976
|
+
const path = [];
|
|
954
977
|
let closestDeclaration = node;
|
|
955
978
|
while (ts2.isBindingElement(closestDeclaration) || ts2.isArrayBindingPattern(closestDeclaration) || ts2.isObjectBindingPattern(closestDeclaration)) {
|
|
956
979
|
if (ts2.isBindingElement(closestDeclaration)) {
|
|
957
|
-
|
|
980
|
+
path.unshift(closestDeclaration);
|
|
958
981
|
}
|
|
959
982
|
closestDeclaration = closestDeclaration.parent;
|
|
960
983
|
}
|
|
@@ -962,7 +985,7 @@ var StaticInterpreter = class {
|
|
|
962
985
|
return DynamicValue.fromUnknown(node);
|
|
963
986
|
}
|
|
964
987
|
let value = this.visit(closestDeclaration.initializer, context);
|
|
965
|
-
for (const element of
|
|
988
|
+
for (const element of path) {
|
|
966
989
|
let key;
|
|
967
990
|
if (ts2.isArrayBindingPattern(element.parent)) {
|
|
968
991
|
key = element.parent.elements.indexOf(element);
|
|
@@ -1079,6 +1102,9 @@ function owningModule(context, override = null) {
|
|
|
1079
1102
|
|
|
1080
1103
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
|
|
1081
1104
|
var PartialEvaluator = class {
|
|
1105
|
+
host;
|
|
1106
|
+
checker;
|
|
1107
|
+
dependencyTracker;
|
|
1082
1108
|
constructor(host, checker, dependencyTracker) {
|
|
1083
1109
|
this.host = host;
|
|
1084
1110
|
this.checker = checker;
|
|
@@ -1145,9 +1171,10 @@ function traceDynamicValue(node, value) {
|
|
|
1145
1171
|
return value.accept(new TraceDynamicValueVisitor(node));
|
|
1146
1172
|
}
|
|
1147
1173
|
var TraceDynamicValueVisitor = class {
|
|
1174
|
+
node;
|
|
1175
|
+
currentContainerNode = null;
|
|
1148
1176
|
constructor(node) {
|
|
1149
1177
|
this.node = node;
|
|
1150
|
-
this.currentContainerNode = null;
|
|
1151
1178
|
}
|
|
1152
1179
|
visitDynamicInput(value) {
|
|
1153
1180
|
const trace = value.reason.accept(this);
|
|
@@ -1442,6 +1469,8 @@ import ts6 from "typescript";
|
|
|
1442
1469
|
|
|
1443
1470
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
|
|
1444
1471
|
var ClassPropertyMapping = class {
|
|
1472
|
+
forwardMap;
|
|
1473
|
+
reverseMap;
|
|
1445
1474
|
constructor(forwardMap) {
|
|
1446
1475
|
this.forwardMap = forwardMap;
|
|
1447
1476
|
this.reverseMap = reverseMapFromForwardMap(forwardMap);
|
|
@@ -1524,18 +1553,37 @@ function reverseMapFromForwardMap(forwardMap) {
|
|
|
1524
1553
|
import ts5 from "typescript";
|
|
1525
1554
|
function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
1526
1555
|
if (!ts5.isTupleTypeNode(def)) {
|
|
1527
|
-
return [];
|
|
1556
|
+
return { result: [], isIncomplete: false };
|
|
1528
1557
|
}
|
|
1529
|
-
|
|
1558
|
+
const result = [];
|
|
1559
|
+
let isIncomplete = false;
|
|
1560
|
+
for (const element of def.elements) {
|
|
1530
1561
|
if (!ts5.isTypeQueryNode(element)) {
|
|
1531
1562
|
throw new Error(`Expected TypeQueryNode: ${nodeDebugInfo(element)}`);
|
|
1532
1563
|
}
|
|
1533
|
-
|
|
1534
|
-
|
|
1564
|
+
const ref = extraReferenceFromTypeQuery(checker, element, def, bestGuessOwningModule);
|
|
1565
|
+
if (ref === null) {
|
|
1566
|
+
isIncomplete = true;
|
|
1567
|
+
} else {
|
|
1568
|
+
result.push(ref);
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
return { result, isIncomplete };
|
|
1535
1572
|
}
|
|
1536
1573
|
function extraReferenceFromTypeQuery(checker, typeNode, origin, bestGuessOwningModule) {
|
|
1537
1574
|
const type = typeNode.exprName;
|
|
1538
|
-
|
|
1575
|
+
let node;
|
|
1576
|
+
let from;
|
|
1577
|
+
try {
|
|
1578
|
+
const result = reflectTypeEntityToDeclaration(type, checker);
|
|
1579
|
+
node = result.node;
|
|
1580
|
+
from = result.from;
|
|
1581
|
+
} catch (e) {
|
|
1582
|
+
if (e instanceof TypeEntityToDeclarationError) {
|
|
1583
|
+
return null;
|
|
1584
|
+
}
|
|
1585
|
+
throw e;
|
|
1586
|
+
}
|
|
1539
1587
|
if (!isNamedClassDeclaration(node)) {
|
|
1540
1588
|
throw new Error(`Expected named ClassDeclaration: ${nodeDebugInfo(node)}`);
|
|
1541
1589
|
}
|
|
@@ -1670,6 +1718,7 @@ function extractCoercedInput(member) {
|
|
|
1670
1718
|
return afterUnderscore(member.name);
|
|
1671
1719
|
}
|
|
1672
1720
|
var CompoundMetadataReader = class {
|
|
1721
|
+
readers;
|
|
1673
1722
|
constructor(readers) {
|
|
1674
1723
|
this.readers = readers;
|
|
1675
1724
|
}
|
|
@@ -1718,6 +1767,8 @@ function isHostDirectiveMetaForGlobalMode(hostDirectiveMeta) {
|
|
|
1718
1767
|
|
|
1719
1768
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1720
1769
|
var DtsMetadataReader = class {
|
|
1770
|
+
checker;
|
|
1771
|
+
reflector;
|
|
1721
1772
|
constructor(checker, reflector) {
|
|
1722
1773
|
this.checker = checker;
|
|
1723
1774
|
this.reflector = reflector;
|
|
@@ -1731,12 +1782,17 @@ var DtsMetadataReader = class {
|
|
|
1731
1782
|
return null;
|
|
1732
1783
|
}
|
|
1733
1784
|
const [_, declarationMetadata, importMetadata, exportMetadata] = ngModuleDef.type.typeArguments;
|
|
1785
|
+
const declarations = extractReferencesFromType(this.checker, declarationMetadata, ref.bestGuessOwningModule);
|
|
1786
|
+
const exports = extractReferencesFromType(this.checker, exportMetadata, ref.bestGuessOwningModule);
|
|
1787
|
+
const imports = extractReferencesFromType(this.checker, importMetadata, ref.bestGuessOwningModule);
|
|
1788
|
+
const isPoisoned = exports.isIncomplete;
|
|
1734
1789
|
return {
|
|
1735
1790
|
kind: MetaKind.NgModule,
|
|
1736
1791
|
ref,
|
|
1737
|
-
declarations:
|
|
1738
|
-
|
|
1739
|
-
|
|
1792
|
+
declarations: declarations.result,
|
|
1793
|
+
isPoisoned,
|
|
1794
|
+
exports: exports.result,
|
|
1795
|
+
imports: imports.result,
|
|
1740
1796
|
schemas: [],
|
|
1741
1797
|
rawDeclarations: null,
|
|
1742
1798
|
rawImports: null,
|
|
@@ -1746,7 +1802,7 @@ var DtsMetadataReader = class {
|
|
|
1746
1802
|
};
|
|
1747
1803
|
}
|
|
1748
1804
|
getDirectiveMetadata(ref) {
|
|
1749
|
-
var _a, _b;
|
|
1805
|
+
var _a, _b, _c;
|
|
1750
1806
|
const clazz = ref.node;
|
|
1751
1807
|
const def = this.reflector.getMembersOfClass(clazz).find((field) => field.isStatic && (field.name === "\u0275cmp" || field.name === "\u0275dir"));
|
|
1752
1808
|
if (def === void 0) {
|
|
@@ -1765,6 +1821,7 @@ var DtsMetadataReader = class {
|
|
|
1765
1821
|
const outputs = ClassPropertyMapping.fromMappedObject(readMapType(def.type.typeArguments[4], readStringType));
|
|
1766
1822
|
const hostDirectives = def.type.typeArguments.length > 8 ? readHostDirectivesType(this.checker, def.type.typeArguments[8], ref.bestGuessOwningModule) : null;
|
|
1767
1823
|
const isSignal = def.type.typeArguments.length > 9 && ((_b = readBooleanType(def.type.typeArguments[9])) != null ? _b : false);
|
|
1824
|
+
const isPoisoned = hostDirectives !== null && (hostDirectives == null ? void 0 : hostDirectives.isIncomplete);
|
|
1768
1825
|
return {
|
|
1769
1826
|
kind: MetaKind.Directive,
|
|
1770
1827
|
matchSource: MatchSource.Selector,
|
|
@@ -1775,11 +1832,11 @@ var DtsMetadataReader = class {
|
|
|
1775
1832
|
exportAs: readStringArrayType(def.type.typeArguments[2]),
|
|
1776
1833
|
inputs,
|
|
1777
1834
|
outputs,
|
|
1778
|
-
hostDirectives,
|
|
1835
|
+
hostDirectives: (_c = hostDirectives == null ? void 0 : hostDirectives.result) != null ? _c : null,
|
|
1779
1836
|
queries: readStringArrayType(def.type.typeArguments[5]),
|
|
1780
1837
|
...extractDirectiveTypeCheckMeta(clazz, inputs, this.reflector),
|
|
1781
1838
|
baseClass: readBaseClass2(clazz, this.checker, this.reflector),
|
|
1782
|
-
isPoisoned
|
|
1839
|
+
isPoisoned,
|
|
1783
1840
|
isStructural,
|
|
1784
1841
|
animationTriggerNames: null,
|
|
1785
1842
|
ngContentSelectors,
|
|
@@ -1884,21 +1941,27 @@ function readHostDirectivesType(checker, type, bestGuessOwningModule) {
|
|
|
1884
1941
|
return null;
|
|
1885
1942
|
}
|
|
1886
1943
|
const result = [];
|
|
1944
|
+
let isIncomplete = false;
|
|
1887
1945
|
for (const hostDirectiveType of type.elements) {
|
|
1888
1946
|
const { directive, inputs, outputs } = readMapType(hostDirectiveType, (type2) => type2);
|
|
1889
1947
|
if (directive) {
|
|
1890
1948
|
if (!ts6.isTypeQueryNode(directive)) {
|
|
1891
1949
|
throw new Error(`Expected TypeQueryNode: ${nodeDebugInfo(directive)}`);
|
|
1892
1950
|
}
|
|
1951
|
+
const ref = extraReferenceFromTypeQuery(checker, directive, type, bestGuessOwningModule);
|
|
1952
|
+
if (ref === null) {
|
|
1953
|
+
isIncomplete = true;
|
|
1954
|
+
continue;
|
|
1955
|
+
}
|
|
1893
1956
|
result.push({
|
|
1894
|
-
directive:
|
|
1957
|
+
directive: ref,
|
|
1895
1958
|
isForwardReference: false,
|
|
1896
1959
|
inputs: readMapType(inputs, readStringType),
|
|
1897
1960
|
outputs: readMapType(outputs, readStringType)
|
|
1898
1961
|
});
|
|
1899
1962
|
}
|
|
1900
1963
|
}
|
|
1901
|
-
return result.length > 0 ? result : null;
|
|
1964
|
+
return result.length > 0 ? { result, isIncomplete } : null;
|
|
1902
1965
|
}
|
|
1903
1966
|
|
|
1904
1967
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
|
|
@@ -1967,11 +2030,9 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
1967
2030
|
|
|
1968
2031
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
|
|
1969
2032
|
var LocalMetadataRegistry = class {
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
this.pipes = /* @__PURE__ */ new Map();
|
|
1974
|
-
}
|
|
2033
|
+
directives = /* @__PURE__ */ new Map();
|
|
2034
|
+
ngModules = /* @__PURE__ */ new Map();
|
|
2035
|
+
pipes = /* @__PURE__ */ new Map();
|
|
1975
2036
|
getDirectiveMetadata(ref) {
|
|
1976
2037
|
return this.directives.has(ref.node) ? this.directives.get(ref.node) : null;
|
|
1977
2038
|
}
|
|
@@ -2002,6 +2063,7 @@ var LocalMetadataRegistry = class {
|
|
|
2002
2063
|
}
|
|
2003
2064
|
};
|
|
2004
2065
|
var CompoundMetadataRegistry = class {
|
|
2066
|
+
registries;
|
|
2005
2067
|
constructor(registries) {
|
|
2006
2068
|
this.registries = registries;
|
|
2007
2069
|
}
|
|
@@ -2024,12 +2086,10 @@ var CompoundMetadataRegistry = class {
|
|
|
2024
2086
|
|
|
2025
2087
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
|
|
2026
2088
|
var ResourceRegistry = class {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
this.externalStyleToComponentsMap = /* @__PURE__ */ new Map();
|
|
2032
|
-
}
|
|
2089
|
+
externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
|
|
2090
|
+
componentToTemplateMap = /* @__PURE__ */ new Map();
|
|
2091
|
+
componentToStylesMap = /* @__PURE__ */ new Map();
|
|
2092
|
+
externalStyleToComponentsMap = /* @__PURE__ */ new Map();
|
|
2033
2093
|
getComponentsWithTemplate(template) {
|
|
2034
2094
|
if (!this.externalTemplateToComponentsMap.has(template)) {
|
|
2035
2095
|
return /* @__PURE__ */ new Set();
|
|
@@ -2045,12 +2105,12 @@ var ResourceRegistry = class {
|
|
|
2045
2105
|
}
|
|
2046
2106
|
}
|
|
2047
2107
|
registerTemplate(templateResource, component) {
|
|
2048
|
-
const { path
|
|
2049
|
-
if (
|
|
2050
|
-
if (!this.externalTemplateToComponentsMap.has(
|
|
2051
|
-
this.externalTemplateToComponentsMap.set(
|
|
2108
|
+
const { path } = templateResource;
|
|
2109
|
+
if (path !== null) {
|
|
2110
|
+
if (!this.externalTemplateToComponentsMap.has(path)) {
|
|
2111
|
+
this.externalTemplateToComponentsMap.set(path, /* @__PURE__ */ new Set());
|
|
2052
2112
|
}
|
|
2053
|
-
this.externalTemplateToComponentsMap.get(
|
|
2113
|
+
this.externalTemplateToComponentsMap.get(path).add(component);
|
|
2054
2114
|
}
|
|
2055
2115
|
this.componentToTemplateMap.set(component, templateResource);
|
|
2056
2116
|
}
|
|
@@ -2061,15 +2121,15 @@ var ResourceRegistry = class {
|
|
|
2061
2121
|
return this.componentToTemplateMap.get(component);
|
|
2062
2122
|
}
|
|
2063
2123
|
registerStyle(styleResource, component) {
|
|
2064
|
-
const { path
|
|
2124
|
+
const { path } = styleResource;
|
|
2065
2125
|
if (!this.componentToStylesMap.has(component)) {
|
|
2066
2126
|
this.componentToStylesMap.set(component, /* @__PURE__ */ new Set());
|
|
2067
2127
|
}
|
|
2068
|
-
if (
|
|
2069
|
-
if (!this.externalStyleToComponentsMap.has(
|
|
2070
|
-
this.externalStyleToComponentsMap.set(
|
|
2128
|
+
if (path !== null) {
|
|
2129
|
+
if (!this.externalStyleToComponentsMap.has(path)) {
|
|
2130
|
+
this.externalStyleToComponentsMap.set(path, /* @__PURE__ */ new Set());
|
|
2071
2131
|
}
|
|
2072
|
-
this.externalStyleToComponentsMap.get(
|
|
2132
|
+
this.externalStyleToComponentsMap.get(path).add(component);
|
|
2073
2133
|
}
|
|
2074
2134
|
this.componentToStylesMap.get(component).add(styleResource);
|
|
2075
2135
|
}
|
|
@@ -2089,9 +2149,10 @@ var ResourceRegistry = class {
|
|
|
2089
2149
|
|
|
2090
2150
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
|
|
2091
2151
|
var ExportedProviderStatusResolver = class {
|
|
2152
|
+
metaReader;
|
|
2153
|
+
calculating = /* @__PURE__ */ new Set();
|
|
2092
2154
|
constructor(metaReader) {
|
|
2093
2155
|
this.metaReader = metaReader;
|
|
2094
|
-
this.calculating = /* @__PURE__ */ new Set();
|
|
2095
2156
|
}
|
|
2096
2157
|
mayExportProviders(ref, dependencyCallback) {
|
|
2097
2158
|
var _a;
|
|
@@ -2134,9 +2195,10 @@ var ExportedProviderStatusResolver = class {
|
|
|
2134
2195
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
|
|
2135
2196
|
var EMPTY_ARRAY = [];
|
|
2136
2197
|
var HostDirectivesResolver = class {
|
|
2198
|
+
metaReader;
|
|
2199
|
+
cache = /* @__PURE__ */ new Map();
|
|
2137
2200
|
constructor(metaReader) {
|
|
2138
2201
|
this.metaReader = metaReader;
|
|
2139
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
2140
2202
|
}
|
|
2141
2203
|
resolve(metadata) {
|
|
2142
2204
|
if (this.cache.has(metadata.ref.node)) {
|
|
@@ -2251,14 +2313,16 @@ var Trait = {
|
|
|
2251
2313
|
pending: (handler, detected) => TraitImpl.pending(handler, detected)
|
|
2252
2314
|
};
|
|
2253
2315
|
var TraitImpl = class {
|
|
2316
|
+
state = TraitState.Pending;
|
|
2317
|
+
handler;
|
|
2318
|
+
detected;
|
|
2319
|
+
analysis = null;
|
|
2320
|
+
symbol = null;
|
|
2321
|
+
resolution = null;
|
|
2322
|
+
analysisDiagnostics = null;
|
|
2323
|
+
resolveDiagnostics = null;
|
|
2324
|
+
typeCheckDiagnostics = null;
|
|
2254
2325
|
constructor(handler, detected) {
|
|
2255
|
-
this.state = TraitState.Pending;
|
|
2256
|
-
this.analysis = null;
|
|
2257
|
-
this.symbol = null;
|
|
2258
|
-
this.resolution = null;
|
|
2259
|
-
this.analysisDiagnostics = null;
|
|
2260
|
-
this.resolveDiagnostics = null;
|
|
2261
|
-
this.typeCheckDiagnostics = null;
|
|
2262
2326
|
this.handler = handler;
|
|
2263
2327
|
this.detected = detected;
|
|
2264
2328
|
}
|
|
@@ -2298,6 +2362,20 @@ var TraitImpl = class {
|
|
|
2298
2362
|
|
|
2299
2363
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
2300
2364
|
var TraitCompiler = class {
|
|
2365
|
+
handlers;
|
|
2366
|
+
reflector;
|
|
2367
|
+
perf;
|
|
2368
|
+
incrementalBuild;
|
|
2369
|
+
compileNonExportedClasses;
|
|
2370
|
+
compilationMode;
|
|
2371
|
+
dtsTransforms;
|
|
2372
|
+
semanticDepGraphUpdater;
|
|
2373
|
+
sourceFileTypeIdentifier;
|
|
2374
|
+
classes = /* @__PURE__ */ new Map();
|
|
2375
|
+
fileToClasses = /* @__PURE__ */ new Map();
|
|
2376
|
+
filesWithoutTraits = /* @__PURE__ */ new Set();
|
|
2377
|
+
reexportMap = /* @__PURE__ */ new Map();
|
|
2378
|
+
handlersByName = /* @__PURE__ */ new Map();
|
|
2301
2379
|
constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
|
|
2302
2380
|
this.handlers = handlers;
|
|
2303
2381
|
this.reflector = reflector;
|
|
@@ -2308,11 +2386,6 @@ var TraitCompiler = class {
|
|
|
2308
2386
|
this.dtsTransforms = dtsTransforms;
|
|
2309
2387
|
this.semanticDepGraphUpdater = semanticDepGraphUpdater;
|
|
2310
2388
|
this.sourceFileTypeIdentifier = sourceFileTypeIdentifier;
|
|
2311
|
-
this.classes = /* @__PURE__ */ new Map();
|
|
2312
|
-
this.fileToClasses = /* @__PURE__ */ new Map();
|
|
2313
|
-
this.filesWithoutTraits = /* @__PURE__ */ new Set();
|
|
2314
|
-
this.reexportMap = /* @__PURE__ */ new Map();
|
|
2315
|
-
this.handlersByName = /* @__PURE__ */ new Map();
|
|
2316
2389
|
for (const handler of handlers) {
|
|
2317
2390
|
this.handlersByName.set(handler.name, handler);
|
|
2318
2391
|
}
|
|
@@ -2711,6 +2784,19 @@ var TraitCompiler = class {
|
|
|
2711
2784
|
this.dtsTransforms.getIvyDeclarationTransform(original.getSourceFile()).addFields(original, res);
|
|
2712
2785
|
return res.length > 0 ? res : null;
|
|
2713
2786
|
}
|
|
2787
|
+
compileHmrUpdateCallback(clazz) {
|
|
2788
|
+
const original = ts8.getOriginalNode(clazz);
|
|
2789
|
+
if (!this.reflector.isClass(clazz) || !this.reflector.isClass(original) || !this.classes.has(original)) {
|
|
2790
|
+
return null;
|
|
2791
|
+
}
|
|
2792
|
+
const record = this.classes.get(original);
|
|
2793
|
+
for (const trait of record.traits) {
|
|
2794
|
+
if (trait.state === TraitState.Resolved && trait.handler.compileHmrUpdateDeclaration !== void 0 && !containsErrors(trait.analysisDiagnostics) && !containsErrors(trait.resolveDiagnostics)) {
|
|
2795
|
+
return trait.handler.compileHmrUpdateDeclaration(clazz, trait.analysis, trait.resolution);
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
return null;
|
|
2799
|
+
}
|
|
2714
2800
|
decoratorsFor(node) {
|
|
2715
2801
|
const original = ts8.getOriginalNode(node);
|
|
2716
2802
|
if (!this.reflector.isClass(original) || !this.classes.has(original)) {
|
|
@@ -2758,9 +2844,7 @@ function containsErrors(diagnostics) {
|
|
|
2758
2844
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
2759
2845
|
import ts9 from "typescript";
|
|
2760
2846
|
var DtsTransformRegistry = class {
|
|
2761
|
-
|
|
2762
|
-
this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
2763
|
-
}
|
|
2847
|
+
ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
2764
2848
|
getIvyDeclarationTransform(sf) {
|
|
2765
2849
|
if (!this.ivyDeclarationTransforms.has(sf)) {
|
|
2766
2850
|
this.ivyDeclarationTransforms.set(sf, new IvyDeclarationDtsTransform());
|
|
@@ -2796,6 +2880,10 @@ function declarationTransformFactory(transformRegistry, reflector, refEmitter, i
|
|
|
2796
2880
|
};
|
|
2797
2881
|
}
|
|
2798
2882
|
var DtsTransformer = class {
|
|
2883
|
+
ctx;
|
|
2884
|
+
reflector;
|
|
2885
|
+
refEmitter;
|
|
2886
|
+
importRewriter;
|
|
2799
2887
|
constructor(ctx, reflector, refEmitter, importRewriter) {
|
|
2800
2888
|
this.ctx = ctx;
|
|
2801
2889
|
this.reflector = reflector;
|
|
@@ -2866,9 +2954,7 @@ var DtsTransformer = class {
|
|
|
2866
2954
|
}
|
|
2867
2955
|
};
|
|
2868
2956
|
var IvyDeclarationDtsTransform = class {
|
|
2869
|
-
|
|
2870
|
-
this.declarationFields = /* @__PURE__ */ new Map();
|
|
2871
|
-
}
|
|
2957
|
+
declarationFields = /* @__PURE__ */ new Map();
|
|
2872
2958
|
addFields(decl, fields) {
|
|
2873
2959
|
this.declarationFields.set(decl, fields);
|
|
2874
2960
|
}
|
|
@@ -2915,10 +3001,8 @@ function visit(node, visitor, context) {
|
|
|
2915
3001
|
return visitor._visit(node, context);
|
|
2916
3002
|
}
|
|
2917
3003
|
var Visitor = class {
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
this._after = /* @__PURE__ */ new Map();
|
|
2921
|
-
}
|
|
3004
|
+
_before = /* @__PURE__ */ new Map();
|
|
3005
|
+
_after = /* @__PURE__ */ new Map();
|
|
2922
3006
|
_visitListEntryNode(node, visitor) {
|
|
2923
3007
|
const result = visitor(node);
|
|
2924
3008
|
if (result.before !== void 0) {
|
|
@@ -2982,12 +3066,14 @@ function ivyTransformFactory(compilation, reflector, importRewriter, defaultImpo
|
|
|
2982
3066
|
};
|
|
2983
3067
|
}
|
|
2984
3068
|
var IvyCompilationVisitor = class extends Visitor {
|
|
3069
|
+
compilation;
|
|
3070
|
+
constantPool;
|
|
3071
|
+
classCompilationMap = /* @__PURE__ */ new Map();
|
|
3072
|
+
deferrableImports = /* @__PURE__ */ new Set();
|
|
2985
3073
|
constructor(compilation, constantPool) {
|
|
2986
3074
|
super();
|
|
2987
3075
|
this.compilation = compilation;
|
|
2988
3076
|
this.constantPool = constantPool;
|
|
2989
|
-
this.classCompilationMap = /* @__PURE__ */ new Map();
|
|
2990
|
-
this.deferrableImports = /* @__PURE__ */ new Set();
|
|
2991
3077
|
}
|
|
2992
3078
|
visitClassDeclaration(node) {
|
|
2993
3079
|
const result = this.compilation.compile(node, this.constantPool);
|
|
@@ -3003,6 +3089,14 @@ var IvyCompilationVisitor = class extends Visitor {
|
|
|
3003
3089
|
}
|
|
3004
3090
|
};
|
|
3005
3091
|
var IvyTransformationVisitor = class extends Visitor {
|
|
3092
|
+
compilation;
|
|
3093
|
+
classCompilationMap;
|
|
3094
|
+
reflector;
|
|
3095
|
+
importManager;
|
|
3096
|
+
recordWrappedNodeExpr;
|
|
3097
|
+
isClosureCompilerEnabled;
|
|
3098
|
+
isCore;
|
|
3099
|
+
deferrableImports;
|
|
3006
3100
|
constructor(compilation, classCompilationMap, reflector, importManager, recordWrappedNodeExpr, isClosureCompilerEnabled, isCore, deferrableImports) {
|
|
3007
3101
|
super();
|
|
3008
3102
|
this.compilation = compilation;
|
|
@@ -3491,10 +3585,12 @@ function compileDeclareFactory(metadata) {
|
|
|
3491
3585
|
|
|
3492
3586
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
|
|
3493
3587
|
var InjectableClassRegistry = class {
|
|
3588
|
+
host;
|
|
3589
|
+
isCore;
|
|
3590
|
+
classes = /* @__PURE__ */ new Map();
|
|
3494
3591
|
constructor(host, isCore) {
|
|
3495
3592
|
this.host = host;
|
|
3496
3593
|
this.isCore = isCore;
|
|
3497
|
-
this.classes = /* @__PURE__ */ new Map();
|
|
3498
3594
|
}
|
|
3499
3595
|
registerInjectable(declaration, meta) {
|
|
3500
3596
|
this.classes.set(declaration, meta);
|
|
@@ -3604,13 +3700,12 @@ function removeIdentifierReferences(node, names) {
|
|
|
3604
3700
|
|
|
3605
3701
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
|
|
3606
3702
|
import { literal as literal2, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
|
|
3607
|
-
|
|
3608
|
-
function extractClassDebugInfo(clazz, reflection, rootDirs, forbidOrphanRendering) {
|
|
3703
|
+
function extractClassDebugInfo(clazz, reflection, compilerHost, rootDirs, forbidOrphanRendering) {
|
|
3609
3704
|
if (!reflection.isClass(clazz)) {
|
|
3610
3705
|
return null;
|
|
3611
3706
|
}
|
|
3612
3707
|
const srcFile = clazz.getSourceFile();
|
|
3613
|
-
const srcFileMaybeRelativePath =
|
|
3708
|
+
const srcFileMaybeRelativePath = getProjectRelativePath(srcFile, rootDirs, compilerHost);
|
|
3614
3709
|
return {
|
|
3615
3710
|
type: new WrappedNodeExpr4(clazz.name),
|
|
3616
3711
|
className: literal2(clazz.name.getText()),
|
|
@@ -3619,15 +3714,6 @@ function extractClassDebugInfo(clazz, reflection, rootDirs, forbidOrphanRenderin
|
|
|
3619
3714
|
forbidOrphanRendering
|
|
3620
3715
|
};
|
|
3621
3716
|
}
|
|
3622
|
-
function computeRelativePathIfPossible(filePath, rootDirs) {
|
|
3623
|
-
for (const rootDir of rootDirs) {
|
|
3624
|
-
const rel = path.relative(rootDir, filePath);
|
|
3625
|
-
if (!rel.startsWith("..")) {
|
|
3626
|
-
return rel;
|
|
3627
|
-
}
|
|
3628
|
-
}
|
|
3629
|
-
return null;
|
|
3630
|
-
}
|
|
3631
3717
|
|
|
3632
3718
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
|
|
3633
3719
|
var NoopReferencesRegistry = class {
|
|
@@ -3685,18 +3771,19 @@ function compileInputTransformFields(inputs) {
|
|
|
3685
3771
|
|
|
3686
3772
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.mjs
|
|
3687
3773
|
var JitDeclarationRegistry = class {
|
|
3688
|
-
|
|
3689
|
-
this.jitDeclarations = /* @__PURE__ */ new Set();
|
|
3690
|
-
}
|
|
3774
|
+
jitDeclarations = /* @__PURE__ */ new Set();
|
|
3691
3775
|
};
|
|
3692
3776
|
|
|
3693
3777
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
3694
|
-
import { compileClassDebugInfo, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, CssSelector as CssSelector4, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, outputAst as
|
|
3695
|
-
import
|
|
3778
|
+
import { compileClassDebugInfo, compileHmrInitializer, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, ConstantPool as ConstantPool2, CssSelector as CssSelector4, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, outputAst as o4, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2 } from "@angular/compiler";
|
|
3779
|
+
import ts47 from "typescript";
|
|
3696
3780
|
|
|
3697
3781
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
|
|
3698
3782
|
import ts15 from "typescript";
|
|
3699
3783
|
var SemanticSymbol = class {
|
|
3784
|
+
decl;
|
|
3785
|
+
path;
|
|
3786
|
+
identifier;
|
|
3700
3787
|
constructor(decl) {
|
|
3701
3788
|
this.decl = decl;
|
|
3702
3789
|
this.path = absoluteFromSourceFile(decl.getSourceFile());
|
|
@@ -3721,10 +3808,8 @@ var OpaqueSymbol = class extends SemanticSymbol {
|
|
|
3721
3808
|
}
|
|
3722
3809
|
};
|
|
3723
3810
|
var SemanticDepGraph = class {
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
this.symbolByDecl = /* @__PURE__ */ new Map();
|
|
3727
|
-
}
|
|
3811
|
+
files = /* @__PURE__ */ new Map();
|
|
3812
|
+
symbolByDecl = /* @__PURE__ */ new Map();
|
|
3728
3813
|
registerSymbol(symbol) {
|
|
3729
3814
|
this.symbolByDecl.set(symbol.decl, symbol);
|
|
3730
3815
|
if (symbol.identifier !== null) {
|
|
@@ -3741,11 +3826,11 @@ var SemanticDepGraph = class {
|
|
|
3741
3826
|
}
|
|
3742
3827
|
return previousSymbol;
|
|
3743
3828
|
}
|
|
3744
|
-
getSymbolByName(
|
|
3745
|
-
if (!this.files.has(
|
|
3829
|
+
getSymbolByName(path, identifier) {
|
|
3830
|
+
if (!this.files.has(path)) {
|
|
3746
3831
|
return null;
|
|
3747
3832
|
}
|
|
3748
|
-
const file = this.files.get(
|
|
3833
|
+
const file = this.files.get(path);
|
|
3749
3834
|
if (!file.has(identifier)) {
|
|
3750
3835
|
return null;
|
|
3751
3836
|
}
|
|
@@ -3759,10 +3844,11 @@ var SemanticDepGraph = class {
|
|
|
3759
3844
|
}
|
|
3760
3845
|
};
|
|
3761
3846
|
var SemanticDepGraphUpdater = class {
|
|
3847
|
+
priorGraph;
|
|
3848
|
+
newGraph = new SemanticDepGraph();
|
|
3849
|
+
opaqueSymbols = /* @__PURE__ */ new Map();
|
|
3762
3850
|
constructor(priorGraph) {
|
|
3763
3851
|
this.priorGraph = priorGraph;
|
|
3764
|
-
this.newGraph = new SemanticDepGraph();
|
|
3765
|
-
this.opaqueSymbols = /* @__PURE__ */ new Map();
|
|
3766
3852
|
}
|
|
3767
3853
|
registerSymbol(symbol) {
|
|
3768
3854
|
this.newGraph.registerSymbol(symbol);
|
|
@@ -3937,6 +4023,7 @@ var ComponentScopeKind;
|
|
|
3937
4023
|
|
|
3938
4024
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
|
|
3939
4025
|
var CompoundComponentScopeReader = class {
|
|
4026
|
+
readers;
|
|
3940
4027
|
constructor(readers) {
|
|
3941
4028
|
this.readers = readers;
|
|
3942
4029
|
}
|
|
@@ -3962,10 +4049,12 @@ var CompoundComponentScopeReader = class {
|
|
|
3962
4049
|
|
|
3963
4050
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
|
|
3964
4051
|
var MetadataDtsModuleScopeResolver = class {
|
|
4052
|
+
dtsMetaReader;
|
|
4053
|
+
aliasingHost;
|
|
4054
|
+
cache = /* @__PURE__ */ new Map();
|
|
3965
4055
|
constructor(dtsMetaReader, aliasingHost) {
|
|
3966
4056
|
this.dtsMetaReader = dtsMetaReader;
|
|
3967
4057
|
this.aliasingHost = aliasingHost;
|
|
3968
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
3969
4058
|
}
|
|
3970
4059
|
resolve(ref) {
|
|
3971
4060
|
const clazz = ref.node;
|
|
@@ -4014,7 +4103,7 @@ var MetadataDtsModuleScopeResolver = class {
|
|
|
4014
4103
|
const exportScope = {
|
|
4015
4104
|
exported: {
|
|
4016
4105
|
dependencies,
|
|
4017
|
-
isPoisoned:
|
|
4106
|
+
isPoisoned: meta.isPoisoned
|
|
4018
4107
|
}
|
|
4019
4108
|
};
|
|
4020
4109
|
this.cache.set(clazz, exportScope);
|
|
@@ -4067,21 +4156,27 @@ function makeUnknownComponentDeferredImportDiagnostic(ref, rawExpr) {
|
|
|
4067
4156
|
}
|
|
4068
4157
|
|
|
4069
4158
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
4159
|
+
var IN_PROGRESS_RESOLUTION = {};
|
|
4070
4160
|
var LocalModuleScopeRegistry = class {
|
|
4161
|
+
localReader;
|
|
4162
|
+
fullReader;
|
|
4163
|
+
dependencyScopeReader;
|
|
4164
|
+
refEmitter;
|
|
4165
|
+
aliasingHost;
|
|
4166
|
+
sealed = false;
|
|
4167
|
+
declarationToModule = /* @__PURE__ */ new Map();
|
|
4168
|
+
duplicateDeclarations = /* @__PURE__ */ new Map();
|
|
4169
|
+
moduleToRef = /* @__PURE__ */ new Map();
|
|
4170
|
+
cache = /* @__PURE__ */ new Map();
|
|
4171
|
+
remoteScoping = /* @__PURE__ */ new Map();
|
|
4172
|
+
scopeErrors = /* @__PURE__ */ new Map();
|
|
4173
|
+
modulesWithStructuralErrors = /* @__PURE__ */ new Set();
|
|
4071
4174
|
constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
|
|
4072
4175
|
this.localReader = localReader;
|
|
4073
4176
|
this.fullReader = fullReader;
|
|
4074
4177
|
this.dependencyScopeReader = dependencyScopeReader;
|
|
4075
4178
|
this.refEmitter = refEmitter;
|
|
4076
4179
|
this.aliasingHost = aliasingHost;
|
|
4077
|
-
this.sealed = false;
|
|
4078
|
-
this.declarationToModule = /* @__PURE__ */ new Map();
|
|
4079
|
-
this.duplicateDeclarations = /* @__PURE__ */ new Map();
|
|
4080
|
-
this.moduleToRef = /* @__PURE__ */ new Map();
|
|
4081
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
4082
|
-
this.remoteScoping = /* @__PURE__ */ new Map();
|
|
4083
|
-
this.scopeErrors = /* @__PURE__ */ new Map();
|
|
4084
|
-
this.modulesWithStructuralErrors = /* @__PURE__ */ new Set();
|
|
4085
4180
|
}
|
|
4086
4181
|
registerNgModuleMetadata(data) {
|
|
4087
4182
|
this.assertCollecting();
|
|
@@ -4139,8 +4234,12 @@ var LocalModuleScopeRegistry = class {
|
|
|
4139
4234
|
}
|
|
4140
4235
|
getScopeOfModuleReference(ref) {
|
|
4141
4236
|
if (this.cache.has(ref.node)) {
|
|
4142
|
-
|
|
4237
|
+
const cachedValue = this.cache.get(ref.node);
|
|
4238
|
+
if (cachedValue !== IN_PROGRESS_RESOLUTION) {
|
|
4239
|
+
return cachedValue;
|
|
4240
|
+
}
|
|
4143
4241
|
}
|
|
4242
|
+
this.cache.set(ref.node, IN_PROGRESS_RESOLUTION);
|
|
4144
4243
|
this.sealed = true;
|
|
4145
4244
|
const ngModule = this.localReader.getNgModuleMetadata(ref);
|
|
4146
4245
|
if (ngModule === null) {
|
|
@@ -4160,10 +4259,12 @@ var LocalModuleScopeRegistry = class {
|
|
|
4160
4259
|
for (const decl of ngModule.imports) {
|
|
4161
4260
|
const importScope = this.getExportedScope(decl, diagnostics, ref.node, "import");
|
|
4162
4261
|
if (importScope !== null) {
|
|
4163
|
-
if (importScope === "invalid" || importScope.exported.isPoisoned) {
|
|
4164
|
-
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawImports, "import"));
|
|
4262
|
+
if (importScope === "invalid" || importScope === "cycle" || importScope.exported.isPoisoned) {
|
|
4165
4263
|
isPoisoned = true;
|
|
4166
|
-
if (importScope
|
|
4264
|
+
if (importScope !== "cycle") {
|
|
4265
|
+
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawImports, "import"));
|
|
4266
|
+
}
|
|
4267
|
+
if (importScope === "invalid" || importScope === "cycle") {
|
|
4167
4268
|
continue;
|
|
4168
4269
|
}
|
|
4169
4270
|
}
|
|
@@ -4230,10 +4331,12 @@ var LocalModuleScopeRegistry = class {
|
|
|
4230
4331
|
}
|
|
4231
4332
|
for (const decl of ngModule.exports) {
|
|
4232
4333
|
const exportScope = this.getExportedScope(decl, diagnostics, ref.node, "export");
|
|
4233
|
-
if (exportScope === "invalid" || exportScope !== null && exportScope.exported.isPoisoned) {
|
|
4234
|
-
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawExports, "export"));
|
|
4334
|
+
if (exportScope === "invalid" || exportScope === "cycle" || exportScope !== null && exportScope.exported.isPoisoned) {
|
|
4235
4335
|
isPoisoned = true;
|
|
4236
|
-
if (exportScope
|
|
4336
|
+
if (exportScope !== "cycle") {
|
|
4337
|
+
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawExports, "export"));
|
|
4338
|
+
}
|
|
4339
|
+
if (exportScope === "invalid" || exportScope === "cycle") {
|
|
4237
4340
|
continue;
|
|
4238
4341
|
}
|
|
4239
4342
|
} else if (exportScope !== null) {
|
|
@@ -4301,6 +4404,10 @@ var LocalModuleScopeRegistry = class {
|
|
|
4301
4404
|
}
|
|
4302
4405
|
return this.dependencyScopeReader.resolve(ref);
|
|
4303
4406
|
} else {
|
|
4407
|
+
if (this.cache.get(ref.node) === IN_PROGRESS_RESOLUTION) {
|
|
4408
|
+
diagnostics.push(makeDiagnostic(type === "import" ? ErrorCode.NGMODULE_INVALID_IMPORT : ErrorCode.NGMODULE_INVALID_EXPORT, identifierOfNode(ref.node) || ref.node, `NgModule "${type}" field contains a cycle`));
|
|
4409
|
+
return "cycle";
|
|
4410
|
+
}
|
|
4304
4411
|
return this.getScopeOfModuleReference(ref);
|
|
4305
4412
|
}
|
|
4306
4413
|
}
|
|
@@ -4411,12 +4518,15 @@ function reexportCollision(module, refA, refB) {
|
|
|
4411
4518
|
import { CssSelector, SelectorMatcher } from "@angular/compiler";
|
|
4412
4519
|
import ts18 from "typescript";
|
|
4413
4520
|
var TypeCheckScopeRegistry = class {
|
|
4521
|
+
scopeReader;
|
|
4522
|
+
metaReader;
|
|
4523
|
+
hostDirectivesResolver;
|
|
4524
|
+
flattenedDirectiveMetaCache = /* @__PURE__ */ new Map();
|
|
4525
|
+
scopeCache = /* @__PURE__ */ new Map();
|
|
4414
4526
|
constructor(scopeReader, metaReader, hostDirectivesResolver) {
|
|
4415
4527
|
this.scopeReader = scopeReader;
|
|
4416
4528
|
this.metaReader = metaReader;
|
|
4417
4529
|
this.hostDirectivesResolver = hostDirectivesResolver;
|
|
4418
|
-
this.flattenedDirectiveMetaCache = /* @__PURE__ */ new Map();
|
|
4419
|
-
this.scopeCache = /* @__PURE__ */ new Map();
|
|
4420
4530
|
}
|
|
4421
4531
|
getTypeCheckScope(node) {
|
|
4422
4532
|
const matcher = new SelectorMatcher();
|
|
@@ -4802,7 +4912,7 @@ var queryDecoratorNames = [
|
|
|
4802
4912
|
"ContentChildren"
|
|
4803
4913
|
];
|
|
4804
4914
|
var QUERY_TYPES = new Set(queryDecoratorNames);
|
|
4805
|
-
function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector, strictStandalone) {
|
|
4915
|
+
function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector, strictStandalone, implicitStandaloneValue) {
|
|
4806
4916
|
let directive;
|
|
4807
4917
|
if (decorator.args === null || decorator.args.length === 0) {
|
|
4808
4918
|
directive = /* @__PURE__ */ new Map();
|
|
@@ -4869,7 +4979,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
|
|
|
4869
4979
|
const rawCtorDeps = getConstructorDependencies(clazz, reflector, isCore);
|
|
4870
4980
|
const ctorDeps = selector !== null ? validateConstructorDependencies(clazz, rawCtorDeps) : unwrapConstructorDependencies(rawCtorDeps);
|
|
4871
4981
|
const isStructural = ctorDeps !== null && ctorDeps !== "invalid" && ctorDeps.some((dep) => dep.token instanceof ExternalExpr4 && dep.token.value.moduleName === "@angular/core" && dep.token.value.name === "TemplateRef");
|
|
4872
|
-
let isStandalone =
|
|
4982
|
+
let isStandalone = implicitStandaloneValue;
|
|
4873
4983
|
if (directive.has("standalone")) {
|
|
4874
4984
|
const expr = directive.get("standalone");
|
|
4875
4985
|
const resolved = evaluator.evaluate(expr);
|
|
@@ -5600,6 +5710,13 @@ function toR3InputMetadata(mapping) {
|
|
|
5600
5710
|
|
|
5601
5711
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
|
|
5602
5712
|
var DirectiveSymbol = class extends SemanticSymbol {
|
|
5713
|
+
selector;
|
|
5714
|
+
inputs;
|
|
5715
|
+
outputs;
|
|
5716
|
+
exportAs;
|
|
5717
|
+
typeCheckMeta;
|
|
5718
|
+
typeParameters;
|
|
5719
|
+
baseClass = null;
|
|
5603
5720
|
constructor(decl, selector, inputs, outputs, exportAs, typeCheckMeta, typeParameters) {
|
|
5604
5721
|
super(decl);
|
|
5605
5722
|
this.selector = selector;
|
|
@@ -5608,7 +5725,6 @@ var DirectiveSymbol = class extends SemanticSymbol {
|
|
|
5608
5725
|
this.exportAs = exportAs;
|
|
5609
5726
|
this.typeCheckMeta = typeCheckMeta;
|
|
5610
5727
|
this.typeParameters = typeParameters;
|
|
5611
|
-
this.baseClass = null;
|
|
5612
5728
|
}
|
|
5613
5729
|
isPublicApiAffected(previousSymbol) {
|
|
5614
5730
|
if (!(previousSymbol instanceof DirectiveSymbol)) {
|
|
@@ -5700,7 +5816,26 @@ var LIFECYCLE_HOOKS = /* @__PURE__ */ new Set([
|
|
|
5700
5816
|
"ngAfterContentChecked"
|
|
5701
5817
|
]);
|
|
5702
5818
|
var DirectiveDecoratorHandler = class {
|
|
5703
|
-
|
|
5819
|
+
reflector;
|
|
5820
|
+
evaluator;
|
|
5821
|
+
metaRegistry;
|
|
5822
|
+
scopeRegistry;
|
|
5823
|
+
metaReader;
|
|
5824
|
+
injectableRegistry;
|
|
5825
|
+
refEmitter;
|
|
5826
|
+
referencesRegistry;
|
|
5827
|
+
isCore;
|
|
5828
|
+
strictCtorDeps;
|
|
5829
|
+
semanticDepGraphUpdater;
|
|
5830
|
+
annotateForClosureCompiler;
|
|
5831
|
+
perf;
|
|
5832
|
+
importTracker;
|
|
5833
|
+
includeClassMetadata;
|
|
5834
|
+
compilationMode;
|
|
5835
|
+
jitDeclarationRegistry;
|
|
5836
|
+
strictStandalone;
|
|
5837
|
+
implicitStandaloneValue;
|
|
5838
|
+
constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, annotateForClosureCompiler, perf, importTracker, includeClassMetadata, compilationMode, jitDeclarationRegistry, strictStandalone, implicitStandaloneValue) {
|
|
5704
5839
|
this.reflector = reflector;
|
|
5705
5840
|
this.evaluator = evaluator;
|
|
5706
5841
|
this.metaRegistry = metaRegistry;
|
|
@@ -5719,9 +5854,10 @@ var DirectiveDecoratorHandler = class {
|
|
|
5719
5854
|
this.compilationMode = compilationMode;
|
|
5720
5855
|
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
5721
5856
|
this.strictStandalone = strictStandalone;
|
|
5722
|
-
this.
|
|
5723
|
-
this.name = "DirectiveDecoratorHandler";
|
|
5857
|
+
this.implicitStandaloneValue = implicitStandaloneValue;
|
|
5724
5858
|
}
|
|
5859
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
5860
|
+
name = "DirectiveDecoratorHandler";
|
|
5725
5861
|
detect(node, decorators) {
|
|
5726
5862
|
if (!decorators) {
|
|
5727
5863
|
const angularField = this.findClassFieldWithAngularFeatures(node);
|
|
@@ -5752,7 +5888,8 @@ var DirectiveDecoratorHandler = class {
|
|
|
5752
5888
|
this.annotateForClosureCompiler,
|
|
5753
5889
|
this.compilationMode,
|
|
5754
5890
|
null,
|
|
5755
|
-
this.strictStandalone
|
|
5891
|
+
this.strictStandalone,
|
|
5892
|
+
this.implicitStandaloneValue
|
|
5756
5893
|
);
|
|
5757
5894
|
if (directiveResult.jitForced) {
|
|
5758
5895
|
this.jitDeclarationRegistry.jitDeclarations.add(node);
|
|
@@ -5955,11 +6092,12 @@ function isResolvedModuleWithProviders(sv) {
|
|
|
5955
6092
|
|
|
5956
6093
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
5957
6094
|
var NgModuleSymbol = class extends SemanticSymbol {
|
|
6095
|
+
hasProviders;
|
|
6096
|
+
remotelyScopedComponents = [];
|
|
6097
|
+
transitiveImportsFromStandaloneComponents = /* @__PURE__ */ new Set();
|
|
5958
6098
|
constructor(decl, hasProviders) {
|
|
5959
6099
|
super(decl);
|
|
5960
6100
|
this.hasProviders = hasProviders;
|
|
5961
|
-
this.remotelyScopedComponents = [];
|
|
5962
|
-
this.transitiveImportsFromStandaloneComponents = /* @__PURE__ */ new Set();
|
|
5963
6101
|
}
|
|
5964
6102
|
isPublicApiAffected(previousSymbol) {
|
|
5965
6103
|
if (!(previousSymbol instanceof NgModuleSymbol)) {
|
|
@@ -6020,6 +6158,25 @@ var NgModuleSymbol = class extends SemanticSymbol {
|
|
|
6020
6158
|
}
|
|
6021
6159
|
};
|
|
6022
6160
|
var NgModuleDecoratorHandler = class {
|
|
6161
|
+
reflector;
|
|
6162
|
+
evaluator;
|
|
6163
|
+
metaReader;
|
|
6164
|
+
metaRegistry;
|
|
6165
|
+
scopeRegistry;
|
|
6166
|
+
referencesRegistry;
|
|
6167
|
+
exportedProviderStatusResolver;
|
|
6168
|
+
semanticDepGraphUpdater;
|
|
6169
|
+
isCore;
|
|
6170
|
+
refEmitter;
|
|
6171
|
+
annotateForClosureCompiler;
|
|
6172
|
+
onlyPublishPublicTypings;
|
|
6173
|
+
injectableRegistry;
|
|
6174
|
+
perf;
|
|
6175
|
+
includeClassMetadata;
|
|
6176
|
+
includeSelectorScope;
|
|
6177
|
+
compilationMode;
|
|
6178
|
+
localCompilationExtraImportsTracker;
|
|
6179
|
+
jitDeclarationRegistry;
|
|
6023
6180
|
constructor(reflector, evaluator, metaReader, metaRegistry, scopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, annotateForClosureCompiler, onlyPublishPublicTypings, injectableRegistry, perf, includeClassMetadata, includeSelectorScope, compilationMode, localCompilationExtraImportsTracker, jitDeclarationRegistry) {
|
|
6024
6181
|
this.reflector = reflector;
|
|
6025
6182
|
this.evaluator = evaluator;
|
|
@@ -6040,9 +6197,9 @@ var NgModuleDecoratorHandler = class {
|
|
|
6040
6197
|
this.compilationMode = compilationMode;
|
|
6041
6198
|
this.localCompilationExtraImportsTracker = localCompilationExtraImportsTracker;
|
|
6042
6199
|
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
6043
|
-
this.precedence = HandlerPrecedence.PRIMARY;
|
|
6044
|
-
this.name = "NgModuleDecoratorHandler";
|
|
6045
6200
|
}
|
|
6201
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
6202
|
+
name = "NgModuleDecoratorHandler";
|
|
6046
6203
|
detect(node, decorators) {
|
|
6047
6204
|
if (!decorators) {
|
|
6048
6205
|
return void 0;
|
|
@@ -6296,7 +6453,8 @@ var NgModuleDecoratorHandler = class {
|
|
|
6296
6453
|
rawImports: analysis.rawImports,
|
|
6297
6454
|
rawExports: analysis.rawExports,
|
|
6298
6455
|
decorator: analysis.decorator,
|
|
6299
|
-
mayDeclareProviders: analysis.providers !== null
|
|
6456
|
+
mayDeclareProviders: analysis.providers !== null,
|
|
6457
|
+
isPoisoned: false
|
|
6300
6458
|
});
|
|
6301
6459
|
this.injectableRegistry.registerInjectable(node, {
|
|
6302
6460
|
ctorDeps: analysis.fac.deps
|
|
@@ -6575,9 +6733,9 @@ function isSyntheticReference(ref) {
|
|
|
6575
6733
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
|
|
6576
6734
|
function makeCyclicImportInfo(ref, type, cycle) {
|
|
6577
6735
|
const name = ref.debugName || "(unknown)";
|
|
6578
|
-
const
|
|
6736
|
+
const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
|
|
6579
6737
|
const message = `The ${type} '${name}' is used in the template but importing it would create a cycle: `;
|
|
6580
|
-
return makeRelatedInformation(ref.node, message +
|
|
6738
|
+
return makeRelatedInformation(ref.node, message + path);
|
|
6581
6739
|
}
|
|
6582
6740
|
function checkCustomElementSelectorForErrors(selector) {
|
|
6583
6741
|
if (selector.includes(".") || selector.includes("[") && selector.includes("]")) {
|
|
@@ -6935,12 +7093,9 @@ function _extractTemplateStyleUrls(template) {
|
|
|
6935
7093
|
|
|
6936
7094
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
|
|
6937
7095
|
var ComponentSymbol = class extends DirectiveSymbol {
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
this.usedPipes = [];
|
|
6942
|
-
this.isRemotelyScoped = false;
|
|
6943
|
-
}
|
|
7096
|
+
usedDirectives = [];
|
|
7097
|
+
usedPipes = [];
|
|
7098
|
+
isRemotelyScoped = false;
|
|
6944
7099
|
isEmitAffected(previousSymbol, publicApiAffected) {
|
|
6945
7100
|
if (!(previousSymbol instanceof ComponentSymbol)) {
|
|
6946
7101
|
return true;
|
|
@@ -7130,14 +7285,16 @@ function makeShimFileName(fileName, suffix) {
|
|
|
7130
7285
|
|
|
7131
7286
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
|
|
7132
7287
|
var ShimAdapter = class {
|
|
7288
|
+
delegate;
|
|
7289
|
+
shims = /* @__PURE__ */ new Map();
|
|
7290
|
+
priorShims = /* @__PURE__ */ new Map();
|
|
7291
|
+
notShims = /* @__PURE__ */ new Set();
|
|
7292
|
+
generators = [];
|
|
7293
|
+
ignoreForEmit = /* @__PURE__ */ new Set();
|
|
7294
|
+
extraInputFiles;
|
|
7295
|
+
extensionPrefixes = [];
|
|
7133
7296
|
constructor(delegate, tsRootFiles, topLevelGenerators, perFileGenerators, oldProgram) {
|
|
7134
7297
|
this.delegate = delegate;
|
|
7135
|
-
this.shims = /* @__PURE__ */ new Map();
|
|
7136
|
-
this.priorShims = /* @__PURE__ */ new Map();
|
|
7137
|
-
this.notShims = /* @__PURE__ */ new Set();
|
|
7138
|
-
this.generators = [];
|
|
7139
|
-
this.ignoreForEmit = /* @__PURE__ */ new Set();
|
|
7140
|
-
this.extensionPrefixes = [];
|
|
7141
7298
|
for (const gen of perFileGenerators) {
|
|
7142
7299
|
const pattern = `^(.*)\\.${gen.extensionPrefix}\\.ts$`;
|
|
7143
7300
|
const regexp = new RegExp(pattern, "i");
|
|
@@ -7225,9 +7382,10 @@ var ShimAdapter = class {
|
|
|
7225
7382
|
|
|
7226
7383
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
|
|
7227
7384
|
var ShimReferenceTagger = class {
|
|
7385
|
+
suffixes;
|
|
7386
|
+
tagged = /* @__PURE__ */ new Set();
|
|
7387
|
+
enabled = true;
|
|
7228
7388
|
constructor(shimExtensions) {
|
|
7229
|
-
this.tagged = /* @__PURE__ */ new Set();
|
|
7230
|
-
this.enabled = true;
|
|
7231
7389
|
this.suffixes = shimExtensions.map((extension) => `.${extension}.ts`);
|
|
7232
7390
|
}
|
|
7233
7391
|
tag(sf) {
|
|
@@ -7259,6 +7417,30 @@ var ShimReferenceTagger = class {
|
|
|
7259
7417
|
|
|
7260
7418
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
7261
7419
|
var DelegatingCompilerHost = class {
|
|
7420
|
+
delegate;
|
|
7421
|
+
createHash;
|
|
7422
|
+
directoryExists;
|
|
7423
|
+
getCancellationToken;
|
|
7424
|
+
getCanonicalFileName;
|
|
7425
|
+
getCurrentDirectory;
|
|
7426
|
+
getDefaultLibFileName;
|
|
7427
|
+
getDefaultLibLocation;
|
|
7428
|
+
getDirectories;
|
|
7429
|
+
getEnvironmentVariable;
|
|
7430
|
+
getNewLine;
|
|
7431
|
+
getParsedCommandLine;
|
|
7432
|
+
getSourceFileByPath;
|
|
7433
|
+
readDirectory;
|
|
7434
|
+
readFile;
|
|
7435
|
+
realpath;
|
|
7436
|
+
resolveModuleNames;
|
|
7437
|
+
resolveTypeReferenceDirectives;
|
|
7438
|
+
trace;
|
|
7439
|
+
useCaseSensitiveFileNames;
|
|
7440
|
+
getModuleResolutionCache;
|
|
7441
|
+
hasInvalidatedResolutions;
|
|
7442
|
+
resolveModuleNameLiterals;
|
|
7443
|
+
resolveTypeReferenceDirectiveReferences;
|
|
7262
7444
|
get jsDocParsingMode() {
|
|
7263
7445
|
return this.delegate.jsDocParsingMode;
|
|
7264
7446
|
}
|
|
@@ -7296,6 +7478,10 @@ var DelegatingCompilerHost = class {
|
|
|
7296
7478
|
}
|
|
7297
7479
|
};
|
|
7298
7480
|
var UpdatedProgramHost = class extends DelegatingCompilerHost {
|
|
7481
|
+
originalProgram;
|
|
7482
|
+
shimExtensionPrefixes;
|
|
7483
|
+
sfMap;
|
|
7484
|
+
shimTagger;
|
|
7299
7485
|
constructor(sfMap, originalProgram, delegate, shimExtensionPrefixes) {
|
|
7300
7486
|
super(delegate);
|
|
7301
7487
|
this.originalProgram = originalProgram;
|
|
@@ -7333,15 +7519,20 @@ var UpdatedProgramHost = class extends DelegatingCompilerHost {
|
|
|
7333
7519
|
}
|
|
7334
7520
|
};
|
|
7335
7521
|
var TsCreateProgramDriver = class {
|
|
7522
|
+
originalProgram;
|
|
7523
|
+
originalHost;
|
|
7524
|
+
options;
|
|
7525
|
+
shimExtensionPrefixes;
|
|
7526
|
+
sfMap = /* @__PURE__ */ new Map();
|
|
7527
|
+
program;
|
|
7336
7528
|
constructor(originalProgram, originalHost, options, shimExtensionPrefixes) {
|
|
7337
7529
|
this.originalProgram = originalProgram;
|
|
7338
7530
|
this.originalHost = originalHost;
|
|
7339
7531
|
this.options = options;
|
|
7340
7532
|
this.shimExtensionPrefixes = shimExtensionPrefixes;
|
|
7341
|
-
this.sfMap = /* @__PURE__ */ new Map();
|
|
7342
|
-
this.supportsInlineOperations = true;
|
|
7343
7533
|
this.program = this.originalProgram;
|
|
7344
7534
|
}
|
|
7535
|
+
supportsInlineOperations = true;
|
|
7345
7536
|
getProgram() {
|
|
7346
7537
|
return this.program;
|
|
7347
7538
|
}
|
|
@@ -7640,13 +7831,18 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
|
|
|
7640
7831
|
|
|
7641
7832
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
7642
7833
|
var CompletionEngine = class {
|
|
7834
|
+
tcb;
|
|
7835
|
+
data;
|
|
7836
|
+
tcbPath;
|
|
7837
|
+
tcbIsShim;
|
|
7838
|
+
componentContext;
|
|
7839
|
+
templateContextCache = /* @__PURE__ */ new Map();
|
|
7840
|
+
expressionCompletionCache = /* @__PURE__ */ new Map();
|
|
7643
7841
|
constructor(tcb, data, tcbPath, tcbIsShim) {
|
|
7644
7842
|
this.tcb = tcb;
|
|
7645
7843
|
this.data = data;
|
|
7646
7844
|
this.tcbPath = tcbPath;
|
|
7647
7845
|
this.tcbIsShim = tcbIsShim;
|
|
7648
|
-
this.templateContextCache = /* @__PURE__ */ new Map();
|
|
7649
|
-
this.expressionCompletionCache = /* @__PURE__ */ new Map();
|
|
7650
7846
|
const globalRead = findFirstMatchingNode(this.tcb, {
|
|
7651
7847
|
filter: ts30.isPropertyAccessExpression,
|
|
7652
7848
|
withExpressionIdentifier: ExpressionIdentifier.COMPONENT_COMPLETION
|
|
@@ -8085,22 +8281,6 @@ var Mappings = class {
|
|
|
8085
8281
|
let first = true;
|
|
8086
8282
|
let charInHiresBoundary = false;
|
|
8087
8283
|
while (originalCharIndex < chunk.end) {
|
|
8088
|
-
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
|
|
8089
|
-
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
|
8090
|
-
if (this.hires === "boundary") {
|
|
8091
|
-
if (wordRegex.test(original[originalCharIndex])) {
|
|
8092
|
-
if (!charInHiresBoundary) {
|
|
8093
|
-
this.rawSegments.push(segment);
|
|
8094
|
-
charInHiresBoundary = true;
|
|
8095
|
-
}
|
|
8096
|
-
} else {
|
|
8097
|
-
this.rawSegments.push(segment);
|
|
8098
|
-
charInHiresBoundary = false;
|
|
8099
|
-
}
|
|
8100
|
-
} else {
|
|
8101
|
-
this.rawSegments.push(segment);
|
|
8102
|
-
}
|
|
8103
|
-
}
|
|
8104
8284
|
if (original[originalCharIndex] === "\n") {
|
|
8105
8285
|
loc.line += 1;
|
|
8106
8286
|
loc.column = 0;
|
|
@@ -8109,6 +8289,22 @@ var Mappings = class {
|
|
|
8109
8289
|
this.generatedCodeColumn = 0;
|
|
8110
8290
|
first = true;
|
|
8111
8291
|
} else {
|
|
8292
|
+
if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
|
|
8293
|
+
const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
|
|
8294
|
+
if (this.hires === "boundary") {
|
|
8295
|
+
if (wordRegex.test(original[originalCharIndex])) {
|
|
8296
|
+
if (!charInHiresBoundary) {
|
|
8297
|
+
this.rawSegments.push(segment);
|
|
8298
|
+
charInHiresBoundary = true;
|
|
8299
|
+
}
|
|
8300
|
+
} else {
|
|
8301
|
+
this.rawSegments.push(segment);
|
|
8302
|
+
charInHiresBoundary = false;
|
|
8303
|
+
}
|
|
8304
|
+
} else {
|
|
8305
|
+
this.rawSegments.push(segment);
|
|
8306
|
+
}
|
|
8307
|
+
}
|
|
8112
8308
|
loc.column += 1;
|
|
8113
8309
|
this.generatedCodeColumn += 1;
|
|
8114
8310
|
first = false;
|
|
@@ -8837,12 +9033,13 @@ import ts31 from "typescript";
|
|
|
8837
9033
|
var REGISTRY = new DomElementSchemaRegistry();
|
|
8838
9034
|
var REMOVE_XHTML_REGEX = /^:xhtml:/;
|
|
8839
9035
|
var RegistryDomSchemaChecker = class {
|
|
9036
|
+
resolver;
|
|
9037
|
+
_diagnostics = [];
|
|
8840
9038
|
get diagnostics() {
|
|
8841
9039
|
return this._diagnostics;
|
|
8842
9040
|
}
|
|
8843
9041
|
constructor(resolver) {
|
|
8844
9042
|
this.resolver = resolver;
|
|
8845
|
-
this._diagnostics = [];
|
|
8846
9043
|
}
|
|
8847
9044
|
checkElement(id, element, schemas, hostIsStandalone) {
|
|
8848
9045
|
const name = element.name.replace(REMOVE_XHTML_REGEX, "");
|
|
@@ -8890,6 +9087,10 @@ import ts36 from "typescript";
|
|
|
8890
9087
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/reference_emit_environment.mjs
|
|
8891
9088
|
import { ExpressionType, ExternalExpr as ExternalExpr6, TypeModifier } from "@angular/compiler";
|
|
8892
9089
|
var ReferenceEmitEnvironment = class {
|
|
9090
|
+
importManager;
|
|
9091
|
+
refEmitter;
|
|
9092
|
+
reflector;
|
|
9093
|
+
contextFile;
|
|
8893
9094
|
constructor(importManager, refEmitter, reflector, contextFile) {
|
|
8894
9095
|
this.importManager = importManager;
|
|
8895
9096
|
this.refEmitter = refEmitter;
|
|
@@ -9012,6 +9213,8 @@ import ts34 from "typescript";
|
|
|
9012
9213
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
|
|
9013
9214
|
import ts33 from "typescript";
|
|
9014
9215
|
var TypeParameterEmitter = class {
|
|
9216
|
+
typeParameters;
|
|
9217
|
+
reflector;
|
|
9015
9218
|
constructor(typeParameters, reflector) {
|
|
9016
9219
|
this.typeParameters = typeParameters;
|
|
9017
9220
|
this.reflector = reflector;
|
|
@@ -9304,17 +9507,18 @@ function typeParametersWithDefaultTypes(params) {
|
|
|
9304
9507
|
|
|
9305
9508
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
9306
9509
|
var Environment = class extends ReferenceEmitEnvironment {
|
|
9510
|
+
config;
|
|
9511
|
+
nextIds = {
|
|
9512
|
+
pipeInst: 1,
|
|
9513
|
+
typeCtor: 1
|
|
9514
|
+
};
|
|
9515
|
+
typeCtors = /* @__PURE__ */ new Map();
|
|
9516
|
+
typeCtorStatements = [];
|
|
9517
|
+
pipeInsts = /* @__PURE__ */ new Map();
|
|
9518
|
+
pipeInstStatements = [];
|
|
9307
9519
|
constructor(config, importManager, refEmitter, reflector, contextFile) {
|
|
9308
9520
|
super(importManager, refEmitter, reflector, contextFile);
|
|
9309
9521
|
this.config = config;
|
|
9310
|
-
this.nextIds = {
|
|
9311
|
-
pipeInst: 1,
|
|
9312
|
-
typeCtor: 1
|
|
9313
|
-
};
|
|
9314
|
-
this.typeCtors = /* @__PURE__ */ new Map();
|
|
9315
|
-
this.typeCtorStatements = [];
|
|
9316
|
-
this.pipeInsts = /* @__PURE__ */ new Map();
|
|
9317
|
-
this.pipeInstStatements = [];
|
|
9318
9522
|
}
|
|
9319
9523
|
typeCtorFor(dir) {
|
|
9320
9524
|
const dirRef = dir.ref;
|
|
@@ -9378,10 +9582,11 @@ var Environment = class extends ReferenceEmitEnvironment {
|
|
|
9378
9582
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan2, TmplAstElement } from "@angular/compiler";
|
|
9379
9583
|
import ts37 from "typescript";
|
|
9380
9584
|
var OutOfBandDiagnosticRecorderImpl = class {
|
|
9585
|
+
resolver;
|
|
9586
|
+
_diagnostics = [];
|
|
9587
|
+
recordedPipes = /* @__PURE__ */ new Set();
|
|
9381
9588
|
constructor(resolver) {
|
|
9382
9589
|
this.resolver = resolver;
|
|
9383
|
-
this._diagnostics = [];
|
|
9384
|
-
this.recordedPipes = /* @__PURE__ */ new Set();
|
|
9385
9590
|
}
|
|
9386
9591
|
get diagnostics() {
|
|
9387
9592
|
return this._diagnostics;
|
|
@@ -9579,10 +9784,8 @@ function makeInlineDiagnostic(templateId, code, node, messageText, relatedInform
|
|
|
9579
9784
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
|
|
9580
9785
|
import ts38 from "typescript";
|
|
9581
9786
|
var TypeCheckShimGenerator = class {
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
this.shouldEmit = false;
|
|
9585
|
-
}
|
|
9787
|
+
extensionPrefix = "ngtypecheck";
|
|
9788
|
+
shouldEmit = false;
|
|
9586
9789
|
generateShimForFile(sf, genFilePath, priorShimSf) {
|
|
9587
9790
|
if (priorShimSf !== null) {
|
|
9588
9791
|
return priorShimSf;
|
|
@@ -9688,6 +9891,8 @@ function astToTypescript(ast, maybeResolve, config) {
|
|
|
9688
9891
|
return translator.translate(ast);
|
|
9689
9892
|
}
|
|
9690
9893
|
var AstTranslator = class {
|
|
9894
|
+
maybeResolve;
|
|
9895
|
+
config;
|
|
9691
9896
|
constructor(maybeResolve, config) {
|
|
9692
9897
|
this.maybeResolve = maybeResolve;
|
|
9693
9898
|
this.config = config;
|
|
@@ -9816,6 +10021,12 @@ var AstTranslator = class {
|
|
|
9816
10021
|
addParseSpanInfo(node, ast.sourceSpan);
|
|
9817
10022
|
return node;
|
|
9818
10023
|
}
|
|
10024
|
+
visitTypeofExpresion(ast) {
|
|
10025
|
+
const expression = wrapForDiagnostics(this.translate(ast.expression));
|
|
10026
|
+
const node = ts40.factory.createTypeOfExpression(expression);
|
|
10027
|
+
addParseSpanInfo(node, ast.sourceSpan);
|
|
10028
|
+
return node;
|
|
10029
|
+
}
|
|
9819
10030
|
visitPropertyRead(ast) {
|
|
9820
10031
|
const receiver = wrapForDiagnostics(this.translate(ast.receiver));
|
|
9821
10032
|
const name = ts40.factory.createPropertyAccessExpression(receiver, ast.name);
|
|
@@ -9966,6 +10177,9 @@ var _VeSafeLhsInferenceBugDetector = class {
|
|
|
9966
10177
|
visitPrefixNot(ast) {
|
|
9967
10178
|
return ast.expression.visit(this);
|
|
9968
10179
|
}
|
|
10180
|
+
visitTypeofExpresion(ast) {
|
|
10181
|
+
return ast.expression.visit(this);
|
|
10182
|
+
}
|
|
9969
10183
|
visitNonNullAssert(ast) {
|
|
9970
10184
|
return ast.expression.visit(this);
|
|
9971
10185
|
}
|
|
@@ -9983,9 +10197,7 @@ var _VeSafeLhsInferenceBugDetector = class {
|
|
|
9983
10197
|
}
|
|
9984
10198
|
};
|
|
9985
10199
|
var VeSafeLhsInferenceBugDetector = _VeSafeLhsInferenceBugDetector;
|
|
9986
|
-
(()
|
|
9987
|
-
_VeSafeLhsInferenceBugDetector.SINGLETON = new _VeSafeLhsInferenceBugDetector();
|
|
9988
|
-
})();
|
|
10200
|
+
__publicField(VeSafeLhsInferenceBugDetector, "SINGLETON", new _VeSafeLhsInferenceBugDetector());
|
|
9989
10201
|
|
|
9990
10202
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
9991
10203
|
var TcbGenericContextBehavior;
|
|
@@ -10045,6 +10257,9 @@ var TcbOp = class {
|
|
|
10045
10257
|
}
|
|
10046
10258
|
};
|
|
10047
10259
|
var TcbElementOp = class extends TcbOp {
|
|
10260
|
+
tcb;
|
|
10261
|
+
scope;
|
|
10262
|
+
element;
|
|
10048
10263
|
constructor(tcb, scope, element) {
|
|
10049
10264
|
super();
|
|
10050
10265
|
this.tcb = tcb;
|
|
@@ -10063,6 +10278,10 @@ var TcbElementOp = class extends TcbOp {
|
|
|
10063
10278
|
}
|
|
10064
10279
|
};
|
|
10065
10280
|
var TcbTemplateVariableOp = class extends TcbOp {
|
|
10281
|
+
tcb;
|
|
10282
|
+
scope;
|
|
10283
|
+
template;
|
|
10284
|
+
variable;
|
|
10066
10285
|
constructor(tcb, scope, template, variable) {
|
|
10067
10286
|
super();
|
|
10068
10287
|
this.tcb = tcb;
|
|
@@ -10094,12 +10313,14 @@ var TcbTemplateVariableOp = class extends TcbOp {
|
|
|
10094
10313
|
}
|
|
10095
10314
|
};
|
|
10096
10315
|
var TcbTemplateContextOp = class extends TcbOp {
|
|
10316
|
+
tcb;
|
|
10317
|
+
scope;
|
|
10097
10318
|
constructor(tcb, scope) {
|
|
10098
10319
|
super();
|
|
10099
10320
|
this.tcb = tcb;
|
|
10100
10321
|
this.scope = scope;
|
|
10101
|
-
this.optional = true;
|
|
10102
10322
|
}
|
|
10323
|
+
optional = true;
|
|
10103
10324
|
execute() {
|
|
10104
10325
|
const ctx = this.tcb.allocateId();
|
|
10105
10326
|
const type = ts41.factory.createKeywordTypeNode(ts41.SyntaxKind.AnyKeyword);
|
|
@@ -10108,13 +10329,16 @@ var TcbTemplateContextOp = class extends TcbOp {
|
|
|
10108
10329
|
}
|
|
10109
10330
|
};
|
|
10110
10331
|
var TcbLetDeclarationOp = class extends TcbOp {
|
|
10332
|
+
tcb;
|
|
10333
|
+
scope;
|
|
10334
|
+
node;
|
|
10111
10335
|
constructor(tcb, scope, node) {
|
|
10112
10336
|
super();
|
|
10113
10337
|
this.tcb = tcb;
|
|
10114
10338
|
this.scope = scope;
|
|
10115
10339
|
this.node = node;
|
|
10116
|
-
this.optional = false;
|
|
10117
10340
|
}
|
|
10341
|
+
optional = false;
|
|
10118
10342
|
execute() {
|
|
10119
10343
|
const id = this.tcb.allocateId();
|
|
10120
10344
|
addParseSpanInfo(id, this.node.nameSpan);
|
|
@@ -10126,6 +10350,9 @@ var TcbLetDeclarationOp = class extends TcbOp {
|
|
|
10126
10350
|
}
|
|
10127
10351
|
};
|
|
10128
10352
|
var TcbTemplateBodyOp = class extends TcbOp {
|
|
10353
|
+
tcb;
|
|
10354
|
+
scope;
|
|
10355
|
+
template;
|
|
10129
10356
|
constructor(tcb, scope, template) {
|
|
10130
10357
|
super();
|
|
10131
10358
|
this.tcb = tcb;
|
|
@@ -10192,6 +10419,9 @@ var TcbTemplateBodyOp = class extends TcbOp {
|
|
|
10192
10419
|
}
|
|
10193
10420
|
};
|
|
10194
10421
|
var TcbExpressionOp = class extends TcbOp {
|
|
10422
|
+
tcb;
|
|
10423
|
+
scope;
|
|
10424
|
+
expression;
|
|
10195
10425
|
constructor(tcb, scope, expression) {
|
|
10196
10426
|
super();
|
|
10197
10427
|
this.tcb = tcb;
|
|
@@ -10208,6 +10438,10 @@ var TcbExpressionOp = class extends TcbOp {
|
|
|
10208
10438
|
}
|
|
10209
10439
|
};
|
|
10210
10440
|
var TcbDirectiveTypeOpBase = class extends TcbOp {
|
|
10441
|
+
tcb;
|
|
10442
|
+
scope;
|
|
10443
|
+
node;
|
|
10444
|
+
dir;
|
|
10211
10445
|
constructor(tcb, scope, node, dir) {
|
|
10212
10446
|
super();
|
|
10213
10447
|
this.tcb = tcb;
|
|
@@ -10257,6 +10491,11 @@ var TcbGenericDirectiveTypeWithAnyParamsOp = class extends TcbDirectiveTypeOpBas
|
|
|
10257
10491
|
}
|
|
10258
10492
|
};
|
|
10259
10493
|
var TcbReferenceOp = class extends TcbOp {
|
|
10494
|
+
tcb;
|
|
10495
|
+
scope;
|
|
10496
|
+
node;
|
|
10497
|
+
host;
|
|
10498
|
+
target;
|
|
10260
10499
|
constructor(tcb, scope, node, host, target) {
|
|
10261
10500
|
super();
|
|
10262
10501
|
this.tcb = tcb;
|
|
@@ -10264,8 +10503,8 @@ var TcbReferenceOp = class extends TcbOp {
|
|
|
10264
10503
|
this.node = node;
|
|
10265
10504
|
this.host = host;
|
|
10266
10505
|
this.target = target;
|
|
10267
|
-
this.optional = true;
|
|
10268
10506
|
}
|
|
10507
|
+
optional = true;
|
|
10269
10508
|
execute() {
|
|
10270
10509
|
const id = this.tcb.allocateId();
|
|
10271
10510
|
let initializer = this.target instanceof TmplAstTemplate || this.target instanceof TmplAstElement2 ? this.scope.resolve(this.target) : this.scope.resolve(this.host, this.target);
|
|
@@ -10283,12 +10522,14 @@ var TcbReferenceOp = class extends TcbOp {
|
|
|
10283
10522
|
}
|
|
10284
10523
|
};
|
|
10285
10524
|
var TcbInvalidReferenceOp = class extends TcbOp {
|
|
10525
|
+
tcb;
|
|
10526
|
+
scope;
|
|
10286
10527
|
constructor(tcb, scope) {
|
|
10287
10528
|
super();
|
|
10288
10529
|
this.tcb = tcb;
|
|
10289
10530
|
this.scope = scope;
|
|
10290
|
-
this.optional = true;
|
|
10291
10531
|
}
|
|
10532
|
+
optional = true;
|
|
10292
10533
|
execute() {
|
|
10293
10534
|
const id = this.tcb.allocateId();
|
|
10294
10535
|
this.scope.addStatement(tsCreateVariable(id, ANY_EXPRESSION));
|
|
@@ -10296,6 +10537,10 @@ var TcbInvalidReferenceOp = class extends TcbOp {
|
|
|
10296
10537
|
}
|
|
10297
10538
|
};
|
|
10298
10539
|
var TcbDirectiveCtorOp = class extends TcbOp {
|
|
10540
|
+
tcb;
|
|
10541
|
+
scope;
|
|
10542
|
+
node;
|
|
10543
|
+
dir;
|
|
10299
10544
|
constructor(tcb, scope, node, dir) {
|
|
10300
10545
|
super();
|
|
10301
10546
|
this.tcb = tcb;
|
|
@@ -10345,6 +10590,10 @@ var TcbDirectiveCtorOp = class extends TcbOp {
|
|
|
10345
10590
|
}
|
|
10346
10591
|
};
|
|
10347
10592
|
var TcbDirectiveInputsOp = class extends TcbOp {
|
|
10593
|
+
tcb;
|
|
10594
|
+
scope;
|
|
10595
|
+
node;
|
|
10596
|
+
dir;
|
|
10348
10597
|
constructor(tcb, scope, node, dir) {
|
|
10349
10598
|
super();
|
|
10350
10599
|
this.tcb = tcb;
|
|
@@ -10439,6 +10688,10 @@ var TcbDirectiveInputsOp = class extends TcbOp {
|
|
|
10439
10688
|
}
|
|
10440
10689
|
};
|
|
10441
10690
|
var TcbDirectiveCtorCircularFallbackOp = class extends TcbOp {
|
|
10691
|
+
tcb;
|
|
10692
|
+
scope;
|
|
10693
|
+
node;
|
|
10694
|
+
dir;
|
|
10442
10695
|
constructor(tcb, scope, node, dir) {
|
|
10443
10696
|
super();
|
|
10444
10697
|
this.tcb = tcb;
|
|
@@ -10462,6 +10715,10 @@ var TcbDirectiveCtorCircularFallbackOp = class extends TcbOp {
|
|
|
10462
10715
|
}
|
|
10463
10716
|
};
|
|
10464
10717
|
var TcbDomSchemaCheckerOp = class extends TcbOp {
|
|
10718
|
+
tcb;
|
|
10719
|
+
element;
|
|
10720
|
+
checkElement;
|
|
10721
|
+
claimedInputs;
|
|
10465
10722
|
constructor(tcb, element, checkElement, claimedInputs) {
|
|
10466
10723
|
super();
|
|
10467
10724
|
this.tcb = tcb;
|
|
@@ -10491,15 +10748,20 @@ var TcbDomSchemaCheckerOp = class extends TcbOp {
|
|
|
10491
10748
|
}
|
|
10492
10749
|
};
|
|
10493
10750
|
var TcbControlFlowContentProjectionOp = class extends TcbOp {
|
|
10751
|
+
tcb;
|
|
10752
|
+
element;
|
|
10753
|
+
ngContentSelectors;
|
|
10754
|
+
componentName;
|
|
10755
|
+
category;
|
|
10494
10756
|
constructor(tcb, element, ngContentSelectors, componentName) {
|
|
10495
10757
|
super();
|
|
10496
10758
|
this.tcb = tcb;
|
|
10497
10759
|
this.element = element;
|
|
10498
10760
|
this.ngContentSelectors = ngContentSelectors;
|
|
10499
10761
|
this.componentName = componentName;
|
|
10500
|
-
this.optional = false;
|
|
10501
10762
|
this.category = tcb.env.config.controlFlowPreventingContentProjection === "error" ? ts41.DiagnosticCategory.Error : ts41.DiagnosticCategory.Warning;
|
|
10502
10763
|
}
|
|
10764
|
+
optional = false;
|
|
10503
10765
|
execute() {
|
|
10504
10766
|
const controlFlowToCheck = this.findPotentialControlFlowNodes();
|
|
10505
10767
|
if (controlFlowToCheck.length > 0) {
|
|
@@ -10572,6 +10834,10 @@ var ATTR_TO_PROP = new Map(Object.entries({
|
|
|
10572
10834
|
"tabindex": "tabIndex"
|
|
10573
10835
|
}));
|
|
10574
10836
|
var TcbUnclaimedInputsOp = class extends TcbOp {
|
|
10837
|
+
tcb;
|
|
10838
|
+
scope;
|
|
10839
|
+
element;
|
|
10840
|
+
claimedInputs;
|
|
10575
10841
|
constructor(tcb, scope, element, claimedInputs) {
|
|
10576
10842
|
super();
|
|
10577
10843
|
this.tcb = tcb;
|
|
@@ -10612,6 +10878,10 @@ var TcbUnclaimedInputsOp = class extends TcbOp {
|
|
|
10612
10878
|
}
|
|
10613
10879
|
};
|
|
10614
10880
|
var TcbDirectiveOutputsOp = class extends TcbOp {
|
|
10881
|
+
tcb;
|
|
10882
|
+
scope;
|
|
10883
|
+
node;
|
|
10884
|
+
dir;
|
|
10615
10885
|
constructor(tcb, scope, node, dir) {
|
|
10616
10886
|
super();
|
|
10617
10887
|
this.tcb = tcb;
|
|
@@ -10657,6 +10927,10 @@ var TcbDirectiveOutputsOp = class extends TcbOp {
|
|
|
10657
10927
|
}
|
|
10658
10928
|
};
|
|
10659
10929
|
var TcbUnclaimedOutputsOp = class extends TcbOp {
|
|
10930
|
+
tcb;
|
|
10931
|
+
scope;
|
|
10932
|
+
element;
|
|
10933
|
+
claimedOutputs;
|
|
10660
10934
|
constructor(tcb, scope, element, claimedOutputs) {
|
|
10661
10935
|
super();
|
|
10662
10936
|
this.tcb = tcb;
|
|
@@ -10706,11 +10980,12 @@ var TcbUnclaimedOutputsOp = class extends TcbOp {
|
|
|
10706
10980
|
}
|
|
10707
10981
|
};
|
|
10708
10982
|
var TcbComponentContextCompletionOp = class extends TcbOp {
|
|
10983
|
+
scope;
|
|
10709
10984
|
constructor(scope) {
|
|
10710
10985
|
super();
|
|
10711
10986
|
this.scope = scope;
|
|
10712
|
-
this.optional = false;
|
|
10713
10987
|
}
|
|
10988
|
+
optional = false;
|
|
10714
10989
|
execute() {
|
|
10715
10990
|
const ctx = ts41.factory.createThis();
|
|
10716
10991
|
const ctxDot = ts41.factory.createPropertyAccessExpression(ctx, "");
|
|
@@ -10721,6 +10996,10 @@ var TcbComponentContextCompletionOp = class extends TcbOp {
|
|
|
10721
10996
|
}
|
|
10722
10997
|
};
|
|
10723
10998
|
var TcbBlockVariableOp = class extends TcbOp {
|
|
10999
|
+
tcb;
|
|
11000
|
+
scope;
|
|
11001
|
+
initializer;
|
|
11002
|
+
variable;
|
|
10724
11003
|
constructor(tcb, scope, initializer, variable) {
|
|
10725
11004
|
super();
|
|
10726
11005
|
this.tcb = tcb;
|
|
@@ -10741,14 +11020,18 @@ var TcbBlockVariableOp = class extends TcbOp {
|
|
|
10741
11020
|
}
|
|
10742
11021
|
};
|
|
10743
11022
|
var TcbBlockImplicitVariableOp = class extends TcbOp {
|
|
11023
|
+
tcb;
|
|
11024
|
+
scope;
|
|
11025
|
+
type;
|
|
11026
|
+
variable;
|
|
10744
11027
|
constructor(tcb, scope, type, variable) {
|
|
10745
11028
|
super();
|
|
10746
11029
|
this.tcb = tcb;
|
|
10747
11030
|
this.scope = scope;
|
|
10748
11031
|
this.type = type;
|
|
10749
11032
|
this.variable = variable;
|
|
10750
|
-
this.optional = true;
|
|
10751
11033
|
}
|
|
11034
|
+
optional = true;
|
|
10752
11035
|
execute() {
|
|
10753
11036
|
const id = this.tcb.allocateId();
|
|
10754
11037
|
addParseSpanInfo(id, this.variable.keySpan);
|
|
@@ -10759,12 +11042,15 @@ var TcbBlockImplicitVariableOp = class extends TcbOp {
|
|
|
10759
11042
|
}
|
|
10760
11043
|
};
|
|
10761
11044
|
var TcbIfOp = class extends TcbOp {
|
|
11045
|
+
tcb;
|
|
11046
|
+
scope;
|
|
11047
|
+
block;
|
|
11048
|
+
expressionScopes = /* @__PURE__ */ new Map();
|
|
10762
11049
|
constructor(tcb, scope, block) {
|
|
10763
11050
|
super();
|
|
10764
11051
|
this.tcb = tcb;
|
|
10765
11052
|
this.scope = scope;
|
|
10766
11053
|
this.block = block;
|
|
10767
|
-
this.expressionScopes = /* @__PURE__ */ new Map();
|
|
10768
11054
|
}
|
|
10769
11055
|
get optional() {
|
|
10770
11056
|
return false;
|
|
@@ -10821,6 +11107,9 @@ var TcbIfOp = class extends TcbOp {
|
|
|
10821
11107
|
}
|
|
10822
11108
|
};
|
|
10823
11109
|
var TcbSwitchOp = class extends TcbOp {
|
|
11110
|
+
tcb;
|
|
11111
|
+
scope;
|
|
11112
|
+
block;
|
|
10824
11113
|
constructor(tcb, scope, block) {
|
|
10825
11114
|
super();
|
|
10826
11115
|
this.tcb = tcb;
|
|
@@ -10865,6 +11154,9 @@ var TcbSwitchOp = class extends TcbOp {
|
|
|
10865
11154
|
}
|
|
10866
11155
|
};
|
|
10867
11156
|
var TcbForOfOp = class extends TcbOp {
|
|
11157
|
+
tcb;
|
|
11158
|
+
scope;
|
|
11159
|
+
block;
|
|
10868
11160
|
constructor(tcb, scope, block) {
|
|
10869
11161
|
super();
|
|
10870
11162
|
this.tcb = tcb;
|
|
@@ -10895,6 +11187,16 @@ var TcbForOfOp = class extends TcbOp {
|
|
|
10895
11187
|
};
|
|
10896
11188
|
var INFER_TYPE_FOR_CIRCULAR_OP_EXPR = ts41.factory.createNonNullExpression(ts41.factory.createNull());
|
|
10897
11189
|
var Context = class {
|
|
11190
|
+
env;
|
|
11191
|
+
domSchemaChecker;
|
|
11192
|
+
oobRecorder;
|
|
11193
|
+
id;
|
|
11194
|
+
boundTarget;
|
|
11195
|
+
pipes;
|
|
11196
|
+
schemas;
|
|
11197
|
+
hostIsStandalone;
|
|
11198
|
+
hostPreserveWhitespaces;
|
|
11199
|
+
nextId = 1;
|
|
10898
11200
|
constructor(env, domSchemaChecker, oobRecorder, id, boundTarget, pipes, schemas, hostIsStandalone, hostPreserveWhitespaces) {
|
|
10899
11201
|
this.env = env;
|
|
10900
11202
|
this.domSchemaChecker = domSchemaChecker;
|
|
@@ -10905,7 +11207,6 @@ var Context = class {
|
|
|
10905
11207
|
this.schemas = schemas;
|
|
10906
11208
|
this.hostIsStandalone = hostIsStandalone;
|
|
10907
11209
|
this.hostPreserveWhitespaces = hostPreserveWhitespaces;
|
|
10908
|
-
this.nextId = 1;
|
|
10909
11210
|
}
|
|
10910
11211
|
allocateId() {
|
|
10911
11212
|
return ts41.factory.createIdentifier(`_t${this.nextId++}`);
|
|
@@ -10918,18 +11219,21 @@ var Context = class {
|
|
|
10918
11219
|
}
|
|
10919
11220
|
};
|
|
10920
11221
|
var _Scope = class {
|
|
11222
|
+
tcb;
|
|
11223
|
+
parent;
|
|
11224
|
+
guard;
|
|
11225
|
+
opQueue = [];
|
|
11226
|
+
elementOpMap = /* @__PURE__ */ new Map();
|
|
11227
|
+
directiveOpMap = /* @__PURE__ */ new Map();
|
|
11228
|
+
referenceOpMap = /* @__PURE__ */ new Map();
|
|
11229
|
+
templateCtxOpMap = /* @__PURE__ */ new Map();
|
|
11230
|
+
varMap = /* @__PURE__ */ new Map();
|
|
11231
|
+
letDeclOpMap = /* @__PURE__ */ new Map();
|
|
11232
|
+
statements = [];
|
|
10921
11233
|
constructor(tcb, parent = null, guard = null) {
|
|
10922
11234
|
this.tcb = tcb;
|
|
10923
11235
|
this.parent = parent;
|
|
10924
11236
|
this.guard = guard;
|
|
10925
|
-
this.opQueue = [];
|
|
10926
|
-
this.elementOpMap = /* @__PURE__ */ new Map();
|
|
10927
|
-
this.directiveOpMap = /* @__PURE__ */ new Map();
|
|
10928
|
-
this.referenceOpMap = /* @__PURE__ */ new Map();
|
|
10929
|
-
this.templateCtxOpMap = /* @__PURE__ */ new Map();
|
|
10930
|
-
this.varMap = /* @__PURE__ */ new Map();
|
|
10931
|
-
this.letDeclOpMap = /* @__PURE__ */ new Map();
|
|
10932
|
-
this.statements = [];
|
|
10933
11237
|
}
|
|
10934
11238
|
static forNodes(tcb, parentScope, scopedNode, children, guard) {
|
|
10935
11239
|
const scope = new _Scope(tcb, parentScope, guard);
|
|
@@ -11293,16 +11597,14 @@ var _Scope = class {
|
|
|
11293
11597
|
}
|
|
11294
11598
|
};
|
|
11295
11599
|
var Scope = _Scope;
|
|
11296
|
-
(
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
]);
|
|
11305
|
-
})();
|
|
11600
|
+
__publicField(Scope, "forLoopContextVariableTypes", /* @__PURE__ */ new Map([
|
|
11601
|
+
["$first", ts41.SyntaxKind.BooleanKeyword],
|
|
11602
|
+
["$last", ts41.SyntaxKind.BooleanKeyword],
|
|
11603
|
+
["$even", ts41.SyntaxKind.BooleanKeyword],
|
|
11604
|
+
["$odd", ts41.SyntaxKind.BooleanKeyword],
|
|
11605
|
+
["$index", ts41.SyntaxKind.NumberKeyword],
|
|
11606
|
+
["$count", ts41.SyntaxKind.NumberKeyword]
|
|
11607
|
+
]));
|
|
11306
11608
|
function tcbThisParam(name, typeArguments) {
|
|
11307
11609
|
return ts41.factory.createParameterDeclaration(
|
|
11308
11610
|
void 0,
|
|
@@ -11318,6 +11620,8 @@ function tcbExpression(ast, tcb, scope) {
|
|
|
11318
11620
|
return translator.translate(ast);
|
|
11319
11621
|
}
|
|
11320
11622
|
var TcbExpressionTranslator = class {
|
|
11623
|
+
tcb;
|
|
11624
|
+
scope;
|
|
11321
11625
|
constructor(tcb, scope) {
|
|
11322
11626
|
this.tcb = tcb;
|
|
11323
11627
|
this.scope = scope;
|
|
@@ -11559,6 +11863,8 @@ var TcbEventHandlerTranslator = class extends TcbExpressionTranslator {
|
|
|
11559
11863
|
}
|
|
11560
11864
|
};
|
|
11561
11865
|
var TcbForLoopTrackTranslator = class extends TcbExpressionTranslator {
|
|
11866
|
+
block;
|
|
11867
|
+
allowedVariables;
|
|
11562
11868
|
constructor(tcb, scope, block) {
|
|
11563
11869
|
super(tcb, scope);
|
|
11564
11870
|
this.block = block;
|
|
@@ -11583,14 +11889,15 @@ var TcbForLoopTrackTranslator = class extends TcbExpressionTranslator {
|
|
|
11583
11889
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
|
|
11584
11890
|
import ts42 from "typescript";
|
|
11585
11891
|
var TypeCheckFile = class extends Environment {
|
|
11892
|
+
fileName;
|
|
11893
|
+
nextTcbId = 1;
|
|
11894
|
+
tcbStatements = [];
|
|
11586
11895
|
constructor(fileName, config, refEmitter, reflector, compilerHost) {
|
|
11587
11896
|
super(config, new ImportManager({
|
|
11588
11897
|
forceGenerateNamespacesForNewImports: true,
|
|
11589
11898
|
shouldUseSingleQuotes: () => true
|
|
11590
11899
|
}), refEmitter, reflector, ts42.createSourceFile(compilerHost.getCanonicalFileName(fileName), "", ts42.ScriptTarget.Latest, true));
|
|
11591
11900
|
this.fileName = fileName;
|
|
11592
|
-
this.nextTcbId = 1;
|
|
11593
|
-
this.tcbStatements = [];
|
|
11594
11901
|
}
|
|
11595
11902
|
addTypeCheckBlock(ref, meta, domSchemaChecker, oobRecorder, genericContextBehavior) {
|
|
11596
11903
|
const fnId = ts42.factory.createIdentifier(`_tcb${this.nextTcbId++}`);
|
|
@@ -11635,6 +11942,14 @@ var InliningMode;
|
|
|
11635
11942
|
InliningMode2[InliningMode2["Error"] = 1] = "Error";
|
|
11636
11943
|
})(InliningMode || (InliningMode = {}));
|
|
11637
11944
|
var TypeCheckContextImpl = class {
|
|
11945
|
+
config;
|
|
11946
|
+
compilerHost;
|
|
11947
|
+
refEmitter;
|
|
11948
|
+
reflector;
|
|
11949
|
+
host;
|
|
11950
|
+
inlining;
|
|
11951
|
+
perf;
|
|
11952
|
+
fileMap = /* @__PURE__ */ new Map();
|
|
11638
11953
|
constructor(config, compilerHost, refEmitter, reflector, host, inlining, perf) {
|
|
11639
11954
|
this.config = config;
|
|
11640
11955
|
this.compilerHost = compilerHost;
|
|
@@ -11643,13 +11958,12 @@ var TypeCheckContextImpl = class {
|
|
|
11643
11958
|
this.host = host;
|
|
11644
11959
|
this.inlining = inlining;
|
|
11645
11960
|
this.perf = perf;
|
|
11646
|
-
this.fileMap = /* @__PURE__ */ new Map();
|
|
11647
|
-
this.opMap = /* @__PURE__ */ new Map();
|
|
11648
|
-
this.typeCtorPending = /* @__PURE__ */ new Set();
|
|
11649
11961
|
if (inlining === InliningMode.Error && config.useInlineTypeConstructors) {
|
|
11650
11962
|
throw new Error(`AssertionError: invalid inlining configuration.`);
|
|
11651
11963
|
}
|
|
11652
11964
|
}
|
|
11965
|
+
opMap = /* @__PURE__ */ new Map();
|
|
11966
|
+
typeCtorPending = /* @__PURE__ */ new Set();
|
|
11653
11967
|
addTemplate(ref, binder, template, pipes, schemas, sourceMapping, file, parseErrors, isStandalone, preserveWhitespaces) {
|
|
11654
11968
|
if (!this.host.shouldCheckComponent(ref.node)) {
|
|
11655
11969
|
return;
|
|
@@ -11846,6 +12160,12 @@ function getTemplateDiagnostics(parseErrors, templateId, sourceMapping) {
|
|
|
11846
12160
|
});
|
|
11847
12161
|
}
|
|
11848
12162
|
var InlineTcbOp = class {
|
|
12163
|
+
ref;
|
|
12164
|
+
meta;
|
|
12165
|
+
config;
|
|
12166
|
+
reflector;
|
|
12167
|
+
domSchemaChecker;
|
|
12168
|
+
oobRecorder;
|
|
11849
12169
|
constructor(ref, meta, config, reflector, domSchemaChecker, oobRecorder) {
|
|
11850
12170
|
this.ref = ref;
|
|
11851
12171
|
this.meta = meta;
|
|
@@ -11865,6 +12185,9 @@ var InlineTcbOp = class {
|
|
|
11865
12185
|
}
|
|
11866
12186
|
};
|
|
11867
12187
|
var TypeCtorOp = class {
|
|
12188
|
+
ref;
|
|
12189
|
+
reflector;
|
|
12190
|
+
meta;
|
|
11868
12191
|
constructor(ref, reflector, meta) {
|
|
11869
12192
|
this.ref = ref;
|
|
11870
12193
|
this.reflector = reflector;
|
|
@@ -11926,10 +12249,12 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
|
|
|
11926
12249
|
|
|
11927
12250
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
11928
12251
|
var TemplateSource = class {
|
|
12252
|
+
mapping;
|
|
12253
|
+
file;
|
|
12254
|
+
lineStarts = null;
|
|
11929
12255
|
constructor(mapping, file) {
|
|
11930
12256
|
this.mapping = mapping;
|
|
11931
12257
|
this.file = file;
|
|
11932
|
-
this.lineStarts = null;
|
|
11933
12258
|
}
|
|
11934
12259
|
toParseSourceSpan(start, end) {
|
|
11935
12260
|
const startLoc = this.toParseLocation(start);
|
|
@@ -11949,9 +12274,7 @@ var TemplateSource = class {
|
|
|
11949
12274
|
}
|
|
11950
12275
|
};
|
|
11951
12276
|
var TemplateSourceManager = class {
|
|
11952
|
-
|
|
11953
|
-
this.templateSources = /* @__PURE__ */ new Map();
|
|
11954
|
-
}
|
|
12277
|
+
templateSources = /* @__PURE__ */ new Map();
|
|
11955
12278
|
getTemplateId(node) {
|
|
11956
12279
|
return getTemplateId(node);
|
|
11957
12280
|
}
|
|
@@ -11979,6 +12302,13 @@ var TemplateSourceManager = class {
|
|
|
11979
12302
|
import { AST, ASTWithName, ASTWithSource as ASTWithSource2, BindingPipe as BindingPipe2, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers5, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement3, TmplAstLetDeclaration as TmplAstLetDeclaration3, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
|
|
11980
12303
|
import ts44 from "typescript";
|
|
11981
12304
|
var SymbolBuilder = class {
|
|
12305
|
+
tcbPath;
|
|
12306
|
+
tcbIsShim;
|
|
12307
|
+
typeCheckBlock;
|
|
12308
|
+
templateData;
|
|
12309
|
+
componentScopeReader;
|
|
12310
|
+
getTypeChecker;
|
|
12311
|
+
symbolCache = /* @__PURE__ */ new Map();
|
|
11982
12312
|
constructor(tcbPath, tcbIsShim, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
|
|
11983
12313
|
this.tcbPath = tcbPath;
|
|
11984
12314
|
this.tcbIsShim = tcbIsShim;
|
|
@@ -11986,7 +12316,6 @@ var SymbolBuilder = class {
|
|
|
11986
12316
|
this.templateData = templateData;
|
|
11987
12317
|
this.componentScopeReader = componentScopeReader;
|
|
11988
12318
|
this.getTypeChecker = getTypeChecker;
|
|
11989
|
-
this.symbolCache = /* @__PURE__ */ new Map();
|
|
11990
12319
|
}
|
|
11991
12320
|
getSymbol(node) {
|
|
11992
12321
|
if (this.symbolCache.has(node)) {
|
|
@@ -12554,6 +12883,26 @@ function unwrapSignalInputWriteTAccessor(expr) {
|
|
|
12554
12883
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
12555
12884
|
var REGISTRY2 = new DomElementSchemaRegistry2();
|
|
12556
12885
|
var TemplateTypeCheckerImpl = class {
|
|
12886
|
+
originalProgram;
|
|
12887
|
+
programDriver;
|
|
12888
|
+
typeCheckAdapter;
|
|
12889
|
+
config;
|
|
12890
|
+
refEmitter;
|
|
12891
|
+
reflector;
|
|
12892
|
+
compilerHost;
|
|
12893
|
+
priorBuild;
|
|
12894
|
+
metaReader;
|
|
12895
|
+
localMetaReader;
|
|
12896
|
+
ngModuleIndex;
|
|
12897
|
+
componentScopeReader;
|
|
12898
|
+
typeCheckScopeRegistry;
|
|
12899
|
+
perf;
|
|
12900
|
+
state = /* @__PURE__ */ new Map();
|
|
12901
|
+
completionCache = /* @__PURE__ */ new Map();
|
|
12902
|
+
symbolBuilderCache = /* @__PURE__ */ new Map();
|
|
12903
|
+
scopeCache = /* @__PURE__ */ new Map();
|
|
12904
|
+
elementTagCache = /* @__PURE__ */ new Map();
|
|
12905
|
+
isComplete = false;
|
|
12557
12906
|
constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, metaReader, localMetaReader, ngModuleIndex, componentScopeReader, typeCheckScopeRegistry, perf) {
|
|
12558
12907
|
this.originalProgram = originalProgram;
|
|
12559
12908
|
this.programDriver = programDriver;
|
|
@@ -12569,15 +12918,9 @@ var TemplateTypeCheckerImpl = class {
|
|
|
12569
12918
|
this.componentScopeReader = componentScopeReader;
|
|
12570
12919
|
this.typeCheckScopeRegistry = typeCheckScopeRegistry;
|
|
12571
12920
|
this.perf = perf;
|
|
12572
|
-
this.state = /* @__PURE__ */ new Map();
|
|
12573
|
-
this.completionCache = /* @__PURE__ */ new Map();
|
|
12574
|
-
this.symbolBuilderCache = /* @__PURE__ */ new Map();
|
|
12575
|
-
this.scopeCache = /* @__PURE__ */ new Map();
|
|
12576
|
-
this.elementTagCache = /* @__PURE__ */ new Map();
|
|
12577
|
-
this.isComplete = false;
|
|
12578
12921
|
}
|
|
12579
12922
|
getTemplate(component, optimizeFor) {
|
|
12580
|
-
const { data } = this.getLatestComponentState(component);
|
|
12923
|
+
const { data } = this.getLatestComponentState(component, optimizeFor);
|
|
12581
12924
|
if (data === null) {
|
|
12582
12925
|
return null;
|
|
12583
12926
|
}
|
|
@@ -12893,16 +13236,16 @@ var TemplateTypeCheckerImpl = class {
|
|
|
12893
13236
|
this.perf.memory(PerfCheckpoint.TtcUpdateProgram);
|
|
12894
13237
|
});
|
|
12895
13238
|
}
|
|
12896
|
-
getFileData(
|
|
12897
|
-
if (!this.state.has(
|
|
12898
|
-
this.state.set(
|
|
13239
|
+
getFileData(path) {
|
|
13240
|
+
if (!this.state.has(path)) {
|
|
13241
|
+
this.state.set(path, {
|
|
12899
13242
|
hasInlines: false,
|
|
12900
13243
|
sourceManager: new TemplateSourceManager(),
|
|
12901
13244
|
isComplete: false,
|
|
12902
13245
|
shimData: /* @__PURE__ */ new Map()
|
|
12903
13246
|
});
|
|
12904
13247
|
}
|
|
12905
|
-
return this.state.get(
|
|
13248
|
+
return this.state.get(path);
|
|
12906
13249
|
}
|
|
12907
13250
|
getSymbolOfNode(node, component) {
|
|
12908
13251
|
const builder = this.getOrCreateSymbolBuilder(component);
|
|
@@ -13178,6 +13521,7 @@ function convertDiagnostic(diag, sourceResolver) {
|
|
|
13178
13521
|
return translateDiagnostic(diag, sourceResolver);
|
|
13179
13522
|
}
|
|
13180
13523
|
var WholeProgramTypeCheckingHost = class {
|
|
13524
|
+
impl;
|
|
13181
13525
|
constructor(impl) {
|
|
13182
13526
|
this.impl = impl;
|
|
13183
13527
|
}
|
|
@@ -13202,11 +13546,14 @@ var WholeProgramTypeCheckingHost = class {
|
|
|
13202
13546
|
}
|
|
13203
13547
|
};
|
|
13204
13548
|
var SingleFileTypeCheckingHost = class {
|
|
13549
|
+
sfPath;
|
|
13550
|
+
fileData;
|
|
13551
|
+
impl;
|
|
13552
|
+
seenInlines = false;
|
|
13205
13553
|
constructor(sfPath, fileData, impl) {
|
|
13206
13554
|
this.sfPath = sfPath;
|
|
13207
13555
|
this.fileData = fileData;
|
|
13208
13556
|
this.impl = impl;
|
|
13209
|
-
this.seenInlines = false;
|
|
13210
13557
|
}
|
|
13211
13558
|
assertPath(sfPath) {
|
|
13212
13559
|
if (this.sfPath !== sfPath) {
|
|
@@ -13241,6 +13588,7 @@ var SingleFileTypeCheckingHost = class {
|
|
|
13241
13588
|
}
|
|
13242
13589
|
};
|
|
13243
13590
|
var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
13591
|
+
shimPath;
|
|
13244
13592
|
constructor(sfPath, fileData, impl, shimPath) {
|
|
13245
13593
|
super(sfPath, fileData, impl);
|
|
13246
13594
|
this.shimPath = shimPath;
|
|
@@ -13257,18 +13605,231 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
|
13257
13605
|
}
|
|
13258
13606
|
};
|
|
13259
13607
|
|
|
13608
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
13609
|
+
import { outputAst as o3 } from "@angular/compiler";
|
|
13610
|
+
|
|
13611
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/extract_locals.mjs
|
|
13612
|
+
import { outputAst as o2 } from "@angular/compiler";
|
|
13613
|
+
import ts45 from "typescript";
|
|
13614
|
+
function extractHmrLocals(node, definition, factory, classMetadata, debugInfo) {
|
|
13615
|
+
var _a;
|
|
13616
|
+
const name = ts45.isClassDeclaration(node) && node.name ? node.name.text : null;
|
|
13617
|
+
const visitor = new PotentialTopLevelReadsVisitor();
|
|
13618
|
+
const sourceFile = node.getSourceFile();
|
|
13619
|
+
definition.expression.visitExpression(visitor, null);
|
|
13620
|
+
definition.statements.forEach((statement) => statement.visitStatement(visitor, null));
|
|
13621
|
+
(_a = factory.initializer) == null ? void 0 : _a.visitExpression(visitor, null);
|
|
13622
|
+
factory.statements.forEach((statement) => statement.visitStatement(visitor, null));
|
|
13623
|
+
classMetadata == null ? void 0 : classMetadata.visitStatement(visitor, null);
|
|
13624
|
+
debugInfo == null ? void 0 : debugInfo.visitStatement(visitor, null);
|
|
13625
|
+
const availableTopLevel = getTopLevelDeclarationNames(sourceFile);
|
|
13626
|
+
return Array.from(visitor.allReads).filter((r) => r !== name && availableTopLevel.has(r));
|
|
13627
|
+
}
|
|
13628
|
+
function getTopLevelDeclarationNames(sourceFile) {
|
|
13629
|
+
var _a;
|
|
13630
|
+
const results = /* @__PURE__ */ new Set();
|
|
13631
|
+
for (const node of sourceFile.statements) {
|
|
13632
|
+
if (ts45.isClassDeclaration(node) || ts45.isFunctionDeclaration(node) || ts45.isEnumDeclaration(node) && !((_a = node.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts45.SyntaxKind.ConstKeyword))) {
|
|
13633
|
+
if (node.name) {
|
|
13634
|
+
results.add(node.name.text);
|
|
13635
|
+
}
|
|
13636
|
+
continue;
|
|
13637
|
+
}
|
|
13638
|
+
if (ts45.isVariableStatement(node)) {
|
|
13639
|
+
for (const decl of node.declarationList.declarations) {
|
|
13640
|
+
trackBindingName(decl.name, results);
|
|
13641
|
+
}
|
|
13642
|
+
continue;
|
|
13643
|
+
}
|
|
13644
|
+
if (ts45.isImportDeclaration(node) && node.importClause) {
|
|
13645
|
+
const importClause = node.importClause;
|
|
13646
|
+
if (importClause.isTypeOnly) {
|
|
13647
|
+
continue;
|
|
13648
|
+
}
|
|
13649
|
+
if (importClause.name) {
|
|
13650
|
+
results.add(importClause.name.text);
|
|
13651
|
+
}
|
|
13652
|
+
if (importClause.namedBindings) {
|
|
13653
|
+
const namedBindings = importClause.namedBindings;
|
|
13654
|
+
if (ts45.isNamespaceImport(namedBindings)) {
|
|
13655
|
+
results.add(namedBindings.name.text);
|
|
13656
|
+
} else {
|
|
13657
|
+
namedBindings.elements.forEach((el) => {
|
|
13658
|
+
if (!el.isTypeOnly) {
|
|
13659
|
+
results.add(el.name.text);
|
|
13660
|
+
}
|
|
13661
|
+
});
|
|
13662
|
+
}
|
|
13663
|
+
}
|
|
13664
|
+
continue;
|
|
13665
|
+
}
|
|
13666
|
+
}
|
|
13667
|
+
return results;
|
|
13668
|
+
}
|
|
13669
|
+
function trackBindingName(node, results) {
|
|
13670
|
+
if (ts45.isIdentifier(node)) {
|
|
13671
|
+
results.add(node.text);
|
|
13672
|
+
} else {
|
|
13673
|
+
for (const el of node.elements) {
|
|
13674
|
+
if (!ts45.isOmittedExpression(el)) {
|
|
13675
|
+
trackBindingName(el.name, results);
|
|
13676
|
+
}
|
|
13677
|
+
}
|
|
13678
|
+
}
|
|
13679
|
+
}
|
|
13680
|
+
var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
13681
|
+
allReads = /* @__PURE__ */ new Set();
|
|
13682
|
+
visitReadVarExpr(ast, context) {
|
|
13683
|
+
this.allReads.add(ast.name);
|
|
13684
|
+
super.visitReadVarExpr(ast, context);
|
|
13685
|
+
}
|
|
13686
|
+
visitWrappedNodeExpr(ast, context) {
|
|
13687
|
+
if (this.isTypeScriptNode(ast.node)) {
|
|
13688
|
+
this.addAllTopLevelIdentifiers(ast.node);
|
|
13689
|
+
}
|
|
13690
|
+
super.visitWrappedNodeExpr(ast, context);
|
|
13691
|
+
}
|
|
13692
|
+
addAllTopLevelIdentifiers = (node) => {
|
|
13693
|
+
if (ts45.isIdentifier(node) && this.isTopLevelIdentifierReference(node)) {
|
|
13694
|
+
this.allReads.add(node.text);
|
|
13695
|
+
} else {
|
|
13696
|
+
ts45.forEachChild(node, this.addAllTopLevelIdentifiers);
|
|
13697
|
+
}
|
|
13698
|
+
};
|
|
13699
|
+
isTopLevelIdentifierReference(node) {
|
|
13700
|
+
const parent = node.parent;
|
|
13701
|
+
if (!parent) {
|
|
13702
|
+
return false;
|
|
13703
|
+
}
|
|
13704
|
+
if (ts45.isSourceFile(parent) || ts45.isExpressionStatement(parent) && parent.expression === node) {
|
|
13705
|
+
return true;
|
|
13706
|
+
}
|
|
13707
|
+
if (ts45.isCallExpression(parent)) {
|
|
13708
|
+
return parent.expression === node || parent.arguments.includes(node);
|
|
13709
|
+
}
|
|
13710
|
+
if (ts45.isPropertyAccessExpression(parent)) {
|
|
13711
|
+
return parent.expression === node;
|
|
13712
|
+
}
|
|
13713
|
+
if (ts45.isArrayLiteralExpression(parent)) {
|
|
13714
|
+
return parent.elements.includes(node);
|
|
13715
|
+
}
|
|
13716
|
+
if (ts45.isPropertyAssignment(parent)) {
|
|
13717
|
+
return parent.initializer === node;
|
|
13718
|
+
}
|
|
13719
|
+
if (ts45.isClassDeclaration(parent)) {
|
|
13720
|
+
return parent.name === node;
|
|
13721
|
+
}
|
|
13722
|
+
return false;
|
|
13723
|
+
}
|
|
13724
|
+
isTypeScriptNode(value) {
|
|
13725
|
+
return !!value && typeof value.kind === "number";
|
|
13726
|
+
}
|
|
13727
|
+
};
|
|
13728
|
+
|
|
13729
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
13730
|
+
function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, classMetadata, debugInfo) {
|
|
13731
|
+
if (!reflection.isClass(clazz)) {
|
|
13732
|
+
return null;
|
|
13733
|
+
}
|
|
13734
|
+
const sourceFile = clazz.getSourceFile();
|
|
13735
|
+
const filePath = getProjectRelativePath(sourceFile, rootDirs, compilerHost) || compilerHost.getCanonicalFileName(sourceFile.fileName);
|
|
13736
|
+
const meta = {
|
|
13737
|
+
type: new o3.WrappedNodeExpr(clazz.name),
|
|
13738
|
+
className: clazz.name.text,
|
|
13739
|
+
filePath,
|
|
13740
|
+
locals: extractHmrLocals(clazz, definition, factory, classMetadata, debugInfo),
|
|
13741
|
+
coreName: "__ngCore__"
|
|
13742
|
+
};
|
|
13743
|
+
return meta;
|
|
13744
|
+
}
|
|
13745
|
+
|
|
13746
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/update_declaration.mjs
|
|
13747
|
+
import { compileHmrUpdateCallback } from "@angular/compiler";
|
|
13748
|
+
import ts46 from "typescript";
|
|
13749
|
+
function getHmrUpdateDeclaration(compilationResults, constantStatements, meta, sourceFile) {
|
|
13750
|
+
const importRewriter = new HmrModuleImportRewriter(meta.coreName);
|
|
13751
|
+
const importManager = new ImportManager({
|
|
13752
|
+
...presetImportManagerForceNamespaceImports,
|
|
13753
|
+
rewriter: importRewriter
|
|
13754
|
+
});
|
|
13755
|
+
const callback = compileHmrUpdateCallback(compilationResults, constantStatements, meta);
|
|
13756
|
+
const node = translateStatement(sourceFile, callback, importManager);
|
|
13757
|
+
return ts46.factory.updateFunctionDeclaration(node, [
|
|
13758
|
+
ts46.factory.createToken(ts46.SyntaxKind.ExportKeyword),
|
|
13759
|
+
ts46.factory.createToken(ts46.SyntaxKind.DefaultKeyword)
|
|
13760
|
+
], node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
|
|
13761
|
+
}
|
|
13762
|
+
var HmrModuleImportRewriter = class {
|
|
13763
|
+
coreName;
|
|
13764
|
+
constructor(coreName) {
|
|
13765
|
+
this.coreName = coreName;
|
|
13766
|
+
}
|
|
13767
|
+
rewriteNamespaceImportIdentifier(specifier, moduleName) {
|
|
13768
|
+
return moduleName === "@angular/core" ? this.coreName : specifier;
|
|
13769
|
+
}
|
|
13770
|
+
rewriteSymbol(symbol) {
|
|
13771
|
+
return symbol;
|
|
13772
|
+
}
|
|
13773
|
+
rewriteSpecifier(specifier) {
|
|
13774
|
+
return specifier;
|
|
13775
|
+
}
|
|
13776
|
+
};
|
|
13777
|
+
|
|
13260
13778
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
13261
13779
|
var EMPTY_ARRAY2 = [];
|
|
13262
13780
|
var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
|
|
13263
13781
|
var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
|
|
13264
13782
|
var ComponentDecoratorHandler = class {
|
|
13265
|
-
|
|
13783
|
+
reflector;
|
|
13784
|
+
evaluator;
|
|
13785
|
+
metaRegistry;
|
|
13786
|
+
metaReader;
|
|
13787
|
+
scopeReader;
|
|
13788
|
+
compilerHost;
|
|
13789
|
+
scopeRegistry;
|
|
13790
|
+
typeCheckScopeRegistry;
|
|
13791
|
+
resourceRegistry;
|
|
13792
|
+
isCore;
|
|
13793
|
+
strictCtorDeps;
|
|
13794
|
+
resourceLoader;
|
|
13795
|
+
rootDirs;
|
|
13796
|
+
defaultPreserveWhitespaces;
|
|
13797
|
+
i18nUseExternalIds;
|
|
13798
|
+
enableI18nLegacyMessageIdFormat;
|
|
13799
|
+
usePoisonedData;
|
|
13800
|
+
i18nNormalizeLineEndingsInICUs;
|
|
13801
|
+
moduleResolver;
|
|
13802
|
+
cycleAnalyzer;
|
|
13803
|
+
cycleHandlingStrategy;
|
|
13804
|
+
refEmitter;
|
|
13805
|
+
referencesRegistry;
|
|
13806
|
+
depTracker;
|
|
13807
|
+
injectableRegistry;
|
|
13808
|
+
semanticDepGraphUpdater;
|
|
13809
|
+
annotateForClosureCompiler;
|
|
13810
|
+
perf;
|
|
13811
|
+
hostDirectivesResolver;
|
|
13812
|
+
importTracker;
|
|
13813
|
+
includeClassMetadata;
|
|
13814
|
+
compilationMode;
|
|
13815
|
+
deferredSymbolTracker;
|
|
13816
|
+
forbidOrphanRendering;
|
|
13817
|
+
enableBlockSyntax;
|
|
13818
|
+
enableLetSyntax;
|
|
13819
|
+
externalRuntimeStyles;
|
|
13820
|
+
localCompilationExtraImportsTracker;
|
|
13821
|
+
jitDeclarationRegistry;
|
|
13822
|
+
i18nPreserveSignificantWhitespace;
|
|
13823
|
+
strictStandalone;
|
|
13824
|
+
enableHmr;
|
|
13825
|
+
implicitStandaloneValue;
|
|
13826
|
+
constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, compilerHost, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, importTracker, includeClassMetadata, compilationMode, deferredSymbolTracker, forbidOrphanRendering, enableBlockSyntax, enableLetSyntax, externalRuntimeStyles, localCompilationExtraImportsTracker, jitDeclarationRegistry, i18nPreserveSignificantWhitespace, strictStandalone, enableHmr, implicitStandaloneValue) {
|
|
13266
13827
|
this.reflector = reflector;
|
|
13267
13828
|
this.evaluator = evaluator;
|
|
13268
13829
|
this.metaRegistry = metaRegistry;
|
|
13269
13830
|
this.metaReader = metaReader;
|
|
13270
13831
|
this.scopeReader = scopeReader;
|
|
13271
|
-
this.
|
|
13832
|
+
this.compilerHost = compilerHost;
|
|
13272
13833
|
this.scopeRegistry = scopeRegistry;
|
|
13273
13834
|
this.typeCheckScopeRegistry = typeCheckScopeRegistry;
|
|
13274
13835
|
this.resourceRegistry = resourceRegistry;
|
|
@@ -13304,12 +13865,8 @@ var ComponentDecoratorHandler = class {
|
|
|
13304
13865
|
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
13305
13866
|
this.i18nPreserveSignificantWhitespace = i18nPreserveSignificantWhitespace;
|
|
13306
13867
|
this.strictStandalone = strictStandalone;
|
|
13307
|
-
this.
|
|
13308
|
-
this.
|
|
13309
|
-
this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
|
|
13310
|
-
this.preanalyzeStylesCache = /* @__PURE__ */ new Map();
|
|
13311
|
-
this.precedence = HandlerPrecedence.PRIMARY;
|
|
13312
|
-
this.name = "ComponentDecoratorHandler";
|
|
13868
|
+
this.enableHmr = enableHmr;
|
|
13869
|
+
this.implicitStandaloneValue = implicitStandaloneValue;
|
|
13313
13870
|
this.extractTemplateOptions = {
|
|
13314
13871
|
enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
|
|
13315
13872
|
i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
|
|
@@ -13318,7 +13875,16 @@ var ComponentDecoratorHandler = class {
|
|
|
13318
13875
|
enableLetSyntax: this.enableLetSyntax,
|
|
13319
13876
|
preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
|
|
13320
13877
|
};
|
|
13321
|
-
|
|
13878
|
+
this.canDeferDeps = !enableHmr;
|
|
13879
|
+
}
|
|
13880
|
+
literalCache = /* @__PURE__ */ new Map();
|
|
13881
|
+
elementSchemaRegistry = new DomElementSchemaRegistry3();
|
|
13882
|
+
preanalyzeTemplateCache = /* @__PURE__ */ new Map();
|
|
13883
|
+
preanalyzeStylesCache = /* @__PURE__ */ new Map();
|
|
13884
|
+
canDeferDeps;
|
|
13885
|
+
extractTemplateOptions;
|
|
13886
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
13887
|
+
name = "ComponentDecoratorHandler";
|
|
13322
13888
|
detect(node, decorators) {
|
|
13323
13889
|
if (!decorators) {
|
|
13324
13890
|
return void 0;
|
|
@@ -13409,7 +13975,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13409
13975
|
this.literalCache.delete(decorator);
|
|
13410
13976
|
let diagnostics;
|
|
13411
13977
|
let isPoisoned = false;
|
|
13412
|
-
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.importTracker, this.evaluator, this.refEmitter, this.referencesRegistry, this.isCore, this.annotateForClosureCompiler, this.compilationMode, this.elementSchemaRegistry.getDefaultComponentElementName(), this.strictStandalone);
|
|
13978
|
+
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.importTracker, this.evaluator, this.refEmitter, this.referencesRegistry, this.isCore, this.annotateForClosureCompiler, this.compilationMode, this.elementSchemaRegistry.getDefaultComponentElementName(), this.strictStandalone, this.implicitStandaloneValue);
|
|
13413
13979
|
if (directiveResult.jitForced) {
|
|
13414
13980
|
this.jitDeclarationRegistry.jitDeclarations.add(node);
|
|
13415
13981
|
return {};
|
|
@@ -13420,13 +13986,13 @@ var ComponentDecoratorHandler = class {
|
|
|
13420
13986
|
if (this.compilationMode !== CompilationMode.LOCAL) {
|
|
13421
13987
|
changeDetection = resolveEnumValue(this.evaluator, component, "changeDetection", "ChangeDetectionStrategy");
|
|
13422
13988
|
} else if (component.has("changeDetection")) {
|
|
13423
|
-
changeDetection = new
|
|
13989
|
+
changeDetection = new o4.WrappedNodeExpr(component.get("changeDetection"));
|
|
13424
13990
|
}
|
|
13425
13991
|
let animations = null;
|
|
13426
13992
|
let animationTriggerNames = null;
|
|
13427
13993
|
if (component.has("animations")) {
|
|
13428
13994
|
const animationExpression = component.get("animations");
|
|
13429
|
-
animations = new
|
|
13995
|
+
animations = new o4.WrappedNodeExpr(animationExpression);
|
|
13430
13996
|
const animationsValue = this.evaluator.evaluate(animationExpression, animationTriggerResolver);
|
|
13431
13997
|
animationTriggerNames = { includesDynamicAnimations: false, staticTriggerNames: [] };
|
|
13432
13998
|
collectAnimationNames(animationsValue, animationTriggerNames);
|
|
@@ -13445,7 +14011,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13445
14011
|
if (component.has("viewProviders")) {
|
|
13446
14012
|
const viewProviders = component.get("viewProviders");
|
|
13447
14013
|
viewProvidersRequiringFactory = resolveProvidersRequiringFactory(viewProviders, this.reflector, this.evaluator);
|
|
13448
|
-
wrappedViewProviders = new
|
|
14014
|
+
wrappedViewProviders = new o4.WrappedNodeExpr(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(viewProviders) : viewProviders);
|
|
13449
14015
|
}
|
|
13450
14016
|
if (component.has("providers")) {
|
|
13451
14017
|
providersRequiringFactory = resolveProvidersRequiringFactory(component.get("providers"), this.reflector, this.evaluator);
|
|
@@ -13548,7 +14114,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13548
14114
|
externalStyles.push(resourceUrl);
|
|
13549
14115
|
continue;
|
|
13550
14116
|
}
|
|
13551
|
-
if (styleUrl.source === 2 &&
|
|
14117
|
+
if (styleUrl.source === 2 && ts47.isStringLiteralLike(styleUrl.expression)) {
|
|
13552
14118
|
styleResources.add({
|
|
13553
14119
|
path: absoluteFrom(resourceUrl),
|
|
13554
14120
|
expression: styleUrl.expression
|
|
@@ -13638,13 +14204,14 @@ var ComponentDecoratorHandler = class {
|
|
|
13638
14204
|
viewProviders: wrappedViewProviders,
|
|
13639
14205
|
i18nUseExternalIds: this.i18nUseExternalIds,
|
|
13640
14206
|
relativeContextFilePath,
|
|
13641
|
-
rawImports: rawImports !== null ? new
|
|
14207
|
+
rawImports: rawImports !== null ? new o4.WrappedNodeExpr(rawImports) : void 0
|
|
13642
14208
|
},
|
|
13643
14209
|
typeCheckMeta: extractDirectiveTypeCheckMeta(node, inputs, this.reflector),
|
|
13644
14210
|
classMetadata: this.includeClassMetadata ? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, (dec) => transformDecoratorResources(dec, component, styles, template)) : null,
|
|
13645
14211
|
classDebugInfo: extractClassDebugInfo(
|
|
13646
14212
|
node,
|
|
13647
14213
|
this.reflector,
|
|
14214
|
+
this.compilerHost,
|
|
13648
14215
|
this.rootDirs,
|
|
13649
14216
|
this.forbidOrphanRendering
|
|
13650
14217
|
),
|
|
@@ -13749,7 +14316,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13749
14316
|
}
|
|
13750
14317
|
typeCheck(ctx, node, meta) {
|
|
13751
14318
|
var _a;
|
|
13752
|
-
if (this.typeCheckScopeRegistry === null || !
|
|
14319
|
+
if (this.typeCheckScopeRegistry === null || !ts47.isClassDeclaration(node)) {
|
|
13753
14320
|
return;
|
|
13754
14321
|
}
|
|
13755
14322
|
if (meta.isPoisoned && !this.usePoisonedData) {
|
|
@@ -13986,11 +14553,11 @@ var ComponentDecoratorHandler = class {
|
|
|
13986
14553
|
const importDiagnostics = validateStandaloneImports(analysis.resolvedDeferredImports, analysis.rawDeferredImports, this.metaReader, this.scopeReader, true);
|
|
13987
14554
|
diagnostics.push(...importDiagnostics);
|
|
13988
14555
|
}
|
|
13989
|
-
if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof
|
|
14556
|
+
if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof o4.WrappedNodeExpr) {
|
|
13990
14557
|
const providerDiagnostics = getProviderDiagnostics(analysis.providersRequiringFactory, analysis.meta.providers.node, this.injectableRegistry);
|
|
13991
14558
|
diagnostics.push(...providerDiagnostics);
|
|
13992
14559
|
}
|
|
13993
|
-
if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof
|
|
14560
|
+
if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof o4.WrappedNodeExpr) {
|
|
13994
14561
|
const viewProviderDiagnostics = getProviderDiagnostics(analysis.viewProvidersRequiringFactory, analysis.meta.viewProviders.node, this.injectableRegistry);
|
|
13995
14562
|
diagnostics.push(...viewProviderDiagnostics);
|
|
13996
14563
|
}
|
|
@@ -14043,20 +14610,24 @@ var ComponentDecoratorHandler = class {
|
|
|
14043
14610
|
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
|
|
14044
14611
|
return [];
|
|
14045
14612
|
}
|
|
14046
|
-
const perComponentDeferredDeps = this.resolveAllDeferredDependencies(resolution);
|
|
14613
|
+
const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
|
|
14047
14614
|
const meta = {
|
|
14048
14615
|
...analysis.meta,
|
|
14049
14616
|
...resolution,
|
|
14050
14617
|
defer: this.compileDeferBlocks(resolution)
|
|
14051
14618
|
};
|
|
14052
14619
|
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14053
|
-
|
|
14620
|
+
if (perComponentDeferredDeps !== null) {
|
|
14621
|
+
removeDeferrableTypesFromComponentDecorator(analysis, perComponentDeferredDeps);
|
|
14622
|
+
}
|
|
14054
14623
|
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14055
14624
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14056
14625
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14057
14626
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14058
|
-
const
|
|
14059
|
-
|
|
14627
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14628
|
+
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14629
|
+
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14630
|
+
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
14060
14631
|
}
|
|
14061
14632
|
compilePartial(node, analysis, resolution) {
|
|
14062
14633
|
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
|
|
@@ -14066,9 +14637,9 @@ var ComponentDecoratorHandler = class {
|
|
|
14066
14637
|
content: analysis.template.content,
|
|
14067
14638
|
sourceUrl: analysis.template.declaration.resolvedTemplateUrl,
|
|
14068
14639
|
isInline: analysis.template.declaration.isInline,
|
|
14069
|
-
inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new
|
|
14640
|
+
inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new o4.WrappedNodeExpr(analysis.template.sourceMapping.node) : null
|
|
14070
14641
|
};
|
|
14071
|
-
const perComponentDeferredDeps = this.resolveAllDeferredDependencies(resolution);
|
|
14642
|
+
const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
|
|
14072
14643
|
const meta = {
|
|
14073
14644
|
...analysis.meta,
|
|
14074
14645
|
...resolution,
|
|
@@ -14078,26 +14649,48 @@ var ComponentDecoratorHandler = class {
|
|
|
14078
14649
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14079
14650
|
const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
|
|
14080
14651
|
const classMetadata = analysis.classMetadata !== null ? compileComponentDeclareClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14081
|
-
const
|
|
14082
|
-
|
|
14652
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, null) : null;
|
|
14653
|
+
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14654
|
+
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14655
|
+
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, null, hmrInitializer);
|
|
14083
14656
|
}
|
|
14084
14657
|
compileLocal(node, analysis, resolution, pool) {
|
|
14085
|
-
const deferrableTypes = analysis.explicitlyDeferredTypes;
|
|
14658
|
+
const deferrableTypes = this.canDeferDeps ? analysis.explicitlyDeferredTypes : null;
|
|
14086
14659
|
const meta = {
|
|
14087
14660
|
...analysis.meta,
|
|
14088
14661
|
...resolution,
|
|
14089
14662
|
defer: this.compileDeferBlocks(resolution)
|
|
14090
14663
|
};
|
|
14091
|
-
if (
|
|
14092
|
-
removeDeferrableTypesFromComponentDecorator(analysis,
|
|
14664
|
+
if (deferrableTypes !== null) {
|
|
14665
|
+
removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes);
|
|
14093
14666
|
}
|
|
14094
14667
|
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14095
14668
|
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14096
14669
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14097
14670
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, deferrableTypes).toStmt() : null;
|
|
14098
14671
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14099
|
-
const
|
|
14100
|
-
|
|
14672
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14673
|
+
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14674
|
+
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14675
|
+
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
14676
|
+
}
|
|
14677
|
+
compileHmrUpdateDeclaration(node, analysis, resolution) {
|
|
14678
|
+
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
|
|
14679
|
+
return null;
|
|
14680
|
+
}
|
|
14681
|
+
const pool = new ConstantPool2();
|
|
14682
|
+
const meta = {
|
|
14683
|
+
...analysis.meta,
|
|
14684
|
+
...resolution,
|
|
14685
|
+
defer: this.compileDeferBlocks(resolution)
|
|
14686
|
+
};
|
|
14687
|
+
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14688
|
+
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14689
|
+
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, null).toStmt() : null;
|
|
14690
|
+
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14691
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14692
|
+
const res = compileResults(fac, def, classMetadata, "\u0275cmp", null, null, debugInfo, null);
|
|
14693
|
+
return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node.getSourceFile());
|
|
14101
14694
|
}
|
|
14102
14695
|
locateDeferBlocksWithoutScope(template) {
|
|
14103
14696
|
const deferBlocks = /* @__PURE__ */ new Map();
|
|
@@ -14127,12 +14720,12 @@ var ComponentDecoratorHandler = class {
|
|
|
14127
14720
|
}
|
|
14128
14721
|
collectExplicitlyDeferredSymbols(rawDeferredImports) {
|
|
14129
14722
|
const deferredTypes = /* @__PURE__ */ new Map();
|
|
14130
|
-
if (!
|
|
14723
|
+
if (!ts47.isArrayLiteralExpression(rawDeferredImports)) {
|
|
14131
14724
|
return deferredTypes;
|
|
14132
14725
|
}
|
|
14133
14726
|
for (const element of rawDeferredImports.elements) {
|
|
14134
14727
|
const node = tryUnwrapForwardRef(element, this.reflector) || element;
|
|
14135
|
-
if (!
|
|
14728
|
+
if (!ts47.isIdentifier(node)) {
|
|
14136
14729
|
continue;
|
|
14137
14730
|
}
|
|
14138
14731
|
const imp = this.reflector.getImportOfIdentifier(node);
|
|
@@ -14199,12 +14792,12 @@ var ComponentDecoratorHandler = class {
|
|
|
14199
14792
|
}
|
|
14200
14793
|
}
|
|
14201
14794
|
registerDeferrableCandidates(componentClassDecl, importsExpr, isDeferredImport, allDeferredDecls, eagerlyUsedDecls, resolutionData) {
|
|
14202
|
-
if (!
|
|
14795
|
+
if (!ts47.isArrayLiteralExpression(importsExpr)) {
|
|
14203
14796
|
return;
|
|
14204
14797
|
}
|
|
14205
14798
|
for (const element of importsExpr.elements) {
|
|
14206
14799
|
const node = tryUnwrapForwardRef(element, this.reflector) || element;
|
|
14207
|
-
if (!
|
|
14800
|
+
if (!ts47.isIdentifier(node)) {
|
|
14208
14801
|
continue;
|
|
14209
14802
|
}
|
|
14210
14803
|
const imp = this.reflector.getImportOfIdentifier(node);
|
|
@@ -14288,7 +14881,7 @@ function removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes)
|
|
|
14288
14881
|
if (analysis.classMetadata) {
|
|
14289
14882
|
const deferrableSymbols = new Set(deferrableTypes.map((t) => t.symbolName));
|
|
14290
14883
|
const rewrittenDecoratorsNode = removeIdentifierReferences(analysis.classMetadata.decorators.node, deferrableSymbols);
|
|
14291
|
-
analysis.classMetadata.decorators = new
|
|
14884
|
+
analysis.classMetadata.decorators = new o4.WrappedNodeExpr(rewrittenDecoratorsNode);
|
|
14292
14885
|
}
|
|
14293
14886
|
}
|
|
14294
14887
|
function validateNoImportOverlap(eagerDeps, deferredDeps, rawDeferredImports) {
|
|
@@ -14338,8 +14931,17 @@ function isDefaultImport(node) {
|
|
|
14338
14931
|
|
|
14339
14932
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
|
|
14340
14933
|
import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr10 } from "@angular/compiler";
|
|
14341
|
-
import
|
|
14934
|
+
import ts48 from "typescript";
|
|
14342
14935
|
var InjectableDecoratorHandler = class {
|
|
14936
|
+
reflector;
|
|
14937
|
+
evaluator;
|
|
14938
|
+
isCore;
|
|
14939
|
+
strictCtorDeps;
|
|
14940
|
+
injectableRegistry;
|
|
14941
|
+
perf;
|
|
14942
|
+
includeClassMetadata;
|
|
14943
|
+
compilationMode;
|
|
14944
|
+
errorOnDuplicateProv;
|
|
14343
14945
|
constructor(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, perf, includeClassMetadata, compilationMode, errorOnDuplicateProv = true) {
|
|
14344
14946
|
this.reflector = reflector;
|
|
14345
14947
|
this.evaluator = evaluator;
|
|
@@ -14350,9 +14952,9 @@ var InjectableDecoratorHandler = class {
|
|
|
14350
14952
|
this.includeClassMetadata = includeClassMetadata;
|
|
14351
14953
|
this.compilationMode = compilationMode;
|
|
14352
14954
|
this.errorOnDuplicateProv = errorOnDuplicateProv;
|
|
14353
|
-
this.precedence = HandlerPrecedence.SHARED;
|
|
14354
|
-
this.name = "InjectableDecoratorHandler";
|
|
14355
14955
|
}
|
|
14956
|
+
precedence = HandlerPrecedence.SHARED;
|
|
14957
|
+
name = "InjectableDecoratorHandler";
|
|
14356
14958
|
detect(node, decorators) {
|
|
14357
14959
|
if (!decorators) {
|
|
14358
14960
|
return void 0;
|
|
@@ -14458,7 +15060,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
14458
15060
|
};
|
|
14459
15061
|
} else if (decorator.args.length === 1) {
|
|
14460
15062
|
const metaNode = decorator.args[0];
|
|
14461
|
-
if (!
|
|
15063
|
+
if (!ts48.isObjectLiteralExpression(metaNode)) {
|
|
14462
15064
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
|
|
14463
15065
|
}
|
|
14464
15066
|
const meta = reflectObjectLiteral(metaNode);
|
|
@@ -14466,7 +15068,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
14466
15068
|
let deps = void 0;
|
|
14467
15069
|
if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
|
|
14468
15070
|
const depsExpr = meta.get("deps");
|
|
14469
|
-
if (!
|
|
15071
|
+
if (!ts48.isArrayLiteralExpression(depsExpr)) {
|
|
14470
15072
|
throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
|
|
14471
15073
|
}
|
|
14472
15074
|
deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
|
|
@@ -14551,12 +15153,12 @@ function getDep(dep, reflector) {
|
|
|
14551
15153
|
}
|
|
14552
15154
|
return true;
|
|
14553
15155
|
}
|
|
14554
|
-
if (
|
|
15156
|
+
if (ts48.isArrayLiteralExpression(dep)) {
|
|
14555
15157
|
dep.elements.forEach((el) => {
|
|
14556
15158
|
let isDecorator = false;
|
|
14557
|
-
if (
|
|
15159
|
+
if (ts48.isIdentifier(el)) {
|
|
14558
15160
|
isDecorator = maybeUpdateDecorator(el, reflector);
|
|
14559
|
-
} else if (
|
|
15161
|
+
} else if (ts48.isNewExpression(el) && ts48.isIdentifier(el.expression)) {
|
|
14560
15162
|
const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
|
|
14561
15163
|
isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
|
|
14562
15164
|
}
|
|
@@ -14570,8 +15172,9 @@ function getDep(dep, reflector) {
|
|
|
14570
15172
|
|
|
14571
15173
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
|
|
14572
15174
|
import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
|
|
14573
|
-
import
|
|
15175
|
+
import ts49 from "typescript";
|
|
14574
15176
|
var PipeSymbol = class extends SemanticSymbol {
|
|
15177
|
+
name;
|
|
14575
15178
|
constructor(decl, name) {
|
|
14576
15179
|
super(decl);
|
|
14577
15180
|
this.name = name;
|
|
@@ -14587,7 +15190,19 @@ var PipeSymbol = class extends SemanticSymbol {
|
|
|
14587
15190
|
}
|
|
14588
15191
|
};
|
|
14589
15192
|
var PipeDecoratorHandler = class {
|
|
14590
|
-
|
|
15193
|
+
reflector;
|
|
15194
|
+
evaluator;
|
|
15195
|
+
metaRegistry;
|
|
15196
|
+
scopeRegistry;
|
|
15197
|
+
injectableRegistry;
|
|
15198
|
+
isCore;
|
|
15199
|
+
perf;
|
|
15200
|
+
includeClassMetadata;
|
|
15201
|
+
compilationMode;
|
|
15202
|
+
generateExtraImportsInLocalMode;
|
|
15203
|
+
strictStandalone;
|
|
15204
|
+
implicitStandaloneValue;
|
|
15205
|
+
constructor(reflector, evaluator, metaRegistry, scopeRegistry, injectableRegistry, isCore, perf, includeClassMetadata, compilationMode, generateExtraImportsInLocalMode, strictStandalone, implicitStandaloneValue) {
|
|
14591
15206
|
this.reflector = reflector;
|
|
14592
15207
|
this.evaluator = evaluator;
|
|
14593
15208
|
this.metaRegistry = metaRegistry;
|
|
@@ -14599,9 +15214,10 @@ var PipeDecoratorHandler = class {
|
|
|
14599
15214
|
this.compilationMode = compilationMode;
|
|
14600
15215
|
this.generateExtraImportsInLocalMode = generateExtraImportsInLocalMode;
|
|
14601
15216
|
this.strictStandalone = strictStandalone;
|
|
14602
|
-
this.
|
|
14603
|
-
this.name = "PipeDecoratorHandler";
|
|
15217
|
+
this.implicitStandaloneValue = implicitStandaloneValue;
|
|
14604
15218
|
}
|
|
15219
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
15220
|
+
name = "PipeDecoratorHandler";
|
|
14605
15221
|
detect(node, decorators) {
|
|
14606
15222
|
if (!decorators) {
|
|
14607
15223
|
return void 0;
|
|
@@ -14629,7 +15245,7 @@ var PipeDecoratorHandler = class {
|
|
|
14629
15245
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, "@Pipe must have exactly one argument");
|
|
14630
15246
|
}
|
|
14631
15247
|
const meta = unwrapExpression(decorator.args[0]);
|
|
14632
|
-
if (!
|
|
15248
|
+
if (!ts49.isObjectLiteralExpression(meta)) {
|
|
14633
15249
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
|
|
14634
15250
|
}
|
|
14635
15251
|
const pipe = reflectObjectLiteral(meta);
|
|
@@ -14650,7 +15266,7 @@ var PipeDecoratorHandler = class {
|
|
|
14650
15266
|
}
|
|
14651
15267
|
pure = pureValue;
|
|
14652
15268
|
}
|
|
14653
|
-
let isStandalone =
|
|
15269
|
+
let isStandalone = this.implicitStandaloneValue;
|
|
14654
15270
|
if (pipe.has("standalone")) {
|
|
14655
15271
|
const expr = pipe.get("standalone");
|
|
14656
15272
|
const resolved = this.evaluator.evaluate(expr);
|
|
@@ -14802,4 +15418,4 @@ export {
|
|
|
14802
15418
|
* Use of this source code is governed by an MIT-style license that can be
|
|
14803
15419
|
* found in the LICENSE file at https://angular.dev/license
|
|
14804
15420
|
*/
|
|
14805
|
-
//# sourceMappingURL=chunk-
|
|
15421
|
+
//# sourceMappingURL=chunk-HIY6A3BW.js.map
|