@angular/compiler-cli 19.0.0-next.8 → 19.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-LG56S2LO.js → chunk-4W4CWRSP.js} +6 -6
- package/bundles/chunk-4W4CWRSP.js.map +6 -0
- package/bundles/{chunk-3Z25BX6N.js → chunk-5UDS2TPQ.js} +25 -18
- package/bundles/chunk-5UDS2TPQ.js.map +6 -0
- package/bundles/{chunk-RT2QTF73.js → chunk-GBKXY6BH.js} +4 -3
- package/bundles/{chunk-RT2QTF73.js.map → chunk-GBKXY6BH.js.map} +1 -1
- package/bundles/{chunk-XSNUHRLJ.js → chunk-I6R3GL3L.js} +12 -6
- package/bundles/{chunk-XSNUHRLJ.js.map → chunk-I6R3GL3L.js.map} +1 -1
- package/bundles/{chunk-XI2RTGAL.js → chunk-KPQ72R34.js} +9 -2
- package/bundles/{chunk-OY6IBSDB.js → chunk-NS33RCEE.js} +12 -12
- package/bundles/{chunk-2TSCCC7T.js → chunk-PXQLBKVP.js} +88 -51
- package/bundles/chunk-PXQLBKVP.js.map +6 -0
- package/bundles/{chunk-6JG6NFJ7.js → chunk-S2JI2WY5.js} +992 -375
- package/bundles/chunk-S2JI2WY5.js.map +6 -0
- package/bundles/{chunk-UJ2J6WV4.js → chunk-STORTTKY.js} +16 -14
- package/bundles/chunk-STORTTKY.js.map +6 -0
- package/bundles/{chunk-IXNIFZCK.js → chunk-TQQOHNLL.js} +300 -178
- package/bundles/chunk-TQQOHNLL.js.map +6 -0
- package/bundles/{chunk-IXRL26J5.js → chunk-TRCFFQ47.js} +149 -84
- package/bundles/chunk-TRCFFQ47.js.map +6 -0
- package/bundles/{chunk-KICABBHP.js → chunk-V2Z4WDVR.js} +3 -3
- package/bundles/index.js +18 -17
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +32 -32
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +1 -1
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +7 -7
- package/bundles/src/bin/ng_xi18n.js +11 -11
- package/bundles/src/bin/ngc.js +9 -9
- package/bundles_metadata.json +1 -1
- package/linker/babel/src/ast/babel_ast_factory.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +2 -2
- package/linker/src/file_linker/partial_linkers/util.d.ts +2 -1
- package/package.json +3 -3
- package/src/ngtsc/annotations/common/src/api.d.ts +14 -0
- package/src/ngtsc/annotations/common/src/debug_info.d.ts +2 -1
- package/src/ngtsc/annotations/common/src/util.d.ts +1 -1
- package/src/ngtsc/annotations/component/src/handler.d.ts +9 -3
- package/src/ngtsc/annotations/directive/src/handler.d.ts +2 -1
- package/src/ngtsc/annotations/directive/src/shared.d.ts +1 -1
- package/src/ngtsc/annotations/src/pipe.d.ts +2 -1
- package/src/ngtsc/core/api/src/interfaces.d.ts +14 -0
- package/src/ngtsc/core/src/compiler.d.ts +7 -0
- package/src/ngtsc/hmr/index.d.ts +9 -0
- package/src/ngtsc/hmr/src/extract_locals.d.ts +20 -0
- package/src/ngtsc/hmr/src/metadata.d.ts +23 -0
- package/src/ngtsc/hmr/src/update_declaration.d.ts +17 -0
- package/src/ngtsc/imports/src/core.d.ts +6 -0
- package/src/ngtsc/transform/src/api.d.ts +4 -0
- package/src/ngtsc/transform/src/compilation.d.ts +1 -0
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +2 -2
- package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +2 -2
- package/src/ngtsc/typecheck/api/checker.d.ts +1 -1
- package/src/ngtsc/typecheck/src/checker.d.ts +1 -1
- package/src/ngtsc/util/src/path.d.ts +9 -0
- package/bundles/chunk-2TSCCC7T.js.map +0 -6
- package/bundles/chunk-3Z25BX6N.js.map +0 -6
- package/bundles/chunk-6JG6NFJ7.js.map +0 -6
- package/bundles/chunk-IXNIFZCK.js.map +0 -6
- package/bundles/chunk-IXRL26J5.js.map +0 -6
- package/bundles/chunk-LG56S2LO.js.map +0 -6
- package/bundles/chunk-UJ2J6WV4.js.map +0 -6
- /package/bundles/{chunk-XI2RTGAL.js.map → chunk-KPQ72R34.js.map} +0 -0
- /package/bundles/{chunk-OY6IBSDB.js.map → chunk-NS33RCEE.js.map} +0 -0
- /package/bundles/{chunk-KICABBHP.js.map → chunk-V2Z4WDVR.js.map} +0 -0
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
entityNameToValue,
|
|
21
21
|
filterToMembersWithDecorator,
|
|
22
22
|
getDefaultImportDeclaration,
|
|
23
|
+
getProjectRelativePath,
|
|
23
24
|
getSourceFile,
|
|
24
25
|
getSourceFileOrNull,
|
|
25
26
|
getTokenAtPosition,
|
|
@@ -45,20 +46,23 @@ import {
|
|
|
45
46
|
translateStatement,
|
|
46
47
|
translateType,
|
|
47
48
|
typeNodeToValueExpr
|
|
48
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-TRCFFQ47.js";
|
|
49
50
|
import {
|
|
50
51
|
PerfCheckpoint,
|
|
51
52
|
PerfEvent,
|
|
52
53
|
PerfPhase
|
|
53
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-I6R3GL3L.js";
|
|
54
55
|
import {
|
|
55
56
|
absoluteFrom,
|
|
56
57
|
absoluteFromSourceFile,
|
|
57
58
|
getSourceFileOrError,
|
|
58
59
|
relative
|
|
59
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-STORTTKY.js";
|
|
61
|
+
import {
|
|
62
|
+
__publicField
|
|
63
|
+
} from "./chunk-KPQ72R34.js";
|
|
60
64
|
|
|
61
|
-
// bazel-out/
|
|
65
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
|
|
62
66
|
import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
|
|
63
67
|
import ts from "typescript";
|
|
64
68
|
var CORE_MODULE = "@angular/core";
|
|
@@ -263,7 +267,7 @@ function createSourceSpan(node) {
|
|
|
263
267
|
const parseSf = new ParseSourceFile(sf.getFullText(), sf.fileName);
|
|
264
268
|
return new ParseSourceSpan(new ParseLocation(parseSf, startOffset, startLine + 1, startCol + 1), new ParseLocation(parseSf, endOffset, endLine + 1, endCol + 1));
|
|
265
269
|
}
|
|
266
|
-
function compileResults(fac, def, metadataStmt, propName, additionalFields, deferrableImports, debugInfo = null) {
|
|
270
|
+
function compileResults(fac, def, metadataStmt, propName, additionalFields, deferrableImports, debugInfo = null, hmrInitializer = null) {
|
|
267
271
|
const statements = def.statements;
|
|
268
272
|
if (metadataStmt !== null) {
|
|
269
273
|
statements.push(metadataStmt);
|
|
@@ -271,6 +275,9 @@ function compileResults(fac, def, metadataStmt, propName, additionalFields, defe
|
|
|
271
275
|
if (debugInfo !== null) {
|
|
272
276
|
statements.push(debugInfo);
|
|
273
277
|
}
|
|
278
|
+
if (hmrInitializer !== null) {
|
|
279
|
+
statements.push(hmrInitializer);
|
|
280
|
+
}
|
|
274
281
|
const results = [
|
|
275
282
|
fac,
|
|
276
283
|
{
|
|
@@ -317,8 +324,11 @@ function isAbstractClassDeclaration(clazz) {
|
|
|
317
324
|
return ts.canHaveModifiers(clazz) && clazz.modifiers !== void 0 ? clazz.modifiers.some((mod) => mod.kind === ts.SyntaxKind.AbstractKeyword) : false;
|
|
318
325
|
}
|
|
319
326
|
|
|
320
|
-
// bazel-out/
|
|
327
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
|
|
321
328
|
var DynamicValue = class {
|
|
329
|
+
node;
|
|
330
|
+
reason;
|
|
331
|
+
code;
|
|
322
332
|
constructor(node, reason, code) {
|
|
323
333
|
this.node = node;
|
|
324
334
|
this.reason = reason;
|
|
@@ -407,11 +417,13 @@ var DynamicValue = class {
|
|
|
407
417
|
}
|
|
408
418
|
};
|
|
409
419
|
|
|
410
|
-
// bazel-out/
|
|
420
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
411
421
|
import ts2 from "typescript";
|
|
412
422
|
|
|
413
|
-
// bazel-out/
|
|
423
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
|
|
414
424
|
var ResolvedModule = class {
|
|
425
|
+
exports;
|
|
426
|
+
evaluate;
|
|
415
427
|
constructor(exports, evaluate) {
|
|
416
428
|
this.exports = exports;
|
|
417
429
|
this.evaluate = evaluate;
|
|
@@ -431,6 +443,9 @@ var ResolvedModule = class {
|
|
|
431
443
|
}
|
|
432
444
|
};
|
|
433
445
|
var EnumValue = class {
|
|
446
|
+
enumRef;
|
|
447
|
+
name;
|
|
448
|
+
resolved;
|
|
434
449
|
constructor(enumRef, name, resolved) {
|
|
435
450
|
this.enumRef = enumRef;
|
|
436
451
|
this.name = name;
|
|
@@ -440,8 +455,9 @@ var EnumValue = class {
|
|
|
440
455
|
var KnownFn = class {
|
|
441
456
|
};
|
|
442
457
|
|
|
443
|
-
// bazel-out/
|
|
458
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
|
|
444
459
|
var ArraySliceBuiltinFn = class extends KnownFn {
|
|
460
|
+
lhs;
|
|
445
461
|
constructor(lhs) {
|
|
446
462
|
super();
|
|
447
463
|
this.lhs = lhs;
|
|
@@ -455,6 +471,7 @@ var ArraySliceBuiltinFn = class extends KnownFn {
|
|
|
455
471
|
}
|
|
456
472
|
};
|
|
457
473
|
var ArrayConcatBuiltinFn = class extends KnownFn {
|
|
474
|
+
lhs;
|
|
458
475
|
constructor(lhs) {
|
|
459
476
|
super();
|
|
460
477
|
this.lhs = lhs;
|
|
@@ -474,6 +491,7 @@ var ArrayConcatBuiltinFn = class extends KnownFn {
|
|
|
474
491
|
}
|
|
475
492
|
};
|
|
476
493
|
var StringConcatBuiltinFn = class extends KnownFn {
|
|
494
|
+
lhs;
|
|
477
495
|
constructor(lhs) {
|
|
478
496
|
super();
|
|
479
497
|
this.lhs = lhs;
|
|
@@ -492,14 +510,15 @@ var StringConcatBuiltinFn = class extends KnownFn {
|
|
|
492
510
|
}
|
|
493
511
|
};
|
|
494
512
|
|
|
495
|
-
// bazel-out/
|
|
513
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/synthetic.mjs
|
|
496
514
|
var SyntheticValue = class {
|
|
515
|
+
value;
|
|
497
516
|
constructor(value) {
|
|
498
517
|
this.value = value;
|
|
499
518
|
}
|
|
500
519
|
};
|
|
501
520
|
|
|
502
|
-
// bazel-out/
|
|
521
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
503
522
|
function literalBinaryOp(op) {
|
|
504
523
|
return { op, literal: true };
|
|
505
524
|
}
|
|
@@ -537,6 +556,9 @@ var UNARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
|
537
556
|
[ts2.SyntaxKind.ExclamationToken, (a) => !a]
|
|
538
557
|
]);
|
|
539
558
|
var StaticInterpreter = class {
|
|
559
|
+
host;
|
|
560
|
+
checker;
|
|
561
|
+
dependencyTracker;
|
|
540
562
|
constructor(host, checker, dependencyTracker) {
|
|
541
563
|
this.host = host;
|
|
542
564
|
this.checker = checker;
|
|
@@ -950,11 +972,11 @@ var StaticInterpreter = class {
|
|
|
950
972
|
}
|
|
951
973
|
}
|
|
952
974
|
visitBindingElement(node, context) {
|
|
953
|
-
const
|
|
975
|
+
const path = [];
|
|
954
976
|
let closestDeclaration = node;
|
|
955
977
|
while (ts2.isBindingElement(closestDeclaration) || ts2.isArrayBindingPattern(closestDeclaration) || ts2.isObjectBindingPattern(closestDeclaration)) {
|
|
956
978
|
if (ts2.isBindingElement(closestDeclaration)) {
|
|
957
|
-
|
|
979
|
+
path.unshift(closestDeclaration);
|
|
958
980
|
}
|
|
959
981
|
closestDeclaration = closestDeclaration.parent;
|
|
960
982
|
}
|
|
@@ -962,7 +984,7 @@ var StaticInterpreter = class {
|
|
|
962
984
|
return DynamicValue.fromUnknown(node);
|
|
963
985
|
}
|
|
964
986
|
let value = this.visit(closestDeclaration.initializer, context);
|
|
965
|
-
for (const element of
|
|
987
|
+
for (const element of path) {
|
|
966
988
|
let key;
|
|
967
989
|
if (ts2.isArrayBindingPattern(element.parent)) {
|
|
968
990
|
key = element.parent.elements.indexOf(element);
|
|
@@ -1077,8 +1099,11 @@ function owningModule(context, override = null) {
|
|
|
1077
1099
|
}
|
|
1078
1100
|
}
|
|
1079
1101
|
|
|
1080
|
-
// bazel-out/
|
|
1102
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
|
|
1081
1103
|
var PartialEvaluator = class {
|
|
1104
|
+
host;
|
|
1105
|
+
checker;
|
|
1106
|
+
dependencyTracker;
|
|
1082
1107
|
constructor(host, checker, dependencyTracker) {
|
|
1083
1108
|
this.host = host;
|
|
1084
1109
|
this.checker = checker;
|
|
@@ -1097,7 +1122,7 @@ var PartialEvaluator = class {
|
|
|
1097
1122
|
}
|
|
1098
1123
|
};
|
|
1099
1124
|
|
|
1100
|
-
// bazel-out/
|
|
1125
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
|
|
1101
1126
|
import ts3 from "typescript";
|
|
1102
1127
|
function describeResolvedType(value, maxDepth = 1) {
|
|
1103
1128
|
var _a, _b;
|
|
@@ -1145,9 +1170,10 @@ function traceDynamicValue(node, value) {
|
|
|
1145
1170
|
return value.accept(new TraceDynamicValueVisitor(node));
|
|
1146
1171
|
}
|
|
1147
1172
|
var TraceDynamicValueVisitor = class {
|
|
1173
|
+
node;
|
|
1174
|
+
currentContainerNode = null;
|
|
1148
1175
|
constructor(node) {
|
|
1149
1176
|
this.node = node;
|
|
1150
|
-
this.currentContainerNode = null;
|
|
1151
1177
|
}
|
|
1152
1178
|
visitDynamicInput(value) {
|
|
1153
1179
|
const trace = value.reason.accept(this);
|
|
@@ -1231,14 +1257,14 @@ function getContainerNode(node) {
|
|
|
1231
1257
|
return node.getSourceFile();
|
|
1232
1258
|
}
|
|
1233
1259
|
|
|
1234
|
-
// bazel-out/
|
|
1260
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
|
|
1235
1261
|
var OptimizeFor;
|
|
1236
1262
|
(function(OptimizeFor2) {
|
|
1237
1263
|
OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
|
|
1238
1264
|
OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
|
|
1239
1265
|
})(OptimizeFor || (OptimizeFor = {}));
|
|
1240
1266
|
|
|
1241
|
-
// bazel-out/
|
|
1267
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/scope.mjs
|
|
1242
1268
|
var PotentialImportKind;
|
|
1243
1269
|
(function(PotentialImportKind2) {
|
|
1244
1270
|
PotentialImportKind2[PotentialImportKind2["NgModule"] = 0] = "NgModule";
|
|
@@ -1250,7 +1276,7 @@ var PotentialImportMode;
|
|
|
1250
1276
|
PotentialImportMode2[PotentialImportMode2["ForceDirect"] = 1] = "ForceDirect";
|
|
1251
1277
|
})(PotentialImportMode || (PotentialImportMode = {}));
|
|
1252
1278
|
|
|
1253
|
-
// bazel-out/
|
|
1279
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
|
|
1254
1280
|
var CompletionKind;
|
|
1255
1281
|
(function(CompletionKind2) {
|
|
1256
1282
|
CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
|
|
@@ -1258,7 +1284,7 @@ var CompletionKind;
|
|
|
1258
1284
|
CompletionKind2[CompletionKind2["LetDeclaration"] = 2] = "LetDeclaration";
|
|
1259
1285
|
})(CompletionKind || (CompletionKind = {}));
|
|
1260
1286
|
|
|
1261
|
-
// bazel-out/
|
|
1287
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
|
|
1262
1288
|
var SymbolKind;
|
|
1263
1289
|
(function(SymbolKind2) {
|
|
1264
1290
|
SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
|
|
@@ -1275,7 +1301,7 @@ var SymbolKind;
|
|
|
1275
1301
|
SymbolKind2[SymbolKind2["LetDeclaration"] = 11] = "LetDeclaration";
|
|
1276
1302
|
})(SymbolKind || (SymbolKind = {}));
|
|
1277
1303
|
|
|
1278
|
-
// bazel-out/
|
|
1304
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/di.mjs
|
|
1279
1305
|
import { LiteralExpr, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
|
|
1280
1306
|
import ts4 from "typescript";
|
|
1281
1307
|
function getConstructorDependencies(clazz, reflector, isCore) {
|
|
@@ -1421,10 +1447,10 @@ function createUnsuitableInjectionTokenError(clazz, error) {
|
|
|
1421
1447
|
return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
|
|
1422
1448
|
}
|
|
1423
1449
|
|
|
1424
|
-
// bazel-out/
|
|
1450
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
|
|
1425
1451
|
import ts12 from "typescript";
|
|
1426
1452
|
|
|
1427
|
-
// bazel-out/
|
|
1453
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
|
|
1428
1454
|
var MetaKind;
|
|
1429
1455
|
(function(MetaKind2) {
|
|
1430
1456
|
MetaKind2[MetaKind2["Directive"] = 0] = "Directive";
|
|
@@ -1437,11 +1463,13 @@ var MatchSource;
|
|
|
1437
1463
|
MatchSource2[MatchSource2["HostDirective"] = 1] = "HostDirective";
|
|
1438
1464
|
})(MatchSource || (MatchSource = {}));
|
|
1439
1465
|
|
|
1440
|
-
// bazel-out/
|
|
1466
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1441
1467
|
import ts6 from "typescript";
|
|
1442
1468
|
|
|
1443
|
-
// bazel-out/
|
|
1469
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
|
|
1444
1470
|
var ClassPropertyMapping = class {
|
|
1471
|
+
forwardMap;
|
|
1472
|
+
reverseMap;
|
|
1445
1473
|
constructor(forwardMap) {
|
|
1446
1474
|
this.forwardMap = forwardMap;
|
|
1447
1475
|
this.reverseMap = reverseMapFromForwardMap(forwardMap);
|
|
@@ -1520,7 +1548,7 @@ function reverseMapFromForwardMap(forwardMap) {
|
|
|
1520
1548
|
return reverseMap;
|
|
1521
1549
|
}
|
|
1522
1550
|
|
|
1523
|
-
// bazel-out/
|
|
1551
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
|
|
1524
1552
|
import ts5 from "typescript";
|
|
1525
1553
|
function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
1526
1554
|
if (!ts5.isTupleTypeNode(def)) {
|
|
@@ -1670,6 +1698,7 @@ function extractCoercedInput(member) {
|
|
|
1670
1698
|
return afterUnderscore(member.name);
|
|
1671
1699
|
}
|
|
1672
1700
|
var CompoundMetadataReader = class {
|
|
1701
|
+
readers;
|
|
1673
1702
|
constructor(readers) {
|
|
1674
1703
|
this.readers = readers;
|
|
1675
1704
|
}
|
|
@@ -1716,8 +1745,10 @@ function isHostDirectiveMetaForGlobalMode(hostDirectiveMeta) {
|
|
|
1716
1745
|
return hostDirectiveMeta.directive instanceof Reference;
|
|
1717
1746
|
}
|
|
1718
1747
|
|
|
1719
|
-
// bazel-out/
|
|
1748
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1720
1749
|
var DtsMetadataReader = class {
|
|
1750
|
+
checker;
|
|
1751
|
+
reflector;
|
|
1721
1752
|
constructor(checker, reflector) {
|
|
1722
1753
|
this.checker = checker;
|
|
1723
1754
|
this.reflector = reflector;
|
|
@@ -1901,7 +1932,7 @@ function readHostDirectivesType(checker, type, bestGuessOwningModule) {
|
|
|
1901
1932
|
return result.length > 0 ? result : null;
|
|
1902
1933
|
}
|
|
1903
1934
|
|
|
1904
|
-
// bazel-out/
|
|
1935
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
|
|
1905
1936
|
function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
1906
1937
|
const topMeta = reader.getDirectiveMetadata(dir);
|
|
1907
1938
|
if (topMeta === null) {
|
|
@@ -1965,13 +1996,11 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
1965
1996
|
};
|
|
1966
1997
|
}
|
|
1967
1998
|
|
|
1968
|
-
// bazel-out/
|
|
1999
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
|
|
1969
2000
|
var LocalMetadataRegistry = class {
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
this.pipes = /* @__PURE__ */ new Map();
|
|
1974
|
-
}
|
|
2001
|
+
directives = /* @__PURE__ */ new Map();
|
|
2002
|
+
ngModules = /* @__PURE__ */ new Map();
|
|
2003
|
+
pipes = /* @__PURE__ */ new Map();
|
|
1975
2004
|
getDirectiveMetadata(ref) {
|
|
1976
2005
|
return this.directives.has(ref.node) ? this.directives.get(ref.node) : null;
|
|
1977
2006
|
}
|
|
@@ -2002,6 +2031,7 @@ var LocalMetadataRegistry = class {
|
|
|
2002
2031
|
}
|
|
2003
2032
|
};
|
|
2004
2033
|
var CompoundMetadataRegistry = class {
|
|
2034
|
+
registries;
|
|
2005
2035
|
constructor(registries) {
|
|
2006
2036
|
this.registries = registries;
|
|
2007
2037
|
}
|
|
@@ -2022,14 +2052,12 @@ var CompoundMetadataRegistry = class {
|
|
|
2022
2052
|
}
|
|
2023
2053
|
};
|
|
2024
2054
|
|
|
2025
|
-
// bazel-out/
|
|
2055
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
|
|
2026
2056
|
var ResourceRegistry = class {
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
this.externalStyleToComponentsMap = /* @__PURE__ */ new Map();
|
|
2032
|
-
}
|
|
2057
|
+
externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
|
|
2058
|
+
componentToTemplateMap = /* @__PURE__ */ new Map();
|
|
2059
|
+
componentToStylesMap = /* @__PURE__ */ new Map();
|
|
2060
|
+
externalStyleToComponentsMap = /* @__PURE__ */ new Map();
|
|
2033
2061
|
getComponentsWithTemplate(template) {
|
|
2034
2062
|
if (!this.externalTemplateToComponentsMap.has(template)) {
|
|
2035
2063
|
return /* @__PURE__ */ new Set();
|
|
@@ -2045,12 +2073,12 @@ var ResourceRegistry = class {
|
|
|
2045
2073
|
}
|
|
2046
2074
|
}
|
|
2047
2075
|
registerTemplate(templateResource, component) {
|
|
2048
|
-
const { path
|
|
2049
|
-
if (
|
|
2050
|
-
if (!this.externalTemplateToComponentsMap.has(
|
|
2051
|
-
this.externalTemplateToComponentsMap.set(
|
|
2076
|
+
const { path } = templateResource;
|
|
2077
|
+
if (path !== null) {
|
|
2078
|
+
if (!this.externalTemplateToComponentsMap.has(path)) {
|
|
2079
|
+
this.externalTemplateToComponentsMap.set(path, /* @__PURE__ */ new Set());
|
|
2052
2080
|
}
|
|
2053
|
-
this.externalTemplateToComponentsMap.get(
|
|
2081
|
+
this.externalTemplateToComponentsMap.get(path).add(component);
|
|
2054
2082
|
}
|
|
2055
2083
|
this.componentToTemplateMap.set(component, templateResource);
|
|
2056
2084
|
}
|
|
@@ -2061,15 +2089,15 @@ var ResourceRegistry = class {
|
|
|
2061
2089
|
return this.componentToTemplateMap.get(component);
|
|
2062
2090
|
}
|
|
2063
2091
|
registerStyle(styleResource, component) {
|
|
2064
|
-
const { path
|
|
2092
|
+
const { path } = styleResource;
|
|
2065
2093
|
if (!this.componentToStylesMap.has(component)) {
|
|
2066
2094
|
this.componentToStylesMap.set(component, /* @__PURE__ */ new Set());
|
|
2067
2095
|
}
|
|
2068
|
-
if (
|
|
2069
|
-
if (!this.externalStyleToComponentsMap.has(
|
|
2070
|
-
this.externalStyleToComponentsMap.set(
|
|
2096
|
+
if (path !== null) {
|
|
2097
|
+
if (!this.externalStyleToComponentsMap.has(path)) {
|
|
2098
|
+
this.externalStyleToComponentsMap.set(path, /* @__PURE__ */ new Set());
|
|
2071
2099
|
}
|
|
2072
|
-
this.externalStyleToComponentsMap.get(
|
|
2100
|
+
this.externalStyleToComponentsMap.get(path).add(component);
|
|
2073
2101
|
}
|
|
2074
2102
|
this.componentToStylesMap.get(component).add(styleResource);
|
|
2075
2103
|
}
|
|
@@ -2087,11 +2115,12 @@ var ResourceRegistry = class {
|
|
|
2087
2115
|
}
|
|
2088
2116
|
};
|
|
2089
2117
|
|
|
2090
|
-
// bazel-out/
|
|
2118
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/providers.mjs
|
|
2091
2119
|
var ExportedProviderStatusResolver = class {
|
|
2120
|
+
metaReader;
|
|
2121
|
+
calculating = /* @__PURE__ */ new Set();
|
|
2092
2122
|
constructor(metaReader) {
|
|
2093
2123
|
this.metaReader = metaReader;
|
|
2094
|
-
this.calculating = /* @__PURE__ */ new Set();
|
|
2095
2124
|
}
|
|
2096
2125
|
mayExportProviders(ref, dependencyCallback) {
|
|
2097
2126
|
var _a;
|
|
@@ -2131,12 +2160,13 @@ var ExportedProviderStatusResolver = class {
|
|
|
2131
2160
|
}
|
|
2132
2161
|
};
|
|
2133
2162
|
|
|
2134
|
-
// bazel-out/
|
|
2163
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/host_directives_resolver.mjs
|
|
2135
2164
|
var EMPTY_ARRAY = [];
|
|
2136
2165
|
var HostDirectivesResolver = class {
|
|
2166
|
+
metaReader;
|
|
2167
|
+
cache = /* @__PURE__ */ new Map();
|
|
2137
2168
|
constructor(metaReader) {
|
|
2138
2169
|
this.metaReader = metaReader;
|
|
2139
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
2140
2170
|
}
|
|
2141
2171
|
resolve(metadata) {
|
|
2142
2172
|
if (this.cache.has(metadata.ref.node)) {
|
|
@@ -2197,7 +2227,7 @@ function resolveOutput(bindingName) {
|
|
|
2197
2227
|
return bindingName;
|
|
2198
2228
|
}
|
|
2199
2229
|
|
|
2200
|
-
// bazel-out/
|
|
2230
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
|
|
2201
2231
|
var CompilationMode;
|
|
2202
2232
|
(function(CompilationMode2) {
|
|
2203
2233
|
CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
|
|
@@ -2211,7 +2241,7 @@ var HandlerPrecedence;
|
|
|
2211
2241
|
HandlerPrecedence2[HandlerPrecedence2["WEAK"] = 2] = "WEAK";
|
|
2212
2242
|
})(HandlerPrecedence || (HandlerPrecedence = {}));
|
|
2213
2243
|
|
|
2214
|
-
// bazel-out/
|
|
2244
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
|
|
2215
2245
|
import ts7 from "typescript";
|
|
2216
2246
|
function aliasTransformFactory(exportStatements) {
|
|
2217
2247
|
return () => {
|
|
@@ -2236,10 +2266,10 @@ function aliasTransformFactory(exportStatements) {
|
|
|
2236
2266
|
};
|
|
2237
2267
|
}
|
|
2238
2268
|
|
|
2239
|
-
// bazel-out/
|
|
2269
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
2240
2270
|
import ts8 from "typescript";
|
|
2241
2271
|
|
|
2242
|
-
// bazel-out/
|
|
2272
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
|
|
2243
2273
|
var TraitState;
|
|
2244
2274
|
(function(TraitState2) {
|
|
2245
2275
|
TraitState2[TraitState2["Pending"] = 0] = "Pending";
|
|
@@ -2251,14 +2281,16 @@ var Trait = {
|
|
|
2251
2281
|
pending: (handler, detected) => TraitImpl.pending(handler, detected)
|
|
2252
2282
|
};
|
|
2253
2283
|
var TraitImpl = class {
|
|
2284
|
+
state = TraitState.Pending;
|
|
2285
|
+
handler;
|
|
2286
|
+
detected;
|
|
2287
|
+
analysis = null;
|
|
2288
|
+
symbol = null;
|
|
2289
|
+
resolution = null;
|
|
2290
|
+
analysisDiagnostics = null;
|
|
2291
|
+
resolveDiagnostics = null;
|
|
2292
|
+
typeCheckDiagnostics = null;
|
|
2254
2293
|
constructor(handler, detected) {
|
|
2255
|
-
this.state = TraitState.Pending;
|
|
2256
|
-
this.analysis = null;
|
|
2257
|
-
this.symbol = null;
|
|
2258
|
-
this.resolution = null;
|
|
2259
|
-
this.analysisDiagnostics = null;
|
|
2260
|
-
this.resolveDiagnostics = null;
|
|
2261
|
-
this.typeCheckDiagnostics = null;
|
|
2262
2294
|
this.handler = handler;
|
|
2263
2295
|
this.detected = detected;
|
|
2264
2296
|
}
|
|
@@ -2296,8 +2328,22 @@ var TraitImpl = class {
|
|
|
2296
2328
|
}
|
|
2297
2329
|
};
|
|
2298
2330
|
|
|
2299
|
-
// bazel-out/
|
|
2331
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
2300
2332
|
var TraitCompiler = class {
|
|
2333
|
+
handlers;
|
|
2334
|
+
reflector;
|
|
2335
|
+
perf;
|
|
2336
|
+
incrementalBuild;
|
|
2337
|
+
compileNonExportedClasses;
|
|
2338
|
+
compilationMode;
|
|
2339
|
+
dtsTransforms;
|
|
2340
|
+
semanticDepGraphUpdater;
|
|
2341
|
+
sourceFileTypeIdentifier;
|
|
2342
|
+
classes = /* @__PURE__ */ new Map();
|
|
2343
|
+
fileToClasses = /* @__PURE__ */ new Map();
|
|
2344
|
+
filesWithoutTraits = /* @__PURE__ */ new Set();
|
|
2345
|
+
reexportMap = /* @__PURE__ */ new Map();
|
|
2346
|
+
handlersByName = /* @__PURE__ */ new Map();
|
|
2301
2347
|
constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater, sourceFileTypeIdentifier) {
|
|
2302
2348
|
this.handlers = handlers;
|
|
2303
2349
|
this.reflector = reflector;
|
|
@@ -2308,11 +2354,6 @@ var TraitCompiler = class {
|
|
|
2308
2354
|
this.dtsTransforms = dtsTransforms;
|
|
2309
2355
|
this.semanticDepGraphUpdater = semanticDepGraphUpdater;
|
|
2310
2356
|
this.sourceFileTypeIdentifier = sourceFileTypeIdentifier;
|
|
2311
|
-
this.classes = /* @__PURE__ */ new Map();
|
|
2312
|
-
this.fileToClasses = /* @__PURE__ */ new Map();
|
|
2313
|
-
this.filesWithoutTraits = /* @__PURE__ */ new Set();
|
|
2314
|
-
this.reexportMap = /* @__PURE__ */ new Map();
|
|
2315
|
-
this.handlersByName = /* @__PURE__ */ new Map();
|
|
2316
2357
|
for (const handler of handlers) {
|
|
2317
2358
|
this.handlersByName.set(handler.name, handler);
|
|
2318
2359
|
}
|
|
@@ -2711,6 +2752,19 @@ var TraitCompiler = class {
|
|
|
2711
2752
|
this.dtsTransforms.getIvyDeclarationTransform(original.getSourceFile()).addFields(original, res);
|
|
2712
2753
|
return res.length > 0 ? res : null;
|
|
2713
2754
|
}
|
|
2755
|
+
compileHmrUpdateCallback(clazz) {
|
|
2756
|
+
const original = ts8.getOriginalNode(clazz);
|
|
2757
|
+
if (!this.reflector.isClass(clazz) || !this.reflector.isClass(original) || !this.classes.has(original)) {
|
|
2758
|
+
return null;
|
|
2759
|
+
}
|
|
2760
|
+
const record = this.classes.get(original);
|
|
2761
|
+
for (const trait of record.traits) {
|
|
2762
|
+
if (trait.state === TraitState.Resolved && trait.handler.compileHmrUpdateDeclaration !== void 0 && !containsErrors(trait.analysisDiagnostics) && !containsErrors(trait.resolveDiagnostics)) {
|
|
2763
|
+
return trait.handler.compileHmrUpdateDeclaration(clazz, trait.analysis, trait.resolution);
|
|
2764
|
+
}
|
|
2765
|
+
}
|
|
2766
|
+
return null;
|
|
2767
|
+
}
|
|
2714
2768
|
decoratorsFor(node) {
|
|
2715
2769
|
const original = ts8.getOriginalNode(node);
|
|
2716
2770
|
if (!this.reflector.isClass(original) || !this.classes.has(original)) {
|
|
@@ -2755,12 +2809,10 @@ function containsErrors(diagnostics) {
|
|
|
2755
2809
|
return diagnostics !== null && diagnostics.some((diag) => diag.category === ts8.DiagnosticCategory.Error);
|
|
2756
2810
|
}
|
|
2757
2811
|
|
|
2758
|
-
// bazel-out/
|
|
2812
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
2759
2813
|
import ts9 from "typescript";
|
|
2760
2814
|
var DtsTransformRegistry = class {
|
|
2761
|
-
|
|
2762
|
-
this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
2763
|
-
}
|
|
2815
|
+
ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
2764
2816
|
getIvyDeclarationTransform(sf) {
|
|
2765
2817
|
if (!this.ivyDeclarationTransforms.has(sf)) {
|
|
2766
2818
|
this.ivyDeclarationTransforms.set(sf, new IvyDeclarationDtsTransform());
|
|
@@ -2796,6 +2848,10 @@ function declarationTransformFactory(transformRegistry, reflector, refEmitter, i
|
|
|
2796
2848
|
};
|
|
2797
2849
|
}
|
|
2798
2850
|
var DtsTransformer = class {
|
|
2851
|
+
ctx;
|
|
2852
|
+
reflector;
|
|
2853
|
+
refEmitter;
|
|
2854
|
+
importRewriter;
|
|
2799
2855
|
constructor(ctx, reflector, refEmitter, importRewriter) {
|
|
2800
2856
|
this.ctx = ctx;
|
|
2801
2857
|
this.reflector = reflector;
|
|
@@ -2866,9 +2922,7 @@ var DtsTransformer = class {
|
|
|
2866
2922
|
}
|
|
2867
2923
|
};
|
|
2868
2924
|
var IvyDeclarationDtsTransform = class {
|
|
2869
|
-
|
|
2870
|
-
this.declarationFields = /* @__PURE__ */ new Map();
|
|
2871
|
-
}
|
|
2925
|
+
declarationFields = /* @__PURE__ */ new Map();
|
|
2872
2926
|
addFields(decl, fields) {
|
|
2873
2927
|
this.declarationFields.set(decl, fields);
|
|
2874
2928
|
}
|
|
@@ -2905,20 +2959,18 @@ function markForEmitAsSingleLine(node) {
|
|
|
2905
2959
|
ts9.forEachChild(node, markForEmitAsSingleLine);
|
|
2906
2960
|
}
|
|
2907
2961
|
|
|
2908
|
-
// bazel-out/
|
|
2962
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
2909
2963
|
import { ConstantPool } from "@angular/compiler";
|
|
2910
2964
|
import ts11 from "typescript";
|
|
2911
2965
|
|
|
2912
|
-
// bazel-out/
|
|
2966
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
|
|
2913
2967
|
import ts10 from "typescript";
|
|
2914
2968
|
function visit(node, visitor, context) {
|
|
2915
2969
|
return visitor._visit(node, context);
|
|
2916
2970
|
}
|
|
2917
2971
|
var Visitor = class {
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
this._after = /* @__PURE__ */ new Map();
|
|
2921
|
-
}
|
|
2972
|
+
_before = /* @__PURE__ */ new Map();
|
|
2973
|
+
_after = /* @__PURE__ */ new Map();
|
|
2922
2974
|
_visitListEntryNode(node, visitor) {
|
|
2923
2975
|
const result = visitor(node);
|
|
2924
2976
|
if (result.before !== void 0) {
|
|
@@ -2970,7 +3022,7 @@ var Visitor = class {
|
|
|
2970
3022
|
}
|
|
2971
3023
|
};
|
|
2972
3024
|
|
|
2973
|
-
// bazel-out/
|
|
3025
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
2974
3026
|
var NO_DECORATORS = /* @__PURE__ */ new Set();
|
|
2975
3027
|
var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
|
|
2976
3028
|
function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, localCompilationExtraImportsTracker, perf, isCore, isClosureCompilerEnabled) {
|
|
@@ -2982,12 +3034,14 @@ function ivyTransformFactory(compilation, reflector, importRewriter, defaultImpo
|
|
|
2982
3034
|
};
|
|
2983
3035
|
}
|
|
2984
3036
|
var IvyCompilationVisitor = class extends Visitor {
|
|
3037
|
+
compilation;
|
|
3038
|
+
constantPool;
|
|
3039
|
+
classCompilationMap = /* @__PURE__ */ new Map();
|
|
3040
|
+
deferrableImports = /* @__PURE__ */ new Set();
|
|
2985
3041
|
constructor(compilation, constantPool) {
|
|
2986
3042
|
super();
|
|
2987
3043
|
this.compilation = compilation;
|
|
2988
3044
|
this.constantPool = constantPool;
|
|
2989
|
-
this.classCompilationMap = /* @__PURE__ */ new Map();
|
|
2990
|
-
this.deferrableImports = /* @__PURE__ */ new Set();
|
|
2991
3045
|
}
|
|
2992
3046
|
visitClassDeclaration(node) {
|
|
2993
3047
|
const result = this.compilation.compile(node, this.constantPool);
|
|
@@ -3003,6 +3057,14 @@ var IvyCompilationVisitor = class extends Visitor {
|
|
|
3003
3057
|
}
|
|
3004
3058
|
};
|
|
3005
3059
|
var IvyTransformationVisitor = class extends Visitor {
|
|
3060
|
+
compilation;
|
|
3061
|
+
classCompilationMap;
|
|
3062
|
+
reflector;
|
|
3063
|
+
importManager;
|
|
3064
|
+
recordWrappedNodeExpr;
|
|
3065
|
+
isClosureCompilerEnabled;
|
|
3066
|
+
isCore;
|
|
3067
|
+
deferrableImports;
|
|
3006
3068
|
constructor(compilation, classCompilationMap, reflector, importManager, recordWrappedNodeExpr, isClosureCompilerEnabled, isCore, deferrableImports) {
|
|
3007
3069
|
super();
|
|
3008
3070
|
this.compilation = compilation;
|
|
@@ -3206,7 +3268,7 @@ function nodeArrayFromDecoratorsArray(decorators) {
|
|
|
3206
3268
|
return array;
|
|
3207
3269
|
}
|
|
3208
3270
|
|
|
3209
|
-
// bazel-out/
|
|
3271
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/diagnostics.mjs
|
|
3210
3272
|
function makeDuplicateDeclarationError(node, data, kind) {
|
|
3211
3273
|
const context = [];
|
|
3212
3274
|
for (const decl of data) {
|
|
@@ -3415,7 +3477,7 @@ function assertLocalCompilationUnresolvedConst(compilationMode, value, nodeToHig
|
|
|
3415
3477
|
}
|
|
3416
3478
|
}
|
|
3417
3479
|
|
|
3418
|
-
// bazel-out/
|
|
3480
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/evaluation.mjs
|
|
3419
3481
|
import { ViewEncapsulation } from "@angular/compiler";
|
|
3420
3482
|
import ts13 from "typescript";
|
|
3421
3483
|
function resolveEnumValue(evaluator, metadata, field, enumSymbolName) {
|
|
@@ -3466,7 +3528,7 @@ function resolveLiteral(decorator, literalCache) {
|
|
|
3466
3528
|
return meta;
|
|
3467
3529
|
}
|
|
3468
3530
|
|
|
3469
|
-
// bazel-out/
|
|
3531
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/factory.mjs
|
|
3470
3532
|
import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
|
|
3471
3533
|
function compileNgFactoryDefField(metadata) {
|
|
3472
3534
|
const res = compileFactoryFunction(metadata);
|
|
@@ -3489,12 +3551,14 @@ function compileDeclareFactory(metadata) {
|
|
|
3489
3551
|
};
|
|
3490
3552
|
}
|
|
3491
3553
|
|
|
3492
|
-
// bazel-out/
|
|
3554
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/injectable_registry.mjs
|
|
3493
3555
|
var InjectableClassRegistry = class {
|
|
3556
|
+
host;
|
|
3557
|
+
isCore;
|
|
3558
|
+
classes = /* @__PURE__ */ new Map();
|
|
3494
3559
|
constructor(host, isCore) {
|
|
3495
3560
|
this.host = host;
|
|
3496
3561
|
this.isCore = isCore;
|
|
3497
|
-
this.classes = /* @__PURE__ */ new Map();
|
|
3498
3562
|
}
|
|
3499
3563
|
registerInjectable(declaration, meta) {
|
|
3500
3564
|
this.classes.set(declaration, meta);
|
|
@@ -3515,7 +3579,7 @@ var InjectableClassRegistry = class {
|
|
|
3515
3579
|
}
|
|
3516
3580
|
};
|
|
3517
3581
|
|
|
3518
|
-
// bazel-out/
|
|
3582
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/metadata.mjs
|
|
3519
3583
|
import { ArrowFunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
|
|
3520
3584
|
import ts14 from "typescript";
|
|
3521
3585
|
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
|
|
@@ -3602,15 +3666,14 @@ function removeIdentifierReferences(node, names) {
|
|
|
3602
3666
|
return result.transformed[0];
|
|
3603
3667
|
}
|
|
3604
3668
|
|
|
3605
|
-
// bazel-out/
|
|
3669
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
|
|
3606
3670
|
import { literal as literal2, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
|
|
3607
|
-
|
|
3608
|
-
function extractClassDebugInfo(clazz, reflection, rootDirs, forbidOrphanRendering) {
|
|
3671
|
+
function extractClassDebugInfo(clazz, reflection, compilerHost, rootDirs, forbidOrphanRendering) {
|
|
3609
3672
|
if (!reflection.isClass(clazz)) {
|
|
3610
3673
|
return null;
|
|
3611
3674
|
}
|
|
3612
3675
|
const srcFile = clazz.getSourceFile();
|
|
3613
|
-
const srcFileMaybeRelativePath =
|
|
3676
|
+
const srcFileMaybeRelativePath = getProjectRelativePath(srcFile, rootDirs, compilerHost);
|
|
3614
3677
|
return {
|
|
3615
3678
|
type: new WrappedNodeExpr4(clazz.name),
|
|
3616
3679
|
className: literal2(clazz.name.getText()),
|
|
@@ -3619,23 +3682,14 @@ function extractClassDebugInfo(clazz, reflection, rootDirs, forbidOrphanRenderin
|
|
|
3619
3682
|
forbidOrphanRendering
|
|
3620
3683
|
};
|
|
3621
3684
|
}
|
|
3622
|
-
function computeRelativePathIfPossible(filePath, rootDirs) {
|
|
3623
|
-
for (const rootDir of rootDirs) {
|
|
3624
|
-
const rel = path.relative(rootDir, filePath);
|
|
3625
|
-
if (!rel.startsWith("..")) {
|
|
3626
|
-
return rel;
|
|
3627
|
-
}
|
|
3628
|
-
}
|
|
3629
|
-
return null;
|
|
3630
|
-
}
|
|
3631
3685
|
|
|
3632
|
-
// bazel-out/
|
|
3686
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
|
|
3633
3687
|
var NoopReferencesRegistry = class {
|
|
3634
3688
|
add(source, ...references) {
|
|
3635
3689
|
}
|
|
3636
3690
|
};
|
|
3637
3691
|
|
|
3638
|
-
// bazel-out/
|
|
3692
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/schema.mjs
|
|
3639
3693
|
import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from "@angular/compiler";
|
|
3640
3694
|
function extractSchemas(rawExpr, evaluator, context) {
|
|
3641
3695
|
const schemas = [];
|
|
@@ -3665,7 +3719,7 @@ function extractSchemas(rawExpr, evaluator, context) {
|
|
|
3665
3719
|
return schemas;
|
|
3666
3720
|
}
|
|
3667
3721
|
|
|
3668
|
-
// bazel-out/
|
|
3722
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/input_transforms.mjs
|
|
3669
3723
|
import { outputAst } from "@angular/compiler";
|
|
3670
3724
|
function compileInputTransformFields(inputs) {
|
|
3671
3725
|
const extraFields = [];
|
|
@@ -3683,20 +3737,21 @@ function compileInputTransformFields(inputs) {
|
|
|
3683
3737
|
return extraFields;
|
|
3684
3738
|
}
|
|
3685
3739
|
|
|
3686
|
-
// bazel-out/
|
|
3740
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/jit_declaration_registry.mjs
|
|
3687
3741
|
var JitDeclarationRegistry = class {
|
|
3688
|
-
|
|
3689
|
-
this.jitDeclarations = /* @__PURE__ */ new Set();
|
|
3690
|
-
}
|
|
3742
|
+
jitDeclarations = /* @__PURE__ */ new Set();
|
|
3691
3743
|
};
|
|
3692
3744
|
|
|
3693
|
-
// bazel-out/
|
|
3694
|
-
import { compileClassDebugInfo, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, CssSelector as CssSelector4, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, outputAst as
|
|
3695
|
-
import
|
|
3745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
3746
|
+
import { compileClassDebugInfo, compileHmrInitializer, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, ConstantPool as ConstantPool2, CssSelector as CssSelector4, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, outputAst as o4, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2 } from "@angular/compiler";
|
|
3747
|
+
import ts47 from "typescript";
|
|
3696
3748
|
|
|
3697
|
-
// bazel-out/
|
|
3749
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
|
|
3698
3750
|
import ts15 from "typescript";
|
|
3699
3751
|
var SemanticSymbol = class {
|
|
3752
|
+
decl;
|
|
3753
|
+
path;
|
|
3754
|
+
identifier;
|
|
3700
3755
|
constructor(decl) {
|
|
3701
3756
|
this.decl = decl;
|
|
3702
3757
|
this.path = absoluteFromSourceFile(decl.getSourceFile());
|
|
@@ -3710,7 +3765,7 @@ function getSymbolIdentifier(decl) {
|
|
|
3710
3765
|
return decl.name.text;
|
|
3711
3766
|
}
|
|
3712
3767
|
|
|
3713
|
-
// bazel-out/
|
|
3768
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
|
|
3714
3769
|
import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
3715
3770
|
var OpaqueSymbol = class extends SemanticSymbol {
|
|
3716
3771
|
isPublicApiAffected() {
|
|
@@ -3721,10 +3776,8 @@ var OpaqueSymbol = class extends SemanticSymbol {
|
|
|
3721
3776
|
}
|
|
3722
3777
|
};
|
|
3723
3778
|
var SemanticDepGraph = class {
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
this.symbolByDecl = /* @__PURE__ */ new Map();
|
|
3727
|
-
}
|
|
3779
|
+
files = /* @__PURE__ */ new Map();
|
|
3780
|
+
symbolByDecl = /* @__PURE__ */ new Map();
|
|
3728
3781
|
registerSymbol(symbol) {
|
|
3729
3782
|
this.symbolByDecl.set(symbol.decl, symbol);
|
|
3730
3783
|
if (symbol.identifier !== null) {
|
|
@@ -3741,11 +3794,11 @@ var SemanticDepGraph = class {
|
|
|
3741
3794
|
}
|
|
3742
3795
|
return previousSymbol;
|
|
3743
3796
|
}
|
|
3744
|
-
getSymbolByName(
|
|
3745
|
-
if (!this.files.has(
|
|
3797
|
+
getSymbolByName(path, identifier) {
|
|
3798
|
+
if (!this.files.has(path)) {
|
|
3746
3799
|
return null;
|
|
3747
3800
|
}
|
|
3748
|
-
const file = this.files.get(
|
|
3801
|
+
const file = this.files.get(path);
|
|
3749
3802
|
if (!file.has(identifier)) {
|
|
3750
3803
|
return null;
|
|
3751
3804
|
}
|
|
@@ -3759,10 +3812,11 @@ var SemanticDepGraph = class {
|
|
|
3759
3812
|
}
|
|
3760
3813
|
};
|
|
3761
3814
|
var SemanticDepGraphUpdater = class {
|
|
3815
|
+
priorGraph;
|
|
3816
|
+
newGraph = new SemanticDepGraph();
|
|
3817
|
+
opaqueSymbols = /* @__PURE__ */ new Map();
|
|
3762
3818
|
constructor(priorGraph) {
|
|
3763
3819
|
this.priorGraph = priorGraph;
|
|
3764
|
-
this.newGraph = new SemanticDepGraph();
|
|
3765
|
-
this.opaqueSymbols = /* @__PURE__ */ new Map();
|
|
3766
3820
|
}
|
|
3767
3821
|
registerSymbol(symbol) {
|
|
3768
3822
|
this.newGraph.registerSymbol(symbol);
|
|
@@ -3853,10 +3907,10 @@ function getImportPath(expr) {
|
|
|
3853
3907
|
}
|
|
3854
3908
|
}
|
|
3855
3909
|
|
|
3856
|
-
// bazel-out/
|
|
3910
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
3857
3911
|
import ts16 from "typescript";
|
|
3858
3912
|
|
|
3859
|
-
// bazel-out/
|
|
3913
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
|
|
3860
3914
|
function isSymbolEqual(a, b) {
|
|
3861
3915
|
if (a.decl === b.decl) {
|
|
3862
3916
|
return true;
|
|
@@ -3906,7 +3960,7 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
|
|
|
3906
3960
|
return true;
|
|
3907
3961
|
}
|
|
3908
3962
|
|
|
3909
|
-
// bazel-out/
|
|
3963
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
3910
3964
|
function extractSemanticTypeParameters(node) {
|
|
3911
3965
|
if (!ts16.isClassDeclaration(node) || node.typeParameters === void 0) {
|
|
3912
3966
|
return null;
|
|
@@ -3928,15 +3982,16 @@ function isTypeParameterEqual(a, b) {
|
|
|
3928
3982
|
return a.hasGenericTypeBound === b.hasGenericTypeBound;
|
|
3929
3983
|
}
|
|
3930
3984
|
|
|
3931
|
-
// bazel-out/
|
|
3985
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/api.mjs
|
|
3932
3986
|
var ComponentScopeKind;
|
|
3933
3987
|
(function(ComponentScopeKind2) {
|
|
3934
3988
|
ComponentScopeKind2[ComponentScopeKind2["NgModule"] = 0] = "NgModule";
|
|
3935
3989
|
ComponentScopeKind2[ComponentScopeKind2["Standalone"] = 1] = "Standalone";
|
|
3936
3990
|
})(ComponentScopeKind || (ComponentScopeKind = {}));
|
|
3937
3991
|
|
|
3938
|
-
// bazel-out/
|
|
3992
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/component_scope.mjs
|
|
3939
3993
|
var CompoundComponentScopeReader = class {
|
|
3994
|
+
readers;
|
|
3940
3995
|
constructor(readers) {
|
|
3941
3996
|
this.readers = readers;
|
|
3942
3997
|
}
|
|
@@ -3960,12 +4015,14 @@ var CompoundComponentScopeReader = class {
|
|
|
3960
4015
|
}
|
|
3961
4016
|
};
|
|
3962
4017
|
|
|
3963
|
-
// bazel-out/
|
|
4018
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
|
|
3964
4019
|
var MetadataDtsModuleScopeResolver = class {
|
|
4020
|
+
dtsMetaReader;
|
|
4021
|
+
aliasingHost;
|
|
4022
|
+
cache = /* @__PURE__ */ new Map();
|
|
3965
4023
|
constructor(dtsMetaReader, aliasingHost) {
|
|
3966
4024
|
this.dtsMetaReader = dtsMetaReader;
|
|
3967
4025
|
this.aliasingHost = aliasingHost;
|
|
3968
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
3969
4026
|
}
|
|
3970
4027
|
resolve(ref) {
|
|
3971
4028
|
const clazz = ref.node;
|
|
@@ -4036,11 +4093,11 @@ var MetadataDtsModuleScopeResolver = class {
|
|
|
4036
4093
|
}
|
|
4037
4094
|
};
|
|
4038
4095
|
|
|
4039
|
-
// bazel-out/
|
|
4096
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
4040
4097
|
import { ExternalExpr as ExternalExpr3 } from "@angular/compiler";
|
|
4041
4098
|
import ts17 from "typescript";
|
|
4042
4099
|
|
|
4043
|
-
// bazel-out/
|
|
4100
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/util.mjs
|
|
4044
4101
|
function getDiagnosticNode(ref, rawExpr) {
|
|
4045
4102
|
return rawExpr !== null ? ref.getOriginForDiagnostics(rawExpr) : ref.node.name;
|
|
4046
4103
|
}
|
|
@@ -4066,22 +4123,28 @@ function makeUnknownComponentDeferredImportDiagnostic(ref, rawExpr) {
|
|
|
4066
4123
|
return makeDiagnostic(ErrorCode.COMPONENT_UNKNOWN_DEFERRED_IMPORT, getDiagnosticNode(ref, rawExpr), `Component deferred imports must be standalone components, directives or pipes.`);
|
|
4067
4124
|
}
|
|
4068
4125
|
|
|
4069
|
-
// bazel-out/
|
|
4126
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
4127
|
+
var IN_PROGRESS_RESOLUTION = {};
|
|
4070
4128
|
var LocalModuleScopeRegistry = class {
|
|
4129
|
+
localReader;
|
|
4130
|
+
fullReader;
|
|
4131
|
+
dependencyScopeReader;
|
|
4132
|
+
refEmitter;
|
|
4133
|
+
aliasingHost;
|
|
4134
|
+
sealed = false;
|
|
4135
|
+
declarationToModule = /* @__PURE__ */ new Map();
|
|
4136
|
+
duplicateDeclarations = /* @__PURE__ */ new Map();
|
|
4137
|
+
moduleToRef = /* @__PURE__ */ new Map();
|
|
4138
|
+
cache = /* @__PURE__ */ new Map();
|
|
4139
|
+
remoteScoping = /* @__PURE__ */ new Map();
|
|
4140
|
+
scopeErrors = /* @__PURE__ */ new Map();
|
|
4141
|
+
modulesWithStructuralErrors = /* @__PURE__ */ new Set();
|
|
4071
4142
|
constructor(localReader, fullReader, dependencyScopeReader, refEmitter, aliasingHost) {
|
|
4072
4143
|
this.localReader = localReader;
|
|
4073
4144
|
this.fullReader = fullReader;
|
|
4074
4145
|
this.dependencyScopeReader = dependencyScopeReader;
|
|
4075
4146
|
this.refEmitter = refEmitter;
|
|
4076
4147
|
this.aliasingHost = aliasingHost;
|
|
4077
|
-
this.sealed = false;
|
|
4078
|
-
this.declarationToModule = /* @__PURE__ */ new Map();
|
|
4079
|
-
this.duplicateDeclarations = /* @__PURE__ */ new Map();
|
|
4080
|
-
this.moduleToRef = /* @__PURE__ */ new Map();
|
|
4081
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
4082
|
-
this.remoteScoping = /* @__PURE__ */ new Map();
|
|
4083
|
-
this.scopeErrors = /* @__PURE__ */ new Map();
|
|
4084
|
-
this.modulesWithStructuralErrors = /* @__PURE__ */ new Set();
|
|
4085
4148
|
}
|
|
4086
4149
|
registerNgModuleMetadata(data) {
|
|
4087
4150
|
this.assertCollecting();
|
|
@@ -4139,8 +4202,12 @@ var LocalModuleScopeRegistry = class {
|
|
|
4139
4202
|
}
|
|
4140
4203
|
getScopeOfModuleReference(ref) {
|
|
4141
4204
|
if (this.cache.has(ref.node)) {
|
|
4142
|
-
|
|
4205
|
+
const cachedValue = this.cache.get(ref.node);
|
|
4206
|
+
if (cachedValue !== IN_PROGRESS_RESOLUTION) {
|
|
4207
|
+
return cachedValue;
|
|
4208
|
+
}
|
|
4143
4209
|
}
|
|
4210
|
+
this.cache.set(ref.node, IN_PROGRESS_RESOLUTION);
|
|
4144
4211
|
this.sealed = true;
|
|
4145
4212
|
const ngModule = this.localReader.getNgModuleMetadata(ref);
|
|
4146
4213
|
if (ngModule === null) {
|
|
@@ -4160,10 +4227,12 @@ var LocalModuleScopeRegistry = class {
|
|
|
4160
4227
|
for (const decl of ngModule.imports) {
|
|
4161
4228
|
const importScope = this.getExportedScope(decl, diagnostics, ref.node, "import");
|
|
4162
4229
|
if (importScope !== null) {
|
|
4163
|
-
if (importScope === "invalid" || importScope.exported.isPoisoned) {
|
|
4164
|
-
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawImports, "import"));
|
|
4230
|
+
if (importScope === "invalid" || importScope === "cycle" || importScope.exported.isPoisoned) {
|
|
4165
4231
|
isPoisoned = true;
|
|
4166
|
-
if (importScope
|
|
4232
|
+
if (importScope !== "cycle") {
|
|
4233
|
+
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawImports, "import"));
|
|
4234
|
+
}
|
|
4235
|
+
if (importScope === "invalid" || importScope === "cycle") {
|
|
4167
4236
|
continue;
|
|
4168
4237
|
}
|
|
4169
4238
|
}
|
|
@@ -4230,10 +4299,12 @@ var LocalModuleScopeRegistry = class {
|
|
|
4230
4299
|
}
|
|
4231
4300
|
for (const decl of ngModule.exports) {
|
|
4232
4301
|
const exportScope = this.getExportedScope(decl, diagnostics, ref.node, "export");
|
|
4233
|
-
if (exportScope === "invalid" || exportScope !== null && exportScope.exported.isPoisoned) {
|
|
4234
|
-
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawExports, "export"));
|
|
4302
|
+
if (exportScope === "invalid" || exportScope === "cycle" || exportScope !== null && exportScope.exported.isPoisoned) {
|
|
4235
4303
|
isPoisoned = true;
|
|
4236
|
-
if (exportScope
|
|
4304
|
+
if (exportScope !== "cycle") {
|
|
4305
|
+
diagnostics.push(invalidTransitiveNgModuleRef(decl, ngModule.rawExports, "export"));
|
|
4306
|
+
}
|
|
4307
|
+
if (exportScope === "invalid" || exportScope === "cycle") {
|
|
4237
4308
|
continue;
|
|
4238
4309
|
}
|
|
4239
4310
|
} else if (exportScope !== null) {
|
|
@@ -4301,6 +4372,10 @@ var LocalModuleScopeRegistry = class {
|
|
|
4301
4372
|
}
|
|
4302
4373
|
return this.dependencyScopeReader.resolve(ref);
|
|
4303
4374
|
} else {
|
|
4375
|
+
if (this.cache.get(ref.node) === IN_PROGRESS_RESOLUTION) {
|
|
4376
|
+
diagnostics.push(makeDiagnostic(type === "import" ? ErrorCode.NGMODULE_INVALID_IMPORT : ErrorCode.NGMODULE_INVALID_EXPORT, identifierOfNode(ref.node) || ref.node, `NgModule "${type}" field contains a cycle`));
|
|
4377
|
+
return "cycle";
|
|
4378
|
+
}
|
|
4304
4379
|
return this.getScopeOfModuleReference(ref);
|
|
4305
4380
|
}
|
|
4306
4381
|
}
|
|
@@ -4407,16 +4482,19 @@ function reexportCollision(module, refA, refB) {
|
|
|
4407
4482
|
]);
|
|
4408
4483
|
}
|
|
4409
4484
|
|
|
4410
|
-
// bazel-out/
|
|
4485
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
|
|
4411
4486
|
import { CssSelector, SelectorMatcher } from "@angular/compiler";
|
|
4412
4487
|
import ts18 from "typescript";
|
|
4413
4488
|
var TypeCheckScopeRegistry = class {
|
|
4489
|
+
scopeReader;
|
|
4490
|
+
metaReader;
|
|
4491
|
+
hostDirectivesResolver;
|
|
4492
|
+
flattenedDirectiveMetaCache = /* @__PURE__ */ new Map();
|
|
4493
|
+
scopeCache = /* @__PURE__ */ new Map();
|
|
4414
4494
|
constructor(scopeReader, metaReader, hostDirectivesResolver) {
|
|
4415
4495
|
this.scopeReader = scopeReader;
|
|
4416
4496
|
this.metaReader = metaReader;
|
|
4417
4497
|
this.hostDirectivesResolver = hostDirectivesResolver;
|
|
4418
|
-
this.flattenedDirectiveMetaCache = /* @__PURE__ */ new Map();
|
|
4419
|
-
this.scopeCache = /* @__PURE__ */ new Map();
|
|
4420
4498
|
}
|
|
4421
4499
|
getTypeCheckScope(node) {
|
|
4422
4500
|
const matcher = new SelectorMatcher();
|
|
@@ -4488,14 +4566,14 @@ var TypeCheckScopeRegistry = class {
|
|
|
4488
4566
|
}
|
|
4489
4567
|
};
|
|
4490
4568
|
|
|
4491
|
-
// bazel-out/
|
|
4569
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
4492
4570
|
import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, FactoryTarget, makeBindingParser, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
|
|
4493
4571
|
|
|
4494
|
-
// bazel-out/
|
|
4572
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
|
|
4495
4573
|
import { createMayBeForwardRefExpression as createMayBeForwardRefExpression2, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr4, getSafePropertyAccessString, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
|
|
4496
4574
|
import ts22 from "typescript";
|
|
4497
4575
|
|
|
4498
|
-
// bazel-out/
|
|
4576
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_function_access.mjs
|
|
4499
4577
|
function validateAccessOfInitializerApiMember({ api, call }, member) {
|
|
4500
4578
|
if (!api.allowedAccessLevels.includes(member.accessLevel)) {
|
|
4501
4579
|
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)}.`, [
|
|
@@ -4504,7 +4582,7 @@ function validateAccessOfInitializerApiMember({ api, call }, member) {
|
|
|
4504
4582
|
}
|
|
4505
4583
|
}
|
|
4506
4584
|
|
|
4507
|
-
// bazel-out/
|
|
4585
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/initializer_functions.mjs
|
|
4508
4586
|
import ts19 from "typescript";
|
|
4509
4587
|
function tryParseInitializerApi(functions, expression, reflector, importTracker) {
|
|
4510
4588
|
if (!ts19.isCallExpression(expression)) {
|
|
@@ -4573,7 +4651,7 @@ function parseTopLevelCallFromNamespace(call, functions, importTracker) {
|
|
|
4573
4651
|
return { api: matchingApi, apiReference, isRequired };
|
|
4574
4652
|
}
|
|
4575
4653
|
|
|
4576
|
-
// bazel-out/
|
|
4654
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_output_parse_options.mjs
|
|
4577
4655
|
import ts20 from "typescript";
|
|
4578
4656
|
function parseAndValidateInputAndOutputOptions(optionsNode) {
|
|
4579
4657
|
if (!ts20.isObjectLiteralExpression(optionsNode)) {
|
|
@@ -4591,7 +4669,7 @@ function parseAndValidateInputAndOutputOptions(optionsNode) {
|
|
|
4591
4669
|
return { alias };
|
|
4592
4670
|
}
|
|
4593
4671
|
|
|
4594
|
-
// bazel-out/
|
|
4672
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/input_function.mjs
|
|
4595
4673
|
var INPUT_INITIALIZER_FN = {
|
|
4596
4674
|
functionName: "input",
|
|
4597
4675
|
owningModule: "@angular/core",
|
|
@@ -4623,7 +4701,7 @@ function tryParseSignalInputMapping(member, reflector, importTracker) {
|
|
|
4623
4701
|
};
|
|
4624
4702
|
}
|
|
4625
4703
|
|
|
4626
|
-
// bazel-out/
|
|
4704
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/model_function.mjs
|
|
4627
4705
|
var MODEL_INITIALIZER_FN = {
|
|
4628
4706
|
functionName: "model",
|
|
4629
4707
|
owningModule: "@angular/core",
|
|
@@ -4664,7 +4742,7 @@ function tryParseSignalModelMapping(member, reflector, importTracker) {
|
|
|
4664
4742
|
};
|
|
4665
4743
|
}
|
|
4666
4744
|
|
|
4667
|
-
// bazel-out/
|
|
4745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/output_function.mjs
|
|
4668
4746
|
var allowedAccessLevels = [
|
|
4669
4747
|
ClassMemberAccessLevel.PublicWritable,
|
|
4670
4748
|
ClassMemberAccessLevel.PublicReadonly,
|
|
@@ -4708,7 +4786,7 @@ function tryParseInitializerBasedOutput(member, reflector, importTracker) {
|
|
|
4708
4786
|
};
|
|
4709
4787
|
}
|
|
4710
4788
|
|
|
4711
|
-
// bazel-out/
|
|
4789
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/query_functions.mjs
|
|
4712
4790
|
import { createMayBeForwardRefExpression, outputAst as o } from "@angular/compiler";
|
|
4713
4791
|
import ts21 from "typescript";
|
|
4714
4792
|
var queryFunctionNames = [
|
|
@@ -4793,7 +4871,7 @@ function parseDescendantsOption(value) {
|
|
|
4793
4871
|
throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, value, `Expected "descendants" option to be a boolean literal.`);
|
|
4794
4872
|
}
|
|
4795
4873
|
|
|
4796
|
-
// bazel-out/
|
|
4874
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
|
|
4797
4875
|
var EMPTY_OBJECT = {};
|
|
4798
4876
|
var queryDecoratorNames = [
|
|
4799
4877
|
"ViewChild",
|
|
@@ -4802,7 +4880,7 @@ var queryDecoratorNames = [
|
|
|
4802
4880
|
"ContentChildren"
|
|
4803
4881
|
];
|
|
4804
4882
|
var QUERY_TYPES = new Set(queryDecoratorNames);
|
|
4805
|
-
function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector, strictStandalone) {
|
|
4883
|
+
function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector, strictStandalone, implicitStandaloneValue) {
|
|
4806
4884
|
let directive;
|
|
4807
4885
|
if (decorator.args === null || decorator.args.length === 0) {
|
|
4808
4886
|
directive = /* @__PURE__ */ new Map();
|
|
@@ -4869,7 +4947,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
|
|
|
4869
4947
|
const rawCtorDeps = getConstructorDependencies(clazz, reflector, isCore);
|
|
4870
4948
|
const ctorDeps = selector !== null ? validateConstructorDependencies(clazz, rawCtorDeps) : unwrapConstructorDependencies(rawCtorDeps);
|
|
4871
4949
|
const isStructural = ctorDeps !== null && ctorDeps !== "invalid" && ctorDeps.some((dep) => dep.token instanceof ExternalExpr4 && dep.token.value.moduleName === "@angular/core" && dep.token.value.name === "TemplateRef");
|
|
4872
|
-
let isStandalone =
|
|
4950
|
+
let isStandalone = implicitStandaloneValue;
|
|
4873
4951
|
if (directive.has("standalone")) {
|
|
4874
4952
|
const expr = directive.get("standalone");
|
|
4875
4953
|
const resolved = evaluator.evaluate(expr);
|
|
@@ -5598,8 +5676,15 @@ function toR3InputMetadata(mapping) {
|
|
|
5598
5676
|
};
|
|
5599
5677
|
}
|
|
5600
5678
|
|
|
5601
|
-
// bazel-out/
|
|
5679
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/symbol.mjs
|
|
5602
5680
|
var DirectiveSymbol = class extends SemanticSymbol {
|
|
5681
|
+
selector;
|
|
5682
|
+
inputs;
|
|
5683
|
+
outputs;
|
|
5684
|
+
exportAs;
|
|
5685
|
+
typeCheckMeta;
|
|
5686
|
+
typeParameters;
|
|
5687
|
+
baseClass = null;
|
|
5603
5688
|
constructor(decl, selector, inputs, outputs, exportAs, typeCheckMeta, typeParameters) {
|
|
5604
5689
|
super(decl);
|
|
5605
5690
|
this.selector = selector;
|
|
@@ -5608,7 +5693,6 @@ var DirectiveSymbol = class extends SemanticSymbol {
|
|
|
5608
5693
|
this.exportAs = exportAs;
|
|
5609
5694
|
this.typeCheckMeta = typeCheckMeta;
|
|
5610
5695
|
this.typeParameters = typeParameters;
|
|
5611
|
-
this.baseClass = null;
|
|
5612
5696
|
}
|
|
5613
5697
|
isPublicApiAffected(previousSymbol) {
|
|
5614
5698
|
if (!(previousSymbol instanceof DirectiveSymbol)) {
|
|
@@ -5678,7 +5762,7 @@ function isBaseClassEqual(current, previous) {
|
|
|
5678
5762
|
return isSymbolEqual(current, previous);
|
|
5679
5763
|
}
|
|
5680
5764
|
|
|
5681
|
-
// bazel-out/
|
|
5765
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/handler.mjs
|
|
5682
5766
|
var FIELD_DECORATORS = [
|
|
5683
5767
|
"Input",
|
|
5684
5768
|
"Output",
|
|
@@ -5700,7 +5784,26 @@ var LIFECYCLE_HOOKS = /* @__PURE__ */ new Set([
|
|
|
5700
5784
|
"ngAfterContentChecked"
|
|
5701
5785
|
]);
|
|
5702
5786
|
var DirectiveDecoratorHandler = class {
|
|
5703
|
-
|
|
5787
|
+
reflector;
|
|
5788
|
+
evaluator;
|
|
5789
|
+
metaRegistry;
|
|
5790
|
+
scopeRegistry;
|
|
5791
|
+
metaReader;
|
|
5792
|
+
injectableRegistry;
|
|
5793
|
+
refEmitter;
|
|
5794
|
+
referencesRegistry;
|
|
5795
|
+
isCore;
|
|
5796
|
+
strictCtorDeps;
|
|
5797
|
+
semanticDepGraphUpdater;
|
|
5798
|
+
annotateForClosureCompiler;
|
|
5799
|
+
perf;
|
|
5800
|
+
importTracker;
|
|
5801
|
+
includeClassMetadata;
|
|
5802
|
+
compilationMode;
|
|
5803
|
+
jitDeclarationRegistry;
|
|
5804
|
+
strictStandalone;
|
|
5805
|
+
implicitStandaloneValue;
|
|
5806
|
+
constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, annotateForClosureCompiler, perf, importTracker, includeClassMetadata, compilationMode, jitDeclarationRegistry, strictStandalone, implicitStandaloneValue) {
|
|
5704
5807
|
this.reflector = reflector;
|
|
5705
5808
|
this.evaluator = evaluator;
|
|
5706
5809
|
this.metaRegistry = metaRegistry;
|
|
@@ -5719,9 +5822,10 @@ var DirectiveDecoratorHandler = class {
|
|
|
5719
5822
|
this.compilationMode = compilationMode;
|
|
5720
5823
|
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
5721
5824
|
this.strictStandalone = strictStandalone;
|
|
5722
|
-
this.
|
|
5723
|
-
this.name = "DirectiveDecoratorHandler";
|
|
5825
|
+
this.implicitStandaloneValue = implicitStandaloneValue;
|
|
5724
5826
|
}
|
|
5827
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
5828
|
+
name = "DirectiveDecoratorHandler";
|
|
5725
5829
|
detect(node, decorators) {
|
|
5726
5830
|
if (!decorators) {
|
|
5727
5831
|
const angularField = this.findClassFieldWithAngularFeatures(node);
|
|
@@ -5752,7 +5856,8 @@ var DirectiveDecoratorHandler = class {
|
|
|
5752
5856
|
this.annotateForClosureCompiler,
|
|
5753
5857
|
this.compilationMode,
|
|
5754
5858
|
null,
|
|
5755
|
-
this.strictStandalone
|
|
5859
|
+
this.strictStandalone,
|
|
5860
|
+
this.implicitStandaloneValue
|
|
5756
5861
|
);
|
|
5757
5862
|
if (directiveResult.jitForced) {
|
|
5758
5863
|
this.jitDeclarationRegistry.jitDeclarations.add(node);
|
|
@@ -5877,11 +5982,11 @@ var DirectiveDecoratorHandler = class {
|
|
|
5877
5982
|
}
|
|
5878
5983
|
};
|
|
5879
5984
|
|
|
5880
|
-
// bazel-out/
|
|
5985
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
5881
5986
|
import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget2, FunctionExpr, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, R3Identifiers, R3NgModuleMetadataKind, R3SelectorScopeMode, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
|
|
5882
5987
|
import ts24 from "typescript";
|
|
5883
5988
|
|
|
5884
|
-
// bazel-out/
|
|
5989
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/module_with_providers.mjs
|
|
5885
5990
|
import ts23 from "typescript";
|
|
5886
5991
|
function createModuleWithProvidersResolver(reflector, isCore) {
|
|
5887
5992
|
function _reflectModuleFromTypeParam(type, node) {
|
|
@@ -5953,13 +6058,14 @@ function isResolvedModuleWithProviders(sv) {
|
|
|
5953
6058
|
return typeof sv.value === "object" && sv.value != null && sv.value.hasOwnProperty("ngModule") && sv.value.hasOwnProperty("mwpCall");
|
|
5954
6059
|
}
|
|
5955
6060
|
|
|
5956
|
-
// bazel-out/
|
|
6061
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/ng_module/src/handler.mjs
|
|
5957
6062
|
var NgModuleSymbol = class extends SemanticSymbol {
|
|
6063
|
+
hasProviders;
|
|
6064
|
+
remotelyScopedComponents = [];
|
|
6065
|
+
transitiveImportsFromStandaloneComponents = /* @__PURE__ */ new Set();
|
|
5958
6066
|
constructor(decl, hasProviders) {
|
|
5959
6067
|
super(decl);
|
|
5960
6068
|
this.hasProviders = hasProviders;
|
|
5961
|
-
this.remotelyScopedComponents = [];
|
|
5962
|
-
this.transitiveImportsFromStandaloneComponents = /* @__PURE__ */ new Set();
|
|
5963
6069
|
}
|
|
5964
6070
|
isPublicApiAffected(previousSymbol) {
|
|
5965
6071
|
if (!(previousSymbol instanceof NgModuleSymbol)) {
|
|
@@ -6020,6 +6126,25 @@ var NgModuleSymbol = class extends SemanticSymbol {
|
|
|
6020
6126
|
}
|
|
6021
6127
|
};
|
|
6022
6128
|
var NgModuleDecoratorHandler = class {
|
|
6129
|
+
reflector;
|
|
6130
|
+
evaluator;
|
|
6131
|
+
metaReader;
|
|
6132
|
+
metaRegistry;
|
|
6133
|
+
scopeRegistry;
|
|
6134
|
+
referencesRegistry;
|
|
6135
|
+
exportedProviderStatusResolver;
|
|
6136
|
+
semanticDepGraphUpdater;
|
|
6137
|
+
isCore;
|
|
6138
|
+
refEmitter;
|
|
6139
|
+
annotateForClosureCompiler;
|
|
6140
|
+
onlyPublishPublicTypings;
|
|
6141
|
+
injectableRegistry;
|
|
6142
|
+
perf;
|
|
6143
|
+
includeClassMetadata;
|
|
6144
|
+
includeSelectorScope;
|
|
6145
|
+
compilationMode;
|
|
6146
|
+
localCompilationExtraImportsTracker;
|
|
6147
|
+
jitDeclarationRegistry;
|
|
6023
6148
|
constructor(reflector, evaluator, metaReader, metaRegistry, scopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, annotateForClosureCompiler, onlyPublishPublicTypings, injectableRegistry, perf, includeClassMetadata, includeSelectorScope, compilationMode, localCompilationExtraImportsTracker, jitDeclarationRegistry) {
|
|
6024
6149
|
this.reflector = reflector;
|
|
6025
6150
|
this.evaluator = evaluator;
|
|
@@ -6040,9 +6165,9 @@ var NgModuleDecoratorHandler = class {
|
|
|
6040
6165
|
this.compilationMode = compilationMode;
|
|
6041
6166
|
this.localCompilationExtraImportsTracker = localCompilationExtraImportsTracker;
|
|
6042
6167
|
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
6043
|
-
this.precedence = HandlerPrecedence.PRIMARY;
|
|
6044
|
-
this.name = "NgModuleDecoratorHandler";
|
|
6045
6168
|
}
|
|
6169
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
6170
|
+
name = "NgModuleDecoratorHandler";
|
|
6046
6171
|
detect(node, decorators) {
|
|
6047
6172
|
if (!decorators) {
|
|
6048
6173
|
return void 0;
|
|
@@ -6572,12 +6697,12 @@ function isSyntheticReference(ref) {
|
|
|
6572
6697
|
return ref.synthetic;
|
|
6573
6698
|
}
|
|
6574
6699
|
|
|
6575
|
-
// bazel-out/
|
|
6700
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
|
|
6576
6701
|
function makeCyclicImportInfo(ref, type, cycle) {
|
|
6577
6702
|
const name = ref.debugName || "(unknown)";
|
|
6578
|
-
const
|
|
6703
|
+
const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
|
|
6579
6704
|
const message = `The ${type} '${name}' is used in the template but importing it would create a cycle: `;
|
|
6580
|
-
return makeRelatedInformation(ref.node, message +
|
|
6705
|
+
return makeRelatedInformation(ref.node, message + path);
|
|
6581
6706
|
}
|
|
6582
6707
|
function checkCustomElementSelectorForErrors(selector) {
|
|
6583
6708
|
if (selector.includes(".") || selector.includes("[") && selector.includes("]")) {
|
|
@@ -6595,7 +6720,7 @@ function checkCustomElementSelectorForErrors(selector) {
|
|
|
6595
6720
|
return null;
|
|
6596
6721
|
}
|
|
6597
6722
|
|
|
6598
|
-
// bazel-out/
|
|
6723
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/resources.mjs
|
|
6599
6724
|
import { DEFAULT_INTERPOLATION_CONFIG, InterpolationConfig, ParseSourceFile as ParseSourceFile2, parseTemplate } from "@angular/compiler";
|
|
6600
6725
|
import ts25 from "typescript";
|
|
6601
6726
|
function getTemplateDeclarationNodeForError(declaration) {
|
|
@@ -6762,7 +6887,8 @@ function preloadAndParseTemplate(evaluator, resourceLoader, depTracker, preanaly
|
|
|
6762
6887
|
const resourceUrl = resourceLoader.resolve(templateUrl, containingFile);
|
|
6763
6888
|
const templatePromise = resourceLoader.preload(resourceUrl, {
|
|
6764
6889
|
type: "template",
|
|
6765
|
-
containingFile
|
|
6890
|
+
containingFile,
|
|
6891
|
+
className: node.name.text
|
|
6766
6892
|
});
|
|
6767
6893
|
if (templatePromise !== void 0) {
|
|
6768
6894
|
return templatePromise.then(() => {
|
|
@@ -6932,14 +7058,11 @@ function _extractTemplateStyleUrls(template) {
|
|
|
6932
7058
|
}));
|
|
6933
7059
|
}
|
|
6934
7060
|
|
|
6935
|
-
// bazel-out/
|
|
7061
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/symbol.mjs
|
|
6936
7062
|
var ComponentSymbol = class extends DirectiveSymbol {
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
this.usedPipes = [];
|
|
6941
|
-
this.isRemotelyScoped = false;
|
|
6942
|
-
}
|
|
7063
|
+
usedDirectives = [];
|
|
7064
|
+
usedPipes = [];
|
|
7065
|
+
isRemotelyScoped = false;
|
|
6943
7066
|
isEmitAffected(previousSymbol, publicApiAffected) {
|
|
6944
7067
|
if (!(previousSymbol instanceof ComponentSymbol)) {
|
|
6945
7068
|
return true;
|
|
@@ -6967,7 +7090,7 @@ var ComponentSymbol = class extends DirectiveSymbol {
|
|
|
6967
7090
|
}
|
|
6968
7091
|
};
|
|
6969
7092
|
|
|
6970
|
-
// bazel-out/
|
|
7093
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/util.mjs
|
|
6971
7094
|
function collectAnimationNames(value, animationTriggerNames) {
|
|
6972
7095
|
if (value instanceof Map) {
|
|
6973
7096
|
const name = value.get("name");
|
|
@@ -7044,10 +7167,10 @@ function isLikelyModuleWithProviders(value) {
|
|
|
7044
7167
|
return false;
|
|
7045
7168
|
}
|
|
7046
7169
|
|
|
7047
|
-
// bazel-out/
|
|
7170
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
7048
7171
|
import { CssSelector as CssSelector3, DomElementSchemaRegistry as DomElementSchemaRegistry2, ExternalExpr as ExternalExpr7, WrappedNodeExpr as WrappedNodeExpr9 } from "@angular/compiler";
|
|
7049
7172
|
|
|
7050
|
-
// bazel-out/
|
|
7173
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
|
|
7051
7174
|
var NgOriginalFile = Symbol("NgOriginalFile");
|
|
7052
7175
|
var UpdateMode;
|
|
7053
7176
|
(function(UpdateMode2) {
|
|
@@ -7055,13 +7178,13 @@ var UpdateMode;
|
|
|
7055
7178
|
UpdateMode2[UpdateMode2["Incremental"] = 1] = "Incremental";
|
|
7056
7179
|
})(UpdateMode || (UpdateMode = {}));
|
|
7057
7180
|
|
|
7058
|
-
// bazel-out/
|
|
7181
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
7059
7182
|
import ts27 from "typescript";
|
|
7060
7183
|
|
|
7061
|
-
// bazel-out/
|
|
7184
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
|
|
7062
7185
|
import ts26 from "typescript";
|
|
7063
7186
|
|
|
7064
|
-
// bazel-out/
|
|
7187
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
|
|
7065
7188
|
var NgExtension = Symbol("NgExtension");
|
|
7066
7189
|
function isExtended(sf) {
|
|
7067
7190
|
return sf[NgExtension] !== void 0;
|
|
@@ -7121,22 +7244,24 @@ function retagTsFile(sf) {
|
|
|
7121
7244
|
}
|
|
7122
7245
|
}
|
|
7123
7246
|
|
|
7124
|
-
// bazel-out/
|
|
7247
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
|
|
7125
7248
|
var TS_EXTENSIONS = /\.tsx?$/i;
|
|
7126
7249
|
function makeShimFileName(fileName, suffix) {
|
|
7127
7250
|
return absoluteFrom(fileName.replace(TS_EXTENSIONS, suffix));
|
|
7128
7251
|
}
|
|
7129
7252
|
|
|
7130
|
-
// bazel-out/
|
|
7253
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
|
|
7131
7254
|
var ShimAdapter = class {
|
|
7255
|
+
delegate;
|
|
7256
|
+
shims = /* @__PURE__ */ new Map();
|
|
7257
|
+
priorShims = /* @__PURE__ */ new Map();
|
|
7258
|
+
notShims = /* @__PURE__ */ new Set();
|
|
7259
|
+
generators = [];
|
|
7260
|
+
ignoreForEmit = /* @__PURE__ */ new Set();
|
|
7261
|
+
extraInputFiles;
|
|
7262
|
+
extensionPrefixes = [];
|
|
7132
7263
|
constructor(delegate, tsRootFiles, topLevelGenerators, perFileGenerators, oldProgram) {
|
|
7133
7264
|
this.delegate = delegate;
|
|
7134
|
-
this.shims = /* @__PURE__ */ new Map();
|
|
7135
|
-
this.priorShims = /* @__PURE__ */ new Map();
|
|
7136
|
-
this.notShims = /* @__PURE__ */ new Set();
|
|
7137
|
-
this.generators = [];
|
|
7138
|
-
this.ignoreForEmit = /* @__PURE__ */ new Set();
|
|
7139
|
-
this.extensionPrefixes = [];
|
|
7140
7265
|
for (const gen of perFileGenerators) {
|
|
7141
7266
|
const pattern = `^(.*)\\.${gen.extensionPrefix}\\.ts$`;
|
|
7142
7267
|
const regexp = new RegExp(pattern, "i");
|
|
@@ -7222,11 +7347,12 @@ var ShimAdapter = class {
|
|
|
7222
7347
|
}
|
|
7223
7348
|
};
|
|
7224
7349
|
|
|
7225
|
-
// bazel-out/
|
|
7350
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
|
|
7226
7351
|
var ShimReferenceTagger = class {
|
|
7352
|
+
suffixes;
|
|
7353
|
+
tagged = /* @__PURE__ */ new Set();
|
|
7354
|
+
enabled = true;
|
|
7227
7355
|
constructor(shimExtensions) {
|
|
7228
|
-
this.tagged = /* @__PURE__ */ new Set();
|
|
7229
|
-
this.enabled = true;
|
|
7230
7356
|
this.suffixes = shimExtensions.map((extension) => `.${extension}.ts`);
|
|
7231
7357
|
}
|
|
7232
7358
|
tag(sf) {
|
|
@@ -7256,8 +7382,32 @@ var ShimReferenceTagger = class {
|
|
|
7256
7382
|
}
|
|
7257
7383
|
};
|
|
7258
7384
|
|
|
7259
|
-
// bazel-out/
|
|
7385
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
7260
7386
|
var DelegatingCompilerHost = class {
|
|
7387
|
+
delegate;
|
|
7388
|
+
createHash;
|
|
7389
|
+
directoryExists;
|
|
7390
|
+
getCancellationToken;
|
|
7391
|
+
getCanonicalFileName;
|
|
7392
|
+
getCurrentDirectory;
|
|
7393
|
+
getDefaultLibFileName;
|
|
7394
|
+
getDefaultLibLocation;
|
|
7395
|
+
getDirectories;
|
|
7396
|
+
getEnvironmentVariable;
|
|
7397
|
+
getNewLine;
|
|
7398
|
+
getParsedCommandLine;
|
|
7399
|
+
getSourceFileByPath;
|
|
7400
|
+
readDirectory;
|
|
7401
|
+
readFile;
|
|
7402
|
+
realpath;
|
|
7403
|
+
resolveModuleNames;
|
|
7404
|
+
resolveTypeReferenceDirectives;
|
|
7405
|
+
trace;
|
|
7406
|
+
useCaseSensitiveFileNames;
|
|
7407
|
+
getModuleResolutionCache;
|
|
7408
|
+
hasInvalidatedResolutions;
|
|
7409
|
+
resolveModuleNameLiterals;
|
|
7410
|
+
resolveTypeReferenceDirectiveReferences;
|
|
7261
7411
|
get jsDocParsingMode() {
|
|
7262
7412
|
return this.delegate.jsDocParsingMode;
|
|
7263
7413
|
}
|
|
@@ -7295,6 +7445,10 @@ var DelegatingCompilerHost = class {
|
|
|
7295
7445
|
}
|
|
7296
7446
|
};
|
|
7297
7447
|
var UpdatedProgramHost = class extends DelegatingCompilerHost {
|
|
7448
|
+
originalProgram;
|
|
7449
|
+
shimExtensionPrefixes;
|
|
7450
|
+
sfMap;
|
|
7451
|
+
shimTagger;
|
|
7298
7452
|
constructor(sfMap, originalProgram, delegate, shimExtensionPrefixes) {
|
|
7299
7453
|
super(delegate);
|
|
7300
7454
|
this.originalProgram = originalProgram;
|
|
@@ -7332,15 +7486,20 @@ var UpdatedProgramHost = class extends DelegatingCompilerHost {
|
|
|
7332
7486
|
}
|
|
7333
7487
|
};
|
|
7334
7488
|
var TsCreateProgramDriver = class {
|
|
7489
|
+
originalProgram;
|
|
7490
|
+
originalHost;
|
|
7491
|
+
options;
|
|
7492
|
+
shimExtensionPrefixes;
|
|
7493
|
+
sfMap = /* @__PURE__ */ new Map();
|
|
7494
|
+
program;
|
|
7335
7495
|
constructor(originalProgram, originalHost, options, shimExtensionPrefixes) {
|
|
7336
7496
|
this.originalProgram = originalProgram;
|
|
7337
7497
|
this.originalHost = originalHost;
|
|
7338
7498
|
this.options = options;
|
|
7339
7499
|
this.shimExtensionPrefixes = shimExtensionPrefixes;
|
|
7340
|
-
this.sfMap = /* @__PURE__ */ new Map();
|
|
7341
|
-
this.supportsInlineOperations = true;
|
|
7342
7500
|
this.program = this.originalProgram;
|
|
7343
7501
|
}
|
|
7502
|
+
supportsInlineOperations = true;
|
|
7344
7503
|
getProgram() {
|
|
7345
7504
|
return this.program;
|
|
7346
7505
|
}
|
|
@@ -7374,7 +7533,7 @@ var TsCreateProgramDriver = class {
|
|
|
7374
7533
|
}
|
|
7375
7534
|
};
|
|
7376
7535
|
|
|
7377
|
-
// bazel-out/
|
|
7536
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
|
|
7378
7537
|
import ts28 from "typescript";
|
|
7379
7538
|
function makeTemplateDiagnostic(templateId, mapping, span, category, code, messageText, relatedMessages) {
|
|
7380
7539
|
var _a;
|
|
@@ -7485,7 +7644,7 @@ function parseTemplateAsSourceFile(fileName, template) {
|
|
|
7485
7644
|
);
|
|
7486
7645
|
}
|
|
7487
7646
|
|
|
7488
|
-
// bazel-out/
|
|
7647
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
|
|
7489
7648
|
var TEMPLATE_ID = Symbol("ngTemplateId");
|
|
7490
7649
|
var NEXT_TEMPLATE_ID = Symbol("ngNextTemplateId");
|
|
7491
7650
|
function getTemplateId(clazz) {
|
|
@@ -7502,11 +7661,11 @@ function allocateTemplateId(sf) {
|
|
|
7502
7661
|
return `tcb${sf[NEXT_TEMPLATE_ID]++}`;
|
|
7503
7662
|
}
|
|
7504
7663
|
|
|
7505
|
-
// bazel-out/
|
|
7664
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
7506
7665
|
import { EmptyExpr, ImplicitReceiver, PropertyRead, PropertyWrite, SafePropertyRead, TmplAstLetDeclaration, TmplAstReference, TmplAstTextAttribute } from "@angular/compiler";
|
|
7507
7666
|
import ts30 from "typescript";
|
|
7508
7667
|
|
|
7509
|
-
// bazel-out/
|
|
7668
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
|
|
7510
7669
|
import { AbsoluteSourceSpan } from "@angular/compiler";
|
|
7511
7670
|
import ts29 from "typescript";
|
|
7512
7671
|
var parseSpanComment = /^(\d+),(\d+)$/;
|
|
@@ -7637,15 +7796,20 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
|
|
|
7637
7796
|
}) || false;
|
|
7638
7797
|
}
|
|
7639
7798
|
|
|
7640
|
-
// bazel-out/
|
|
7799
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
7641
7800
|
var CompletionEngine = class {
|
|
7801
|
+
tcb;
|
|
7802
|
+
data;
|
|
7803
|
+
tcbPath;
|
|
7804
|
+
tcbIsShim;
|
|
7805
|
+
componentContext;
|
|
7806
|
+
templateContextCache = /* @__PURE__ */ new Map();
|
|
7807
|
+
expressionCompletionCache = /* @__PURE__ */ new Map();
|
|
7642
7808
|
constructor(tcb, data, tcbPath, tcbIsShim) {
|
|
7643
7809
|
this.tcb = tcb;
|
|
7644
7810
|
this.data = data;
|
|
7645
7811
|
this.tcbPath = tcbPath;
|
|
7646
7812
|
this.tcbIsShim = tcbIsShim;
|
|
7647
|
-
this.templateContextCache = /* @__PURE__ */ new Map();
|
|
7648
|
-
this.expressionCompletionCache = /* @__PURE__ */ new Map();
|
|
7649
7813
|
const globalRead = findFirstMatchingNode(this.tcb, {
|
|
7650
7814
|
filter: ts30.isPropertyAccessExpression,
|
|
7651
7815
|
withExpressionIdentifier: ExpressionIdentifier.COMPONENT_COMPLETION
|
|
@@ -8827,21 +8991,22 @@ var MagicString = class {
|
|
|
8827
8991
|
}
|
|
8828
8992
|
};
|
|
8829
8993
|
|
|
8830
|
-
// bazel-out/
|
|
8994
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
8831
8995
|
import ts43 from "typescript";
|
|
8832
8996
|
|
|
8833
|
-
// bazel-out/
|
|
8997
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
|
|
8834
8998
|
import { DomElementSchemaRegistry } from "@angular/compiler";
|
|
8835
8999
|
import ts31 from "typescript";
|
|
8836
9000
|
var REGISTRY = new DomElementSchemaRegistry();
|
|
8837
9001
|
var REMOVE_XHTML_REGEX = /^:xhtml:/;
|
|
8838
9002
|
var RegistryDomSchemaChecker = class {
|
|
9003
|
+
resolver;
|
|
9004
|
+
_diagnostics = [];
|
|
8839
9005
|
get diagnostics() {
|
|
8840
9006
|
return this._diagnostics;
|
|
8841
9007
|
}
|
|
8842
9008
|
constructor(resolver) {
|
|
8843
9009
|
this.resolver = resolver;
|
|
8844
|
-
this._diagnostics = [];
|
|
8845
9010
|
}
|
|
8846
9011
|
checkElement(id, element, schemas, hostIsStandalone) {
|
|
8847
9012
|
const name = element.name.replace(REMOVE_XHTML_REGEX, "");
|
|
@@ -8883,12 +9048,16 @@ var RegistryDomSchemaChecker = class {
|
|
|
8883
9048
|
}
|
|
8884
9049
|
};
|
|
8885
9050
|
|
|
8886
|
-
// bazel-out/
|
|
9051
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
8887
9052
|
import ts36 from "typescript";
|
|
8888
9053
|
|
|
8889
|
-
// bazel-out/
|
|
9054
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/reference_emit_environment.mjs
|
|
8890
9055
|
import { ExpressionType, ExternalExpr as ExternalExpr6, TypeModifier } from "@angular/compiler";
|
|
8891
9056
|
var ReferenceEmitEnvironment = class {
|
|
9057
|
+
importManager;
|
|
9058
|
+
refEmitter;
|
|
9059
|
+
reflector;
|
|
9060
|
+
contextFile;
|
|
8892
9061
|
constructor(importManager, refEmitter, reflector, contextFile) {
|
|
8893
9062
|
this.importManager = importManager;
|
|
8894
9063
|
this.refEmitter = refEmitter;
|
|
@@ -8917,7 +9086,7 @@ var ReferenceEmitEnvironment = class {
|
|
|
8917
9086
|
}
|
|
8918
9087
|
};
|
|
8919
9088
|
|
|
8920
|
-
// bazel-out/
|
|
9089
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
|
|
8921
9090
|
import ts32 from "typescript";
|
|
8922
9091
|
var SAFE_TO_CAST_WITHOUT_PARENS = /* @__PURE__ */ new Set([
|
|
8923
9092
|
ts32.SyntaxKind.ParenthesizedExpression,
|
|
@@ -9000,17 +9169,19 @@ function tsNumericExpression(value) {
|
|
|
9000
9169
|
return ts32.factory.createNumericLiteral(value);
|
|
9001
9170
|
}
|
|
9002
9171
|
|
|
9003
|
-
// bazel-out/
|
|
9172
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
9004
9173
|
import { ExpressionType as ExpressionType2, R3Identifiers as R3Identifiers3, WrappedNodeExpr as WrappedNodeExpr8 } from "@angular/compiler";
|
|
9005
9174
|
import ts35 from "typescript";
|
|
9006
9175
|
|
|
9007
|
-
// bazel-out/
|
|
9176
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
9008
9177
|
import { R3Identifiers as R3Identifiers2 } from "@angular/compiler";
|
|
9009
9178
|
import ts34 from "typescript";
|
|
9010
9179
|
|
|
9011
|
-
// bazel-out/
|
|
9180
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
|
|
9012
9181
|
import ts33 from "typescript";
|
|
9013
9182
|
var TypeParameterEmitter = class {
|
|
9183
|
+
typeParameters;
|
|
9184
|
+
reflector;
|
|
9014
9185
|
constructor(typeParameters, reflector) {
|
|
9015
9186
|
this.typeParameters = typeParameters;
|
|
9016
9187
|
this.reflector = reflector;
|
|
@@ -9086,7 +9257,7 @@ var TypeParameterEmitter = class {
|
|
|
9086
9257
|
}
|
|
9087
9258
|
};
|
|
9088
9259
|
|
|
9089
|
-
// bazel-out/
|
|
9260
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
9090
9261
|
var TCB_FILE_IMPORT_GRAPH_PREPARE_IDENTIFIERS = [
|
|
9091
9262
|
R3Identifiers2.InputSignalBrandWriteType
|
|
9092
9263
|
];
|
|
@@ -9178,7 +9349,7 @@ function checkIfGenericTypeBoundsCanBeEmitted(node, reflector, env) {
|
|
|
9178
9349
|
return emitter.canEmit((ref) => env.canReferenceType(ref));
|
|
9179
9350
|
}
|
|
9180
9351
|
|
|
9181
|
-
// bazel-out/
|
|
9352
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
9182
9353
|
function generateTypeCtorDeclarationFn(env, meta, nodeTypeRef, typeParams) {
|
|
9183
9354
|
const rawTypeArgs = typeParams !== void 0 ? generateGenericArgs(typeParams) : void 0;
|
|
9184
9355
|
const rawType = ts35.factory.createTypeReferenceNode(nodeTypeRef, rawTypeArgs);
|
|
@@ -9301,19 +9472,20 @@ function typeParametersWithDefaultTypes(params) {
|
|
|
9301
9472
|
});
|
|
9302
9473
|
}
|
|
9303
9474
|
|
|
9304
|
-
// bazel-out/
|
|
9475
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
9305
9476
|
var Environment = class extends ReferenceEmitEnvironment {
|
|
9477
|
+
config;
|
|
9478
|
+
nextIds = {
|
|
9479
|
+
pipeInst: 1,
|
|
9480
|
+
typeCtor: 1
|
|
9481
|
+
};
|
|
9482
|
+
typeCtors = /* @__PURE__ */ new Map();
|
|
9483
|
+
typeCtorStatements = [];
|
|
9484
|
+
pipeInsts = /* @__PURE__ */ new Map();
|
|
9485
|
+
pipeInstStatements = [];
|
|
9306
9486
|
constructor(config, importManager, refEmitter, reflector, contextFile) {
|
|
9307
9487
|
super(importManager, refEmitter, reflector, contextFile);
|
|
9308
9488
|
this.config = config;
|
|
9309
|
-
this.nextIds = {
|
|
9310
|
-
pipeInst: 1,
|
|
9311
|
-
typeCtor: 1
|
|
9312
|
-
};
|
|
9313
|
-
this.typeCtors = /* @__PURE__ */ new Map();
|
|
9314
|
-
this.typeCtorStatements = [];
|
|
9315
|
-
this.pipeInsts = /* @__PURE__ */ new Map();
|
|
9316
|
-
this.pipeInstStatements = [];
|
|
9317
9489
|
}
|
|
9318
9490
|
typeCtorFor(dir) {
|
|
9319
9491
|
const dirRef = dir.ref;
|
|
@@ -9373,14 +9545,15 @@ var Environment = class extends ReferenceEmitEnvironment {
|
|
|
9373
9545
|
}
|
|
9374
9546
|
};
|
|
9375
9547
|
|
|
9376
|
-
// bazel-out/
|
|
9548
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
|
|
9377
9549
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan2, TmplAstElement } from "@angular/compiler";
|
|
9378
9550
|
import ts37 from "typescript";
|
|
9379
9551
|
var OutOfBandDiagnosticRecorderImpl = class {
|
|
9552
|
+
resolver;
|
|
9553
|
+
_diagnostics = [];
|
|
9554
|
+
recordedPipes = /* @__PURE__ */ new Set();
|
|
9380
9555
|
constructor(resolver) {
|
|
9381
9556
|
this.resolver = resolver;
|
|
9382
|
-
this._diagnostics = [];
|
|
9383
|
-
this.recordedPipes = /* @__PURE__ */ new Set();
|
|
9384
9557
|
}
|
|
9385
9558
|
get diagnostics() {
|
|
9386
9559
|
return this._diagnostics;
|
|
@@ -9575,13 +9748,11 @@ function makeInlineDiagnostic(templateId, code, node, messageText, relatedInform
|
|
|
9575
9748
|
};
|
|
9576
9749
|
}
|
|
9577
9750
|
|
|
9578
|
-
// bazel-out/
|
|
9751
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
|
|
9579
9752
|
import ts38 from "typescript";
|
|
9580
9753
|
var TypeCheckShimGenerator = class {
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
this.shouldEmit = false;
|
|
9584
|
-
}
|
|
9754
|
+
extensionPrefix = "ngtypecheck";
|
|
9755
|
+
shouldEmit = false;
|
|
9585
9756
|
generateShimForFile(sf, genFilePath, priorShimSf) {
|
|
9586
9757
|
if (priorShimSf !== null) {
|
|
9587
9758
|
return priorShimSf;
|
|
@@ -9593,11 +9764,11 @@ var TypeCheckShimGenerator = class {
|
|
|
9593
9764
|
}
|
|
9594
9765
|
};
|
|
9595
9766
|
|
|
9596
|
-
// bazel-out/
|
|
9767
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
9597
9768
|
import { BindingPipe, BindingType, Call as Call2, createCssSelectorFromNode, CssSelector as CssSelector2, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver2, ParsedEventType, PropertyRead as PropertyRead3, PropertyWrite as PropertyWrite2, R3Identifiers as R3Identifiers4, SafeCall, SafePropertyRead as SafePropertyRead3, SelectorMatcher as SelectorMatcher2, ThisReceiver, TmplAstBoundAttribute, TmplAstBoundText, TmplAstContent, TmplAstDeferredBlock, TmplAstElement as TmplAstElement2, TmplAstForLoopBlock, TmplAstIcu, TmplAstIfBlock, TmplAstIfBlockBranch, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstReference as TmplAstReference2, TmplAstSwitchBlock, TmplAstTemplate, TmplAstText, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable, TransplantedType } from "@angular/compiler";
|
|
9598
9769
|
import ts41 from "typescript";
|
|
9599
9770
|
|
|
9600
|
-
// bazel-out/
|
|
9771
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
|
|
9601
9772
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan3 } from "@angular/compiler";
|
|
9602
9773
|
import ts39 from "typescript";
|
|
9603
9774
|
function wrapForDiagnostics(expr) {
|
|
@@ -9653,7 +9824,7 @@ function translateDiagnostic(diagnostic, resolver) {
|
|
|
9653
9824
|
return makeTemplateDiagnostic(sourceLocation.id, templateSourceMapping, span, diagnostic.category, diagnostic.code, diagnostic.messageText);
|
|
9654
9825
|
}
|
|
9655
9826
|
|
|
9656
|
-
// bazel-out/
|
|
9827
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
|
|
9657
9828
|
import { ASTWithSource, Call, EmptyExpr as EmptyExpr2, PropertyRead as PropertyRead2, SafeKeyedRead, SafePropertyRead as SafePropertyRead2 } from "@angular/compiler";
|
|
9658
9829
|
import ts40 from "typescript";
|
|
9659
9830
|
var ANY_EXPRESSION = ts40.factory.createAsExpression(ts40.factory.createNumericLiteral("0"), ts40.factory.createKeywordTypeNode(ts40.SyntaxKind.AnyKeyword));
|
|
@@ -9687,6 +9858,8 @@ function astToTypescript(ast, maybeResolve, config) {
|
|
|
9687
9858
|
return translator.translate(ast);
|
|
9688
9859
|
}
|
|
9689
9860
|
var AstTranslator = class {
|
|
9861
|
+
maybeResolve;
|
|
9862
|
+
config;
|
|
9690
9863
|
constructor(maybeResolve, config) {
|
|
9691
9864
|
this.maybeResolve = maybeResolve;
|
|
9692
9865
|
this.config = config;
|
|
@@ -9815,6 +9988,12 @@ var AstTranslator = class {
|
|
|
9815
9988
|
addParseSpanInfo(node, ast.sourceSpan);
|
|
9816
9989
|
return node;
|
|
9817
9990
|
}
|
|
9991
|
+
visitTypeofExpresion(ast) {
|
|
9992
|
+
const expression = wrapForDiagnostics(this.translate(ast.expression));
|
|
9993
|
+
const node = ts40.factory.createTypeOfExpression(expression);
|
|
9994
|
+
addParseSpanInfo(node, ast.sourceSpan);
|
|
9995
|
+
return node;
|
|
9996
|
+
}
|
|
9818
9997
|
visitPropertyRead(ast) {
|
|
9819
9998
|
const receiver = wrapForDiagnostics(this.translate(ast.receiver));
|
|
9820
9999
|
const name = ts40.factory.createPropertyAccessExpression(receiver, ast.name);
|
|
@@ -9965,6 +10144,9 @@ var _VeSafeLhsInferenceBugDetector = class {
|
|
|
9965
10144
|
visitPrefixNot(ast) {
|
|
9966
10145
|
return ast.expression.visit(this);
|
|
9967
10146
|
}
|
|
10147
|
+
visitTypeofExpresion(ast) {
|
|
10148
|
+
return ast.expression.visit(this);
|
|
10149
|
+
}
|
|
9968
10150
|
visitNonNullAssert(ast) {
|
|
9969
10151
|
return ast.expression.visit(this);
|
|
9970
10152
|
}
|
|
@@ -9982,11 +10164,9 @@ var _VeSafeLhsInferenceBugDetector = class {
|
|
|
9982
10164
|
}
|
|
9983
10165
|
};
|
|
9984
10166
|
var VeSafeLhsInferenceBugDetector = _VeSafeLhsInferenceBugDetector;
|
|
9985
|
-
(()
|
|
9986
|
-
_VeSafeLhsInferenceBugDetector.SINGLETON = new _VeSafeLhsInferenceBugDetector();
|
|
9987
|
-
})();
|
|
10167
|
+
__publicField(VeSafeLhsInferenceBugDetector, "SINGLETON", new _VeSafeLhsInferenceBugDetector());
|
|
9988
10168
|
|
|
9989
|
-
// bazel-out/
|
|
10169
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
9990
10170
|
var TcbGenericContextBehavior;
|
|
9991
10171
|
(function(TcbGenericContextBehavior2) {
|
|
9992
10172
|
TcbGenericContextBehavior2[TcbGenericContextBehavior2["UseEmitter"] = 0] = "UseEmitter";
|
|
@@ -10044,6 +10224,9 @@ var TcbOp = class {
|
|
|
10044
10224
|
}
|
|
10045
10225
|
};
|
|
10046
10226
|
var TcbElementOp = class extends TcbOp {
|
|
10227
|
+
tcb;
|
|
10228
|
+
scope;
|
|
10229
|
+
element;
|
|
10047
10230
|
constructor(tcb, scope, element) {
|
|
10048
10231
|
super();
|
|
10049
10232
|
this.tcb = tcb;
|
|
@@ -10062,6 +10245,10 @@ var TcbElementOp = class extends TcbOp {
|
|
|
10062
10245
|
}
|
|
10063
10246
|
};
|
|
10064
10247
|
var TcbTemplateVariableOp = class extends TcbOp {
|
|
10248
|
+
tcb;
|
|
10249
|
+
scope;
|
|
10250
|
+
template;
|
|
10251
|
+
variable;
|
|
10065
10252
|
constructor(tcb, scope, template, variable) {
|
|
10066
10253
|
super();
|
|
10067
10254
|
this.tcb = tcb;
|
|
@@ -10093,12 +10280,14 @@ var TcbTemplateVariableOp = class extends TcbOp {
|
|
|
10093
10280
|
}
|
|
10094
10281
|
};
|
|
10095
10282
|
var TcbTemplateContextOp = class extends TcbOp {
|
|
10283
|
+
tcb;
|
|
10284
|
+
scope;
|
|
10096
10285
|
constructor(tcb, scope) {
|
|
10097
10286
|
super();
|
|
10098
10287
|
this.tcb = tcb;
|
|
10099
10288
|
this.scope = scope;
|
|
10100
|
-
this.optional = true;
|
|
10101
10289
|
}
|
|
10290
|
+
optional = true;
|
|
10102
10291
|
execute() {
|
|
10103
10292
|
const ctx = this.tcb.allocateId();
|
|
10104
10293
|
const type = ts41.factory.createKeywordTypeNode(ts41.SyntaxKind.AnyKeyword);
|
|
@@ -10107,13 +10296,16 @@ var TcbTemplateContextOp = class extends TcbOp {
|
|
|
10107
10296
|
}
|
|
10108
10297
|
};
|
|
10109
10298
|
var TcbLetDeclarationOp = class extends TcbOp {
|
|
10299
|
+
tcb;
|
|
10300
|
+
scope;
|
|
10301
|
+
node;
|
|
10110
10302
|
constructor(tcb, scope, node) {
|
|
10111
10303
|
super();
|
|
10112
10304
|
this.tcb = tcb;
|
|
10113
10305
|
this.scope = scope;
|
|
10114
10306
|
this.node = node;
|
|
10115
|
-
this.optional = false;
|
|
10116
10307
|
}
|
|
10308
|
+
optional = false;
|
|
10117
10309
|
execute() {
|
|
10118
10310
|
const id = this.tcb.allocateId();
|
|
10119
10311
|
addParseSpanInfo(id, this.node.nameSpan);
|
|
@@ -10125,6 +10317,9 @@ var TcbLetDeclarationOp = class extends TcbOp {
|
|
|
10125
10317
|
}
|
|
10126
10318
|
};
|
|
10127
10319
|
var TcbTemplateBodyOp = class extends TcbOp {
|
|
10320
|
+
tcb;
|
|
10321
|
+
scope;
|
|
10322
|
+
template;
|
|
10128
10323
|
constructor(tcb, scope, template) {
|
|
10129
10324
|
super();
|
|
10130
10325
|
this.tcb = tcb;
|
|
@@ -10191,6 +10386,9 @@ var TcbTemplateBodyOp = class extends TcbOp {
|
|
|
10191
10386
|
}
|
|
10192
10387
|
};
|
|
10193
10388
|
var TcbExpressionOp = class extends TcbOp {
|
|
10389
|
+
tcb;
|
|
10390
|
+
scope;
|
|
10391
|
+
expression;
|
|
10194
10392
|
constructor(tcb, scope, expression) {
|
|
10195
10393
|
super();
|
|
10196
10394
|
this.tcb = tcb;
|
|
@@ -10207,6 +10405,10 @@ var TcbExpressionOp = class extends TcbOp {
|
|
|
10207
10405
|
}
|
|
10208
10406
|
};
|
|
10209
10407
|
var TcbDirectiveTypeOpBase = class extends TcbOp {
|
|
10408
|
+
tcb;
|
|
10409
|
+
scope;
|
|
10410
|
+
node;
|
|
10411
|
+
dir;
|
|
10210
10412
|
constructor(tcb, scope, node, dir) {
|
|
10211
10413
|
super();
|
|
10212
10414
|
this.tcb = tcb;
|
|
@@ -10256,6 +10458,11 @@ var TcbGenericDirectiveTypeWithAnyParamsOp = class extends TcbDirectiveTypeOpBas
|
|
|
10256
10458
|
}
|
|
10257
10459
|
};
|
|
10258
10460
|
var TcbReferenceOp = class extends TcbOp {
|
|
10461
|
+
tcb;
|
|
10462
|
+
scope;
|
|
10463
|
+
node;
|
|
10464
|
+
host;
|
|
10465
|
+
target;
|
|
10259
10466
|
constructor(tcb, scope, node, host, target) {
|
|
10260
10467
|
super();
|
|
10261
10468
|
this.tcb = tcb;
|
|
@@ -10263,8 +10470,8 @@ var TcbReferenceOp = class extends TcbOp {
|
|
|
10263
10470
|
this.node = node;
|
|
10264
10471
|
this.host = host;
|
|
10265
10472
|
this.target = target;
|
|
10266
|
-
this.optional = true;
|
|
10267
10473
|
}
|
|
10474
|
+
optional = true;
|
|
10268
10475
|
execute() {
|
|
10269
10476
|
const id = this.tcb.allocateId();
|
|
10270
10477
|
let initializer = this.target instanceof TmplAstTemplate || this.target instanceof TmplAstElement2 ? this.scope.resolve(this.target) : this.scope.resolve(this.host, this.target);
|
|
@@ -10282,12 +10489,14 @@ var TcbReferenceOp = class extends TcbOp {
|
|
|
10282
10489
|
}
|
|
10283
10490
|
};
|
|
10284
10491
|
var TcbInvalidReferenceOp = class extends TcbOp {
|
|
10492
|
+
tcb;
|
|
10493
|
+
scope;
|
|
10285
10494
|
constructor(tcb, scope) {
|
|
10286
10495
|
super();
|
|
10287
10496
|
this.tcb = tcb;
|
|
10288
10497
|
this.scope = scope;
|
|
10289
|
-
this.optional = true;
|
|
10290
10498
|
}
|
|
10499
|
+
optional = true;
|
|
10291
10500
|
execute() {
|
|
10292
10501
|
const id = this.tcb.allocateId();
|
|
10293
10502
|
this.scope.addStatement(tsCreateVariable(id, ANY_EXPRESSION));
|
|
@@ -10295,6 +10504,10 @@ var TcbInvalidReferenceOp = class extends TcbOp {
|
|
|
10295
10504
|
}
|
|
10296
10505
|
};
|
|
10297
10506
|
var TcbDirectiveCtorOp = class extends TcbOp {
|
|
10507
|
+
tcb;
|
|
10508
|
+
scope;
|
|
10509
|
+
node;
|
|
10510
|
+
dir;
|
|
10298
10511
|
constructor(tcb, scope, node, dir) {
|
|
10299
10512
|
super();
|
|
10300
10513
|
this.tcb = tcb;
|
|
@@ -10344,6 +10557,10 @@ var TcbDirectiveCtorOp = class extends TcbOp {
|
|
|
10344
10557
|
}
|
|
10345
10558
|
};
|
|
10346
10559
|
var TcbDirectiveInputsOp = class extends TcbOp {
|
|
10560
|
+
tcb;
|
|
10561
|
+
scope;
|
|
10562
|
+
node;
|
|
10563
|
+
dir;
|
|
10347
10564
|
constructor(tcb, scope, node, dir) {
|
|
10348
10565
|
super();
|
|
10349
10566
|
this.tcb = tcb;
|
|
@@ -10438,6 +10655,10 @@ var TcbDirectiveInputsOp = class extends TcbOp {
|
|
|
10438
10655
|
}
|
|
10439
10656
|
};
|
|
10440
10657
|
var TcbDirectiveCtorCircularFallbackOp = class extends TcbOp {
|
|
10658
|
+
tcb;
|
|
10659
|
+
scope;
|
|
10660
|
+
node;
|
|
10661
|
+
dir;
|
|
10441
10662
|
constructor(tcb, scope, node, dir) {
|
|
10442
10663
|
super();
|
|
10443
10664
|
this.tcb = tcb;
|
|
@@ -10461,6 +10682,10 @@ var TcbDirectiveCtorCircularFallbackOp = class extends TcbOp {
|
|
|
10461
10682
|
}
|
|
10462
10683
|
};
|
|
10463
10684
|
var TcbDomSchemaCheckerOp = class extends TcbOp {
|
|
10685
|
+
tcb;
|
|
10686
|
+
element;
|
|
10687
|
+
checkElement;
|
|
10688
|
+
claimedInputs;
|
|
10464
10689
|
constructor(tcb, element, checkElement, claimedInputs) {
|
|
10465
10690
|
super();
|
|
10466
10691
|
this.tcb = tcb;
|
|
@@ -10490,15 +10715,20 @@ var TcbDomSchemaCheckerOp = class extends TcbOp {
|
|
|
10490
10715
|
}
|
|
10491
10716
|
};
|
|
10492
10717
|
var TcbControlFlowContentProjectionOp = class extends TcbOp {
|
|
10718
|
+
tcb;
|
|
10719
|
+
element;
|
|
10720
|
+
ngContentSelectors;
|
|
10721
|
+
componentName;
|
|
10722
|
+
category;
|
|
10493
10723
|
constructor(tcb, element, ngContentSelectors, componentName) {
|
|
10494
10724
|
super();
|
|
10495
10725
|
this.tcb = tcb;
|
|
10496
10726
|
this.element = element;
|
|
10497
10727
|
this.ngContentSelectors = ngContentSelectors;
|
|
10498
10728
|
this.componentName = componentName;
|
|
10499
|
-
this.optional = false;
|
|
10500
10729
|
this.category = tcb.env.config.controlFlowPreventingContentProjection === "error" ? ts41.DiagnosticCategory.Error : ts41.DiagnosticCategory.Warning;
|
|
10501
10730
|
}
|
|
10731
|
+
optional = false;
|
|
10502
10732
|
execute() {
|
|
10503
10733
|
const controlFlowToCheck = this.findPotentialControlFlowNodes();
|
|
10504
10734
|
if (controlFlowToCheck.length > 0) {
|
|
@@ -10571,6 +10801,10 @@ var ATTR_TO_PROP = new Map(Object.entries({
|
|
|
10571
10801
|
"tabindex": "tabIndex"
|
|
10572
10802
|
}));
|
|
10573
10803
|
var TcbUnclaimedInputsOp = class extends TcbOp {
|
|
10804
|
+
tcb;
|
|
10805
|
+
scope;
|
|
10806
|
+
element;
|
|
10807
|
+
claimedInputs;
|
|
10574
10808
|
constructor(tcb, scope, element, claimedInputs) {
|
|
10575
10809
|
super();
|
|
10576
10810
|
this.tcb = tcb;
|
|
@@ -10611,6 +10845,10 @@ var TcbUnclaimedInputsOp = class extends TcbOp {
|
|
|
10611
10845
|
}
|
|
10612
10846
|
};
|
|
10613
10847
|
var TcbDirectiveOutputsOp = class extends TcbOp {
|
|
10848
|
+
tcb;
|
|
10849
|
+
scope;
|
|
10850
|
+
node;
|
|
10851
|
+
dir;
|
|
10614
10852
|
constructor(tcb, scope, node, dir) {
|
|
10615
10853
|
super();
|
|
10616
10854
|
this.tcb = tcb;
|
|
@@ -10656,6 +10894,10 @@ var TcbDirectiveOutputsOp = class extends TcbOp {
|
|
|
10656
10894
|
}
|
|
10657
10895
|
};
|
|
10658
10896
|
var TcbUnclaimedOutputsOp = class extends TcbOp {
|
|
10897
|
+
tcb;
|
|
10898
|
+
scope;
|
|
10899
|
+
element;
|
|
10900
|
+
claimedOutputs;
|
|
10659
10901
|
constructor(tcb, scope, element, claimedOutputs) {
|
|
10660
10902
|
super();
|
|
10661
10903
|
this.tcb = tcb;
|
|
@@ -10705,11 +10947,12 @@ var TcbUnclaimedOutputsOp = class extends TcbOp {
|
|
|
10705
10947
|
}
|
|
10706
10948
|
};
|
|
10707
10949
|
var TcbComponentContextCompletionOp = class extends TcbOp {
|
|
10950
|
+
scope;
|
|
10708
10951
|
constructor(scope) {
|
|
10709
10952
|
super();
|
|
10710
10953
|
this.scope = scope;
|
|
10711
|
-
this.optional = false;
|
|
10712
10954
|
}
|
|
10955
|
+
optional = false;
|
|
10713
10956
|
execute() {
|
|
10714
10957
|
const ctx = ts41.factory.createThis();
|
|
10715
10958
|
const ctxDot = ts41.factory.createPropertyAccessExpression(ctx, "");
|
|
@@ -10720,6 +10963,10 @@ var TcbComponentContextCompletionOp = class extends TcbOp {
|
|
|
10720
10963
|
}
|
|
10721
10964
|
};
|
|
10722
10965
|
var TcbBlockVariableOp = class extends TcbOp {
|
|
10966
|
+
tcb;
|
|
10967
|
+
scope;
|
|
10968
|
+
initializer;
|
|
10969
|
+
variable;
|
|
10723
10970
|
constructor(tcb, scope, initializer, variable) {
|
|
10724
10971
|
super();
|
|
10725
10972
|
this.tcb = tcb;
|
|
@@ -10740,14 +10987,18 @@ var TcbBlockVariableOp = class extends TcbOp {
|
|
|
10740
10987
|
}
|
|
10741
10988
|
};
|
|
10742
10989
|
var TcbBlockImplicitVariableOp = class extends TcbOp {
|
|
10990
|
+
tcb;
|
|
10991
|
+
scope;
|
|
10992
|
+
type;
|
|
10993
|
+
variable;
|
|
10743
10994
|
constructor(tcb, scope, type, variable) {
|
|
10744
10995
|
super();
|
|
10745
10996
|
this.tcb = tcb;
|
|
10746
10997
|
this.scope = scope;
|
|
10747
10998
|
this.type = type;
|
|
10748
10999
|
this.variable = variable;
|
|
10749
|
-
this.optional = true;
|
|
10750
11000
|
}
|
|
11001
|
+
optional = true;
|
|
10751
11002
|
execute() {
|
|
10752
11003
|
const id = this.tcb.allocateId();
|
|
10753
11004
|
addParseSpanInfo(id, this.variable.keySpan);
|
|
@@ -10758,12 +11009,15 @@ var TcbBlockImplicitVariableOp = class extends TcbOp {
|
|
|
10758
11009
|
}
|
|
10759
11010
|
};
|
|
10760
11011
|
var TcbIfOp = class extends TcbOp {
|
|
11012
|
+
tcb;
|
|
11013
|
+
scope;
|
|
11014
|
+
block;
|
|
11015
|
+
expressionScopes = /* @__PURE__ */ new Map();
|
|
10761
11016
|
constructor(tcb, scope, block) {
|
|
10762
11017
|
super();
|
|
10763
11018
|
this.tcb = tcb;
|
|
10764
11019
|
this.scope = scope;
|
|
10765
11020
|
this.block = block;
|
|
10766
|
-
this.expressionScopes = /* @__PURE__ */ new Map();
|
|
10767
11021
|
}
|
|
10768
11022
|
get optional() {
|
|
10769
11023
|
return false;
|
|
@@ -10820,6 +11074,9 @@ var TcbIfOp = class extends TcbOp {
|
|
|
10820
11074
|
}
|
|
10821
11075
|
};
|
|
10822
11076
|
var TcbSwitchOp = class extends TcbOp {
|
|
11077
|
+
tcb;
|
|
11078
|
+
scope;
|
|
11079
|
+
block;
|
|
10823
11080
|
constructor(tcb, scope, block) {
|
|
10824
11081
|
super();
|
|
10825
11082
|
this.tcb = tcb;
|
|
@@ -10864,6 +11121,9 @@ var TcbSwitchOp = class extends TcbOp {
|
|
|
10864
11121
|
}
|
|
10865
11122
|
};
|
|
10866
11123
|
var TcbForOfOp = class extends TcbOp {
|
|
11124
|
+
tcb;
|
|
11125
|
+
scope;
|
|
11126
|
+
block;
|
|
10867
11127
|
constructor(tcb, scope, block) {
|
|
10868
11128
|
super();
|
|
10869
11129
|
this.tcb = tcb;
|
|
@@ -10894,6 +11154,16 @@ var TcbForOfOp = class extends TcbOp {
|
|
|
10894
11154
|
};
|
|
10895
11155
|
var INFER_TYPE_FOR_CIRCULAR_OP_EXPR = ts41.factory.createNonNullExpression(ts41.factory.createNull());
|
|
10896
11156
|
var Context = class {
|
|
11157
|
+
env;
|
|
11158
|
+
domSchemaChecker;
|
|
11159
|
+
oobRecorder;
|
|
11160
|
+
id;
|
|
11161
|
+
boundTarget;
|
|
11162
|
+
pipes;
|
|
11163
|
+
schemas;
|
|
11164
|
+
hostIsStandalone;
|
|
11165
|
+
hostPreserveWhitespaces;
|
|
11166
|
+
nextId = 1;
|
|
10897
11167
|
constructor(env, domSchemaChecker, oobRecorder, id, boundTarget, pipes, schemas, hostIsStandalone, hostPreserveWhitespaces) {
|
|
10898
11168
|
this.env = env;
|
|
10899
11169
|
this.domSchemaChecker = domSchemaChecker;
|
|
@@ -10904,7 +11174,6 @@ var Context = class {
|
|
|
10904
11174
|
this.schemas = schemas;
|
|
10905
11175
|
this.hostIsStandalone = hostIsStandalone;
|
|
10906
11176
|
this.hostPreserveWhitespaces = hostPreserveWhitespaces;
|
|
10907
|
-
this.nextId = 1;
|
|
10908
11177
|
}
|
|
10909
11178
|
allocateId() {
|
|
10910
11179
|
return ts41.factory.createIdentifier(`_t${this.nextId++}`);
|
|
@@ -10917,18 +11186,21 @@ var Context = class {
|
|
|
10917
11186
|
}
|
|
10918
11187
|
};
|
|
10919
11188
|
var _Scope = class {
|
|
11189
|
+
tcb;
|
|
11190
|
+
parent;
|
|
11191
|
+
guard;
|
|
11192
|
+
opQueue = [];
|
|
11193
|
+
elementOpMap = /* @__PURE__ */ new Map();
|
|
11194
|
+
directiveOpMap = /* @__PURE__ */ new Map();
|
|
11195
|
+
referenceOpMap = /* @__PURE__ */ new Map();
|
|
11196
|
+
templateCtxOpMap = /* @__PURE__ */ new Map();
|
|
11197
|
+
varMap = /* @__PURE__ */ new Map();
|
|
11198
|
+
letDeclOpMap = /* @__PURE__ */ new Map();
|
|
11199
|
+
statements = [];
|
|
10920
11200
|
constructor(tcb, parent = null, guard = null) {
|
|
10921
11201
|
this.tcb = tcb;
|
|
10922
11202
|
this.parent = parent;
|
|
10923
11203
|
this.guard = guard;
|
|
10924
|
-
this.opQueue = [];
|
|
10925
|
-
this.elementOpMap = /* @__PURE__ */ new Map();
|
|
10926
|
-
this.directiveOpMap = /* @__PURE__ */ new Map();
|
|
10927
|
-
this.referenceOpMap = /* @__PURE__ */ new Map();
|
|
10928
|
-
this.templateCtxOpMap = /* @__PURE__ */ new Map();
|
|
10929
|
-
this.varMap = /* @__PURE__ */ new Map();
|
|
10930
|
-
this.letDeclOpMap = /* @__PURE__ */ new Map();
|
|
10931
|
-
this.statements = [];
|
|
10932
11204
|
}
|
|
10933
11205
|
static forNodes(tcb, parentScope, scopedNode, children, guard) {
|
|
10934
11206
|
const scope = new _Scope(tcb, parentScope, guard);
|
|
@@ -11292,16 +11564,14 @@ var _Scope = class {
|
|
|
11292
11564
|
}
|
|
11293
11565
|
};
|
|
11294
11566
|
var Scope = _Scope;
|
|
11295
|
-
(
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
]);
|
|
11304
|
-
})();
|
|
11567
|
+
__publicField(Scope, "forLoopContextVariableTypes", /* @__PURE__ */ new Map([
|
|
11568
|
+
["$first", ts41.SyntaxKind.BooleanKeyword],
|
|
11569
|
+
["$last", ts41.SyntaxKind.BooleanKeyword],
|
|
11570
|
+
["$even", ts41.SyntaxKind.BooleanKeyword],
|
|
11571
|
+
["$odd", ts41.SyntaxKind.BooleanKeyword],
|
|
11572
|
+
["$index", ts41.SyntaxKind.NumberKeyword],
|
|
11573
|
+
["$count", ts41.SyntaxKind.NumberKeyword]
|
|
11574
|
+
]));
|
|
11305
11575
|
function tcbThisParam(name, typeArguments) {
|
|
11306
11576
|
return ts41.factory.createParameterDeclaration(
|
|
11307
11577
|
void 0,
|
|
@@ -11317,6 +11587,8 @@ function tcbExpression(ast, tcb, scope) {
|
|
|
11317
11587
|
return translator.translate(ast);
|
|
11318
11588
|
}
|
|
11319
11589
|
var TcbExpressionTranslator = class {
|
|
11590
|
+
tcb;
|
|
11591
|
+
scope;
|
|
11320
11592
|
constructor(tcb, scope) {
|
|
11321
11593
|
this.tcb = tcb;
|
|
11322
11594
|
this.scope = scope;
|
|
@@ -11325,7 +11597,7 @@ var TcbExpressionTranslator = class {
|
|
|
11325
11597
|
return astToTypescript(ast, (ast2) => this.resolve(ast2), this.tcb.env.config);
|
|
11326
11598
|
}
|
|
11327
11599
|
resolve(ast) {
|
|
11328
|
-
if (ast instanceof PropertyRead3 && ast.receiver instanceof ImplicitReceiver2) {
|
|
11600
|
+
if (ast instanceof PropertyRead3 && ast.receiver instanceof ImplicitReceiver2 && !(ast.receiver instanceof ThisReceiver)) {
|
|
11329
11601
|
const target = this.tcb.boundTarget.getExpressionTarget(ast);
|
|
11330
11602
|
const targetExpression = target === null ? null : this.getTargetNodeExpression(target, ast);
|
|
11331
11603
|
if (target instanceof TmplAstLetDeclaration2 && !this.isValidLetDeclarationAccess(target, ast)) {
|
|
@@ -11558,6 +11830,8 @@ var TcbEventHandlerTranslator = class extends TcbExpressionTranslator {
|
|
|
11558
11830
|
}
|
|
11559
11831
|
};
|
|
11560
11832
|
var TcbForLoopTrackTranslator = class extends TcbExpressionTranslator {
|
|
11833
|
+
block;
|
|
11834
|
+
allowedVariables;
|
|
11561
11835
|
constructor(tcb, scope, block) {
|
|
11562
11836
|
super(tcb, scope);
|
|
11563
11837
|
this.block = block;
|
|
@@ -11579,17 +11853,18 @@ var TcbForLoopTrackTranslator = class extends TcbExpressionTranslator {
|
|
|
11579
11853
|
}
|
|
11580
11854
|
};
|
|
11581
11855
|
|
|
11582
|
-
// bazel-out/
|
|
11856
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
|
|
11583
11857
|
import ts42 from "typescript";
|
|
11584
11858
|
var TypeCheckFile = class extends Environment {
|
|
11859
|
+
fileName;
|
|
11860
|
+
nextTcbId = 1;
|
|
11861
|
+
tcbStatements = [];
|
|
11585
11862
|
constructor(fileName, config, refEmitter, reflector, compilerHost) {
|
|
11586
11863
|
super(config, new ImportManager({
|
|
11587
11864
|
forceGenerateNamespacesForNewImports: true,
|
|
11588
11865
|
shouldUseSingleQuotes: () => true
|
|
11589
11866
|
}), refEmitter, reflector, ts42.createSourceFile(compilerHost.getCanonicalFileName(fileName), "", ts42.ScriptTarget.Latest, true));
|
|
11590
11867
|
this.fileName = fileName;
|
|
11591
|
-
this.nextTcbId = 1;
|
|
11592
|
-
this.tcbStatements = [];
|
|
11593
11868
|
}
|
|
11594
11869
|
addTypeCheckBlock(ref, meta, domSchemaChecker, oobRecorder, genericContextBehavior) {
|
|
11595
11870
|
const fnId = ts42.factory.createIdentifier(`_tcb${this.nextTcbId++}`);
|
|
@@ -11627,13 +11902,21 @@ var TypeCheckFile = class extends Environment {
|
|
|
11627
11902
|
}
|
|
11628
11903
|
};
|
|
11629
11904
|
|
|
11630
|
-
// bazel-out/
|
|
11905
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
11631
11906
|
var InliningMode;
|
|
11632
11907
|
(function(InliningMode2) {
|
|
11633
11908
|
InliningMode2[InliningMode2["InlineOps"] = 0] = "InlineOps";
|
|
11634
11909
|
InliningMode2[InliningMode2["Error"] = 1] = "Error";
|
|
11635
11910
|
})(InliningMode || (InliningMode = {}));
|
|
11636
11911
|
var TypeCheckContextImpl = class {
|
|
11912
|
+
config;
|
|
11913
|
+
compilerHost;
|
|
11914
|
+
refEmitter;
|
|
11915
|
+
reflector;
|
|
11916
|
+
host;
|
|
11917
|
+
inlining;
|
|
11918
|
+
perf;
|
|
11919
|
+
fileMap = /* @__PURE__ */ new Map();
|
|
11637
11920
|
constructor(config, compilerHost, refEmitter, reflector, host, inlining, perf) {
|
|
11638
11921
|
this.config = config;
|
|
11639
11922
|
this.compilerHost = compilerHost;
|
|
@@ -11642,13 +11925,12 @@ var TypeCheckContextImpl = class {
|
|
|
11642
11925
|
this.host = host;
|
|
11643
11926
|
this.inlining = inlining;
|
|
11644
11927
|
this.perf = perf;
|
|
11645
|
-
this.fileMap = /* @__PURE__ */ new Map();
|
|
11646
|
-
this.opMap = /* @__PURE__ */ new Map();
|
|
11647
|
-
this.typeCtorPending = /* @__PURE__ */ new Set();
|
|
11648
11928
|
if (inlining === InliningMode.Error && config.useInlineTypeConstructors) {
|
|
11649
11929
|
throw new Error(`AssertionError: invalid inlining configuration.`);
|
|
11650
11930
|
}
|
|
11651
11931
|
}
|
|
11932
|
+
opMap = /* @__PURE__ */ new Map();
|
|
11933
|
+
typeCtorPending = /* @__PURE__ */ new Set();
|
|
11652
11934
|
addTemplate(ref, binder, template, pipes, schemas, sourceMapping, file, parseErrors, isStandalone, preserveWhitespaces) {
|
|
11653
11935
|
if (!this.host.shouldCheckComponent(ref.node)) {
|
|
11654
11936
|
return;
|
|
@@ -11845,6 +12127,12 @@ function getTemplateDiagnostics(parseErrors, templateId, sourceMapping) {
|
|
|
11845
12127
|
});
|
|
11846
12128
|
}
|
|
11847
12129
|
var InlineTcbOp = class {
|
|
12130
|
+
ref;
|
|
12131
|
+
meta;
|
|
12132
|
+
config;
|
|
12133
|
+
reflector;
|
|
12134
|
+
domSchemaChecker;
|
|
12135
|
+
oobRecorder;
|
|
11848
12136
|
constructor(ref, meta, config, reflector, domSchemaChecker, oobRecorder) {
|
|
11849
12137
|
this.ref = ref;
|
|
11850
12138
|
this.meta = meta;
|
|
@@ -11864,6 +12152,9 @@ var InlineTcbOp = class {
|
|
|
11864
12152
|
}
|
|
11865
12153
|
};
|
|
11866
12154
|
var TypeCtorOp = class {
|
|
12155
|
+
ref;
|
|
12156
|
+
reflector;
|
|
12157
|
+
meta;
|
|
11867
12158
|
constructor(ref, reflector, meta) {
|
|
11868
12159
|
this.ref = ref;
|
|
11869
12160
|
this.reflector = reflector;
|
|
@@ -11879,10 +12170,10 @@ var TypeCtorOp = class {
|
|
|
11879
12170
|
}
|
|
11880
12171
|
};
|
|
11881
12172
|
|
|
11882
|
-
// bazel-out/
|
|
12173
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
11883
12174
|
import { ParseLocation as ParseLocation2, ParseSourceSpan as ParseSourceSpan2 } from "@angular/compiler";
|
|
11884
12175
|
|
|
11885
|
-
// bazel-out/
|
|
12176
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
|
|
11886
12177
|
var LF_CHAR = 10;
|
|
11887
12178
|
var CR_CHAR = 13;
|
|
11888
12179
|
var LINE_SEP_CHAR = 8232;
|
|
@@ -11923,12 +12214,14 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
|
|
|
11923
12214
|
return low - 1;
|
|
11924
12215
|
}
|
|
11925
12216
|
|
|
11926
|
-
// bazel-out/
|
|
12217
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
11927
12218
|
var TemplateSource = class {
|
|
12219
|
+
mapping;
|
|
12220
|
+
file;
|
|
12221
|
+
lineStarts = null;
|
|
11928
12222
|
constructor(mapping, file) {
|
|
11929
12223
|
this.mapping = mapping;
|
|
11930
12224
|
this.file = file;
|
|
11931
|
-
this.lineStarts = null;
|
|
11932
12225
|
}
|
|
11933
12226
|
toParseSourceSpan(start, end) {
|
|
11934
12227
|
const startLoc = this.toParseLocation(start);
|
|
@@ -11948,9 +12241,7 @@ var TemplateSource = class {
|
|
|
11948
12241
|
}
|
|
11949
12242
|
};
|
|
11950
12243
|
var TemplateSourceManager = class {
|
|
11951
|
-
|
|
11952
|
-
this.templateSources = /* @__PURE__ */ new Map();
|
|
11953
|
-
}
|
|
12244
|
+
templateSources = /* @__PURE__ */ new Map();
|
|
11954
12245
|
getTemplateId(node) {
|
|
11955
12246
|
return getTemplateId(node);
|
|
11956
12247
|
}
|
|
@@ -11974,10 +12265,17 @@ var TemplateSourceManager = class {
|
|
|
11974
12265
|
}
|
|
11975
12266
|
};
|
|
11976
12267
|
|
|
11977
|
-
// bazel-out/
|
|
12268
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
|
|
11978
12269
|
import { AST, ASTWithName, ASTWithSource as ASTWithSource2, BindingPipe as BindingPipe2, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers5, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement3, TmplAstLetDeclaration as TmplAstLetDeclaration3, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
|
|
11979
12270
|
import ts44 from "typescript";
|
|
11980
12271
|
var SymbolBuilder = class {
|
|
12272
|
+
tcbPath;
|
|
12273
|
+
tcbIsShim;
|
|
12274
|
+
typeCheckBlock;
|
|
12275
|
+
templateData;
|
|
12276
|
+
componentScopeReader;
|
|
12277
|
+
getTypeChecker;
|
|
12278
|
+
symbolCache = /* @__PURE__ */ new Map();
|
|
11981
12279
|
constructor(tcbPath, tcbIsShim, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
|
|
11982
12280
|
this.tcbPath = tcbPath;
|
|
11983
12281
|
this.tcbIsShim = tcbIsShim;
|
|
@@ -11985,7 +12283,6 @@ var SymbolBuilder = class {
|
|
|
11985
12283
|
this.templateData = templateData;
|
|
11986
12284
|
this.componentScopeReader = componentScopeReader;
|
|
11987
12285
|
this.getTypeChecker = getTypeChecker;
|
|
11988
|
-
this.symbolCache = /* @__PURE__ */ new Map();
|
|
11989
12286
|
}
|
|
11990
12287
|
getSymbol(node) {
|
|
11991
12288
|
if (this.symbolCache.has(node)) {
|
|
@@ -12550,9 +12847,29 @@ function unwrapSignalInputWriteTAccessor(expr) {
|
|
|
12550
12847
|
};
|
|
12551
12848
|
}
|
|
12552
12849
|
|
|
12553
|
-
// bazel-out/
|
|
12850
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
12554
12851
|
var REGISTRY2 = new DomElementSchemaRegistry2();
|
|
12555
12852
|
var TemplateTypeCheckerImpl = class {
|
|
12853
|
+
originalProgram;
|
|
12854
|
+
programDriver;
|
|
12855
|
+
typeCheckAdapter;
|
|
12856
|
+
config;
|
|
12857
|
+
refEmitter;
|
|
12858
|
+
reflector;
|
|
12859
|
+
compilerHost;
|
|
12860
|
+
priorBuild;
|
|
12861
|
+
metaReader;
|
|
12862
|
+
localMetaReader;
|
|
12863
|
+
ngModuleIndex;
|
|
12864
|
+
componentScopeReader;
|
|
12865
|
+
typeCheckScopeRegistry;
|
|
12866
|
+
perf;
|
|
12867
|
+
state = /* @__PURE__ */ new Map();
|
|
12868
|
+
completionCache = /* @__PURE__ */ new Map();
|
|
12869
|
+
symbolBuilderCache = /* @__PURE__ */ new Map();
|
|
12870
|
+
scopeCache = /* @__PURE__ */ new Map();
|
|
12871
|
+
elementTagCache = /* @__PURE__ */ new Map();
|
|
12872
|
+
isComplete = false;
|
|
12556
12873
|
constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, metaReader, localMetaReader, ngModuleIndex, componentScopeReader, typeCheckScopeRegistry, perf) {
|
|
12557
12874
|
this.originalProgram = originalProgram;
|
|
12558
12875
|
this.programDriver = programDriver;
|
|
@@ -12568,14 +12885,8 @@ var TemplateTypeCheckerImpl = class {
|
|
|
12568
12885
|
this.componentScopeReader = componentScopeReader;
|
|
12569
12886
|
this.typeCheckScopeRegistry = typeCheckScopeRegistry;
|
|
12570
12887
|
this.perf = perf;
|
|
12571
|
-
this.state = /* @__PURE__ */ new Map();
|
|
12572
|
-
this.completionCache = /* @__PURE__ */ new Map();
|
|
12573
|
-
this.symbolBuilderCache = /* @__PURE__ */ new Map();
|
|
12574
|
-
this.scopeCache = /* @__PURE__ */ new Map();
|
|
12575
|
-
this.elementTagCache = /* @__PURE__ */ new Map();
|
|
12576
|
-
this.isComplete = false;
|
|
12577
12888
|
}
|
|
12578
|
-
getTemplate(component) {
|
|
12889
|
+
getTemplate(component, optimizeFor) {
|
|
12579
12890
|
const { data } = this.getLatestComponentState(component);
|
|
12580
12891
|
if (data === null) {
|
|
12581
12892
|
return null;
|
|
@@ -12590,8 +12901,15 @@ var TemplateTypeCheckerImpl = class {
|
|
|
12590
12901
|
var _a;
|
|
12591
12902
|
return ((_a = this.getLatestComponentState(component).data) == null ? void 0 : _a.boundTarget.getUsedPipes()) || null;
|
|
12592
12903
|
}
|
|
12593
|
-
getLatestComponentState(component) {
|
|
12594
|
-
|
|
12904
|
+
getLatestComponentState(component, optimizeFor = OptimizeFor.SingleFile) {
|
|
12905
|
+
switch (optimizeFor) {
|
|
12906
|
+
case OptimizeFor.WholeProgram:
|
|
12907
|
+
this.ensureAllShimsForAllFiles();
|
|
12908
|
+
break;
|
|
12909
|
+
case OptimizeFor.SingleFile:
|
|
12910
|
+
this.ensureShimForComponent(component);
|
|
12911
|
+
break;
|
|
12912
|
+
}
|
|
12595
12913
|
const sf = component.getSourceFile();
|
|
12596
12914
|
const sfPath = absoluteFromSourceFile(sf);
|
|
12597
12915
|
const shimPath = TypeCheckShimGenerator.shimFor(sfPath);
|
|
@@ -12885,16 +13203,16 @@ var TemplateTypeCheckerImpl = class {
|
|
|
12885
13203
|
this.perf.memory(PerfCheckpoint.TtcUpdateProgram);
|
|
12886
13204
|
});
|
|
12887
13205
|
}
|
|
12888
|
-
getFileData(
|
|
12889
|
-
if (!this.state.has(
|
|
12890
|
-
this.state.set(
|
|
13206
|
+
getFileData(path) {
|
|
13207
|
+
if (!this.state.has(path)) {
|
|
13208
|
+
this.state.set(path, {
|
|
12891
13209
|
hasInlines: false,
|
|
12892
13210
|
sourceManager: new TemplateSourceManager(),
|
|
12893
13211
|
isComplete: false,
|
|
12894
13212
|
shimData: /* @__PURE__ */ new Map()
|
|
12895
13213
|
});
|
|
12896
13214
|
}
|
|
12897
|
-
return this.state.get(
|
|
13215
|
+
return this.state.get(path);
|
|
12898
13216
|
}
|
|
12899
13217
|
getSymbolOfNode(node, component) {
|
|
12900
13218
|
const builder = this.getOrCreateSymbolBuilder(component);
|
|
@@ -13170,6 +13488,7 @@ function convertDiagnostic(diag, sourceResolver) {
|
|
|
13170
13488
|
return translateDiagnostic(diag, sourceResolver);
|
|
13171
13489
|
}
|
|
13172
13490
|
var WholeProgramTypeCheckingHost = class {
|
|
13491
|
+
impl;
|
|
13173
13492
|
constructor(impl) {
|
|
13174
13493
|
this.impl = impl;
|
|
13175
13494
|
}
|
|
@@ -13194,11 +13513,14 @@ var WholeProgramTypeCheckingHost = class {
|
|
|
13194
13513
|
}
|
|
13195
13514
|
};
|
|
13196
13515
|
var SingleFileTypeCheckingHost = class {
|
|
13516
|
+
sfPath;
|
|
13517
|
+
fileData;
|
|
13518
|
+
impl;
|
|
13519
|
+
seenInlines = false;
|
|
13197
13520
|
constructor(sfPath, fileData, impl) {
|
|
13198
13521
|
this.sfPath = sfPath;
|
|
13199
13522
|
this.fileData = fileData;
|
|
13200
13523
|
this.impl = impl;
|
|
13201
|
-
this.seenInlines = false;
|
|
13202
13524
|
}
|
|
13203
13525
|
assertPath(sfPath) {
|
|
13204
13526
|
if (this.sfPath !== sfPath) {
|
|
@@ -13233,6 +13555,7 @@ var SingleFileTypeCheckingHost = class {
|
|
|
13233
13555
|
}
|
|
13234
13556
|
};
|
|
13235
13557
|
var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
13558
|
+
shimPath;
|
|
13236
13559
|
constructor(sfPath, fileData, impl, shimPath) {
|
|
13237
13560
|
super(sfPath, fileData, impl);
|
|
13238
13561
|
this.shimPath = shimPath;
|
|
@@ -13249,18 +13572,231 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
|
13249
13572
|
}
|
|
13250
13573
|
};
|
|
13251
13574
|
|
|
13252
|
-
// bazel-out/
|
|
13575
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
13576
|
+
import { outputAst as o3 } from "@angular/compiler";
|
|
13577
|
+
|
|
13578
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/extract_locals.mjs
|
|
13579
|
+
import { outputAst as o2 } from "@angular/compiler";
|
|
13580
|
+
import ts45 from "typescript";
|
|
13581
|
+
function extractHmrLocals(node, definition, factory, classMetadata, debugInfo) {
|
|
13582
|
+
var _a;
|
|
13583
|
+
const name = ts45.isClassDeclaration(node) && node.name ? node.name.text : null;
|
|
13584
|
+
const visitor = new PotentialTopLevelReadsVisitor();
|
|
13585
|
+
const sourceFile = node.getSourceFile();
|
|
13586
|
+
definition.expression.visitExpression(visitor, null);
|
|
13587
|
+
definition.statements.forEach((statement) => statement.visitStatement(visitor, null));
|
|
13588
|
+
(_a = factory.initializer) == null ? void 0 : _a.visitExpression(visitor, null);
|
|
13589
|
+
factory.statements.forEach((statement) => statement.visitStatement(visitor, null));
|
|
13590
|
+
classMetadata == null ? void 0 : classMetadata.visitStatement(visitor, null);
|
|
13591
|
+
debugInfo == null ? void 0 : debugInfo.visitStatement(visitor, null);
|
|
13592
|
+
const availableTopLevel = getTopLevelDeclarationNames(sourceFile);
|
|
13593
|
+
return Array.from(visitor.allReads).filter((r) => r !== name && availableTopLevel.has(r));
|
|
13594
|
+
}
|
|
13595
|
+
function getTopLevelDeclarationNames(sourceFile) {
|
|
13596
|
+
var _a;
|
|
13597
|
+
const results = /* @__PURE__ */ new Set();
|
|
13598
|
+
for (const node of sourceFile.statements) {
|
|
13599
|
+
if (ts45.isClassDeclaration(node) || ts45.isFunctionDeclaration(node) || ts45.isEnumDeclaration(node) && !((_a = node.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts45.SyntaxKind.ConstKeyword))) {
|
|
13600
|
+
if (node.name) {
|
|
13601
|
+
results.add(node.name.text);
|
|
13602
|
+
}
|
|
13603
|
+
continue;
|
|
13604
|
+
}
|
|
13605
|
+
if (ts45.isVariableStatement(node)) {
|
|
13606
|
+
for (const decl of node.declarationList.declarations) {
|
|
13607
|
+
trackBindingName(decl.name, results);
|
|
13608
|
+
}
|
|
13609
|
+
continue;
|
|
13610
|
+
}
|
|
13611
|
+
if (ts45.isImportDeclaration(node) && node.importClause) {
|
|
13612
|
+
const importClause = node.importClause;
|
|
13613
|
+
if (importClause.isTypeOnly) {
|
|
13614
|
+
continue;
|
|
13615
|
+
}
|
|
13616
|
+
if (importClause.name) {
|
|
13617
|
+
results.add(importClause.name.text);
|
|
13618
|
+
}
|
|
13619
|
+
if (importClause.namedBindings) {
|
|
13620
|
+
const namedBindings = importClause.namedBindings;
|
|
13621
|
+
if (ts45.isNamespaceImport(namedBindings)) {
|
|
13622
|
+
results.add(namedBindings.name.text);
|
|
13623
|
+
} else {
|
|
13624
|
+
namedBindings.elements.forEach((el) => {
|
|
13625
|
+
if (!el.isTypeOnly) {
|
|
13626
|
+
results.add(el.name.text);
|
|
13627
|
+
}
|
|
13628
|
+
});
|
|
13629
|
+
}
|
|
13630
|
+
}
|
|
13631
|
+
continue;
|
|
13632
|
+
}
|
|
13633
|
+
}
|
|
13634
|
+
return results;
|
|
13635
|
+
}
|
|
13636
|
+
function trackBindingName(node, results) {
|
|
13637
|
+
if (ts45.isIdentifier(node)) {
|
|
13638
|
+
results.add(node.text);
|
|
13639
|
+
} else {
|
|
13640
|
+
for (const el of node.elements) {
|
|
13641
|
+
if (!ts45.isOmittedExpression(el)) {
|
|
13642
|
+
trackBindingName(el.name, results);
|
|
13643
|
+
}
|
|
13644
|
+
}
|
|
13645
|
+
}
|
|
13646
|
+
}
|
|
13647
|
+
var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
|
|
13648
|
+
allReads = /* @__PURE__ */ new Set();
|
|
13649
|
+
visitReadVarExpr(ast, context) {
|
|
13650
|
+
this.allReads.add(ast.name);
|
|
13651
|
+
super.visitReadVarExpr(ast, context);
|
|
13652
|
+
}
|
|
13653
|
+
visitWrappedNodeExpr(ast, context) {
|
|
13654
|
+
if (this.isTypeScriptNode(ast.node)) {
|
|
13655
|
+
this.addAllTopLevelIdentifiers(ast.node);
|
|
13656
|
+
}
|
|
13657
|
+
super.visitWrappedNodeExpr(ast, context);
|
|
13658
|
+
}
|
|
13659
|
+
addAllTopLevelIdentifiers = (node) => {
|
|
13660
|
+
if (ts45.isIdentifier(node) && this.isTopLevelIdentifierReference(node)) {
|
|
13661
|
+
this.allReads.add(node.text);
|
|
13662
|
+
} else {
|
|
13663
|
+
ts45.forEachChild(node, this.addAllTopLevelIdentifiers);
|
|
13664
|
+
}
|
|
13665
|
+
};
|
|
13666
|
+
isTopLevelIdentifierReference(node) {
|
|
13667
|
+
const parent = node.parent;
|
|
13668
|
+
if (!parent) {
|
|
13669
|
+
return false;
|
|
13670
|
+
}
|
|
13671
|
+
if (ts45.isSourceFile(parent) || ts45.isExpressionStatement(parent) && parent.expression === node) {
|
|
13672
|
+
return true;
|
|
13673
|
+
}
|
|
13674
|
+
if (ts45.isCallExpression(parent)) {
|
|
13675
|
+
return parent.expression === node || parent.arguments.includes(node);
|
|
13676
|
+
}
|
|
13677
|
+
if (ts45.isPropertyAccessExpression(parent)) {
|
|
13678
|
+
return parent.expression === node;
|
|
13679
|
+
}
|
|
13680
|
+
if (ts45.isArrayLiteralExpression(parent)) {
|
|
13681
|
+
return parent.elements.includes(node);
|
|
13682
|
+
}
|
|
13683
|
+
if (ts45.isPropertyAssignment(parent)) {
|
|
13684
|
+
return parent.initializer === node;
|
|
13685
|
+
}
|
|
13686
|
+
if (ts45.isClassDeclaration(parent)) {
|
|
13687
|
+
return parent.name === node;
|
|
13688
|
+
}
|
|
13689
|
+
return false;
|
|
13690
|
+
}
|
|
13691
|
+
isTypeScriptNode(value) {
|
|
13692
|
+
return !!value && typeof value.kind === "number";
|
|
13693
|
+
}
|
|
13694
|
+
};
|
|
13695
|
+
|
|
13696
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
|
|
13697
|
+
function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, classMetadata, debugInfo) {
|
|
13698
|
+
if (!reflection.isClass(clazz)) {
|
|
13699
|
+
return null;
|
|
13700
|
+
}
|
|
13701
|
+
const sourceFile = clazz.getSourceFile();
|
|
13702
|
+
const filePath = getProjectRelativePath(sourceFile, rootDirs, compilerHost) || compilerHost.getCanonicalFileName(sourceFile.fileName);
|
|
13703
|
+
const meta = {
|
|
13704
|
+
type: new o3.WrappedNodeExpr(clazz.name),
|
|
13705
|
+
className: clazz.name.text,
|
|
13706
|
+
filePath,
|
|
13707
|
+
locals: extractHmrLocals(clazz, definition, factory, classMetadata, debugInfo),
|
|
13708
|
+
coreName: "__ngCore__"
|
|
13709
|
+
};
|
|
13710
|
+
return meta;
|
|
13711
|
+
}
|
|
13712
|
+
|
|
13713
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/update_declaration.mjs
|
|
13714
|
+
import { compileHmrUpdateCallback } from "@angular/compiler";
|
|
13715
|
+
import ts46 from "typescript";
|
|
13716
|
+
function getHmrUpdateDeclaration(compilationResults, constantStatements, meta, sourceFile) {
|
|
13717
|
+
const importRewriter = new HmrModuleImportRewriter(meta.coreName);
|
|
13718
|
+
const importManager = new ImportManager({
|
|
13719
|
+
...presetImportManagerForceNamespaceImports,
|
|
13720
|
+
rewriter: importRewriter
|
|
13721
|
+
});
|
|
13722
|
+
const callback = compileHmrUpdateCallback(compilationResults, constantStatements, meta);
|
|
13723
|
+
const node = translateStatement(sourceFile, callback, importManager);
|
|
13724
|
+
return ts46.factory.updateFunctionDeclaration(node, [
|
|
13725
|
+
ts46.factory.createToken(ts46.SyntaxKind.ExportKeyword),
|
|
13726
|
+
ts46.factory.createToken(ts46.SyntaxKind.DefaultKeyword)
|
|
13727
|
+
], node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
|
|
13728
|
+
}
|
|
13729
|
+
var HmrModuleImportRewriter = class {
|
|
13730
|
+
coreName;
|
|
13731
|
+
constructor(coreName) {
|
|
13732
|
+
this.coreName = coreName;
|
|
13733
|
+
}
|
|
13734
|
+
rewriteNamespaceImportIdentifier(specifier, moduleName) {
|
|
13735
|
+
return moduleName === "@angular/core" ? this.coreName : specifier;
|
|
13736
|
+
}
|
|
13737
|
+
rewriteSymbol(symbol) {
|
|
13738
|
+
return symbol;
|
|
13739
|
+
}
|
|
13740
|
+
rewriteSpecifier(specifier) {
|
|
13741
|
+
return specifier;
|
|
13742
|
+
}
|
|
13743
|
+
};
|
|
13744
|
+
|
|
13745
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
|
|
13253
13746
|
var EMPTY_ARRAY2 = [];
|
|
13254
13747
|
var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
|
|
13255
13748
|
var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
|
|
13256
13749
|
var ComponentDecoratorHandler = class {
|
|
13257
|
-
|
|
13750
|
+
reflector;
|
|
13751
|
+
evaluator;
|
|
13752
|
+
metaRegistry;
|
|
13753
|
+
metaReader;
|
|
13754
|
+
scopeReader;
|
|
13755
|
+
compilerHost;
|
|
13756
|
+
scopeRegistry;
|
|
13757
|
+
typeCheckScopeRegistry;
|
|
13758
|
+
resourceRegistry;
|
|
13759
|
+
isCore;
|
|
13760
|
+
strictCtorDeps;
|
|
13761
|
+
resourceLoader;
|
|
13762
|
+
rootDirs;
|
|
13763
|
+
defaultPreserveWhitespaces;
|
|
13764
|
+
i18nUseExternalIds;
|
|
13765
|
+
enableI18nLegacyMessageIdFormat;
|
|
13766
|
+
usePoisonedData;
|
|
13767
|
+
i18nNormalizeLineEndingsInICUs;
|
|
13768
|
+
moduleResolver;
|
|
13769
|
+
cycleAnalyzer;
|
|
13770
|
+
cycleHandlingStrategy;
|
|
13771
|
+
refEmitter;
|
|
13772
|
+
referencesRegistry;
|
|
13773
|
+
depTracker;
|
|
13774
|
+
injectableRegistry;
|
|
13775
|
+
semanticDepGraphUpdater;
|
|
13776
|
+
annotateForClosureCompiler;
|
|
13777
|
+
perf;
|
|
13778
|
+
hostDirectivesResolver;
|
|
13779
|
+
importTracker;
|
|
13780
|
+
includeClassMetadata;
|
|
13781
|
+
compilationMode;
|
|
13782
|
+
deferredSymbolTracker;
|
|
13783
|
+
forbidOrphanRendering;
|
|
13784
|
+
enableBlockSyntax;
|
|
13785
|
+
enableLetSyntax;
|
|
13786
|
+
externalRuntimeStyles;
|
|
13787
|
+
localCompilationExtraImportsTracker;
|
|
13788
|
+
jitDeclarationRegistry;
|
|
13789
|
+
i18nPreserveSignificantWhitespace;
|
|
13790
|
+
strictStandalone;
|
|
13791
|
+
enableHmr;
|
|
13792
|
+
implicitStandaloneValue;
|
|
13793
|
+
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) {
|
|
13258
13794
|
this.reflector = reflector;
|
|
13259
13795
|
this.evaluator = evaluator;
|
|
13260
13796
|
this.metaRegistry = metaRegistry;
|
|
13261
13797
|
this.metaReader = metaReader;
|
|
13262
13798
|
this.scopeReader = scopeReader;
|
|
13263
|
-
this.
|
|
13799
|
+
this.compilerHost = compilerHost;
|
|
13264
13800
|
this.scopeRegistry = scopeRegistry;
|
|
13265
13801
|
this.typeCheckScopeRegistry = typeCheckScopeRegistry;
|
|
13266
13802
|
this.resourceRegistry = resourceRegistry;
|
|
@@ -13291,16 +13827,13 @@ var ComponentDecoratorHandler = class {
|
|
|
13291
13827
|
this.forbidOrphanRendering = forbidOrphanRendering;
|
|
13292
13828
|
this.enableBlockSyntax = enableBlockSyntax;
|
|
13293
13829
|
this.enableLetSyntax = enableLetSyntax;
|
|
13830
|
+
this.externalRuntimeStyles = externalRuntimeStyles;
|
|
13294
13831
|
this.localCompilationExtraImportsTracker = localCompilationExtraImportsTracker;
|
|
13295
13832
|
this.jitDeclarationRegistry = jitDeclarationRegistry;
|
|
13296
13833
|
this.i18nPreserveSignificantWhitespace = i18nPreserveSignificantWhitespace;
|
|
13297
13834
|
this.strictStandalone = strictStandalone;
|
|
13298
|
-
this.
|
|
13299
|
-
this.
|
|
13300
|
-
this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
|
|
13301
|
-
this.preanalyzeStylesCache = /* @__PURE__ */ new Map();
|
|
13302
|
-
this.precedence = HandlerPrecedence.PRIMARY;
|
|
13303
|
-
this.name = "ComponentDecoratorHandler";
|
|
13835
|
+
this.enableHmr = enableHmr;
|
|
13836
|
+
this.implicitStandaloneValue = implicitStandaloneValue;
|
|
13304
13837
|
this.extractTemplateOptions = {
|
|
13305
13838
|
enableI18nLegacyMessageIdFormat: this.enableI18nLegacyMessageIdFormat,
|
|
13306
13839
|
i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
|
|
@@ -13309,7 +13842,16 @@ var ComponentDecoratorHandler = class {
|
|
|
13309
13842
|
enableLetSyntax: this.enableLetSyntax,
|
|
13310
13843
|
preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
|
|
13311
13844
|
};
|
|
13312
|
-
|
|
13845
|
+
this.canDeferDeps = !enableHmr;
|
|
13846
|
+
}
|
|
13847
|
+
literalCache = /* @__PURE__ */ new Map();
|
|
13848
|
+
elementSchemaRegistry = new DomElementSchemaRegistry3();
|
|
13849
|
+
preanalyzeTemplateCache = /* @__PURE__ */ new Map();
|
|
13850
|
+
preanalyzeStylesCache = /* @__PURE__ */ new Map();
|
|
13851
|
+
canDeferDeps;
|
|
13852
|
+
extractTemplateOptions;
|
|
13853
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
13854
|
+
name = "ComponentDecoratorHandler";
|
|
13313
13855
|
detect(node, decorators) {
|
|
13314
13856
|
if (!decorators) {
|
|
13315
13857
|
return void 0;
|
|
@@ -13335,7 +13877,11 @@ var ComponentDecoratorHandler = class {
|
|
|
13335
13877
|
const resolveStyleUrl = (styleUrl) => {
|
|
13336
13878
|
try {
|
|
13337
13879
|
const resourceUrl = this.resourceLoader.resolve(styleUrl, containingFile);
|
|
13338
|
-
return this.resourceLoader.preload(resourceUrl, {
|
|
13880
|
+
return this.resourceLoader.preload(resourceUrl, {
|
|
13881
|
+
type: "style",
|
|
13882
|
+
containingFile,
|
|
13883
|
+
className: node.name.text
|
|
13884
|
+
});
|
|
13339
13885
|
} catch {
|
|
13340
13886
|
return void 0;
|
|
13341
13887
|
}
|
|
@@ -13357,9 +13903,15 @@ var ComponentDecoratorHandler = class {
|
|
|
13357
13903
|
const componentStyleUrls = extractComponentStyleUrls(this.evaluator, component);
|
|
13358
13904
|
return templateAndTemplateStyleResources.then(async (templateInfo) => {
|
|
13359
13905
|
let styles = null;
|
|
13906
|
+
let orderOffset = 0;
|
|
13360
13907
|
const rawStyles = parseDirectiveStyles(component, this.evaluator, this.compilationMode);
|
|
13361
13908
|
if (rawStyles == null ? void 0 : rawStyles.length) {
|
|
13362
|
-
styles = await Promise.all(rawStyles.map((style) => this.resourceLoader.preprocessInline(style, {
|
|
13909
|
+
styles = await Promise.all(rawStyles.map((style) => this.resourceLoader.preprocessInline(style, {
|
|
13910
|
+
type: "style",
|
|
13911
|
+
containingFile,
|
|
13912
|
+
order: orderOffset++,
|
|
13913
|
+
className: node.name.text
|
|
13914
|
+
})));
|
|
13363
13915
|
}
|
|
13364
13916
|
if (templateInfo.templateStyles) {
|
|
13365
13917
|
styles != null ? styles : styles = [];
|
|
@@ -13367,11 +13919,16 @@ var ComponentDecoratorHandler = class {
|
|
|
13367
13919
|
var _a;
|
|
13368
13920
|
return this.resourceLoader.preprocessInline(style, {
|
|
13369
13921
|
type: "style",
|
|
13370
|
-
containingFile: (_a = templateInfo.templateUrl) != null ? _a : containingFile
|
|
13922
|
+
containingFile: (_a = templateInfo.templateUrl) != null ? _a : containingFile,
|
|
13923
|
+
order: orderOffset++,
|
|
13924
|
+
className: node.name.text
|
|
13371
13925
|
});
|
|
13372
13926
|
})));
|
|
13373
13927
|
}
|
|
13374
13928
|
this.preanalyzeStylesCache.set(node, styles);
|
|
13929
|
+
if (this.externalRuntimeStyles) {
|
|
13930
|
+
return;
|
|
13931
|
+
}
|
|
13375
13932
|
await Promise.all([
|
|
13376
13933
|
...componentStyleUrls.map((styleUrl) => resolveStyleUrl(styleUrl.url)),
|
|
13377
13934
|
...templateInfo.templateStyleUrls.map((url) => resolveStyleUrl(url))
|
|
@@ -13385,7 +13942,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13385
13942
|
this.literalCache.delete(decorator);
|
|
13386
13943
|
let diagnostics;
|
|
13387
13944
|
let isPoisoned = false;
|
|
13388
|
-
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.importTracker, this.evaluator, this.refEmitter, this.referencesRegistry, this.isCore, this.annotateForClosureCompiler, this.compilationMode, this.elementSchemaRegistry.getDefaultComponentElementName(), this.strictStandalone);
|
|
13945
|
+
const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.importTracker, this.evaluator, this.refEmitter, this.referencesRegistry, this.isCore, this.annotateForClosureCompiler, this.compilationMode, this.elementSchemaRegistry.getDefaultComponentElementName(), this.strictStandalone, this.implicitStandaloneValue);
|
|
13389
13946
|
if (directiveResult.jitForced) {
|
|
13390
13947
|
this.jitDeclarationRegistry.jitDeclarations.add(node);
|
|
13391
13948
|
return {};
|
|
@@ -13396,13 +13953,13 @@ var ComponentDecoratorHandler = class {
|
|
|
13396
13953
|
if (this.compilationMode !== CompilationMode.LOCAL) {
|
|
13397
13954
|
changeDetection = resolveEnumValue(this.evaluator, component, "changeDetection", "ChangeDetectionStrategy");
|
|
13398
13955
|
} else if (component.has("changeDetection")) {
|
|
13399
|
-
changeDetection = new
|
|
13956
|
+
changeDetection = new o4.WrappedNodeExpr(component.get("changeDetection"));
|
|
13400
13957
|
}
|
|
13401
13958
|
let animations = null;
|
|
13402
13959
|
let animationTriggerNames = null;
|
|
13403
13960
|
if (component.has("animations")) {
|
|
13404
13961
|
const animationExpression = component.get("animations");
|
|
13405
|
-
animations = new
|
|
13962
|
+
animations = new o4.WrappedNodeExpr(animationExpression);
|
|
13406
13963
|
const animationsValue = this.evaluator.evaluate(animationExpression, animationTriggerResolver);
|
|
13407
13964
|
animationTriggerNames = { includesDynamicAnimations: false, staticTriggerNames: [] };
|
|
13408
13965
|
collectAnimationNames(animationsValue, animationTriggerNames);
|
|
@@ -13421,7 +13978,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13421
13978
|
if (component.has("viewProviders")) {
|
|
13422
13979
|
const viewProviders = component.get("viewProviders");
|
|
13423
13980
|
viewProvidersRequiringFactory = resolveProvidersRequiringFactory(viewProviders, this.reflector, this.evaluator);
|
|
13424
|
-
wrappedViewProviders = new
|
|
13981
|
+
wrappedViewProviders = new o4.WrappedNodeExpr(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(viewProviders) : viewProviders);
|
|
13425
13982
|
}
|
|
13426
13983
|
if (component.has("providers")) {
|
|
13427
13984
|
providersRequiringFactory = resolveProvidersRequiringFactory(component.get("providers"), this.reflector, this.evaluator);
|
|
@@ -13511,6 +14068,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13511
14068
|
expression: template.sourceMapping.node
|
|
13512
14069
|
};
|
|
13513
14070
|
let styles = [];
|
|
14071
|
+
const externalStyles = [];
|
|
13514
14072
|
const styleResources = extractInlineStyleResources(component);
|
|
13515
14073
|
const styleUrls = [
|
|
13516
14074
|
...extractComponentStyleUrls(this.evaluator, component),
|
|
@@ -13519,7 +14077,11 @@ var ComponentDecoratorHandler = class {
|
|
|
13519
14077
|
for (const styleUrl of styleUrls) {
|
|
13520
14078
|
try {
|
|
13521
14079
|
const resourceUrl = this.resourceLoader.resolve(styleUrl.url, containingFile);
|
|
13522
|
-
if (
|
|
14080
|
+
if (this.externalRuntimeStyles) {
|
|
14081
|
+
externalStyles.push(resourceUrl);
|
|
14082
|
+
continue;
|
|
14083
|
+
}
|
|
14084
|
+
if (styleUrl.source === 2 && ts47.isStringLiteralLike(styleUrl.expression)) {
|
|
13523
14085
|
styleResources.add({
|
|
13524
14086
|
path: absoluteFrom(resourceUrl),
|
|
13525
14087
|
expression: styleUrl.expression
|
|
@@ -13554,8 +14116,12 @@ var ComponentDecoratorHandler = class {
|
|
|
13554
14116
|
if (this.preanalyzeStylesCache.has(node)) {
|
|
13555
14117
|
inlineStyles = this.preanalyzeStylesCache.get(node);
|
|
13556
14118
|
this.preanalyzeStylesCache.delete(node);
|
|
13557
|
-
if (inlineStyles
|
|
13558
|
-
|
|
14119
|
+
if (inlineStyles == null ? void 0 : inlineStyles.length) {
|
|
14120
|
+
if (this.externalRuntimeStyles) {
|
|
14121
|
+
externalStyles.push(...inlineStyles);
|
|
14122
|
+
} else {
|
|
14123
|
+
styles.push(...inlineStyles);
|
|
14124
|
+
}
|
|
13559
14125
|
}
|
|
13560
14126
|
} else {
|
|
13561
14127
|
if (this.resourceLoader.canPreprocess) {
|
|
@@ -13600,17 +14166,19 @@ var ComponentDecoratorHandler = class {
|
|
|
13600
14166
|
changeDetection,
|
|
13601
14167
|
interpolation: (_d = template.interpolationConfig) != null ? _d : DEFAULT_INTERPOLATION_CONFIG2,
|
|
13602
14168
|
styles,
|
|
14169
|
+
externalStyles,
|
|
13603
14170
|
animations,
|
|
13604
14171
|
viewProviders: wrappedViewProviders,
|
|
13605
14172
|
i18nUseExternalIds: this.i18nUseExternalIds,
|
|
13606
14173
|
relativeContextFilePath,
|
|
13607
|
-
rawImports: rawImports !== null ? new
|
|
14174
|
+
rawImports: rawImports !== null ? new o4.WrappedNodeExpr(rawImports) : void 0
|
|
13608
14175
|
},
|
|
13609
14176
|
typeCheckMeta: extractDirectiveTypeCheckMeta(node, inputs, this.reflector),
|
|
13610
14177
|
classMetadata: this.includeClassMetadata ? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, (dec) => transformDecoratorResources(dec, component, styles, template)) : null,
|
|
13611
14178
|
classDebugInfo: extractClassDebugInfo(
|
|
13612
14179
|
node,
|
|
13613
14180
|
this.reflector,
|
|
14181
|
+
this.compilerHost,
|
|
13614
14182
|
this.rootDirs,
|
|
13615
14183
|
this.forbidOrphanRendering
|
|
13616
14184
|
),
|
|
@@ -13715,7 +14283,7 @@ var ComponentDecoratorHandler = class {
|
|
|
13715
14283
|
}
|
|
13716
14284
|
typeCheck(ctx, node, meta) {
|
|
13717
14285
|
var _a;
|
|
13718
|
-
if (this.typeCheckScopeRegistry === null || !
|
|
14286
|
+
if (this.typeCheckScopeRegistry === null || !ts47.isClassDeclaration(node)) {
|
|
13719
14287
|
return;
|
|
13720
14288
|
}
|
|
13721
14289
|
if (meta.isPoisoned && !this.usePoisonedData) {
|
|
@@ -13952,11 +14520,11 @@ var ComponentDecoratorHandler = class {
|
|
|
13952
14520
|
const importDiagnostics = validateStandaloneImports(analysis.resolvedDeferredImports, analysis.rawDeferredImports, this.metaReader, this.scopeReader, true);
|
|
13953
14521
|
diagnostics.push(...importDiagnostics);
|
|
13954
14522
|
}
|
|
13955
|
-
if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof
|
|
14523
|
+
if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof o4.WrappedNodeExpr) {
|
|
13956
14524
|
const providerDiagnostics = getProviderDiagnostics(analysis.providersRequiringFactory, analysis.meta.providers.node, this.injectableRegistry);
|
|
13957
14525
|
diagnostics.push(...providerDiagnostics);
|
|
13958
14526
|
}
|
|
13959
|
-
if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof
|
|
14527
|
+
if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof o4.WrappedNodeExpr) {
|
|
13960
14528
|
const viewProviderDiagnostics = getProviderDiagnostics(analysis.viewProvidersRequiringFactory, analysis.meta.viewProviders.node, this.injectableRegistry);
|
|
13961
14529
|
diagnostics.push(...viewProviderDiagnostics);
|
|
13962
14530
|
}
|
|
@@ -14009,20 +14577,24 @@ var ComponentDecoratorHandler = class {
|
|
|
14009
14577
|
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
|
|
14010
14578
|
return [];
|
|
14011
14579
|
}
|
|
14012
|
-
const perComponentDeferredDeps = this.resolveAllDeferredDependencies(resolution);
|
|
14580
|
+
const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
|
|
14013
14581
|
const meta = {
|
|
14014
14582
|
...analysis.meta,
|
|
14015
14583
|
...resolution,
|
|
14016
14584
|
defer: this.compileDeferBlocks(resolution)
|
|
14017
14585
|
};
|
|
14018
14586
|
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14019
|
-
|
|
14587
|
+
if (perComponentDeferredDeps !== null) {
|
|
14588
|
+
removeDeferrableTypesFromComponentDecorator(analysis, perComponentDeferredDeps);
|
|
14589
|
+
}
|
|
14020
14590
|
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14021
14591
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14022
14592
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14023
14593
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14024
|
-
const
|
|
14025
|
-
|
|
14594
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14595
|
+
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14596
|
+
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14597
|
+
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
14026
14598
|
}
|
|
14027
14599
|
compilePartial(node, analysis, resolution) {
|
|
14028
14600
|
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
|
|
@@ -14032,9 +14604,9 @@ var ComponentDecoratorHandler = class {
|
|
|
14032
14604
|
content: analysis.template.content,
|
|
14033
14605
|
sourceUrl: analysis.template.declaration.resolvedTemplateUrl,
|
|
14034
14606
|
isInline: analysis.template.declaration.isInline,
|
|
14035
|
-
inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new
|
|
14607
|
+
inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new o4.WrappedNodeExpr(analysis.template.sourceMapping.node) : null
|
|
14036
14608
|
};
|
|
14037
|
-
const perComponentDeferredDeps = this.resolveAllDeferredDependencies(resolution);
|
|
14609
|
+
const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
|
|
14038
14610
|
const meta = {
|
|
14039
14611
|
...analysis.meta,
|
|
14040
14612
|
...resolution,
|
|
@@ -14044,26 +14616,48 @@ var ComponentDecoratorHandler = class {
|
|
|
14044
14616
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14045
14617
|
const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
|
|
14046
14618
|
const classMetadata = analysis.classMetadata !== null ? compileComponentDeclareClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
|
|
14047
|
-
const
|
|
14048
|
-
|
|
14619
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, null) : null;
|
|
14620
|
+
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14621
|
+
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14622
|
+
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, null, hmrInitializer);
|
|
14049
14623
|
}
|
|
14050
14624
|
compileLocal(node, analysis, resolution, pool) {
|
|
14051
|
-
const deferrableTypes = analysis.explicitlyDeferredTypes;
|
|
14625
|
+
const deferrableTypes = this.canDeferDeps ? analysis.explicitlyDeferredTypes : null;
|
|
14052
14626
|
const meta = {
|
|
14053
14627
|
...analysis.meta,
|
|
14054
14628
|
...resolution,
|
|
14055
14629
|
defer: this.compileDeferBlocks(resolution)
|
|
14056
14630
|
};
|
|
14057
|
-
if (
|
|
14058
|
-
removeDeferrableTypesFromComponentDecorator(analysis,
|
|
14631
|
+
if (deferrableTypes !== null) {
|
|
14632
|
+
removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes);
|
|
14059
14633
|
}
|
|
14060
14634
|
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14061
14635
|
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14062
14636
|
const inputTransformFields = compileInputTransformFields(analysis.inputs);
|
|
14063
14637
|
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, deferrableTypes).toStmt() : null;
|
|
14064
14638
|
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14065
|
-
const
|
|
14066
|
-
|
|
14639
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14640
|
+
const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
|
|
14641
|
+
const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
|
|
14642
|
+
return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
|
|
14643
|
+
}
|
|
14644
|
+
compileHmrUpdateDeclaration(node, analysis, resolution) {
|
|
14645
|
+
if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
|
|
14646
|
+
return null;
|
|
14647
|
+
}
|
|
14648
|
+
const pool = new ConstantPool2();
|
|
14649
|
+
const meta = {
|
|
14650
|
+
...analysis.meta,
|
|
14651
|
+
...resolution,
|
|
14652
|
+
defer: this.compileDeferBlocks(resolution)
|
|
14653
|
+
};
|
|
14654
|
+
const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
|
|
14655
|
+
const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
|
|
14656
|
+
const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, null).toStmt() : null;
|
|
14657
|
+
const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
|
|
14658
|
+
const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
|
|
14659
|
+
const res = compileResults(fac, def, classMetadata, "\u0275cmp", null, null, debugInfo, null);
|
|
14660
|
+
return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node.getSourceFile());
|
|
14067
14661
|
}
|
|
14068
14662
|
locateDeferBlocksWithoutScope(template) {
|
|
14069
14663
|
const deferBlocks = /* @__PURE__ */ new Map();
|
|
@@ -14093,12 +14687,12 @@ var ComponentDecoratorHandler = class {
|
|
|
14093
14687
|
}
|
|
14094
14688
|
collectExplicitlyDeferredSymbols(rawDeferredImports) {
|
|
14095
14689
|
const deferredTypes = /* @__PURE__ */ new Map();
|
|
14096
|
-
if (!
|
|
14690
|
+
if (!ts47.isArrayLiteralExpression(rawDeferredImports)) {
|
|
14097
14691
|
return deferredTypes;
|
|
14098
14692
|
}
|
|
14099
14693
|
for (const element of rawDeferredImports.elements) {
|
|
14100
14694
|
const node = tryUnwrapForwardRef(element, this.reflector) || element;
|
|
14101
|
-
if (!
|
|
14695
|
+
if (!ts47.isIdentifier(node)) {
|
|
14102
14696
|
continue;
|
|
14103
14697
|
}
|
|
14104
14698
|
const imp = this.reflector.getImportOfIdentifier(node);
|
|
@@ -14165,12 +14759,12 @@ var ComponentDecoratorHandler = class {
|
|
|
14165
14759
|
}
|
|
14166
14760
|
}
|
|
14167
14761
|
registerDeferrableCandidates(componentClassDecl, importsExpr, isDeferredImport, allDeferredDecls, eagerlyUsedDecls, resolutionData) {
|
|
14168
|
-
if (!
|
|
14762
|
+
if (!ts47.isArrayLiteralExpression(importsExpr)) {
|
|
14169
14763
|
return;
|
|
14170
14764
|
}
|
|
14171
14765
|
for (const element of importsExpr.elements) {
|
|
14172
14766
|
const node = tryUnwrapForwardRef(element, this.reflector) || element;
|
|
14173
|
-
if (!
|
|
14767
|
+
if (!ts47.isIdentifier(node)) {
|
|
14174
14768
|
continue;
|
|
14175
14769
|
}
|
|
14176
14770
|
const imp = this.reflector.getImportOfIdentifier(node);
|
|
@@ -14254,7 +14848,7 @@ function removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes)
|
|
|
14254
14848
|
if (analysis.classMetadata) {
|
|
14255
14849
|
const deferrableSymbols = new Set(deferrableTypes.map((t) => t.symbolName));
|
|
14256
14850
|
const rewrittenDecoratorsNode = removeIdentifierReferences(analysis.classMetadata.decorators.node, deferrableSymbols);
|
|
14257
|
-
analysis.classMetadata.decorators = new
|
|
14851
|
+
analysis.classMetadata.decorators = new o4.WrappedNodeExpr(rewrittenDecoratorsNode);
|
|
14258
14852
|
}
|
|
14259
14853
|
}
|
|
14260
14854
|
function validateNoImportOverlap(eagerDeps, deferredDeps, rawDeferredImports) {
|
|
@@ -14302,10 +14896,19 @@ function isDefaultImport(node) {
|
|
|
14302
14896
|
return node.importClause !== void 0 && node.importClause.namedBindings === void 0;
|
|
14303
14897
|
}
|
|
14304
14898
|
|
|
14305
|
-
// bazel-out/
|
|
14899
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
|
|
14306
14900
|
import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr10 } from "@angular/compiler";
|
|
14307
|
-
import
|
|
14901
|
+
import ts48 from "typescript";
|
|
14308
14902
|
var InjectableDecoratorHandler = class {
|
|
14903
|
+
reflector;
|
|
14904
|
+
evaluator;
|
|
14905
|
+
isCore;
|
|
14906
|
+
strictCtorDeps;
|
|
14907
|
+
injectableRegistry;
|
|
14908
|
+
perf;
|
|
14909
|
+
includeClassMetadata;
|
|
14910
|
+
compilationMode;
|
|
14911
|
+
errorOnDuplicateProv;
|
|
14309
14912
|
constructor(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, perf, includeClassMetadata, compilationMode, errorOnDuplicateProv = true) {
|
|
14310
14913
|
this.reflector = reflector;
|
|
14311
14914
|
this.evaluator = evaluator;
|
|
@@ -14316,9 +14919,9 @@ var InjectableDecoratorHandler = class {
|
|
|
14316
14919
|
this.includeClassMetadata = includeClassMetadata;
|
|
14317
14920
|
this.compilationMode = compilationMode;
|
|
14318
14921
|
this.errorOnDuplicateProv = errorOnDuplicateProv;
|
|
14319
|
-
this.precedence = HandlerPrecedence.SHARED;
|
|
14320
|
-
this.name = "InjectableDecoratorHandler";
|
|
14321
14922
|
}
|
|
14923
|
+
precedence = HandlerPrecedence.SHARED;
|
|
14924
|
+
name = "InjectableDecoratorHandler";
|
|
14322
14925
|
detect(node, decorators) {
|
|
14323
14926
|
if (!decorators) {
|
|
14324
14927
|
return void 0;
|
|
@@ -14424,7 +15027,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
14424
15027
|
};
|
|
14425
15028
|
} else if (decorator.args.length === 1) {
|
|
14426
15029
|
const metaNode = decorator.args[0];
|
|
14427
|
-
if (!
|
|
15030
|
+
if (!ts48.isObjectLiteralExpression(metaNode)) {
|
|
14428
15031
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
|
|
14429
15032
|
}
|
|
14430
15033
|
const meta = reflectObjectLiteral(metaNode);
|
|
@@ -14432,7 +15035,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
14432
15035
|
let deps = void 0;
|
|
14433
15036
|
if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
|
|
14434
15037
|
const depsExpr = meta.get("deps");
|
|
14435
|
-
if (!
|
|
15038
|
+
if (!ts48.isArrayLiteralExpression(depsExpr)) {
|
|
14436
15039
|
throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
|
|
14437
15040
|
}
|
|
14438
15041
|
deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
|
|
@@ -14517,12 +15120,12 @@ function getDep(dep, reflector) {
|
|
|
14517
15120
|
}
|
|
14518
15121
|
return true;
|
|
14519
15122
|
}
|
|
14520
|
-
if (
|
|
15123
|
+
if (ts48.isArrayLiteralExpression(dep)) {
|
|
14521
15124
|
dep.elements.forEach((el) => {
|
|
14522
15125
|
let isDecorator = false;
|
|
14523
|
-
if (
|
|
15126
|
+
if (ts48.isIdentifier(el)) {
|
|
14524
15127
|
isDecorator = maybeUpdateDecorator(el, reflector);
|
|
14525
|
-
} else if (
|
|
15128
|
+
} else if (ts48.isNewExpression(el) && ts48.isIdentifier(el.expression)) {
|
|
14526
15129
|
const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
|
|
14527
15130
|
isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
|
|
14528
15131
|
}
|
|
@@ -14534,10 +15137,11 @@ function getDep(dep, reflector) {
|
|
|
14534
15137
|
return meta;
|
|
14535
15138
|
}
|
|
14536
15139
|
|
|
14537
|
-
// bazel-out/
|
|
15140
|
+
// bazel-out/darwin_arm64-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
|
|
14538
15141
|
import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
|
|
14539
|
-
import
|
|
15142
|
+
import ts49 from "typescript";
|
|
14540
15143
|
var PipeSymbol = class extends SemanticSymbol {
|
|
15144
|
+
name;
|
|
14541
15145
|
constructor(decl, name) {
|
|
14542
15146
|
super(decl);
|
|
14543
15147
|
this.name = name;
|
|
@@ -14553,7 +15157,19 @@ var PipeSymbol = class extends SemanticSymbol {
|
|
|
14553
15157
|
}
|
|
14554
15158
|
};
|
|
14555
15159
|
var PipeDecoratorHandler = class {
|
|
14556
|
-
|
|
15160
|
+
reflector;
|
|
15161
|
+
evaluator;
|
|
15162
|
+
metaRegistry;
|
|
15163
|
+
scopeRegistry;
|
|
15164
|
+
injectableRegistry;
|
|
15165
|
+
isCore;
|
|
15166
|
+
perf;
|
|
15167
|
+
includeClassMetadata;
|
|
15168
|
+
compilationMode;
|
|
15169
|
+
generateExtraImportsInLocalMode;
|
|
15170
|
+
strictStandalone;
|
|
15171
|
+
implicitStandaloneValue;
|
|
15172
|
+
constructor(reflector, evaluator, metaRegistry, scopeRegistry, injectableRegistry, isCore, perf, includeClassMetadata, compilationMode, generateExtraImportsInLocalMode, strictStandalone, implicitStandaloneValue) {
|
|
14557
15173
|
this.reflector = reflector;
|
|
14558
15174
|
this.evaluator = evaluator;
|
|
14559
15175
|
this.metaRegistry = metaRegistry;
|
|
@@ -14565,9 +15181,10 @@ var PipeDecoratorHandler = class {
|
|
|
14565
15181
|
this.compilationMode = compilationMode;
|
|
14566
15182
|
this.generateExtraImportsInLocalMode = generateExtraImportsInLocalMode;
|
|
14567
15183
|
this.strictStandalone = strictStandalone;
|
|
14568
|
-
this.
|
|
14569
|
-
this.name = "PipeDecoratorHandler";
|
|
15184
|
+
this.implicitStandaloneValue = implicitStandaloneValue;
|
|
14570
15185
|
}
|
|
15186
|
+
precedence = HandlerPrecedence.PRIMARY;
|
|
15187
|
+
name = "PipeDecoratorHandler";
|
|
14571
15188
|
detect(node, decorators) {
|
|
14572
15189
|
if (!decorators) {
|
|
14573
15190
|
return void 0;
|
|
@@ -14595,7 +15212,7 @@ var PipeDecoratorHandler = class {
|
|
|
14595
15212
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, "@Pipe must have exactly one argument");
|
|
14596
15213
|
}
|
|
14597
15214
|
const meta = unwrapExpression(decorator.args[0]);
|
|
14598
|
-
if (!
|
|
15215
|
+
if (!ts49.isObjectLiteralExpression(meta)) {
|
|
14599
15216
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
|
|
14600
15217
|
}
|
|
14601
15218
|
const pipe = reflectObjectLiteral(meta);
|
|
@@ -14616,7 +15233,7 @@ var PipeDecoratorHandler = class {
|
|
|
14616
15233
|
}
|
|
14617
15234
|
pure = pureValue;
|
|
14618
15235
|
}
|
|
14619
|
-
let isStandalone =
|
|
15236
|
+
let isStandalone = this.implicitStandaloneValue;
|
|
14620
15237
|
if (pipe.has("standalone")) {
|
|
14621
15238
|
const expr = pipe.get("standalone");
|
|
14622
15239
|
const resolved = this.evaluator.evaluate(expr);
|
|
@@ -14768,4 +15385,4 @@ export {
|
|
|
14768
15385
|
* Use of this source code is governed by an MIT-style license that can be
|
|
14769
15386
|
* found in the LICENSE file at https://angular.dev/license
|
|
14770
15387
|
*/
|
|
14771
|
-
//# sourceMappingURL=chunk-
|
|
15388
|
+
//# sourceMappingURL=chunk-S2JI2WY5.js.map
|