@angular/compiler-cli 20.0.0-next.8 → 20.0.0-next.9
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-TM3ZKHZM.js → chunk-2F5IGGXH.js} +12 -12
- package/bundles/{chunk-STORTTKY.js → chunk-37JMVF7H.js} +8 -8
- package/bundles/{chunk-AWZM3PZV.js → chunk-5HL3AR4R.js} +149 -106
- package/bundles/chunk-5HL3AR4R.js.map +6 -0
- package/bundles/{chunk-5UDS2TPQ.js → chunk-77D5CI2U.js} +7 -7
- package/bundles/{chunk-GBKXY6BH.js → chunk-FKXFEX7K.js} +3 -3
- package/bundles/{chunk-6YKQWDSS.js → chunk-KIC4TVVW.js} +47 -41
- package/bundles/chunk-KIC4TVVW.js.map +6 -0
- package/bundles/{chunk-I6R3GL3L.js → chunk-Q2WE7ECN.js} +5 -5
- package/bundles/{chunk-H7PFOEVE.js → chunk-Q6YAKOMH.js} +5 -5
- package/bundles/{chunk-JM3CQZO5.js → chunk-SBWQVXJA.js} +47 -42
- package/bundles/chunk-SBWQVXJA.js.map +6 -0
- package/bundles/{chunk-EYJS7FMV.js → chunk-UTYYMB4Z.js} +3 -3
- package/bundles/{chunk-OVF3OTQY.js → chunk-WNWOEBZS.js} +642 -414
- package/bundles/chunk-WNWOEBZS.js.map +6 -0
- package/bundles/index.js +12 -12
- package/bundles/linker/babel/index.js +12 -12
- package/bundles/linker/index.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +4 -4
- package/bundles/private/tooling.js +6 -6
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/component/src/handler.d.ts +16 -1
- package/src/ngtsc/annotations/component/src/resources.d.ts +1 -0
- package/src/ngtsc/core/src/compiler.d.ts +1 -0
- package/src/ngtsc/diagnostics/src/error_code.d.ts +18 -0
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +1 -0
- package/src/ngtsc/typecheck/extended/checks/missing_structural_directive/index.d.ts +16 -0
- package/src/ngtsc/typecheck/src/dom.d.ts +11 -11
- package/src/ngtsc/typecheck/src/oob.d.ts +27 -3
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +2 -0
- package/src/ngtsc/typecheck/src/type_check_block.d.ts +14 -5
- package/bundles/chunk-6YKQWDSS.js.map +0 -6
- package/bundles/chunk-AWZM3PZV.js.map +0 -6
- package/bundles/chunk-JM3CQZO5.js.map +0 -6
- package/bundles/chunk-OVF3OTQY.js.map +0 -6
- /package/bundles/{chunk-TM3ZKHZM.js.map → chunk-2F5IGGXH.js.map} +0 -0
- /package/bundles/{chunk-STORTTKY.js.map → chunk-37JMVF7H.js.map} +0 -0
- /package/bundles/{chunk-5UDS2TPQ.js.map → chunk-77D5CI2U.js.map} +0 -0
- /package/bundles/{chunk-GBKXY6BH.js.map → chunk-FKXFEX7K.js.map} +0 -0
- /package/bundles/{chunk-I6R3GL3L.js.map → chunk-Q2WE7ECN.js.map} +0 -0
- /package/bundles/{chunk-H7PFOEVE.js.map → chunk-Q6YAKOMH.js.map} +0 -0
- /package/bundles/{chunk-EYJS7FMV.js.map → chunk-UTYYMB4Z.js.map} +0 -0
|
@@ -48,23 +48,23 @@ import {
|
|
|
48
48
|
translateStatement,
|
|
49
49
|
translateType,
|
|
50
50
|
typeNodeToValueExpr
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-SBWQVXJA.js";
|
|
52
52
|
import {
|
|
53
53
|
PerfCheckpoint,
|
|
54
54
|
PerfEvent,
|
|
55
55
|
PerfPhase
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-Q2WE7ECN.js";
|
|
57
57
|
import {
|
|
58
58
|
absoluteFrom,
|
|
59
59
|
absoluteFromSourceFile,
|
|
60
60
|
getSourceFileOrError,
|
|
61
61
|
relative
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-37JMVF7H.js";
|
|
63
63
|
import {
|
|
64
64
|
__publicField
|
|
65
65
|
} from "./chunk-KPQ72R34.js";
|
|
66
66
|
|
|
67
|
-
// bazel-out/
|
|
67
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
|
|
68
68
|
import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
|
|
69
69
|
import ts from "typescript";
|
|
70
70
|
var CORE_MODULE = "@angular/core";
|
|
@@ -329,7 +329,7 @@ function isAbstractClassDeclaration(clazz) {
|
|
|
329
329
|
return ts.canHaveModifiers(clazz) && clazz.modifiers !== void 0 ? clazz.modifiers.some((mod) => mod.kind === ts.SyntaxKind.AbstractKeyword) : false;
|
|
330
330
|
}
|
|
331
331
|
|
|
332
|
-
// bazel-out/
|
|
332
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
|
|
333
333
|
var DynamicValue = class {
|
|
334
334
|
node;
|
|
335
335
|
reason;
|
|
@@ -422,10 +422,10 @@ var DynamicValue = class {
|
|
|
422
422
|
}
|
|
423
423
|
};
|
|
424
424
|
|
|
425
|
-
// bazel-out/
|
|
425
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
426
426
|
import ts2 from "typescript";
|
|
427
427
|
|
|
428
|
-
// bazel-out/
|
|
428
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
|
|
429
429
|
var ResolvedModule = class {
|
|
430
430
|
exports;
|
|
431
431
|
evaluate;
|
|
@@ -460,7 +460,7 @@ var EnumValue = class {
|
|
|
460
460
|
var KnownFn = class {
|
|
461
461
|
};
|
|
462
462
|
|
|
463
|
-
// bazel-out/
|
|
463
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
|
|
464
464
|
var ArraySliceBuiltinFn = class extends KnownFn {
|
|
465
465
|
lhs;
|
|
466
466
|
constructor(lhs) {
|
|
@@ -515,7 +515,7 @@ var StringConcatBuiltinFn = class extends KnownFn {
|
|
|
515
515
|
}
|
|
516
516
|
};
|
|
517
517
|
|
|
518
|
-
// bazel-out/
|
|
518
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
|
|
519
519
|
var SyntheticValue = class {
|
|
520
520
|
value;
|
|
521
521
|
constructor(value) {
|
|
@@ -523,7 +523,7 @@ var SyntheticValue = class {
|
|
|
523
523
|
}
|
|
524
524
|
};
|
|
525
525
|
|
|
526
|
-
// bazel-out/
|
|
526
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
527
527
|
function literalBinaryOp(op) {
|
|
528
528
|
return { op, literal: true };
|
|
529
529
|
}
|
|
@@ -1104,7 +1104,7 @@ function owningModule(context, override = null) {
|
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
|
|
1107
|
-
// bazel-out/
|
|
1107
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
|
|
1108
1108
|
var PartialEvaluator = class {
|
|
1109
1109
|
host;
|
|
1110
1110
|
checker;
|
|
@@ -1127,7 +1127,7 @@ var PartialEvaluator = class {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
};
|
|
1129
1129
|
|
|
1130
|
-
// bazel-out/
|
|
1130
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
|
|
1131
1131
|
import ts3 from "typescript";
|
|
1132
1132
|
function describeResolvedType(value, maxDepth = 1) {
|
|
1133
1133
|
var _a, _b;
|
|
@@ -1262,14 +1262,14 @@ function getContainerNode(node) {
|
|
|
1262
1262
|
return node.getSourceFile();
|
|
1263
1263
|
}
|
|
1264
1264
|
|
|
1265
|
-
// bazel-out/
|
|
1265
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
|
|
1266
1266
|
var OptimizeFor;
|
|
1267
1267
|
(function(OptimizeFor2) {
|
|
1268
1268
|
OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
|
|
1269
1269
|
OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
|
|
1270
1270
|
})(OptimizeFor || (OptimizeFor = {}));
|
|
1271
1271
|
|
|
1272
|
-
// bazel-out/
|
|
1272
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
|
|
1273
1273
|
var PotentialImportKind;
|
|
1274
1274
|
(function(PotentialImportKind2) {
|
|
1275
1275
|
PotentialImportKind2[PotentialImportKind2["NgModule"] = 0] = "NgModule";
|
|
@@ -1281,7 +1281,7 @@ var PotentialImportMode;
|
|
|
1281
1281
|
PotentialImportMode2[PotentialImportMode2["ForceDirect"] = 1] = "ForceDirect";
|
|
1282
1282
|
})(PotentialImportMode || (PotentialImportMode = {}));
|
|
1283
1283
|
|
|
1284
|
-
// bazel-out/
|
|
1284
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
|
|
1285
1285
|
var CompletionKind;
|
|
1286
1286
|
(function(CompletionKind2) {
|
|
1287
1287
|
CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
|
|
@@ -1289,7 +1289,7 @@ var CompletionKind;
|
|
|
1289
1289
|
CompletionKind2[CompletionKind2["LetDeclaration"] = 2] = "LetDeclaration";
|
|
1290
1290
|
})(CompletionKind || (CompletionKind = {}));
|
|
1291
1291
|
|
|
1292
|
-
// bazel-out/
|
|
1292
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
|
|
1293
1293
|
var SymbolKind;
|
|
1294
1294
|
(function(SymbolKind2) {
|
|
1295
1295
|
SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
|
|
@@ -1306,7 +1306,7 @@ var SymbolKind;
|
|
|
1306
1306
|
SymbolKind2[SymbolKind2["LetDeclaration"] = 11] = "LetDeclaration";
|
|
1307
1307
|
})(SymbolKind || (SymbolKind = {}));
|
|
1308
1308
|
|
|
1309
|
-
// bazel-out/
|
|
1309
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
|
|
1310
1310
|
import { LiteralExpr, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
|
|
1311
1311
|
import ts4 from "typescript";
|
|
1312
1312
|
function getConstructorDependencies(clazz, reflector, isCore) {
|
|
@@ -1452,10 +1452,10 @@ function createUnsuitableInjectionTokenError(clazz, error) {
|
|
|
1452
1452
|
return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
|
|
1453
1453
|
}
|
|
1454
1454
|
|
|
1455
|
-
// bazel-out/
|
|
1455
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
|
|
1456
1456
|
import ts12 from "typescript";
|
|
1457
1457
|
|
|
1458
|
-
// bazel-out/
|
|
1458
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
|
|
1459
1459
|
var MetaKind;
|
|
1460
1460
|
(function(MetaKind2) {
|
|
1461
1461
|
MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
|
|
@@ -1468,10 +1468,10 @@ var MatchSource;
|
|
|
1468
1468
|
MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
|
|
1469
1469
|
})(MatchSource || (MatchSource = {}));
|
|
1470
1470
|
|
|
1471
|
-
// bazel-out/
|
|
1471
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1472
1472
|
import ts6 from "typescript";
|
|
1473
1473
|
|
|
1474
|
-
// bazel-out/
|
|
1474
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
|
|
1475
1475
|
var ClassPropertyMapping = class {
|
|
1476
1476
|
forwardMap;
|
|
1477
1477
|
reverseMap;
|
|
@@ -1553,7 +1553,7 @@ function reverseMapFromForwardMap(forwardMap) {
|
|
|
1553
1553
|
return reverseMap;
|
|
1554
1554
|
}
|
|
1555
1555
|
|
|
1556
|
-
// bazel-out/
|
|
1556
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
|
|
1557
1557
|
import ts5 from "typescript";
|
|
1558
1558
|
function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
1559
1559
|
if (!ts5.isTupleTypeNode(def)) {
|
|
@@ -1769,7 +1769,7 @@ function isHostDirectiveMetaForGlobalMode(hostDirectiveMeta) {
|
|
|
1769
1769
|
return hostDirectiveMeta.directive instanceof Reference;
|
|
1770
1770
|
}
|
|
1771
1771
|
|
|
1772
|
-
// bazel-out/
|
|
1772
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1773
1773
|
var DtsMetadataReader = class {
|
|
1774
1774
|
checker;
|
|
1775
1775
|
reflector;
|
|
@@ -1969,7 +1969,7 @@ function readHostDirectivesType(checker, type, bestGuessOwningModule) {
|
|
|
1969
1969
|
return result.length > 0 ? { result, isIncomplete } : null;
|
|
1970
1970
|
}
|
|
1971
1971
|
|
|
1972
|
-
// bazel-out/
|
|
1972
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
|
|
1973
1973
|
function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
1974
1974
|
const topMeta = reader.getDirectiveMetadata(dir);
|
|
1975
1975
|
if (topMeta === null) {
|
|
@@ -2033,7 +2033,7 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
2033
2033
|
};
|
|
2034
2034
|
}
|
|
2035
2035
|
|
|
2036
|
-
// bazel-out/
|
|
2036
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
|
|
2037
2037
|
var LocalMetadataRegistry = class {
|
|
2038
2038
|
directives = /* @__PURE__ */ new Map();
|
|
2039
2039
|
ngModules = /* @__PURE__ */ new Map();
|
|
@@ -2089,7 +2089,7 @@ var CompoundMetadataRegistry = class {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
};
|
|
2091
2091
|
|
|
2092
|
-
// bazel-out/
|
|
2092
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
|
|
2093
2093
|
var ResourceRegistry = class {
|
|
2094
2094
|
externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
|
|
2095
2095
|
componentToTemplateMap = /* @__PURE__ */ new Map();
|
|
@@ -2162,7 +2162,7 @@ var ResourceRegistry = class {
|
|
|
2162
2162
|
}
|
|
2163
2163
|
};
|
|
2164
2164
|
|
|
2165
|
-
// bazel-out/
|
|
2165
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
|
|
2166
2166
|
var ExportedProviderStatusResolver = class {
|
|
2167
2167
|
metaReader;
|
|
2168
2168
|
calculating = /* @__PURE__ */ new Set();
|
|
@@ -2207,7 +2207,7 @@ var ExportedProviderStatusResolver = class {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
};
|
|
2209
2209
|
|
|
2210
|
-
// bazel-out/
|
|
2210
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
|
|
2211
2211
|
var EMPTY_ARRAY = [];
|
|
2212
2212
|
var HostDirectivesResolver = class {
|
|
2213
2213
|
metaReader;
|
|
@@ -2274,7 +2274,7 @@ function resolveOutput(bindingName) {
|
|
|
2274
2274
|
return bindingName;
|
|
2275
2275
|
}
|
|
2276
2276
|
|
|
2277
|
-
// bazel-out/
|
|
2277
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
|
|
2278
2278
|
var CompilationMode;
|
|
2279
2279
|
(function(CompilationMode2) {
|
|
2280
2280
|
CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
|
|
@@ -2288,7 +2288,7 @@ var HandlerPrecedence;
|
|
|
2288
2288
|
HandlerPrecedence2[HandlerPrecedence2["WEAK"] = 2] = "WEAK";
|
|
2289
2289
|
})(HandlerPrecedence || (HandlerPrecedence = {}));
|
|
2290
2290
|
|
|
2291
|
-
// bazel-out/
|
|
2291
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
|
|
2292
2292
|
import ts7 from "typescript";
|
|
2293
2293
|
function aliasTransformFactory(exportStatements) {
|
|
2294
2294
|
return () => {
|
|
@@ -2313,10 +2313,10 @@ function aliasTransformFactory(exportStatements) {
|
|
|
2313
2313
|
};
|
|
2314
2314
|
}
|
|
2315
2315
|
|
|
2316
|
-
// bazel-out/
|
|
2316
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
2317
2317
|
import ts8 from "typescript";
|
|
2318
2318
|
|
|
2319
|
-
// bazel-out/
|
|
2319
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
|
|
2320
2320
|
var TraitState;
|
|
2321
2321
|
(function(TraitState2) {
|
|
2322
2322
|
TraitState2[TraitState2["Pending"] = 0] = "Pending";
|
|
@@ -2375,7 +2375,7 @@ var TraitImpl = class {
|
|
|
2375
2375
|
}
|
|
2376
2376
|
};
|
|
2377
2377
|
|
|
2378
|
-
// bazel-out/
|
|
2378
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
2379
2379
|
var TraitCompiler = class {
|
|
2380
2380
|
handlers;
|
|
2381
2381
|
reflector;
|
|
@@ -2856,7 +2856,7 @@ function containsErrors(diagnostics) {
|
|
|
2856
2856
|
return diagnostics !== null && diagnostics.some((diag) => diag.category === ts8.DiagnosticCategory.Error);
|
|
2857
2857
|
}
|
|
2858
2858
|
|
|
2859
|
-
// bazel-out/
|
|
2859
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
2860
2860
|
import ts9 from "typescript";
|
|
2861
2861
|
var DtsTransformRegistry = class {
|
|
2862
2862
|
ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
@@ -3006,11 +3006,11 @@ function markForEmitAsSingleLine(node) {
|
|
|
3006
3006
|
ts9.forEachChild(node, markForEmitAsSingleLine);
|
|
3007
3007
|
}
|
|
3008
3008
|
|
|
3009
|
-
// bazel-out/
|
|
3009
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
3010
3010
|
import { ConstantPool } from "@angular/compiler";
|
|
3011
3011
|
import ts11 from "typescript";
|
|
3012
3012
|
|
|
3013
|
-
// bazel-out/
|
|
3013
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
|
|
3014
3014
|
import ts10 from "typescript";
|
|
3015
3015
|
function visit(node, visitor, context) {
|
|
3016
3016
|
return visitor._visit(node, context);
|
|
@@ -3069,7 +3069,7 @@ var Visitor = class {
|
|
|
3069
3069
|
}
|
|
3070
3070
|
};
|
|
3071
3071
|
|
|
3072
|
-
// bazel-out/
|
|
3072
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
3073
3073
|
var NO_DECORATORS = /* @__PURE__ */ new Set();
|
|
3074
3074
|
var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
|
|
3075
3075
|
function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, localCompilationExtraImportsTracker, perf, isCore, isClosureCompilerEnabled) {
|
|
@@ -3315,7 +3315,7 @@ function nodeArrayFromDecoratorsArray(decorators) {
|
|
|
3315
3315
|
return array;
|
|
3316
3316
|
}
|
|
3317
3317
|
|
|
3318
|
-
// bazel-out/
|
|
3318
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
|
|
3319
3319
|
function makeDuplicateDeclarationError(node, data, kind) {
|
|
3320
3320
|
const context = [];
|
|
3321
3321
|
for (const decl of data) {
|
|
@@ -3524,7 +3524,7 @@ function assertLocalCompilationUnresolvedConst(compilationMode, value, nodeToHig
|
|
|
3524
3524
|
}
|
|
3525
3525
|
}
|
|
3526
3526
|
|
|
3527
|
-
// bazel-out/
|
|
3527
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
|
|
3528
3528
|
import { ViewEncapsulation } from "@angular/compiler";
|
|
3529
3529
|
import ts13 from "typescript";
|
|
3530
3530
|
function resolveEnumValue(evaluator, metadata, field, enumSymbolName, isCore) {
|
|
@@ -3575,7 +3575,7 @@ function resolveLiteral(decorator, literalCache) {
|
|
|
3575
3575
|
return meta;
|
|
3576
3576
|
}
|
|
3577
3577
|
|
|
3578
|
-
// bazel-out/
|
|
3578
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
|
|
3579
3579
|
import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
|
|
3580
3580
|
function compileNgFactoryDefField(metadata) {
|
|
3581
3581
|
const res = compileFactoryFunction(metadata);
|
|
@@ -3598,7 +3598,7 @@ function compileDeclareFactory(metadata) {
|
|
|
3598
3598
|
};
|
|
3599
3599
|
}
|
|
3600
3600
|
|
|
3601
|
-
// bazel-out/
|
|
3601
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
|
|
3602
3602
|
var InjectableClassRegistry = class {
|
|
3603
3603
|
host;
|
|
3604
3604
|
isCore;
|
|
@@ -3626,7 +3626,7 @@ var InjectableClassRegistry = class {
|
|
|
3626
3626
|
}
|
|
3627
3627
|
};
|
|
3628
3628
|
|
|
3629
|
-
// bazel-out/
|
|
3629
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
|
|
3630
3630
|
import { ArrowFunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
|
|
3631
3631
|
import ts14 from "typescript";
|
|
3632
3632
|
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
|
|
@@ -3714,7 +3714,7 @@ function removeIdentifierReferences(node, names) {
|
|
|
3714
3714
|
return result.transformed[0];
|
|
3715
3715
|
}
|
|
3716
3716
|
|
|
3717
|
-
// bazel-out/
|
|
3717
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
|
|
3718
3718
|
import { literal as literal2, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
|
|
3719
3719
|
function extractClassDebugInfo(clazz, reflection, compilerHost, rootDirs, forbidOrphanRendering) {
|
|
3720
3720
|
if (!reflection.isClass(clazz)) {
|
|
@@ -3731,13 +3731,13 @@ function extractClassDebugInfo(clazz, reflection, compilerHost, rootDirs, forbid
|
|
|
3731
3731
|
};
|
|
3732
3732
|
}
|
|
3733
3733
|
|
|
3734
|
-
// bazel-out/
|
|
3734
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
|
|
3735
3735
|
var NoopReferencesRegistry = class {
|
|
3736
3736
|
add(source, ...references) {
|
|
3737
3737
|
}
|
|
3738
3738
|
};
|
|
3739
3739
|
|
|
3740
|
-
// bazel-out/
|
|
3740
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
|
|
3741
3741
|
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
|
|
3742
3742
|
function extractSchemas(rawExpr, evaluator, context) {
|
|
3743
3743
|
const schemas = [];
|
|
@@ -3767,7 +3767,7 @@ function extractSchemas(rawExpr, evaluator, context) {
|
|
|
3767
3767
|
return schemas;
|
|
3768
3768
|
}
|
|
3769
3769
|
|
|
3770
|
-
// bazel-out/
|
|
3770
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
|
|
3771
3771
|
import { outputAst } from "@angular/compiler";
|
|
3772
3772
|
function compileInputTransformFields(inputs) {
|
|
3773
3773
|
const extraFields = [];
|
|
@@ -3785,16 +3785,16 @@ function compileInputTransformFields(inputs) {
|
|
|
3785
3785
|
return extraFields;
|
|
3786
3786
|
}
|
|
3787
3787
|
|
|
3788
|
-
// bazel-out/
|
|
3788
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.mjs
|
|
3789
3789
|
var JitDeclarationRegistry = class {
|
|
3790
3790
|
jitDeclarations = /* @__PURE__ */ new Set();
|
|
3791
3791
|
};
|
|
3792
3792
|
|
|
3793
|
-
// bazel-out/
|
|
3793
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
3794
3794
|
import { compileClassDebugInfo, compileHmrInitializer, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, ConstantPool as ConstantPool2, CssSelector as CssSelector5, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser3, outputAst as o4, R3TargetBinder as R3TargetBinder2, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2 } from "@angular/compiler";
|
|
3795
3795
|
import ts51 from "typescript";
|
|
3796
3796
|
|
|
3797
|
-
// bazel-out/
|
|
3797
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
|
|
3798
3798
|
import ts15 from "typescript";
|
|
3799
3799
|
var SemanticSymbol = class {
|
|
3800
3800
|
decl;
|
|
@@ -3813,7 +3813,7 @@ function getSymbolIdentifier(decl) {
|
|
|
3813
3813
|
return decl.name.text;
|
|
3814
3814
|
}
|
|
3815
3815
|
|
|
3816
|
-
// bazel-out/
|
|
3816
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
|
|
3817
3817
|
import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
3818
3818
|
var OpaqueSymbol = class extends SemanticSymbol {
|
|
3819
3819
|
isPublicApiAffected() {
|
|
@@ -3955,10 +3955,10 @@ function getImportPath(expr) {
|
|
|
3955
3955
|
}
|
|
3956
3956
|
}
|
|
3957
3957
|
|
|
3958
|
-
// bazel-out/
|
|
3958
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
3959
3959
|
import ts16 from "typescript";
|
|
3960
3960
|
|
|
3961
|
-
// bazel-out/
|
|
3961
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
|
|
3962
3962
|
function isSymbolEqual(a, b) {
|
|
3963
3963
|
if (a.decl === b.decl) {
|
|
3964
3964
|
return true;
|
|
@@ -4008,7 +4008,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
|
|
|
4008
4008
|
return true;
|
|
4009
4009
|
}
|
|
4010
4010
|
|
|
4011
|
-
// bazel-out/
|
|
4011
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
4012
4012
|
function extractSemanticTypeParameters(node) {
|
|
4013
4013
|
if (!ts16.isClassDeclaration(node) || node.typeParameters === void 0) {
|
|
4014
4014
|
return null;
|
|
@@ -4030,14 +4030,14 @@ function isTypeParameterEqual(a, b) {
|
|
|
4030
4030
|
return a.hasGenericTypeBound === b.hasGenericTypeBound;
|
|
4031
4031
|
}
|
|
4032
4032
|
|
|
4033
|
-
// bazel-out/
|
|
4033
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
|
|
4034
4034
|
var ComponentScopeKind;
|
|
4035
4035
|
(function(ComponentScopeKind2) {
|
|
4036
4036
|
ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
|
|
4037
4037
|
ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
|
|
4038
4038
|
})(ComponentScopeKind || (ComponentScopeKind = {}));
|
|
4039
4039
|
|
|
4040
|
-
// bazel-out/
|
|
4040
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
|
|
4041
4041
|
var CompoundComponentScopeReader = class {
|
|
4042
4042
|
readers;
|
|
4043
4043
|
constructor(readers) {
|
|
@@ -4063,7 +4063,7 @@ var CompoundComponentScopeReader = class {
|
|
|
4063
4063
|
}
|
|
4064
4064
|
};
|
|
4065
4065
|
|
|
4066
|
-
// bazel-out/
|
|
4066
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
|
|
4067
4067
|
var MetadataDtsModuleScopeResolver = class {
|
|
4068
4068
|
dtsMetaReader;
|
|
4069
4069
|
aliasingHost;
|
|
@@ -4141,11 +4141,11 @@ var MetadataDtsModuleScopeResolver = class {
|
|
|
4141
4141
|
}
|
|
4142
4142
|
};
|
|
4143
4143
|
|
|
4144
|
-
// bazel-out/
|
|
4144
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
4145
4145
|
import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
|
|
4146
4146
|
import ts17 from "typescript";
|
|
4147
4147
|
|
|
4148
|
-
// bazel-out/
|
|
4148
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
|
|
4149
4149
|
function getDiagnosticNode(ref, rawExpr) {
|
|
4150
4150
|
return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
|
|
4151
4151
|
}
|
|
@@ -4171,7 +4171,7 @@ function makeUnknownComponentDeferredImportDiagnostic(ref, rawExpr) {
|
|
|
4171
4171
|
return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_DEFERRED_IMPORT, getDiagnosticNode(ref, rawExpr), `Component deferred imports must be standalone components, directives or pipes.`);
|
|
4172
4172
|
}
|
|
4173
4173
|
|
|
4174
|
-
// bazel-out/
|
|
4174
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
4175
4175
|
var IN_PROGRESS_RESOLUTION = {};
|
|
4176
4176
|
var LocalModuleScopeRegistry = class {
|
|
4177
4177
|
localReader;
|
|
@@ -4530,7 +4530,7 @@ function reexportCollision(module, refA, refB) {
|
|
|
4530
4530
|
]);
|
|
4531
4531
|
}
|
|
4532
4532
|
|
|
4533
|
-
// bazel-out/
|
|
4533
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
|
|
4534
4534
|
import { CssSelector, SelectorMatcher } from "@angular/compiler";
|
|
4535
4535
|
import ts18 from "typescript";
|
|
4536
4536
|
var TypeCheckScopeRegistry = class {
|
|
@@ -4614,15 +4614,15 @@ var TypeCheckScopeRegistry = class {
|
|
|
4614
4614
|
}
|
|
4615
4615
|
};
|
|
4616
4616
|
|
|
4617
|
-
// bazel-out/
|
|
4617
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
4618
4618
|
import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser as makeBindingParser2, R3TargetBinder, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
|
|
4619
4619
|
import ts43 from "typescript";
|
|
4620
4620
|
|
|
4621
|
-
// bazel-out/
|
|
4621
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
|
|
4622
4622
|
import { createMayBeForwardRefExpression as createMayBeForwardRefExpression2, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, ParserError, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
|
|
4623
4623
|
import ts22 from "typescript";
|
|
4624
4624
|
|
|
4625
|
-
// bazel-out/
|
|
4625
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_function_access.mjs
|
|
4626
4626
|
function validateAccessOfInitializerApiMember({ api, call }, member) {
|
|
4627
4627
|
if (!api.allowedAccessLevels.includes(member.accessLevel)) {
|
|
4628
4628
|
throw new FatalDiagnosticError(ErrorCode.INITIALIZER_API_DISALLOWED_MEMBER_VISIBILITY, call, makeDiagnosticChain(`Cannot use "${api.functionName}" on a class member that is declared as ${classMemberAccessLevelToString(member.accessLevel)}.`, [
|
|
@@ -4631,7 +4631,7 @@ function validateAccessOfInitializerApiMember({ api, call }, member) {
|
|
|
4631
4631
|
}
|
|
4632
4632
|
}
|
|
4633
4633
|
|
|
4634
|
-
// bazel-out/
|
|
4634
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
|
|
4635
4635
|
import ts19 from "typescript";
|
|
4636
4636
|
function tryParseInitializerApi(functions, expression, reflector, importTracker) {
|
|
4637
4637
|
if (!ts19.isCallExpression(expression)) {
|
|
@@ -4700,7 +4700,7 @@ function parseTopLevelCallFromNamespace(call, functions, importTracker) {
|
|
|
4700
4700
|
return { api: matchingApi, apiReference, isRequired };
|
|
4701
4701
|
}
|
|
4702
4702
|
|
|
4703
|
-
// bazel-out/
|
|
4703
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.mjs
|
|
4704
4704
|
import ts20 from "typescript";
|
|
4705
4705
|
function parseAndValidateInputAndOutputOptions(optionsNode) {
|
|
4706
4706
|
if (!ts20.isObjectLiteralExpression(optionsNode)) {
|
|
@@ -4718,7 +4718,7 @@ function parseAndValidateInputAndOutputOptions(optionsNode) {
|
|
|
4718
4718
|
return { alias };
|
|
4719
4719
|
}
|
|
4720
4720
|
|
|
4721
|
-
// bazel-out/
|
|
4721
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
|
|
4722
4722
|
var INPUT_INITIALIZER_FN = {
|
|
4723
4723
|
functionName: "input",
|
|
4724
4724
|
owningModule: "@angular/core",
|
|
@@ -4750,7 +4750,7 @@ function tryParseSignalInputMapping(member, reflector, importTracker) {
|
|
|
4750
4750
|
};
|
|
4751
4751
|
}
|
|
4752
4752
|
|
|
4753
|
-
// bazel-out/
|
|
4753
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.mjs
|
|
4754
4754
|
var MODEL_INITIALIZER_FN = {
|
|
4755
4755
|
functionName: "model",
|
|
4756
4756
|
owningModule: "@angular/core",
|
|
@@ -4791,7 +4791,7 @@ function tryParseSignalModelMapping(member, reflector, importTracker) {
|
|
|
4791
4791
|
};
|
|
4792
4792
|
}
|
|
4793
4793
|
|
|
4794
|
-
// bazel-out/
|
|
4794
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.mjs
|
|
4795
4795
|
var allowedAccessLevels = [
|
|
4796
4796
|
ClassMemberAccessLevel.PublicWritable,
|
|
4797
4797
|
ClassMemberAccessLevel.PublicReadonly,
|
|
@@ -4835,7 +4835,7 @@ function tryParseInitializerBasedOutput(member, reflector, importTracker) {
|
|
|
4835
4835
|
};
|
|
4836
4836
|
}
|
|
4837
4837
|
|
|
4838
|
-
// bazel-out/
|
|
4838
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.mjs
|
|
4839
4839
|
import { createMayBeForwardRefExpression, outputAst as o } from "@angular/compiler";
|
|
4840
4840
|
import ts21 from "typescript";
|
|
4841
4841
|
var queryFunctionNames = [
|
|
@@ -4920,7 +4920,7 @@ function parseDescendantsOption(value) {
|
|
|
4920
4920
|
throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, value, `Expected "descendants" option to be a boolean literal.`);
|
|
4921
4921
|
}
|
|
4922
4922
|
|
|
4923
|
-
// bazel-out/
|
|
4923
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
|
|
4924
4924
|
var EMPTY_OBJECT = {};
|
|
4925
4925
|
var queryDecoratorNames = [
|
|
4926
4926
|
"ViewChild",
|
|
@@ -5760,7 +5760,7 @@ function extractHostBindingResources(nodes) {
|
|
|
5760
5760
|
return result;
|
|
5761
5761
|
}
|
|
5762
5762
|
|
|
5763
|
-
// bazel-out/
|
|
5763
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
|
|
5764
5764
|
var DirectiveSymbol = class extends SemanticSymbol {
|
|
5765
5765
|
selector;
|
|
5766
5766
|
inputs;
|
|
@@ -5846,10 +5846,10 @@ function isBaseClassEqual(current, previous) {
|
|
|
5846
5846
|
return isSymbolEqual(current, previous);
|
|
5847
5847
|
}
|
|
5848
5848
|
|
|
5849
|
-
// bazel-out/
|
|
5849
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
5850
5850
|
import { CssSelector as CssSelector4, DomElementSchemaRegistry as DomElementSchemaRegistry2, ExternalExpr as ExternalExpr6, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
|
|
5851
5851
|
|
|
5852
|
-
// bazel-out/
|
|
5852
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
|
|
5853
5853
|
var NgOriginalFile = Symbol("NgOriginalFile");
|
|
5854
5854
|
var UpdateMode;
|
|
5855
5855
|
(function(UpdateMode2) {
|
|
@@ -5857,13 +5857,13 @@ var UpdateMode;
|
|
|
5857
5857
|
UpdateMode2[UpdateMode2["Incremental"] = 1] = "Incremental";
|
|
5858
5858
|
})(UpdateMode || (UpdateMode = {}));
|
|
5859
5859
|
|
|
5860
|
-
// bazel-out/
|
|
5860
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
5861
5861
|
import ts24 from "typescript";
|
|
5862
5862
|
|
|
5863
|
-
// bazel-out/
|
|
5863
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
|
|
5864
5864
|
import ts23 from "typescript";
|
|
5865
5865
|
|
|
5866
|
-
// bazel-out/
|
|
5866
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
|
|
5867
5867
|
var NgExtension = Symbol("NgExtension");
|
|
5868
5868
|
function isExtended(sf) {
|
|
5869
5869
|
return sf[NgExtension] !== void 0;
|
|
@@ -5923,13 +5923,13 @@ function retagTsFile(sf) {
|
|
|
5923
5923
|
}
|
|
5924
5924
|
}
|
|
5925
5925
|
|
|
5926
|
-
// bazel-out/
|
|
5926
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
|
|
5927
5927
|
var TS_EXTENSIONS = /\.tsx?$/i;
|
|
5928
5928
|
function makeShimFileName(fileName, suffix) {
|
|
5929
5929
|
return absoluteFrom(fileName.replace(TS_EXTENSIONS, suffix));
|
|
5930
5930
|
}
|
|
5931
5931
|
|
|
5932
|
-
// bazel-out/
|
|
5932
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
|
|
5933
5933
|
var ShimAdapter = class {
|
|
5934
5934
|
delegate;
|
|
5935
5935
|
shims = /* @__PURE__ */ new Map();
|
|
@@ -6026,7 +6026,7 @@ var ShimAdapter = class {
|
|
|
6026
6026
|
}
|
|
6027
6027
|
};
|
|
6028
6028
|
|
|
6029
|
-
// bazel-out/
|
|
6029
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
|
|
6030
6030
|
var ShimReferenceTagger = class {
|
|
6031
6031
|
suffixes;
|
|
6032
6032
|
tagged = /* @__PURE__ */ new Set();
|
|
@@ -6061,7 +6061,7 @@ var ShimReferenceTagger = class {
|
|
|
6061
6061
|
}
|
|
6062
6062
|
};
|
|
6063
6063
|
|
|
6064
|
-
// bazel-out/
|
|
6064
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
6065
6065
|
var DelegatingCompilerHost = class {
|
|
6066
6066
|
delegate;
|
|
6067
6067
|
createHash;
|
|
@@ -6212,7 +6212,7 @@ var TsCreateProgramDriver = class {
|
|
|
6212
6212
|
}
|
|
6213
6213
|
};
|
|
6214
6214
|
|
|
6215
|
-
// bazel-out/
|
|
6215
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
|
|
6216
6216
|
import ts25 from "typescript";
|
|
6217
6217
|
function makeTemplateDiagnostic(id, mapping, span, category, code, messageText, relatedMessages) {
|
|
6218
6218
|
var _a;
|
|
@@ -6323,7 +6323,7 @@ function parseTemplateAsSourceFile(fileName, template) {
|
|
|
6323
6323
|
);
|
|
6324
6324
|
}
|
|
6325
6325
|
|
|
6326
|
-
// bazel-out/
|
|
6326
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
|
|
6327
6327
|
var TYPE_CHECK_ID_MAP = Symbol("TypeCheckId");
|
|
6328
6328
|
function getTypeCheckId(clazz) {
|
|
6329
6329
|
const sf = clazz.getSourceFile();
|
|
@@ -6336,11 +6336,11 @@ function getTypeCheckId(clazz) {
|
|
|
6336
6336
|
return sf[TYPE_CHECK_ID_MAP].get(clazz);
|
|
6337
6337
|
}
|
|
6338
6338
|
|
|
6339
|
-
// bazel-out/
|
|
6339
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
6340
6340
|
import { EmptyExpr, ImplicitReceiver, PropertyRead, PropertyWrite, SafePropertyRead, TmplAstLetDeclaration, TmplAstReference, TmplAstTextAttribute } from "@angular/compiler";
|
|
6341
6341
|
import ts27 from "typescript";
|
|
6342
6342
|
|
|
6343
|
-
// bazel-out/
|
|
6343
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
|
|
6344
6344
|
import { AbsoluteSourceSpan } from "@angular/compiler";
|
|
6345
6345
|
import ts26 from "typescript";
|
|
6346
6346
|
var parseSpanComment = /^(\d+),(\d+)$/;
|
|
@@ -6471,7 +6471,7 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
|
|
|
6471
6471
|
}) || false;
|
|
6472
6472
|
}
|
|
6473
6473
|
|
|
6474
|
-
// bazel-out/
|
|
6474
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
6475
6475
|
var CompletionEngine = class {
|
|
6476
6476
|
tcb;
|
|
6477
6477
|
data;
|
|
@@ -6638,7 +6638,7 @@ var CompletionEngine = class {
|
|
|
6638
6638
|
}
|
|
6639
6639
|
};
|
|
6640
6640
|
|
|
6641
|
-
// bazel-out/
|
|
6641
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
6642
6642
|
import { ParseSourceFile as ParseSourceFile2 } from "@angular/compiler";
|
|
6643
6643
|
|
|
6644
6644
|
// node_modules/magic-string/dist/magic-string.es.mjs
|
|
@@ -7681,10 +7681,10 @@ var MagicString = class {
|
|
|
7681
7681
|
}
|
|
7682
7682
|
};
|
|
7683
7683
|
|
|
7684
|
-
// bazel-out/
|
|
7684
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
7685
7685
|
import ts41 from "typescript";
|
|
7686
7686
|
|
|
7687
|
-
// bazel-out/
|
|
7687
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
|
|
7688
7688
|
import { DomElementSchemaRegistry } from "@angular/compiler";
|
|
7689
7689
|
import ts28 from "typescript";
|
|
7690
7690
|
var REGISTRY = new DomElementSchemaRegistry();
|
|
@@ -7698,8 +7698,8 @@ var RegistryDomSchemaChecker = class {
|
|
|
7698
7698
|
constructor(resolver) {
|
|
7699
7699
|
this.resolver = resolver;
|
|
7700
7700
|
}
|
|
7701
|
-
checkElement(id,
|
|
7702
|
-
const name =
|
|
7701
|
+
checkElement(id, tagName, sourceSpanForDiagnostics, schemas, hostIsStandalone) {
|
|
7702
|
+
const name = tagName.replace(REMOVE_XHTML_REGEX, "");
|
|
7703
7703
|
if (!REGISTRY.hasElement(name, schemas)) {
|
|
7704
7704
|
const mapping = this.resolver.getTemplateSourceMapping(id);
|
|
7705
7705
|
const schemas2 = `'${hostIsStandalone ? "@Component" : "@NgModule"}.schemas'`;
|
|
@@ -7712,24 +7712,24 @@ var RegistryDomSchemaChecker = class {
|
|
|
7712
7712
|
} else {
|
|
7713
7713
|
errorMsg += `2. To allow any element add 'NO_ERRORS_SCHEMA' to the ${schemas2} of this component.`;
|
|
7714
7714
|
}
|
|
7715
|
-
const diag = makeTemplateDiagnostic(id, mapping,
|
|
7715
|
+
const diag = makeTemplateDiagnostic(id, mapping, sourceSpanForDiagnostics, ts28.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SCHEMA_INVALID_ELEMENT), errorMsg);
|
|
7716
7716
|
this._diagnostics.push(diag);
|
|
7717
7717
|
}
|
|
7718
7718
|
}
|
|
7719
|
-
checkTemplateElementProperty(id,
|
|
7720
|
-
if (!REGISTRY.hasProperty(
|
|
7719
|
+
checkTemplateElementProperty(id, tagName, name, span, schemas, hostIsStandalone) {
|
|
7720
|
+
if (!REGISTRY.hasProperty(tagName, name, schemas)) {
|
|
7721
7721
|
const mapping = this.resolver.getTemplateSourceMapping(id);
|
|
7722
7722
|
const decorator = hostIsStandalone ? "@Component" : "@NgModule";
|
|
7723
7723
|
const schemas2 = `'${decorator}.schemas'`;
|
|
7724
|
-
let errorMsg = `Can't bind to '${name}' since it isn't a known property of '${
|
|
7725
|
-
if (
|
|
7724
|
+
let errorMsg = `Can't bind to '${name}' since it isn't a known property of '${tagName}'.`;
|
|
7725
|
+
if (tagName.startsWith("ng-")) {
|
|
7726
7726
|
errorMsg += `
|
|
7727
7727
|
1. If '${name}' is an Angular directive, then add 'CommonModule' to the '${decorator}.imports' of this component.
|
|
7728
7728
|
2. To allow any property add 'NO_ERRORS_SCHEMA' to the ${schemas2} of this component.`;
|
|
7729
|
-
} else if (
|
|
7729
|
+
} else if (tagName.indexOf("-") > -1) {
|
|
7730
7730
|
errorMsg += `
|
|
7731
|
-
1. If '${
|
|
7732
|
-
2. If '${
|
|
7731
|
+
1. If '${tagName}' is an Angular component and it has '${name}' input, then verify that it is ${hostIsStandalone ? "included in the '@Component.imports' of this component" : "part of this module"}.
|
|
7732
|
+
2. If '${tagName}' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the ${schemas2} of this component to suppress this message.
|
|
7733
7733
|
3. To allow any property add 'NO_ERRORS_SCHEMA' to the ${schemas2} of this component.`;
|
|
7734
7734
|
}
|
|
7735
7735
|
const diag = makeTemplateDiagnostic(id, mapping, span, ts28.DiagnosticCategory.Error, ngErrorCode(ErrorCode.SCHEMA_INVALID_ATTRIBUTE), errorMsg);
|
|
@@ -7750,10 +7750,10 @@ var RegistryDomSchemaChecker = class {
|
|
|
7750
7750
|
}
|
|
7751
7751
|
};
|
|
7752
7752
|
|
|
7753
|
-
// bazel-out/
|
|
7753
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
7754
7754
|
import ts34 from "typescript";
|
|
7755
7755
|
|
|
7756
|
-
// bazel-out/
|
|
7756
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/reference_emit_environment.mjs
|
|
7757
7757
|
import { ExpressionType, ExternalExpr as ExternalExpr5, TypeModifier } from "@angular/compiler";
|
|
7758
7758
|
var ReferenceEmitEnvironment = class {
|
|
7759
7759
|
importManager;
|
|
@@ -7788,7 +7788,7 @@ var ReferenceEmitEnvironment = class {
|
|
|
7788
7788
|
}
|
|
7789
7789
|
};
|
|
7790
7790
|
|
|
7791
|
-
// bazel-out/
|
|
7791
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
|
|
7792
7792
|
import ts29 from "typescript";
|
|
7793
7793
|
var SAFE_TO_CAST_WITHOUT_PARENS = /* @__PURE__ */ new Set([
|
|
7794
7794
|
ts29.SyntaxKind.ParenthesizedExpression,
|
|
@@ -7879,15 +7879,15 @@ function tsNumericExpression(value) {
|
|
|
7879
7879
|
return ts29.factory.createNumericLiteral(value);
|
|
7880
7880
|
}
|
|
7881
7881
|
|
|
7882
|
-
// bazel-out/
|
|
7882
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
7883
7883
|
import { ExpressionType as ExpressionType2, R3Identifiers as R3Identifiers2, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
|
|
7884
7884
|
import ts33 from "typescript";
|
|
7885
7885
|
|
|
7886
|
-
// bazel-out/
|
|
7886
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
7887
7887
|
import { R3Identifiers } from "@angular/compiler";
|
|
7888
7888
|
import ts32 from "typescript";
|
|
7889
7889
|
|
|
7890
|
-
// bazel-out/
|
|
7890
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
|
|
7891
7891
|
import ts30 from "typescript";
|
|
7892
7892
|
var TypeParameterEmitter = class {
|
|
7893
7893
|
typeParameters;
|
|
@@ -7967,7 +7967,7 @@ var TypeParameterEmitter = class {
|
|
|
7967
7967
|
}
|
|
7968
7968
|
};
|
|
7969
7969
|
|
|
7970
|
-
// bazel-out/
|
|
7970
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/host_bindings.mjs
|
|
7971
7971
|
import { BindingType, CssSelector as CssSelector2, makeBindingParser, TmplAstBoundAttribute, TmplAstBoundEvent, TmplAstHostElement, AbsoluteSourceSpan as AbsoluteSourceSpan2, ParseSpan, PropertyRead as PropertyRead2, ParsedEventType, Call, ThisReceiver, KeyedRead, LiteralPrimitive, RecursiveAstVisitor, ASTWithName, SafeCall, ImplicitReceiver as ImplicitReceiver2 } from "@angular/compiler";
|
|
7972
7972
|
import ts31 from "typescript";
|
|
7973
7973
|
var GUARD_COMMENT_TEXT = "hostBindingsBlockGuard";
|
|
@@ -8193,7 +8193,7 @@ var ReplaceSpanVisitor = class extends RecursiveAstVisitor {
|
|
|
8193
8193
|
}
|
|
8194
8194
|
};
|
|
8195
8195
|
|
|
8196
|
-
// bazel-out/
|
|
8196
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
8197
8197
|
var TCB_FILE_IMPORT_GRAPH_PREPARE_IDENTIFIERS = [
|
|
8198
8198
|
R3Identifiers.InputSignalBrandWriteType
|
|
8199
8199
|
];
|
|
@@ -8254,7 +8254,7 @@ function findTypeCheckBlock(file, id, isDiagnosticRequest) {
|
|
|
8254
8254
|
return stmt;
|
|
8255
8255
|
}
|
|
8256
8256
|
}
|
|
8257
|
-
return
|
|
8257
|
+
return findNodeInFile(file, (node) => ts32.isFunctionDeclaration(node) && getTypeCheckId2(node, file, isDiagnosticRequest) === id);
|
|
8258
8258
|
}
|
|
8259
8259
|
function findSourceLocation(node, sourceFile, isDiagnosticsRequest) {
|
|
8260
8260
|
while (node !== void 0 && !ts32.isFunctionDeclaration(node)) {
|
|
@@ -8305,8 +8305,19 @@ function checkIfGenericTypeBoundsCanBeEmitted(node, reflector, env) {
|
|
|
8305
8305
|
const emitter = new TypeParameterEmitter(node.typeParameters, reflector);
|
|
8306
8306
|
return emitter.canEmit((ref) => env.canReferenceType(ref));
|
|
8307
8307
|
}
|
|
8308
|
+
function findNodeInFile(file, predicate) {
|
|
8309
|
+
var _a;
|
|
8310
|
+
const visit2 = (node) => {
|
|
8311
|
+
var _a2;
|
|
8312
|
+
if (predicate(node)) {
|
|
8313
|
+
return node;
|
|
8314
|
+
}
|
|
8315
|
+
return (_a2 = ts32.forEachChild(node, visit2)) != null ? _a2 : null;
|
|
8316
|
+
};
|
|
8317
|
+
return (_a = ts32.forEachChild(file, visit2)) != null ? _a : null;
|
|
8318
|
+
}
|
|
8308
8319
|
|
|
8309
|
-
// bazel-out/
|
|
8320
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
8310
8321
|
function generateTypeCtorDeclarationFn(env, meta, nodeTypeRef, typeParams) {
|
|
8311
8322
|
const rawTypeArgs = typeParams !== void 0 ? generateGenericArgs(typeParams) : void 0;
|
|
8312
8323
|
const rawType = ts33.factory.createTypeReferenceNode(nodeTypeRef, rawTypeArgs);
|
|
@@ -8429,7 +8440,7 @@ function typeParametersWithDefaultTypes(params) {
|
|
|
8429
8440
|
});
|
|
8430
8441
|
}
|
|
8431
8442
|
|
|
8432
|
-
// bazel-out/
|
|
8443
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
8433
8444
|
var Environment = class extends ReferenceEmitEnvironment {
|
|
8434
8445
|
config;
|
|
8435
8446
|
nextIds = {
|
|
@@ -8502,8 +8513,8 @@ var Environment = class extends ReferenceEmitEnvironment {
|
|
|
8502
8513
|
}
|
|
8503
8514
|
};
|
|
8504
8515
|
|
|
8505
|
-
// bazel-out/
|
|
8506
|
-
import { AbsoluteSourceSpan as AbsoluteSourceSpan3, TmplAstElement } from "@angular/compiler";
|
|
8516
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
|
|
8517
|
+
import { AbsoluteSourceSpan as AbsoluteSourceSpan3, TmplAstBoundEvent as TmplAstBoundEvent2, TmplAstComponent, TmplAstDirective, TmplAstElement } from "@angular/compiler";
|
|
8507
8518
|
import ts35 from "typescript";
|
|
8508
8519
|
var OutOfBandDiagnosticRecorderImpl = class {
|
|
8509
8520
|
resolver;
|
|
@@ -8696,6 +8707,23 @@ Deferred blocks can only access triggers in same view, a parent embedded view or
|
|
|
8696
8707
|
const errorMsg = `Cannot declare @let called '${decl.name}' as there is another symbol in the template with the same name.`;
|
|
8697
8708
|
this._diagnostics.push(makeTemplateDiagnostic(id, mapping, decl.sourceSpan, ts35.DiagnosticCategory.Error, ngErrorCode(ErrorCode.CONFLICTING_LET_DECLARATION), errorMsg));
|
|
8698
8709
|
}
|
|
8710
|
+
missingNamedTemplateDependency(id, node) {
|
|
8711
|
+
this._diagnostics.push(makeTemplateDiagnostic(
|
|
8712
|
+
id,
|
|
8713
|
+
this.resolver.getTemplateSourceMapping(id),
|
|
8714
|
+
node.startSourceSpan,
|
|
8715
|
+
ts35.DiagnosticCategory.Error,
|
|
8716
|
+
ngErrorCode(ErrorCode.MISSING_NAMED_TEMPLATE_DEPENDENCY),
|
|
8717
|
+
`Cannot find name "${node instanceof TmplAstDirective ? node.name : node.componentName}".`
|
|
8718
|
+
));
|
|
8719
|
+
}
|
|
8720
|
+
incorrectTemplateDependencyType(id, node) {
|
|
8721
|
+
this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), node.startSourceSpan, ts35.DiagnosticCategory.Error, ngErrorCode(ErrorCode.INCORRECT_NAMED_TEMPLATE_DEPENDENCY_TYPE), `Incorrect reference type. Type must be an ${node instanceof TmplAstComponent ? "@Component" : "@Directive"}.`));
|
|
8722
|
+
}
|
|
8723
|
+
unclaimedDirectiveBinding(id, directive, node) {
|
|
8724
|
+
const errorMsg = `Directive ${directive.name} does not have an ${node instanceof TmplAstBoundEvent2 ? "output" : "input"} named "${node.name}". Bindings to directives must target existing inputs or outputs.`;
|
|
8725
|
+
this._diagnostics.push(makeTemplateDiagnostic(id, this.resolver.getTemplateSourceMapping(id), node.keySpan || node.sourceSpan, ts35.DiagnosticCategory.Error, ngErrorCode(ErrorCode.UNCLAIMED_DIRECTIVE_BINDING), errorMsg));
|
|
8726
|
+
}
|
|
8699
8727
|
};
|
|
8700
8728
|
function makeInlineDiagnostic(id, code, node, messageText, relatedInformation) {
|
|
8701
8729
|
return {
|
|
@@ -8705,7 +8733,7 @@ function makeInlineDiagnostic(id, code, node, messageText, relatedInformation) {
|
|
|
8705
8733
|
};
|
|
8706
8734
|
}
|
|
8707
8735
|
|
|
8708
|
-
// bazel-out/
|
|
8736
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
|
|
8709
8737
|
import ts36 from "typescript";
|
|
8710
8738
|
var TypeCheckShimGenerator = class {
|
|
8711
8739
|
extensionPrefix = "ngtypecheck";
|
|
@@ -8721,11 +8749,11 @@ var TypeCheckShimGenerator = class {
|
|
|
8721
8749
|
}
|
|
8722
8750
|
};
|
|
8723
8751
|
|
|
8724
|
-
// bazel-out/
|
|
8725
|
-
import { BindingPipe, BindingType as BindingType2, Call as Call3, createCssSelectorFromNode, CssSelector as CssSelector3, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver3, ParsedEventType as ParsedEventType2, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite2, R3Identifiers as R3Identifiers3, SafeCall as SafeCall2, SafePropertyRead as SafePropertyRead3, SelectorMatcher as SelectorMatcher2, ThisReceiver as ThisReceiver2, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundText, TmplAstContent, TmplAstDeferredBlock, TmplAstElement as TmplAstElement2, TmplAstForLoopBlock, TmplAstIcu, TmplAstIfBlock, TmplAstIfBlockBranch, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstReference as TmplAstReference2, TmplAstSwitchBlock, TmplAstTemplate, TmplAstText, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable, TmplAstHostElement as TmplAstHostElement2, TransplantedType } from "@angular/compiler";
|
|
8752
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
8753
|
+
import { BindingPipe, BindingType as BindingType2, Call as Call3, createCssSelectorFromNode, CssSelector as CssSelector3, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver3, ParsedEventType as ParsedEventType2, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite2, R3Identifiers as R3Identifiers3, SafeCall as SafeCall2, SafePropertyRead as SafePropertyRead3, SelectorMatcher as SelectorMatcher2, ThisReceiver as ThisReceiver2, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundText, TmplAstContent, TmplAstDeferredBlock, TmplAstElement as TmplAstElement2, TmplAstForLoopBlock, TmplAstIcu, TmplAstIfBlock, TmplAstIfBlockBranch, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstReference as TmplAstReference2, TmplAstSwitchBlock, TmplAstTemplate, TmplAstText, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable, TmplAstHostElement as TmplAstHostElement2, TransplantedType, TmplAstComponent as TmplAstComponent2, TmplAstDirective as TmplAstDirective2 } from "@angular/compiler";
|
|
8726
8754
|
import ts39 from "typescript";
|
|
8727
8755
|
|
|
8728
|
-
// bazel-out/
|
|
8756
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
|
|
8729
8757
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan4 } from "@angular/compiler";
|
|
8730
8758
|
import ts37 from "typescript";
|
|
8731
8759
|
function wrapForDiagnostics(expr) {
|
|
@@ -8781,7 +8809,7 @@ function translateDiagnostic(diagnostic, resolver) {
|
|
|
8781
8809
|
return makeTemplateDiagnostic(sourceLocation.id, templateSourceMapping, span, diagnostic.category, diagnostic.code, diagnostic.messageText);
|
|
8782
8810
|
}
|
|
8783
8811
|
|
|
8784
|
-
// bazel-out/
|
|
8812
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
|
|
8785
8813
|
import { ASTWithSource, Call as Call2, EmptyExpr as EmptyExpr2, PropertyRead as PropertyRead3, SafeKeyedRead, SafePropertyRead as SafePropertyRead2 } from "@angular/compiler";
|
|
8786
8814
|
import ts38 from "typescript";
|
|
8787
8815
|
var ANY_EXPRESSION = ts38.factory.createAsExpression(ts38.factory.createNumericLiteral("0"), ts38.factory.createKeywordTypeNode(ts38.SyntaxKind.AnyKeyword));
|
|
@@ -9175,7 +9203,7 @@ var _VeSafeLhsInferenceBugDetector = class {
|
|
|
9175
9203
|
var VeSafeLhsInferenceBugDetector = _VeSafeLhsInferenceBugDetector;
|
|
9176
9204
|
__publicField(VeSafeLhsInferenceBugDetector, "SINGLETON", new _VeSafeLhsInferenceBugDetector());
|
|
9177
9205
|
|
|
9178
|
-
// bazel-out/
|
|
9206
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
9179
9207
|
var TcbGenericContextBehavior;
|
|
9180
9208
|
(function(TcbGenericContextBehavior2) {
|
|
9181
9209
|
TcbGenericContextBehavior2[TcbGenericContextBehavior2["UseEmitter"] = 0] = "UseEmitter";
|
|
@@ -9354,42 +9382,12 @@ var TcbTemplateBodyOp = class extends TcbOp {
|
|
|
9354
9382
|
return false;
|
|
9355
9383
|
}
|
|
9356
9384
|
execute() {
|
|
9385
|
+
let guard = null;
|
|
9357
9386
|
const directiveGuards = [];
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
const dirInstId = this.scope.resolve(this.template, dir);
|
|
9362
|
-
const dirId = this.tcb.env.reference(dir.ref);
|
|
9363
|
-
dir.ngTemplateGuards.forEach((guard2) => {
|
|
9364
|
-
const boundInput = this.template.inputs.find((i) => i.name === guard2.inputName) || this.template.templateAttrs.find((i) => i instanceof TmplAstBoundAttribute2 && i.name === guard2.inputName);
|
|
9365
|
-
if (boundInput !== void 0) {
|
|
9366
|
-
const expr = tcbExpression(boundInput.value, this.tcb, this.scope);
|
|
9367
|
-
markIgnoreDiagnostics(expr);
|
|
9368
|
-
if (guard2.type === "binding") {
|
|
9369
|
-
directiveGuards.push(expr);
|
|
9370
|
-
} else {
|
|
9371
|
-
const guardInvoke = tsCallMethod(dirId, `ngTemplateGuard_${guard2.inputName}`, [
|
|
9372
|
-
dirInstId,
|
|
9373
|
-
expr
|
|
9374
|
-
]);
|
|
9375
|
-
addParseSpanInfo(guardInvoke, boundInput.value.sourceSpan);
|
|
9376
|
-
directiveGuards.push(guardInvoke);
|
|
9377
|
-
}
|
|
9378
|
-
}
|
|
9379
|
-
});
|
|
9380
|
-
if (dir.hasNgTemplateContextGuard) {
|
|
9381
|
-
if (this.tcb.env.config.applyTemplateContextGuards) {
|
|
9382
|
-
const ctx = this.scope.resolve(this.template);
|
|
9383
|
-
const guardInvoke = tsCallMethod(dirId, "ngTemplateContextGuard", [dirInstId, ctx]);
|
|
9384
|
-
addParseSpanInfo(guardInvoke, this.template.sourceSpan);
|
|
9385
|
-
directiveGuards.push(guardInvoke);
|
|
9386
|
-
} else if (this.template.variables.length > 0 && this.tcb.env.config.suggestionsForSuboptimalTypeInference) {
|
|
9387
|
-
this.tcb.oobRecorder.suboptimalTypeInference(this.tcb.id, this.template.variables);
|
|
9388
|
-
}
|
|
9389
|
-
}
|
|
9390
|
-
}
|
|
9387
|
+
this.addDirectiveGuards(directiveGuards, this.template, this.tcb.boundTarget.getDirectivesOfNode(this.template));
|
|
9388
|
+
for (const directive of this.template.directives) {
|
|
9389
|
+
this.addDirectiveGuards(directiveGuards, directive, this.tcb.boundTarget.getDirectivesOfNode(directive));
|
|
9391
9390
|
}
|
|
9392
|
-
let guard = null;
|
|
9393
9391
|
if (directiveGuards.length > 0) {
|
|
9394
9392
|
guard = directiveGuards.reduce((expr, dirGuard) => ts39.factory.createBinaryExpression(expr, ts39.SyntaxKind.AmpersandAmpersandToken, dirGuard), directiveGuards.pop());
|
|
9395
9393
|
}
|
|
@@ -9408,6 +9406,45 @@ var TcbTemplateBodyOp = class extends TcbOp {
|
|
|
9408
9406
|
this.scope.addStatement(tmplBlock);
|
|
9409
9407
|
return null;
|
|
9410
9408
|
}
|
|
9409
|
+
addDirectiveGuards(guards, hostNode, directives) {
|
|
9410
|
+
if (directives === null || directives.length === 0) {
|
|
9411
|
+
return;
|
|
9412
|
+
}
|
|
9413
|
+
const isTemplate = hostNode instanceof TmplAstTemplate;
|
|
9414
|
+
for (const dir of directives) {
|
|
9415
|
+
const dirInstId = this.scope.resolve(hostNode, dir);
|
|
9416
|
+
const dirId = this.tcb.env.reference(dir.ref);
|
|
9417
|
+
dir.ngTemplateGuards.forEach((guard) => {
|
|
9418
|
+
const boundInput = hostNode.inputs.find((i) => i.name === guard.inputName) || (isTemplate ? hostNode.templateAttrs.find((input) => {
|
|
9419
|
+
return input instanceof TmplAstBoundAttribute2 && input.name === guard.inputName;
|
|
9420
|
+
}) : void 0);
|
|
9421
|
+
if (boundInput !== void 0) {
|
|
9422
|
+
const expr = tcbExpression(boundInput.value, this.tcb, this.scope);
|
|
9423
|
+
markIgnoreDiagnostics(expr);
|
|
9424
|
+
if (guard.type === "binding") {
|
|
9425
|
+
guards.push(expr);
|
|
9426
|
+
} else {
|
|
9427
|
+
const guardInvoke = tsCallMethod(dirId, `ngTemplateGuard_${guard.inputName}`, [
|
|
9428
|
+
dirInstId,
|
|
9429
|
+
expr
|
|
9430
|
+
]);
|
|
9431
|
+
addParseSpanInfo(guardInvoke, boundInput.value.sourceSpan);
|
|
9432
|
+
guards.push(guardInvoke);
|
|
9433
|
+
}
|
|
9434
|
+
}
|
|
9435
|
+
});
|
|
9436
|
+
if (dir.hasNgTemplateContextGuard) {
|
|
9437
|
+
if (this.tcb.env.config.applyTemplateContextGuards) {
|
|
9438
|
+
const ctx = this.scope.resolve(hostNode);
|
|
9439
|
+
const guardInvoke = tsCallMethod(dirId, "ngTemplateContextGuard", [dirInstId, ctx]);
|
|
9440
|
+
addParseSpanInfo(guardInvoke, hostNode.sourceSpan);
|
|
9441
|
+
guards.push(guardInvoke);
|
|
9442
|
+
} else if (isTemplate && hostNode.variables.length > 0 && this.tcb.env.config.suggestionsForSuboptimalTypeInference) {
|
|
9443
|
+
this.tcb.oobRecorder.suboptimalTypeInference(this.tcb.id, hostNode.variables);
|
|
9444
|
+
}
|
|
9445
|
+
}
|
|
9446
|
+
}
|
|
9447
|
+
}
|
|
9411
9448
|
};
|
|
9412
9449
|
var TcbExpressionOp = class extends TcbOp {
|
|
9413
9450
|
tcb;
|
|
@@ -9577,7 +9614,7 @@ var TcbDirectiveCtorOp = class extends TcbOp {
|
|
|
9577
9614
|
return id;
|
|
9578
9615
|
}
|
|
9579
9616
|
circularFallback() {
|
|
9580
|
-
return new TcbDirectiveCtorCircularFallbackOp(this.tcb, this.scope, this.
|
|
9617
|
+
return new TcbDirectiveCtorCircularFallbackOp(this.tcb, this.scope, this.dir);
|
|
9581
9618
|
}
|
|
9582
9619
|
};
|
|
9583
9620
|
var TcbDirectiveInputsOp = class extends TcbOp {
|
|
@@ -9681,13 +9718,11 @@ var TcbDirectiveInputsOp = class extends TcbOp {
|
|
|
9681
9718
|
var TcbDirectiveCtorCircularFallbackOp = class extends TcbOp {
|
|
9682
9719
|
tcb;
|
|
9683
9720
|
scope;
|
|
9684
|
-
node;
|
|
9685
9721
|
dir;
|
|
9686
|
-
constructor(tcb, scope,
|
|
9722
|
+
constructor(tcb, scope, dir) {
|
|
9687
9723
|
super();
|
|
9688
9724
|
this.tcb = tcb;
|
|
9689
9725
|
this.scope = scope;
|
|
9690
|
-
this.node = node;
|
|
9691
9726
|
this.dir = dir;
|
|
9692
9727
|
}
|
|
9693
9728
|
get optional() {
|
|
@@ -9723,10 +9758,10 @@ var TcbDomSchemaCheckerOp = class extends TcbOp {
|
|
|
9723
9758
|
execute() {
|
|
9724
9759
|
var _a, _b;
|
|
9725
9760
|
const element = this.element;
|
|
9726
|
-
const isTemplateElement = element instanceof TmplAstElement2;
|
|
9761
|
+
const isTemplateElement = element instanceof TmplAstElement2 || element instanceof TmplAstComponent2;
|
|
9727
9762
|
const bindings = isTemplateElement ? element.inputs : element.bindings;
|
|
9728
9763
|
if (this.checkElement && isTemplateElement) {
|
|
9729
|
-
this.tcb.domSchemaChecker.checkElement(this.tcb.id, element, this.tcb.schemas, this.tcb.hostIsStandalone);
|
|
9764
|
+
this.tcb.domSchemaChecker.checkElement(this.tcb.id, this.getTagName(element), element.startSourceSpan, this.tcb.schemas, this.tcb.hostIsStandalone);
|
|
9730
9765
|
}
|
|
9731
9766
|
for (const binding of bindings) {
|
|
9732
9767
|
const isPropertyBinding = binding.type === BindingType2.Property || binding.type === BindingType2.TwoWay;
|
|
@@ -9736,7 +9771,7 @@ var TcbDomSchemaCheckerOp = class extends TcbOp {
|
|
|
9736
9771
|
if (isPropertyBinding && binding.name !== "style" && binding.name !== "class") {
|
|
9737
9772
|
const propertyName = (_b = ATTR_TO_PROP.get(binding.name)) != null ? _b : binding.name;
|
|
9738
9773
|
if (isTemplateElement) {
|
|
9739
|
-
this.tcb.domSchemaChecker.checkTemplateElementProperty(this.tcb.id, element, propertyName, binding.sourceSpan, this.tcb.schemas, this.tcb.hostIsStandalone);
|
|
9774
|
+
this.tcb.domSchemaChecker.checkTemplateElementProperty(this.tcb.id, this.getTagName(element), propertyName, binding.sourceSpan, this.tcb.schemas, this.tcb.hostIsStandalone);
|
|
9740
9775
|
} else {
|
|
9741
9776
|
this.tcb.domSchemaChecker.checkHostElementProperty(this.tcb.id, element, propertyName, binding.keySpan, this.tcb.schemas);
|
|
9742
9777
|
}
|
|
@@ -9744,6 +9779,9 @@ var TcbDomSchemaCheckerOp = class extends TcbOp {
|
|
|
9744
9779
|
}
|
|
9745
9780
|
return null;
|
|
9746
9781
|
}
|
|
9782
|
+
getTagName(node) {
|
|
9783
|
+
return node instanceof TmplAstElement2 ? node.name : getComponentTagName(node);
|
|
9784
|
+
}
|
|
9747
9785
|
};
|
|
9748
9786
|
var TcbControlFlowContentProjectionOp = class extends TcbOp {
|
|
9749
9787
|
tcb;
|
|
@@ -9842,6 +9880,25 @@ var TcbHostElementOp = class extends TcbOp {
|
|
|
9842
9880
|
return id;
|
|
9843
9881
|
}
|
|
9844
9882
|
};
|
|
9883
|
+
var TcbComponentNodeOp = class extends TcbOp {
|
|
9884
|
+
tcb;
|
|
9885
|
+
scope;
|
|
9886
|
+
component;
|
|
9887
|
+
optional = true;
|
|
9888
|
+
constructor(tcb, scope, component) {
|
|
9889
|
+
super();
|
|
9890
|
+
this.tcb = tcb;
|
|
9891
|
+
this.scope = scope;
|
|
9892
|
+
this.component = component;
|
|
9893
|
+
}
|
|
9894
|
+
execute() {
|
|
9895
|
+
const id = this.tcb.allocateId();
|
|
9896
|
+
const initializer = tsCreateElement(getComponentTagName(this.component));
|
|
9897
|
+
addParseSpanInfo(initializer, this.component.startSourceSpan || this.component.sourceSpan);
|
|
9898
|
+
this.scope.addStatement(tsCreateVariable(id, initializer));
|
|
9899
|
+
return id;
|
|
9900
|
+
}
|
|
9901
|
+
};
|
|
9845
9902
|
var ATTR_TO_PROP = new Map(Object.entries({
|
|
9846
9903
|
"class": "className",
|
|
9847
9904
|
"for": "htmlFor",
|
|
@@ -10254,6 +10311,7 @@ var _Scope = class {
|
|
|
10254
10311
|
opQueue = [];
|
|
10255
10312
|
elementOpMap = /* @__PURE__ */ new Map();
|
|
10256
10313
|
hostElementOpMap = /* @__PURE__ */ new Map();
|
|
10314
|
+
componentNodeOpMap = /* @__PURE__ */ new Map();
|
|
10257
10315
|
directiveOpMap = /* @__PURE__ */ new Map();
|
|
10258
10316
|
referenceOpMap = /* @__PURE__ */ new Map();
|
|
10259
10317
|
templateCtxOpMap = /* @__PURE__ */ new Map();
|
|
@@ -10379,15 +10437,13 @@ var _Scope = class {
|
|
|
10379
10437
|
return typeof opIndexOrNode === "number" ? this.resolveOp(opIndexOrNode) : opIndexOrNode;
|
|
10380
10438
|
} else if (ref instanceof TmplAstTemplate && directive === void 0 && this.templateCtxOpMap.has(ref)) {
|
|
10381
10439
|
return this.resolveOp(this.templateCtxOpMap.get(ref));
|
|
10382
|
-
} else if ((ref instanceof TmplAstElement2 || ref instanceof TmplAstTemplate) && directive !== void 0 && this.directiveOpMap.has(ref)) {
|
|
10440
|
+
} else if ((ref instanceof TmplAstElement2 || ref instanceof TmplAstTemplate || ref instanceof TmplAstComponent2 || ref instanceof TmplAstDirective2) && directive !== void 0 && this.directiveOpMap.has(ref)) {
|
|
10383
10441
|
const dirMap = this.directiveOpMap.get(ref);
|
|
10384
|
-
|
|
10385
|
-
return this.resolveOp(dirMap.get(directive));
|
|
10386
|
-
} else {
|
|
10387
|
-
return null;
|
|
10388
|
-
}
|
|
10442
|
+
return dirMap.has(directive) ? this.resolveOp(dirMap.get(directive)) : null;
|
|
10389
10443
|
} else if (ref instanceof TmplAstElement2 && this.elementOpMap.has(ref)) {
|
|
10390
10444
|
return this.resolveOp(this.elementOpMap.get(ref));
|
|
10445
|
+
} else if (ref instanceof TmplAstComponent2 && this.componentNodeOpMap.has(ref)) {
|
|
10446
|
+
return this.resolveOp(this.componentNodeOpMap.get(ref));
|
|
10391
10447
|
} else if (ref instanceof TmplAstHostElement2 && this.hostElementOpMap.has(ref)) {
|
|
10392
10448
|
return this.resolveOp(this.hostElementOpMap.get(ref));
|
|
10393
10449
|
} else {
|
|
@@ -10421,13 +10477,15 @@ var _Scope = class {
|
|
|
10421
10477
|
if (this.tcb.env.config.controlFlowPreventingContentProjection !== "suppress") {
|
|
10422
10478
|
this.appendContentProjectionCheckOp(node);
|
|
10423
10479
|
}
|
|
10424
|
-
this.
|
|
10425
|
-
this.
|
|
10480
|
+
this.appendDirectivesAndInputsOfElementLikeNode(node);
|
|
10481
|
+
this.appendOutputsOfElementLikeNode(node);
|
|
10482
|
+
this.appendSelectorlessDirectives(node);
|
|
10426
10483
|
this.appendChildren(node);
|
|
10427
10484
|
this.checkAndAppendReferencesOfNode(node);
|
|
10428
10485
|
} else if (node instanceof TmplAstTemplate) {
|
|
10429
|
-
this.
|
|
10430
|
-
this.
|
|
10486
|
+
this.appendDirectivesAndInputsOfElementLikeNode(node);
|
|
10487
|
+
this.appendOutputsOfElementLikeNode(node);
|
|
10488
|
+
this.appendSelectorlessDirectives(node);
|
|
10431
10489
|
const ctxIndex = this.opQueue.push(new TcbTemplateContextOp(this.tcb, this)) - 1;
|
|
10432
10490
|
this.templateCtxOpMap.set(node, ctxIndex);
|
|
10433
10491
|
if (this.tcb.env.config.checkTemplateBodies) {
|
|
@@ -10436,6 +10494,8 @@ var _Scope = class {
|
|
|
10436
10494
|
this.appendDeepSchemaChecks(node.children);
|
|
10437
10495
|
}
|
|
10438
10496
|
this.checkAndAppendReferencesOfNode(node);
|
|
10497
|
+
} else if (node instanceof TmplAstComponent2) {
|
|
10498
|
+
this.appendComponentNode(node);
|
|
10439
10499
|
} else if (node instanceof TmplAstDeferredBlock) {
|
|
10440
10500
|
this.appendDeferredBlock(node);
|
|
10441
10501
|
} else if (node instanceof TmplAstIfBlock) {
|
|
@@ -10484,7 +10544,7 @@ var _Scope = class {
|
|
|
10484
10544
|
this.referenceOpMap.set(ref, ctxIndex);
|
|
10485
10545
|
}
|
|
10486
10546
|
}
|
|
10487
|
-
|
|
10547
|
+
appendDirectivesAndInputsOfElementLikeNode(node) {
|
|
10488
10548
|
const claimedInputs = /* @__PURE__ */ new Set();
|
|
10489
10549
|
const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
|
|
10490
10550
|
if (directives === null || directives.length === 0) {
|
|
@@ -10492,29 +10552,16 @@ var _Scope = class {
|
|
|
10492
10552
|
this.opQueue.push(new TcbUnclaimedInputsOp(this.tcb, this, node.inputs, node, claimedInputs), new TcbDomSchemaCheckerOp(this.tcb, node, true, claimedInputs));
|
|
10493
10553
|
}
|
|
10494
10554
|
return;
|
|
10495
|
-
}
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
}
|
|
10555
|
+
}
|
|
10556
|
+
if (node instanceof TmplAstElement2) {
|
|
10557
|
+
const isDeferred = this.tcb.boundTarget.isDeferred(node);
|
|
10558
|
+
if (!isDeferred && directives.some((dirMeta) => dirMeta.isExplicitlyDeferred)) {
|
|
10559
|
+
this.tcb.oobRecorder.deferredComponentUsedEagerly(this.tcb.id, node);
|
|
10501
10560
|
}
|
|
10502
10561
|
}
|
|
10503
10562
|
const dirMap = /* @__PURE__ */ new Map();
|
|
10504
10563
|
for (const dir of directives) {
|
|
10505
|
-
|
|
10506
|
-
const host = this.tcb.env.reflector;
|
|
10507
|
-
const dirRef = dir.ref;
|
|
10508
|
-
if (!dir.isGeneric) {
|
|
10509
|
-
directiveOp = new TcbNonGenericDirectiveTypeOp(this.tcb, this, node, dir);
|
|
10510
|
-
} else if (!requiresInlineTypeCtor(dirRef.node, host, this.tcb.env) || this.tcb.env.config.useInlineTypeConstructors) {
|
|
10511
|
-
directiveOp = new TcbDirectiveCtorOp(this.tcb, this, node, dir);
|
|
10512
|
-
} else {
|
|
10513
|
-
directiveOp = new TcbGenericDirectiveTypeWithAnyParamsOp(this.tcb, this, node, dir);
|
|
10514
|
-
}
|
|
10515
|
-
const dirIndex = this.opQueue.push(directiveOp) - 1;
|
|
10516
|
-
dirMap.set(dir, dirIndex);
|
|
10517
|
-
this.opQueue.push(new TcbDirectiveInputsOp(this.tcb, this, node, dir));
|
|
10564
|
+
this.appendDirectiveInputs(dir, node, dirMap);
|
|
10518
10565
|
}
|
|
10519
10566
|
this.directiveOpMap.set(node, dirMap);
|
|
10520
10567
|
if (node instanceof TmplAstElement2) {
|
|
@@ -10528,7 +10575,7 @@ var _Scope = class {
|
|
|
10528
10575
|
this.opQueue.push(new TcbDomSchemaCheckerOp(this.tcb, node, checkElement, claimedInputs));
|
|
10529
10576
|
}
|
|
10530
10577
|
}
|
|
10531
|
-
|
|
10578
|
+
appendOutputsOfElementLikeNode(node) {
|
|
10532
10579
|
const claimedOutputs = /* @__PURE__ */ new Set();
|
|
10533
10580
|
const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
|
|
10534
10581
|
if (directives === null || directives.length === 0) {
|
|
@@ -10549,6 +10596,87 @@ var _Scope = class {
|
|
|
10549
10596
|
this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, node.outputs, node.inputs, claimedOutputs));
|
|
10550
10597
|
}
|
|
10551
10598
|
}
|
|
10599
|
+
appendInputsOfSelectorlessNode(node) {
|
|
10600
|
+
const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
|
|
10601
|
+
const claimedInputs = /* @__PURE__ */ new Set();
|
|
10602
|
+
if (directives !== null && directives.length > 0) {
|
|
10603
|
+
const dirMap = /* @__PURE__ */ new Map();
|
|
10604
|
+
for (const dir of directives) {
|
|
10605
|
+
this.appendDirectiveInputs(dir, node, dirMap);
|
|
10606
|
+
for (const propertyName of dir.inputs.propertyNames) {
|
|
10607
|
+
claimedInputs.add(propertyName);
|
|
10608
|
+
}
|
|
10609
|
+
}
|
|
10610
|
+
this.directiveOpMap.set(node, dirMap);
|
|
10611
|
+
}
|
|
10612
|
+
if (node instanceof TmplAstDirective2) {
|
|
10613
|
+
for (const input of node.inputs) {
|
|
10614
|
+
if (!claimedInputs.has(input.name)) {
|
|
10615
|
+
this.tcb.oobRecorder.unclaimedDirectiveBinding(this.tcb.id, node, input);
|
|
10616
|
+
}
|
|
10617
|
+
}
|
|
10618
|
+
for (const attr of node.attributes) {
|
|
10619
|
+
if (!claimedInputs.has(attr.name)) {
|
|
10620
|
+
this.tcb.oobRecorder.unclaimedDirectiveBinding(this.tcb.id, node, attr);
|
|
10621
|
+
}
|
|
10622
|
+
}
|
|
10623
|
+
} else {
|
|
10624
|
+
const checkElement = node.tagName !== null;
|
|
10625
|
+
this.opQueue.push(new TcbUnclaimedInputsOp(this.tcb, this, node.inputs, node, claimedInputs), new TcbDomSchemaCheckerOp(this.tcb, node, checkElement, claimedInputs));
|
|
10626
|
+
}
|
|
10627
|
+
}
|
|
10628
|
+
appendOutputsOfSelectorlessNode(node) {
|
|
10629
|
+
const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
|
|
10630
|
+
const claimedOutputs = /* @__PURE__ */ new Set();
|
|
10631
|
+
if (directives !== null && directives.length > 0) {
|
|
10632
|
+
for (const dir of directives) {
|
|
10633
|
+
this.opQueue.push(new TcbDirectiveOutputsOp(this.tcb, this, node, dir));
|
|
10634
|
+
for (const outputProperty of dir.outputs.propertyNames) {
|
|
10635
|
+
claimedOutputs.add(outputProperty);
|
|
10636
|
+
}
|
|
10637
|
+
}
|
|
10638
|
+
}
|
|
10639
|
+
if (node instanceof TmplAstDirective2) {
|
|
10640
|
+
for (const output of node.outputs) {
|
|
10641
|
+
if (!claimedOutputs.has(output.name)) {
|
|
10642
|
+
this.tcb.oobRecorder.unclaimedDirectiveBinding(this.tcb.id, node, output);
|
|
10643
|
+
}
|
|
10644
|
+
}
|
|
10645
|
+
} else {
|
|
10646
|
+
this.opQueue.push(new TcbUnclaimedOutputsOp(this.tcb, this, node, node.outputs, node.inputs, claimedOutputs));
|
|
10647
|
+
}
|
|
10648
|
+
}
|
|
10649
|
+
appendDirectiveInputs(dir, node, dirMap) {
|
|
10650
|
+
let directiveOp;
|
|
10651
|
+
const host = this.tcb.env.reflector;
|
|
10652
|
+
const dirRef = dir.ref;
|
|
10653
|
+
if (!dir.isGeneric) {
|
|
10654
|
+
directiveOp = new TcbNonGenericDirectiveTypeOp(this.tcb, this, node, dir);
|
|
10655
|
+
} else if (!requiresInlineTypeCtor(dirRef.node, host, this.tcb.env) || this.tcb.env.config.useInlineTypeConstructors) {
|
|
10656
|
+
directiveOp = new TcbDirectiveCtorOp(this.tcb, this, node, dir);
|
|
10657
|
+
} else {
|
|
10658
|
+
directiveOp = new TcbGenericDirectiveTypeWithAnyParamsOp(this.tcb, this, node, dir);
|
|
10659
|
+
}
|
|
10660
|
+
const dirIndex = this.opQueue.push(directiveOp) - 1;
|
|
10661
|
+
dirMap.set(dir, dirIndex);
|
|
10662
|
+
this.opQueue.push(new TcbDirectiveInputsOp(this.tcb, this, node, dir));
|
|
10663
|
+
}
|
|
10664
|
+
appendSelectorlessDirectives(node) {
|
|
10665
|
+
for (const directive of node.directives) {
|
|
10666
|
+
if (!this.tcb.boundTarget.referencedDirectiveExists(directive.name)) {
|
|
10667
|
+
this.tcb.oobRecorder.missingNamedTemplateDependency(this.tcb.id, directive);
|
|
10668
|
+
continue;
|
|
10669
|
+
}
|
|
10670
|
+
const directives = this.tcb.boundTarget.getDirectivesOfNode(directive);
|
|
10671
|
+
if (directives === null || directives.length === 0 || directives.some((dir) => dir.isComponent)) {
|
|
10672
|
+
this.tcb.oobRecorder.incorrectTemplateDependencyType(this.tcb.id, directive);
|
|
10673
|
+
continue;
|
|
10674
|
+
}
|
|
10675
|
+
this.appendInputsOfSelectorlessNode(directive);
|
|
10676
|
+
this.appendOutputsOfSelectorlessNode(directive);
|
|
10677
|
+
this.checkAndAppendReferencesOfNode(directive);
|
|
10678
|
+
}
|
|
10679
|
+
}
|
|
10552
10680
|
appendDeepSchemaChecks(nodes) {
|
|
10553
10681
|
for (const node of nodes) {
|
|
10554
10682
|
if (!(node instanceof TmplAstElement2 || node instanceof TmplAstTemplate)) {
|
|
@@ -10556,7 +10684,14 @@ var _Scope = class {
|
|
|
10556
10684
|
}
|
|
10557
10685
|
if (node instanceof TmplAstElement2) {
|
|
10558
10686
|
const claimedInputs = /* @__PURE__ */ new Set();
|
|
10559
|
-
|
|
10687
|
+
let directives = this.tcb.boundTarget.getDirectivesOfNode(node);
|
|
10688
|
+
for (const dirNode of node.directives) {
|
|
10689
|
+
const directiveResults = this.tcb.boundTarget.getDirectivesOfNode(dirNode);
|
|
10690
|
+
if (directiveResults !== null && directiveResults.length > 0) {
|
|
10691
|
+
directives != null ? directives : directives = [];
|
|
10692
|
+
directives.push(...directiveResults);
|
|
10693
|
+
}
|
|
10694
|
+
}
|
|
10560
10695
|
let hasDirectives;
|
|
10561
10696
|
if (directives === null || directives.length === 0) {
|
|
10562
10697
|
hasDirectives = false;
|
|
@@ -10593,6 +10728,27 @@ var _Scope = class {
|
|
|
10593
10728
|
}
|
|
10594
10729
|
}
|
|
10595
10730
|
}
|
|
10731
|
+
appendComponentNode(node) {
|
|
10732
|
+
if (!this.tcb.boundTarget.referencedDirectiveExists(node.componentName)) {
|
|
10733
|
+
this.tcb.oobRecorder.missingNamedTemplateDependency(this.tcb.id, node);
|
|
10734
|
+
return;
|
|
10735
|
+
}
|
|
10736
|
+
const directives = this.tcb.boundTarget.getDirectivesOfNode(node);
|
|
10737
|
+
if (directives === null || directives.length === 0 || directives.every((dir) => !dir.isComponent)) {
|
|
10738
|
+
this.tcb.oobRecorder.incorrectTemplateDependencyType(this.tcb.id, node);
|
|
10739
|
+
return;
|
|
10740
|
+
}
|
|
10741
|
+
const opIndex = this.opQueue.push(new TcbComponentNodeOp(this.tcb, this, node)) - 1;
|
|
10742
|
+
this.componentNodeOpMap.set(node, opIndex);
|
|
10743
|
+
if (this.tcb.env.config.controlFlowPreventingContentProjection !== "suppress") {
|
|
10744
|
+
this.appendContentProjectionCheckOp(node);
|
|
10745
|
+
}
|
|
10746
|
+
this.appendInputsOfSelectorlessNode(node);
|
|
10747
|
+
this.appendOutputsOfSelectorlessNode(node);
|
|
10748
|
+
this.appendSelectorlessDirectives(node);
|
|
10749
|
+
this.appendChildren(node);
|
|
10750
|
+
this.checkAndAppendReferencesOfNode(node);
|
|
10751
|
+
}
|
|
10596
10752
|
appendDeferredBlock(block) {
|
|
10597
10753
|
this.appendDeferredTriggers(block, block.triggers);
|
|
10598
10754
|
this.appendDeferredTriggers(block, block.prefetchTriggers);
|
|
@@ -10932,8 +11088,11 @@ var TcbForLoopTrackTranslator = class extends TcbExpressionTranslator {
|
|
|
10932
11088
|
return super.resolve(ast);
|
|
10933
11089
|
}
|
|
10934
11090
|
};
|
|
11091
|
+
function getComponentTagName(node) {
|
|
11092
|
+
return node.tagName || "ng-component";
|
|
11093
|
+
}
|
|
10935
11094
|
|
|
10936
|
-
// bazel-out/
|
|
11095
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
|
|
10937
11096
|
import ts40 from "typescript";
|
|
10938
11097
|
var TypeCheckFile = class extends Environment {
|
|
10939
11098
|
fileName;
|
|
@@ -10982,7 +11141,7 @@ var TypeCheckFile = class extends Environment {
|
|
|
10982
11141
|
}
|
|
10983
11142
|
};
|
|
10984
11143
|
|
|
10985
|
-
// bazel-out/
|
|
11144
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
10986
11145
|
var InliningMode;
|
|
10987
11146
|
(function(InliningMode2) {
|
|
10988
11147
|
InliningMode2[InliningMode2["InlineOps"] = 0] = "InlineOps";
|
|
@@ -11267,10 +11426,10 @@ var TypeCtorOp = class {
|
|
|
11267
11426
|
}
|
|
11268
11427
|
};
|
|
11269
11428
|
|
|
11270
|
-
// bazel-out/
|
|
11429
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
11271
11430
|
import { ParseLocation as ParseLocation2, ParseSourceSpan as ParseSourceSpan2 } from "@angular/compiler";
|
|
11272
11431
|
|
|
11273
|
-
// bazel-out/
|
|
11432
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
|
|
11274
11433
|
var LF_CHAR = 10;
|
|
11275
11434
|
var CR_CHAR = 13;
|
|
11276
11435
|
var LINE_SEP_CHAR = 8232;
|
|
@@ -11311,7 +11470,7 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
|
|
|
11311
11470
|
return low - 1;
|
|
11312
11471
|
}
|
|
11313
11472
|
|
|
11314
|
-
// bazel-out/
|
|
11473
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
11315
11474
|
var Source = class {
|
|
11316
11475
|
mapping;
|
|
11317
11476
|
file;
|
|
@@ -11377,8 +11536,8 @@ var DirectiveSourceManager = class {
|
|
|
11377
11536
|
}
|
|
11378
11537
|
};
|
|
11379
11538
|
|
|
11380
|
-
// bazel-out/
|
|
11381
|
-
import { AST, ASTWithName as ASTWithName2, ASTWithSource as ASTWithSource2, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute3, TmplAstBoundEvent as
|
|
11539
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
|
|
11540
|
+
import { AST, ASTWithName as ASTWithName2, ASTWithSource as ASTWithSource2, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute3, TmplAstBoundEvent as TmplAstBoundEvent3, TmplAstElement as TmplAstElement3, TmplAstLetDeclaration as TmplAstLetDeclaration3, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
|
|
11382
11541
|
import ts42 from "typescript";
|
|
11383
11542
|
var SymbolBuilder = class {
|
|
11384
11543
|
tcbPath;
|
|
@@ -11403,7 +11562,7 @@ var SymbolBuilder = class {
|
|
|
11403
11562
|
let symbol = null;
|
|
11404
11563
|
if (node instanceof TmplAstBoundAttribute3 || node instanceof TmplAstTextAttribute3) {
|
|
11405
11564
|
symbol = this.getSymbolOfInputBinding(node);
|
|
11406
|
-
} else if (node instanceof
|
|
11565
|
+
} else if (node instanceof TmplAstBoundEvent3) {
|
|
11407
11566
|
symbol = this.getSymbolOfBoundEvent(node);
|
|
11408
11567
|
} else if (node instanceof TmplAstElement3) {
|
|
11409
11568
|
symbol = this.getSymbolOfElement(node);
|
|
@@ -11538,7 +11697,24 @@ var SymbolBuilder = class {
|
|
|
11538
11697
|
if (directives === null) {
|
|
11539
11698
|
return null;
|
|
11540
11699
|
}
|
|
11541
|
-
|
|
11700
|
+
const directive = directives.find((m) => m.ref.node === directiveDeclaration);
|
|
11701
|
+
if (directive) {
|
|
11702
|
+
return directive;
|
|
11703
|
+
}
|
|
11704
|
+
const originalFile = directiveDeclaration.getSourceFile()[NgOriginalFile];
|
|
11705
|
+
if (originalFile !== void 0) {
|
|
11706
|
+
const hasPotentialCandidate = directives.find((m) => {
|
|
11707
|
+
var _a2;
|
|
11708
|
+
return m.ref.node.name.text === ((_a2 = directiveDeclaration.name) == null ? void 0 : _a2.text);
|
|
11709
|
+
});
|
|
11710
|
+
if (hasPotentialCandidate) {
|
|
11711
|
+
const classWithSameName = findMatchingDirective(originalFile, directiveDeclaration);
|
|
11712
|
+
if (classWithSameName !== null) {
|
|
11713
|
+
return (_a = directives.find((m) => m.ref.node === classWithSameName)) != null ? _a : null;
|
|
11714
|
+
}
|
|
11715
|
+
}
|
|
11716
|
+
}
|
|
11717
|
+
return null;
|
|
11542
11718
|
}
|
|
11543
11719
|
getDirectiveModule(declaration) {
|
|
11544
11720
|
const scope = this.componentScopeReader.getScopeForComponent(declaration);
|
|
@@ -11958,8 +12134,27 @@ function unwrapSignalInputWriteTAccessor(expr) {
|
|
|
11958
12134
|
typeExpr: expr
|
|
11959
12135
|
};
|
|
11960
12136
|
}
|
|
12137
|
+
function findMatchingDirective(originalSourceFile, directiveDeclarationInTypeCheckSourceFile) {
|
|
12138
|
+
var _a, _b, _c;
|
|
12139
|
+
const className = (_b = (_a = directiveDeclarationInTypeCheckSourceFile.name) == null ? void 0 : _a.text) != null ? _b : "";
|
|
12140
|
+
const ogClasses = collectClassesWithName(originalSourceFile, className);
|
|
12141
|
+
const typecheckClasses = collectClassesWithName(directiveDeclarationInTypeCheckSourceFile.getSourceFile(), className);
|
|
12142
|
+
return (_c = ogClasses[typecheckClasses.indexOf(directiveDeclarationInTypeCheckSourceFile)]) != null ? _c : null;
|
|
12143
|
+
}
|
|
12144
|
+
function collectClassesWithName(sourceFile, className) {
|
|
12145
|
+
const classes = [];
|
|
12146
|
+
function visit2(node) {
|
|
12147
|
+
var _a;
|
|
12148
|
+
if (ts42.isClassDeclaration(node) && ((_a = node.name) == null ? void 0 : _a.text) === className) {
|
|
12149
|
+
classes.push(node);
|
|
12150
|
+
}
|
|
12151
|
+
ts42.forEachChild(node, visit2);
|
|
12152
|
+
}
|
|
12153
|
+
sourceFile.forEachChild(visit2);
|
|
12154
|
+
return classes;
|
|
12155
|
+
}
|
|
11961
12156
|
|
|
11962
|
-
// bazel-out/
|
|
12157
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
11963
12158
|
var REGISTRY2 = new DomElementSchemaRegistry2();
|
|
11964
12159
|
var TemplateTypeCheckerImpl = class {
|
|
11965
12160
|
originalProgram;
|
|
@@ -12686,7 +12881,7 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
|
12686
12881
|
}
|
|
12687
12882
|
};
|
|
12688
12883
|
|
|
12689
|
-
// bazel-out/
|
|
12884
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
12690
12885
|
var FIELD_DECORATORS = [
|
|
12691
12886
|
"Input",
|
|
12692
12887
|
"Output",
|
|
@@ -12945,11 +13140,11 @@ var DirectiveDecoratorHandler = class {
|
|
|
12945
13140
|
}
|
|
12946
13141
|
};
|
|
12947
13142
|
|
|
12948
|
-
// bazel-out/
|
|
13143
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
12949
13144
|
import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr7, FactoryTarget as FactoryTarget2, FunctionExpr, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers as R3Identifiers5, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
|
|
12950
13145
|
import ts45 from "typescript";
|
|
12951
13146
|
|
|
12952
|
-
// bazel-out/
|
|
13147
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
|
|
12953
13148
|
import ts44 from "typescript";
|
|
12954
13149
|
function createModuleWithProvidersResolver(reflector, isCore) {
|
|
12955
13150
|
function _reflectModuleFromTypeParam(type, node) {
|
|
@@ -13021,7 +13216,7 @@ function isResolvedModuleWithProviders(sv) {
|
|
|
13021
13216
|
return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
|
|
13022
13217
|
}
|
|
13023
13218
|
|
|
13024
|
-
// bazel-out/
|
|
13219
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
13025
13220
|
var NgModuleSymbol = class extends SemanticSymbol {
|
|
13026
13221
|
hasProviders;
|
|
13027
13222
|
remotelyScopedComponents = [];
|
|
@@ -13662,7 +13857,7 @@ function isSyntheticReference(ref) {
|
|
|
13662
13857
|
return ref.synthetic;
|
|
13663
13858
|
}
|
|
13664
13859
|
|
|
13665
|
-
// bazel-out/
|
|
13860
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
|
|
13666
13861
|
function makeCyclicImportInfo(ref, type, cycle) {
|
|
13667
13862
|
const name = ref.debugName || "(unknown)";
|
|
13668
13863
|
const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
|
|
@@ -13685,7 +13880,7 @@ function checkCustomElementSelectorForErrors(selector) {
|
|
|
13685
13880
|
return null;
|
|
13686
13881
|
}
|
|
13687
13882
|
|
|
13688
|
-
// bazel-out/
|
|
13883
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
|
|
13689
13884
|
import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile3, parseTemplate } from "@angular/compiler";
|
|
13690
13885
|
import ts46 from "typescript";
|
|
13691
13886
|
function getTemplateDeclarationNodeForError(declaration) {
|
|
@@ -13803,7 +13998,8 @@ function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedSt
|
|
|
13803
13998
|
alwaysAttemptHtmlToR3AstConversion: options.usePoisonedData,
|
|
13804
13999
|
escapedString,
|
|
13805
14000
|
enableBlockSyntax: options.enableBlockSyntax,
|
|
13806
|
-
enableLetSyntax: options.enableLetSyntax
|
|
14001
|
+
enableLetSyntax: options.enableLetSyntax,
|
|
14002
|
+
enableSelectorless: options.enableSelectorless
|
|
13807
14003
|
};
|
|
13808
14004
|
const parsedTemplate = parseTemplate(sourceStr, sourceMapUrl != null ? sourceMapUrl : "", {
|
|
13809
14005
|
...commonParseOptions,
|
|
@@ -14059,7 +14255,7 @@ function _extractTemplateStyleUrls(template) {
|
|
|
14059
14255
|
}));
|
|
14060
14256
|
}
|
|
14061
14257
|
|
|
14062
|
-
// bazel-out/
|
|
14258
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
|
|
14063
14259
|
var ComponentSymbol = class extends DirectiveSymbol {
|
|
14064
14260
|
usedDirectives = [];
|
|
14065
14261
|
usedPipes = [];
|
|
@@ -14091,7 +14287,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
|
|
|
14091
14287
|
}
|
|
14092
14288
|
};
|
|
14093
14289
|
|
|
14094
|
-
// bazel-out/
|
|
14290
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
|
|
14095
14291
|
import ts47 from "typescript";
|
|
14096
14292
|
function collectAnimationNames(value, animationTriggerNames) {
|
|
14097
14293
|
if (value instanceof Map) {
|
|
@@ -14182,10 +14378,10 @@ function isLikelyModuleWithProviders(value) {
|
|
|
14182
14378
|
return false;
|
|
14183
14379
|
}
|
|
14184
14380
|
|
|
14185
|
-
// bazel-out/
|
|
14381
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
14186
14382
|
import { outputAst as o3 } from "@angular/compiler";
|
|
14187
14383
|
|
|
14188
|
-
// bazel-out/
|
|
14384
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/extract_dependencies.mjs
|
|
14189
14385
|
import { outputAst as o2 } from "@angular/compiler";
|
|
14190
14386
|
import ts48 from "typescript";
|
|
14191
14387
|
function extractHmrDependencies(node, definition, factory, deferBlockMetadata, classMetadata, debugInfo, reflection, evaluator) {
|
|
@@ -14397,7 +14593,7 @@ function isConstEnumReference(node, reflection) {
|
|
|
14397
14593
|
return declaration !== null && ts48.isEnumDeclaration(declaration.node) && !!((_a = declaration.node.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts48.SyntaxKind.ConstKeyword));
|
|
14398
14594
|
}
|
|
14399
14595
|
|
|
14400
|
-
// bazel-out/
|
|
14596
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
14401
14597
|
import ts49 from "typescript";
|
|
14402
14598
|
function extractHmrMetatadata(clazz, reflection, evaluator, compilerHost, rootDirs, definition, factory, deferBlockMetadata, classMetadata, debugInfo) {
|
|
14403
14599
|
if (!reflection.isClass(clazz)) {
|
|
@@ -14419,7 +14615,7 @@ function extractHmrMetatadata(clazz, reflection, evaluator, compilerHost, rootDi
|
|
|
14419
14615
|
return meta;
|
|
14420
14616
|
}
|
|
14421
14617
|
|
|
14422
|
-
// bazel-out/
|
|
14618
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/update_declaration.mjs
|
|
14423
14619
|
import { compileHmrUpdateCallback } from "@angular/compiler";
|
|
14424
14620
|
import ts50 from "typescript";
|
|
14425
14621
|
function getHmrUpdateDeclaration(compilationResults, constantStatements, meta, declaration) {
|
|
@@ -14456,7 +14652,7 @@ var HmrModuleImportRewriter = class {
|
|
|
14456
14652
|
}
|
|
14457
14653
|
};
|
|
14458
14654
|
|
|
14459
|
-
// bazel-out/
|
|
14655
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
14460
14656
|
var EMPTY_ARRAY2 = [];
|
|
14461
14657
|
var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
|
|
14462
14658
|
var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
|
|
@@ -14505,7 +14701,8 @@ var ComponentDecoratorHandler = class {
|
|
|
14505
14701
|
enableHmr;
|
|
14506
14702
|
implicitStandaloneValue;
|
|
14507
14703
|
typeCheckHostBindings;
|
|
14508
|
-
|
|
14704
|
+
enableSelectorless;
|
|
14705
|
+
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, typeCheckHostBindings, enableSelectorless) {
|
|
14509
14706
|
this.reflector = reflector;
|
|
14510
14707
|
this.evaluator = evaluator;
|
|
14511
14708
|
this.metaRegistry = metaRegistry;
|
|
@@ -14550,12 +14747,14 @@ var ComponentDecoratorHandler = class {
|
|
|
14550
14747
|
this.enableHmr = enableHmr;
|
|
14551
14748
|
this.implicitStandaloneValue = implicitStandaloneValue;
|
|
14552
14749
|
this.typeCheckHostBindings = typeCheckHostBindings;
|
|
14750
|
+
this.enableSelectorless = enableSelectorless;
|
|
14553
14751
|
this.extractTemplateOptions = {
|
|
14554
14752
|
enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
|
|
14555
14753
|
i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
|
|
14556
14754
|
usePoisonedData: this.usePoisonedData,
|
|
14557
14755
|
enableBlockSyntax: this.enableBlockSyntax,
|
|
14558
14756
|
enableLetSyntax: this.enableLetSyntax,
|
|
14757
|
+
enableSelectorless: this.enableSelectorless,
|
|
14559
14758
|
preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
|
|
14560
14759
|
};
|
|
14561
14760
|
this.canDeferDeps = !enableHmr;
|
|
@@ -14767,6 +14966,7 @@ var ComponentDecoratorHandler = class {
|
|
|
14767
14966
|
usePoisonedData: this.usePoisonedData,
|
|
14768
14967
|
enableBlockSyntax: this.enableBlockSyntax,
|
|
14769
14968
|
enableLetSyntax: this.enableLetSyntax,
|
|
14969
|
+
enableSelectorless: this.enableSelectorless,
|
|
14770
14970
|
preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
|
|
14771
14971
|
}, this.compilationMode);
|
|
14772
14972
|
if (this.compilationMode === CompilationMode.LOCAL && template.errors && template.errors.length > 0) {
|
|
@@ -15045,7 +15245,7 @@ var ComponentDecoratorHandler = class {
|
|
|
15045
15245
|
return templateSemanticsChecker.getDiagnosticsForComponent(component);
|
|
15046
15246
|
}
|
|
15047
15247
|
resolve(node, analysis, symbol) {
|
|
15048
|
-
var _a
|
|
15248
|
+
var _a;
|
|
15049
15249
|
const metadata = analysis.meta;
|
|
15050
15250
|
const diagnostics = [];
|
|
15051
15251
|
const context = getSourceFile(node);
|
|
@@ -15087,209 +15287,25 @@ var ComponentDecoratorHandler = class {
|
|
|
15087
15287
|
return {};
|
|
15088
15288
|
}
|
|
15089
15289
|
const scope = this.scopeReader.getScopeForComponent(node);
|
|
15090
|
-
if (scope
|
|
15091
|
-
|
|
15092
|
-
|
|
15093
|
-
const
|
|
15094
|
-
|
|
15095
|
-
(_b = this.localCompilationExtraImportsTracker) == null ? void 0 : _b.markFileForExtraImportGeneration(context);
|
|
15096
|
-
}
|
|
15097
|
-
if (metadata.isStandalone && analysis.rawDeferredImports !== null && explicitlyDeferredDependencies.length > 0) {
|
|
15098
|
-
const diagnostic = validateNoImportOverlap(dependencies, explicitlyDeferredDependencies, analysis.rawDeferredImports);
|
|
15099
|
-
if (diagnostic !== null) {
|
|
15100
|
-
diagnostics.push(diagnostic);
|
|
15101
|
-
}
|
|
15102
|
-
}
|
|
15103
|
-
const binder = createTargetBinder(dependencies);
|
|
15104
|
-
let allDependencies = dependencies;
|
|
15105
|
-
let deferBlockBinder = binder;
|
|
15106
|
-
if (explicitlyDeferredDependencies.length > 0) {
|
|
15107
|
-
allDependencies = [...explicitlyDeferredDependencies, ...dependencies];
|
|
15108
|
-
deferBlockBinder = createTargetBinder(allDependencies);
|
|
15109
|
-
}
|
|
15110
|
-
const pipes = extractPipes(allDependencies);
|
|
15111
|
-
const bound = binder.bind({ template: metadata.template.nodes });
|
|
15112
|
-
const deferBlocks = /* @__PURE__ */ new Map();
|
|
15113
|
-
for (const deferBlock of bound.getDeferBlocks()) {
|
|
15114
|
-
deferBlocks.set(deferBlock, deferBlockBinder.bind({ template: deferBlock.children }));
|
|
15115
|
-
}
|
|
15116
|
-
const eagerlyUsed = /* @__PURE__ */ new Set();
|
|
15117
|
-
if (this.enableHmr) {
|
|
15118
|
-
for (const dep of dependencies) {
|
|
15119
|
-
if (dep.ref.node !== node) {
|
|
15120
|
-
eagerlyUsed.add(dep.ref.node);
|
|
15121
|
-
} else {
|
|
15122
|
-
const used = bound.getEagerlyUsedDirectives();
|
|
15123
|
-
if (used.some((current) => current.ref.node === node)) {
|
|
15124
|
-
eagerlyUsed.add(node);
|
|
15125
|
-
}
|
|
15126
|
-
}
|
|
15127
|
-
}
|
|
15128
|
-
} else {
|
|
15129
|
-
for (const dir of bound.getEagerlyUsedDirectives()) {
|
|
15130
|
-
eagerlyUsed.add(dir.ref.node);
|
|
15131
|
-
}
|
|
15132
|
-
for (const name of bound.getEagerlyUsedPipes()) {
|
|
15133
|
-
if (!pipes.has(name)) {
|
|
15134
|
-
continue;
|
|
15135
|
-
}
|
|
15136
|
-
eagerlyUsed.add(pipes.get(name).ref.node);
|
|
15137
|
-
}
|
|
15138
|
-
}
|
|
15139
|
-
const wholeTemplateUsed = new Set(eagerlyUsed);
|
|
15140
|
-
for (const bound2 of deferBlocks.values()) {
|
|
15141
|
-
for (const dir of bound2.getUsedDirectives()) {
|
|
15142
|
-
wholeTemplateUsed.add(dir.ref.node);
|
|
15143
|
-
}
|
|
15144
|
-
for (const name of bound2.getUsedPipes()) {
|
|
15145
|
-
if (!pipes.has(name)) {
|
|
15146
|
-
continue;
|
|
15147
|
-
}
|
|
15148
|
-
wholeTemplateUsed.add(pipes.get(name).ref.node);
|
|
15149
|
-
}
|
|
15150
|
-
}
|
|
15151
|
-
const declarations = /* @__PURE__ */ new Map();
|
|
15152
|
-
for (const dep of allDependencies) {
|
|
15153
|
-
if (declarations.has(dep.ref.node)) {
|
|
15154
|
-
continue;
|
|
15155
|
-
}
|
|
15156
|
-
switch (dep.kind) {
|
|
15157
|
-
case MetaKind.Directive:
|
|
15158
|
-
if (!wholeTemplateUsed.has(dep.ref.node) || dep.matchSource !== MatchSource.Selector) {
|
|
15159
|
-
continue;
|
|
15160
|
-
}
|
|
15161
|
-
const dirType = this.refEmitter.emit(dep.ref, context);
|
|
15162
|
-
assertSuccessfulReferenceEmit(dirType, node.name, dep.isComponent ? "component" : "directive");
|
|
15163
|
-
declarations.set(dep.ref.node, {
|
|
15164
|
-
kind: R3TemplateDependencyKind.Directive,
|
|
15165
|
-
ref: dep.ref,
|
|
15166
|
-
type: dirType.expression,
|
|
15167
|
-
importedFile: dirType.importedFile,
|
|
15168
|
-
selector: dep.selector,
|
|
15169
|
-
inputs: dep.inputs.propertyNames,
|
|
15170
|
-
outputs: dep.outputs.propertyNames,
|
|
15171
|
-
exportAs: dep.exportAs,
|
|
15172
|
-
isComponent: dep.isComponent
|
|
15173
|
-
});
|
|
15174
|
-
break;
|
|
15175
|
-
case MetaKind.Pipe:
|
|
15176
|
-
if (!wholeTemplateUsed.has(dep.ref.node)) {
|
|
15177
|
-
continue;
|
|
15178
|
-
}
|
|
15179
|
-
const pipeType = this.refEmitter.emit(dep.ref, context);
|
|
15180
|
-
assertSuccessfulReferenceEmit(pipeType, node.name, "pipe");
|
|
15181
|
-
declarations.set(dep.ref.node, {
|
|
15182
|
-
kind: R3TemplateDependencyKind.Pipe,
|
|
15183
|
-
type: pipeType.expression,
|
|
15184
|
-
name: dep.name,
|
|
15185
|
-
ref: dep.ref,
|
|
15186
|
-
importedFile: pipeType.importedFile
|
|
15187
|
-
});
|
|
15188
|
-
break;
|
|
15189
|
-
case MetaKind.NgModule:
|
|
15190
|
-
const ngModuleType = this.refEmitter.emit(dep.ref, context);
|
|
15191
|
-
assertSuccessfulReferenceEmit(ngModuleType, node.name, "NgModule");
|
|
15192
|
-
declarations.set(dep.ref.node, {
|
|
15193
|
-
kind: R3TemplateDependencyKind.NgModule,
|
|
15194
|
-
type: ngModuleType.expression,
|
|
15195
|
-
importedFile: ngModuleType.importedFile
|
|
15196
|
-
});
|
|
15197
|
-
break;
|
|
15198
|
-
}
|
|
15199
|
-
}
|
|
15200
|
-
const getSemanticReference = (decl) => this.semanticDepGraphUpdater.getSemanticReference(decl.ref.node, decl.type);
|
|
15290
|
+
if (scope === null) {
|
|
15291
|
+
data.deferPerBlockDependencies = this.locateDeferBlocksWithoutScope(metadata.template);
|
|
15292
|
+
} else {
|
|
15293
|
+
const { eagerlyUsed, deferBlocks, allDependencies, wholeTemplateUsed } = this.resolveComponentDependencies(node, context, analysis, scope, metadata, diagnostics);
|
|
15294
|
+
const declarations = this.componentDependenciesToDeclarations(node, context, allDependencies, wholeTemplateUsed);
|
|
15201
15295
|
if (this.semanticDepGraphUpdater !== null) {
|
|
15296
|
+
const getSemanticReference = (decl) => this.semanticDepGraphUpdater.getSemanticReference(decl.ref.node, decl.type);
|
|
15202
15297
|
symbol.usedDirectives = Array.from(declarations.values()).filter(isUsedDirective).map(getSemanticReference);
|
|
15203
15298
|
symbol.usedPipes = Array.from(declarations.values()).filter(isUsedPipe).map(getSemanticReference);
|
|
15204
15299
|
}
|
|
15205
|
-
const eagerDeclarations = Array.from(declarations.values()).filter((decl) => decl.kind === R3TemplateDependencyKind.NgModule || eagerlyUsed.has(decl.ref.node));
|
|
15206
15300
|
if (this.compilationMode !== CompilationMode.LOCAL) {
|
|
15207
15301
|
this.resolveDeferBlocks(node, deferBlocks, declarations, data, analysis, eagerlyUsed);
|
|
15208
15302
|
}
|
|
15209
|
-
|
|
15210
|
-
const cyclesFromPipes = /* @__PURE__ */ new Map();
|
|
15211
|
-
if (!metadata.isStandalone) {
|
|
15212
|
-
for (const usedDep of eagerDeclarations) {
|
|
15213
|
-
const cycle = this._checkForCyclicImport(usedDep.importedFile, usedDep.type, context);
|
|
15214
|
-
if (cycle !== null) {
|
|
15215
|
-
switch (usedDep.kind) {
|
|
15216
|
-
case R3TemplateDependencyKind.Directive:
|
|
15217
|
-
cyclesFromDirectives.set(usedDep, cycle);
|
|
15218
|
-
break;
|
|
15219
|
-
case R3TemplateDependencyKind.Pipe:
|
|
15220
|
-
cyclesFromPipes.set(usedDep, cycle);
|
|
15221
|
-
break;
|
|
15222
|
-
}
|
|
15223
|
-
}
|
|
15224
|
-
}
|
|
15225
|
-
}
|
|
15226
|
-
const standaloneImportMayBeForwardDeclared = analysis.resolvedImports !== null && analysis.resolvedImports.some((ref) => ref.synthetic);
|
|
15227
|
-
const cycleDetected = cyclesFromDirectives.size !== 0 || cyclesFromPipes.size !== 0;
|
|
15228
|
-
if (!cycleDetected) {
|
|
15229
|
-
for (const { type, importedFile } of eagerDeclarations) {
|
|
15230
|
-
this.maybeRecordSyntheticImport(importedFile, type, context);
|
|
15231
|
-
}
|
|
15232
|
-
const declarationIsForwardDeclared = eagerDeclarations.some((decl) => isExpressionForwardReference(decl.type, node.name, context));
|
|
15233
|
-
if (this.compilationMode !== CompilationMode.LOCAL && (declarationIsForwardDeclared || standaloneImportMayBeForwardDeclared)) {
|
|
15234
|
-
data.declarationListEmitMode = 1;
|
|
15235
|
-
}
|
|
15236
|
-
data.declarations = eagerDeclarations;
|
|
15237
|
-
if (this.compilationMode === CompilationMode.LOCAL && this.localCompilationExtraImportsTracker !== null) {
|
|
15238
|
-
for (const { type } of eagerDeclarations) {
|
|
15239
|
-
if (type instanceof ExternalExpr8 && type.value.moduleName) {
|
|
15240
|
-
this.localCompilationExtraImportsTracker.addImportForFile(context, type.value.moduleName);
|
|
15241
|
-
}
|
|
15242
|
-
}
|
|
15243
|
-
}
|
|
15244
|
-
} else {
|
|
15245
|
-
if (this.cycleHandlingStrategy === 0) {
|
|
15246
|
-
this.scopeRegistry.setComponentRemoteScope(node, eagerDeclarations.filter(isUsedDirective).map((dir) => dir.ref), eagerDeclarations.filter(isUsedPipe).map((pipe) => pipe.ref));
|
|
15247
|
-
symbol.isRemotelyScoped = true;
|
|
15248
|
-
if (this.semanticDepGraphUpdater !== null && scope.kind === ComponentScopeKind.NgModule && scope.ngModule !== null) {
|
|
15249
|
-
const moduleSymbol = this.semanticDepGraphUpdater.getSymbol(scope.ngModule);
|
|
15250
|
-
if (!(moduleSymbol instanceof NgModuleSymbol)) {
|
|
15251
|
-
throw new Error(`AssertionError: Expected ${scope.ngModule.name} to be an NgModuleSymbol.`);
|
|
15252
|
-
}
|
|
15253
|
-
moduleSymbol.addRemotelyScopedComponent(symbol, symbol.usedDirectives, symbol.usedPipes);
|
|
15254
|
-
}
|
|
15255
|
-
} else {
|
|
15256
|
-
const relatedMessages = [];
|
|
15257
|
-
for (const [dir, cycle] of cyclesFromDirectives) {
|
|
15258
|
-
relatedMessages.push(makeCyclicImportInfo(dir.ref, dir.isComponent ? "component" : "directive", cycle));
|
|
15259
|
-
}
|
|
15260
|
-
for (const [pipe, cycle] of cyclesFromPipes) {
|
|
15261
|
-
relatedMessages.push(makeCyclicImportInfo(pipe.ref, "pipe", cycle));
|
|
15262
|
-
}
|
|
15263
|
-
throw new FatalDiagnosticError(ErrorCode.IMPORT_CYCLE_DETECTED, node, "One or more import cycles would need to be created to compile this component, which is not supported by the current compiler configuration.", relatedMessages);
|
|
15264
|
-
}
|
|
15265
|
-
}
|
|
15266
|
-
} else {
|
|
15267
|
-
data.deferPerBlockDependencies = this.locateDeferBlocksWithoutScope(metadata.template);
|
|
15303
|
+
this.handleDependencyCycles(node, context, scope, data, analysis, metadata, declarations, eagerlyUsed, symbol);
|
|
15268
15304
|
}
|
|
15269
15305
|
if (this.compilationMode !== CompilationMode.LOCAL) {
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
diagnostics.push(...
|
|
15273
|
-
}
|
|
15274
|
-
if (analysis.resolvedDeferredImports !== null && analysis.rawDeferredImports !== null) {
|
|
15275
|
-
const importDiagnostics = validateStandaloneImports(analysis.resolvedDeferredImports, analysis.rawDeferredImports, this.metaReader, this.scopeReader, true);
|
|
15276
|
-
diagnostics.push(...importDiagnostics);
|
|
15277
|
-
}
|
|
15278
|
-
if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof o4.WrappedNodeExpr) {
|
|
15279
|
-
const providerDiagnostics = getProviderDiagnostics(analysis.providersRequiringFactory, analysis.meta.providers.node, this.injectableRegistry);
|
|
15280
|
-
diagnostics.push(...providerDiagnostics);
|
|
15281
|
-
}
|
|
15282
|
-
if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof o4.WrappedNodeExpr) {
|
|
15283
|
-
const viewProviderDiagnostics = getProviderDiagnostics(analysis.viewProvidersRequiringFactory, analysis.meta.viewProviders.node, this.injectableRegistry);
|
|
15284
|
-
diagnostics.push(...viewProviderDiagnostics);
|
|
15285
|
-
}
|
|
15286
|
-
const directiveDiagnostics = getDirectiveDiagnostics(node, this.injectableRegistry, this.evaluator, this.reflector, this.scopeRegistry, this.strictCtorDeps, "Component");
|
|
15287
|
-
if (directiveDiagnostics !== null) {
|
|
15288
|
-
diagnostics.push(...directiveDiagnostics);
|
|
15289
|
-
}
|
|
15290
|
-
const hostDirectivesDiagnostics = analysis.hostDirectives && analysis.rawHostDirectives ? validateHostDirectives(analysis.rawHostDirectives, analysis.hostDirectives, this.metaReader) : null;
|
|
15291
|
-
if (hostDirectivesDiagnostics !== null) {
|
|
15292
|
-
diagnostics.push(...hostDirectivesDiagnostics);
|
|
15306
|
+
const nonLocalDiagnostics = this.getNonLocalDiagnostics(node, analysis);
|
|
15307
|
+
if (nonLocalDiagnostics !== null) {
|
|
15308
|
+
diagnostics.push(...nonLocalDiagnostics);
|
|
15293
15309
|
}
|
|
15294
15310
|
}
|
|
15295
15311
|
if (diagnostics.length > 0) {
|
|
@@ -15418,9 +15434,221 @@ var ComponentDecoratorHandler = class {
|
|
|
15418
15434
|
const res = compileResults(fac, def, classMetadata, "\u0275cmp", null, null, debugInfo, null);
|
|
15419
15435
|
return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node);
|
|
15420
15436
|
}
|
|
15437
|
+
resolveComponentDependencies(node, context, analysis, scope, metadata, diagnostics) {
|
|
15438
|
+
var _a;
|
|
15439
|
+
const isModuleScope = scope.kind === ComponentScopeKind.NgModule;
|
|
15440
|
+
const dependencies = isModuleScope ? scope.compilation.dependencies : scope.dependencies;
|
|
15441
|
+
const explicitlyDeferredDependencies = getExplicitlyDeferredDeps(scope);
|
|
15442
|
+
if (isModuleScope && context.fileName !== getSourceFile(scope.ngModule).fileName) {
|
|
15443
|
+
(_a = this.localCompilationExtraImportsTracker) == null ? void 0 : _a.markFileForExtraImportGeneration(context);
|
|
15444
|
+
}
|
|
15445
|
+
if (metadata.isStandalone && analysis.rawDeferredImports !== null && explicitlyDeferredDependencies.length > 0) {
|
|
15446
|
+
const diagnostic = validateNoImportOverlap(dependencies, explicitlyDeferredDependencies, analysis.rawDeferredImports);
|
|
15447
|
+
if (diagnostic !== null) {
|
|
15448
|
+
diagnostics.push(diagnostic);
|
|
15449
|
+
}
|
|
15450
|
+
}
|
|
15451
|
+
const binder = createTargetBinder(dependencies);
|
|
15452
|
+
let allDependencies = dependencies;
|
|
15453
|
+
let deferBlockBinder = binder;
|
|
15454
|
+
if (explicitlyDeferredDependencies.length > 0) {
|
|
15455
|
+
allDependencies = [...explicitlyDeferredDependencies, ...dependencies];
|
|
15456
|
+
deferBlockBinder = createTargetBinder(allDependencies);
|
|
15457
|
+
}
|
|
15458
|
+
const pipes = extractPipes(allDependencies);
|
|
15459
|
+
const bound = binder.bind({ template: metadata.template.nodes });
|
|
15460
|
+
const deferBlocks = /* @__PURE__ */ new Map();
|
|
15461
|
+
for (const deferBlock of bound.getDeferBlocks()) {
|
|
15462
|
+
deferBlocks.set(deferBlock, deferBlockBinder.bind({ template: deferBlock.children }));
|
|
15463
|
+
}
|
|
15464
|
+
const eagerlyUsed = /* @__PURE__ */ new Set();
|
|
15465
|
+
if (this.enableHmr) {
|
|
15466
|
+
for (const dep of dependencies) {
|
|
15467
|
+
if (dep.ref.node !== node) {
|
|
15468
|
+
eagerlyUsed.add(dep.ref.node);
|
|
15469
|
+
} else {
|
|
15470
|
+
const used = bound.getEagerlyUsedDirectives();
|
|
15471
|
+
if (used.some((current) => current.ref.node === node)) {
|
|
15472
|
+
eagerlyUsed.add(node);
|
|
15473
|
+
}
|
|
15474
|
+
}
|
|
15475
|
+
}
|
|
15476
|
+
} else {
|
|
15477
|
+
for (const dir of bound.getEagerlyUsedDirectives()) {
|
|
15478
|
+
eagerlyUsed.add(dir.ref.node);
|
|
15479
|
+
}
|
|
15480
|
+
for (const name of bound.getEagerlyUsedPipes()) {
|
|
15481
|
+
if (pipes.has(name)) {
|
|
15482
|
+
eagerlyUsed.add(pipes.get(name).ref.node);
|
|
15483
|
+
}
|
|
15484
|
+
}
|
|
15485
|
+
}
|
|
15486
|
+
const wholeTemplateUsed = new Set(eagerlyUsed);
|
|
15487
|
+
for (const bound2 of deferBlocks.values()) {
|
|
15488
|
+
for (const dir of bound2.getUsedDirectives()) {
|
|
15489
|
+
wholeTemplateUsed.add(dir.ref.node);
|
|
15490
|
+
}
|
|
15491
|
+
for (const name of bound2.getUsedPipes()) {
|
|
15492
|
+
if (!pipes.has(name)) {
|
|
15493
|
+
continue;
|
|
15494
|
+
}
|
|
15495
|
+
wholeTemplateUsed.add(pipes.get(name).ref.node);
|
|
15496
|
+
}
|
|
15497
|
+
}
|
|
15498
|
+
return { allDependencies, eagerlyUsed, wholeTemplateUsed, deferBlocks };
|
|
15499
|
+
}
|
|
15500
|
+
componentDependenciesToDeclarations(node, context, allDependencies, wholeTemplateUsed) {
|
|
15501
|
+
const declarations = /* @__PURE__ */ new Map();
|
|
15502
|
+
for (const dep of allDependencies) {
|
|
15503
|
+
if (declarations.has(dep.ref.node)) {
|
|
15504
|
+
continue;
|
|
15505
|
+
}
|
|
15506
|
+
switch (dep.kind) {
|
|
15507
|
+
case MetaKind.Directive:
|
|
15508
|
+
if (!wholeTemplateUsed.has(dep.ref.node) || dep.matchSource !== MatchSource.Selector) {
|
|
15509
|
+
continue;
|
|
15510
|
+
}
|
|
15511
|
+
const dirType = this.refEmitter.emit(dep.ref, context);
|
|
15512
|
+
assertSuccessfulReferenceEmit(dirType, node.name, dep.isComponent ? "component" : "directive");
|
|
15513
|
+
declarations.set(dep.ref.node, {
|
|
15514
|
+
kind: R3TemplateDependencyKind.Directive,
|
|
15515
|
+
ref: dep.ref,
|
|
15516
|
+
type: dirType.expression,
|
|
15517
|
+
importedFile: dirType.importedFile,
|
|
15518
|
+
selector: dep.selector,
|
|
15519
|
+
inputs: dep.inputs.propertyNames,
|
|
15520
|
+
outputs: dep.outputs.propertyNames,
|
|
15521
|
+
exportAs: dep.exportAs,
|
|
15522
|
+
isComponent: dep.isComponent
|
|
15523
|
+
});
|
|
15524
|
+
break;
|
|
15525
|
+
case MetaKind.Pipe:
|
|
15526
|
+
if (!wholeTemplateUsed.has(dep.ref.node)) {
|
|
15527
|
+
continue;
|
|
15528
|
+
}
|
|
15529
|
+
const pipeType = this.refEmitter.emit(dep.ref, context);
|
|
15530
|
+
assertSuccessfulReferenceEmit(pipeType, node.name, "pipe");
|
|
15531
|
+
declarations.set(dep.ref.node, {
|
|
15532
|
+
kind: R3TemplateDependencyKind.Pipe,
|
|
15533
|
+
type: pipeType.expression,
|
|
15534
|
+
name: dep.name,
|
|
15535
|
+
ref: dep.ref,
|
|
15536
|
+
importedFile: pipeType.importedFile
|
|
15537
|
+
});
|
|
15538
|
+
break;
|
|
15539
|
+
case MetaKind.NgModule:
|
|
15540
|
+
const ngModuleType = this.refEmitter.emit(dep.ref, context);
|
|
15541
|
+
assertSuccessfulReferenceEmit(ngModuleType, node.name, "NgModule");
|
|
15542
|
+
declarations.set(dep.ref.node, {
|
|
15543
|
+
kind: R3TemplateDependencyKind.NgModule,
|
|
15544
|
+
type: ngModuleType.expression,
|
|
15545
|
+
importedFile: ngModuleType.importedFile
|
|
15546
|
+
});
|
|
15547
|
+
break;
|
|
15548
|
+
}
|
|
15549
|
+
}
|
|
15550
|
+
return declarations;
|
|
15551
|
+
}
|
|
15552
|
+
handleDependencyCycles(node, context, scope, data, analysis, metadata, declarations, eagerlyUsed, symbol) {
|
|
15553
|
+
const eagerDeclarations = Array.from(declarations.values()).filter((decl) => {
|
|
15554
|
+
return decl.kind === R3TemplateDependencyKind.NgModule || eagerlyUsed.has(decl.ref.node);
|
|
15555
|
+
});
|
|
15556
|
+
const cyclesFromDirectives = /* @__PURE__ */ new Map();
|
|
15557
|
+
const cyclesFromPipes = /* @__PURE__ */ new Map();
|
|
15558
|
+
if (!metadata.isStandalone) {
|
|
15559
|
+
for (const usedDep of eagerDeclarations) {
|
|
15560
|
+
const cycle = this._checkForCyclicImport(usedDep.importedFile, usedDep.type, context);
|
|
15561
|
+
if (cycle !== null) {
|
|
15562
|
+
switch (usedDep.kind) {
|
|
15563
|
+
case R3TemplateDependencyKind.Directive:
|
|
15564
|
+
cyclesFromDirectives.set(usedDep, cycle);
|
|
15565
|
+
break;
|
|
15566
|
+
case R3TemplateDependencyKind.Pipe:
|
|
15567
|
+
cyclesFromPipes.set(usedDep, cycle);
|
|
15568
|
+
break;
|
|
15569
|
+
}
|
|
15570
|
+
}
|
|
15571
|
+
}
|
|
15572
|
+
}
|
|
15573
|
+
const standaloneImportMayBeForwardDeclared = analysis.resolvedImports !== null && analysis.resolvedImports.some((ref) => ref.synthetic);
|
|
15574
|
+
const cycleDetected = cyclesFromDirectives.size !== 0 || cyclesFromPipes.size !== 0;
|
|
15575
|
+
if (!cycleDetected) {
|
|
15576
|
+
for (const { type, importedFile } of eagerDeclarations) {
|
|
15577
|
+
this.maybeRecordSyntheticImport(importedFile, type, context);
|
|
15578
|
+
}
|
|
15579
|
+
const declarationIsForwardDeclared = eagerDeclarations.some((decl) => isExpressionForwardReference(decl.type, node.name, context));
|
|
15580
|
+
if (this.compilationMode !== CompilationMode.LOCAL && (declarationIsForwardDeclared || standaloneImportMayBeForwardDeclared)) {
|
|
15581
|
+
data.declarationListEmitMode = 1;
|
|
15582
|
+
}
|
|
15583
|
+
data.declarations = eagerDeclarations;
|
|
15584
|
+
if (this.compilationMode === CompilationMode.LOCAL && this.localCompilationExtraImportsTracker !== null) {
|
|
15585
|
+
for (const { type } of eagerDeclarations) {
|
|
15586
|
+
if (type instanceof ExternalExpr8 && type.value.moduleName) {
|
|
15587
|
+
this.localCompilationExtraImportsTracker.addImportForFile(context, type.value.moduleName);
|
|
15588
|
+
}
|
|
15589
|
+
}
|
|
15590
|
+
}
|
|
15591
|
+
} else if (this.cycleHandlingStrategy === 0) {
|
|
15592
|
+
this.scopeRegistry.setComponentRemoteScope(node, eagerDeclarations.filter(isUsedDirective).map((dir) => dir.ref), eagerDeclarations.filter(isUsedPipe).map((pipe) => pipe.ref));
|
|
15593
|
+
symbol.isRemotelyScoped = true;
|
|
15594
|
+
if (this.semanticDepGraphUpdater !== null && scope.kind === ComponentScopeKind.NgModule && scope.ngModule !== null) {
|
|
15595
|
+
const moduleSymbol = this.semanticDepGraphUpdater.getSymbol(scope.ngModule);
|
|
15596
|
+
if (!(moduleSymbol instanceof NgModuleSymbol)) {
|
|
15597
|
+
throw new Error(`AssertionError: Expected ${scope.ngModule.name} to be an NgModuleSymbol.`);
|
|
15598
|
+
}
|
|
15599
|
+
moduleSymbol.addRemotelyScopedComponent(symbol, symbol.usedDirectives, symbol.usedPipes);
|
|
15600
|
+
}
|
|
15601
|
+
} else {
|
|
15602
|
+
const relatedMessages = [];
|
|
15603
|
+
for (const [dir, cycle] of cyclesFromDirectives) {
|
|
15604
|
+
relatedMessages.push(makeCyclicImportInfo(dir.ref, dir.isComponent ? "component" : "directive", cycle));
|
|
15605
|
+
}
|
|
15606
|
+
for (const [pipe, cycle] of cyclesFromPipes) {
|
|
15607
|
+
relatedMessages.push(makeCyclicImportInfo(pipe.ref, "pipe", cycle));
|
|
15608
|
+
}
|
|
15609
|
+
throw new FatalDiagnosticError(ErrorCode.IMPORT_CYCLE_DETECTED, node, "One or more import cycles would need to be created to compile this component, which is not supported by the current compiler configuration.", relatedMessages);
|
|
15610
|
+
}
|
|
15611
|
+
}
|
|
15612
|
+
getNonLocalDiagnostics(node, analysis) {
|
|
15613
|
+
if (this.compilationMode === CompilationMode.LOCAL) {
|
|
15614
|
+
throw new Error("Method cannot be called in local compilation mode.");
|
|
15615
|
+
}
|
|
15616
|
+
let diagnostics = null;
|
|
15617
|
+
if (analysis.resolvedImports !== null && analysis.rawImports !== null) {
|
|
15618
|
+
const importDiagnostics = validateStandaloneImports(analysis.resolvedImports, analysis.rawImports, this.metaReader, this.scopeReader, false);
|
|
15619
|
+
diagnostics != null ? diagnostics : diagnostics = [];
|
|
15620
|
+
diagnostics.push(...importDiagnostics);
|
|
15621
|
+
}
|
|
15622
|
+
if (analysis.resolvedDeferredImports !== null && analysis.rawDeferredImports !== null) {
|
|
15623
|
+
const importDiagnostics = validateStandaloneImports(analysis.resolvedDeferredImports, analysis.rawDeferredImports, this.metaReader, this.scopeReader, true);
|
|
15624
|
+
diagnostics != null ? diagnostics : diagnostics = [];
|
|
15625
|
+
diagnostics.push(...importDiagnostics);
|
|
15626
|
+
}
|
|
15627
|
+
if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof o4.WrappedNodeExpr) {
|
|
15628
|
+
const providerDiagnostics = getProviderDiagnostics(analysis.providersRequiringFactory, analysis.meta.providers.node, this.injectableRegistry);
|
|
15629
|
+
diagnostics != null ? diagnostics : diagnostics = [];
|
|
15630
|
+
diagnostics.push(...providerDiagnostics);
|
|
15631
|
+
}
|
|
15632
|
+
if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof o4.WrappedNodeExpr) {
|
|
15633
|
+
const viewProviderDiagnostics = getProviderDiagnostics(analysis.viewProvidersRequiringFactory, analysis.meta.viewProviders.node, this.injectableRegistry);
|
|
15634
|
+
diagnostics != null ? diagnostics : diagnostics = [];
|
|
15635
|
+
diagnostics.push(...viewProviderDiagnostics);
|
|
15636
|
+
}
|
|
15637
|
+
const directiveDiagnostics = getDirectiveDiagnostics(node, this.injectableRegistry, this.evaluator, this.reflector, this.scopeRegistry, this.strictCtorDeps, "Component");
|
|
15638
|
+
if (directiveDiagnostics !== null) {
|
|
15639
|
+
diagnostics != null ? diagnostics : diagnostics = [];
|
|
15640
|
+
diagnostics.push(...directiveDiagnostics);
|
|
15641
|
+
}
|
|
15642
|
+
const hostDirectivesDiagnostics = analysis.hostDirectives && analysis.rawHostDirectives ? validateHostDirectives(analysis.rawHostDirectives, analysis.hostDirectives, this.metaReader) : null;
|
|
15643
|
+
if (hostDirectivesDiagnostics !== null) {
|
|
15644
|
+
diagnostics != null ? diagnostics : diagnostics = [];
|
|
15645
|
+
diagnostics.push(...hostDirectivesDiagnostics);
|
|
15646
|
+
}
|
|
15647
|
+
return diagnostics;
|
|
15648
|
+
}
|
|
15421
15649
|
locateDeferBlocksWithoutScope(template) {
|
|
15422
15650
|
const deferBlocks = /* @__PURE__ */ new Map();
|
|
15423
|
-
const directivelessBinder = new R3TargetBinder2(
|
|
15651
|
+
const directivelessBinder = new R3TargetBinder2(null);
|
|
15424
15652
|
const bound = directivelessBinder.bind({ template: template.nodes });
|
|
15425
15653
|
const deferredBlocks = bound.getDeferBlocks();
|
|
15426
15654
|
for (const block of deferredBlocks) {
|
|
@@ -15660,7 +15888,7 @@ function isDefaultImport(node) {
|
|
|
15660
15888
|
return node.importClause !== void 0 && node.importClause.namedBindings === void 0;
|
|
15661
15889
|
}
|
|
15662
15890
|
|
|
15663
|
-
// bazel-out/
|
|
15891
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
|
|
15664
15892
|
import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr10 } from "@angular/compiler";
|
|
15665
15893
|
import ts52 from "typescript";
|
|
15666
15894
|
var InjectableDecoratorHandler = class {
|
|
@@ -15901,7 +16129,7 @@ function getDep(dep, reflector) {
|
|
|
15901
16129
|
return meta;
|
|
15902
16130
|
}
|
|
15903
16131
|
|
|
15904
|
-
// bazel-out/
|
|
16132
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
|
|
15905
16133
|
import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
|
|
15906
16134
|
import ts53 from "typescript";
|
|
15907
16135
|
var PipeSymbol = class extends SemanticSymbol {
|
|
@@ -16150,4 +16378,4 @@ export {
|
|
|
16150
16378
|
* Use of this source code is governed by an MIT-style license that can be
|
|
16151
16379
|
* found in the LICENSE file at https://angular.dev/license
|
|
16152
16380
|
*/
|
|
16153
|
-
//# sourceMappingURL=chunk-
|
|
16381
|
+
//# sourceMappingURL=chunk-WNWOEBZS.js.map
|