@angular/compiler-cli 20.0.0-next.0 → 20.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-STORTTKY.js → chunk-37JMVF7H.js} +8 -8
- package/bundles/{chunk-5UDS2TPQ.js → chunk-77D5CI2U.js} +7 -7
- package/bundles/{chunk-GBKXY6BH.js → chunk-FKXFEX7K.js} +3 -3
- package/bundles/{chunk-UCG5K4BI.js → chunk-O2OVHMWL.js} +237 -236
- package/bundles/chunk-O2OVHMWL.js.map +6 -0
- package/bundles/{chunk-2MJ6YSB2.js → chunk-PLKJMRGZ.js} +138 -136
- package/bundles/{chunk-2MJ6YSB2.js.map → chunk-PLKJMRGZ.js.map} +1 -1
- package/bundles/{chunk-I6R3GL3L.js → chunk-Q2WE7ECN.js} +5 -5
- package/bundles/{chunk-5B64KRP2.js → chunk-QYORKQDN.js} +48 -42
- package/bundles/{chunk-5B64KRP2.js.map → chunk-QYORKQDN.js.map} +1 -1
- package/bundles/{chunk-KDHDNSXW.js → chunk-SEPXPBD2.js} +12 -12
- package/bundles/{chunk-HXSKCJMP.js → chunk-SNXU6YPZ.js} +3 -3
- package/bundles/{chunk-SXMUFI7N.js → chunk-UAA7BTBW.js} +33 -33
- package/bundles/{chunk-NSLVDBJJ.js → chunk-YSSSYIZJ.js} +5 -5
- package/bundles/index.js +15 -15
- package/bundles/linker/babel/index.js +12 -12
- package/bundles/linker/index.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +4 -4
- package/bundles/private/tooling.js +6 -6
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +3 -4
- package/src/ngtsc/translator/src/translator.d.ts +1 -0
- package/bundles/chunk-UCG5K4BI.js.map +0 -6
- package/bundles/ngcc/index.js +0 -52
- package/bundles/ngcc/index.js.map +0 -6
- package/ngcc/index.d.ts +0 -11
- /package/bundles/{chunk-STORTTKY.js.map → chunk-37JMVF7H.js.map} +0 -0
- /package/bundles/{chunk-5UDS2TPQ.js.map → chunk-77D5CI2U.js.map} +0 -0
- /package/bundles/{chunk-GBKXY6BH.js.map → chunk-FKXFEX7K.js.map} +0 -0
- /package/bundles/{chunk-I6R3GL3L.js.map → chunk-Q2WE7ECN.js.map} +0 -0
- /package/bundles/{chunk-KDHDNSXW.js.map → chunk-SEPXPBD2.js.map} +0 -0
- /package/bundles/{chunk-HXSKCJMP.js.map → chunk-SNXU6YPZ.js.map} +0 -0
- /package/bundles/{chunk-SXMUFI7N.js.map → chunk-UAA7BTBW.js.map} +0 -0
- /package/bundles/{chunk-NSLVDBJJ.js.map → chunk-YSSSYIZJ.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SEPXPBD2.js";
|
|
8
8
|
import {
|
|
9
9
|
CompilationMode,
|
|
10
10
|
ComponentDecoratorHandler,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
retagAllTsFiles,
|
|
52
52
|
tryParseInitializerApi,
|
|
53
53
|
untagAllTsFiles
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-PLKJMRGZ.js";
|
|
55
55
|
import {
|
|
56
56
|
AbsoluteModuleStrategy,
|
|
57
57
|
AliasStrategy,
|
|
@@ -87,14 +87,14 @@ import {
|
|
|
87
87
|
relativePathBetween,
|
|
88
88
|
replaceTsWithNgInErrors,
|
|
89
89
|
toUnredirectedSourceFile
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-QYORKQDN.js";
|
|
91
91
|
import {
|
|
92
92
|
ActivePerfRecorder,
|
|
93
93
|
DelegatingPerfRecorder,
|
|
94
94
|
PerfCheckpoint,
|
|
95
95
|
PerfEvent,
|
|
96
96
|
PerfPhase
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-Q2WE7ECN.js";
|
|
98
98
|
import {
|
|
99
99
|
LogicalFileSystem,
|
|
100
100
|
absoluteFrom,
|
|
@@ -104,9 +104,9 @@ import {
|
|
|
104
104
|
getFileSystem,
|
|
105
105
|
join,
|
|
106
106
|
resolve
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-37JMVF7H.js";
|
|
108
108
|
|
|
109
|
-
// bazel-out/
|
|
109
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
110
110
|
var DEFAULT_ERROR_CODE = 100;
|
|
111
111
|
var UNKNOWN_ERROR_CODE = 500;
|
|
112
112
|
var SOURCE = "angular";
|
|
@@ -124,7 +124,7 @@ var EmitFlags;
|
|
|
124
124
|
EmitFlags2[EmitFlags2["All"] = 31] = "All";
|
|
125
125
|
})(EmitFlags || (EmitFlags = {}));
|
|
126
126
|
|
|
127
|
-
// bazel-out/
|
|
127
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
|
|
128
128
|
import ts from "typescript";
|
|
129
129
|
var wrapHostForTest = null;
|
|
130
130
|
function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, true) }) {
|
|
@@ -134,7 +134,7 @@ function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, t
|
|
|
134
134
|
return tsHost;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
// bazel-out/
|
|
137
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/entities.mjs
|
|
138
138
|
var EntryType;
|
|
139
139
|
(function(EntryType2) {
|
|
140
140
|
EntryType2["Block"] = "block";
|
|
@@ -181,23 +181,23 @@ function isDocEntryWithSourceInfo(entry) {
|
|
|
181
181
|
return "source" in entry;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
// bazel-out/
|
|
185
|
-
import
|
|
184
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
|
|
185
|
+
import ts12 from "typescript";
|
|
186
186
|
|
|
187
|
-
// bazel-out/
|
|
188
|
-
import
|
|
187
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
|
|
188
|
+
import ts6 from "typescript";
|
|
189
189
|
|
|
190
|
-
// bazel-out/
|
|
190
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/filters.mjs
|
|
191
191
|
function isAngularPrivateName(name) {
|
|
192
192
|
var _a;
|
|
193
193
|
const firstChar = (_a = name[0]) != null ? _a : "";
|
|
194
194
|
return firstChar === "\u0275" || firstChar === "_";
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
// bazel-out/
|
|
198
|
-
import
|
|
197
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
|
|
198
|
+
import ts4 from "typescript";
|
|
199
199
|
|
|
200
|
-
// bazel-out/
|
|
200
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.mjs
|
|
201
201
|
function extractGenerics(declaration) {
|
|
202
202
|
var _a, _b;
|
|
203
203
|
return (_b = (_a = declaration.typeParameters) == null ? void 0 : _a.map((typeParam) => {
|
|
@@ -210,7 +210,7 @@ function extractGenerics(declaration) {
|
|
|
210
210
|
})) != null ? _b : [];
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
// bazel-out/
|
|
213
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.mjs
|
|
214
214
|
import ts2 from "typescript";
|
|
215
215
|
var decoratorExpression = /@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf|ViewChild|ViewChildren|ContentChild|ContentChildren))/g;
|
|
216
216
|
function extractJsDocTags(node) {
|
|
@@ -254,12 +254,13 @@ function unescapeAngularDecorators(comment) {
|
|
|
254
254
|
return comment.replace(/_NG_AT_/g, "@");
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
// bazel-out/
|
|
257
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.mjs
|
|
258
|
+
import ts3 from "typescript";
|
|
258
259
|
function extractResolvedTypeString(node, checker) {
|
|
259
|
-
return checker.typeToString(checker.getTypeAtLocation(node));
|
|
260
|
+
return checker.typeToString(checker.getTypeAtLocation(node), void 0, ts3.TypeFormatFlags.NoTruncation);
|
|
260
261
|
}
|
|
261
262
|
|
|
262
|
-
// bazel-out/
|
|
263
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
|
|
263
264
|
var FunctionExtractor = class {
|
|
264
265
|
name;
|
|
265
266
|
exportDeclaration;
|
|
@@ -275,7 +276,7 @@ var FunctionExtractor = class {
|
|
|
275
276
|
const returnType = signature ? this.typeChecker.typeToString(
|
|
276
277
|
this.typeChecker.getReturnTypeOfSignature(signature),
|
|
277
278
|
void 0,
|
|
278
|
-
|
|
279
|
+
ts4.TypeFormatFlags.NoTypeReduction | ts4.TypeFormatFlags.NoTruncation
|
|
279
280
|
) : "unknown";
|
|
280
281
|
const implementation = (_a = findImplementationOfFunction(this.exportDeclaration, this.typeChecker)) != null ? _a : this.exportDeclaration;
|
|
281
282
|
const type = this.typeChecker.getTypeAtLocation(this.exportDeclaration);
|
|
@@ -287,7 +288,7 @@ var FunctionExtractor = class {
|
|
|
287
288
|
signatures: overloads,
|
|
288
289
|
implementation: {
|
|
289
290
|
params: extractAllParams(implementation.parameters, this.typeChecker),
|
|
290
|
-
isNewType:
|
|
291
|
+
isNewType: ts4.isConstructSignatureDeclaration(implementation),
|
|
291
292
|
returnType,
|
|
292
293
|
returnDescription: (_b = jsdocsTags.find((tag) => tag.name === "returns")) == null ? void 0 : _b.comment,
|
|
293
294
|
generics: extractGenerics(implementation),
|
|
@@ -317,7 +318,7 @@ function filterSignatureDeclarations(signatures) {
|
|
|
317
318
|
const result = [];
|
|
318
319
|
for (const signature of signatures) {
|
|
319
320
|
const decl = signature.getDeclaration();
|
|
320
|
-
if (
|
|
321
|
+
if (ts4.isFunctionDeclaration(decl) || ts4.isCallSignatureDeclaration(decl) || ts4.isMethodDeclaration(decl)) {
|
|
321
322
|
result.push({ signature, decl });
|
|
322
323
|
}
|
|
323
324
|
}
|
|
@@ -336,7 +337,7 @@ function extractCallSignatures(name, typeChecker, type) {
|
|
|
336
337
|
returnType: typeChecker.typeToString(
|
|
337
338
|
typeChecker.getReturnTypeOfSignature(signature),
|
|
338
339
|
void 0,
|
|
339
|
-
|
|
340
|
+
ts4.TypeFormatFlags.NoTypeReduction | ts4.TypeFormatFlags.NoTruncation
|
|
340
341
|
)
|
|
341
342
|
}));
|
|
342
343
|
}
|
|
@@ -346,19 +347,19 @@ function findImplementationOfFunction(node, typeChecker) {
|
|
|
346
347
|
return node;
|
|
347
348
|
}
|
|
348
349
|
const symbol = typeChecker.getSymbolAtLocation(node.name);
|
|
349
|
-
const implementation = (_a = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _a.find((s) =>
|
|
350
|
+
const implementation = (_a = symbol == null ? void 0 : symbol.declarations) == null ? void 0 : _a.find((s) => ts4.isFunctionDeclaration(s) && s.body !== void 0);
|
|
350
351
|
return implementation;
|
|
351
352
|
}
|
|
352
353
|
|
|
353
|
-
// bazel-out/
|
|
354
|
-
import
|
|
354
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/internal.mjs
|
|
355
|
+
import ts5 from "typescript";
|
|
355
356
|
function isInternal(member) {
|
|
356
357
|
return extractJsDocTags(member).some((tag) => tag.name === "internal") || hasLeadingInternalComment(member);
|
|
357
358
|
}
|
|
358
359
|
function hasLeadingInternalComment(member) {
|
|
359
360
|
var _a;
|
|
360
361
|
const memberText = member.getSourceFile().text;
|
|
361
|
-
return (_a =
|
|
362
|
+
return (_a = ts5.reduceEachLeadingCommentRange(
|
|
362
363
|
memberText,
|
|
363
364
|
member.getFullStart(),
|
|
364
365
|
(pos, end, kind, hasTrailingNewLine, containsInternal) => {
|
|
@@ -369,7 +370,7 @@ function hasLeadingInternalComment(member) {
|
|
|
369
370
|
)) != null ? _a : false;
|
|
370
371
|
}
|
|
371
372
|
|
|
372
|
-
// bazel-out/
|
|
373
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
|
|
373
374
|
var ClassExtractor = class {
|
|
374
375
|
declaration;
|
|
375
376
|
typeChecker;
|
|
@@ -381,7 +382,7 @@ var ClassExtractor = class {
|
|
|
381
382
|
return {
|
|
382
383
|
name: this.declaration.name.text,
|
|
383
384
|
isAbstract: this.isAbstract(),
|
|
384
|
-
entryType:
|
|
385
|
+
entryType: ts6.isInterfaceDeclaration(this.declaration) ? EntryType.Interface : EntryType.UndecoratedClass,
|
|
385
386
|
members: this.extractSignatures().concat(this.extractAllClassMembers()),
|
|
386
387
|
generics: extractGenerics(this.declaration),
|
|
387
388
|
description: extractJsDocDescription(this.declaration),
|
|
@@ -408,7 +409,7 @@ var ClassExtractor = class {
|
|
|
408
409
|
return this.extractMethod(memberDeclaration);
|
|
409
410
|
} else if (this.isProperty(memberDeclaration) && !this.hasPrivateComputedProperty(memberDeclaration)) {
|
|
410
411
|
return this.extractClassProperty(memberDeclaration);
|
|
411
|
-
} else if (
|
|
412
|
+
} else if (ts6.isAccessor(memberDeclaration)) {
|
|
412
413
|
return this.extractGetterSetter(memberDeclaration);
|
|
413
414
|
}
|
|
414
415
|
return void 0;
|
|
@@ -425,7 +426,7 @@ var ClassExtractor = class {
|
|
|
425
426
|
};
|
|
426
427
|
}
|
|
427
428
|
extractSignature(signature) {
|
|
428
|
-
const functionExtractor = new FunctionExtractor(
|
|
429
|
+
const functionExtractor = new FunctionExtractor(ts6.isConstructSignatureDeclaration(signature) ? "new" : "", signature, this.typeChecker);
|
|
429
430
|
return {
|
|
430
431
|
...functionExtractor.extract(),
|
|
431
432
|
memberType: MemberType.Method,
|
|
@@ -445,7 +446,7 @@ var ClassExtractor = class {
|
|
|
445
446
|
extractGetterSetter(accessor) {
|
|
446
447
|
return {
|
|
447
448
|
...this.extractClassProperty(accessor),
|
|
448
|
-
memberType:
|
|
449
|
+
memberType: ts6.isGetAccessor(accessor) ? MemberType.Getter : MemberType.Setter
|
|
449
450
|
};
|
|
450
451
|
}
|
|
451
452
|
extractInheritance(declaration) {
|
|
@@ -453,7 +454,7 @@ var ClassExtractor = class {
|
|
|
453
454
|
return void 0;
|
|
454
455
|
}
|
|
455
456
|
for (const clause of declaration.heritageClauses) {
|
|
456
|
-
if (clause.token ===
|
|
457
|
+
if (clause.token === ts6.SyntaxKind.ExtendsKeyword) {
|
|
457
458
|
const types = clause.types;
|
|
458
459
|
if (types.length > 0) {
|
|
459
460
|
const baseClass = types[0];
|
|
@@ -465,7 +466,7 @@ var ClassExtractor = class {
|
|
|
465
466
|
}
|
|
466
467
|
extractInterfaceConformance(declaration) {
|
|
467
468
|
var _a, _b;
|
|
468
|
-
const implementClause = (_a = declaration.heritageClauses) == null ? void 0 : _a.find((clause) => clause.token ===
|
|
469
|
+
const implementClause = (_a = declaration.heritageClauses) == null ? void 0 : _a.find((clause) => clause.token === ts6.SyntaxKind.ImplementsKeyword);
|
|
469
470
|
return (_b = implementClause == null ? void 0 : implementClause.types.map((m) => m.getText())) != null ? _b : [];
|
|
470
471
|
}
|
|
471
472
|
getMemberTags(member) {
|
|
@@ -511,9 +512,9 @@ var ClassExtractor = class {
|
|
|
511
512
|
filterMethodOverloads(declarations) {
|
|
512
513
|
return declarations.filter((declaration, index) => {
|
|
513
514
|
var _a;
|
|
514
|
-
if (
|
|
515
|
+
if (ts6.isFunctionDeclaration(declaration) || ts6.isMethodDeclaration(declaration)) {
|
|
515
516
|
const nextDeclaration = declarations[index + 1];
|
|
516
|
-
const isNextAbstractMethodWithSameName = nextDeclaration &&
|
|
517
|
+
const isNextAbstractMethodWithSameName = nextDeclaration && ts6.isMethodDeclaration(nextDeclaration) && nextDeclaration.name.getText() === ((_a = declaration.name) == null ? void 0 : _a.getText());
|
|
517
518
|
return !isNextAbstractMethodWithSameName;
|
|
518
519
|
}
|
|
519
520
|
return true;
|
|
@@ -530,13 +531,13 @@ var ClassExtractor = class {
|
|
|
530
531
|
}
|
|
531
532
|
getTagForMemberModifier(mod) {
|
|
532
533
|
switch (mod.kind) {
|
|
533
|
-
case
|
|
534
|
+
case ts6.SyntaxKind.StaticKeyword:
|
|
534
535
|
return MemberTags.Static;
|
|
535
|
-
case
|
|
536
|
+
case ts6.SyntaxKind.ReadonlyKeyword:
|
|
536
537
|
return MemberTags.Readonly;
|
|
537
|
-
case
|
|
538
|
+
case ts6.SyntaxKind.ProtectedKeyword:
|
|
538
539
|
return MemberTags.Protected;
|
|
539
|
-
case
|
|
540
|
+
case ts6.SyntaxKind.AbstractKeyword:
|
|
540
541
|
return MemberTags.Abstract;
|
|
541
542
|
default:
|
|
542
543
|
return void 0;
|
|
@@ -544,33 +545,33 @@ var ClassExtractor = class {
|
|
|
544
545
|
}
|
|
545
546
|
isMemberExcluded(member) {
|
|
546
547
|
var _a;
|
|
547
|
-
return !member.name || !this.isDocumentableMember(member) || !
|
|
548
|
+
return !member.name || !this.isDocumentableMember(member) || !ts6.isCallSignatureDeclaration(member) && ((_a = member.modifiers) == null ? void 0 : _a.some((mod) => mod.kind === ts6.SyntaxKind.PrivateKeyword)) || member.name.getText() === "prototype" || isAngularPrivateName(member.name.getText()) || isInternal(member);
|
|
548
549
|
}
|
|
549
550
|
isDocumentableMember(member) {
|
|
550
|
-
return this.isMethod(member) || this.isProperty(member) ||
|
|
551
|
+
return this.isMethod(member) || this.isProperty(member) || ts6.isAccessor(member) || ts6.isCallSignatureDeclaration(member);
|
|
551
552
|
}
|
|
552
553
|
isPublicConstructorParameterProperty(node) {
|
|
553
|
-
if (
|
|
554
|
-
return node.modifiers.some((modifier) => modifier.kind ===
|
|
554
|
+
if (ts6.isParameterPropertyDeclaration(node, node.parent) && node.modifiers) {
|
|
555
|
+
return node.modifiers.some((modifier) => modifier.kind === ts6.SyntaxKind.PublicKeyword);
|
|
555
556
|
}
|
|
556
557
|
return false;
|
|
557
558
|
}
|
|
558
559
|
isProperty(member) {
|
|
559
|
-
return
|
|
560
|
+
return ts6.isPropertyDeclaration(member) || ts6.isPropertySignature(member) || this.isPublicConstructorParameterProperty(member);
|
|
560
561
|
}
|
|
561
562
|
isMethod(member) {
|
|
562
|
-
return
|
|
563
|
+
return ts6.isMethodDeclaration(member) || ts6.isMethodSignature(member);
|
|
563
564
|
}
|
|
564
565
|
isDocumentableSignature(signature) {
|
|
565
|
-
return
|
|
566
|
+
return ts6.isConstructSignatureDeclaration(signature) || ts6.isCallSignatureDeclaration(signature);
|
|
566
567
|
}
|
|
567
568
|
isAbstract() {
|
|
568
569
|
var _a;
|
|
569
570
|
const modifiers = (_a = this.declaration.modifiers) != null ? _a : [];
|
|
570
|
-
return modifiers.some((mod) => mod.kind ===
|
|
571
|
+
return modifiers.some((mod) => mod.kind === ts6.SyntaxKind.AbstractKeyword);
|
|
571
572
|
}
|
|
572
573
|
hasPrivateComputedProperty(property) {
|
|
573
|
-
return
|
|
574
|
+
return ts6.isComputedPropertyName(property.name) && property.name.expression.getText().startsWith("\u0275");
|
|
574
575
|
}
|
|
575
576
|
};
|
|
576
577
|
var DirectiveExtractor = class extends ClassExtractor {
|
|
@@ -671,8 +672,8 @@ function extractInterface(declaration, typeChecker) {
|
|
|
671
672
|
return extractor.extract();
|
|
672
673
|
}
|
|
673
674
|
|
|
674
|
-
// bazel-out/
|
|
675
|
-
import
|
|
675
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/constant_extractor.mjs
|
|
676
|
+
import ts7 from "typescript";
|
|
676
677
|
var LITERAL_AS_ENUM_TAG = "object-literal-as-enum";
|
|
677
678
|
function extractConstant(declaration, typeChecker) {
|
|
678
679
|
const resolvedType = typeChecker.getBaseTypeOfLiteralType(typeChecker.getTypeAtLocation(declaration));
|
|
@@ -704,17 +705,17 @@ function isSyntheticAngularConstant(declaration) {
|
|
|
704
705
|
}
|
|
705
706
|
function extractLiteralPropertiesAsEnumMembers(declaration) {
|
|
706
707
|
let initializer = declaration.initializer;
|
|
707
|
-
while (initializer && (
|
|
708
|
+
while (initializer && (ts7.isAsExpression(initializer) || ts7.isParenthesizedExpression(initializer))) {
|
|
708
709
|
initializer = initializer.expression;
|
|
709
710
|
}
|
|
710
|
-
if (initializer === void 0 || !
|
|
711
|
-
throw new Error(`Declaration tagged with "${LITERAL_AS_ENUM_TAG}" must be initialized to an object literal, but received ${initializer ?
|
|
711
|
+
if (initializer === void 0 || !ts7.isObjectLiteralExpression(initializer)) {
|
|
712
|
+
throw new Error(`Declaration tagged with "${LITERAL_AS_ENUM_TAG}" must be initialized to an object literal, but received ${initializer ? ts7.SyntaxKind[initializer.kind] : "undefined"}`);
|
|
712
713
|
}
|
|
713
714
|
return initializer.properties.map((prop) => {
|
|
714
|
-
if (!
|
|
715
|
+
if (!ts7.isPropertyAssignment(prop) || !ts7.isIdentifier(prop.name)) {
|
|
715
716
|
throw new Error(`Property in declaration tagged with "${LITERAL_AS_ENUM_TAG}" must be a property assignment with a static name`);
|
|
716
717
|
}
|
|
717
|
-
if (!
|
|
718
|
+
if (!ts7.isNumericLiteral(prop.initializer) && !ts7.isStringLiteralLike(prop.initializer)) {
|
|
718
719
|
throw new Error(`Property in declaration tagged with "${LITERAL_AS_ENUM_TAG}" must be initialized to a number or string literal`);
|
|
719
720
|
}
|
|
720
721
|
return {
|
|
@@ -729,8 +730,8 @@ function extractLiteralPropertiesAsEnumMembers(declaration) {
|
|
|
729
730
|
});
|
|
730
731
|
}
|
|
731
732
|
|
|
732
|
-
// bazel-out/
|
|
733
|
-
import
|
|
733
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/decorator_extractor.mjs
|
|
734
|
+
import ts8 from "typescript";
|
|
734
735
|
function extractorDecorator(declaration, typeChecker) {
|
|
735
736
|
const documentedNode = getDecoratorJsDocNode(declaration);
|
|
736
737
|
const decoratorType = getDecoratorType(declaration);
|
|
@@ -751,7 +752,7 @@ function isDecoratorDeclaration(declaration) {
|
|
|
751
752
|
return !!getDecoratorType(declaration);
|
|
752
753
|
}
|
|
753
754
|
function isDecoratorOptionsInterface(declaration) {
|
|
754
|
-
return declaration.getSourceFile().statements.some((s) =>
|
|
755
|
+
return declaration.getSourceFile().statements.some((s) => ts8.isVariableStatement(s) && s.declarationList.declarations.some((d) => isDecoratorDeclaration(d) && d.name.getText() === declaration.name.getText()));
|
|
755
756
|
}
|
|
756
757
|
function getDecoratorType(declaration) {
|
|
757
758
|
var _a, _b;
|
|
@@ -768,19 +769,19 @@ function getDecoratorOptions(declaration, typeChecker) {
|
|
|
768
769
|
var _a, _b;
|
|
769
770
|
const name = declaration.name.getText();
|
|
770
771
|
const optionsDeclaration = declaration.getSourceFile().statements.find((node) => {
|
|
771
|
-
return (
|
|
772
|
+
return (ts8.isInterfaceDeclaration(node) || ts8.isTypeAliasDeclaration(node)) && node.name.getText() === name;
|
|
772
773
|
});
|
|
773
774
|
if (!optionsDeclaration) {
|
|
774
775
|
throw new Error(`Decorator "${name}" has no corresponding options interface.`);
|
|
775
776
|
}
|
|
776
777
|
let optionsInterface;
|
|
777
|
-
if (
|
|
778
|
+
if (ts8.isTypeAliasDeclaration(optionsDeclaration)) {
|
|
778
779
|
const aliasedType = typeChecker.getTypeAtLocation(optionsDeclaration.type);
|
|
779
|
-
optionsInterface = ((_b = (_a = aliasedType.getSymbol()) == null ? void 0 : _a.getDeclarations()) != null ? _b : []).find((d) =>
|
|
780
|
+
optionsInterface = ((_b = (_a = aliasedType.getSymbol()) == null ? void 0 : _a.getDeclarations()) != null ? _b : []).find((d) => ts8.isInterfaceDeclaration(d));
|
|
780
781
|
} else {
|
|
781
782
|
optionsInterface = optionsDeclaration;
|
|
782
783
|
}
|
|
783
|
-
if (!optionsInterface || !
|
|
784
|
+
if (!optionsInterface || !ts8.isInterfaceDeclaration(optionsInterface)) {
|
|
784
785
|
throw new Error(`Options for decorator "${name}" is not an interface.`);
|
|
785
786
|
}
|
|
786
787
|
return extractInterface(optionsInterface, typeChecker).members;
|
|
@@ -788,22 +789,22 @@ function getDecoratorOptions(declaration, typeChecker) {
|
|
|
788
789
|
function getDecoratorJsDocNode(declaration) {
|
|
789
790
|
const name = declaration.name.getText();
|
|
790
791
|
const decoratorInterface = declaration.getSourceFile().statements.find((s) => {
|
|
791
|
-
return
|
|
792
|
+
return ts8.isInterfaceDeclaration(s) && s.name.getText() === `${name}Decorator`;
|
|
792
793
|
});
|
|
793
|
-
if (!decoratorInterface || !
|
|
794
|
+
if (!decoratorInterface || !ts8.isInterfaceDeclaration(decoratorInterface)) {
|
|
794
795
|
throw new Error(`No interface "${name}Decorator" found.`);
|
|
795
796
|
}
|
|
796
797
|
const callSignature = decoratorInterface.members.find((node) => {
|
|
797
|
-
return
|
|
798
|
+
return ts8.isCallSignatureDeclaration(node) && extractRawJsDoc(node);
|
|
798
799
|
});
|
|
799
|
-
if (!callSignature || !
|
|
800
|
+
if (!callSignature || !ts8.isCallSignatureDeclaration(callSignature)) {
|
|
800
801
|
throw new Error(`No call signature with JsDoc on "${name}Decorator"`);
|
|
801
802
|
}
|
|
802
803
|
return callSignature;
|
|
803
804
|
}
|
|
804
805
|
|
|
805
|
-
// bazel-out/
|
|
806
|
-
import
|
|
806
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.mjs
|
|
807
|
+
import ts9 from "typescript";
|
|
807
808
|
function extractEnum(declaration, typeChecker) {
|
|
808
809
|
return {
|
|
809
810
|
name: declaration.name.getText(),
|
|
@@ -828,37 +829,37 @@ function extractEnumMembers(declaration, checker) {
|
|
|
828
829
|
function getEnumMemberValue(memberNode) {
|
|
829
830
|
var _a;
|
|
830
831
|
const literal = memberNode.getChildren().find((n) => {
|
|
831
|
-
return
|
|
832
|
+
return ts9.isNumericLiteral(n) || ts9.isStringLiteral(n) || ts9.isPrefixUnaryExpression(n) && n.operator === ts9.SyntaxKind.MinusToken && ts9.isNumericLiteral(n.operand);
|
|
832
833
|
});
|
|
833
834
|
return (_a = literal == null ? void 0 : literal.getText()) != null ? _a : "";
|
|
834
835
|
}
|
|
835
836
|
|
|
836
|
-
// bazel-out/
|
|
837
|
-
import
|
|
837
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/initializer_api_function_extractor.mjs
|
|
838
|
+
import ts10 from "typescript";
|
|
838
839
|
var initializerApiTag = "initializerApiFunction";
|
|
839
840
|
function isInitializerApiFunction(node, typeChecker) {
|
|
840
|
-
if (
|
|
841
|
+
if (ts10.isFunctionDeclaration(node) && node.name !== void 0 && node.body === void 0) {
|
|
841
842
|
const implementation = findImplementationOfFunction(node, typeChecker);
|
|
842
843
|
if (implementation !== void 0) {
|
|
843
844
|
node = implementation;
|
|
844
845
|
}
|
|
845
846
|
}
|
|
846
|
-
if (!
|
|
847
|
+
if (!ts10.isFunctionDeclaration(node) && !ts10.isVariableDeclaration(node)) {
|
|
847
848
|
return false;
|
|
848
849
|
}
|
|
849
|
-
let tagContainer =
|
|
850
|
+
let tagContainer = ts10.isFunctionDeclaration(node) ? node : getContainerVariableStatement(node);
|
|
850
851
|
if (tagContainer === null) {
|
|
851
852
|
return false;
|
|
852
853
|
}
|
|
853
|
-
const tags =
|
|
854
|
+
const tags = ts10.getJSDocTags(tagContainer);
|
|
854
855
|
return tags.some((t) => t.tagName.text === initializerApiTag);
|
|
855
856
|
}
|
|
856
857
|
function extractInitializerApiFunction(node, typeChecker) {
|
|
857
858
|
var _a;
|
|
858
|
-
if (node.name === void 0 || !
|
|
859
|
+
if (node.name === void 0 || !ts10.isIdentifier(node.name)) {
|
|
859
860
|
throw new Error(`Initializer API: Expected literal variable name.`);
|
|
860
861
|
}
|
|
861
|
-
const container =
|
|
862
|
+
const container = ts10.isFunctionDeclaration(node) ? node : getContainerVariableStatement(node);
|
|
862
863
|
if (container === null) {
|
|
863
864
|
throw new Error("Initializer API: Could not find container AST node of variable.");
|
|
864
865
|
}
|
|
@@ -869,7 +870,7 @@ function extractInitializerApiFunction(node, typeChecker) {
|
|
|
869
870
|
for (const property of type.getProperties()) {
|
|
870
871
|
const subName = property.getName();
|
|
871
872
|
const subDecl = (_a = property.getDeclarations()) == null ? void 0 : _a[0];
|
|
872
|
-
if (subDecl === void 0 || !
|
|
873
|
+
if (subDecl === void 0 || !ts10.isPropertySignature(subDecl)) {
|
|
873
874
|
throw new Error(`Initializer API: Could not resolve declaration of sub-property: ${name}.${subName}`);
|
|
874
875
|
}
|
|
875
876
|
const subType = typeChecker.getTypeAtLocation(subDecl);
|
|
@@ -878,7 +879,7 @@ function extractInitializerApiFunction(node, typeChecker) {
|
|
|
878
879
|
let jsdocTags;
|
|
879
880
|
let description;
|
|
880
881
|
let rawComment;
|
|
881
|
-
if (
|
|
882
|
+
if (ts10.isFunctionDeclaration(node)) {
|
|
882
883
|
const implementation = findImplementationOfFunction(node, typeChecker);
|
|
883
884
|
if (implementation === void 0) {
|
|
884
885
|
throw new Error(`Initializer API: Could not find implementation of function: ${name}`);
|
|
@@ -926,10 +927,10 @@ function extractInitializerApiFunction(node, typeChecker) {
|
|
|
926
927
|
};
|
|
927
928
|
}
|
|
928
929
|
function getContainerVariableStatement(node) {
|
|
929
|
-
if (!
|
|
930
|
+
if (!ts10.isVariableDeclarationList(node.parent)) {
|
|
930
931
|
return null;
|
|
931
932
|
}
|
|
932
|
-
if (!
|
|
933
|
+
if (!ts10.isVariableStatement(node.parent.parent)) {
|
|
933
934
|
return null;
|
|
934
935
|
}
|
|
935
936
|
return node.parent.parent;
|
|
@@ -942,7 +943,7 @@ function extractFunctionWithOverloads(name, type, typeChecker) {
|
|
|
942
943
|
};
|
|
943
944
|
}
|
|
944
945
|
|
|
945
|
-
// bazel-out/
|
|
946
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_alias_extractor.mjs
|
|
946
947
|
function extractTypeAlias(declaration) {
|
|
947
948
|
return {
|
|
948
949
|
name: declaration.name.getText(),
|
|
@@ -955,17 +956,17 @@ function extractTypeAlias(declaration) {
|
|
|
955
956
|
};
|
|
956
957
|
}
|
|
957
958
|
|
|
958
|
-
// bazel-out/
|
|
959
|
-
import
|
|
959
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/import_extractor.mjs
|
|
960
|
+
import ts11 from "typescript";
|
|
960
961
|
function getImportedSymbols(sourceFile) {
|
|
961
962
|
const importSpecifiers = /* @__PURE__ */ new Map();
|
|
962
963
|
function visit(node) {
|
|
963
964
|
var _a;
|
|
964
|
-
if (
|
|
965
|
+
if (ts11.isImportDeclaration(node)) {
|
|
965
966
|
let moduleSpecifier = node.moduleSpecifier.getText(sourceFile).replace(/['"]/g, "");
|
|
966
967
|
if (moduleSpecifier.startsWith("@angular/")) {
|
|
967
968
|
const namedBindings = (_a = node.importClause) == null ? void 0 : _a.namedBindings;
|
|
968
|
-
if (namedBindings &&
|
|
969
|
+
if (namedBindings && ts11.isNamedImports(namedBindings)) {
|
|
969
970
|
namedBindings.elements.forEach((importSpecifier) => {
|
|
970
971
|
const importName = importSpecifier.name.text;
|
|
971
972
|
const importAlias = importSpecifier.propertyName ? importSpecifier.propertyName.text : void 0;
|
|
@@ -974,13 +975,13 @@ function getImportedSymbols(sourceFile) {
|
|
|
974
975
|
}
|
|
975
976
|
}
|
|
976
977
|
}
|
|
977
|
-
|
|
978
|
+
ts11.forEachChild(node, visit);
|
|
978
979
|
}
|
|
979
980
|
visit(sourceFile);
|
|
980
981
|
return importSpecifiers;
|
|
981
982
|
}
|
|
982
983
|
|
|
983
|
-
// bazel-out/
|
|
984
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
|
|
984
985
|
var DocsExtractor = class {
|
|
985
986
|
typeChecker;
|
|
986
987
|
metadataReader;
|
|
@@ -1011,8 +1012,8 @@ var DocsExtractor = class {
|
|
|
1011
1012
|
});
|
|
1012
1013
|
entry.source = {
|
|
1013
1014
|
filePath: getRelativeFilePath(realSourceFile, rootDir),
|
|
1014
|
-
startLine:
|
|
1015
|
-
endLine:
|
|
1015
|
+
startLine: ts12.getLineAndCharacterOfPosition(realSourceFile, node.getStart()).line + 1,
|
|
1016
|
+
endLine: ts12.getLineAndCharacterOfPosition(realSourceFile, node.getEnd()).line + 1
|
|
1016
1017
|
};
|
|
1017
1018
|
entries.push({ ...entry, name: exportName });
|
|
1018
1019
|
}
|
|
@@ -1026,20 +1027,20 @@ var DocsExtractor = class {
|
|
|
1026
1027
|
if (isInitializerApiFunction(node, this.typeChecker)) {
|
|
1027
1028
|
return extractInitializerApiFunction(node, this.typeChecker);
|
|
1028
1029
|
}
|
|
1029
|
-
if (
|
|
1030
|
+
if (ts12.isInterfaceDeclaration(node) && !isIgnoredInterface(node)) {
|
|
1030
1031
|
return extractInterface(node, this.typeChecker);
|
|
1031
1032
|
}
|
|
1032
|
-
if (
|
|
1033
|
+
if (ts12.isFunctionDeclaration(node)) {
|
|
1033
1034
|
const functionExtractor = new FunctionExtractor(node.name.getText(), node, this.typeChecker);
|
|
1034
1035
|
return functionExtractor.extract();
|
|
1035
1036
|
}
|
|
1036
|
-
if (
|
|
1037
|
+
if (ts12.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
|
|
1037
1038
|
return isDecoratorDeclaration(node) ? extractorDecorator(node, this.typeChecker) : extractConstant(node, this.typeChecker);
|
|
1038
1039
|
}
|
|
1039
|
-
if (
|
|
1040
|
+
if (ts12.isTypeAliasDeclaration(node)) {
|
|
1040
1041
|
return extractTypeAlias(node);
|
|
1041
1042
|
}
|
|
1042
|
-
if (
|
|
1043
|
+
if (ts12.isEnumDeclaration(node)) {
|
|
1043
1044
|
return extractEnum(node, this.typeChecker);
|
|
1044
1045
|
}
|
|
1045
1046
|
return null;
|
|
@@ -1068,11 +1069,11 @@ function getRelativeFilePath(sourceFile, rootDir) {
|
|
|
1068
1069
|
return relativePath;
|
|
1069
1070
|
}
|
|
1070
1071
|
|
|
1071
|
-
// bazel-out/
|
|
1072
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
1072
1073
|
import { HtmlParser, MessageBundle } from "@angular/compiler";
|
|
1073
|
-
import
|
|
1074
|
+
import ts27 from "typescript";
|
|
1074
1075
|
|
|
1075
|
-
// bazel-out/
|
|
1076
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
|
|
1076
1077
|
import { Xliff, Xliff2, Xmb } from "@angular/compiler";
|
|
1077
1078
|
import * as path from "path";
|
|
1078
1079
|
function i18nGetExtension(formatName) {
|
|
@@ -1123,10 +1124,10 @@ function getPathNormalizer(basePath) {
|
|
|
1123
1124
|
};
|
|
1124
1125
|
}
|
|
1125
1126
|
|
|
1126
|
-
// bazel-out/
|
|
1127
|
-
import
|
|
1127
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1128
|
+
import ts13 from "typescript";
|
|
1128
1129
|
|
|
1129
|
-
// bazel-out/
|
|
1130
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
|
|
1130
1131
|
function toNumbers(value) {
|
|
1131
1132
|
const suffixIndex = value.lastIndexOf("-");
|
|
1132
1133
|
return value.slice(0, suffixIndex === -1 ? value.length : suffixIndex).split(".").map((segment) => {
|
|
@@ -1161,10 +1162,10 @@ function compareVersions(v1, v2) {
|
|
|
1161
1162
|
return compareNumbers(toNumbers(v1), toNumbers(v2));
|
|
1162
1163
|
}
|
|
1163
1164
|
|
|
1164
|
-
// bazel-out/
|
|
1165
|
-
var MIN_TS_VERSION = "5.
|
|
1165
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1166
|
+
var MIN_TS_VERSION = "5.8.0";
|
|
1166
1167
|
var MAX_TS_VERSION = "5.9.0";
|
|
1167
|
-
var tsVersion =
|
|
1168
|
+
var tsVersion = ts13.version;
|
|
1168
1169
|
function checkVersion(version, minVersion, maxVersion) {
|
|
1169
1170
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
|
1170
1171
|
throw new Error(`The Angular Compiler requires TypeScript >=${minVersion} and <${maxVersion} but ${version} was found instead.`);
|
|
@@ -1174,11 +1175,11 @@ function verifySupportedTypeScriptVersion() {
|
|
|
1174
1175
|
checkVersion(tsVersion, MIN_TS_VERSION, MAX_TS_VERSION);
|
|
1175
1176
|
}
|
|
1176
1177
|
|
|
1177
|
-
// bazel-out/
|
|
1178
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
1178
1179
|
import { R3Identifiers } from "@angular/compiler";
|
|
1179
|
-
import
|
|
1180
|
+
import ts25 from "typescript";
|
|
1180
1181
|
|
|
1181
|
-
// bazel-out/
|
|
1182
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
1182
1183
|
var CycleAnalyzer = class {
|
|
1183
1184
|
importGraph;
|
|
1184
1185
|
cachedResults = null;
|
|
@@ -1255,8 +1256,8 @@ var Cycle = class {
|
|
|
1255
1256
|
}
|
|
1256
1257
|
};
|
|
1257
1258
|
|
|
1258
|
-
// bazel-out/
|
|
1259
|
-
import
|
|
1259
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
|
|
1260
|
+
import ts14 from "typescript";
|
|
1260
1261
|
var ImportGraph = class {
|
|
1261
1262
|
checker;
|
|
1262
1263
|
perf;
|
|
@@ -1302,10 +1303,10 @@ var ImportGraph = class {
|
|
|
1302
1303
|
return this.perf.inPhase(PerfPhase.CycleDetection, () => {
|
|
1303
1304
|
const imports = /* @__PURE__ */ new Set();
|
|
1304
1305
|
for (const stmt of sf.statements) {
|
|
1305
|
-
if (!
|
|
1306
|
+
if (!ts14.isImportDeclaration(stmt) && !ts14.isExportDeclaration(stmt) || stmt.moduleSpecifier === void 0) {
|
|
1306
1307
|
continue;
|
|
1307
1308
|
}
|
|
1308
|
-
if (
|
|
1309
|
+
if (ts14.isImportDeclaration(stmt) && stmt.importClause !== void 0 && isTypeOnlyImportClause(stmt.importClause)) {
|
|
1309
1310
|
continue;
|
|
1310
1311
|
}
|
|
1311
1312
|
const symbol = this.checker.getSymbolAtLocation(stmt.moduleSpecifier);
|
|
@@ -1313,7 +1314,7 @@ var ImportGraph = class {
|
|
|
1313
1314
|
continue;
|
|
1314
1315
|
}
|
|
1315
1316
|
const moduleFile = symbol.valueDeclaration;
|
|
1316
|
-
if (
|
|
1317
|
+
if (ts14.isSourceFile(moduleFile) && isLocalFile(moduleFile)) {
|
|
1317
1318
|
imports.add(moduleFile);
|
|
1318
1319
|
}
|
|
1319
1320
|
}
|
|
@@ -1328,7 +1329,7 @@ function isTypeOnlyImportClause(node) {
|
|
|
1328
1329
|
if (node.isTypeOnly) {
|
|
1329
1330
|
return true;
|
|
1330
1331
|
}
|
|
1331
|
-
if (node.namedBindings !== void 0 &&
|
|
1332
|
+
if (node.namedBindings !== void 0 && ts14.isNamedImports(node.namedBindings) && node.namedBindings.elements.every((specifier) => specifier.isTypeOnly)) {
|
|
1332
1333
|
return true;
|
|
1333
1334
|
}
|
|
1334
1335
|
return false;
|
|
@@ -1351,8 +1352,8 @@ var Found = class {
|
|
|
1351
1352
|
}
|
|
1352
1353
|
};
|
|
1353
1354
|
|
|
1354
|
-
// bazel-out/
|
|
1355
|
-
import
|
|
1355
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
|
|
1356
|
+
import ts15 from "typescript";
|
|
1356
1357
|
var FlatIndexGenerator = class {
|
|
1357
1358
|
entryPoint;
|
|
1358
1359
|
moduleName;
|
|
@@ -1371,7 +1372,7 @@ var FlatIndexGenerator = class {
|
|
|
1371
1372
|
|
|
1372
1373
|
export * from '${relativeEntryPoint}';
|
|
1373
1374
|
`;
|
|
1374
|
-
const genFile =
|
|
1375
|
+
const genFile = ts15.createSourceFile(this.flatIndexPath, contents, ts15.ScriptTarget.ES2015, true, ts15.ScriptKind.TS);
|
|
1375
1376
|
if (this.moduleName !== null) {
|
|
1376
1377
|
genFile.moduleName = this.moduleName;
|
|
1377
1378
|
}
|
|
@@ -1379,7 +1380,7 @@ export * from '${relativeEntryPoint}';
|
|
|
1379
1380
|
}
|
|
1380
1381
|
};
|
|
1381
1382
|
|
|
1382
|
-
// bazel-out/
|
|
1383
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
|
|
1383
1384
|
function findFlatIndexEntryPoint(rootFiles) {
|
|
1384
1385
|
const tsFiles = rootFiles.filter((file) => isNonDeclarationTsPath(file));
|
|
1385
1386
|
let resolvedEntryPoint = null;
|
|
@@ -1395,8 +1396,8 @@ function findFlatIndexEntryPoint(rootFiles) {
|
|
|
1395
1396
|
return resolvedEntryPoint;
|
|
1396
1397
|
}
|
|
1397
1398
|
|
|
1398
|
-
// bazel-out/
|
|
1399
|
-
import
|
|
1399
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
|
|
1400
|
+
import ts16 from "typescript";
|
|
1400
1401
|
function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
1401
1402
|
const diagnostics = [];
|
|
1402
1403
|
const topLevelExports = /* @__PURE__ */ new Set();
|
|
@@ -1406,7 +1407,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1406
1407
|
}
|
|
1407
1408
|
const exportedSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
1408
1409
|
exportedSymbols.forEach((symbol) => {
|
|
1409
|
-
if (symbol.flags &
|
|
1410
|
+
if (symbol.flags & ts16.SymbolFlags.Alias) {
|
|
1410
1411
|
symbol = checker.getAliasedSymbol(symbol);
|
|
1411
1412
|
}
|
|
1412
1413
|
const decl = symbol.valueDeclaration;
|
|
@@ -1430,7 +1431,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1430
1431
|
visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
|
|
1431
1432
|
}
|
|
1432
1433
|
const diagnostic = {
|
|
1433
|
-
category:
|
|
1434
|
+
category: ts16.DiagnosticCategory.Error,
|
|
1434
1435
|
code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
|
|
1435
1436
|
file: transitiveReference.getSourceFile(),
|
|
1436
1437
|
...getPosOfDeclaration(transitiveReference),
|
|
@@ -1450,7 +1451,7 @@ function getPosOfDeclaration(decl) {
|
|
|
1450
1451
|
};
|
|
1451
1452
|
}
|
|
1452
1453
|
function getIdentifierOfDeclaration(decl) {
|
|
1453
|
-
if ((
|
|
1454
|
+
if ((ts16.isClassDeclaration(decl) || ts16.isVariableDeclaration(decl) || ts16.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts16.isIdentifier(decl.name)) {
|
|
1454
1455
|
return decl.name;
|
|
1455
1456
|
} else {
|
|
1456
1457
|
return null;
|
|
@@ -1462,20 +1463,20 @@ function getNameOfDeclaration(decl) {
|
|
|
1462
1463
|
}
|
|
1463
1464
|
function getDescriptorOfDeclaration(decl) {
|
|
1464
1465
|
switch (decl.kind) {
|
|
1465
|
-
case
|
|
1466
|
+
case ts16.SyntaxKind.ClassDeclaration:
|
|
1466
1467
|
return "class";
|
|
1467
|
-
case
|
|
1468
|
+
case ts16.SyntaxKind.FunctionDeclaration:
|
|
1468
1469
|
return "function";
|
|
1469
|
-
case
|
|
1470
|
+
case ts16.SyntaxKind.VariableDeclaration:
|
|
1470
1471
|
return "variable";
|
|
1471
|
-
case
|
|
1472
|
+
case ts16.SyntaxKind.EnumDeclaration:
|
|
1472
1473
|
return "enum";
|
|
1473
1474
|
default:
|
|
1474
1475
|
return "declaration";
|
|
1475
1476
|
}
|
|
1476
1477
|
}
|
|
1477
1478
|
|
|
1478
|
-
// bazel-out/
|
|
1479
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
|
|
1479
1480
|
var ReferenceGraph = class {
|
|
1480
1481
|
references = /* @__PURE__ */ new Map();
|
|
1481
1482
|
add(from, to) {
|
|
@@ -1527,7 +1528,7 @@ var ReferenceGraph = class {
|
|
|
1527
1528
|
}
|
|
1528
1529
|
};
|
|
1529
1530
|
|
|
1530
|
-
// bazel-out/
|
|
1531
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
|
|
1531
1532
|
var FileDependencyGraph = class {
|
|
1532
1533
|
nodes = /* @__PURE__ */ new Map();
|
|
1533
1534
|
addDependency(from, on) {
|
|
@@ -1592,7 +1593,7 @@ function isLogicallyChanged(sf, node, changedTsPaths, deletedTsPaths, changedRes
|
|
|
1592
1593
|
return false;
|
|
1593
1594
|
}
|
|
1594
1595
|
|
|
1595
|
-
// bazel-out/
|
|
1596
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
|
|
1596
1597
|
var IncrementalStateKind;
|
|
1597
1598
|
(function(IncrementalStateKind2) {
|
|
1598
1599
|
IncrementalStateKind2[IncrementalStateKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -1600,7 +1601,7 @@ var IncrementalStateKind;
|
|
|
1600
1601
|
IncrementalStateKind2[IncrementalStateKind2["Analyzed"] = 2] = "Analyzed";
|
|
1601
1602
|
})(IncrementalStateKind || (IncrementalStateKind = {}));
|
|
1602
1603
|
|
|
1603
|
-
// bazel-out/
|
|
1604
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
|
|
1604
1605
|
var PhaseKind;
|
|
1605
1606
|
(function(PhaseKind2) {
|
|
1606
1607
|
PhaseKind2[PhaseKind2["Analysis"] = 0] = "Analysis";
|
|
@@ -1806,7 +1807,7 @@ function toOriginalSourceFile(sf) {
|
|
|
1806
1807
|
}
|
|
1807
1808
|
}
|
|
1808
1809
|
|
|
1809
|
-
// bazel-out/
|
|
1810
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
|
|
1810
1811
|
var TrackedIncrementalBuildStrategy = class {
|
|
1811
1812
|
state = null;
|
|
1812
1813
|
isSet = false;
|
|
@@ -1840,7 +1841,7 @@ var PatchedProgramIncrementalBuildStrategy = class {
|
|
|
1840
1841
|
};
|
|
1841
1842
|
var SYM_INCREMENTAL_STATE = Symbol("NgIncrementalState");
|
|
1842
1843
|
|
|
1843
|
-
// bazel-out/
|
|
1844
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
|
|
1844
1845
|
var IdentifierKind;
|
|
1845
1846
|
(function(IdentifierKind2) {
|
|
1846
1847
|
IdentifierKind2[IdentifierKind2["Property"] = 0] = "Property";
|
|
@@ -1861,7 +1862,7 @@ var AbsoluteSourceSpan = class {
|
|
|
1861
1862
|
}
|
|
1862
1863
|
};
|
|
1863
1864
|
|
|
1864
|
-
// bazel-out/
|
|
1865
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
|
|
1865
1866
|
var IndexingContext = class {
|
|
1866
1867
|
components = /* @__PURE__ */ new Set();
|
|
1867
1868
|
addComponent(info) {
|
|
@@ -1869,10 +1870,10 @@ var IndexingContext = class {
|
|
|
1869
1870
|
}
|
|
1870
1871
|
};
|
|
1871
1872
|
|
|
1872
|
-
// bazel-out/
|
|
1873
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
1873
1874
|
import { ParseSourceFile } from "@angular/compiler";
|
|
1874
1875
|
|
|
1875
|
-
// bazel-out/
|
|
1876
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
|
|
1876
1877
|
import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstBoundDeferredTrigger, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate, TmplAstVariable } from "@angular/compiler";
|
|
1877
1878
|
var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
1878
1879
|
expressionStr;
|
|
@@ -2172,7 +2173,7 @@ function getTemplateIdentifiers(boundTemplate) {
|
|
|
2172
2173
|
return { identifiers: visitor.identifiers, errors: visitor.errors };
|
|
2173
2174
|
}
|
|
2174
2175
|
|
|
2175
|
-
// bazel-out/
|
|
2176
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
2176
2177
|
function generateAnalysis(context) {
|
|
2177
2178
|
const analysis = /* @__PURE__ */ new Map();
|
|
2178
2179
|
context.components.forEach(({ declaration, selector, boundTemplate, templateMeta }) => {
|
|
@@ -2208,7 +2209,7 @@ function generateAnalysis(context) {
|
|
|
2208
2209
|
return analysis;
|
|
2209
2210
|
}
|
|
2210
2211
|
|
|
2211
|
-
// bazel-out/
|
|
2212
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.mjs
|
|
2212
2213
|
var NgModuleIndexImpl = class {
|
|
2213
2214
|
metaReader;
|
|
2214
2215
|
localReader;
|
|
@@ -2299,8 +2300,8 @@ var NgModuleIndexImpl = class {
|
|
|
2299
2300
|
}
|
|
2300
2301
|
};
|
|
2301
2302
|
|
|
2302
|
-
// bazel-out/
|
|
2303
|
-
import
|
|
2303
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
|
|
2304
|
+
import ts17 from "typescript";
|
|
2304
2305
|
var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
|
|
2305
2306
|
var RESOURCE_MARKER = ".$ngresource$";
|
|
2306
2307
|
var RESOURCE_MARKER_TS = RESOURCE_MARKER + ".ts";
|
|
@@ -2422,7 +2423,7 @@ var AdapterResourceLoader = class {
|
|
|
2422
2423
|
return this.adapter.rootDirs.map((rootDir) => join(rootDir, segment));
|
|
2423
2424
|
}
|
|
2424
2425
|
getResolvedCandidateLocations(url, fromFile) {
|
|
2425
|
-
const failedLookup =
|
|
2426
|
+
const failedLookup = ts17.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
|
|
2426
2427
|
if (failedLookup.failedLookupLocations === void 0) {
|
|
2427
2428
|
throw new Error(`Internal error: expected to find failedLookupLocations during resolution of resource '${url}' in context of ${fromFile}`);
|
|
2428
2429
|
}
|
|
@@ -2457,7 +2458,7 @@ function createLookupResolutionHost(adapter) {
|
|
|
2457
2458
|
};
|
|
2458
2459
|
}
|
|
2459
2460
|
|
|
2460
|
-
// bazel-out/
|
|
2461
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/standalone.mjs
|
|
2461
2462
|
var StandaloneComponentScopeReader = class {
|
|
2462
2463
|
metaReader;
|
|
2463
2464
|
localModuleReader;
|
|
@@ -2556,11 +2557,11 @@ var StandaloneComponentScopeReader = class {
|
|
|
2556
2557
|
}
|
|
2557
2558
|
};
|
|
2558
2559
|
|
|
2559
|
-
// bazel-out/
|
|
2560
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
2560
2561
|
import { ASTWithSource as ASTWithSource3, BindingType, Interpolation, PropertyRead as PropertyRead2, TmplAstBoundAttribute } from "@angular/compiler";
|
|
2561
2562
|
|
|
2562
|
-
// bazel-out/
|
|
2563
|
-
import
|
|
2563
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.mjs
|
|
2564
|
+
import ts18 from "typescript";
|
|
2564
2565
|
var SIGNAL_FNS = /* @__PURE__ */ new Set([
|
|
2565
2566
|
"WritableSignal",
|
|
2566
2567
|
"Signal",
|
|
@@ -2575,11 +2576,11 @@ function isSignalSymbol(symbol) {
|
|
|
2575
2576
|
const declarations = symbol.getDeclarations();
|
|
2576
2577
|
return declarations !== void 0 && declarations.some((decl) => {
|
|
2577
2578
|
const fileName = decl.getSourceFile().fileName;
|
|
2578
|
-
return (
|
|
2579
|
+
return (ts18.isInterfaceDeclaration(decl) || ts18.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
|
|
2579
2580
|
});
|
|
2580
2581
|
}
|
|
2581
2582
|
|
|
2582
|
-
// bazel-out/
|
|
2583
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
|
|
2583
2584
|
import { ASTWithSource as ASTWithSource2, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
|
|
2584
2585
|
var TemplateCheckWithVisitor = class {
|
|
2585
2586
|
canVisitStructuralAttributes = true;
|
|
@@ -2716,7 +2717,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
|
|
|
2716
2717
|
}
|
|
2717
2718
|
};
|
|
2718
2719
|
|
|
2719
|
-
// bazel-out/
|
|
2720
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
2720
2721
|
var SIGNAL_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["set", "update", "asReadonly"]);
|
|
2721
2722
|
var FUNCTION_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["name", "length", "prototype"]);
|
|
2722
2723
|
var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
@@ -2765,7 +2766,7 @@ var factory = {
|
|
|
2765
2766
|
create: () => new InterpolatedSignalCheck()
|
|
2766
2767
|
};
|
|
2767
2768
|
|
|
2768
|
-
// bazel-out/
|
|
2769
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
2769
2770
|
import { TmplAstBoundEvent } from "@angular/compiler";
|
|
2770
2771
|
var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
|
|
2771
2772
|
code = ErrorCode.INVALID_BANANA_IN_BOX;
|
|
@@ -2788,7 +2789,7 @@ var factory2 = {
|
|
|
2788
2789
|
create: () => new InvalidBananaInBoxCheck()
|
|
2789
2790
|
};
|
|
2790
2791
|
|
|
2791
|
-
// bazel-out/
|
|
2792
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
|
|
2792
2793
|
import { TmplAstTemplate as TmplAstTemplate2 } from "@angular/compiler";
|
|
2793
2794
|
var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
|
|
2794
2795
|
["ngIf", { directive: "NgIf", builtIn: "@if" }],
|
|
@@ -2830,7 +2831,7 @@ var factory3 = {
|
|
|
2830
2831
|
}
|
|
2831
2832
|
};
|
|
2832
2833
|
|
|
2833
|
-
// bazel-out/
|
|
2834
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
|
|
2834
2835
|
import { TmplAstTemplate as TmplAstTemplate3 } from "@angular/compiler";
|
|
2835
2836
|
var MissingNgForOfLetCheck = class extends TemplateCheckWithVisitor {
|
|
2836
2837
|
code = ErrorCode.MISSING_NGFOROF_LET;
|
|
@@ -2860,9 +2861,9 @@ var factory4 = {
|
|
|
2860
2861
|
create: () => new MissingNgForOfLetCheck()
|
|
2861
2862
|
};
|
|
2862
2863
|
|
|
2863
|
-
// bazel-out/
|
|
2864
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
|
|
2864
2865
|
import { Binary } from "@angular/compiler";
|
|
2865
|
-
import
|
|
2866
|
+
import ts19 from "typescript";
|
|
2866
2867
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2867
2868
|
canVisitStructuralAttributes = false;
|
|
2868
2869
|
code = ErrorCode.NULLISH_COALESCING_NOT_NULLABLE;
|
|
@@ -2874,7 +2875,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2874
2875
|
return [];
|
|
2875
2876
|
}
|
|
2876
2877
|
const typeLeft = symbolLeft.tsType;
|
|
2877
|
-
if (typeLeft.flags & (
|
|
2878
|
+
if (typeLeft.flags & (ts19.TypeFlags.Any | ts19.TypeFlags.Unknown)) {
|
|
2878
2879
|
return [];
|
|
2879
2880
|
}
|
|
2880
2881
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -2903,9 +2904,9 @@ var factory5 = {
|
|
|
2903
2904
|
}
|
|
2904
2905
|
};
|
|
2905
2906
|
|
|
2906
|
-
// bazel-out/
|
|
2907
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
|
|
2907
2908
|
import { SafeCall, SafeKeyedRead, SafePropertyRead } from "@angular/compiler";
|
|
2908
|
-
import
|
|
2909
|
+
import ts20 from "typescript";
|
|
2909
2910
|
var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2910
2911
|
canVisitStructuralAttributes = false;
|
|
2911
2912
|
code = ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE;
|
|
@@ -2917,7 +2918,7 @@ var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2917
2918
|
return [];
|
|
2918
2919
|
}
|
|
2919
2920
|
const typeLeft = symbolLeft.tsType;
|
|
2920
|
-
if (typeLeft.flags & (
|
|
2921
|
+
if (typeLeft.flags & (ts20.TypeFlags.Any | ts20.TypeFlags.Unknown)) {
|
|
2921
2922
|
return [];
|
|
2922
2923
|
}
|
|
2923
2924
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -2947,7 +2948,7 @@ var factory6 = {
|
|
|
2947
2948
|
}
|
|
2948
2949
|
};
|
|
2949
2950
|
|
|
2950
|
-
// bazel-out/
|
|
2951
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.mjs
|
|
2951
2952
|
import { TmplAstBoundAttribute as TmplAstBoundAttribute2 } from "@angular/compiler";
|
|
2952
2953
|
var STYLE_SUFFIXES = ["px", "%", "em"];
|
|
2953
2954
|
var SuffixNotSupportedCheck = class extends TemplateCheckWithVisitor {
|
|
@@ -2968,7 +2969,7 @@ var factory7 = {
|
|
|
2968
2969
|
create: () => new SuffixNotSupportedCheck()
|
|
2969
2970
|
};
|
|
2970
2971
|
|
|
2971
|
-
// bazel-out/
|
|
2972
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
|
|
2972
2973
|
import { TmplAstTextAttribute } from "@angular/compiler";
|
|
2973
2974
|
var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
|
|
2974
2975
|
code = ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING;
|
|
@@ -3004,7 +3005,7 @@ var factory8 = {
|
|
|
3004
3005
|
create: () => new TextAttributeNotBindingSpec()
|
|
3005
3006
|
};
|
|
3006
3007
|
|
|
3007
|
-
// bazel-out/
|
|
3008
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.mjs
|
|
3008
3009
|
import { ASTWithSource as ASTWithSource4, Call, Chain, Conditional, ParsedEventType, PropertyRead as PropertyRead3, SafeCall as SafeCall2, SafePropertyRead as SafePropertyRead2, TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
|
|
3009
3010
|
var UninvokedFunctionInEventBindingSpec = class extends TemplateCheckWithVisitor {
|
|
3010
3011
|
code = ErrorCode.UNINVOKED_FUNCTION_IN_EVENT_BINDING;
|
|
@@ -3053,7 +3054,7 @@ var factory9 = {
|
|
|
3053
3054
|
create: () => new UninvokedFunctionInEventBindingSpec()
|
|
3054
3055
|
};
|
|
3055
3056
|
|
|
3056
|
-
// bazel-out/
|
|
3057
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.mjs
|
|
3057
3058
|
import { AST, ASTWithSource as ASTWithSource5, TmplAstLetDeclaration } from "@angular/compiler";
|
|
3058
3059
|
var UnusedLetDeclarationCheck = class extends TemplateCheckWithVisitor {
|
|
3059
3060
|
code = ErrorCode.UNUSED_LET_DECLARATION;
|
|
@@ -3095,7 +3096,7 @@ var factory10 = {
|
|
|
3095
3096
|
create: () => new UnusedLetDeclarationCheck()
|
|
3096
3097
|
};
|
|
3097
3098
|
|
|
3098
|
-
// bazel-out/
|
|
3099
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/skip_hydration_not_static/index.mjs
|
|
3099
3100
|
import { TmplAstBoundAttribute as TmplAstBoundAttribute3, TmplAstTextAttribute as TmplAstTextAttribute2 } from "@angular/compiler";
|
|
3100
3101
|
var NG_SKIP_HYDRATION_ATTR_NAME = "ngSkipHydration";
|
|
3101
3102
|
var NgSkipHydrationSpec = class extends TemplateCheckWithVisitor {
|
|
@@ -3121,10 +3122,10 @@ var factory11 = {
|
|
|
3121
3122
|
create: () => new NgSkipHydrationSpec()
|
|
3122
3123
|
};
|
|
3123
3124
|
|
|
3124
|
-
// bazel-out/
|
|
3125
|
-
import
|
|
3125
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3126
|
+
import ts21 from "typescript";
|
|
3126
3127
|
|
|
3127
|
-
// bazel-out/
|
|
3128
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
|
|
3128
3129
|
var DiagnosticCategoryLabel;
|
|
3129
3130
|
(function(DiagnosticCategoryLabel2) {
|
|
3130
3131
|
DiagnosticCategoryLabel2["Warning"] = "warning";
|
|
@@ -3132,7 +3133,7 @@ var DiagnosticCategoryLabel;
|
|
|
3132
3133
|
DiagnosticCategoryLabel2["Suppress"] = "suppress";
|
|
3133
3134
|
})(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
|
|
3134
3135
|
|
|
3135
|
-
// bazel-out/
|
|
3136
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3136
3137
|
var ExtendedTemplateCheckerImpl = class {
|
|
3137
3138
|
partialCtx;
|
|
3138
3139
|
templateChecks;
|
|
@@ -3173,9 +3174,9 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
3173
3174
|
function diagnosticLabelToCategory(label) {
|
|
3174
3175
|
switch (label) {
|
|
3175
3176
|
case DiagnosticCategoryLabel.Warning:
|
|
3176
|
-
return
|
|
3177
|
+
return ts21.DiagnosticCategory.Warning;
|
|
3177
3178
|
case DiagnosticCategoryLabel.Error:
|
|
3178
|
-
return
|
|
3179
|
+
return ts21.DiagnosticCategory.Error;
|
|
3179
3180
|
case DiagnosticCategoryLabel.Suppress:
|
|
3180
3181
|
return null;
|
|
3181
3182
|
default:
|
|
@@ -3187,7 +3188,7 @@ function assertNever(value) {
|
|
|
3187
3188
|
${value}`);
|
|
3188
3189
|
}
|
|
3189
3190
|
|
|
3190
|
-
// bazel-out/
|
|
3191
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
|
|
3191
3192
|
var ALL_DIAGNOSTIC_FACTORIES = [
|
|
3192
3193
|
factory2,
|
|
3193
3194
|
factory5,
|
|
@@ -3207,9 +3208,9 @@ var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
|
|
|
3207
3208
|
...ALL_DIAGNOSTIC_FACTORIES.map((factory12) => factory12.name)
|
|
3208
3209
|
]);
|
|
3209
3210
|
|
|
3210
|
-
// bazel-out/
|
|
3211
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.mjs
|
|
3211
3212
|
import { ASTWithSource as ASTWithSource6, ImplicitReceiver as ImplicitReceiver2, ParsedEventType as ParsedEventType2, RecursiveAstVisitor as RecursiveAstVisitor3, TmplAstBoundEvent as TmplAstBoundEvent3, TmplAstLetDeclaration as TmplAstLetDeclaration2, TmplAstRecursiveVisitor as TmplAstRecursiveVisitor2, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
|
|
3212
|
-
import
|
|
3213
|
+
import ts22 from "typescript";
|
|
3213
3214
|
var TemplateSemanticsCheckerImpl = class {
|
|
3214
3215
|
templateTypeChecker;
|
|
3215
3216
|
constructor(templateTypeChecker) {
|
|
@@ -3289,7 +3290,7 @@ var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
|
|
|
3289
3290
|
}
|
|
3290
3291
|
makeIllegalTemplateVarDiagnostic(target, expressionNode, errorMessage) {
|
|
3291
3292
|
const span = target instanceof TmplAstVariable2 ? target.valueSpan || target.sourceSpan : target.sourceSpan;
|
|
3292
|
-
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan,
|
|
3293
|
+
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts22.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [
|
|
3293
3294
|
{
|
|
3294
3295
|
text: `'${target.name}' is declared here.`,
|
|
3295
3296
|
start: span.start.offset,
|
|
@@ -3303,8 +3304,8 @@ function unwrapAstWithSource(ast) {
|
|
|
3303
3304
|
return ast instanceof ASTWithSource6 ? ast.ast : ast;
|
|
3304
3305
|
}
|
|
3305
3306
|
|
|
3306
|
-
// bazel-out/
|
|
3307
|
-
import
|
|
3307
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/initializer_api_usage_rule.mjs
|
|
3308
|
+
import ts23 from "typescript";
|
|
3308
3309
|
var APIS_TO_CHECK = [
|
|
3309
3310
|
INPUT_INITIALIZER_FN,
|
|
3310
3311
|
MODEL_INITIALIZER_FN,
|
|
@@ -3324,13 +3325,13 @@ var InitializerApiUsageRule = class {
|
|
|
3324
3325
|
});
|
|
3325
3326
|
}
|
|
3326
3327
|
checkNode(node) {
|
|
3327
|
-
if (!
|
|
3328
|
+
if (!ts23.isCallExpression(node)) {
|
|
3328
3329
|
return null;
|
|
3329
3330
|
}
|
|
3330
|
-
while (node.parent && (
|
|
3331
|
+
while (node.parent && (ts23.isParenthesizedExpression(node.parent) || ts23.isAsExpression(node.parent))) {
|
|
3331
3332
|
node = node.parent;
|
|
3332
3333
|
}
|
|
3333
|
-
if (!node.parent || !
|
|
3334
|
+
if (!node.parent || !ts23.isCallExpression(node)) {
|
|
3334
3335
|
return null;
|
|
3335
3336
|
}
|
|
3336
3337
|
const identifiedInitializer = tryParseInitializerApi(APIS_TO_CHECK, node, this.reflector, this.importedSymbolsTracker);
|
|
@@ -3338,12 +3339,12 @@ var InitializerApiUsageRule = class {
|
|
|
3338
3339
|
return null;
|
|
3339
3340
|
}
|
|
3340
3341
|
const functionName = identifiedInitializer.api.functionName + (identifiedInitializer.isRequired ? ".required" : "");
|
|
3341
|
-
if (
|
|
3342
|
+
if (ts23.isPropertyDeclaration(node.parent) && node.parent.initializer === node) {
|
|
3342
3343
|
let closestClass = node.parent;
|
|
3343
|
-
while (closestClass && !
|
|
3344
|
+
while (closestClass && !ts23.isClassDeclaration(closestClass)) {
|
|
3344
3345
|
closestClass = closestClass.parent;
|
|
3345
3346
|
}
|
|
3346
|
-
if (closestClass &&
|
|
3347
|
+
if (closestClass && ts23.isClassDeclaration(closestClass)) {
|
|
3347
3348
|
const decorators = this.reflector.getDecoratorsOfDeclaration(closestClass);
|
|
3348
3349
|
const isComponentOrDirective = decorators !== null && decorators.some((decorator) => {
|
|
3349
3350
|
var _a;
|
|
@@ -3356,8 +3357,8 @@ var InitializerApiUsageRule = class {
|
|
|
3356
3357
|
}
|
|
3357
3358
|
};
|
|
3358
3359
|
|
|
3359
|
-
// bazel-out/
|
|
3360
|
-
import
|
|
3360
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.mjs
|
|
3361
|
+
import ts24 from "typescript";
|
|
3361
3362
|
var UnusedStandaloneImportsRule = class {
|
|
3362
3363
|
templateTypeChecker;
|
|
3363
3364
|
typeCheckingConfig;
|
|
@@ -3371,7 +3372,7 @@ var UnusedStandaloneImportsRule = class {
|
|
|
3371
3372
|
return this.typeCheckingConfig.unusedStandaloneImports !== "suppress" && (this.importedSymbolsTracker.hasNamedImport(sourceFile, "Component", "@angular/core") || this.importedSymbolsTracker.hasNamespaceImport(sourceFile, "@angular/core"));
|
|
3372
3373
|
}
|
|
3373
3374
|
checkNode(node) {
|
|
3374
|
-
if (!
|
|
3375
|
+
if (!ts24.isClassDeclaration(node)) {
|
|
3375
3376
|
return null;
|
|
3376
3377
|
}
|
|
3377
3378
|
const metadata = this.templateTypeChecker.getDirectiveMetadata(node);
|
|
@@ -3387,8 +3388,8 @@ var UnusedStandaloneImportsRule = class {
|
|
|
3387
3388
|
if (unused === null) {
|
|
3388
3389
|
return null;
|
|
3389
3390
|
}
|
|
3390
|
-
const propertyAssignment = closestNode(metadata.rawImports,
|
|
3391
|
-
const category = this.typeCheckingConfig.unusedStandaloneImports === "error" ?
|
|
3391
|
+
const propertyAssignment = closestNode(metadata.rawImports, ts24.isPropertyAssignment);
|
|
3392
|
+
const category = this.typeCheckingConfig.unusedStandaloneImports === "error" ? ts24.DiagnosticCategory.Error : ts24.DiagnosticCategory.Warning;
|
|
3392
3393
|
if (unused.length === metadata.imports.length && propertyAssignment !== null) {
|
|
3393
3394
|
return makeDiagnostic(ErrorCode.UNUSED_STANDALONE_IMPORTS, propertyAssignment.name, "All imports are unused", void 0, category);
|
|
3394
3395
|
}
|
|
@@ -3428,8 +3429,8 @@ var UnusedStandaloneImportsRule = class {
|
|
|
3428
3429
|
}
|
|
3429
3430
|
let current = reference.getIdentityIn(rawImports.getSourceFile());
|
|
3430
3431
|
while (current !== null) {
|
|
3431
|
-
if (
|
|
3432
|
-
return !!((_a = current.modifiers) == null ? void 0 : _a.some((m) => m.kind ===
|
|
3432
|
+
if (ts24.isVariableStatement(current)) {
|
|
3433
|
+
return !!((_a = current.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts24.SyntaxKind.ExportKeyword));
|
|
3433
3434
|
}
|
|
3434
3435
|
current = (_b = current.parent) != null ? _b : null;
|
|
3435
3436
|
}
|
|
@@ -3448,10 +3449,10 @@ function closestNode(start, predicate) {
|
|
|
3448
3449
|
return null;
|
|
3449
3450
|
}
|
|
3450
3451
|
|
|
3451
|
-
// bazel-out/
|
|
3452
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/config.mjs
|
|
3452
3453
|
var UNUSED_STANDALONE_IMPORTS_RULE_ENABLED = true;
|
|
3453
3454
|
|
|
3454
|
-
// bazel-out/
|
|
3455
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.mjs
|
|
3455
3456
|
var SourceFileValidator = class {
|
|
3456
3457
|
rules;
|
|
3457
3458
|
constructor(reflector, importedSymbolsTracker, templateTypeChecker, typeCheckingConfig) {
|
|
@@ -3493,7 +3494,7 @@ var SourceFileValidator = class {
|
|
|
3493
3494
|
}
|
|
3494
3495
|
};
|
|
3495
3496
|
|
|
3496
|
-
// bazel-out/
|
|
3497
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/core_version.mjs
|
|
3497
3498
|
function coreHasSymbol(program, symbol) {
|
|
3498
3499
|
const checker = program.getTypeChecker();
|
|
3499
3500
|
for (const sf of program.getSourceFiles().filter(isMaybeCore)) {
|
|
@@ -3512,7 +3513,7 @@ function isMaybeCore(sf) {
|
|
|
3512
3513
|
return sf.isDeclarationFile && sf.fileName.includes("@angular/core") && sf.fileName.endsWith("index.d.ts");
|
|
3513
3514
|
}
|
|
3514
3515
|
|
|
3515
|
-
// bazel-out/
|
|
3516
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/feature_detection.mjs
|
|
3516
3517
|
import semver from "semver";
|
|
3517
3518
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
3518
3519
|
if (coreVersion === `0.0.0-${"PLACEHOLDER"}`) {
|
|
@@ -3521,7 +3522,7 @@ function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
|
3521
3522
|
return semver.satisfies(coreVersion, minVersion, { includePrerelease: true });
|
|
3522
3523
|
}
|
|
3523
3524
|
|
|
3524
|
-
// bazel-out/
|
|
3525
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
3525
3526
|
var CompilationTicketKind;
|
|
3526
3527
|
(function(CompilationTicketKind2) {
|
|
3527
3528
|
CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -3640,7 +3641,7 @@ var NgCompiler = class {
|
|
|
3640
3641
|
this.currentProgram = inputProgram;
|
|
3641
3642
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
3642
3643
|
this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
|
|
3643
|
-
const moduleResolutionCache =
|
|
3644
|
+
const moduleResolutionCache = ts25.createModuleResolutionCache(
|
|
3644
3645
|
this.adapter.getCurrentDirectory(),
|
|
3645
3646
|
this.adapter.getCanonicalFileName.bind(this.adapter)
|
|
3646
3647
|
);
|
|
@@ -3684,7 +3685,7 @@ var NgCompiler = class {
|
|
|
3684
3685
|
}
|
|
3685
3686
|
for (const clazz of classesToUpdate) {
|
|
3686
3687
|
this.compilation.traitCompiler.updateResources(clazz);
|
|
3687
|
-
if (!
|
|
3688
|
+
if (!ts25.isClassDeclaration(clazz)) {
|
|
3688
3689
|
continue;
|
|
3689
3690
|
}
|
|
3690
3691
|
this.compilation.templateTypeChecker.invalidateClass(clazz);
|
|
@@ -3838,12 +3839,12 @@ var NgCompiler = class {
|
|
|
3838
3839
|
if (compilation.supportJitMode && compilation.jitDeclarationRegistry.jitDeclarations.size > 0) {
|
|
3839
3840
|
const { jitDeclarations } = compilation.jitDeclarationRegistry;
|
|
3840
3841
|
const jitDeclarationsArray = Array.from(jitDeclarations);
|
|
3841
|
-
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) =>
|
|
3842
|
+
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) => ts25.getOriginalNode(d)));
|
|
3842
3843
|
const sourceFilesWithJit = new Set(jitDeclarationsArray.map((d) => d.getSourceFile().fileName));
|
|
3843
3844
|
before.push((ctx) => {
|
|
3844
3845
|
const reflectionHost = new TypeScriptReflectionHost(this.inputProgram.getTypeChecker());
|
|
3845
3846
|
const jitTransform = angularJitApplicationTransform(this.inputProgram, compilation.isCore, (node) => {
|
|
3846
|
-
node =
|
|
3847
|
+
node = ts25.getOriginalNode(node, ts25.isClassDeclaration);
|
|
3847
3848
|
return reflectionHost.isClass(node) && jitDeclarationOriginalNodes.has(node);
|
|
3848
3849
|
})(ctx);
|
|
3849
3850
|
return (sourceFile) => {
|
|
@@ -3896,9 +3897,9 @@ var NgCompiler = class {
|
|
|
3896
3897
|
return null;
|
|
3897
3898
|
}
|
|
3898
3899
|
const sourceFile = node.getSourceFile();
|
|
3899
|
-
const printer =
|
|
3900
|
-
const nodeText = printer.printNode(
|
|
3901
|
-
return
|
|
3900
|
+
const printer = ts25.createPrinter();
|
|
3901
|
+
const nodeText = printer.printNode(ts25.EmitHint.Unspecified, callback, sourceFile);
|
|
3902
|
+
return ts25.transpileModule(nodeText, {
|
|
3902
3903
|
compilerOptions: this.options,
|
|
3903
3904
|
fileName: sourceFile.fileName,
|
|
3904
3905
|
reportDiagnostics: false
|
|
@@ -4243,18 +4244,18 @@ function isAngularCorePackage(program) {
|
|
|
4243
4244
|
return false;
|
|
4244
4245
|
}
|
|
4245
4246
|
return r3Symbols.statements.some((stmt) => {
|
|
4246
|
-
if (!
|
|
4247
|
+
if (!ts25.isVariableStatement(stmt)) {
|
|
4247
4248
|
return false;
|
|
4248
4249
|
}
|
|
4249
|
-
const modifiers =
|
|
4250
|
-
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind ===
|
|
4250
|
+
const modifiers = ts25.getModifiers(stmt);
|
|
4251
|
+
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts25.SyntaxKind.ExportKeyword)) {
|
|
4251
4252
|
return false;
|
|
4252
4253
|
}
|
|
4253
4254
|
return stmt.declarationList.declarations.some((decl) => {
|
|
4254
|
-
if (!
|
|
4255
|
+
if (!ts25.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
|
|
4255
4256
|
return false;
|
|
4256
4257
|
}
|
|
4257
|
-
if (decl.initializer === void 0 || decl.initializer.kind !==
|
|
4258
|
+
if (decl.initializer === void 0 || decl.initializer.kind !== ts25.SyntaxKind.TrueKeyword) {
|
|
4258
4259
|
return false;
|
|
4259
4260
|
}
|
|
4260
4261
|
return true;
|
|
@@ -4268,7 +4269,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
|
|
|
4268
4269
|
var _a, _b, _c;
|
|
4269
4270
|
if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
|
|
4270
4271
|
yield makeConfigDiagnostic({
|
|
4271
|
-
category:
|
|
4272
|
+
category: ts25.DiagnosticCategory.Error,
|
|
4272
4273
|
code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
|
|
4273
4274
|
messageText: `
|
|
4274
4275
|
Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
|
|
@@ -4287,7 +4288,7 @@ https://angular.dev/tools/cli/template-typecheck
|
|
|
4287
4288
|
}
|
|
4288
4289
|
if (options.extendedDiagnostics && options.strictTemplates === false) {
|
|
4289
4290
|
yield makeConfigDiagnostic({
|
|
4290
|
-
category:
|
|
4291
|
+
category: ts25.DiagnosticCategory.Error,
|
|
4291
4292
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
|
|
4292
4293
|
messageText: `
|
|
4293
4294
|
Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
|
|
@@ -4304,7 +4305,7 @@ One of the following actions is required:
|
|
|
4304
4305
|
const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
|
|
4305
4306
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
4306
4307
|
yield makeConfigDiagnostic({
|
|
4307
|
-
category:
|
|
4308
|
+
category: ts25.DiagnosticCategory.Error,
|
|
4308
4309
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4309
4310
|
messageText: `
|
|
4310
4311
|
Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
|
|
@@ -4317,7 +4318,7 @@ ${allowedCategoryLabels.join("\n")}
|
|
|
4317
4318
|
for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
|
|
4318
4319
|
if (!SUPPORTED_DIAGNOSTIC_NAMES.has(checkName)) {
|
|
4319
4320
|
yield makeConfigDiagnostic({
|
|
4320
|
-
category:
|
|
4321
|
+
category: ts25.DiagnosticCategory.Error,
|
|
4321
4322
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
|
|
4322
4323
|
messageText: `
|
|
4323
4324
|
Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
|
|
@@ -4329,7 +4330,7 @@ ${Array.from(SUPPORTED_DIAGNOSTIC_NAMES).join("\n")}
|
|
|
4329
4330
|
}
|
|
4330
4331
|
if (!allowedCategoryLabels.includes(category)) {
|
|
4331
4332
|
yield makeConfigDiagnostic({
|
|
4332
|
-
category:
|
|
4333
|
+
category: ts25.DiagnosticCategory.Error,
|
|
4333
4334
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4334
4335
|
messageText: `
|
|
4335
4336
|
Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
|
|
@@ -4360,7 +4361,7 @@ var ReferenceGraphAdapter = class {
|
|
|
4360
4361
|
for (const { node } of references) {
|
|
4361
4362
|
let sourceFile = node.getSourceFile();
|
|
4362
4363
|
if (sourceFile === void 0) {
|
|
4363
|
-
sourceFile =
|
|
4364
|
+
sourceFile = ts25.getOriginalNode(node).getSourceFile();
|
|
4364
4365
|
}
|
|
4365
4366
|
if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
|
|
4366
4367
|
this.graph.add(source, node);
|
|
@@ -4401,8 +4402,8 @@ function versionMapFromProgram(program, driver) {
|
|
|
4401
4402
|
return versions;
|
|
4402
4403
|
}
|
|
4403
4404
|
|
|
4404
|
-
// bazel-out/
|
|
4405
|
-
import
|
|
4405
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
4406
|
+
import ts26 from "typescript";
|
|
4406
4407
|
var DelegatingCompilerHost = class {
|
|
4407
4408
|
delegate;
|
|
4408
4409
|
createHash;
|
|
@@ -4522,7 +4523,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4522
4523
|
entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
|
|
4523
4524
|
if (entryPoint === null) {
|
|
4524
4525
|
diagnostics.push({
|
|
4525
|
-
category:
|
|
4526
|
+
category: ts26.DiagnosticCategory.Error,
|
|
4526
4527
|
code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
|
|
4527
4528
|
file: void 0,
|
|
4528
4529
|
start: void 0,
|
|
@@ -4565,17 +4566,17 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4565
4566
|
return this.fileNameToModuleName !== void 0 ? this : null;
|
|
4566
4567
|
}
|
|
4567
4568
|
createCachedResolveModuleNamesFunction() {
|
|
4568
|
-
const moduleResolutionCache =
|
|
4569
|
+
const moduleResolutionCache = ts26.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
|
|
4569
4570
|
return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
|
|
4570
4571
|
return moduleNames.map((moduleName) => {
|
|
4571
|
-
const module =
|
|
4572
|
+
const module = ts26.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
|
|
4572
4573
|
return module.resolvedModule;
|
|
4573
4574
|
});
|
|
4574
4575
|
};
|
|
4575
4576
|
}
|
|
4576
4577
|
};
|
|
4577
4578
|
|
|
4578
|
-
// bazel-out/
|
|
4579
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
4579
4580
|
var NgtscProgram = class {
|
|
4580
4581
|
options;
|
|
4581
4582
|
compiler;
|
|
@@ -4597,7 +4598,7 @@ var NgtscProgram = class {
|
|
|
4597
4598
|
if (reuseProgram !== void 0) {
|
|
4598
4599
|
retagAllTsFiles(reuseProgram);
|
|
4599
4600
|
}
|
|
4600
|
-
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () =>
|
|
4601
|
+
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts27.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
|
|
4601
4602
|
perfRecorder.phase(PerfPhase.Unaccounted);
|
|
4602
4603
|
perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
|
|
4603
4604
|
this.host.postProgramCreationCleanup();
|
|
@@ -4806,37 +4807,37 @@ function mergeEmitResults(emitResults) {
|
|
|
4806
4807
|
return { diagnostics, emitSkipped, emittedFiles };
|
|
4807
4808
|
}
|
|
4808
4809
|
|
|
4809
|
-
// bazel-out/
|
|
4810
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
|
|
4810
4811
|
function createProgram({ rootNames, options, host, oldProgram }) {
|
|
4811
4812
|
return new NgtscProgram(rootNames, options, host, oldProgram);
|
|
4812
4813
|
}
|
|
4813
4814
|
|
|
4814
|
-
// bazel-out/
|
|
4815
|
-
import
|
|
4815
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4816
|
+
import ts29 from "typescript";
|
|
4816
4817
|
|
|
4817
|
-
// bazel-out/
|
|
4818
|
-
import
|
|
4818
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
|
|
4819
|
+
import ts28 from "typescript";
|
|
4819
4820
|
function createMessageDiagnostic(messageText) {
|
|
4820
4821
|
return {
|
|
4821
4822
|
file: void 0,
|
|
4822
4823
|
start: void 0,
|
|
4823
4824
|
length: void 0,
|
|
4824
|
-
category:
|
|
4825
|
+
category: ts28.DiagnosticCategory.Message,
|
|
4825
4826
|
messageText,
|
|
4826
4827
|
code: DEFAULT_ERROR_CODE,
|
|
4827
4828
|
source: SOURCE
|
|
4828
4829
|
};
|
|
4829
4830
|
}
|
|
4830
4831
|
|
|
4831
|
-
// bazel-out/
|
|
4832
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4832
4833
|
var defaultFormatHost = {
|
|
4833
|
-
getCurrentDirectory: () =>
|
|
4834
|
+
getCurrentDirectory: () => ts29.sys.getCurrentDirectory(),
|
|
4834
4835
|
getCanonicalFileName: (fileName) => fileName,
|
|
4835
|
-
getNewLine: () =>
|
|
4836
|
+
getNewLine: () => ts29.sys.newLine
|
|
4836
4837
|
};
|
|
4837
4838
|
function formatDiagnostics(diags, host = defaultFormatHost) {
|
|
4838
4839
|
if (diags && diags.length) {
|
|
4839
|
-
return diags.map((diagnostic) => replaceTsWithNgInErrors(
|
|
4840
|
+
return diags.map((diagnostic) => replaceTsWithNgInErrors(ts29.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
|
|
4840
4841
|
} else {
|
|
4841
4842
|
return "";
|
|
4842
4843
|
}
|
|
@@ -4853,7 +4854,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4853
4854
|
var _a;
|
|
4854
4855
|
try {
|
|
4855
4856
|
const fs = getFileSystem();
|
|
4856
|
-
const readConfigFile = (configFile) =>
|
|
4857
|
+
const readConfigFile = (configFile) => ts29.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
|
|
4857
4858
|
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
|
|
4858
4859
|
var _a2, _b;
|
|
4859
4860
|
const { config: config2, error: error2 } = readConfigFile(configFile);
|
|
@@ -4890,7 +4891,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4890
4891
|
...existingOptions
|
|
4891
4892
|
};
|
|
4892
4893
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4893
|
-
const { options, errors, fileNames: rootNames, projectReferences } =
|
|
4894
|
+
const { options, errors, fileNames: rootNames, projectReferences } = ts29.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
|
|
4894
4895
|
let emitFlags = EmitFlags.Default;
|
|
4895
4896
|
if (!(options["skipMetadataEmit"] || options["flatModuleOutFile"])) {
|
|
4896
4897
|
emitFlags |= EmitFlags.Metadata;
|
|
@@ -4902,7 +4903,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4902
4903
|
} catch (e) {
|
|
4903
4904
|
const errors = [
|
|
4904
4905
|
{
|
|
4905
|
-
category:
|
|
4906
|
+
category: ts29.DiagnosticCategory.Error,
|
|
4906
4907
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4907
4908
|
file: void 0,
|
|
4908
4909
|
start: void 0,
|
|
@@ -4937,7 +4938,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4937
4938
|
}
|
|
4938
4939
|
} else {
|
|
4939
4940
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4940
|
-
const { resolvedModule } =
|
|
4941
|
+
const { resolvedModule } = ts29.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts29.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
|
|
4941
4942
|
if (resolvedModule) {
|
|
4942
4943
|
return absoluteFrom(resolvedModule.resolvedFileName);
|
|
4943
4944
|
}
|
|
@@ -4947,7 +4948,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4947
4948
|
function exitCodeFromResult(diags) {
|
|
4948
4949
|
if (!diags)
|
|
4949
4950
|
return 0;
|
|
4950
|
-
if (diags.every((diag) => diag.category !==
|
|
4951
|
+
if (diags.every((diag) => diag.category !== ts29.DiagnosticCategory.Error)) {
|
|
4951
4952
|
return 0;
|
|
4952
4953
|
}
|
|
4953
4954
|
return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
|
|
@@ -4986,7 +4987,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
4986
4987
|
} catch (e) {
|
|
4987
4988
|
program = void 0;
|
|
4988
4989
|
allDiagnostics.push({
|
|
4989
|
-
category:
|
|
4990
|
+
category: ts29.DiagnosticCategory.Error,
|
|
4990
4991
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4991
4992
|
code: UNKNOWN_ERROR_CODE,
|
|
4992
4993
|
file: void 0,
|
|
@@ -5016,7 +5017,7 @@ function defaultGatherDiagnostics(program) {
|
|
|
5016
5017
|
return allDiagnostics;
|
|
5017
5018
|
}
|
|
5018
5019
|
function hasErrors(diags) {
|
|
5019
|
-
return diags.some((d) => d.category ===
|
|
5020
|
+
return diags.some((d) => d.category === ts29.DiagnosticCategory.Error);
|
|
5020
5021
|
}
|
|
5021
5022
|
|
|
5022
5023
|
export {
|
|
@@ -5061,4 +5062,4 @@ export {
|
|
|
5061
5062
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5062
5063
|
* found in the LICENSE file at https://angular.dev/license
|
|
5063
5064
|
*/
|
|
5064
|
-
//# sourceMappingURL=chunk-
|
|
5065
|
+
//# sourceMappingURL=chunk-O2OVHMWL.js.map
|