@angular/compiler-cli 13.1.1 → 13.1.2
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-KWZNY2SK.js → chunk-5TY44ZS3.js} +96 -98
- package/bundles/chunk-5TY44ZS3.js.map +6 -0
- package/bundles/{chunk-TI3THPMZ.js → chunk-676MI6WZ.js} +39 -60
- package/bundles/chunk-676MI6WZ.js.map +6 -0
- package/bundles/{chunk-DJRTTRF3.js → chunk-6VRWTEQB.js} +61 -63
- package/bundles/chunk-6VRWTEQB.js.map +6 -0
- package/bundles/{chunk-X46CEINM.js → chunk-7PY7XEFH.js} +9 -9
- package/bundles/chunk-7PY7XEFH.js.map +6 -0
- package/bundles/{chunk-AUFNJGZ6.js → chunk-A5PL3TE6.js} +9 -9
- package/bundles/chunk-A5PL3TE6.js.map +6 -0
- package/bundles/{chunk-PF3ZPGF5.js → chunk-ADHVDA4A.js} +12 -12
- package/bundles/{chunk-PF3ZPGF5.js.map → chunk-ADHVDA4A.js.map} +1 -1
- package/bundles/{chunk-FXVUPJ6A.js → chunk-FUZ3CSDO.js} +330 -434
- package/bundles/chunk-FUZ3CSDO.js.map +6 -0
- package/bundles/{chunk-J6CW3T62.js → chunk-GLCRIILX.js} +5 -5
- package/bundles/{chunk-J6CW3T62.js.map → chunk-GLCRIILX.js.map} +0 -0
- package/bundles/{chunk-W5CGOJQ4.js → chunk-JOLPJ2E4.js} +16 -20
- package/bundles/chunk-JOLPJ2E4.js.map +6 -0
- package/bundles/{chunk-QFB4WK55.js → chunk-O4XVCXRT.js} +4 -4
- package/bundles/{chunk-QFB4WK55.js.map → chunk-O4XVCXRT.js.map} +0 -0
- package/bundles/{chunk-O5ZEI3UY.js → chunk-QBU7RUKB.js} +270 -100
- package/bundles/chunk-QBU7RUKB.js.map +6 -0
- package/bundles/{chunk-BPCUCINV.js → chunk-QDWL7SZJ.js} +2 -2
- package/bundles/{chunk-BPCUCINV.js.map → chunk-QDWL7SZJ.js.map} +0 -0
- package/bundles/{chunk-JTYUTYS2.js → chunk-SKBLJA43.js} +3 -3
- package/bundles/{chunk-JTYUTYS2.js.map → chunk-SKBLJA43.js.map} +0 -0
- package/bundles/{chunk-P5ZW5MI4.js → chunk-TUNE6DP3.js} +485 -350
- package/bundles/chunk-TUNE6DP3.js.map +6 -0
- package/bundles/{chunk-OOIW53QX.js → chunk-UESD6FVI.js} +39 -41
- package/bundles/chunk-UESD6FVI.js.map +6 -0
- package/bundles/{chunk-XA5IZLLC.js → chunk-WQ3TNYTD.js} +6 -6
- package/bundles/{chunk-XA5IZLLC.js.map → chunk-WQ3TNYTD.js.map} +0 -0
- package/bundles/index.js +14 -14
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +85 -85
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +13 -13
- package/bundles/ngcc/main-ngcc.js +14 -14
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +14 -14
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +5 -5
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +6 -6
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +11 -11
- package/bundles/src/bin/ngc.js +11 -11
- package/bundles/src/bin/ngc.js.map +1 -1
- package/bundles_metadata.json +1 -1
- package/index.d.ts +2 -0
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/annotations/src/util.d.ts +1 -1
- package/src/ngtsc/core/api/src/options.d.ts +3 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +38 -0
- package/src/ngtsc/diagnostics/index.d.ts +2 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +1 -0
- package/src/ngtsc/diagnostics/src/error_code.d.ts +7 -0
- package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +21 -0
- package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -0
- package/src/ngtsc/imports/index.d.ts +1 -1
- package/src/ngtsc/imports/src/emitter.d.ts +40 -8
- package/src/ngtsc/translator/src/translator.d.ts +0 -5
- package/src/ngtsc/translator/src/type_translator.d.ts +0 -2
- package/src/ngtsc/typecheck/extended/api/api.d.ts +30 -10
- package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +3 -14
- package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +3 -15
- package/src/ngtsc/typecheck/extended/index.d.ts +3 -0
- package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +5 -4
- package/src/ngtsc/typecheck/src/environment.d.ts +3 -1
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +10 -2
- package/src/ngtsc/typecheck/src/type_constructor.d.ts +3 -2
- package/src/ngtsc/typecheck/src/type_emitter.d.ts +7 -21
- package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +2 -2
- package/bundles/chunk-AUFNJGZ6.js.map +0 -6
- package/bundles/chunk-DJRTTRF3.js.map +0 -6
- package/bundles/chunk-FXVUPJ6A.js.map +0 -6
- package/bundles/chunk-KWZNY2SK.js.map +0 -6
- package/bundles/chunk-O5ZEI3UY.js.map +0 -6
- package/bundles/chunk-OOIW53QX.js.map +0 -6
- package/bundles/chunk-P5ZW5MI4.js.map +0 -6
- package/bundles/chunk-TI3THPMZ.js.map +0 -6
- package/bundles/chunk-W5CGOJQ4.js.map +0 -6
- package/bundles/chunk-X46CEINM.js.map +0 -6
|
@@ -13,37 +13,42 @@ import {
|
|
|
13
13
|
reflectObjectLiteral,
|
|
14
14
|
reflectTypeEntityToDeclaration,
|
|
15
15
|
typeNodeToValueExpr
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7PY7XEFH.js";
|
|
17
17
|
import {
|
|
18
|
+
ErrorCode,
|
|
19
|
+
FatalDiagnosticError,
|
|
18
20
|
ImportFlags,
|
|
19
21
|
ImportManager,
|
|
20
22
|
Reference,
|
|
23
|
+
assertSuccessfulReferenceEmit,
|
|
21
24
|
attachDefaultImportDeclaration,
|
|
22
25
|
createExportSpecifier,
|
|
23
26
|
getDefaultImportDeclaration,
|
|
24
27
|
getSourceFile,
|
|
25
28
|
identifierOfNode,
|
|
26
29
|
isDeclaration,
|
|
30
|
+
makeDiagnostic,
|
|
31
|
+
makeRelatedInformation,
|
|
27
32
|
nodeDebugInfo,
|
|
28
33
|
translateExpression,
|
|
29
34
|
translateStatement,
|
|
30
35
|
translateType
|
|
31
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-QBU7RUKB.js";
|
|
32
37
|
import {
|
|
33
38
|
absoluteFrom,
|
|
34
39
|
absoluteFromSourceFile,
|
|
35
40
|
relative
|
|
36
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-676MI6WZ.js";
|
|
37
42
|
import {
|
|
38
43
|
PerfEvent,
|
|
39
44
|
PerfPhase
|
|
40
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-GLCRIILX.js";
|
|
41
46
|
import {
|
|
42
47
|
__spreadProps,
|
|
43
48
|
__spreadValues
|
|
44
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-WQ3TNYTD.js";
|
|
45
50
|
|
|
46
|
-
// bazel-out/
|
|
51
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/dynamic.mjs
|
|
47
52
|
var DynamicValue = class {
|
|
48
53
|
constructor(node, reason, code) {
|
|
49
54
|
this.node = node;
|
|
@@ -128,10 +133,10 @@ var DynamicValue = class {
|
|
|
128
133
|
}
|
|
129
134
|
};
|
|
130
135
|
|
|
131
|
-
// bazel-out/
|
|
136
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
132
137
|
import ts from "typescript";
|
|
133
138
|
|
|
134
|
-
// bazel-out/
|
|
139
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/result.mjs
|
|
135
140
|
var ResolvedModule = class {
|
|
136
141
|
constructor(exports, evaluate) {
|
|
137
142
|
this.exports = exports;
|
|
@@ -144,7 +149,7 @@ var ResolvedModule = class {
|
|
|
144
149
|
return this.evaluate(this.exports.get(name));
|
|
145
150
|
}
|
|
146
151
|
getExports() {
|
|
147
|
-
const map = new Map();
|
|
152
|
+
const map = /* @__PURE__ */ new Map();
|
|
148
153
|
this.exports.forEach((decl, name) => {
|
|
149
154
|
map.set(name, this.evaluate(decl));
|
|
150
155
|
});
|
|
@@ -161,7 +166,7 @@ var EnumValue = class {
|
|
|
161
166
|
var KnownFn = class {
|
|
162
167
|
};
|
|
163
168
|
|
|
164
|
-
// bazel-out/
|
|
169
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/builtin.mjs
|
|
165
170
|
var ArraySliceBuiltinFn = class extends KnownFn {
|
|
166
171
|
constructor(lhs) {
|
|
167
172
|
super();
|
|
@@ -232,7 +237,7 @@ var ObjectAssignBuiltinFn = class extends KnownFn {
|
|
|
232
237
|
}
|
|
233
238
|
};
|
|
234
239
|
|
|
235
|
-
// bazel-out/
|
|
240
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/ts_helpers.mjs
|
|
236
241
|
var AssignHelperFn = class extends ObjectAssignBuiltinFn {
|
|
237
242
|
};
|
|
238
243
|
var SpreadHelperFn = class extends KnownFn {
|
|
@@ -285,8 +290,8 @@ var ReadHelperFn = class extends KnownFn {
|
|
|
285
290
|
}
|
|
286
291
|
};
|
|
287
292
|
|
|
288
|
-
// bazel-out/
|
|
289
|
-
var jsGlobalObjectValue = new Map([["assign", new ObjectAssignBuiltinFn()]]);
|
|
293
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/known_declaration.mjs
|
|
294
|
+
var jsGlobalObjectValue = /* @__PURE__ */ new Map([["assign", new ObjectAssignBuiltinFn()]]);
|
|
290
295
|
var assignTsHelperFn = new AssignHelperFn();
|
|
291
296
|
var spreadTsHelperFn = new SpreadHelperFn();
|
|
292
297
|
var spreadArrayTsHelperFn = new SpreadArrayHelperFn();
|
|
@@ -309,14 +314,14 @@ function resolveKnownDeclaration(decl) {
|
|
|
309
314
|
}
|
|
310
315
|
}
|
|
311
316
|
|
|
312
|
-
// bazel-out/
|
|
317
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interpreter.mjs
|
|
313
318
|
function literalBinaryOp(op) {
|
|
314
319
|
return { op, literal: true };
|
|
315
320
|
}
|
|
316
321
|
function referenceBinaryOp(op) {
|
|
317
322
|
return { op, literal: false };
|
|
318
323
|
}
|
|
319
|
-
var BINARY_OPERATORS = new Map([
|
|
324
|
+
var BINARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
320
325
|
[ts.SyntaxKind.PlusToken, literalBinaryOp((a, b) => a + b)],
|
|
321
326
|
[ts.SyntaxKind.MinusToken, literalBinaryOp((a, b) => a - b)],
|
|
322
327
|
[ts.SyntaxKind.AsteriskToken, literalBinaryOp((a, b) => a * b)],
|
|
@@ -340,7 +345,7 @@ var BINARY_OPERATORS = new Map([
|
|
|
340
345
|
[ts.SyntaxKind.AmpersandAmpersandToken, referenceBinaryOp((a, b) => a && b)],
|
|
341
346
|
[ts.SyntaxKind.BarBarToken, referenceBinaryOp((a, b) => a || b)]
|
|
342
347
|
]);
|
|
343
|
-
var UNARY_OPERATORS = new Map([
|
|
348
|
+
var UNARY_OPERATORS = /* @__PURE__ */ new Map([
|
|
344
349
|
[ts.SyntaxKind.TildeToken, (a) => ~a],
|
|
345
350
|
[ts.SyntaxKind.MinusToken, (a) => -a],
|
|
346
351
|
[ts.SyntaxKind.PlusToken, (a) => +a],
|
|
@@ -418,7 +423,7 @@ var StaticInterpreter = class {
|
|
|
418
423
|
return array;
|
|
419
424
|
}
|
|
420
425
|
visitObjectLiteralExpression(node, context) {
|
|
421
|
-
const map = new Map();
|
|
426
|
+
const map = /* @__PURE__ */ new Map();
|
|
422
427
|
for (let i = 0; i < node.properties.length; i++) {
|
|
423
428
|
const property = node.properties[i];
|
|
424
429
|
if (ts.isPropertyAssignment(property)) {
|
|
@@ -531,7 +536,7 @@ var StaticInterpreter = class {
|
|
|
531
536
|
}
|
|
532
537
|
visitEnumDeclaration(node, context) {
|
|
533
538
|
const enumRef = this.getReference(node, context);
|
|
534
|
-
const map = new Map();
|
|
539
|
+
const map = /* @__PURE__ */ new Map();
|
|
535
540
|
node.members.forEach((member) => {
|
|
536
541
|
const name = this.stringNameFromPropertyName(member.name, context);
|
|
537
542
|
if (name !== void 0) {
|
|
@@ -688,7 +693,7 @@ var StaticInterpreter = class {
|
|
|
688
693
|
}
|
|
689
694
|
const ret = fn.body[0];
|
|
690
695
|
const args = this.evaluateFunctionArguments(node, context);
|
|
691
|
-
const newScope = new Map();
|
|
696
|
+
const newScope = /* @__PURE__ */ new Map();
|
|
692
697
|
const calleeContext = __spreadProps(__spreadValues({}, context), { scope: newScope });
|
|
693
698
|
fn.parameters.forEach((param, index) => {
|
|
694
699
|
let arg = args[index];
|
|
@@ -816,7 +821,7 @@ var StaticInterpreter = class {
|
|
|
816
821
|
}
|
|
817
822
|
getResolvedEnum(node, enumMembers, context) {
|
|
818
823
|
const enumRef = this.getReference(node, context);
|
|
819
|
-
const map = new Map();
|
|
824
|
+
const map = /* @__PURE__ */ new Map();
|
|
820
825
|
enumMembers.forEach((member) => {
|
|
821
826
|
const name = this.stringNameFromPropertyName(member.name, context);
|
|
822
827
|
if (name !== void 0) {
|
|
@@ -896,7 +901,7 @@ function owningModule(context, override = null) {
|
|
|
896
901
|
}
|
|
897
902
|
}
|
|
898
903
|
|
|
899
|
-
// bazel-out/
|
|
904
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/interface.mjs
|
|
900
905
|
var PartialEvaluator = class {
|
|
901
906
|
constructor(host, checker, dependencyTracker) {
|
|
902
907
|
this.host = host;
|
|
@@ -910,133 +915,14 @@ var PartialEvaluator = class {
|
|
|
910
915
|
originatingFile: sourceFile,
|
|
911
916
|
absoluteModuleName: null,
|
|
912
917
|
resolutionContext: sourceFile.fileName,
|
|
913
|
-
scope: new Map(),
|
|
918
|
+
scope: /* @__PURE__ */ new Map(),
|
|
914
919
|
foreignFunctionResolver
|
|
915
920
|
});
|
|
916
921
|
}
|
|
917
922
|
};
|
|
918
923
|
|
|
919
|
-
// bazel-out/
|
|
920
|
-
import ts3 from "typescript";
|
|
921
|
-
|
|
922
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_code.mjs
|
|
923
|
-
var ErrorCode;
|
|
924
|
-
(function(ErrorCode2) {
|
|
925
|
-
ErrorCode2[ErrorCode2["DECORATOR_ARG_NOT_LITERAL"] = 1001] = "DECORATOR_ARG_NOT_LITERAL";
|
|
926
|
-
ErrorCode2[ErrorCode2["DECORATOR_ARITY_WRONG"] = 1002] = "DECORATOR_ARITY_WRONG";
|
|
927
|
-
ErrorCode2[ErrorCode2["DECORATOR_NOT_CALLED"] = 1003] = "DECORATOR_NOT_CALLED";
|
|
928
|
-
ErrorCode2[ErrorCode2["DECORATOR_ON_ANONYMOUS_CLASS"] = 1004] = "DECORATOR_ON_ANONYMOUS_CLASS";
|
|
929
|
-
ErrorCode2[ErrorCode2["DECORATOR_UNEXPECTED"] = 1005] = "DECORATOR_UNEXPECTED";
|
|
930
|
-
ErrorCode2[ErrorCode2["DECORATOR_COLLISION"] = 1006] = "DECORATOR_COLLISION";
|
|
931
|
-
ErrorCode2[ErrorCode2["VALUE_HAS_WRONG_TYPE"] = 1010] = "VALUE_HAS_WRONG_TYPE";
|
|
932
|
-
ErrorCode2[ErrorCode2["VALUE_NOT_LITERAL"] = 1011] = "VALUE_NOT_LITERAL";
|
|
933
|
-
ErrorCode2[ErrorCode2["COMPONENT_MISSING_TEMPLATE"] = 2001] = "COMPONENT_MISSING_TEMPLATE";
|
|
934
|
-
ErrorCode2[ErrorCode2["PIPE_MISSING_NAME"] = 2002] = "PIPE_MISSING_NAME";
|
|
935
|
-
ErrorCode2[ErrorCode2["PARAM_MISSING_TOKEN"] = 2003] = "PARAM_MISSING_TOKEN";
|
|
936
|
-
ErrorCode2[ErrorCode2["DIRECTIVE_MISSING_SELECTOR"] = 2004] = "DIRECTIVE_MISSING_SELECTOR";
|
|
937
|
-
ErrorCode2[ErrorCode2["UNDECORATED_PROVIDER"] = 2005] = "UNDECORATED_PROVIDER";
|
|
938
|
-
ErrorCode2[ErrorCode2["DIRECTIVE_INHERITS_UNDECORATED_CTOR"] = 2006] = "DIRECTIVE_INHERITS_UNDECORATED_CTOR";
|
|
939
|
-
ErrorCode2[ErrorCode2["UNDECORATED_CLASS_USING_ANGULAR_FEATURES"] = 2007] = "UNDECORATED_CLASS_USING_ANGULAR_FEATURES";
|
|
940
|
-
ErrorCode2[ErrorCode2["COMPONENT_RESOURCE_NOT_FOUND"] = 2008] = "COMPONENT_RESOURCE_NOT_FOUND";
|
|
941
|
-
ErrorCode2[ErrorCode2["COMPONENT_INVALID_SHADOW_DOM_SELECTOR"] = 2009] = "COMPONENT_INVALID_SHADOW_DOM_SELECTOR";
|
|
942
|
-
ErrorCode2[ErrorCode2["SYMBOL_NOT_EXPORTED"] = 3001] = "SYMBOL_NOT_EXPORTED";
|
|
943
|
-
ErrorCode2[ErrorCode2["SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME"] = 3002] = "SYMBOL_EXPORTED_UNDER_DIFFERENT_NAME";
|
|
944
|
-
ErrorCode2[ErrorCode2["IMPORT_CYCLE_DETECTED"] = 3003] = "IMPORT_CYCLE_DETECTED";
|
|
945
|
-
ErrorCode2[ErrorCode2["CONFIG_FLAT_MODULE_NO_INDEX"] = 4001] = "CONFIG_FLAT_MODULE_NO_INDEX";
|
|
946
|
-
ErrorCode2[ErrorCode2["CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK"] = 4002] = "CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK";
|
|
947
|
-
ErrorCode2[ErrorCode2["HOST_BINDING_PARSE_ERROR"] = 5001] = "HOST_BINDING_PARSE_ERROR";
|
|
948
|
-
ErrorCode2[ErrorCode2["TEMPLATE_PARSE_ERROR"] = 5002] = "TEMPLATE_PARSE_ERROR";
|
|
949
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_DECLARATION"] = 6001] = "NGMODULE_INVALID_DECLARATION";
|
|
950
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_IMPORT"] = 6002] = "NGMODULE_INVALID_IMPORT";
|
|
951
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_EXPORT"] = 6003] = "NGMODULE_INVALID_EXPORT";
|
|
952
|
-
ErrorCode2[ErrorCode2["NGMODULE_INVALID_REEXPORT"] = 6004] = "NGMODULE_INVALID_REEXPORT";
|
|
953
|
-
ErrorCode2[ErrorCode2["NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC"] = 6005] = "NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC";
|
|
954
|
-
ErrorCode2[ErrorCode2["NGMODULE_REEXPORT_NAME_COLLISION"] = 6006] = "NGMODULE_REEXPORT_NAME_COLLISION";
|
|
955
|
-
ErrorCode2[ErrorCode2["NGMODULE_DECLARATION_NOT_UNIQUE"] = 6007] = "NGMODULE_DECLARATION_NOT_UNIQUE";
|
|
956
|
-
ErrorCode2[ErrorCode2["NGMODULE_VE_DEPENDENCY_ON_IVY_LIB"] = 6999] = "NGMODULE_VE_DEPENDENCY_ON_IVY_LIB";
|
|
957
|
-
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ELEMENT"] = 8001] = "SCHEMA_INVALID_ELEMENT";
|
|
958
|
-
ErrorCode2[ErrorCode2["SCHEMA_INVALID_ATTRIBUTE"] = 8002] = "SCHEMA_INVALID_ATTRIBUTE";
|
|
959
|
-
ErrorCode2[ErrorCode2["MISSING_REFERENCE_TARGET"] = 8003] = "MISSING_REFERENCE_TARGET";
|
|
960
|
-
ErrorCode2[ErrorCode2["MISSING_PIPE"] = 8004] = "MISSING_PIPE";
|
|
961
|
-
ErrorCode2[ErrorCode2["WRITE_TO_READ_ONLY_VARIABLE"] = 8005] = "WRITE_TO_READ_ONLY_VARIABLE";
|
|
962
|
-
ErrorCode2[ErrorCode2["DUPLICATE_VARIABLE_DECLARATION"] = 8006] = "DUPLICATE_VARIABLE_DECLARATION";
|
|
963
|
-
ErrorCode2[ErrorCode2["SPLIT_TWO_WAY_BINDING"] = 8007] = "SPLIT_TWO_WAY_BINDING";
|
|
964
|
-
ErrorCode2[ErrorCode2["INVALID_BANANA_IN_BOX"] = 8101] = "INVALID_BANANA_IN_BOX";
|
|
965
|
-
ErrorCode2[ErrorCode2["NULLISH_COALESCING_NOT_NULLABLE"] = 8102] = "NULLISH_COALESCING_NOT_NULLABLE";
|
|
966
|
-
ErrorCode2[ErrorCode2["INLINE_TCB_REQUIRED"] = 8900] = "INLINE_TCB_REQUIRED";
|
|
967
|
-
ErrorCode2[ErrorCode2["INLINE_TYPE_CTOR_REQUIRED"] = 8901] = "INLINE_TYPE_CTOR_REQUIRED";
|
|
968
|
-
ErrorCode2[ErrorCode2["INJECTABLE_DUPLICATE_PROV"] = 9001] = "INJECTABLE_DUPLICATE_PROV";
|
|
969
|
-
ErrorCode2[ErrorCode2["SUGGEST_STRICT_TEMPLATES"] = 10001] = "SUGGEST_STRICT_TEMPLATES";
|
|
970
|
-
ErrorCode2[ErrorCode2["SUGGEST_SUBOPTIMAL_TYPE_INFERENCE"] = 10002] = "SUGGEST_SUBOPTIMAL_TYPE_INFERENCE";
|
|
971
|
-
})(ErrorCode || (ErrorCode = {}));
|
|
972
|
-
|
|
973
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/docs.mjs
|
|
974
|
-
var COMPILER_ERRORS_WITH_GUIDES = new Set([
|
|
975
|
-
ErrorCode.DECORATOR_ARG_NOT_LITERAL,
|
|
976
|
-
ErrorCode.IMPORT_CYCLE_DETECTED,
|
|
977
|
-
ErrorCode.PARAM_MISSING_TOKEN,
|
|
978
|
-
ErrorCode.SCHEMA_INVALID_ELEMENT,
|
|
979
|
-
ErrorCode.SCHEMA_INVALID_ATTRIBUTE,
|
|
980
|
-
ErrorCode.MISSING_REFERENCE_TARGET,
|
|
981
|
-
ErrorCode.COMPONENT_INVALID_SHADOW_DOM_SELECTOR
|
|
982
|
-
]);
|
|
983
|
-
|
|
984
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
924
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
|
|
985
925
|
import ts2 from "typescript";
|
|
986
|
-
|
|
987
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/util.mjs
|
|
988
|
-
var ERROR_CODE_MATCHER = /(\u001b\[\d+m ?)TS-99(\d+: ?\u001b\[\d+m)/g;
|
|
989
|
-
function replaceTsWithNgInErrors(errors) {
|
|
990
|
-
return errors.replace(ERROR_CODE_MATCHER, "$1NG$2");
|
|
991
|
-
}
|
|
992
|
-
function ngErrorCode(code) {
|
|
993
|
-
return parseInt("-99" + code);
|
|
994
|
-
}
|
|
995
|
-
|
|
996
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error.mjs
|
|
997
|
-
var FatalDiagnosticError = class {
|
|
998
|
-
constructor(code, node, message, relatedInformation) {
|
|
999
|
-
this.code = code;
|
|
1000
|
-
this.node = node;
|
|
1001
|
-
this.message = message;
|
|
1002
|
-
this.relatedInformation = relatedInformation;
|
|
1003
|
-
this._isFatalDiagnosticError = true;
|
|
1004
|
-
}
|
|
1005
|
-
toDiagnostic() {
|
|
1006
|
-
return makeDiagnostic(this.code, this.node, this.message, this.relatedInformation);
|
|
1007
|
-
}
|
|
1008
|
-
};
|
|
1009
|
-
function makeDiagnostic(code, node, messageText, relatedInformation) {
|
|
1010
|
-
node = ts2.getOriginalNode(node);
|
|
1011
|
-
return {
|
|
1012
|
-
category: ts2.DiagnosticCategory.Error,
|
|
1013
|
-
code: ngErrorCode(code),
|
|
1014
|
-
file: ts2.getOriginalNode(node).getSourceFile(),
|
|
1015
|
-
start: node.getStart(void 0, false),
|
|
1016
|
-
length: node.getWidth(),
|
|
1017
|
-
messageText,
|
|
1018
|
-
relatedInformation
|
|
1019
|
-
};
|
|
1020
|
-
}
|
|
1021
|
-
function makeRelatedInformation(node, messageText) {
|
|
1022
|
-
node = ts2.getOriginalNode(node);
|
|
1023
|
-
return {
|
|
1024
|
-
category: ts2.DiagnosticCategory.Message,
|
|
1025
|
-
code: 0,
|
|
1026
|
-
file: node.getSourceFile(),
|
|
1027
|
-
start: node.getStart(),
|
|
1028
|
-
length: node.getWidth(),
|
|
1029
|
-
messageText
|
|
1030
|
-
};
|
|
1031
|
-
}
|
|
1032
|
-
function isFatalDiagnosticError(err) {
|
|
1033
|
-
return err._isFatalDiagnosticError === true;
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.mjs
|
|
1037
|
-
var ERROR_DETAILS_PAGE_BASE_URL = "https://angular.io/errors";
|
|
1038
|
-
|
|
1039
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/partial_evaluator/src/diagnostics.mjs
|
|
1040
926
|
function describeResolvedType(value, maxDepth = 1) {
|
|
1041
927
|
var _a, _b;
|
|
1042
928
|
if (value === null) {
|
|
@@ -1140,21 +1026,21 @@ function getContainerNode(node) {
|
|
|
1140
1026
|
let currentNode = node;
|
|
1141
1027
|
while (currentNode !== void 0) {
|
|
1142
1028
|
switch (currentNode.kind) {
|
|
1143
|
-
case
|
|
1144
|
-
case
|
|
1145
|
-
case
|
|
1146
|
-
case
|
|
1147
|
-
case
|
|
1148
|
-
case
|
|
1149
|
-
case
|
|
1150
|
-
case
|
|
1151
|
-
case
|
|
1152
|
-
case
|
|
1153
|
-
case
|
|
1154
|
-
case
|
|
1155
|
-
case
|
|
1156
|
-
case
|
|
1157
|
-
case
|
|
1029
|
+
case ts2.SyntaxKind.ExpressionStatement:
|
|
1030
|
+
case ts2.SyntaxKind.VariableStatement:
|
|
1031
|
+
case ts2.SyntaxKind.ReturnStatement:
|
|
1032
|
+
case ts2.SyntaxKind.IfStatement:
|
|
1033
|
+
case ts2.SyntaxKind.SwitchStatement:
|
|
1034
|
+
case ts2.SyntaxKind.DoStatement:
|
|
1035
|
+
case ts2.SyntaxKind.WhileStatement:
|
|
1036
|
+
case ts2.SyntaxKind.ForStatement:
|
|
1037
|
+
case ts2.SyntaxKind.ForInStatement:
|
|
1038
|
+
case ts2.SyntaxKind.ForOfStatement:
|
|
1039
|
+
case ts2.SyntaxKind.ContinueStatement:
|
|
1040
|
+
case ts2.SyntaxKind.BreakStatement:
|
|
1041
|
+
case ts2.SyntaxKind.ThrowStatement:
|
|
1042
|
+
case ts2.SyntaxKind.ObjectBindingPattern:
|
|
1043
|
+
case ts2.SyntaxKind.ArrayBindingPattern:
|
|
1158
1044
|
return currentNode;
|
|
1159
1045
|
}
|
|
1160
1046
|
currentNode = currentNode.parent;
|
|
@@ -1162,9 +1048,9 @@ function getContainerNode(node) {
|
|
|
1162
1048
|
return node.getSourceFile();
|
|
1163
1049
|
}
|
|
1164
1050
|
|
|
1165
|
-
// bazel-out/
|
|
1051
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/util.mjs
|
|
1166
1052
|
import { ExternalExpr, LiteralExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
|
|
1167
|
-
import
|
|
1053
|
+
import ts3 from "typescript";
|
|
1168
1054
|
function getConstructorDependencies(clazz, reflector, isCore) {
|
|
1169
1055
|
const deps = [];
|
|
1170
1056
|
const errors = [];
|
|
@@ -1201,10 +1087,10 @@ function getConstructorDependencies(clazz, reflector, isCore) {
|
|
|
1201
1087
|
}
|
|
1202
1088
|
const attributeName = dec.args[0];
|
|
1203
1089
|
token = new WrappedNodeExpr(attributeName);
|
|
1204
|
-
if (
|
|
1090
|
+
if (ts3.isStringLiteralLike(attributeName)) {
|
|
1205
1091
|
attributeNameType = new LiteralExpr(attributeName.text);
|
|
1206
1092
|
} else {
|
|
1207
|
-
attributeNameType = new WrappedNodeExpr(
|
|
1093
|
+
attributeNameType = new WrappedNodeExpr(ts3.createKeywordTypeNode(ts3.SyntaxKind.UnknownKeyword));
|
|
1208
1094
|
}
|
|
1209
1095
|
} else {
|
|
1210
1096
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_UNEXPECTED, Decorator.nodeForError(dec), `Unexpected decorator ${name} on parameter.`);
|
|
@@ -1314,20 +1200,24 @@ function createUnsuitableInjectionTokenError(clazz, error) {
|
|
|
1314
1200
|
}
|
|
1315
1201
|
const chain = {
|
|
1316
1202
|
messageText: `No suitable injection token for parameter '${param.name || index}' of class '${clazz.name.text}'.`,
|
|
1317
|
-
category:
|
|
1203
|
+
category: ts3.DiagnosticCategory.Error,
|
|
1318
1204
|
code: 0,
|
|
1319
1205
|
next: [{
|
|
1320
1206
|
messageText: chainMessage,
|
|
1321
|
-
category:
|
|
1207
|
+
category: ts3.DiagnosticCategory.Message,
|
|
1322
1208
|
code: 0
|
|
1323
1209
|
}]
|
|
1324
1210
|
};
|
|
1325
1211
|
return new FatalDiagnosticError(ErrorCode.PARAM_MISSING_TOKEN, param.nameNode, chain, hints);
|
|
1326
1212
|
}
|
|
1327
|
-
function toR3Reference(valueRef, typeRef, valueContext, typeContext, refEmitter) {
|
|
1213
|
+
function toR3Reference(origin, valueRef, typeRef, valueContext, typeContext, refEmitter) {
|
|
1214
|
+
const emittedValueRef = refEmitter.emit(valueRef, valueContext);
|
|
1215
|
+
assertSuccessfulReferenceEmit(emittedValueRef, origin, "class");
|
|
1216
|
+
const emittedTypeRef = refEmitter.emit(typeRef, typeContext, ImportFlags.ForceNewImport | ImportFlags.AllowTypeImports);
|
|
1217
|
+
assertSuccessfulReferenceEmit(emittedTypeRef, origin, "class");
|
|
1328
1218
|
return {
|
|
1329
|
-
value:
|
|
1330
|
-
type:
|
|
1219
|
+
value: emittedValueRef.expression,
|
|
1220
|
+
type: emittedTypeRef.expression
|
|
1331
1221
|
};
|
|
1332
1222
|
}
|
|
1333
1223
|
function isAngularCore(decorator) {
|
|
@@ -1348,23 +1238,23 @@ function isAngularDecorator(decorator, name, isCore) {
|
|
|
1348
1238
|
return false;
|
|
1349
1239
|
}
|
|
1350
1240
|
function unwrapExpression(node) {
|
|
1351
|
-
while (
|
|
1241
|
+
while (ts3.isAsExpression(node) || ts3.isParenthesizedExpression(node)) {
|
|
1352
1242
|
node = node.expression;
|
|
1353
1243
|
}
|
|
1354
1244
|
return node;
|
|
1355
1245
|
}
|
|
1356
1246
|
function expandForwardRef(arg) {
|
|
1357
1247
|
arg = unwrapExpression(arg);
|
|
1358
|
-
if (!
|
|
1248
|
+
if (!ts3.isArrowFunction(arg) && !ts3.isFunctionExpression(arg)) {
|
|
1359
1249
|
return null;
|
|
1360
1250
|
}
|
|
1361
1251
|
const body = arg.body;
|
|
1362
|
-
if (
|
|
1252
|
+
if (ts3.isBlock(body)) {
|
|
1363
1253
|
if (body.statements.length !== 1) {
|
|
1364
1254
|
return null;
|
|
1365
1255
|
}
|
|
1366
1256
|
const stmt = body.statements[0];
|
|
1367
|
-
if (!
|
|
1257
|
+
if (!ts3.isReturnStatement(stmt) || stmt.expression === void 0) {
|
|
1368
1258
|
return null;
|
|
1369
1259
|
}
|
|
1370
1260
|
return stmt.expression;
|
|
@@ -1374,11 +1264,11 @@ function expandForwardRef(arg) {
|
|
|
1374
1264
|
}
|
|
1375
1265
|
function tryUnwrapForwardRef(node, reflector) {
|
|
1376
1266
|
node = unwrapExpression(node);
|
|
1377
|
-
if (!
|
|
1267
|
+
if (!ts3.isCallExpression(node) || node.arguments.length !== 1) {
|
|
1378
1268
|
return null;
|
|
1379
1269
|
}
|
|
1380
|
-
const fn =
|
|
1381
|
-
if (!
|
|
1270
|
+
const fn = ts3.isPropertyAccessExpression(node.expression) ? node.expression.name : node.expression;
|
|
1271
|
+
if (!ts3.isIdentifier(fn)) {
|
|
1382
1272
|
return null;
|
|
1383
1273
|
}
|
|
1384
1274
|
const expr = expandForwardRef(node.arguments[0]);
|
|
@@ -1410,7 +1300,7 @@ function combineResolvers(resolvers) {
|
|
|
1410
1300
|
}
|
|
1411
1301
|
function isExpressionForwardReference(expr, context, contextSource) {
|
|
1412
1302
|
if (isWrappedTsNodeExpr(expr)) {
|
|
1413
|
-
const node =
|
|
1303
|
+
const node = ts3.getOriginalNode(expr.node);
|
|
1414
1304
|
return node.getSourceFile() === contextSource && context.pos < node.pos;
|
|
1415
1305
|
} else {
|
|
1416
1306
|
return false;
|
|
@@ -1433,16 +1323,16 @@ function readBaseClass(node, reflector, evaluator) {
|
|
|
1433
1323
|
}
|
|
1434
1324
|
var parensWrapperTransformerFactory = (context) => {
|
|
1435
1325
|
const visitor = (node) => {
|
|
1436
|
-
const visited =
|
|
1437
|
-
if (
|
|
1438
|
-
return
|
|
1326
|
+
const visited = ts3.visitEachChild(node, visitor, context);
|
|
1327
|
+
if (ts3.isArrowFunction(visited) || ts3.isFunctionExpression(visited)) {
|
|
1328
|
+
return ts3.createParen(visited);
|
|
1439
1329
|
}
|
|
1440
1330
|
return visited;
|
|
1441
1331
|
};
|
|
1442
|
-
return (node) =>
|
|
1332
|
+
return (node) => ts3.visitEachChild(node, visitor, context);
|
|
1443
1333
|
};
|
|
1444
1334
|
function wrapFunctionExpressionsInParens(expression) {
|
|
1445
|
-
return
|
|
1335
|
+
return ts3.transform(expression, [parensWrapperTransformerFactory]).transformed[0];
|
|
1446
1336
|
}
|
|
1447
1337
|
function makeDuplicateDeclarationError(node, data, kind) {
|
|
1448
1338
|
const context = [];
|
|
@@ -1456,7 +1346,7 @@ function makeDuplicateDeclarationError(node, data, kind) {
|
|
|
1456
1346
|
return makeDiagnostic(ErrorCode.NGMODULE_DECLARATION_NOT_UNIQUE, node.name, `The ${kind} '${node.name.text}' is declared by more than one NgModule.`, context);
|
|
1457
1347
|
}
|
|
1458
1348
|
function resolveProvidersRequiringFactory(rawProviders, reflector, evaluator) {
|
|
1459
|
-
const providers = new Set();
|
|
1349
|
+
const providers = /* @__PURE__ */ new Set();
|
|
1460
1350
|
const resolvedProviders = evaluator.evaluate(rawProviders);
|
|
1461
1351
|
if (!Array.isArray(resolvedProviders)) {
|
|
1462
1352
|
return providers;
|
|
@@ -1522,12 +1412,12 @@ function toFactoryMetadata(meta, target) {
|
|
|
1522
1412
|
};
|
|
1523
1413
|
}
|
|
1524
1414
|
|
|
1525
|
-
// bazel-out/
|
|
1415
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/component.mjs
|
|
1526
1416
|
import { compileClassMetadata as compileClassMetadata3, compileComponentFromMetadata, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareComponentFromMetadata, CssSelector, DEFAULT_INTERPOLATION_CONFIG, DomElementSchemaRegistry, ExternalExpr as ExternalExpr5, FactoryTarget as FactoryTarget3, InterpolationConfig, makeBindingParser as makeBindingParser2, ParseSourceFile as ParseSourceFile2, parseTemplate, R3TargetBinder, SelectorMatcher, ViewEncapsulation, WrappedNodeExpr as WrappedNodeExpr5 } from "@angular/compiler";
|
|
1527
|
-
import
|
|
1417
|
+
import ts18 from "typescript";
|
|
1528
1418
|
|
|
1529
|
-
// bazel-out/
|
|
1530
|
-
import
|
|
1419
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
|
|
1420
|
+
import ts4 from "typescript";
|
|
1531
1421
|
var SemanticSymbol = class {
|
|
1532
1422
|
constructor(decl) {
|
|
1533
1423
|
this.decl = decl;
|
|
@@ -1536,13 +1426,13 @@ var SemanticSymbol = class {
|
|
|
1536
1426
|
}
|
|
1537
1427
|
};
|
|
1538
1428
|
function getSymbolIdentifier(decl) {
|
|
1539
|
-
if (!
|
|
1429
|
+
if (!ts4.isSourceFile(decl.parent)) {
|
|
1540
1430
|
return null;
|
|
1541
1431
|
}
|
|
1542
1432
|
return decl.name.text;
|
|
1543
1433
|
}
|
|
1544
1434
|
|
|
1545
|
-
// bazel-out/
|
|
1435
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/graph.mjs
|
|
1546
1436
|
import { ExternalExpr as ExternalExpr2 } from "@angular/compiler";
|
|
1547
1437
|
var OpaqueSymbol = class extends SemanticSymbol {
|
|
1548
1438
|
isPublicApiAffected() {
|
|
@@ -1554,14 +1444,14 @@ var OpaqueSymbol = class extends SemanticSymbol {
|
|
|
1554
1444
|
};
|
|
1555
1445
|
var SemanticDepGraph = class {
|
|
1556
1446
|
constructor() {
|
|
1557
|
-
this.files = new Map();
|
|
1558
|
-
this.symbolByDecl = new Map();
|
|
1447
|
+
this.files = /* @__PURE__ */ new Map();
|
|
1448
|
+
this.symbolByDecl = /* @__PURE__ */ new Map();
|
|
1559
1449
|
}
|
|
1560
1450
|
registerSymbol(symbol) {
|
|
1561
1451
|
this.symbolByDecl.set(symbol.decl, symbol);
|
|
1562
1452
|
if (symbol.identifier !== null) {
|
|
1563
1453
|
if (!this.files.has(symbol.path)) {
|
|
1564
|
-
this.files.set(symbol.path, new Map());
|
|
1454
|
+
this.files.set(symbol.path, /* @__PURE__ */ new Map());
|
|
1565
1455
|
}
|
|
1566
1456
|
this.files.get(symbol.path).set(symbol.identifier, symbol);
|
|
1567
1457
|
}
|
|
@@ -1594,7 +1484,7 @@ var SemanticDepGraphUpdater = class {
|
|
|
1594
1484
|
constructor(priorGraph) {
|
|
1595
1485
|
this.priorGraph = priorGraph;
|
|
1596
1486
|
this.newGraph = new SemanticDepGraph();
|
|
1597
|
-
this.opaqueSymbols = new Map();
|
|
1487
|
+
this.opaqueSymbols = /* @__PURE__ */ new Map();
|
|
1598
1488
|
}
|
|
1599
1489
|
registerSymbol(symbol) {
|
|
1600
1490
|
this.newGraph.registerSymbol(symbol);
|
|
@@ -1602,8 +1492,8 @@ var SemanticDepGraphUpdater = class {
|
|
|
1602
1492
|
finalize() {
|
|
1603
1493
|
if (this.priorGraph === null) {
|
|
1604
1494
|
return {
|
|
1605
|
-
needsEmit: new Set(),
|
|
1606
|
-
needsTypeCheckEmit: new Set(),
|
|
1495
|
+
needsEmit: /* @__PURE__ */ new Set(),
|
|
1496
|
+
needsTypeCheckEmit: /* @__PURE__ */ new Set(),
|
|
1607
1497
|
newGraph: this.newGraph
|
|
1608
1498
|
};
|
|
1609
1499
|
}
|
|
@@ -1616,14 +1506,14 @@ var SemanticDepGraphUpdater = class {
|
|
|
1616
1506
|
};
|
|
1617
1507
|
}
|
|
1618
1508
|
determineInvalidatedFiles(priorGraph) {
|
|
1619
|
-
const isPublicApiAffected = new Set();
|
|
1509
|
+
const isPublicApiAffected = /* @__PURE__ */ new Set();
|
|
1620
1510
|
for (const symbol of this.newGraph.symbolByDecl.values()) {
|
|
1621
1511
|
const previousSymbol = priorGraph.getEquivalentSymbol(symbol);
|
|
1622
1512
|
if (previousSymbol === null || symbol.isPublicApiAffected(previousSymbol)) {
|
|
1623
1513
|
isPublicApiAffected.add(symbol);
|
|
1624
1514
|
}
|
|
1625
1515
|
}
|
|
1626
|
-
const needsEmit = new Set();
|
|
1516
|
+
const needsEmit = /* @__PURE__ */ new Set();
|
|
1627
1517
|
for (const symbol of this.newGraph.symbolByDecl.values()) {
|
|
1628
1518
|
if (symbol.isEmitAffected === void 0) {
|
|
1629
1519
|
continue;
|
|
@@ -1636,14 +1526,14 @@ var SemanticDepGraphUpdater = class {
|
|
|
1636
1526
|
return needsEmit;
|
|
1637
1527
|
}
|
|
1638
1528
|
determineInvalidatedTypeCheckFiles(priorGraph) {
|
|
1639
|
-
const isTypeCheckApiAffected = new Set();
|
|
1529
|
+
const isTypeCheckApiAffected = /* @__PURE__ */ new Set();
|
|
1640
1530
|
for (const symbol of this.newGraph.symbolByDecl.values()) {
|
|
1641
1531
|
const previousSymbol = priorGraph.getEquivalentSymbol(symbol);
|
|
1642
1532
|
if (previousSymbol === null || symbol.isTypeCheckApiAffected(previousSymbol)) {
|
|
1643
1533
|
isTypeCheckApiAffected.add(symbol);
|
|
1644
1534
|
}
|
|
1645
1535
|
}
|
|
1646
|
-
const needsTypeCheckEmit = new Set();
|
|
1536
|
+
const needsTypeCheckEmit = /* @__PURE__ */ new Set();
|
|
1647
1537
|
for (const symbol of this.newGraph.symbolByDecl.values()) {
|
|
1648
1538
|
if (symbol.isTypeCheckBlockAffected === void 0) {
|
|
1649
1539
|
continue;
|
|
@@ -1685,10 +1575,10 @@ function getImportPath(expr) {
|
|
|
1685
1575
|
}
|
|
1686
1576
|
}
|
|
1687
1577
|
|
|
1688
|
-
// bazel-out/
|
|
1689
|
-
import
|
|
1578
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
1579
|
+
import ts5 from "typescript";
|
|
1690
1580
|
|
|
1691
|
-
// bazel-out/
|
|
1581
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/util.mjs
|
|
1692
1582
|
function isSymbolEqual(a, b) {
|
|
1693
1583
|
if (a.decl === b.decl) {
|
|
1694
1584
|
return true;
|
|
@@ -1738,9 +1628,9 @@ function isSetEqual(a, b, equalityTester = referenceEquality) {
|
|
|
1738
1628
|
return true;
|
|
1739
1629
|
}
|
|
1740
1630
|
|
|
1741
|
-
// bazel-out/
|
|
1631
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/type_parameters.mjs
|
|
1742
1632
|
function extractSemanticTypeParameters(node) {
|
|
1743
|
-
if (!
|
|
1633
|
+
if (!ts5.isClassDeclaration(node) || node.typeParameters === void 0) {
|
|
1744
1634
|
return null;
|
|
1745
1635
|
}
|
|
1746
1636
|
return node.typeParameters.map((typeParam) => ({ hasGenericTypeBound: typeParam.constraint !== void 0 }));
|
|
@@ -1758,27 +1648,27 @@ function isTypeParameterEqual(a, b) {
|
|
|
1758
1648
|
return a.hasGenericTypeBound === b.hasGenericTypeBound;
|
|
1759
1649
|
}
|
|
1760
1650
|
|
|
1761
|
-
// bazel-out/
|
|
1651
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/api.mjs
|
|
1762
1652
|
var MetaType;
|
|
1763
1653
|
(function(MetaType2) {
|
|
1764
1654
|
MetaType2[MetaType2["Pipe"] = 0] = "Pipe";
|
|
1765
1655
|
MetaType2[MetaType2["Directive"] = 1] = "Directive";
|
|
1766
1656
|
})(MetaType || (MetaType = {}));
|
|
1767
1657
|
|
|
1768
|
-
// bazel-out/
|
|
1769
|
-
import
|
|
1658
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
1659
|
+
import ts7 from "typescript";
|
|
1770
1660
|
|
|
1771
|
-
// bazel-out/
|
|
1661
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/property_mapping.mjs
|
|
1772
1662
|
var ClassPropertyMapping = class {
|
|
1773
1663
|
constructor(forwardMap) {
|
|
1774
1664
|
this.forwardMap = forwardMap;
|
|
1775
1665
|
this.reverseMap = reverseMapFromForwardMap(forwardMap);
|
|
1776
1666
|
}
|
|
1777
1667
|
static empty() {
|
|
1778
|
-
return new ClassPropertyMapping(new Map());
|
|
1668
|
+
return new ClassPropertyMapping(/* @__PURE__ */ new Map());
|
|
1779
1669
|
}
|
|
1780
1670
|
static fromMappedObject(obj) {
|
|
1781
|
-
const forwardMap = new Map();
|
|
1671
|
+
const forwardMap = /* @__PURE__ */ new Map();
|
|
1782
1672
|
for (const classPropertyName of Object.keys(obj)) {
|
|
1783
1673
|
const value = obj[classPropertyName];
|
|
1784
1674
|
const bindingPropertyName = Array.isArray(value) ? value[0] : value;
|
|
@@ -1834,7 +1724,7 @@ var ClassPropertyMapping = class {
|
|
|
1834
1724
|
}
|
|
1835
1725
|
};
|
|
1836
1726
|
function reverseMapFromForwardMap(forwardMap) {
|
|
1837
|
-
const reverseMap = new Map();
|
|
1727
|
+
const reverseMap = /* @__PURE__ */ new Map();
|
|
1838
1728
|
for (const [_, inputOrOutput] of forwardMap) {
|
|
1839
1729
|
if (!reverseMap.has(inputOrOutput.bindingPropertyName)) {
|
|
1840
1730
|
reverseMap.set(inputOrOutput.bindingPropertyName, []);
|
|
@@ -1844,14 +1734,14 @@ function reverseMapFromForwardMap(forwardMap) {
|
|
|
1844
1734
|
return reverseMap;
|
|
1845
1735
|
}
|
|
1846
1736
|
|
|
1847
|
-
// bazel-out/
|
|
1848
|
-
import
|
|
1737
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/util.mjs
|
|
1738
|
+
import ts6 from "typescript";
|
|
1849
1739
|
function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
1850
|
-
if (!
|
|
1740
|
+
if (!ts6.isTupleTypeNode(def)) {
|
|
1851
1741
|
return [];
|
|
1852
1742
|
}
|
|
1853
1743
|
return def.elements.map((element) => {
|
|
1854
|
-
if (!
|
|
1744
|
+
if (!ts6.isTypeQueryNode(element)) {
|
|
1855
1745
|
throw new Error(`Expected TypeQueryNode: ${nodeDebugInfo(element)}`);
|
|
1856
1746
|
}
|
|
1857
1747
|
const type = element.exprName;
|
|
@@ -1867,18 +1757,18 @@ function extractReferencesFromType(checker, def, bestGuessOwningModule) {
|
|
|
1867
1757
|
});
|
|
1868
1758
|
}
|
|
1869
1759
|
function readStringType(type) {
|
|
1870
|
-
if (!
|
|
1760
|
+
if (!ts6.isLiteralTypeNode(type) || !ts6.isStringLiteral(type.literal)) {
|
|
1871
1761
|
return null;
|
|
1872
1762
|
}
|
|
1873
1763
|
return type.literal.text;
|
|
1874
1764
|
}
|
|
1875
1765
|
function readStringMapType(type) {
|
|
1876
|
-
if (!
|
|
1766
|
+
if (!ts6.isTypeLiteralNode(type)) {
|
|
1877
1767
|
return {};
|
|
1878
1768
|
}
|
|
1879
1769
|
const obj = {};
|
|
1880
1770
|
type.members.forEach((member) => {
|
|
1881
|
-
if (!
|
|
1771
|
+
if (!ts6.isPropertySignature(member) || member.type === void 0 || member.name === void 0 || !ts6.isStringLiteral(member.name)) {
|
|
1882
1772
|
return;
|
|
1883
1773
|
}
|
|
1884
1774
|
const value = readStringType(member.type);
|
|
@@ -1890,12 +1780,12 @@ function readStringMapType(type) {
|
|
|
1890
1780
|
return obj;
|
|
1891
1781
|
}
|
|
1892
1782
|
function readStringArrayType(type) {
|
|
1893
|
-
if (!
|
|
1783
|
+
if (!ts6.isTupleTypeNode(type)) {
|
|
1894
1784
|
return [];
|
|
1895
1785
|
}
|
|
1896
1786
|
const res = [];
|
|
1897
1787
|
type.elements.forEach((el) => {
|
|
1898
|
-
if (!
|
|
1788
|
+
if (!ts6.isLiteralTypeNode(el) || !ts6.isStringLiteral(el.literal)) {
|
|
1899
1789
|
return;
|
|
1900
1790
|
}
|
|
1901
1791
|
res.push(el.literal.text);
|
|
@@ -1908,9 +1798,9 @@ function extractDirectiveTypeCheckMeta(node, inputs, reflector) {
|
|
|
1908
1798
|
const ngTemplateGuards = staticMembers.map(extractTemplateGuard).filter((guard) => guard !== null);
|
|
1909
1799
|
const hasNgTemplateContextGuard = staticMembers.some((member) => member.kind === ClassMemberKind.Method && member.name === "ngTemplateContextGuard");
|
|
1910
1800
|
const coercedInputFields = new Set(staticMembers.map(extractCoercedInput).filter((inputName) => inputName !== null));
|
|
1911
|
-
const restrictedInputFields = new Set();
|
|
1912
|
-
const stringLiteralInputFields = new Set();
|
|
1913
|
-
const undeclaredInputFields = new Set();
|
|
1801
|
+
const restrictedInputFields = /* @__PURE__ */ new Set();
|
|
1802
|
+
const stringLiteralInputFields = /* @__PURE__ */ new Set();
|
|
1803
|
+
const undeclaredInputFields = /* @__PURE__ */ new Set();
|
|
1914
1804
|
for (const classPropertyName of inputs.classPropertyNames) {
|
|
1915
1805
|
const field = members.find((member) => member.name === classPropertyName);
|
|
1916
1806
|
if (field === void 0 || field.node === null) {
|
|
@@ -1920,7 +1810,7 @@ function extractDirectiveTypeCheckMeta(node, inputs, reflector) {
|
|
|
1920
1810
|
if (isRestricted(field.node)) {
|
|
1921
1811
|
restrictedInputFields.add(classPropertyName);
|
|
1922
1812
|
}
|
|
1923
|
-
if (field.nameNode !== null &&
|
|
1813
|
+
if (field.nameNode !== null && ts6.isStringLiteral(field.nameNode)) {
|
|
1924
1814
|
stringLiteralInputFields.add(classPropertyName);
|
|
1925
1815
|
}
|
|
1926
1816
|
}
|
|
@@ -1939,7 +1829,7 @@ function isRestricted(node) {
|
|
|
1939
1829
|
if (node.modifiers === void 0) {
|
|
1940
1830
|
return false;
|
|
1941
1831
|
}
|
|
1942
|
-
return node.modifiers.some((modifier) => modifier.kind ===
|
|
1832
|
+
return node.modifiers.some((modifier) => modifier.kind === ts6.SyntaxKind.PrivateKeyword || modifier.kind === ts6.SyntaxKind.ProtectedKeyword || modifier.kind === ts6.SyntaxKind.ReadonlyKeyword);
|
|
1943
1833
|
}
|
|
1944
1834
|
function extractTemplateGuard(member) {
|
|
1945
1835
|
if (!member.name.startsWith("ngTemplateGuard_")) {
|
|
@@ -1948,7 +1838,7 @@ function extractTemplateGuard(member) {
|
|
|
1948
1838
|
const inputName = afterUnderscore(member.name);
|
|
1949
1839
|
if (member.kind === ClassMemberKind.Property) {
|
|
1950
1840
|
let type = null;
|
|
1951
|
-
if (member.type !== null &&
|
|
1841
|
+
if (member.type !== null && ts6.isLiteralTypeNode(member.type) && ts6.isStringLiteral(member.type.literal)) {
|
|
1952
1842
|
type = member.type.literal.text;
|
|
1953
1843
|
}
|
|
1954
1844
|
if (type !== "binding") {
|
|
@@ -2011,7 +1901,7 @@ function hasInjectableFields(clazz, host) {
|
|
|
2011
1901
|
return members.some(({ isStatic, name }) => isStatic && (name === "\u0275prov" || name === "\u0275fac"));
|
|
2012
1902
|
}
|
|
2013
1903
|
|
|
2014
|
-
// bazel-out/
|
|
1904
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/dts.mjs
|
|
2015
1905
|
var DtsMetadataReader = class {
|
|
2016
1906
|
constructor(checker, reflector) {
|
|
2017
1907
|
this.checker = checker;
|
|
@@ -2022,7 +1912,7 @@ var DtsMetadataReader = class {
|
|
|
2022
1912
|
const ngModuleDef = this.reflector.getMembersOfClass(clazz).find((member) => member.name === "\u0275mod" && member.isStatic);
|
|
2023
1913
|
if (ngModuleDef === void 0) {
|
|
2024
1914
|
return null;
|
|
2025
|
-
} else if (ngModuleDef.type === null || !
|
|
1915
|
+
} else if (ngModuleDef.type === null || !ts7.isTypeReferenceNode(ngModuleDef.type) || ngModuleDef.type.typeArguments === void 0 || ngModuleDef.type.typeArguments.length !== 4) {
|
|
2026
1916
|
return null;
|
|
2027
1917
|
}
|
|
2028
1918
|
const [_, declarationMetadata, importMetadata, exportMetadata] = ngModuleDef.type.typeArguments;
|
|
@@ -2040,7 +1930,7 @@ var DtsMetadataReader = class {
|
|
|
2040
1930
|
const def = this.reflector.getMembersOfClass(clazz).find((field) => field.isStatic && (field.name === "\u0275cmp" || field.name === "\u0275dir"));
|
|
2041
1931
|
if (def === void 0) {
|
|
2042
1932
|
return null;
|
|
2043
|
-
} else if (def.type === null || !
|
|
1933
|
+
} else if (def.type === null || !ts7.isTypeReferenceNode(def.type) || def.type.typeArguments === void 0 || def.type.typeArguments.length < 2) {
|
|
2044
1934
|
return null;
|
|
2045
1935
|
}
|
|
2046
1936
|
const isComponent = def.name === "\u0275cmp";
|
|
@@ -2070,11 +1960,11 @@ var DtsMetadataReader = class {
|
|
|
2070
1960
|
const def = this.reflector.getMembersOfClass(ref.node).find((field) => field.isStatic && field.name === "\u0275pipe");
|
|
2071
1961
|
if (def === void 0) {
|
|
2072
1962
|
return null;
|
|
2073
|
-
} else if (def.type === null || !
|
|
1963
|
+
} else if (def.type === null || !ts7.isTypeReferenceNode(def.type) || def.type.typeArguments === void 0 || def.type.typeArguments.length < 2) {
|
|
2074
1964
|
return null;
|
|
2075
1965
|
}
|
|
2076
1966
|
const type = def.type.typeArguments[1];
|
|
2077
|
-
if (!
|
|
1967
|
+
if (!ts7.isLiteralTypeNode(type) || !ts7.isStringLiteral(type.literal)) {
|
|
2078
1968
|
return null;
|
|
2079
1969
|
}
|
|
2080
1970
|
const name = type.literal.text;
|
|
@@ -2092,12 +1982,12 @@ function readBaseClass2(clazz, checker, reflector) {
|
|
|
2092
1982
|
}
|
|
2093
1983
|
if (clazz.heritageClauses !== void 0) {
|
|
2094
1984
|
for (const clause of clazz.heritageClauses) {
|
|
2095
|
-
if (clause.token ===
|
|
1985
|
+
if (clause.token === ts7.SyntaxKind.ExtendsKeyword) {
|
|
2096
1986
|
const baseExpr = clause.types[0].expression;
|
|
2097
1987
|
let symbol = checker.getSymbolAtLocation(baseExpr);
|
|
2098
1988
|
if (symbol === void 0) {
|
|
2099
1989
|
return "dynamic";
|
|
2100
|
-
} else if (symbol.flags &
|
|
1990
|
+
} else if (symbol.flags & ts7.SymbolFlags.Alias) {
|
|
2101
1991
|
symbol = checker.getAliasedSymbol(symbol);
|
|
2102
1992
|
}
|
|
2103
1993
|
if (symbol.valueDeclaration !== void 0 && isNamedClassDeclaration(symbol.valueDeclaration)) {
|
|
@@ -2111,7 +2001,7 @@ function readBaseClass2(clazz, checker, reflector) {
|
|
|
2111
2001
|
return null;
|
|
2112
2002
|
}
|
|
2113
2003
|
|
|
2114
|
-
// bazel-out/
|
|
2004
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/inheritance.mjs
|
|
2115
2005
|
function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
2116
2006
|
const topMeta = reader.getDirectiveMetadata(dir);
|
|
2117
2007
|
if (topMeta === null) {
|
|
@@ -2120,10 +2010,10 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
2120
2010
|
if (topMeta.baseClass === null) {
|
|
2121
2011
|
return topMeta;
|
|
2122
2012
|
}
|
|
2123
|
-
const coercedInputFields = new Set();
|
|
2124
|
-
const undeclaredInputFields = new Set();
|
|
2125
|
-
const restrictedInputFields = new Set();
|
|
2126
|
-
const stringLiteralInputFields = new Set();
|
|
2013
|
+
const coercedInputFields = /* @__PURE__ */ new Set();
|
|
2014
|
+
const undeclaredInputFields = /* @__PURE__ */ new Set();
|
|
2015
|
+
const restrictedInputFields = /* @__PURE__ */ new Set();
|
|
2016
|
+
const stringLiteralInputFields = /* @__PURE__ */ new Set();
|
|
2127
2017
|
let isDynamic = false;
|
|
2128
2018
|
let inputs = ClassPropertyMapping.empty();
|
|
2129
2019
|
let outputs = ClassPropertyMapping.empty();
|
|
@@ -2168,12 +2058,12 @@ function flattenInheritedDirectiveMetadata(reader, dir) {
|
|
|
2168
2058
|
});
|
|
2169
2059
|
}
|
|
2170
2060
|
|
|
2171
|
-
// bazel-out/
|
|
2061
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/registry.mjs
|
|
2172
2062
|
var LocalMetadataRegistry = class {
|
|
2173
2063
|
constructor() {
|
|
2174
|
-
this.directives = new Map();
|
|
2175
|
-
this.ngModules = new Map();
|
|
2176
|
-
this.pipes = new Map();
|
|
2064
|
+
this.directives = /* @__PURE__ */ new Map();
|
|
2065
|
+
this.ngModules = /* @__PURE__ */ new Map();
|
|
2066
|
+
this.pipes = /* @__PURE__ */ new Map();
|
|
2177
2067
|
}
|
|
2178
2068
|
getDirectiveMetadata(ref) {
|
|
2179
2069
|
return this.directives.has(ref.node) ? this.directives.get(ref.node) : null;
|
|
@@ -2217,7 +2107,7 @@ var CompoundMetadataRegistry = class {
|
|
|
2217
2107
|
var InjectableClassRegistry = class {
|
|
2218
2108
|
constructor(host) {
|
|
2219
2109
|
this.host = host;
|
|
2220
|
-
this.classes = new Set();
|
|
2110
|
+
this.classes = /* @__PURE__ */ new Set();
|
|
2221
2111
|
}
|
|
2222
2112
|
registerInjectable(declaration) {
|
|
2223
2113
|
this.classes.add(declaration);
|
|
@@ -2227,17 +2117,17 @@ var InjectableClassRegistry = class {
|
|
|
2227
2117
|
}
|
|
2228
2118
|
};
|
|
2229
2119
|
|
|
2230
|
-
// bazel-out/
|
|
2120
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/resource_registry.mjs
|
|
2231
2121
|
var ResourceRegistry = class {
|
|
2232
2122
|
constructor() {
|
|
2233
|
-
this.externalTemplateToComponentsMap = new Map();
|
|
2234
|
-
this.componentToTemplateMap = new Map();
|
|
2235
|
-
this.componentToStylesMap = new Map();
|
|
2236
|
-
this.externalStyleToComponentsMap = new Map();
|
|
2123
|
+
this.externalTemplateToComponentsMap = /* @__PURE__ */ new Map();
|
|
2124
|
+
this.componentToTemplateMap = /* @__PURE__ */ new Map();
|
|
2125
|
+
this.componentToStylesMap = /* @__PURE__ */ new Map();
|
|
2126
|
+
this.externalStyleToComponentsMap = /* @__PURE__ */ new Map();
|
|
2237
2127
|
}
|
|
2238
2128
|
getComponentsWithTemplate(template) {
|
|
2239
2129
|
if (!this.externalTemplateToComponentsMap.has(template)) {
|
|
2240
|
-
return new Set();
|
|
2130
|
+
return /* @__PURE__ */ new Set();
|
|
2241
2131
|
}
|
|
2242
2132
|
return this.externalTemplateToComponentsMap.get(template);
|
|
2243
2133
|
}
|
|
@@ -2253,7 +2143,7 @@ var ResourceRegistry = class {
|
|
|
2253
2143
|
const { path } = templateResource;
|
|
2254
2144
|
if (path !== null) {
|
|
2255
2145
|
if (!this.externalTemplateToComponentsMap.has(path)) {
|
|
2256
|
-
this.externalTemplateToComponentsMap.set(path, new Set());
|
|
2146
|
+
this.externalTemplateToComponentsMap.set(path, /* @__PURE__ */ new Set());
|
|
2257
2147
|
}
|
|
2258
2148
|
this.externalTemplateToComponentsMap.get(path).add(component);
|
|
2259
2149
|
}
|
|
@@ -2268,11 +2158,11 @@ var ResourceRegistry = class {
|
|
|
2268
2158
|
registerStyle(styleResource, component) {
|
|
2269
2159
|
const { path } = styleResource;
|
|
2270
2160
|
if (!this.componentToStylesMap.has(component)) {
|
|
2271
|
-
this.componentToStylesMap.set(component, new Set());
|
|
2161
|
+
this.componentToStylesMap.set(component, /* @__PURE__ */ new Set());
|
|
2272
2162
|
}
|
|
2273
2163
|
if (path !== null) {
|
|
2274
2164
|
if (!this.externalStyleToComponentsMap.has(path)) {
|
|
2275
|
-
this.externalStyleToComponentsMap.set(path, new Set());
|
|
2165
|
+
this.externalStyleToComponentsMap.set(path, /* @__PURE__ */ new Set());
|
|
2276
2166
|
}
|
|
2277
2167
|
this.externalStyleToComponentsMap.get(path).add(component);
|
|
2278
2168
|
}
|
|
@@ -2280,19 +2170,19 @@ var ResourceRegistry = class {
|
|
|
2280
2170
|
}
|
|
2281
2171
|
getStyles(component) {
|
|
2282
2172
|
if (!this.componentToStylesMap.has(component)) {
|
|
2283
|
-
return new Set();
|
|
2173
|
+
return /* @__PURE__ */ new Set();
|
|
2284
2174
|
}
|
|
2285
2175
|
return this.componentToStylesMap.get(component);
|
|
2286
2176
|
}
|
|
2287
2177
|
getComponentsWithStyle(styleUrl) {
|
|
2288
2178
|
if (!this.externalStyleToComponentsMap.has(styleUrl)) {
|
|
2289
|
-
return new Set();
|
|
2179
|
+
return /* @__PURE__ */ new Set();
|
|
2290
2180
|
}
|
|
2291
2181
|
return this.externalStyleToComponentsMap.get(styleUrl);
|
|
2292
2182
|
}
|
|
2293
2183
|
};
|
|
2294
2184
|
|
|
2295
|
-
// bazel-out/
|
|
2185
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/api.mjs
|
|
2296
2186
|
var CompilationMode;
|
|
2297
2187
|
(function(CompilationMode2) {
|
|
2298
2188
|
CompilationMode2[CompilationMode2["FULL"] = 0] = "FULL";
|
|
@@ -2310,28 +2200,28 @@ var HandlerFlags;
|
|
|
2310
2200
|
HandlerFlags2[HandlerFlags2["FULL_INHERITANCE"] = 1] = "FULL_INHERITANCE";
|
|
2311
2201
|
})(HandlerFlags || (HandlerFlags = {}));
|
|
2312
2202
|
|
|
2313
|
-
// bazel-out/
|
|
2314
|
-
import
|
|
2203
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/alias.mjs
|
|
2204
|
+
import ts8 from "typescript";
|
|
2315
2205
|
function aliasTransformFactory(exportStatements) {
|
|
2316
2206
|
return (context) => {
|
|
2317
2207
|
return (file) => {
|
|
2318
|
-
if (
|
|
2208
|
+
if (ts8.isBundle(file) || !exportStatements.has(file.fileName)) {
|
|
2319
2209
|
return file;
|
|
2320
2210
|
}
|
|
2321
2211
|
const statements = [...file.statements];
|
|
2322
2212
|
exportStatements.get(file.fileName).forEach(([moduleName, symbolName], aliasName) => {
|
|
2323
|
-
const stmt =
|
|
2213
|
+
const stmt = ts8.createExportDeclaration(void 0, void 0, ts8.createNamedExports([createExportSpecifier(symbolName, aliasName)]), ts8.createStringLiteral(moduleName));
|
|
2324
2214
|
statements.push(stmt);
|
|
2325
2215
|
});
|
|
2326
|
-
return
|
|
2216
|
+
return ts8.updateSourceFileNode(file, statements);
|
|
2327
2217
|
};
|
|
2328
2218
|
};
|
|
2329
2219
|
}
|
|
2330
2220
|
|
|
2331
|
-
// bazel-out/
|
|
2332
|
-
import
|
|
2221
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
2222
|
+
import ts9 from "typescript";
|
|
2333
2223
|
|
|
2334
|
-
// bazel-out/
|
|
2224
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/trait.mjs
|
|
2335
2225
|
var TraitState;
|
|
2336
2226
|
(function(TraitState2) {
|
|
2337
2227
|
TraitState2[TraitState2["Pending"] = 0] = "Pending";
|
|
@@ -2386,7 +2276,7 @@ var TraitImpl = class {
|
|
|
2386
2276
|
}
|
|
2387
2277
|
};
|
|
2388
2278
|
|
|
2389
|
-
// bazel-out/
|
|
2279
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/compilation.mjs
|
|
2390
2280
|
var TraitCompiler = class {
|
|
2391
2281
|
constructor(handlers, reflector, perf, incrementalBuild, compileNonExportedClasses, compilationMode, dtsTransforms, semanticDepGraphUpdater) {
|
|
2392
2282
|
this.handlers = handlers;
|
|
@@ -2397,11 +2287,11 @@ var TraitCompiler = class {
|
|
|
2397
2287
|
this.compilationMode = compilationMode;
|
|
2398
2288
|
this.dtsTransforms = dtsTransforms;
|
|
2399
2289
|
this.semanticDepGraphUpdater = semanticDepGraphUpdater;
|
|
2400
|
-
this.classes = new Map();
|
|
2401
|
-
this.fileToClasses = new Map();
|
|
2402
|
-
this.filesWithoutTraits = new Set();
|
|
2403
|
-
this.reexportMap = new Map();
|
|
2404
|
-
this.handlersByName = new Map();
|
|
2290
|
+
this.classes = /* @__PURE__ */ new Map();
|
|
2291
|
+
this.fileToClasses = /* @__PURE__ */ new Map();
|
|
2292
|
+
this.filesWithoutTraits = /* @__PURE__ */ new Set();
|
|
2293
|
+
this.reexportMap = /* @__PURE__ */ new Map();
|
|
2294
|
+
this.handlersByName = /* @__PURE__ */ new Map();
|
|
2405
2295
|
for (const handler of handlers) {
|
|
2406
2296
|
this.handlersByName.set(handler.name, handler);
|
|
2407
2297
|
}
|
|
@@ -2434,7 +2324,7 @@ var TraitCompiler = class {
|
|
|
2434
2324
|
if (this.reflector.isClass(node)) {
|
|
2435
2325
|
this.analyzeClass(node, preanalyze ? promises : null);
|
|
2436
2326
|
}
|
|
2437
|
-
|
|
2327
|
+
ts9.forEachChild(node, visit2);
|
|
2438
2328
|
};
|
|
2439
2329
|
visit2(sf);
|
|
2440
2330
|
if (preanalyze && promises.length > 0) {
|
|
@@ -2461,7 +2351,7 @@ var TraitCompiler = class {
|
|
|
2461
2351
|
return records;
|
|
2462
2352
|
}
|
|
2463
2353
|
getAnalyzedRecords() {
|
|
2464
|
-
const result = new Map();
|
|
2354
|
+
const result = /* @__PURE__ */ new Map();
|
|
2465
2355
|
for (const [sf, classes] of this.fileToClasses) {
|
|
2466
2356
|
const records = [];
|
|
2467
2357
|
for (const clazz of classes) {
|
|
@@ -2499,7 +2389,7 @@ var TraitCompiler = class {
|
|
|
2499
2389
|
this.classes.set(record.node, record);
|
|
2500
2390
|
const sf = record.node.getSourceFile();
|
|
2501
2391
|
if (!this.fileToClasses.has(sf)) {
|
|
2502
|
-
this.fileToClasses.set(sf, new Set());
|
|
2392
|
+
this.fileToClasses.set(sf, /* @__PURE__ */ new Set());
|
|
2503
2393
|
}
|
|
2504
2394
|
this.fileToClasses.get(sf).add(record.node);
|
|
2505
2395
|
}
|
|
@@ -2533,7 +2423,7 @@ var TraitCompiler = class {
|
|
|
2533
2423
|
this.classes.set(clazz, record);
|
|
2534
2424
|
const sf = clazz.getSourceFile();
|
|
2535
2425
|
if (!this.fileToClasses.has(sf)) {
|
|
2536
|
-
this.fileToClasses.set(sf, new Set());
|
|
2426
|
+
this.fileToClasses.set(sf, /* @__PURE__ */ new Set());
|
|
2537
2427
|
}
|
|
2538
2428
|
this.fileToClasses.get(sf).add(clazz);
|
|
2539
2429
|
} else {
|
|
@@ -2545,7 +2435,7 @@ var TraitCompiler = class {
|
|
|
2545
2435
|
}
|
|
2546
2436
|
if (isPrimaryHandler && record.hasPrimaryHandler) {
|
|
2547
2437
|
record.metaDiagnostics = [{
|
|
2548
|
-
category:
|
|
2438
|
+
category: ts9.DiagnosticCategory.Error,
|
|
2549
2439
|
code: Number("-99" + ErrorCode.DECORATOR_COLLISION),
|
|
2550
2440
|
file: getSourceFile(clazz),
|
|
2551
2441
|
start: clazz.getStart(void 0, false),
|
|
@@ -2662,7 +2552,7 @@ var TraitCompiler = class {
|
|
|
2662
2552
|
if (result.reexports !== void 0) {
|
|
2663
2553
|
const fileName = clazz.getSourceFile().fileName;
|
|
2664
2554
|
if (!this.reexportMap.has(fileName)) {
|
|
2665
|
-
this.reexportMap.set(fileName, new Map());
|
|
2555
|
+
this.reexportMap.set(fileName, /* @__PURE__ */ new Map());
|
|
2666
2556
|
}
|
|
2667
2557
|
const fileReexports = this.reexportMap.get(fileName);
|
|
2668
2558
|
for (const reexport of result.reexports) {
|
|
@@ -2753,7 +2643,7 @@ var TraitCompiler = class {
|
|
|
2753
2643
|
}
|
|
2754
2644
|
}
|
|
2755
2645
|
compile(clazz, constantPool) {
|
|
2756
|
-
const original =
|
|
2646
|
+
const original = ts9.getOriginalNode(clazz);
|
|
2757
2647
|
if (!this.reflector.isClass(clazz) || !this.reflector.isClass(original) || !this.classes.has(original)) {
|
|
2758
2648
|
return null;
|
|
2759
2649
|
}
|
|
@@ -2784,7 +2674,7 @@ var TraitCompiler = class {
|
|
|
2784
2674
|
return res.length > 0 ? res : null;
|
|
2785
2675
|
}
|
|
2786
2676
|
decoratorsFor(node) {
|
|
2787
|
-
const original =
|
|
2677
|
+
const original = ts9.getOriginalNode(node);
|
|
2788
2678
|
if (!this.reflector.isClass(original) || !this.classes.has(original)) {
|
|
2789
2679
|
return [];
|
|
2790
2680
|
}
|
|
@@ -2794,7 +2684,7 @@ var TraitCompiler = class {
|
|
|
2794
2684
|
if (trait.state !== TraitState.Resolved) {
|
|
2795
2685
|
continue;
|
|
2796
2686
|
}
|
|
2797
|
-
if (trait.detected.trigger !== null &&
|
|
2687
|
+
if (trait.detected.trigger !== null && ts9.isDecorator(trait.detected.trigger)) {
|
|
2798
2688
|
decorators.push(trait.detected.trigger);
|
|
2799
2689
|
}
|
|
2800
2690
|
}
|
|
@@ -2823,24 +2713,24 @@ var TraitCompiler = class {
|
|
|
2823
2713
|
}
|
|
2824
2714
|
};
|
|
2825
2715
|
|
|
2826
|
-
// bazel-out/
|
|
2827
|
-
import ts12 from "typescript";
|
|
2828
|
-
|
|
2829
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
|
|
2716
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
2830
2717
|
import ts11 from "typescript";
|
|
2718
|
+
|
|
2719
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/utils.mjs
|
|
2720
|
+
import ts10 from "typescript";
|
|
2831
2721
|
function addImports(importManager, sf, extraStatements = []) {
|
|
2832
2722
|
const addedImports = importManager.getAllImports(sf.fileName).map((i) => {
|
|
2833
|
-
const qualifier =
|
|
2834
|
-
const importClause =
|
|
2835
|
-
const decl =
|
|
2836
|
-
|
|
2723
|
+
const qualifier = ts10.createIdentifier(i.qualifier.text);
|
|
2724
|
+
const importClause = ts10.createImportClause(void 0, ts10.createNamespaceImport(qualifier));
|
|
2725
|
+
const decl = ts10.createImportDeclaration(void 0, void 0, importClause, ts10.createLiteral(i.specifier));
|
|
2726
|
+
ts10.setOriginalNode(i.qualifier, decl);
|
|
2837
2727
|
return decl;
|
|
2838
2728
|
});
|
|
2839
2729
|
const existingImports = sf.statements.filter((stmt) => isImportStatement(stmt));
|
|
2840
2730
|
const body = sf.statements.filter((stmt) => !isImportStatement(stmt));
|
|
2841
2731
|
if (addedImports.length > 0) {
|
|
2842
|
-
const fileoverviewAnchorStmt =
|
|
2843
|
-
return
|
|
2732
|
+
const fileoverviewAnchorStmt = ts10.createNotEmittedStatement(sf);
|
|
2733
|
+
return ts10.updateSourceFileNode(sf, ts10.createNodeArray([
|
|
2844
2734
|
fileoverviewAnchorStmt,
|
|
2845
2735
|
...existingImports,
|
|
2846
2736
|
...addedImports,
|
|
@@ -2851,13 +2741,13 @@ function addImports(importManager, sf, extraStatements = []) {
|
|
|
2851
2741
|
return sf;
|
|
2852
2742
|
}
|
|
2853
2743
|
function isImportStatement(stmt) {
|
|
2854
|
-
return
|
|
2744
|
+
return ts10.isImportDeclaration(stmt) || ts10.isImportEqualsDeclaration(stmt) || ts10.isNamespaceImport(stmt);
|
|
2855
2745
|
}
|
|
2856
2746
|
|
|
2857
|
-
// bazel-out/
|
|
2747
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/declaration.mjs
|
|
2858
2748
|
var DtsTransformRegistry = class {
|
|
2859
2749
|
constructor() {
|
|
2860
|
-
this.ivyDeclarationTransforms = new Map();
|
|
2750
|
+
this.ivyDeclarationTransforms = /* @__PURE__ */ new Map();
|
|
2861
2751
|
}
|
|
2862
2752
|
getIvyDeclarationTransform(sf) {
|
|
2863
2753
|
if (!this.ivyDeclarationTransforms.has(sf)) {
|
|
@@ -2869,7 +2759,7 @@ var DtsTransformRegistry = class {
|
|
|
2869
2759
|
if (!sf.isDeclarationFile) {
|
|
2870
2760
|
return null;
|
|
2871
2761
|
}
|
|
2872
|
-
const originalSf =
|
|
2762
|
+
const originalSf = ts11.getOriginalNode(sf);
|
|
2873
2763
|
let transforms = null;
|
|
2874
2764
|
if (this.ivyDeclarationTransforms.has(originalSf)) {
|
|
2875
2765
|
transforms = [];
|
|
@@ -2882,7 +2772,7 @@ function declarationTransformFactory(transformRegistry, importRewriter, importPr
|
|
|
2882
2772
|
return (context) => {
|
|
2883
2773
|
const transformer = new DtsTransformer(context, importRewriter, importPrefix);
|
|
2884
2774
|
return (fileOrBundle) => {
|
|
2885
|
-
if (
|
|
2775
|
+
if (ts11.isBundle(fileOrBundle)) {
|
|
2886
2776
|
return fileOrBundle;
|
|
2887
2777
|
}
|
|
2888
2778
|
const transforms = transformRegistry.getAllTransforms(fileOrBundle);
|
|
@@ -2902,15 +2792,15 @@ var DtsTransformer = class {
|
|
|
2902
2792
|
transform(sf, transforms) {
|
|
2903
2793
|
const imports = new ImportManager(this.importRewriter, this.importPrefix);
|
|
2904
2794
|
const visitor = (node) => {
|
|
2905
|
-
if (
|
|
2795
|
+
if (ts11.isClassDeclaration(node)) {
|
|
2906
2796
|
return this.transformClassDeclaration(node, transforms, imports);
|
|
2907
|
-
} else if (
|
|
2797
|
+
} else if (ts11.isFunctionDeclaration(node)) {
|
|
2908
2798
|
return this.transformFunctionDeclaration(node, transforms, imports);
|
|
2909
2799
|
} else {
|
|
2910
|
-
return
|
|
2800
|
+
return ts11.visitEachChild(node, visitor, this.ctx);
|
|
2911
2801
|
}
|
|
2912
2802
|
};
|
|
2913
|
-
sf =
|
|
2803
|
+
sf = ts11.visitNode(sf, visitor);
|
|
2914
2804
|
return addImports(imports, sf);
|
|
2915
2805
|
}
|
|
2916
2806
|
transformClassDeclaration(clazz, transforms, imports) {
|
|
@@ -2938,7 +2828,7 @@ var DtsTransformer = class {
|
|
|
2938
2828
|
}
|
|
2939
2829
|
}
|
|
2940
2830
|
if (elementsChanged && clazz === newClazz) {
|
|
2941
|
-
newClazz =
|
|
2831
|
+
newClazz = ts11.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, elements);
|
|
2942
2832
|
}
|
|
2943
2833
|
return newClazz;
|
|
2944
2834
|
}
|
|
@@ -2954,44 +2844,44 @@ var DtsTransformer = class {
|
|
|
2954
2844
|
};
|
|
2955
2845
|
var IvyDeclarationDtsTransform = class {
|
|
2956
2846
|
constructor() {
|
|
2957
|
-
this.declarationFields = new Map();
|
|
2847
|
+
this.declarationFields = /* @__PURE__ */ new Map();
|
|
2958
2848
|
}
|
|
2959
2849
|
addFields(decl, fields) {
|
|
2960
2850
|
this.declarationFields.set(decl, fields);
|
|
2961
2851
|
}
|
|
2962
2852
|
transformClass(clazz, members, imports) {
|
|
2963
|
-
const original =
|
|
2853
|
+
const original = ts11.getOriginalNode(clazz);
|
|
2964
2854
|
if (!this.declarationFields.has(original)) {
|
|
2965
2855
|
return clazz;
|
|
2966
2856
|
}
|
|
2967
2857
|
const fields = this.declarationFields.get(original);
|
|
2968
2858
|
const newMembers = fields.map((decl) => {
|
|
2969
|
-
const modifiers = [
|
|
2859
|
+
const modifiers = [ts11.createModifier(ts11.SyntaxKind.StaticKeyword)];
|
|
2970
2860
|
const typeRef = translateType(decl.type, imports);
|
|
2971
2861
|
markForEmitAsSingleLine(typeRef);
|
|
2972
|
-
return
|
|
2862
|
+
return ts11.createProperty(void 0, modifiers, decl.name, void 0, typeRef, void 0);
|
|
2973
2863
|
});
|
|
2974
|
-
return
|
|
2864
|
+
return ts11.updateClassDeclaration(clazz, clazz.decorators, clazz.modifiers, clazz.name, clazz.typeParameters, clazz.heritageClauses, [...members, ...newMembers]);
|
|
2975
2865
|
}
|
|
2976
2866
|
};
|
|
2977
2867
|
function markForEmitAsSingleLine(node) {
|
|
2978
|
-
|
|
2979
|
-
|
|
2868
|
+
ts11.setEmitFlags(node, ts11.EmitFlags.SingleLine);
|
|
2869
|
+
ts11.forEachChild(node, markForEmitAsSingleLine);
|
|
2980
2870
|
}
|
|
2981
2871
|
|
|
2982
|
-
// bazel-out/
|
|
2872
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
2983
2873
|
import { ConstantPool } from "@angular/compiler";
|
|
2984
|
-
import ts14 from "typescript";
|
|
2985
|
-
|
|
2986
|
-
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
|
|
2987
2874
|
import ts13 from "typescript";
|
|
2875
|
+
|
|
2876
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/util/src/visitor.mjs
|
|
2877
|
+
import ts12 from "typescript";
|
|
2988
2878
|
function visit(node, visitor, context) {
|
|
2989
2879
|
return visitor._visit(node, context);
|
|
2990
2880
|
}
|
|
2991
2881
|
var Visitor = class {
|
|
2992
2882
|
constructor() {
|
|
2993
|
-
this._before = new Map();
|
|
2994
|
-
this._after = new Map();
|
|
2883
|
+
this._before = /* @__PURE__ */ new Map();
|
|
2884
|
+
this._after = /* @__PURE__ */ new Map();
|
|
2995
2885
|
}
|
|
2996
2886
|
_visitListEntryNode(node, visitor) {
|
|
2997
2887
|
const result = visitor(node);
|
|
@@ -3008,8 +2898,8 @@ var Visitor = class {
|
|
|
3008
2898
|
}
|
|
3009
2899
|
_visit(node, context) {
|
|
3010
2900
|
let visitedNode = null;
|
|
3011
|
-
node =
|
|
3012
|
-
if (
|
|
2901
|
+
node = ts12.visitEachChild(node, (child) => this._visit(child, context), context);
|
|
2902
|
+
if (ts12.isClassDeclaration(node)) {
|
|
3013
2903
|
visitedNode = this._visitListEntryNode(node, (node2) => this.visitClassDeclaration(node2));
|
|
3014
2904
|
} else {
|
|
3015
2905
|
visitedNode = this.visitOtherNode(node);
|
|
@@ -3023,7 +2913,7 @@ var Visitor = class {
|
|
|
3023
2913
|
if (node.statements.every((stmt) => !this._before.has(stmt) && !this._after.has(stmt))) {
|
|
3024
2914
|
return node;
|
|
3025
2915
|
}
|
|
3026
|
-
const clone =
|
|
2916
|
+
const clone = ts12.getMutableClone(node);
|
|
3027
2917
|
const newStatements = [];
|
|
3028
2918
|
clone.statements.forEach((stmt) => {
|
|
3029
2919
|
if (this._before.has(stmt)) {
|
|
@@ -3036,7 +2926,7 @@ var Visitor = class {
|
|
|
3036
2926
|
this._after.delete(stmt);
|
|
3037
2927
|
}
|
|
3038
2928
|
});
|
|
3039
|
-
clone.statements =
|
|
2929
|
+
clone.statements = ts12.createNodeArray(newStatements, node.statements.hasTrailingComma);
|
|
3040
2930
|
return clone;
|
|
3041
2931
|
}
|
|
3042
2932
|
};
|
|
@@ -3045,8 +2935,8 @@ function hasStatements(node) {
|
|
|
3045
2935
|
return block.statements !== void 0 && Array.isArray(block.statements);
|
|
3046
2936
|
}
|
|
3047
2937
|
|
|
3048
|
-
// bazel-out/
|
|
3049
|
-
var NO_DECORATORS = new Set();
|
|
2938
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/transform/src/transform.mjs
|
|
2939
|
+
var NO_DECORATORS = /* @__PURE__ */ new Set();
|
|
3050
2940
|
var CLOSURE_FILE_OVERVIEW_REGEXP = /\s+@fileoverview\s+/i;
|
|
3051
2941
|
function ivyTransformFactory(compilation, reflector, importRewriter, defaultImportTracker, perf, isCore, isClosureCompilerEnabled) {
|
|
3052
2942
|
const recordWrappedNode = createRecorderFn(defaultImportTracker);
|
|
@@ -3061,7 +2951,7 @@ var IvyCompilationVisitor = class extends Visitor {
|
|
|
3061
2951
|
super();
|
|
3062
2952
|
this.compilation = compilation;
|
|
3063
2953
|
this.constantPool = constantPool;
|
|
3064
|
-
this.classCompilationMap = new Map();
|
|
2954
|
+
this.classCompilationMap = /* @__PURE__ */ new Map();
|
|
3065
2955
|
}
|
|
3066
2956
|
visitClassDeclaration(node) {
|
|
3067
2957
|
const result = this.compilation.compile(node, this.constantPool);
|
|
@@ -3094,14 +2984,14 @@ var IvyTransformationVisitor = class extends Visitor {
|
|
|
3094
2984
|
const members = [...node.members];
|
|
3095
2985
|
for (const field of this.classCompilationMap.get(node)) {
|
|
3096
2986
|
const exprNode = translateExpression(field.initializer, this.importManager, translateOptions);
|
|
3097
|
-
const property =
|
|
2987
|
+
const property = ts13.createProperty(void 0, [ts13.createToken(ts13.SyntaxKind.StaticKeyword)], field.name, void 0, void 0, exprNode);
|
|
3098
2988
|
if (this.isClosureCompilerEnabled) {
|
|
3099
|
-
|
|
2989
|
+
ts13.addSyntheticLeadingComment(property, ts13.SyntaxKind.MultiLineCommentTrivia, "* @nocollapse ", false);
|
|
3100
2990
|
}
|
|
3101
2991
|
field.statements.map((stmt) => translateStatement(stmt, this.importManager, translateOptions)).forEach((stmt) => statements.push(stmt));
|
|
3102
2992
|
members.push(property);
|
|
3103
2993
|
}
|
|
3104
|
-
node =
|
|
2994
|
+
node = ts13.updateClassDeclaration(node, maybeFilterDecorator(node.decorators, this.compilation.decoratorsFor(node)), node.modifiers, node.name, node.typeParameters, node.heritageClauses || [], members.map((member) => this._stripAngularDecorators(member)));
|
|
3105
2995
|
return { node, after: statements };
|
|
3106
2996
|
}
|
|
3107
2997
|
_angularCoreDecorators(decl) {
|
|
@@ -3130,25 +3020,25 @@ var IvyTransformationVisitor = class extends Visitor {
|
|
|
3130
3020
|
if (filtered.length === 0) {
|
|
3131
3021
|
return void 0;
|
|
3132
3022
|
}
|
|
3133
|
-
const array =
|
|
3023
|
+
const array = ts13.createNodeArray(filtered);
|
|
3134
3024
|
array.pos = node.decorators.pos;
|
|
3135
3025
|
array.end = node.decorators.end;
|
|
3136
3026
|
return array;
|
|
3137
3027
|
}
|
|
3138
3028
|
_stripAngularDecorators(node) {
|
|
3139
|
-
if (
|
|
3140
|
-
node =
|
|
3141
|
-
} else if (
|
|
3142
|
-
node =
|
|
3143
|
-
} else if (
|
|
3144
|
-
node =
|
|
3145
|
-
} else if (
|
|
3146
|
-
node =
|
|
3147
|
-
} else if (
|
|
3148
|
-
node =
|
|
3149
|
-
} else if (
|
|
3029
|
+
if (ts13.isParameter(node)) {
|
|
3030
|
+
node = ts13.updateParameter(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.dotDotDotToken, node.name, node.questionToken, node.type, node.initializer);
|
|
3031
|
+
} else if (ts13.isMethodDeclaration(node) && node.decorators !== void 0) {
|
|
3032
|
+
node = ts13.updateMethod(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.asteriskToken, node.name, node.questionToken, node.typeParameters, node.parameters, node.type, node.body);
|
|
3033
|
+
} else if (ts13.isPropertyDeclaration(node) && node.decorators !== void 0) {
|
|
3034
|
+
node = ts13.updateProperty(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.questionToken, node.type, node.initializer);
|
|
3035
|
+
} else if (ts13.isGetAccessor(node)) {
|
|
3036
|
+
node = ts13.updateGetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.type, node.body);
|
|
3037
|
+
} else if (ts13.isSetAccessor(node)) {
|
|
3038
|
+
node = ts13.updateSetAccessor(node, this._nonCoreDecoratorsOnly(node), node.modifiers, node.name, node.parameters, node.body);
|
|
3039
|
+
} else if (ts13.isConstructorDeclaration(node)) {
|
|
3150
3040
|
const parameters = node.parameters.map((param) => this._stripAngularDecorators(param));
|
|
3151
|
-
node =
|
|
3041
|
+
node = ts13.updateConstructor(node, node.decorators, node.modifiers, parameters, node.body);
|
|
3152
3042
|
}
|
|
3153
3043
|
return node;
|
|
3154
3044
|
}
|
|
@@ -3160,7 +3050,7 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
|
|
|
3160
3050
|
visit(file, compilationVisitor, context);
|
|
3161
3051
|
const transformationVisitor = new IvyTransformationVisitor(compilation, compilationVisitor.classCompilationMap, reflector, importManager, recordWrappedNode, isClosureCompilerEnabled, isCore);
|
|
3162
3052
|
let sf = visit(file, transformationVisitor, context);
|
|
3163
|
-
const downlevelTranslatedCode = getLocalizeCompileTarget(context) <
|
|
3053
|
+
const downlevelTranslatedCode = getLocalizeCompileTarget(context) < ts13.ScriptTarget.ES2015;
|
|
3164
3054
|
const constants = constantPool.statements.map((stmt) => translateStatement(stmt, importManager, {
|
|
3165
3055
|
recordWrappedNode,
|
|
3166
3056
|
downlevelTaggedTemplates: downlevelTranslatedCode,
|
|
@@ -3175,17 +3065,17 @@ function transformIvySourceFile(compilation, context, reflector, importRewriter,
|
|
|
3175
3065
|
return sf;
|
|
3176
3066
|
}
|
|
3177
3067
|
function getLocalizeCompileTarget(context) {
|
|
3178
|
-
const target = context.getCompilerOptions().target ||
|
|
3179
|
-
return target !==
|
|
3068
|
+
const target = context.getCompilerOptions().target || ts13.ScriptTarget.ES2015;
|
|
3069
|
+
return target !== ts13.ScriptTarget.JSON ? target : ts13.ScriptTarget.ES2015;
|
|
3180
3070
|
}
|
|
3181
3071
|
function getFileOverviewComment(statements) {
|
|
3182
3072
|
if (statements.length > 0) {
|
|
3183
3073
|
const host = statements[0];
|
|
3184
3074
|
let trailing = false;
|
|
3185
|
-
let comments =
|
|
3075
|
+
let comments = ts13.getSyntheticLeadingComments(host);
|
|
3186
3076
|
if (!comments || comments.length === 0) {
|
|
3187
3077
|
trailing = true;
|
|
3188
|
-
comments =
|
|
3078
|
+
comments = ts13.getSyntheticTrailingComments(host);
|
|
3189
3079
|
}
|
|
3190
3080
|
if (comments && comments.length > 0 && CLOSURE_FILE_OVERVIEW_REGEXP.test(comments[0].text)) {
|
|
3191
3081
|
return { comments, host, trailing };
|
|
@@ -3197,22 +3087,22 @@ function setFileOverviewComment(sf, fileoverview) {
|
|
|
3197
3087
|
const { comments, host, trailing } = fileoverview;
|
|
3198
3088
|
if (sf.statements.length > 0 && host !== sf.statements[0]) {
|
|
3199
3089
|
if (trailing) {
|
|
3200
|
-
|
|
3090
|
+
ts13.setSyntheticTrailingComments(host, void 0);
|
|
3201
3091
|
} else {
|
|
3202
|
-
|
|
3092
|
+
ts13.setSyntheticLeadingComments(host, void 0);
|
|
3203
3093
|
}
|
|
3204
|
-
|
|
3094
|
+
ts13.setSyntheticLeadingComments(sf.statements[0], comments);
|
|
3205
3095
|
}
|
|
3206
3096
|
}
|
|
3207
3097
|
function maybeFilterDecorator(decorators, toRemove) {
|
|
3208
3098
|
if (decorators === void 0) {
|
|
3209
3099
|
return void 0;
|
|
3210
3100
|
}
|
|
3211
|
-
const filtered = decorators.filter((dec) => toRemove.find((decToRemove) =>
|
|
3101
|
+
const filtered = decorators.filter((dec) => toRemove.find((decToRemove) => ts13.getOriginalNode(dec) === decToRemove) === void 0);
|
|
3212
3102
|
if (filtered.length === 0) {
|
|
3213
3103
|
return void 0;
|
|
3214
3104
|
}
|
|
3215
|
-
return
|
|
3105
|
+
return ts13.createNodeArray(filtered);
|
|
3216
3106
|
}
|
|
3217
3107
|
function isFromAngularCore(decorator) {
|
|
3218
3108
|
return decorator.import !== null && decorator.import.from === "@angular/core";
|
|
@@ -3226,8 +3116,8 @@ function createRecorderFn(defaultImportTracker) {
|
|
|
3226
3116
|
};
|
|
3227
3117
|
}
|
|
3228
3118
|
|
|
3229
|
-
// bazel-out/
|
|
3230
|
-
import
|
|
3119
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/diagnostics.mjs
|
|
3120
|
+
import ts14 from "typescript";
|
|
3231
3121
|
function createValueHasWrongTypeError(node, value, messageText) {
|
|
3232
3122
|
var _a;
|
|
3233
3123
|
let chainedMessage;
|
|
@@ -3245,11 +3135,11 @@ function createValueHasWrongTypeError(node, value, messageText) {
|
|
|
3245
3135
|
}
|
|
3246
3136
|
const chain = {
|
|
3247
3137
|
messageText,
|
|
3248
|
-
category:
|
|
3138
|
+
category: ts14.DiagnosticCategory.Error,
|
|
3249
3139
|
code: 0,
|
|
3250
3140
|
next: [{
|
|
3251
3141
|
messageText: chainedMessage,
|
|
3252
|
-
category:
|
|
3142
|
+
category: ts14.DiagnosticCategory.Message,
|
|
3253
3143
|
code: 0
|
|
3254
3144
|
}]
|
|
3255
3145
|
};
|
|
@@ -3323,11 +3213,11 @@ function getInheritedUndecoratedCtorDiagnostic(node, baseClass, reader) {
|
|
|
3323
3213
|
return makeDiagnostic(ErrorCode.DIRECTIVE_INHERITS_UNDECORATED_CTOR, node.name, `The ${dirOrComp.toLowerCase()} ${node.name.text} inherits its constructor from ${baseClassName}, but the latter does not have an Angular decorator of its own. Dependency injection will not be able to resolve the parameters of ${baseClassName}'s constructor. Either add a @Directive decorator to ${baseClassName}, or add an explicit constructor to ${node.name.text}.`);
|
|
3324
3214
|
}
|
|
3325
3215
|
|
|
3326
|
-
// bazel-out/
|
|
3216
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/directive.mjs
|
|
3327
3217
|
import { compileClassMetadata, compileDeclareClassMetadata, compileDeclareDirectiveFromMetadata, compileDirectiveFromMetadata, createMayBeForwardRefExpression, emitDistinctChangesOnlyDefaultValue, ExternalExpr as ExternalExpr3, FactoryTarget, getSafePropertyAccessString, makeBindingParser, parseHostBindings, verifyHostBindings, WrappedNodeExpr as WrappedNodeExpr3 } from "@angular/compiler";
|
|
3328
|
-
import
|
|
3218
|
+
import ts16 from "typescript";
|
|
3329
3219
|
|
|
3330
|
-
// bazel-out/
|
|
3220
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/factory.mjs
|
|
3331
3221
|
import { compileDeclareFactoryFunction, compileFactoryFunction } from "@angular/compiler";
|
|
3332
3222
|
function compileNgFactoryDefField(metadata) {
|
|
3333
3223
|
const res = compileFactoryFunction(metadata);
|
|
@@ -3338,9 +3228,9 @@ function compileDeclareFactory(metadata) {
|
|
|
3338
3228
|
return { name: "\u0275fac", initializer: res.expression, statements: res.statements, type: res.type };
|
|
3339
3229
|
}
|
|
3340
3230
|
|
|
3341
|
-
// bazel-out/
|
|
3231
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/metadata.mjs
|
|
3342
3232
|
import { FunctionExpr, LiteralArrayExpr, LiteralExpr as LiteralExpr2, literalMap, ReturnStatement, WrappedNodeExpr as WrappedNodeExpr2 } from "@angular/compiler";
|
|
3343
|
-
import
|
|
3233
|
+
import ts15 from "typescript";
|
|
3344
3234
|
function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompiler, angularDecoratorTransform = (dec) => dec) {
|
|
3345
3235
|
if (!reflection.isClass(clazz)) {
|
|
3346
3236
|
return null;
|
|
@@ -3354,7 +3244,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
|
|
|
3354
3244
|
if (ngClassDecorators.length === 0) {
|
|
3355
3245
|
return null;
|
|
3356
3246
|
}
|
|
3357
|
-
const metaDecorators = new WrappedNodeExpr2(
|
|
3247
|
+
const metaDecorators = new WrappedNodeExpr2(ts15.createArrayLiteral(ngClassDecorators));
|
|
3358
3248
|
let metaCtorParameters = null;
|
|
3359
3249
|
const classCtorParameters = reflection.getConstructorParameters(clazz);
|
|
3360
3250
|
if (classCtorParameters !== null) {
|
|
@@ -3374,7 +3264,7 @@ function extractClassMetadata(clazz, reflection, isCore, annotateForClosureCompi
|
|
|
3374
3264
|
return classMemberToMetadata((_a = member.nameNode) != null ? _a : member.name, member.decorators, isCore);
|
|
3375
3265
|
});
|
|
3376
3266
|
if (decoratedMembers.length > 0) {
|
|
3377
|
-
metaPropDecorators = new WrappedNodeExpr2(
|
|
3267
|
+
metaPropDecorators = new WrappedNodeExpr2(ts15.createObjectLiteral(decoratedMembers));
|
|
3378
3268
|
}
|
|
3379
3269
|
return {
|
|
3380
3270
|
type: new WrappedNodeExpr2(id),
|
|
@@ -3390,43 +3280,43 @@ function ctorParameterToMetadata(param, isCore) {
|
|
|
3390
3280
|
];
|
|
3391
3281
|
if (param.decorators !== null) {
|
|
3392
3282
|
const ngDecorators = param.decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
|
|
3393
|
-
const value = new WrappedNodeExpr2(
|
|
3283
|
+
const value = new WrappedNodeExpr2(ts15.createArrayLiteral(ngDecorators));
|
|
3394
3284
|
mapEntries.push({ key: "decorators", value, quoted: false });
|
|
3395
3285
|
}
|
|
3396
3286
|
return literalMap(mapEntries);
|
|
3397
3287
|
}
|
|
3398
3288
|
function classMemberToMetadata(name, decorators, isCore) {
|
|
3399
3289
|
const ngDecorators = decorators.filter((dec) => isAngularDecorator2(dec, isCore)).map((decorator) => decoratorToMetadata(decorator));
|
|
3400
|
-
const decoratorMeta =
|
|
3401
|
-
return
|
|
3290
|
+
const decoratorMeta = ts15.createArrayLiteral(ngDecorators);
|
|
3291
|
+
return ts15.createPropertyAssignment(name, decoratorMeta);
|
|
3402
3292
|
}
|
|
3403
3293
|
function decoratorToMetadata(decorator, wrapFunctionsInParens) {
|
|
3404
3294
|
if (decorator.identifier === null) {
|
|
3405
3295
|
throw new Error("Illegal state: synthesized decorator cannot be emitted in class metadata.");
|
|
3406
3296
|
}
|
|
3407
3297
|
const properties = [
|
|
3408
|
-
|
|
3298
|
+
ts15.createPropertyAssignment("type", ts15.getMutableClone(decorator.identifier))
|
|
3409
3299
|
];
|
|
3410
3300
|
if (decorator.args !== null && decorator.args.length > 0) {
|
|
3411
3301
|
const args = decorator.args.map((arg) => {
|
|
3412
|
-
const expr =
|
|
3302
|
+
const expr = ts15.getMutableClone(arg);
|
|
3413
3303
|
return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(expr) : expr;
|
|
3414
3304
|
});
|
|
3415
|
-
properties.push(
|
|
3305
|
+
properties.push(ts15.createPropertyAssignment("args", ts15.createArrayLiteral(args)));
|
|
3416
3306
|
}
|
|
3417
|
-
return
|
|
3307
|
+
return ts15.createObjectLiteral(properties, true);
|
|
3418
3308
|
}
|
|
3419
3309
|
function isAngularDecorator2(decorator, isCore) {
|
|
3420
3310
|
return isCore || decorator.import !== null && decorator.import.from === "@angular/core";
|
|
3421
3311
|
}
|
|
3422
3312
|
function removeIdentifierReferences(node, name) {
|
|
3423
|
-
const result =
|
|
3424
|
-
return
|
|
3313
|
+
const result = ts15.transform(node, [(context) => (root) => ts15.visitNode(root, function walk(current) {
|
|
3314
|
+
return ts15.isIdentifier(current) && current.text === name ? ts15.createIdentifier(current.text) : ts15.visitEachChild(current, walk, context);
|
|
3425
3315
|
})]);
|
|
3426
3316
|
return result.transformed[0];
|
|
3427
3317
|
}
|
|
3428
3318
|
|
|
3429
|
-
// bazel-out/
|
|
3319
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/directive.mjs
|
|
3430
3320
|
var EMPTY_OBJECT = {};
|
|
3431
3321
|
var FIELD_DECORATORS = [
|
|
3432
3322
|
"Input",
|
|
@@ -3438,7 +3328,7 @@ var FIELD_DECORATORS = [
|
|
|
3438
3328
|
"HostBinding",
|
|
3439
3329
|
"HostListener"
|
|
3440
3330
|
];
|
|
3441
|
-
var LIFECYCLE_HOOKS = new Set([
|
|
3331
|
+
var LIFECYCLE_HOOKS = /* @__PURE__ */ new Set([
|
|
3442
3332
|
"ngOnChanges",
|
|
3443
3333
|
"ngOnInit",
|
|
3444
3334
|
"ngOnDestroy",
|
|
@@ -3641,12 +3531,12 @@ var DirectiveDecoratorHandler = class {
|
|
|
3641
3531
|
function extractDirectiveMetadata(clazz, decorator, reflector, evaluator, isCore, flags, annotateForClosureCompiler, defaultSelector = null) {
|
|
3642
3532
|
let directive;
|
|
3643
3533
|
if (decorator === null || decorator.args === null || decorator.args.length === 0) {
|
|
3644
|
-
directive = new Map();
|
|
3534
|
+
directive = /* @__PURE__ */ new Map();
|
|
3645
3535
|
} else if (decorator.args.length !== 1) {
|
|
3646
3536
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @${decorator.name} decorator`);
|
|
3647
3537
|
} else {
|
|
3648
3538
|
const meta = unwrapExpression(decorator.args[0]);
|
|
3649
|
-
if (!
|
|
3539
|
+
if (!ts16.isObjectLiteralExpression(meta)) {
|
|
3650
3540
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `@${decorator.name} argument must be an object literal`);
|
|
3651
3541
|
}
|
|
3652
3542
|
directive = reflectObjectLiteral(meta);
|
|
@@ -3757,7 +3647,7 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
|
|
|
3757
3647
|
let emitDistinctChangesOnly = emitDistinctChangesOnlyDefaultValue;
|
|
3758
3648
|
if (args.length === 2) {
|
|
3759
3649
|
const optionsExpr = unwrapExpression(args[1]);
|
|
3760
|
-
if (!
|
|
3650
|
+
if (!ts16.isObjectLiteralExpression(optionsExpr)) {
|
|
3761
3651
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, optionsExpr, `@${name} options must be an object literal`);
|
|
3762
3652
|
}
|
|
3763
3653
|
const options = reflectObjectLiteral(optionsExpr);
|
|
@@ -3802,16 +3692,16 @@ function extractQueryMetadata(exprNode, name, args, propertyName, reflector, eva
|
|
|
3802
3692
|
}
|
|
3803
3693
|
function extractQueriesFromDecorator(queryData, reflector, evaluator, isCore) {
|
|
3804
3694
|
const content = [], view = [];
|
|
3805
|
-
if (!
|
|
3695
|
+
if (!ts16.isObjectLiteralExpression(queryData)) {
|
|
3806
3696
|
throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator queries metadata must be an object literal");
|
|
3807
3697
|
}
|
|
3808
3698
|
reflectObjectLiteral(queryData).forEach((queryExpr, propertyName) => {
|
|
3809
3699
|
queryExpr = unwrapExpression(queryExpr);
|
|
3810
|
-
if (!
|
|
3700
|
+
if (!ts16.isNewExpression(queryExpr)) {
|
|
3811
3701
|
throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
|
|
3812
3702
|
}
|
|
3813
|
-
const queryType =
|
|
3814
|
-
if (!
|
|
3703
|
+
const queryType = ts16.isPropertyAccessExpression(queryExpr.expression) ? queryExpr.expression.name : queryExpr.expression;
|
|
3704
|
+
if (!ts16.isIdentifier(queryType)) {
|
|
3815
3705
|
throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, queryData, "Decorator query metadata must be an instance of a query type");
|
|
3816
3706
|
}
|
|
3817
3707
|
const type = reflector.getImportOfIdentifier(queryType);
|
|
@@ -3981,16 +3871,16 @@ function extractHostBindings(members, evaluator, coreModule, metadata) {
|
|
|
3981
3871
|
});
|
|
3982
3872
|
return bindings;
|
|
3983
3873
|
}
|
|
3984
|
-
var QUERY_TYPES = new Set([
|
|
3874
|
+
var QUERY_TYPES = /* @__PURE__ */ new Set([
|
|
3985
3875
|
"ContentChild",
|
|
3986
3876
|
"ContentChildren",
|
|
3987
3877
|
"ViewChild",
|
|
3988
3878
|
"ViewChildren"
|
|
3989
3879
|
]);
|
|
3990
3880
|
|
|
3991
|
-
// bazel-out/
|
|
3881
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/ng_module.mjs
|
|
3992
3882
|
import { compileClassMetadata as compileClassMetadata2, compileDeclareClassMetadata as compileDeclareClassMetadata2, compileDeclareInjectorFromMetadata, compileDeclareNgModuleFromMetadata, compileInjector, compileNgModule, CUSTOM_ELEMENTS_SCHEMA, ExternalExpr as ExternalExpr4, FactoryTarget as FactoryTarget2, InvokeFunctionExpr, LiteralArrayExpr as LiteralArrayExpr2, NO_ERRORS_SCHEMA, R3Identifiers, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
|
|
3993
|
-
import
|
|
3883
|
+
import ts17 from "typescript";
|
|
3994
3884
|
var NgModuleSymbol = class extends SemanticSymbol {
|
|
3995
3885
|
constructor() {
|
|
3996
3886
|
super(...arguments);
|
|
@@ -4073,8 +3963,8 @@ var NgModuleDecoratorHandler = class {
|
|
|
4073
3963
|
if (decorator.args === null || decorator.args.length > 1) {
|
|
4074
3964
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @NgModule decorator`);
|
|
4075
3965
|
}
|
|
4076
|
-
const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) :
|
|
4077
|
-
if (!
|
|
3966
|
+
const meta = decorator.args.length === 1 ? unwrapExpression(decorator.args[0]) : ts17.createObjectLiteral([]);
|
|
3967
|
+
if (!ts17.isObjectLiteralExpression(meta)) {
|
|
4078
3968
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@NgModule argument must be an object literal");
|
|
4079
3969
|
}
|
|
4080
3970
|
const ngModule = reflectObjectLiteral(meta);
|
|
@@ -4155,10 +4045,10 @@ var NgModuleDecoratorHandler = class {
|
|
|
4155
4045
|
if (typeNode !== null) {
|
|
4156
4046
|
typeContext = typeNode.getSourceFile();
|
|
4157
4047
|
}
|
|
4158
|
-
const bootstrap = bootstrapRefs.map((bootstrap2) => this._toR3Reference(bootstrap2, valueContext, typeContext));
|
|
4159
|
-
const declarations = declarationRefs.map((decl) => this._toR3Reference(decl, valueContext, typeContext));
|
|
4160
|
-
const imports = importRefs.map((imp) => this._toR3Reference(imp, valueContext, typeContext));
|
|
4161
|
-
const exports = exportRefs.map((exp) => this._toR3Reference(exp, valueContext, typeContext));
|
|
4048
|
+
const bootstrap = bootstrapRefs.map((bootstrap2) => this._toR3Reference(bootstrap2.getOriginForDiagnostics(meta, node.name), bootstrap2, valueContext, typeContext));
|
|
4049
|
+
const declarations = declarationRefs.map((decl) => this._toR3Reference(decl.getOriginForDiagnostics(meta, node.name), decl, valueContext, typeContext));
|
|
4050
|
+
const imports = importRefs.map((imp) => this._toR3Reference(imp.getOriginForDiagnostics(meta, node.name), imp, valueContext, typeContext));
|
|
4051
|
+
const exports = exportRefs.map((exp) => this._toR3Reference(exp.getOriginForDiagnostics(meta, node.name), exp, valueContext, typeContext));
|
|
4162
4052
|
const isForwardReference = (ref) => isExpressionForwardReference(ref.value, node.name, valueContext);
|
|
4163
4053
|
const containsForwardDecls = bootstrap.some(isForwardReference) || declarations.some(isForwardReference) || imports.some(isForwardReference) || exports.some(isForwardReference);
|
|
4164
4054
|
const type = wrapTypeReference(this.reflector, node);
|
|
@@ -4254,7 +4144,9 @@ var NgModuleDecoratorHandler = class {
|
|
|
4254
4144
|
const context = getSourceFile(node);
|
|
4255
4145
|
for (const exportRef of analysis.exports) {
|
|
4256
4146
|
if (isNgModule(exportRef.node, scope.compilation)) {
|
|
4257
|
-
|
|
4147
|
+
const type = this.refEmitter.emit(exportRef, context);
|
|
4148
|
+
assertSuccessfulReferenceEmit(type, node, "NgModule");
|
|
4149
|
+
data.injectorImports.push(type.expression);
|
|
4258
4150
|
}
|
|
4259
4151
|
}
|
|
4260
4152
|
for (const decl of analysis.declarations) {
|
|
@@ -4307,11 +4199,21 @@ var NgModuleDecoratorHandler = class {
|
|
|
4307
4199
|
for (const decl of declarations) {
|
|
4308
4200
|
const remoteScope = this.scopeRegistry.getRemoteScope(decl.node);
|
|
4309
4201
|
if (remoteScope !== null) {
|
|
4310
|
-
const directives = remoteScope.directives.map((directive) =>
|
|
4311
|
-
|
|
4202
|
+
const directives = remoteScope.directives.map((directive) => {
|
|
4203
|
+
const type = this.refEmitter.emit(directive, context);
|
|
4204
|
+
assertSuccessfulReferenceEmit(type, node, "directive");
|
|
4205
|
+
return type.expression;
|
|
4206
|
+
});
|
|
4207
|
+
const pipes = remoteScope.pipes.map((pipe) => {
|
|
4208
|
+
const type = this.refEmitter.emit(pipe, context);
|
|
4209
|
+
assertSuccessfulReferenceEmit(type, node, "pipe");
|
|
4210
|
+
return type.expression;
|
|
4211
|
+
});
|
|
4312
4212
|
const directiveArray = new LiteralArrayExpr2(directives);
|
|
4313
4213
|
const pipesArray = new LiteralArrayExpr2(pipes);
|
|
4314
|
-
const
|
|
4214
|
+
const componentType = this.refEmitter.emit(decl, context);
|
|
4215
|
+
assertSuccessfulReferenceEmit(componentType, node, "component");
|
|
4216
|
+
const declExpr = componentType.expression;
|
|
4315
4217
|
const setComponentScope = new ExternalExpr4(R3Identifiers.setComponentScope);
|
|
4316
4218
|
const callExpr = new InvokeFunctionExpr(setComponentScope, [declExpr, directiveArray, pipesArray]);
|
|
4317
4219
|
ngModuleStatements.push(callExpr.toStmt());
|
|
@@ -4336,16 +4238,16 @@ var NgModuleDecoratorHandler = class {
|
|
|
4336
4238
|
];
|
|
4337
4239
|
return res;
|
|
4338
4240
|
}
|
|
4339
|
-
_toR3Reference(valueRef, valueContext, typeContext) {
|
|
4241
|
+
_toR3Reference(origin, valueRef, valueContext, typeContext) {
|
|
4340
4242
|
if (valueRef.hasOwningModuleGuess) {
|
|
4341
|
-
return toR3Reference(valueRef, valueRef, valueContext, valueContext, this.refEmitter);
|
|
4243
|
+
return toR3Reference(origin, valueRef, valueRef, valueContext, valueContext, this.refEmitter);
|
|
4342
4244
|
} else {
|
|
4343
4245
|
let typeRef = valueRef;
|
|
4344
4246
|
let typeNode = this.reflector.getDtsDeclaration(typeRef.node);
|
|
4345
4247
|
if (typeNode !== null && isNamedClassDeclaration(typeNode)) {
|
|
4346
4248
|
typeRef = new Reference(typeNode);
|
|
4347
4249
|
}
|
|
4348
|
-
return toR3Reference(valueRef, typeRef, valueContext, typeContext, this.refEmitter);
|
|
4250
|
+
return toR3Reference(origin, valueRef, typeRef, valueContext, typeContext, this.refEmitter);
|
|
4349
4251
|
}
|
|
4350
4252
|
}
|
|
4351
4253
|
_extractModuleFromModuleWithProvidersFn(node) {
|
|
@@ -4353,10 +4255,10 @@ var NgModuleDecoratorHandler = class {
|
|
|
4353
4255
|
return type && (this._reflectModuleFromTypeParam(type, node) || this._reflectModuleFromLiteralType(type));
|
|
4354
4256
|
}
|
|
4355
4257
|
_reflectModuleFromTypeParam(type, node) {
|
|
4356
|
-
if (!
|
|
4258
|
+
if (!ts17.isTypeReferenceNode(type)) {
|
|
4357
4259
|
return null;
|
|
4358
4260
|
}
|
|
4359
|
-
const typeName = type && (
|
|
4261
|
+
const typeName = type && (ts17.isIdentifier(type.typeName) && type.typeName || ts17.isQualifiedName(type.typeName) && type.typeName.right) || null;
|
|
4360
4262
|
if (typeName === null) {
|
|
4361
4263
|
return null;
|
|
4362
4264
|
}
|
|
@@ -4368,7 +4270,7 @@ var NgModuleDecoratorHandler = class {
|
|
|
4368
4270
|
return null;
|
|
4369
4271
|
}
|
|
4370
4272
|
if (type.typeArguments === void 0 || type.typeArguments.length !== 1) {
|
|
4371
|
-
const parent =
|
|
4273
|
+
const parent = ts17.isMethodDeclaration(node) && ts17.isClassDeclaration(node.parent) ? node.parent : null;
|
|
4372
4274
|
const symbolName = (parent && parent.name ? parent.name.getText() + "." : "") + (node.name ? node.name.getText() : "anonymous");
|
|
4373
4275
|
throw new FatalDiagnosticError(ErrorCode.NGMODULE_MODULE_WITH_PROVIDERS_MISSING_GENERIC, type, `${symbolName} returns a ModuleWithProviders type without a generic type argument. Please add a generic type argument to the ModuleWithProviders type. If this occurrence is in library code you don't control, please contact the library authors.`);
|
|
4374
4276
|
}
|
|
@@ -4376,13 +4278,13 @@ var NgModuleDecoratorHandler = class {
|
|
|
4376
4278
|
return typeNodeToValueExpr(arg);
|
|
4377
4279
|
}
|
|
4378
4280
|
_reflectModuleFromLiteralType(type) {
|
|
4379
|
-
if (!
|
|
4281
|
+
if (!ts17.isIntersectionTypeNode(type)) {
|
|
4380
4282
|
return null;
|
|
4381
4283
|
}
|
|
4382
4284
|
for (const t of type.types) {
|
|
4383
|
-
if (
|
|
4285
|
+
if (ts17.isTypeLiteralNode(t)) {
|
|
4384
4286
|
for (const m of t.members) {
|
|
4385
|
-
const ngModuleType =
|
|
4287
|
+
const ngModuleType = ts17.isPropertySignature(m) && ts17.isIdentifier(m.name) && m.name.text === "ngModule" && m.type || null;
|
|
4386
4288
|
const ngModuleExpression = ngModuleType && typeNodeToValueExpr(ngModuleType);
|
|
4387
4289
|
if (ngModuleExpression) {
|
|
4388
4290
|
return ngModuleExpression;
|
|
@@ -4422,8 +4324,8 @@ function isNgModule(node, compilation) {
|
|
|
4422
4324
|
return !compilation.directives.some((directive) => directive.ref.node === node) && !compilation.pipes.some((pipe) => pipe.ref.node === node);
|
|
4423
4325
|
}
|
|
4424
4326
|
|
|
4425
|
-
// bazel-out/
|
|
4426
|
-
var EMPTY_MAP = new Map();
|
|
4327
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/component.mjs
|
|
4328
|
+
var EMPTY_MAP = /* @__PURE__ */ new Map();
|
|
4427
4329
|
var EMPTY_ARRAY = [];
|
|
4428
4330
|
var ComponentSymbol = class extends DirectiveSymbol {
|
|
4429
4331
|
constructor() {
|
|
@@ -4485,10 +4387,10 @@ var ComponentDecoratorHandler = class {
|
|
|
4485
4387
|
this.semanticDepGraphUpdater = semanticDepGraphUpdater;
|
|
4486
4388
|
this.annotateForClosureCompiler = annotateForClosureCompiler;
|
|
4487
4389
|
this.perf = perf;
|
|
4488
|
-
this.literalCache = new Map();
|
|
4390
|
+
this.literalCache = /* @__PURE__ */ new Map();
|
|
4489
4391
|
this.elementSchemaRegistry = new DomElementSchemaRegistry();
|
|
4490
|
-
this.preanalyzeTemplateCache = new Map();
|
|
4491
|
-
this.preanalyzeStylesCache = new Map();
|
|
4392
|
+
this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
|
|
4393
|
+
this.preanalyzeStylesCache = /* @__PURE__ */ new Map();
|
|
4492
4394
|
this.precedence = HandlerPrecedence.PRIMARY;
|
|
4493
4395
|
this.name = ComponentDecoratorHandler.name;
|
|
4494
4396
|
}
|
|
@@ -4743,7 +4645,7 @@ var ComponentDecoratorHandler = class {
|
|
|
4743
4645
|
});
|
|
4744
4646
|
}
|
|
4745
4647
|
typeCheck(ctx, node, meta) {
|
|
4746
|
-
if (this.typeCheckScopeRegistry === null || !
|
|
4648
|
+
if (this.typeCheckScopeRegistry === null || !ts18.isClassDeclaration(node)) {
|
|
4747
4649
|
return;
|
|
4748
4650
|
}
|
|
4749
4651
|
if (meta.isPoisoned && !this.usePoisonedData) {
|
|
@@ -4781,7 +4683,7 @@ var ComponentDecoratorHandler = class {
|
|
|
4781
4683
|
matcher.addSelectables(CssSelector.parse(dir.selector), dir);
|
|
4782
4684
|
}
|
|
4783
4685
|
}
|
|
4784
|
-
const pipes = new Map();
|
|
4686
|
+
const pipes = /* @__PURE__ */ new Map();
|
|
4785
4687
|
for (const pipe of scope.compilation.pipes) {
|
|
4786
4688
|
pipes.set(pipe.name, pipe.ref);
|
|
4787
4689
|
}
|
|
@@ -4789,6 +4691,7 @@ var ComponentDecoratorHandler = class {
|
|
|
4789
4691
|
const bound = binder.bind({ template: metadata.template.nodes });
|
|
4790
4692
|
const usedDirectives = bound.getUsedDirectives().map((directive) => {
|
|
4791
4693
|
const type = this.refEmitter.emit(directive.ref, context);
|
|
4694
|
+
assertSuccessfulReferenceEmit(type, node.name, directive.isComponent ? "component" : "directive");
|
|
4792
4695
|
return {
|
|
4793
4696
|
ref: directive.ref,
|
|
4794
4697
|
type: type.expression,
|
|
@@ -4807,6 +4710,7 @@ var ComponentDecoratorHandler = class {
|
|
|
4807
4710
|
}
|
|
4808
4711
|
const pipe = pipes.get(pipeName);
|
|
4809
4712
|
const type = this.refEmitter.emit(pipe, context);
|
|
4713
|
+
assertSuccessfulReferenceEmit(type, node.name, "pipe");
|
|
4810
4714
|
usedPipes.push({
|
|
4811
4715
|
ref: pipe,
|
|
4812
4716
|
pipeName,
|
|
@@ -4818,14 +4722,14 @@ var ComponentDecoratorHandler = class {
|
|
|
4818
4722
|
symbol.usedDirectives = usedDirectives.map((dir) => this.semanticDepGraphUpdater.getSemanticReference(dir.ref.node, dir.type));
|
|
4819
4723
|
symbol.usedPipes = usedPipes.map((pipe) => this.semanticDepGraphUpdater.getSemanticReference(pipe.ref.node, pipe.expression));
|
|
4820
4724
|
}
|
|
4821
|
-
const cyclesFromDirectives = new Map();
|
|
4725
|
+
const cyclesFromDirectives = /* @__PURE__ */ new Map();
|
|
4822
4726
|
for (const usedDirective of usedDirectives) {
|
|
4823
4727
|
const cycle = this._checkForCyclicImport(usedDirective.importedFile, usedDirective.type, context);
|
|
4824
4728
|
if (cycle !== null) {
|
|
4825
4729
|
cyclesFromDirectives.set(usedDirective, cycle);
|
|
4826
4730
|
}
|
|
4827
4731
|
}
|
|
4828
|
-
const cyclesFromPipes = new Map();
|
|
4732
|
+
const cyclesFromPipes = /* @__PURE__ */ new Map();
|
|
4829
4733
|
for (const usedPipe of usedPipes) {
|
|
4830
4734
|
const cycle = this._checkForCyclicImport(usedPipe.importedFile, usedPipe.expression, context);
|
|
4831
4735
|
if (cycle !== null) {
|
|
@@ -4952,17 +4856,17 @@ var ComponentDecoratorHandler = class {
|
|
|
4952
4856
|
const metadata = new Map(component);
|
|
4953
4857
|
if (metadata.has("templateUrl")) {
|
|
4954
4858
|
metadata.delete("templateUrl");
|
|
4955
|
-
metadata.set("template",
|
|
4859
|
+
metadata.set("template", ts18.createStringLiteral(template.content));
|
|
4956
4860
|
}
|
|
4957
4861
|
if (metadata.has("styleUrls")) {
|
|
4958
4862
|
metadata.delete("styleUrls");
|
|
4959
|
-
metadata.set("styles",
|
|
4863
|
+
metadata.set("styles", ts18.createArrayLiteral(styles.map((s) => ts18.createStringLiteral(s))));
|
|
4960
4864
|
}
|
|
4961
4865
|
const newMetadataFields = [];
|
|
4962
4866
|
for (const [name, value] of metadata.entries()) {
|
|
4963
|
-
newMetadataFields.push(
|
|
4867
|
+
newMetadataFields.push(ts18.createPropertyAssignment(name, value));
|
|
4964
4868
|
}
|
|
4965
|
-
return __spreadProps(__spreadValues({}, dec), { args: [
|
|
4869
|
+
return __spreadProps(__spreadValues({}, dec), { args: [ts18.createObjectLiteral(newMetadataFields)] });
|
|
4966
4870
|
}
|
|
4967
4871
|
_resolveLiteral(decorator) {
|
|
4968
4872
|
if (this.literalCache.has(decorator)) {
|
|
@@ -4972,7 +4876,7 @@ var ComponentDecoratorHandler = class {
|
|
|
4972
4876
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), `Incorrect number of arguments to @Component decorator`);
|
|
4973
4877
|
}
|
|
4974
4878
|
const meta = unwrapExpression(decorator.args[0]);
|
|
4975
|
-
if (!
|
|
4879
|
+
if (!ts18.isObjectLiteralExpression(meta)) {
|
|
4976
4880
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, `Decorator argument must be literal.`);
|
|
4977
4881
|
}
|
|
4978
4882
|
this.literalCache.set(decorator, meta);
|
|
@@ -4999,9 +4903,9 @@ var ComponentDecoratorHandler = class {
|
|
|
4999
4903
|
}
|
|
5000
4904
|
_extractStyleUrlsFromExpression(styleUrlsExpr) {
|
|
5001
4905
|
const styleUrls = [];
|
|
5002
|
-
if (
|
|
4906
|
+
if (ts18.isArrayLiteralExpression(styleUrlsExpr)) {
|
|
5003
4907
|
for (const styleUrlExpr of styleUrlsExpr.elements) {
|
|
5004
|
-
if (
|
|
4908
|
+
if (ts18.isSpreadElement(styleUrlExpr)) {
|
|
5005
4909
|
styleUrls.push(...this._extractStyleUrlsFromExpression(styleUrlExpr.expression));
|
|
5006
4910
|
} else {
|
|
5007
4911
|
const styleUrl = this.evaluator.evaluate(styleUrlExpr);
|
|
@@ -5031,12 +4935,12 @@ var ComponentDecoratorHandler = class {
|
|
|
5031
4935
|
return styleUrls;
|
|
5032
4936
|
}
|
|
5033
4937
|
_extractStyleResources(component, containingFile) {
|
|
5034
|
-
const styles = new Set();
|
|
4938
|
+
const styles = /* @__PURE__ */ new Set();
|
|
5035
4939
|
function stringLiteralElements(array) {
|
|
5036
|
-
return array.elements.filter((e) =>
|
|
4940
|
+
return array.elements.filter((e) => ts18.isStringLiteralLike(e));
|
|
5037
4941
|
}
|
|
5038
4942
|
const styleUrlsExpr = component.get("styleUrls");
|
|
5039
|
-
if (styleUrlsExpr !== void 0 &&
|
|
4943
|
+
if (styleUrlsExpr !== void 0 && ts18.isArrayLiteralExpression(styleUrlsExpr)) {
|
|
5040
4944
|
for (const expression of stringLiteralElements(styleUrlsExpr)) {
|
|
5041
4945
|
try {
|
|
5042
4946
|
const resourceUrl = this.resourceLoader.resolve(expression.text, containingFile);
|
|
@@ -5046,7 +4950,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5046
4950
|
}
|
|
5047
4951
|
}
|
|
5048
4952
|
const stylesExpr = component.get("styles");
|
|
5049
|
-
if (stylesExpr !== void 0 &&
|
|
4953
|
+
if (stylesExpr !== void 0 && ts18.isArrayLiteralExpression(stylesExpr)) {
|
|
5050
4954
|
for (const expression of stringLiteralElements(stylesExpr)) {
|
|
5051
4955
|
styles.add({ path: null, expression });
|
|
5052
4956
|
}
|
|
@@ -5091,7 +4995,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5091
4995
|
let sourceMapping;
|
|
5092
4996
|
let escapedString = false;
|
|
5093
4997
|
let sourceMapUrl;
|
|
5094
|
-
if (
|
|
4998
|
+
if (ts18.isStringLiteral(template.expression) || ts18.isNoSubstitutionTemplateLiteral(template.expression)) {
|
|
5095
4999
|
sourceParseRange = getTemplateRange(template.expression);
|
|
5096
5000
|
sourceStr = template.expression.getSourceFile().text;
|
|
5097
5001
|
templateContent = template.expression.text;
|
|
@@ -5265,7 +5169,7 @@ var ComponentDecoratorHandler = class {
|
|
|
5265
5169
|
};
|
|
5266
5170
|
function getTemplateRange(templateExpr) {
|
|
5267
5171
|
const startPos = templateExpr.getStart() + 1;
|
|
5268
|
-
const { line, character } =
|
|
5172
|
+
const { line, character } = ts18.getLineAndCharacterOfPosition(templateExpr.getSourceFile(), startPos);
|
|
5269
5173
|
return {
|
|
5270
5174
|
startPos,
|
|
5271
5175
|
startLine: line,
|
|
@@ -5306,9 +5210,9 @@ function checkCustomElementSelectorForErrors(selector) {
|
|
|
5306
5210
|
return null;
|
|
5307
5211
|
}
|
|
5308
5212
|
|
|
5309
|
-
// bazel-out/
|
|
5213
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
|
|
5310
5214
|
import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression2, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr6 } from "@angular/compiler";
|
|
5311
|
-
import
|
|
5215
|
+
import ts19 from "typescript";
|
|
5312
5216
|
var InjectableDecoratorHandler = class {
|
|
5313
5217
|
constructor(reflector, isCore, strictCtorDeps, injectableRegistry, perf, errorOnDuplicateProv = true) {
|
|
5314
5218
|
this.reflector = reflector;
|
|
@@ -5399,7 +5303,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
5399
5303
|
};
|
|
5400
5304
|
} else if (decorator.args.length === 1) {
|
|
5401
5305
|
const metaNode = decorator.args[0];
|
|
5402
|
-
if (!
|
|
5306
|
+
if (!ts19.isObjectLiteralExpression(metaNode)) {
|
|
5403
5307
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
|
|
5404
5308
|
}
|
|
5405
5309
|
const meta = reflectObjectLiteral(metaNode);
|
|
@@ -5407,7 +5311,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
|
|
|
5407
5311
|
let deps = void 0;
|
|
5408
5312
|
if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
|
|
5409
5313
|
const depsExpr = meta.get("deps");
|
|
5410
|
-
if (!
|
|
5314
|
+
if (!ts19.isArrayLiteralExpression(depsExpr)) {
|
|
5411
5315
|
throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
|
|
5412
5316
|
}
|
|
5413
5317
|
deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
|
|
@@ -5489,12 +5393,12 @@ function getDep(dep, reflector) {
|
|
|
5489
5393
|
}
|
|
5490
5394
|
return true;
|
|
5491
5395
|
}
|
|
5492
|
-
if (
|
|
5396
|
+
if (ts19.isArrayLiteralExpression(dep)) {
|
|
5493
5397
|
dep.elements.forEach((el) => {
|
|
5494
5398
|
let isDecorator = false;
|
|
5495
|
-
if (
|
|
5399
|
+
if (ts19.isIdentifier(el)) {
|
|
5496
5400
|
isDecorator = maybeUpdateDecorator(el, reflector);
|
|
5497
|
-
} else if (
|
|
5401
|
+
} else if (ts19.isNewExpression(el) && ts19.isIdentifier(el.expression)) {
|
|
5498
5402
|
const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
|
|
5499
5403
|
isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
|
|
5500
5404
|
}
|
|
@@ -5506,9 +5410,9 @@ function getDep(dep, reflector) {
|
|
|
5506
5410
|
return meta;
|
|
5507
5411
|
}
|
|
5508
5412
|
|
|
5509
|
-
// bazel-out/
|
|
5413
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
|
|
5510
5414
|
import { compileClassMetadata as compileClassMetadata5, compileDeclareClassMetadata as compileDeclareClassMetadata5, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5, WrappedNodeExpr as WrappedNodeExpr7 } from "@angular/compiler";
|
|
5511
|
-
import
|
|
5415
|
+
import ts20 from "typescript";
|
|
5512
5416
|
var PipeSymbol = class extends SemanticSymbol {
|
|
5513
5417
|
constructor(decl, name) {
|
|
5514
5418
|
super(decl);
|
|
@@ -5563,7 +5467,7 @@ var PipeDecoratorHandler = class {
|
|
|
5563
5467
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, Decorator.nodeForError(decorator), "@Pipe must have exactly one argument");
|
|
5564
5468
|
}
|
|
5565
5469
|
const meta = unwrapExpression(decorator.args[0]);
|
|
5566
|
-
if (!
|
|
5470
|
+
if (!ts20.isObjectLiteralExpression(meta)) {
|
|
5567
5471
|
throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
|
|
5568
5472
|
}
|
|
5569
5473
|
const pipe = reflectObjectLiteral(meta);
|
|
@@ -5631,21 +5535,13 @@ var PipeDecoratorHandler = class {
|
|
|
5631
5535
|
}
|
|
5632
5536
|
};
|
|
5633
5537
|
|
|
5634
|
-
// bazel-out/
|
|
5538
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/references_registry.mjs
|
|
5635
5539
|
var NoopReferencesRegistry = class {
|
|
5636
5540
|
add(source, ...references) {
|
|
5637
5541
|
}
|
|
5638
5542
|
};
|
|
5639
5543
|
|
|
5640
5544
|
export {
|
|
5641
|
-
ErrorCode,
|
|
5642
|
-
COMPILER_ERRORS_WITH_GUIDES,
|
|
5643
|
-
replaceTsWithNgInErrors,
|
|
5644
|
-
ngErrorCode,
|
|
5645
|
-
makeDiagnostic,
|
|
5646
|
-
makeRelatedInformation,
|
|
5647
|
-
isFatalDiagnosticError,
|
|
5648
|
-
ERROR_DETAILS_PAGE_BASE_URL,
|
|
5649
5545
|
SemanticDepGraphUpdater,
|
|
5650
5546
|
CompoundMetadataReader,
|
|
5651
5547
|
DtsMetadataReader,
|
|
@@ -5681,4 +5577,4 @@ export {
|
|
|
5681
5577
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5682
5578
|
* found in the LICENSE file at https://angular.io/license
|
|
5683
5579
|
*/
|
|
5684
|
-
//# sourceMappingURL=chunk-
|
|
5580
|
+
//# sourceMappingURL=chunk-FUZ3CSDO.js.map
|