@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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LZMAR6SN.js";
|
|
8
8
|
import {
|
|
9
9
|
CompilationMode,
|
|
10
10
|
ComponentDecoratorHandler,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
retagAllTsFiles,
|
|
52
52
|
tryParseInitializerApi,
|
|
53
53
|
untagAllTsFiles
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-HIY6A3BW.js";
|
|
55
55
|
import {
|
|
56
56
|
AbsoluteModuleStrategy,
|
|
57
57
|
AliasStrategy,
|
|
@@ -88,14 +88,14 @@ import {
|
|
|
88
88
|
relativePathBetween,
|
|
89
89
|
replaceTsWithNgInErrors,
|
|
90
90
|
toUnredirectedSourceFile
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-KFTXE4DT.js";
|
|
92
92
|
import {
|
|
93
93
|
ActivePerfRecorder,
|
|
94
94
|
DelegatingPerfRecorder,
|
|
95
95
|
PerfCheckpoint,
|
|
96
96
|
PerfEvent,
|
|
97
97
|
PerfPhase
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-Q2WE7ECN.js";
|
|
99
99
|
import {
|
|
100
100
|
LogicalFileSystem,
|
|
101
101
|
absoluteFrom,
|
|
@@ -105,7 +105,7 @@ import {
|
|
|
105
105
|
getFileSystem,
|
|
106
106
|
join,
|
|
107
107
|
resolve
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-37JMVF7H.js";
|
|
109
109
|
|
|
110
110
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
111
111
|
var DEFAULT_ERROR_CODE = 100;
|
|
@@ -262,6 +262,9 @@ function extractResolvedTypeString(node, checker) {
|
|
|
262
262
|
|
|
263
263
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
|
|
264
264
|
var FunctionExtractor = class {
|
|
265
|
+
name;
|
|
266
|
+
exportDeclaration;
|
|
267
|
+
typeChecker;
|
|
265
268
|
constructor(name, exportDeclaration, typeChecker) {
|
|
266
269
|
this.name = name;
|
|
267
270
|
this.exportDeclaration = exportDeclaration;
|
|
@@ -369,6 +372,8 @@ function hasLeadingInternalComment(member) {
|
|
|
369
372
|
|
|
370
373
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
|
|
371
374
|
var ClassExtractor = class {
|
|
375
|
+
declaration;
|
|
376
|
+
typeChecker;
|
|
372
377
|
constructor(declaration, typeChecker) {
|
|
373
378
|
this.declaration = declaration;
|
|
374
379
|
this.typeChecker = typeChecker;
|
|
@@ -505,9 +510,15 @@ var ClassExtractor = class {
|
|
|
505
510
|
return result;
|
|
506
511
|
}
|
|
507
512
|
filterMethodOverloads(declarations) {
|
|
508
|
-
return declarations.filter((declaration) => {
|
|
513
|
+
return declarations.filter((declaration, index) => {
|
|
514
|
+
var _a;
|
|
509
515
|
if (ts5.isFunctionDeclaration(declaration) || ts5.isMethodDeclaration(declaration)) {
|
|
510
|
-
|
|
516
|
+
if (ts5.getCombinedModifierFlags(declaration) & ts5.ModifierFlags.Abstract) {
|
|
517
|
+
const previousDeclaration = declarations[index - 1];
|
|
518
|
+
const samePreviousAbstractMethod = previousDeclaration && ts5.isMethodDeclaration(previousDeclaration) && ts5.getCombinedModifierFlags(previousDeclaration) & ts5.ModifierFlags.Abstract && previousDeclaration.name.getText() === ((_a = declaration.name) == null ? void 0 : _a.getText());
|
|
519
|
+
return !samePreviousAbstractMethod;
|
|
520
|
+
}
|
|
521
|
+
return !!declaration.body;
|
|
511
522
|
}
|
|
512
523
|
return true;
|
|
513
524
|
});
|
|
@@ -567,6 +578,8 @@ var ClassExtractor = class {
|
|
|
567
578
|
}
|
|
568
579
|
};
|
|
569
580
|
var DirectiveExtractor = class extends ClassExtractor {
|
|
581
|
+
reference;
|
|
582
|
+
metadata;
|
|
570
583
|
constructor(declaration, reference, metadata, checker) {
|
|
571
584
|
super(declaration, checker);
|
|
572
585
|
this.reference = reference;
|
|
@@ -609,6 +622,8 @@ var DirectiveExtractor = class extends ClassExtractor {
|
|
|
609
622
|
}
|
|
610
623
|
};
|
|
611
624
|
var PipeExtractor = class extends ClassExtractor {
|
|
625
|
+
reference;
|
|
626
|
+
metadata;
|
|
612
627
|
constructor(declaration, reference, metadata, typeChecker) {
|
|
613
628
|
super(declaration, typeChecker);
|
|
614
629
|
this.reference = reference;
|
|
@@ -624,6 +639,8 @@ var PipeExtractor = class extends ClassExtractor {
|
|
|
624
639
|
}
|
|
625
640
|
};
|
|
626
641
|
var NgModuleExtractor = class extends ClassExtractor {
|
|
642
|
+
reference;
|
|
643
|
+
metadata;
|
|
627
644
|
constructor(declaration, reference, metadata, typeChecker) {
|
|
628
645
|
super(declaration, typeChecker);
|
|
629
646
|
this.reference = reference;
|
|
@@ -968,6 +985,8 @@ function getImportedSymbols(sourceFile) {
|
|
|
968
985
|
|
|
969
986
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
|
|
970
987
|
var DocsExtractor = class {
|
|
988
|
+
typeChecker;
|
|
989
|
+
metadataReader;
|
|
971
990
|
constructor(typeChecker, metadataReader) {
|
|
972
991
|
this.typeChecker = typeChecker;
|
|
973
992
|
this.metadataReader = metadataReader;
|
|
@@ -1087,9 +1106,7 @@ function i18nSerialize(bundle, formatName, options) {
|
|
|
1087
1106
|
let serializer;
|
|
1088
1107
|
switch (format) {
|
|
1089
1108
|
case "xmb":
|
|
1090
|
-
serializer = new Xmb(
|
|
1091
|
-
options.i18nPreserveWhitespaceForLegacyExtraction
|
|
1092
|
-
);
|
|
1109
|
+
serializer = new Xmb();
|
|
1093
1110
|
break;
|
|
1094
1111
|
case "xliff2":
|
|
1095
1112
|
case "xlf2":
|
|
@@ -1166,9 +1183,10 @@ import ts24 from "typescript";
|
|
|
1166
1183
|
|
|
1167
1184
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
1168
1185
|
var CycleAnalyzer = class {
|
|
1186
|
+
importGraph;
|
|
1187
|
+
cachedResults = null;
|
|
1169
1188
|
constructor(importGraph) {
|
|
1170
1189
|
this.importGraph = importGraph;
|
|
1171
|
-
this.cachedResults = null;
|
|
1172
1190
|
}
|
|
1173
1191
|
wouldCreateCycle(from, to) {
|
|
1174
1192
|
if (this.cachedResults === null || this.cachedResults.from !== from) {
|
|
@@ -1183,11 +1201,13 @@ var CycleAnalyzer = class {
|
|
|
1183
1201
|
};
|
|
1184
1202
|
var NgCyclicResult = Symbol("NgCyclicResult");
|
|
1185
1203
|
var CycleResults = class {
|
|
1204
|
+
from;
|
|
1205
|
+
importGraph;
|
|
1206
|
+
cyclic = {};
|
|
1207
|
+
acyclic = {};
|
|
1186
1208
|
constructor(from, importGraph) {
|
|
1187
1209
|
this.from = from;
|
|
1188
1210
|
this.importGraph = importGraph;
|
|
1189
|
-
this.cyclic = {};
|
|
1190
|
-
this.acyclic = {};
|
|
1191
1211
|
}
|
|
1192
1212
|
wouldBeCyclic(sf) {
|
|
1193
1213
|
const cached = this.getCachedResult(sf);
|
|
@@ -1225,6 +1245,9 @@ var CycleResults = class {
|
|
|
1225
1245
|
}
|
|
1226
1246
|
};
|
|
1227
1247
|
var Cycle = class {
|
|
1248
|
+
importGraph;
|
|
1249
|
+
from;
|
|
1250
|
+
to;
|
|
1228
1251
|
constructor(importGraph, from, to) {
|
|
1229
1252
|
this.importGraph = importGraph;
|
|
1230
1253
|
this.from = from;
|
|
@@ -1238,10 +1261,12 @@ var Cycle = class {
|
|
|
1238
1261
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
|
|
1239
1262
|
import ts13 from "typescript";
|
|
1240
1263
|
var ImportGraph = class {
|
|
1264
|
+
checker;
|
|
1265
|
+
perf;
|
|
1266
|
+
imports = /* @__PURE__ */ new Map();
|
|
1241
1267
|
constructor(checker, perf) {
|
|
1242
1268
|
this.checker = checker;
|
|
1243
1269
|
this.perf = perf;
|
|
1244
|
-
this.imports = /* @__PURE__ */ new Map();
|
|
1245
1270
|
}
|
|
1246
1271
|
importsOf(sf) {
|
|
1247
1272
|
if (!this.imports.has(sf)) {
|
|
@@ -1312,6 +1337,8 @@ function isTypeOnlyImportClause(node) {
|
|
|
1312
1337
|
return false;
|
|
1313
1338
|
}
|
|
1314
1339
|
var Found = class {
|
|
1340
|
+
sourceFile;
|
|
1341
|
+
parent;
|
|
1315
1342
|
constructor(sourceFile, parent) {
|
|
1316
1343
|
this.sourceFile = sourceFile;
|
|
1317
1344
|
this.parent = parent;
|
|
@@ -1330,10 +1357,13 @@ var Found = class {
|
|
|
1330
1357
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
|
|
1331
1358
|
import ts14 from "typescript";
|
|
1332
1359
|
var FlatIndexGenerator = class {
|
|
1360
|
+
entryPoint;
|
|
1361
|
+
moduleName;
|
|
1362
|
+
flatIndexPath;
|
|
1363
|
+
shouldEmit = true;
|
|
1333
1364
|
constructor(entryPoint, relativeFlatIndexPath, moduleName) {
|
|
1334
1365
|
this.entryPoint = entryPoint;
|
|
1335
1366
|
this.moduleName = moduleName;
|
|
1336
|
-
this.shouldEmit = true;
|
|
1337
1367
|
this.flatIndexPath = join(dirname(entryPoint), relativeFlatIndexPath).replace(/\.js$/, "") + ".ts";
|
|
1338
1368
|
}
|
|
1339
1369
|
makeTopLevelShim() {
|
|
@@ -1450,9 +1480,7 @@ function getDescriptorOfDeclaration(decl) {
|
|
|
1450
1480
|
|
|
1451
1481
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
|
|
1452
1482
|
var ReferenceGraph = class {
|
|
1453
|
-
|
|
1454
|
-
this.references = /* @__PURE__ */ new Map();
|
|
1455
|
-
}
|
|
1483
|
+
references = /* @__PURE__ */ new Map();
|
|
1456
1484
|
add(from, to) {
|
|
1457
1485
|
if (!this.references.has(from)) {
|
|
1458
1486
|
this.references.set(from, /* @__PURE__ */ new Set());
|
|
@@ -1504,9 +1532,7 @@ var ReferenceGraph = class {
|
|
|
1504
1532
|
|
|
1505
1533
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
|
|
1506
1534
|
var FileDependencyGraph = class {
|
|
1507
|
-
|
|
1508
|
-
this.nodes = /* @__PURE__ */ new Map();
|
|
1509
|
-
}
|
|
1535
|
+
nodes = /* @__PURE__ */ new Map();
|
|
1510
1536
|
addDependency(from, on) {
|
|
1511
1537
|
this.nodeFor(from).dependsOn.add(absoluteFromSourceFile(on));
|
|
1512
1538
|
}
|
|
@@ -1584,6 +1610,11 @@ var PhaseKind;
|
|
|
1584
1610
|
PhaseKind2[PhaseKind2["TypeCheckAndEmit"] = 1] = "TypeCheckAndEmit";
|
|
1585
1611
|
})(PhaseKind || (PhaseKind = {}));
|
|
1586
1612
|
var IncrementalCompilation = class {
|
|
1613
|
+
depGraph;
|
|
1614
|
+
versions;
|
|
1615
|
+
step;
|
|
1616
|
+
phase;
|
|
1617
|
+
_state;
|
|
1587
1618
|
constructor(state, depGraph, versions, step) {
|
|
1588
1619
|
this.depGraph = depGraph;
|
|
1589
1620
|
this.versions = versions;
|
|
@@ -1780,10 +1811,8 @@ function toOriginalSourceFile(sf) {
|
|
|
1780
1811
|
|
|
1781
1812
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
|
|
1782
1813
|
var TrackedIncrementalBuildStrategy = class {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
this.isSet = false;
|
|
1786
|
-
}
|
|
1814
|
+
state = null;
|
|
1815
|
+
isSet = false;
|
|
1787
1816
|
getIncrementalState() {
|
|
1788
1817
|
return this.state;
|
|
1789
1818
|
}
|
|
@@ -1827,6 +1856,8 @@ var IdentifierKind;
|
|
|
1827
1856
|
IdentifierKind2[IdentifierKind2["LetDeclaration"] = 7] = "LetDeclaration";
|
|
1828
1857
|
})(IdentifierKind || (IdentifierKind = {}));
|
|
1829
1858
|
var AbsoluteSourceSpan = class {
|
|
1859
|
+
start;
|
|
1860
|
+
end;
|
|
1830
1861
|
constructor(start, end) {
|
|
1831
1862
|
this.start = start;
|
|
1832
1863
|
this.end = end;
|
|
@@ -1835,9 +1866,7 @@ var AbsoluteSourceSpan = class {
|
|
|
1835
1866
|
|
|
1836
1867
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
|
|
1837
1868
|
var IndexingContext = class {
|
|
1838
|
-
|
|
1839
|
-
this.components = /* @__PURE__ */ new Set();
|
|
1840
|
-
}
|
|
1869
|
+
components = /* @__PURE__ */ new Set();
|
|
1841
1870
|
addComponent(info) {
|
|
1842
1871
|
this.components.add(info);
|
|
1843
1872
|
}
|
|
@@ -1849,14 +1878,18 @@ import { ParseSourceFile } from "@angular/compiler";
|
|
|
1849
1878
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
|
|
1850
1879
|
import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstBoundDeferredTrigger, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate, TmplAstVariable } from "@angular/compiler";
|
|
1851
1880
|
var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
1881
|
+
expressionStr;
|
|
1882
|
+
absoluteOffset;
|
|
1883
|
+
boundTemplate;
|
|
1884
|
+
targetToIdentifier;
|
|
1885
|
+
identifiers = [];
|
|
1886
|
+
errors = [];
|
|
1852
1887
|
constructor(expressionStr, absoluteOffset, boundTemplate, targetToIdentifier) {
|
|
1853
1888
|
super();
|
|
1854
1889
|
this.expressionStr = expressionStr;
|
|
1855
1890
|
this.absoluteOffset = absoluteOffset;
|
|
1856
1891
|
this.boundTemplate = boundTemplate;
|
|
1857
1892
|
this.targetToIdentifier = targetToIdentifier;
|
|
1858
|
-
this.identifiers = [];
|
|
1859
|
-
this.errors = [];
|
|
1860
1893
|
}
|
|
1861
1894
|
static getIdentifiers(ast, source, absoluteOffset, boundTemplate, targetToIdentifier) {
|
|
1862
1895
|
const visitor = new ExpressionVisitor(source, absoluteOffset, boundTemplate, targetToIdentifier);
|
|
@@ -1900,13 +1933,14 @@ var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
|
1900
1933
|
}
|
|
1901
1934
|
};
|
|
1902
1935
|
var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
1936
|
+
boundTemplate;
|
|
1937
|
+
identifiers = /* @__PURE__ */ new Set();
|
|
1938
|
+
errors = [];
|
|
1939
|
+
targetIdentifierCache = /* @__PURE__ */ new Map();
|
|
1940
|
+
elementAndTemplateIdentifierCache = /* @__PURE__ */ new Map();
|
|
1903
1941
|
constructor(boundTemplate) {
|
|
1904
1942
|
super();
|
|
1905
1943
|
this.boundTemplate = boundTemplate;
|
|
1906
|
-
this.identifiers = /* @__PURE__ */ new Set();
|
|
1907
|
-
this.errors = [];
|
|
1908
|
-
this.targetIdentifierCache = /* @__PURE__ */ new Map();
|
|
1909
|
-
this.elementAndTemplateIdentifierCache = /* @__PURE__ */ new Map();
|
|
1910
1944
|
}
|
|
1911
1945
|
visit(node) {
|
|
1912
1946
|
node.visit(this);
|
|
@@ -2179,13 +2213,15 @@ function generateAnalysis(context) {
|
|
|
2179
2213
|
|
|
2180
2214
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.mjs
|
|
2181
2215
|
var NgModuleIndexImpl = class {
|
|
2216
|
+
metaReader;
|
|
2217
|
+
localReader;
|
|
2182
2218
|
constructor(metaReader, localReader) {
|
|
2183
2219
|
this.metaReader = metaReader;
|
|
2184
2220
|
this.localReader = localReader;
|
|
2185
|
-
this.ngModuleAuthoritativeReference = /* @__PURE__ */ new Map();
|
|
2186
|
-
this.typeToExportingModules = /* @__PURE__ */ new Map();
|
|
2187
|
-
this.indexed = false;
|
|
2188
2221
|
}
|
|
2222
|
+
ngModuleAuthoritativeReference = /* @__PURE__ */ new Map();
|
|
2223
|
+
typeToExportingModules = /* @__PURE__ */ new Map();
|
|
2224
|
+
indexed = false;
|
|
2189
2225
|
updateWith(cache, key, elem) {
|
|
2190
2226
|
if (cache.has(key)) {
|
|
2191
2227
|
cache.get(key).add(elem);
|
|
@@ -2272,11 +2308,16 @@ var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
|
|
|
2272
2308
|
var RESOURCE_MARKER = ".$ngresource$";
|
|
2273
2309
|
var RESOURCE_MARKER_TS = RESOURCE_MARKER + ".ts";
|
|
2274
2310
|
var AdapterResourceLoader = class {
|
|
2311
|
+
adapter;
|
|
2312
|
+
options;
|
|
2313
|
+
cache = /* @__PURE__ */ new Map();
|
|
2314
|
+
fetching = /* @__PURE__ */ new Map();
|
|
2315
|
+
lookupResolutionHost;
|
|
2316
|
+
canPreload;
|
|
2317
|
+
canPreprocess;
|
|
2275
2318
|
constructor(adapter, options) {
|
|
2276
2319
|
this.adapter = adapter;
|
|
2277
2320
|
this.options = options;
|
|
2278
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
2279
|
-
this.fetching = /* @__PURE__ */ new Map();
|
|
2280
2321
|
this.lookupResolutionHost = createLookupResolutionHost(this.adapter);
|
|
2281
2322
|
this.canPreload = !!this.adapter.readResource;
|
|
2282
2323
|
this.canPreprocess = !!this.adapter.transformResource;
|
|
@@ -2421,11 +2462,14 @@ function createLookupResolutionHost(adapter) {
|
|
|
2421
2462
|
|
|
2422
2463
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/standalone.mjs
|
|
2423
2464
|
var StandaloneComponentScopeReader = class {
|
|
2465
|
+
metaReader;
|
|
2466
|
+
localModuleReader;
|
|
2467
|
+
dtsModuleReader;
|
|
2468
|
+
cache = /* @__PURE__ */ new Map();
|
|
2424
2469
|
constructor(metaReader, localModuleReader, dtsModuleReader) {
|
|
2425
2470
|
this.metaReader = metaReader;
|
|
2426
2471
|
this.localModuleReader = localModuleReader;
|
|
2427
2472
|
this.dtsModuleReader = dtsModuleReader;
|
|
2428
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
2429
2473
|
}
|
|
2430
2474
|
getScopeForComponent(clazz) {
|
|
2431
2475
|
var _a;
|
|
@@ -2541,21 +2585,22 @@ function isSignalSymbol(symbol) {
|
|
|
2541
2585
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
|
|
2542
2586
|
import { ASTWithSource as ASTWithSource2, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
|
|
2543
2587
|
var TemplateCheckWithVisitor = class {
|
|
2544
|
-
|
|
2545
|
-
this.canVisitStructuralAttributes = true;
|
|
2546
|
-
}
|
|
2588
|
+
canVisitStructuralAttributes = true;
|
|
2547
2589
|
run(ctx, component, template) {
|
|
2548
2590
|
const visitor = new TemplateVisitor2(ctx, component, this);
|
|
2549
2591
|
return visitor.getDiagnostics(template);
|
|
2550
2592
|
}
|
|
2551
2593
|
};
|
|
2552
2594
|
var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
|
|
2595
|
+
ctx;
|
|
2596
|
+
component;
|
|
2597
|
+
check;
|
|
2598
|
+
diagnostics = [];
|
|
2553
2599
|
constructor(ctx, component, check) {
|
|
2554
2600
|
super();
|
|
2555
2601
|
this.ctx = ctx;
|
|
2556
2602
|
this.component = component;
|
|
2557
2603
|
this.check = check;
|
|
2558
|
-
this.diagnostics = [];
|
|
2559
2604
|
}
|
|
2560
2605
|
visit(node, context) {
|
|
2561
2606
|
this.diagnostics.push(...this.check.visitNode(this.ctx, this.component, node));
|
|
@@ -2678,10 +2723,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
|
|
|
2678
2723
|
var SIGNAL_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["set", "update", "asReadonly"]);
|
|
2679
2724
|
var FUNCTION_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["name", "length", "prototype"]);
|
|
2680
2725
|
var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
2681
|
-
|
|
2682
|
-
super(...arguments);
|
|
2683
|
-
this.code = ErrorCode.INTERPOLATED_SIGNAL_NOT_INVOKED;
|
|
2684
|
-
}
|
|
2726
|
+
code = ErrorCode.INTERPOLATED_SIGNAL_NOT_INVOKED;
|
|
2685
2727
|
visitNode(ctx, component, node) {
|
|
2686
2728
|
if (node instanceof Interpolation) {
|
|
2687
2729
|
return node.expressions.filter((item) => item instanceof PropertyRead2).flatMap((item) => buildDiagnosticForSignal(ctx, item, component));
|
|
@@ -2729,10 +2771,7 @@ var factory = {
|
|
|
2729
2771
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
2730
2772
|
import { TmplAstBoundEvent } from "@angular/compiler";
|
|
2731
2773
|
var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
|
|
2732
|
-
|
|
2733
|
-
super(...arguments);
|
|
2734
|
-
this.code = ErrorCode.INVALID_BANANA_IN_BOX;
|
|
2735
|
-
}
|
|
2774
|
+
code = ErrorCode.INVALID_BANANA_IN_BOX;
|
|
2736
2775
|
visitNode(ctx, component, node) {
|
|
2737
2776
|
if (!(node instanceof TmplAstBoundEvent))
|
|
2738
2777
|
return [];
|
|
@@ -2761,10 +2800,7 @@ var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
|
|
|
2761
2800
|
["ngSwitchDefault", { directive: "NgSwitchDefault", builtIn: "@switch with @default" }]
|
|
2762
2801
|
]);
|
|
2763
2802
|
var MissingControlFlowDirectiveCheck = class extends TemplateCheckWithVisitor {
|
|
2764
|
-
|
|
2765
|
-
super(...arguments);
|
|
2766
|
-
this.code = ErrorCode.MISSING_CONTROL_FLOW_DIRECTIVE;
|
|
2767
|
-
}
|
|
2803
|
+
code = ErrorCode.MISSING_CONTROL_FLOW_DIRECTIVE;
|
|
2768
2804
|
run(ctx, component, template) {
|
|
2769
2805
|
const componentMetadata = ctx.templateTypeChecker.getDirectiveMetadata(component);
|
|
2770
2806
|
if (!componentMetadata || !componentMetadata.isStandalone) {
|
|
@@ -2800,10 +2836,7 @@ var factory3 = {
|
|
|
2800
2836
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
|
|
2801
2837
|
import { TmplAstTemplate as TmplAstTemplate3 } from "@angular/compiler";
|
|
2802
2838
|
var MissingNgForOfLetCheck = class extends TemplateCheckWithVisitor {
|
|
2803
|
-
|
|
2804
|
-
super(...arguments);
|
|
2805
|
-
this.code = ErrorCode.MISSING_NGFOROF_LET;
|
|
2806
|
-
}
|
|
2839
|
+
code = ErrorCode.MISSING_NGFOROF_LET;
|
|
2807
2840
|
visitNode(ctx, component, node) {
|
|
2808
2841
|
const isTemplate = node instanceof TmplAstTemplate3;
|
|
2809
2842
|
if (!(node instanceof TmplAstTemplate3)) {
|
|
@@ -2834,11 +2867,8 @@ var factory4 = {
|
|
|
2834
2867
|
import { Binary } from "@angular/compiler";
|
|
2835
2868
|
import ts18 from "typescript";
|
|
2836
2869
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
this.canVisitStructuralAttributes = false;
|
|
2840
|
-
this.code = ErrorCode.NULLISH_COALESCING_NOT_NULLABLE;
|
|
2841
|
-
}
|
|
2870
|
+
canVisitStructuralAttributes = false;
|
|
2871
|
+
code = ErrorCode.NULLISH_COALESCING_NOT_NULLABLE;
|
|
2842
2872
|
visitNode(ctx, component, node) {
|
|
2843
2873
|
if (!(node instanceof Binary) || node.operation !== "??")
|
|
2844
2874
|
return [];
|
|
@@ -2880,11 +2910,8 @@ var factory5 = {
|
|
|
2880
2910
|
import { SafeCall, SafeKeyedRead, SafePropertyRead } from "@angular/compiler";
|
|
2881
2911
|
import ts19 from "typescript";
|
|
2882
2912
|
var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
this.canVisitStructuralAttributes = false;
|
|
2886
|
-
this.code = ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE;
|
|
2887
|
-
}
|
|
2913
|
+
canVisitStructuralAttributes = false;
|
|
2914
|
+
code = ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE;
|
|
2888
2915
|
visitNode(ctx, component, node) {
|
|
2889
2916
|
if (!(node instanceof SafeCall) && !(node instanceof SafePropertyRead) && !(node instanceof SafeKeyedRead))
|
|
2890
2917
|
return [];
|
|
@@ -2927,10 +2954,7 @@ var factory6 = {
|
|
|
2927
2954
|
import { TmplAstBoundAttribute as TmplAstBoundAttribute2 } from "@angular/compiler";
|
|
2928
2955
|
var STYLE_SUFFIXES = ["px", "%", "em"];
|
|
2929
2956
|
var SuffixNotSupportedCheck = class extends TemplateCheckWithVisitor {
|
|
2930
|
-
|
|
2931
|
-
super(...arguments);
|
|
2932
|
-
this.code = ErrorCode.SUFFIX_NOT_SUPPORTED;
|
|
2933
|
-
}
|
|
2957
|
+
code = ErrorCode.SUFFIX_NOT_SUPPORTED;
|
|
2934
2958
|
visitNode(ctx, component, node) {
|
|
2935
2959
|
if (!(node instanceof TmplAstBoundAttribute2))
|
|
2936
2960
|
return [];
|
|
@@ -2950,10 +2974,7 @@ var factory7 = {
|
|
|
2950
2974
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
|
|
2951
2975
|
import { TmplAstTextAttribute } from "@angular/compiler";
|
|
2952
2976
|
var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
|
|
2953
|
-
|
|
2954
|
-
super(...arguments);
|
|
2955
|
-
this.code = ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING;
|
|
2956
|
-
}
|
|
2977
|
+
code = ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING;
|
|
2957
2978
|
visitNode(ctx, component, node) {
|
|
2958
2979
|
if (!(node instanceof TmplAstTextAttribute))
|
|
2959
2980
|
return [];
|
|
@@ -2989,10 +3010,7 @@ var factory8 = {
|
|
|
2989
3010
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.mjs
|
|
2990
3011
|
import { ASTWithSource as ASTWithSource4, Call, Chain, Conditional, ParsedEventType, PropertyRead as PropertyRead3, SafeCall as SafeCall2, SafePropertyRead as SafePropertyRead2, TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
|
|
2991
3012
|
var UninvokedFunctionInEventBindingSpec = class extends TemplateCheckWithVisitor {
|
|
2992
|
-
|
|
2993
|
-
super(...arguments);
|
|
2994
|
-
this.code = ErrorCode.UNINVOKED_FUNCTION_IN_EVENT_BINDING;
|
|
2995
|
-
}
|
|
3013
|
+
code = ErrorCode.UNINVOKED_FUNCTION_IN_EVENT_BINDING;
|
|
2996
3014
|
visitNode(ctx, component, node) {
|
|
2997
3015
|
if (!(node instanceof TmplAstBoundEvent2))
|
|
2998
3016
|
return [];
|
|
@@ -3041,11 +3059,8 @@ var factory9 = {
|
|
|
3041
3059
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.mjs
|
|
3042
3060
|
import { AST, ASTWithSource as ASTWithSource5, TmplAstLetDeclaration } from "@angular/compiler";
|
|
3043
3061
|
var UnusedLetDeclarationCheck = class extends TemplateCheckWithVisitor {
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
this.code = ErrorCode.UNUSED_LET_DECLARATION;
|
|
3047
|
-
this.analysis = /* @__PURE__ */ new Map();
|
|
3048
|
-
}
|
|
3062
|
+
code = ErrorCode.UNUSED_LET_DECLARATION;
|
|
3063
|
+
analysis = /* @__PURE__ */ new Map();
|
|
3049
3064
|
run(ctx, component, template) {
|
|
3050
3065
|
super.run(ctx, component, template);
|
|
3051
3066
|
const diagnostics = [];
|
|
@@ -3096,6 +3111,8 @@ var DiagnosticCategoryLabel;
|
|
|
3096
3111
|
|
|
3097
3112
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3098
3113
|
var ExtendedTemplateCheckerImpl = class {
|
|
3114
|
+
partialCtx;
|
|
3115
|
+
templateChecks;
|
|
3099
3116
|
constructor(templateTypeChecker, typeChecker, templateCheckFactories, options) {
|
|
3100
3117
|
var _a, _b, _c, _d, _e;
|
|
3101
3118
|
this.partialCtx = { templateTypeChecker, typeChecker };
|
|
@@ -3170,6 +3187,7 @@ var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
|
|
|
3170
3187
|
import { ASTWithSource as ASTWithSource6, ImplicitReceiver as ImplicitReceiver2, ParsedEventType as ParsedEventType2, RecursiveAstVisitor as RecursiveAstVisitor3, TmplAstBoundEvent as TmplAstBoundEvent3, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstRecursiveVisitor as TmplAstRecursiveVisitor2, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
|
|
3171
3188
|
import ts21 from "typescript";
|
|
3172
3189
|
var TemplateSemanticsCheckerImpl = class {
|
|
3190
|
+
templateTypeChecker;
|
|
3173
3191
|
constructor(templateTypeChecker) {
|
|
3174
3192
|
this.templateTypeChecker = templateTypeChecker;
|
|
3175
3193
|
}
|
|
@@ -3179,6 +3197,7 @@ var TemplateSemanticsCheckerImpl = class {
|
|
|
3179
3197
|
}
|
|
3180
3198
|
};
|
|
3181
3199
|
var TemplateSemanticsVisitor = class extends TmplAstRecursiveVisitor2 {
|
|
3200
|
+
expressionVisitor;
|
|
3182
3201
|
constructor(expressionVisitor) {
|
|
3183
3202
|
super();
|
|
3184
3203
|
this.expressionVisitor = expressionVisitor;
|
|
@@ -3196,6 +3215,9 @@ var TemplateSemanticsVisitor = class extends TmplAstRecursiveVisitor2 {
|
|
|
3196
3215
|
}
|
|
3197
3216
|
};
|
|
3198
3217
|
var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
|
|
3218
|
+
templateTypeChecker;
|
|
3219
|
+
component;
|
|
3220
|
+
diagnostics;
|
|
3199
3221
|
constructor(templateTypeChecker, component, diagnostics) {
|
|
3200
3222
|
super();
|
|
3201
3223
|
this.templateTypeChecker = templateTypeChecker;
|
|
@@ -3266,6 +3288,8 @@ var APIS_TO_CHECK = [
|
|
|
3266
3288
|
...QUERY_INITIALIZER_FNS
|
|
3267
3289
|
];
|
|
3268
3290
|
var InitializerApiUsageRule = class {
|
|
3291
|
+
reflector;
|
|
3292
|
+
importedSymbolsTracker;
|
|
3269
3293
|
constructor(reflector, importedSymbolsTracker) {
|
|
3270
3294
|
this.reflector = reflector;
|
|
3271
3295
|
this.importedSymbolsTracker = importedSymbolsTracker;
|
|
@@ -3311,6 +3335,9 @@ var InitializerApiUsageRule = class {
|
|
|
3311
3335
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.mjs
|
|
3312
3336
|
import ts23 from "typescript";
|
|
3313
3337
|
var UnusedStandaloneImportsRule = class {
|
|
3338
|
+
templateTypeChecker;
|
|
3339
|
+
typeCheckingConfig;
|
|
3340
|
+
importedSymbolsTracker;
|
|
3314
3341
|
constructor(templateTypeChecker, typeCheckingConfig, importedSymbolsTracker) {
|
|
3315
3342
|
this.templateTypeChecker = templateTypeChecker;
|
|
3316
3343
|
this.typeCheckingConfig = typeCheckingConfig;
|
|
@@ -3338,9 +3365,14 @@ var UnusedStandaloneImportsRule = class {
|
|
|
3338
3365
|
}
|
|
3339
3366
|
const category = this.typeCheckingConfig.unusedStandaloneImports === "error" ? ts23.DiagnosticCategory.Error : ts23.DiagnosticCategory.Warning;
|
|
3340
3367
|
if (unused.length === metadata.imports.length) {
|
|
3341
|
-
return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, metadata.rawImports, "All imports are unused", void 0, category);
|
|
3368
|
+
return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, this.getDiagnosticNode(metadata.rawImports), "All imports are unused", void 0, category);
|
|
3342
3369
|
}
|
|
3343
|
-
return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, metadata.rawImports, "Imports array contains unused imports", unused.map((
|
|
3370
|
+
return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, this.getDiagnosticNode(metadata.rawImports), "Imports array contains unused imports", unused.map((ref) => {
|
|
3371
|
+
return makeRelatedInformation(
|
|
3372
|
+
ref.getOriginForDiagnostics(metadata.rawImports, ref.node.name),
|
|
3373
|
+
""
|
|
3374
|
+
);
|
|
3375
|
+
}), category);
|
|
3344
3376
|
}
|
|
3345
3377
|
getUnusedSymbols(metadata, usedDirectives, usedPipes) {
|
|
3346
3378
|
const { imports, rawImports } = metadata;
|
|
@@ -3354,14 +3386,14 @@ var UnusedStandaloneImportsRule = class {
|
|
|
3354
3386
|
if (dirMeta !== null) {
|
|
3355
3387
|
if (dirMeta.isStandalone && !usedDirectives.has(currentNode) && !this.isPotentialSharedReference(current, rawImports)) {
|
|
3356
3388
|
unused != null ? unused : unused = [];
|
|
3357
|
-
unused.push(
|
|
3389
|
+
unused.push(current);
|
|
3358
3390
|
}
|
|
3359
3391
|
continue;
|
|
3360
3392
|
}
|
|
3361
3393
|
const pipeMeta = this.templateTypeChecker.getPipeMetadata(currentNode);
|
|
3362
3394
|
if (pipeMeta !== null && pipeMeta.isStandalone && !usedPipes.has(pipeMeta.name) && !this.isPotentialSharedReference(current, rawImports)) {
|
|
3363
3395
|
unused != null ? unused : unused = [];
|
|
3364
|
-
unused.push(
|
|
3396
|
+
unused.push(current);
|
|
3365
3397
|
}
|
|
3366
3398
|
}
|
|
3367
3399
|
return unused;
|
|
@@ -3380,6 +3412,17 @@ var UnusedStandaloneImportsRule = class {
|
|
|
3380
3412
|
}
|
|
3381
3413
|
return true;
|
|
3382
3414
|
}
|
|
3415
|
+
getDiagnosticNode(importsExpression) {
|
|
3416
|
+
let current = importsExpression.parent;
|
|
3417
|
+
while (current) {
|
|
3418
|
+
if (ts23.isPropertyAssignment(current)) {
|
|
3419
|
+
return current.name;
|
|
3420
|
+
} else {
|
|
3421
|
+
current = current.parent;
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3424
|
+
return importsExpression;
|
|
3425
|
+
}
|
|
3383
3426
|
};
|
|
3384
3427
|
|
|
3385
3428
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/config.mjs
|
|
@@ -3387,6 +3430,7 @@ var UNUSED_STANDALONE_IMPORTS_RULE_ENABLED = true;
|
|
|
3387
3430
|
|
|
3388
3431
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.mjs
|
|
3389
3432
|
var SourceFileValidator = class {
|
|
3433
|
+
rules;
|
|
3390
3434
|
constructor(reflector, importedSymbolsTracker, templateTypeChecker, typeCheckingConfig) {
|
|
3391
3435
|
this.rules = [new InitializerApiUsageRule(reflector, importedSymbolsTracker)];
|
|
3392
3436
|
if (UNUSED_STANDALONE_IMPORTS_RULE_ENABLED) {
|
|
@@ -3513,6 +3557,32 @@ function incrementalFromStateTicket(oldProgram, oldState, newProgram, options, i
|
|
|
3513
3557
|
};
|
|
3514
3558
|
}
|
|
3515
3559
|
var NgCompiler = class {
|
|
3560
|
+
adapter;
|
|
3561
|
+
options;
|
|
3562
|
+
inputProgram;
|
|
3563
|
+
programDriver;
|
|
3564
|
+
incrementalStrategy;
|
|
3565
|
+
incrementalCompilation;
|
|
3566
|
+
usePoisonedData;
|
|
3567
|
+
livePerfRecorder;
|
|
3568
|
+
compilation = null;
|
|
3569
|
+
constructionDiagnostics = [];
|
|
3570
|
+
nonTemplateDiagnostics = null;
|
|
3571
|
+
closureCompilerEnabled;
|
|
3572
|
+
currentProgram;
|
|
3573
|
+
entryPoint;
|
|
3574
|
+
moduleResolver;
|
|
3575
|
+
resourceManager;
|
|
3576
|
+
cycleAnalyzer;
|
|
3577
|
+
ignoreForDiagnostics;
|
|
3578
|
+
ignoreForEmit;
|
|
3579
|
+
enableTemplateTypeChecker;
|
|
3580
|
+
enableBlockSyntax;
|
|
3581
|
+
enableLetSyntax;
|
|
3582
|
+
angularCoreVersion;
|
|
3583
|
+
enableHmr;
|
|
3584
|
+
implicitStandaloneValue;
|
|
3585
|
+
delegatingPerfRecorder;
|
|
3516
3586
|
static fromTicket(ticket, adapter) {
|
|
3517
3587
|
switch (ticket.kind) {
|
|
3518
3588
|
case CompilationTicketKind.Fresh:
|
|
@@ -3535,15 +3605,14 @@ var NgCompiler = class {
|
|
|
3535
3605
|
this.incrementalCompilation = incrementalCompilation;
|
|
3536
3606
|
this.usePoisonedData = usePoisonedData;
|
|
3537
3607
|
this.livePerfRecorder = livePerfRecorder;
|
|
3538
|
-
this.
|
|
3539
|
-
this.constructionDiagnostics = [];
|
|
3540
|
-
this.nonTemplateDiagnostics = null;
|
|
3608
|
+
this.angularCoreVersion = (_a = options["_angularCoreVersion"]) != null ? _a : null;
|
|
3541
3609
|
this.delegatingPerfRecorder = new DelegatingPerfRecorder(this.perfRecorder);
|
|
3542
3610
|
this.usePoisonedData = usePoisonedData || !!options._compilePoisonedComponents;
|
|
3543
3611
|
this.enableTemplateTypeChecker = enableTemplateTypeChecker || !!options._enableTemplateTypeChecker;
|
|
3544
|
-
this.enableBlockSyntax = (
|
|
3545
|
-
this.enableLetSyntax = (
|
|
3546
|
-
this.
|
|
3612
|
+
this.enableBlockSyntax = (_b = options["_enableBlockSyntax"]) != null ? _b : true;
|
|
3613
|
+
this.enableLetSyntax = (_c = options["_enableLetSyntax"]) != null ? _c : true;
|
|
3614
|
+
this.implicitStandaloneValue = this.angularCoreVersion === null || coreVersionSupportsFeature(this.angularCoreVersion, ">= 19.0.0-0");
|
|
3615
|
+
this.enableHmr = !!options["_enableHmr"];
|
|
3547
3616
|
this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
|
|
3548
3617
|
this.currentProgram = inputProgram;
|
|
3549
3618
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
@@ -3794,6 +3863,24 @@ var NgCompiler = class {
|
|
|
3794
3863
|
const compilation = this.ensureAnalyzed();
|
|
3795
3864
|
compilation.traitCompiler.xi18n(ctx);
|
|
3796
3865
|
}
|
|
3866
|
+
emitHmrUpdateModule(node) {
|
|
3867
|
+
const { traitCompiler, reflector } = this.ensureAnalyzed();
|
|
3868
|
+
if (!reflector.isClass(node)) {
|
|
3869
|
+
return null;
|
|
3870
|
+
}
|
|
3871
|
+
const callback = traitCompiler.compileHmrUpdateCallback(node);
|
|
3872
|
+
if (callback === null) {
|
|
3873
|
+
return null;
|
|
3874
|
+
}
|
|
3875
|
+
const sourceFile = node.getSourceFile();
|
|
3876
|
+
const printer = ts24.createPrinter();
|
|
3877
|
+
const nodeText = printer.printNode(ts24.EmitHint.Unspecified, callback, sourceFile);
|
|
3878
|
+
return ts24.transpileModule(nodeText, {
|
|
3879
|
+
compilerOptions: this.options,
|
|
3880
|
+
fileName: sourceFile.fileName,
|
|
3881
|
+
reportDiagnostics: false
|
|
3882
|
+
}).outputText;
|
|
3883
|
+
}
|
|
3797
3884
|
ensureAnalyzed() {
|
|
3798
3885
|
if (this.compilation === null) {
|
|
3799
3886
|
this.analyzeSync();
|
|
@@ -4086,9 +4173,9 @@ var NgCompiler = class {
|
|
|
4086
4173
|
}
|
|
4087
4174
|
const jitDeclarationRegistry = new JitDeclarationRegistry();
|
|
4088
4175
|
const handlers = [
|
|
4089
|
-
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader,
|
|
4090
|
-
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, jitDeclarationRegistry, !!this.options.strictStandalone),
|
|
4091
|
-
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode, !!this.options.strictStandalone),
|
|
4176
|
+
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, this.adapter, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, externalRuntimeStyles, localCompilationExtraImportsTracker, jitDeclarationRegistry, (_e = this.options.i18nPreserveWhitespaceForLegacyExtraction) != null ? _e : true, !!this.options.strictStandalone, this.enableHmr, this.implicitStandaloneValue),
|
|
4177
|
+
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, jitDeclarationRegistry, !!this.options.strictStandalone, this.implicitStandaloneValue),
|
|
4178
|
+
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode, !!this.options.strictStandalone, this.implicitStandaloneValue),
|
|
4092
4179
|
new InjectableDecoratorHandler(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, compilationMode),
|
|
4093
4180
|
new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_f = this.options.onlyPublishPublicTypingsForNgModules) != null ? _f : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker, jitDeclarationRegistry)
|
|
4094
4181
|
];
|
|
@@ -4239,6 +4326,7 @@ function makeConfigDiagnostic({ category, code, messageText }) {
|
|
|
4239
4326
|
};
|
|
4240
4327
|
}
|
|
4241
4328
|
var ReferenceGraphAdapter = class {
|
|
4329
|
+
graph;
|
|
4242
4330
|
constructor(graph) {
|
|
4243
4331
|
this.graph = graph;
|
|
4244
4332
|
}
|
|
@@ -4255,6 +4343,9 @@ var ReferenceGraphAdapter = class {
|
|
|
4255
4343
|
}
|
|
4256
4344
|
};
|
|
4257
4345
|
var NotifyingProgramDriverWrapper = class {
|
|
4346
|
+
delegate;
|
|
4347
|
+
notifyNewProgram;
|
|
4348
|
+
getSourceFileVersion;
|
|
4258
4349
|
constructor(delegate, notifyNewProgram) {
|
|
4259
4350
|
var _a;
|
|
4260
4351
|
this.delegate = delegate;
|
|
@@ -4287,6 +4378,36 @@ function versionMapFromProgram(program, driver) {
|
|
|
4287
4378
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
4288
4379
|
import ts25 from "typescript";
|
|
4289
4380
|
var DelegatingCompilerHost = class {
|
|
4381
|
+
delegate;
|
|
4382
|
+
createHash;
|
|
4383
|
+
directoryExists;
|
|
4384
|
+
fileNameToModuleName;
|
|
4385
|
+
getCancellationToken;
|
|
4386
|
+
getCanonicalFileName;
|
|
4387
|
+
getCurrentDirectory;
|
|
4388
|
+
getDefaultLibFileName;
|
|
4389
|
+
getDefaultLibLocation;
|
|
4390
|
+
getDirectories;
|
|
4391
|
+
getEnvironmentVariable;
|
|
4392
|
+
getModifiedResourceFiles;
|
|
4393
|
+
getNewLine;
|
|
4394
|
+
getParsedCommandLine;
|
|
4395
|
+
getSourceFileByPath;
|
|
4396
|
+
readDirectory;
|
|
4397
|
+
readFile;
|
|
4398
|
+
readResource;
|
|
4399
|
+
transformResource;
|
|
4400
|
+
realpath;
|
|
4401
|
+
resolveModuleNames;
|
|
4402
|
+
resolveTypeReferenceDirectives;
|
|
4403
|
+
resourceNameToFileName;
|
|
4404
|
+
trace;
|
|
4405
|
+
useCaseSensitiveFileNames;
|
|
4406
|
+
writeFile;
|
|
4407
|
+
getModuleResolutionCache;
|
|
4408
|
+
hasInvalidatedResolutions;
|
|
4409
|
+
resolveModuleNameLiterals;
|
|
4410
|
+
resolveTypeReferenceDirectiveReferences;
|
|
4290
4411
|
get jsDocParsingMode() {
|
|
4291
4412
|
return this.delegate.jsDocParsingMode;
|
|
4292
4413
|
}
|
|
@@ -4330,11 +4451,16 @@ var DelegatingCompilerHost = class {
|
|
|
4330
4451
|
}
|
|
4331
4452
|
};
|
|
4332
4453
|
var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
4454
|
+
shimAdapter;
|
|
4455
|
+
shimTagger;
|
|
4456
|
+
entryPoint = null;
|
|
4457
|
+
constructionDiagnostics;
|
|
4458
|
+
inputFiles;
|
|
4459
|
+
rootDirs;
|
|
4333
4460
|
constructor(delegate, inputFiles, rootDirs, shimAdapter, shimTagger, entryPoint, diagnostics) {
|
|
4334
4461
|
super(delegate);
|
|
4335
4462
|
this.shimAdapter = shimAdapter;
|
|
4336
4463
|
this.shimTagger = shimTagger;
|
|
4337
|
-
this.entryPoint = null;
|
|
4338
4464
|
this.entryPoint = entryPoint;
|
|
4339
4465
|
this.constructionDiagnostics = diagnostics;
|
|
4340
4466
|
this.inputFiles = [...inputFiles, ...shimAdapter.extraInputFiles];
|
|
@@ -4425,6 +4551,11 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4425
4551
|
|
|
4426
4552
|
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
4427
4553
|
var NgtscProgram = class {
|
|
4554
|
+
options;
|
|
4555
|
+
compiler;
|
|
4556
|
+
tsProgram;
|
|
4557
|
+
host;
|
|
4558
|
+
incrementalStrategy;
|
|
4428
4559
|
constructor(rootNames, options, delegateHost, oldProgram) {
|
|
4429
4560
|
this.options = options;
|
|
4430
4561
|
const perfRecorder = ActivePerfRecorder.zeroedToNow();
|
|
@@ -4902,4 +5033,4 @@ export {
|
|
|
4902
5033
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4903
5034
|
* found in the LICENSE file at https://angular.dev/license
|
|
4904
5035
|
*/
|
|
4905
|
-
//# sourceMappingURL=chunk-
|
|
5036
|
+
//# sourceMappingURL=chunk-BQXOZNTE.js.map
|