@angular/compiler-cli 18.2.2 → 18.2.3
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-J46GT65M.js → chunk-2Q6KYU3A.js} +219 -161
- package/bundles/chunk-2Q6KYU3A.js.map +6 -0
- package/bundles/{chunk-C5NJ4RJW.js → chunk-2ZTB2SIK.js} +5 -5
- package/bundles/{chunk-XNL3EK5H.js → chunk-3W345P4E.js} +7 -7
- package/bundles/{chunk-GWDW5CWS.js → chunk-7PEXPTYL.js} +12 -12
- package/bundles/{chunk-THQF5ZZE.js → chunk-ERN7RQQ7.js} +5 -5
- package/bundles/{chunk-T7RBRO42.js → chunk-FNLRHOJM.js} +121 -121
- package/bundles/{chunk-B4ZOGV3N.js → chunk-KCKRBU6N.js} +31 -31
- package/bundles/{chunk-SBDNBITT.js → chunk-LYJKWJUC.js} +3 -3
- package/bundles/{chunk-WR7TUJ7M.js → chunk-QYV344EV.js} +7 -7
- package/bundles/{chunk-XQOVJNXK.js → chunk-WUEVCLDR.js} +3 -3
- package/bundles/{chunk-5DVL3S3Z.js → chunk-WYWH4ABE.js} +43 -43
- package/bundles/index.js +12 -12
- package/bundles/linker/babel/index.js +12 -12
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js +1 -1
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +4 -4
- package/bundles/private/tooling.js +6 -6
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/linker/src/file_linker/partial_linkers/util.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/core/src/compiler.d.ts +6 -1
- package/src/ngtsc/docs/src/entities.d.ts +9 -0
- package/src/ngtsc/docs/src/extractor.d.ts +4 -1
- package/src/ngtsc/docs/src/import_extractor.d.ts +14 -0
- package/src/ngtsc/program.d.ts +4 -1
- package/bundles/chunk-J46GT65M.js.map +0 -6
- /package/bundles/{chunk-C5NJ4RJW.js.map → chunk-2ZTB2SIK.js.map} +0 -0
- /package/bundles/{chunk-XNL3EK5H.js.map → chunk-3W345P4E.js.map} +0 -0
- /package/bundles/{chunk-GWDW5CWS.js.map → chunk-7PEXPTYL.js.map} +0 -0
- /package/bundles/{chunk-THQF5ZZE.js.map → chunk-ERN7RQQ7.js.map} +0 -0
- /package/bundles/{chunk-T7RBRO42.js.map → chunk-FNLRHOJM.js.map} +0 -0
- /package/bundles/{chunk-B4ZOGV3N.js.map → chunk-KCKRBU6N.js.map} +0 -0
- /package/bundles/{chunk-SBDNBITT.js.map → chunk-LYJKWJUC.js.map} +0 -0
- /package/bundles/{chunk-WR7TUJ7M.js.map → chunk-QYV344EV.js.map} +0 -0
- /package/bundles/{chunk-XQOVJNXK.js.map → chunk-WUEVCLDR.js.map} +0 -0
- /package/bundles/{chunk-5DVL3S3Z.js.map → chunk-WYWH4ABE.js.map} +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
6
|
angularJitApplicationTransform
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7PEXPTYL.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-FNLRHOJM.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-WYWH4ABE.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-ERN7RQQ7.js";
|
|
98
98
|
import {
|
|
99
99
|
LogicalFileSystem,
|
|
100
100
|
absoluteFrom,
|
|
@@ -103,9 +103,9 @@ import {
|
|
|
103
103
|
getFileSystem,
|
|
104
104
|
join,
|
|
105
105
|
resolve
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-3W345P4E.js";
|
|
107
107
|
|
|
108
|
-
// bazel-out/
|
|
108
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
109
109
|
var DEFAULT_ERROR_CODE = 100;
|
|
110
110
|
var UNKNOWN_ERROR_CODE = 500;
|
|
111
111
|
var SOURCE = "angular";
|
|
@@ -123,7 +123,7 @@ var EmitFlags;
|
|
|
123
123
|
EmitFlags2[EmitFlags2["All"] = 31] = "All";
|
|
124
124
|
})(EmitFlags || (EmitFlags = {}));
|
|
125
125
|
|
|
126
|
-
// bazel-out/
|
|
126
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
|
|
127
127
|
import ts from "typescript";
|
|
128
128
|
var wrapHostForTest = null;
|
|
129
129
|
function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, true) }) {
|
|
@@ -133,7 +133,7 @@ function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, t
|
|
|
133
133
|
return tsHost;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
// bazel-out/
|
|
136
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/entities.mjs
|
|
137
137
|
var EntryType;
|
|
138
138
|
(function(EntryType2) {
|
|
139
139
|
EntryType2["Block"] = "block";
|
|
@@ -180,23 +180,23 @@ function isDocEntryWithSourceInfo(entry) {
|
|
|
180
180
|
return "source" in entry;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
-
// bazel-out/
|
|
184
|
-
import
|
|
183
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
|
|
184
|
+
import ts11 from "typescript";
|
|
185
185
|
|
|
186
|
-
// bazel-out/
|
|
186
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
|
|
187
187
|
import ts5 from "typescript";
|
|
188
188
|
|
|
189
|
-
// bazel-out/
|
|
189
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/filters.mjs
|
|
190
190
|
function isAngularPrivateName(name) {
|
|
191
191
|
var _a;
|
|
192
192
|
const firstChar = (_a = name[0]) != null ? _a : "";
|
|
193
193
|
return firstChar === "\u0275" || firstChar === "_";
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
// bazel-out/
|
|
196
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
|
|
197
197
|
import ts3 from "typescript";
|
|
198
198
|
|
|
199
|
-
// bazel-out/
|
|
199
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/generics_extractor.mjs
|
|
200
200
|
function extractGenerics(declaration) {
|
|
201
201
|
var _a, _b;
|
|
202
202
|
return (_b = (_a = declaration.typeParameters) == null ? void 0 : _a.map((typeParam) => {
|
|
@@ -209,7 +209,7 @@ function extractGenerics(declaration) {
|
|
|
209
209
|
})) != null ? _b : [];
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
// bazel-out/
|
|
212
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/jsdoc_extractor.mjs
|
|
213
213
|
import ts2 from "typescript";
|
|
214
214
|
var decoratorExpression = /@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf|ViewChild|ViewChildren|ContentChild|ContentChildren))/g;
|
|
215
215
|
function extractJsDocTags(node) {
|
|
@@ -253,12 +253,12 @@ function unescapeAngularDecorators(comment) {
|
|
|
253
253
|
return comment.replace(/_NG_AT_/g, "@");
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
// bazel-out/
|
|
256
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_extractor.mjs
|
|
257
257
|
function extractResolvedTypeString(node, checker) {
|
|
258
258
|
return checker.typeToString(checker.getTypeAtLocation(node));
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
// bazel-out/
|
|
261
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/function_extractor.mjs
|
|
262
262
|
var FunctionExtractor = class {
|
|
263
263
|
constructor(name, exportDeclaration, typeChecker) {
|
|
264
264
|
this.name = name;
|
|
@@ -346,7 +346,7 @@ function findImplementationOfFunction(node, typeChecker) {
|
|
|
346
346
|
return implementation;
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
// bazel-out/
|
|
349
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/internal.mjs
|
|
350
350
|
import ts4 from "typescript";
|
|
351
351
|
function isInternal(member) {
|
|
352
352
|
return extractJsDocTags(member).some((tag) => tag.name === "internal") || hasLeadingInternalComment(member);
|
|
@@ -365,7 +365,7 @@ function hasLeadingInternalComment(member) {
|
|
|
365
365
|
)) != null ? _a : false;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
// bazel-out/
|
|
368
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/class_extractor.mjs
|
|
369
369
|
var ClassExtractor = class {
|
|
370
370
|
constructor(declaration, typeChecker) {
|
|
371
371
|
this.declaration = declaration;
|
|
@@ -380,7 +380,9 @@ var ClassExtractor = class {
|
|
|
380
380
|
generics: extractGenerics(this.declaration),
|
|
381
381
|
description: extractJsDocDescription(this.declaration),
|
|
382
382
|
jsdocTags: extractJsDocTags(this.declaration),
|
|
383
|
-
rawComment: extractRawJsDoc(this.declaration)
|
|
383
|
+
rawComment: extractRawJsDoc(this.declaration),
|
|
384
|
+
extends: this.extractInheritance(this.declaration),
|
|
385
|
+
implements: this.extractInterfaceConformance(this.declaration)
|
|
384
386
|
};
|
|
385
387
|
}
|
|
386
388
|
extractAllClassMembers() {
|
|
@@ -440,6 +442,26 @@ var ClassExtractor = class {
|
|
|
440
442
|
memberType: ts5.isGetAccessor(accessor) ? MemberType.Getter : MemberType.Setter
|
|
441
443
|
};
|
|
442
444
|
}
|
|
445
|
+
extractInheritance(declaration) {
|
|
446
|
+
if (!declaration.heritageClauses) {
|
|
447
|
+
return void 0;
|
|
448
|
+
}
|
|
449
|
+
for (const clause of declaration.heritageClauses) {
|
|
450
|
+
if (clause.token === ts5.SyntaxKind.ExtendsKeyword) {
|
|
451
|
+
const types = clause.types;
|
|
452
|
+
if (types.length > 0) {
|
|
453
|
+
const baseClass = types[0];
|
|
454
|
+
return baseClass.getText();
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
return void 0;
|
|
459
|
+
}
|
|
460
|
+
extractInterfaceConformance(declaration) {
|
|
461
|
+
var _a, _b;
|
|
462
|
+
const implementClause = (_a = declaration.heritageClauses) == null ? void 0 : _a.find((clause) => clause.token === ts5.SyntaxKind.ImplementsKeyword);
|
|
463
|
+
return (_b = implementClause == null ? void 0 : implementClause.types.map((m) => m.getText())) != null ? _b : [];
|
|
464
|
+
}
|
|
443
465
|
getMemberTags(member) {
|
|
444
466
|
var _a;
|
|
445
467
|
const tags = this.getMemberTagsFromModifiers((_a = member.modifiers) != null ? _a : []);
|
|
@@ -631,7 +653,7 @@ function extractInterface(declaration, typeChecker) {
|
|
|
631
653
|
return extractor.extract();
|
|
632
654
|
}
|
|
633
655
|
|
|
634
|
-
// bazel-out/
|
|
656
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/constant_extractor.mjs
|
|
635
657
|
import ts6 from "typescript";
|
|
636
658
|
var LITERAL_AS_ENUM_TAG = "object-literal-as-enum";
|
|
637
659
|
function extractConstant(declaration, typeChecker) {
|
|
@@ -689,7 +711,7 @@ function extractLiteralPropertiesAsEnumMembers(declaration) {
|
|
|
689
711
|
});
|
|
690
712
|
}
|
|
691
713
|
|
|
692
|
-
// bazel-out/
|
|
714
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/decorator_extractor.mjs
|
|
693
715
|
import ts7 from "typescript";
|
|
694
716
|
function extractorDecorator(declaration, typeChecker) {
|
|
695
717
|
const documentedNode = getDecoratorJsDocNode(declaration);
|
|
@@ -762,7 +784,7 @@ function getDecoratorJsDocNode(declaration) {
|
|
|
762
784
|
return callSignature;
|
|
763
785
|
}
|
|
764
786
|
|
|
765
|
-
// bazel-out/
|
|
787
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/enum_extractor.mjs
|
|
766
788
|
import ts8 from "typescript";
|
|
767
789
|
function extractEnum(declaration, typeChecker) {
|
|
768
790
|
return {
|
|
@@ -793,7 +815,7 @@ function getEnumMemberValue(memberNode) {
|
|
|
793
815
|
return (_a = literal == null ? void 0 : literal.getText()) != null ? _a : "";
|
|
794
816
|
}
|
|
795
817
|
|
|
796
|
-
// bazel-out/
|
|
818
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/initializer_api_function_extractor.mjs
|
|
797
819
|
import ts9 from "typescript";
|
|
798
820
|
var initializerApiTag = "initializerApiFunction";
|
|
799
821
|
function isInitializerApiFunction(node, typeChecker) {
|
|
@@ -902,7 +924,7 @@ function extractFunctionWithOverloads(name, type, typeChecker) {
|
|
|
902
924
|
};
|
|
903
925
|
}
|
|
904
926
|
|
|
905
|
-
// bazel-out/
|
|
927
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/type_alias_extractor.mjs
|
|
906
928
|
function extractTypeAlias(declaration) {
|
|
907
929
|
return {
|
|
908
930
|
name: declaration.name.getText(),
|
|
@@ -914,7 +936,32 @@ function extractTypeAlias(declaration) {
|
|
|
914
936
|
};
|
|
915
937
|
}
|
|
916
938
|
|
|
917
|
-
// bazel-out/
|
|
939
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/import_extractor.mjs
|
|
940
|
+
import ts10 from "typescript";
|
|
941
|
+
function getImportedSymbols(sourceFile) {
|
|
942
|
+
const importSpecifiers = /* @__PURE__ */ new Map();
|
|
943
|
+
function visit(node) {
|
|
944
|
+
var _a;
|
|
945
|
+
if (ts10.isImportDeclaration(node)) {
|
|
946
|
+
let moduleSpecifier = node.moduleSpecifier.getText(sourceFile).replace(/['"]/g, "");
|
|
947
|
+
if (moduleSpecifier.startsWith("@angular/")) {
|
|
948
|
+
const namedBindings = (_a = node.importClause) == null ? void 0 : _a.namedBindings;
|
|
949
|
+
if (namedBindings && ts10.isNamedImports(namedBindings)) {
|
|
950
|
+
namedBindings.elements.forEach((importSpecifier) => {
|
|
951
|
+
const importName = importSpecifier.name.text;
|
|
952
|
+
const importAlias = importSpecifier.propertyName ? importSpecifier.propertyName.text : void 0;
|
|
953
|
+
importSpecifiers.set(importAlias != null ? importAlias : importName, moduleSpecifier);
|
|
954
|
+
});
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
ts10.forEachChild(node, visit);
|
|
959
|
+
}
|
|
960
|
+
visit(sourceFile);
|
|
961
|
+
return importSpecifiers;
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/docs/src/extractor.mjs
|
|
918
965
|
var DocsExtractor = class {
|
|
919
966
|
constructor(typeChecker, metadataReader) {
|
|
920
967
|
this.typeChecker = typeChecker;
|
|
@@ -922,6 +969,7 @@ var DocsExtractor = class {
|
|
|
922
969
|
}
|
|
923
970
|
extractAll(sourceFile, rootDir) {
|
|
924
971
|
const entries = [];
|
|
972
|
+
const symbols = /* @__PURE__ */ new Map();
|
|
925
973
|
const exportedDeclarations = this.getExportedDeclarations(sourceFile);
|
|
926
974
|
for (const [exportName, node] of exportedDeclarations) {
|
|
927
975
|
if (isAngularPrivateName(exportName)) {
|
|
@@ -930,15 +978,25 @@ var DocsExtractor = class {
|
|
|
930
978
|
const entry = this.extractDeclaration(node);
|
|
931
979
|
if (entry && !isIgnoredDocEntry(entry)) {
|
|
932
980
|
const realSourceFile = node.getSourceFile();
|
|
981
|
+
const importedSymbols = getImportedSymbols(realSourceFile);
|
|
982
|
+
importedSymbols.forEach((moduleName, symbolName) => {
|
|
983
|
+
if (symbolName.startsWith("\u0275")) {
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
if (symbols.has(symbolName) && symbols.get(symbolName) !== moduleName) {
|
|
987
|
+
throw new Error(`Ambigous symbol \`${symbolName}\` exported by both ${symbols.get(symbolName)} & ${moduleName}`);
|
|
988
|
+
}
|
|
989
|
+
symbols.set(symbolName, moduleName);
|
|
990
|
+
});
|
|
933
991
|
entry.source = {
|
|
934
992
|
filePath: getRelativeFilePath(realSourceFile, rootDir),
|
|
935
|
-
startLine:
|
|
936
|
-
endLine:
|
|
993
|
+
startLine: ts11.getLineAndCharacterOfPosition(realSourceFile, node.getStart()).line + 1,
|
|
994
|
+
endLine: ts11.getLineAndCharacterOfPosition(realSourceFile, node.getEnd()).line + 1
|
|
937
995
|
};
|
|
938
996
|
entries.push({ ...entry, name: exportName });
|
|
939
997
|
}
|
|
940
998
|
}
|
|
941
|
-
return entries;
|
|
999
|
+
return { entries, symbols };
|
|
942
1000
|
}
|
|
943
1001
|
extractDeclaration(node) {
|
|
944
1002
|
if (isNamedClassDeclaration(node)) {
|
|
@@ -947,20 +1005,20 @@ var DocsExtractor = class {
|
|
|
947
1005
|
if (isInitializerApiFunction(node, this.typeChecker)) {
|
|
948
1006
|
return extractInitializerApiFunction(node, this.typeChecker);
|
|
949
1007
|
}
|
|
950
|
-
if (
|
|
1008
|
+
if (ts11.isInterfaceDeclaration(node) && !isIgnoredInterface(node)) {
|
|
951
1009
|
return extractInterface(node, this.typeChecker);
|
|
952
1010
|
}
|
|
953
|
-
if (
|
|
1011
|
+
if (ts11.isFunctionDeclaration(node)) {
|
|
954
1012
|
const functionExtractor = new FunctionExtractor(node.name.getText(), node, this.typeChecker);
|
|
955
1013
|
return functionExtractor.extract();
|
|
956
1014
|
}
|
|
957
|
-
if (
|
|
1015
|
+
if (ts11.isVariableDeclaration(node) && !isSyntheticAngularConstant(node)) {
|
|
958
1016
|
return isDecoratorDeclaration(node) ? extractorDecorator(node, this.typeChecker) : extractConstant(node, this.typeChecker);
|
|
959
1017
|
}
|
|
960
|
-
if (
|
|
1018
|
+
if (ts11.isTypeAliasDeclaration(node)) {
|
|
961
1019
|
return extractTypeAlias(node);
|
|
962
1020
|
}
|
|
963
|
-
if (
|
|
1021
|
+
if (ts11.isEnumDeclaration(node)) {
|
|
964
1022
|
return extractEnum(node, this.typeChecker);
|
|
965
1023
|
}
|
|
966
1024
|
return null;
|
|
@@ -989,11 +1047,11 @@ function getRelativeFilePath(sourceFile, rootDir) {
|
|
|
989
1047
|
return relativePath;
|
|
990
1048
|
}
|
|
991
1049
|
|
|
992
|
-
// bazel-out/
|
|
1050
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
993
1051
|
import { HtmlParser, MessageBundle } from "@angular/compiler";
|
|
994
|
-
import
|
|
1052
|
+
import ts25 from "typescript";
|
|
995
1053
|
|
|
996
|
-
// bazel-out/
|
|
1054
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
|
|
997
1055
|
import { Xliff, Xliff2, Xmb } from "@angular/compiler";
|
|
998
1056
|
import * as path from "path";
|
|
999
1057
|
function i18nGetExtension(formatName) {
|
|
@@ -1046,10 +1104,10 @@ function getPathNormalizer(basePath) {
|
|
|
1046
1104
|
};
|
|
1047
1105
|
}
|
|
1048
1106
|
|
|
1049
|
-
// bazel-out/
|
|
1050
|
-
import
|
|
1107
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1108
|
+
import ts12 from "typescript";
|
|
1051
1109
|
|
|
1052
|
-
// bazel-out/
|
|
1110
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
|
|
1053
1111
|
function toNumbers(value) {
|
|
1054
1112
|
const suffixIndex = value.lastIndexOf("-");
|
|
1055
1113
|
return value.slice(0, suffixIndex === -1 ? value.length : suffixIndex).split(".").map((segment) => {
|
|
@@ -1084,10 +1142,10 @@ function compareVersions(v1, v2) {
|
|
|
1084
1142
|
return compareNumbers(toNumbers(v1), toNumbers(v2));
|
|
1085
1143
|
}
|
|
1086
1144
|
|
|
1087
|
-
// bazel-out/
|
|
1145
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1088
1146
|
var MIN_TS_VERSION = "5.4.0";
|
|
1089
1147
|
var MAX_TS_VERSION = "5.6.0";
|
|
1090
|
-
var tsVersion =
|
|
1148
|
+
var tsVersion = ts12.version;
|
|
1091
1149
|
function checkVersion(version, minVersion, maxVersion) {
|
|
1092
1150
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
|
1093
1151
|
throw new Error(`The Angular Compiler requires TypeScript >=${minVersion} and <${maxVersion} but ${version} was found instead.`);
|
|
@@ -1097,11 +1155,11 @@ function verifySupportedTypeScriptVersion() {
|
|
|
1097
1155
|
checkVersion(tsVersion, MIN_TS_VERSION, MAX_TS_VERSION);
|
|
1098
1156
|
}
|
|
1099
1157
|
|
|
1100
|
-
// bazel-out/
|
|
1158
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
1101
1159
|
import { R3Identifiers } from "@angular/compiler";
|
|
1102
|
-
import
|
|
1160
|
+
import ts23 from "typescript";
|
|
1103
1161
|
|
|
1104
|
-
// bazel-out/
|
|
1162
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
1105
1163
|
var CycleAnalyzer = class {
|
|
1106
1164
|
constructor(importGraph) {
|
|
1107
1165
|
this.importGraph = importGraph;
|
|
@@ -1172,8 +1230,8 @@ var Cycle = class {
|
|
|
1172
1230
|
}
|
|
1173
1231
|
};
|
|
1174
1232
|
|
|
1175
|
-
// bazel-out/
|
|
1176
|
-
import
|
|
1233
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
|
|
1234
|
+
import ts13 from "typescript";
|
|
1177
1235
|
var ImportGraph = class {
|
|
1178
1236
|
constructor(checker, perf) {
|
|
1179
1237
|
this.checker = checker;
|
|
@@ -1217,10 +1275,10 @@ var ImportGraph = class {
|
|
|
1217
1275
|
return this.perf.inPhase(PerfPhase.CycleDetection, () => {
|
|
1218
1276
|
const imports = /* @__PURE__ */ new Set();
|
|
1219
1277
|
for (const stmt of sf.statements) {
|
|
1220
|
-
if (!
|
|
1278
|
+
if (!ts13.isImportDeclaration(stmt) && !ts13.isExportDeclaration(stmt) || stmt.moduleSpecifier === void 0) {
|
|
1221
1279
|
continue;
|
|
1222
1280
|
}
|
|
1223
|
-
if (
|
|
1281
|
+
if (ts13.isImportDeclaration(stmt) && stmt.importClause !== void 0 && isTypeOnlyImportClause(stmt.importClause)) {
|
|
1224
1282
|
continue;
|
|
1225
1283
|
}
|
|
1226
1284
|
const symbol = this.checker.getSymbolAtLocation(stmt.moduleSpecifier);
|
|
@@ -1228,7 +1286,7 @@ var ImportGraph = class {
|
|
|
1228
1286
|
continue;
|
|
1229
1287
|
}
|
|
1230
1288
|
const moduleFile = symbol.valueDeclaration;
|
|
1231
|
-
if (
|
|
1289
|
+
if (ts13.isSourceFile(moduleFile) && isLocalFile(moduleFile)) {
|
|
1232
1290
|
imports.add(moduleFile);
|
|
1233
1291
|
}
|
|
1234
1292
|
}
|
|
@@ -1243,7 +1301,7 @@ function isTypeOnlyImportClause(node) {
|
|
|
1243
1301
|
if (node.isTypeOnly) {
|
|
1244
1302
|
return true;
|
|
1245
1303
|
}
|
|
1246
|
-
if (node.namedBindings !== void 0 &&
|
|
1304
|
+
if (node.namedBindings !== void 0 && ts13.isNamedImports(node.namedBindings) && node.namedBindings.elements.every((specifier) => specifier.isTypeOnly)) {
|
|
1247
1305
|
return true;
|
|
1248
1306
|
}
|
|
1249
1307
|
return false;
|
|
@@ -1264,8 +1322,8 @@ var Found = class {
|
|
|
1264
1322
|
}
|
|
1265
1323
|
};
|
|
1266
1324
|
|
|
1267
|
-
// bazel-out/
|
|
1268
|
-
import
|
|
1325
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
|
|
1326
|
+
import ts14 from "typescript";
|
|
1269
1327
|
var FlatIndexGenerator = class {
|
|
1270
1328
|
constructor(entryPoint, relativeFlatIndexPath, moduleName) {
|
|
1271
1329
|
this.entryPoint = entryPoint;
|
|
@@ -1281,7 +1339,7 @@ var FlatIndexGenerator = class {
|
|
|
1281
1339
|
|
|
1282
1340
|
export * from '${relativeEntryPoint}';
|
|
1283
1341
|
`;
|
|
1284
|
-
const genFile =
|
|
1342
|
+
const genFile = ts14.createSourceFile(this.flatIndexPath, contents, ts14.ScriptTarget.ES2015, true, ts14.ScriptKind.TS);
|
|
1285
1343
|
if (this.moduleName !== null) {
|
|
1286
1344
|
genFile.moduleName = this.moduleName;
|
|
1287
1345
|
}
|
|
@@ -1289,7 +1347,7 @@ export * from '${relativeEntryPoint}';
|
|
|
1289
1347
|
}
|
|
1290
1348
|
};
|
|
1291
1349
|
|
|
1292
|
-
// bazel-out/
|
|
1350
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
|
|
1293
1351
|
function findFlatIndexEntryPoint(rootFiles) {
|
|
1294
1352
|
const tsFiles = rootFiles.filter((file) => isNonDeclarationTsPath(file));
|
|
1295
1353
|
let resolvedEntryPoint = null;
|
|
@@ -1305,8 +1363,8 @@ function findFlatIndexEntryPoint(rootFiles) {
|
|
|
1305
1363
|
return resolvedEntryPoint;
|
|
1306
1364
|
}
|
|
1307
1365
|
|
|
1308
|
-
// bazel-out/
|
|
1309
|
-
import
|
|
1366
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
|
|
1367
|
+
import ts15 from "typescript";
|
|
1310
1368
|
function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
1311
1369
|
const diagnostics = [];
|
|
1312
1370
|
const topLevelExports = /* @__PURE__ */ new Set();
|
|
@@ -1316,7 +1374,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1316
1374
|
}
|
|
1317
1375
|
const exportedSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
1318
1376
|
exportedSymbols.forEach((symbol) => {
|
|
1319
|
-
if (symbol.flags &
|
|
1377
|
+
if (symbol.flags & ts15.SymbolFlags.Alias) {
|
|
1320
1378
|
symbol = checker.getAliasedSymbol(symbol);
|
|
1321
1379
|
}
|
|
1322
1380
|
const decl = symbol.valueDeclaration;
|
|
@@ -1340,7 +1398,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1340
1398
|
visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
|
|
1341
1399
|
}
|
|
1342
1400
|
const diagnostic = {
|
|
1343
|
-
category:
|
|
1401
|
+
category: ts15.DiagnosticCategory.Error,
|
|
1344
1402
|
code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
|
|
1345
1403
|
file: transitiveReference.getSourceFile(),
|
|
1346
1404
|
...getPosOfDeclaration(transitiveReference),
|
|
@@ -1360,7 +1418,7 @@ function getPosOfDeclaration(decl) {
|
|
|
1360
1418
|
};
|
|
1361
1419
|
}
|
|
1362
1420
|
function getIdentifierOfDeclaration(decl) {
|
|
1363
|
-
if ((
|
|
1421
|
+
if ((ts15.isClassDeclaration(decl) || ts15.isVariableDeclaration(decl) || ts15.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts15.isIdentifier(decl.name)) {
|
|
1364
1422
|
return decl.name;
|
|
1365
1423
|
} else {
|
|
1366
1424
|
return null;
|
|
@@ -1372,20 +1430,20 @@ function getNameOfDeclaration(decl) {
|
|
|
1372
1430
|
}
|
|
1373
1431
|
function getDescriptorOfDeclaration(decl) {
|
|
1374
1432
|
switch (decl.kind) {
|
|
1375
|
-
case
|
|
1433
|
+
case ts15.SyntaxKind.ClassDeclaration:
|
|
1376
1434
|
return "class";
|
|
1377
|
-
case
|
|
1435
|
+
case ts15.SyntaxKind.FunctionDeclaration:
|
|
1378
1436
|
return "function";
|
|
1379
|
-
case
|
|
1437
|
+
case ts15.SyntaxKind.VariableDeclaration:
|
|
1380
1438
|
return "variable";
|
|
1381
|
-
case
|
|
1439
|
+
case ts15.SyntaxKind.EnumDeclaration:
|
|
1382
1440
|
return "enum";
|
|
1383
1441
|
default:
|
|
1384
1442
|
return "declaration";
|
|
1385
1443
|
}
|
|
1386
1444
|
}
|
|
1387
1445
|
|
|
1388
|
-
// bazel-out/
|
|
1446
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
|
|
1389
1447
|
var ReferenceGraph = class {
|
|
1390
1448
|
constructor() {
|
|
1391
1449
|
this.references = /* @__PURE__ */ new Map();
|
|
@@ -1439,7 +1497,7 @@ var ReferenceGraph = class {
|
|
|
1439
1497
|
}
|
|
1440
1498
|
};
|
|
1441
1499
|
|
|
1442
|
-
// bazel-out/
|
|
1500
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
|
|
1443
1501
|
var FileDependencyGraph = class {
|
|
1444
1502
|
constructor() {
|
|
1445
1503
|
this.nodes = /* @__PURE__ */ new Map();
|
|
@@ -1506,7 +1564,7 @@ function isLogicallyChanged(sf, node, changedTsPaths, deletedTsPaths, changedRes
|
|
|
1506
1564
|
return false;
|
|
1507
1565
|
}
|
|
1508
1566
|
|
|
1509
|
-
// bazel-out/
|
|
1567
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
|
|
1510
1568
|
var IncrementalStateKind;
|
|
1511
1569
|
(function(IncrementalStateKind2) {
|
|
1512
1570
|
IncrementalStateKind2[IncrementalStateKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -1514,7 +1572,7 @@ var IncrementalStateKind;
|
|
|
1514
1572
|
IncrementalStateKind2[IncrementalStateKind2["Analyzed"] = 2] = "Analyzed";
|
|
1515
1573
|
})(IncrementalStateKind || (IncrementalStateKind = {}));
|
|
1516
1574
|
|
|
1517
|
-
// bazel-out/
|
|
1575
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
|
|
1518
1576
|
var PhaseKind;
|
|
1519
1577
|
(function(PhaseKind2) {
|
|
1520
1578
|
PhaseKind2[PhaseKind2["Analysis"] = 0] = "Analysis";
|
|
@@ -1715,7 +1773,7 @@ function toOriginalSourceFile(sf) {
|
|
|
1715
1773
|
}
|
|
1716
1774
|
}
|
|
1717
1775
|
|
|
1718
|
-
// bazel-out/
|
|
1776
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
|
|
1719
1777
|
var TrackedIncrementalBuildStrategy = class {
|
|
1720
1778
|
constructor() {
|
|
1721
1779
|
this.state = null;
|
|
@@ -1751,7 +1809,7 @@ var PatchedProgramIncrementalBuildStrategy = class {
|
|
|
1751
1809
|
};
|
|
1752
1810
|
var SYM_INCREMENTAL_STATE = Symbol("NgIncrementalState");
|
|
1753
1811
|
|
|
1754
|
-
// bazel-out/
|
|
1812
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
|
|
1755
1813
|
var IdentifierKind;
|
|
1756
1814
|
(function(IdentifierKind2) {
|
|
1757
1815
|
IdentifierKind2[IdentifierKind2["Property"] = 0] = "Property";
|
|
@@ -1770,7 +1828,7 @@ var AbsoluteSourceSpan = class {
|
|
|
1770
1828
|
}
|
|
1771
1829
|
};
|
|
1772
1830
|
|
|
1773
|
-
// bazel-out/
|
|
1831
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
|
|
1774
1832
|
var IndexingContext = class {
|
|
1775
1833
|
constructor() {
|
|
1776
1834
|
this.components = /* @__PURE__ */ new Set();
|
|
@@ -1780,10 +1838,10 @@ var IndexingContext = class {
|
|
|
1780
1838
|
}
|
|
1781
1839
|
};
|
|
1782
1840
|
|
|
1783
|
-
// bazel-out/
|
|
1841
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
1784
1842
|
import { ParseSourceFile } from "@angular/compiler";
|
|
1785
1843
|
|
|
1786
|
-
// bazel-out/
|
|
1844
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
|
|
1787
1845
|
import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstBoundDeferredTrigger, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate, TmplAstVariable } from "@angular/compiler";
|
|
1788
1846
|
var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
1789
1847
|
constructor(expressionStr, absoluteOffset, boundTemplate, targetToIdentifier) {
|
|
@@ -2078,7 +2136,7 @@ function getTemplateIdentifiers(boundTemplate) {
|
|
|
2078
2136
|
return { identifiers: visitor.identifiers, errors: visitor.errors };
|
|
2079
2137
|
}
|
|
2080
2138
|
|
|
2081
|
-
// bazel-out/
|
|
2139
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
2082
2140
|
function generateAnalysis(context) {
|
|
2083
2141
|
const analysis = /* @__PURE__ */ new Map();
|
|
2084
2142
|
context.components.forEach(({ declaration, selector, boundTemplate, templateMeta }) => {
|
|
@@ -2114,7 +2172,7 @@ function generateAnalysis(context) {
|
|
|
2114
2172
|
return analysis;
|
|
2115
2173
|
}
|
|
2116
2174
|
|
|
2117
|
-
// bazel-out/
|
|
2175
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.mjs
|
|
2118
2176
|
var NgModuleIndexImpl = class {
|
|
2119
2177
|
constructor(metaReader, localReader) {
|
|
2120
2178
|
this.metaReader = metaReader;
|
|
@@ -2203,8 +2261,8 @@ var NgModuleIndexImpl = class {
|
|
|
2203
2261
|
}
|
|
2204
2262
|
};
|
|
2205
2263
|
|
|
2206
|
-
// bazel-out/
|
|
2207
|
-
import
|
|
2264
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
|
|
2265
|
+
import ts16 from "typescript";
|
|
2208
2266
|
var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
|
|
2209
2267
|
var RESOURCE_MARKER = ".$ngresource$";
|
|
2210
2268
|
var RESOURCE_MARKER_TS = RESOURCE_MARKER + ".ts";
|
|
@@ -2318,7 +2376,7 @@ var AdapterResourceLoader = class {
|
|
|
2318
2376
|
return this.adapter.rootDirs.map((rootDir) => join(rootDir, segment));
|
|
2319
2377
|
}
|
|
2320
2378
|
getResolvedCandidateLocations(url, fromFile) {
|
|
2321
|
-
const failedLookup =
|
|
2379
|
+
const failedLookup = ts16.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
|
|
2322
2380
|
if (failedLookup.failedLookupLocations === void 0) {
|
|
2323
2381
|
throw new Error(`Internal error: expected to find failedLookupLocations during resolution of resource '${url}' in context of ${fromFile}`);
|
|
2324
2382
|
}
|
|
@@ -2353,7 +2411,7 @@ function createLookupResolutionHost(adapter) {
|
|
|
2353
2411
|
};
|
|
2354
2412
|
}
|
|
2355
2413
|
|
|
2356
|
-
// bazel-out/
|
|
2414
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/standalone.mjs
|
|
2357
2415
|
var StandaloneComponentScopeReader = class {
|
|
2358
2416
|
constructor(metaReader, localModuleReader, dtsModuleReader) {
|
|
2359
2417
|
this.metaReader = metaReader;
|
|
@@ -2449,11 +2507,11 @@ var StandaloneComponentScopeReader = class {
|
|
|
2449
2507
|
}
|
|
2450
2508
|
};
|
|
2451
2509
|
|
|
2452
|
-
// bazel-out/
|
|
2510
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
2453
2511
|
import { ASTWithSource as ASTWithSource3, BindingType, Interpolation, PropertyRead as PropertyRead2, TmplAstBoundAttribute } from "@angular/compiler";
|
|
2454
2512
|
|
|
2455
|
-
// bazel-out/
|
|
2456
|
-
import
|
|
2513
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.mjs
|
|
2514
|
+
import ts17 from "typescript";
|
|
2457
2515
|
var SIGNAL_FNS = /* @__PURE__ */ new Set([
|
|
2458
2516
|
"WritableSignal",
|
|
2459
2517
|
"Signal",
|
|
@@ -2468,11 +2526,11 @@ function isSignalSymbol(symbol) {
|
|
|
2468
2526
|
const declarations = symbol.getDeclarations();
|
|
2469
2527
|
return declarations !== void 0 && declarations.some((decl) => {
|
|
2470
2528
|
const fileName = decl.getSourceFile().fileName;
|
|
2471
|
-
return (
|
|
2529
|
+
return (ts17.isInterfaceDeclaration(decl) || ts17.isTypeAliasDeclaration(decl)) && SIGNAL_FNS.has(decl.name.text) && (fileName.includes("@angular/core") || fileName.includes("angular2/rc/packages/core"));
|
|
2472
2530
|
});
|
|
2473
2531
|
}
|
|
2474
2532
|
|
|
2475
|
-
// bazel-out/
|
|
2533
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
|
|
2476
2534
|
import { ASTWithSource as ASTWithSource2, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
|
|
2477
2535
|
var TemplateCheckWithVisitor = class {
|
|
2478
2536
|
constructor() {
|
|
@@ -2606,7 +2664,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
|
|
|
2606
2664
|
}
|
|
2607
2665
|
};
|
|
2608
2666
|
|
|
2609
|
-
// bazel-out/
|
|
2667
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
2610
2668
|
var SIGNAL_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["set", "update", "asReadonly"]);
|
|
2611
2669
|
var FUNCTION_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["name", "length", "prototype"]);
|
|
2612
2670
|
var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
@@ -2658,7 +2716,7 @@ var factory = {
|
|
|
2658
2716
|
create: () => new InterpolatedSignalCheck()
|
|
2659
2717
|
};
|
|
2660
2718
|
|
|
2661
|
-
// bazel-out/
|
|
2719
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
2662
2720
|
import { TmplAstBoundEvent } from "@angular/compiler";
|
|
2663
2721
|
var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
|
|
2664
2722
|
constructor() {
|
|
@@ -2684,7 +2742,7 @@ var factory2 = {
|
|
|
2684
2742
|
create: () => new InvalidBananaInBoxCheck()
|
|
2685
2743
|
};
|
|
2686
2744
|
|
|
2687
|
-
// bazel-out/
|
|
2745
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
|
|
2688
2746
|
import { TmplAstTemplate as TmplAstTemplate2 } from "@angular/compiler";
|
|
2689
2747
|
var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
|
|
2690
2748
|
["ngIf", { directive: "NgIf", builtIn: "@if" }],
|
|
@@ -2729,7 +2787,7 @@ var factory3 = {
|
|
|
2729
2787
|
}
|
|
2730
2788
|
};
|
|
2731
2789
|
|
|
2732
|
-
// bazel-out/
|
|
2790
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
|
|
2733
2791
|
import { TmplAstTemplate as TmplAstTemplate3 } from "@angular/compiler";
|
|
2734
2792
|
var MissingNgForOfLetCheck = class extends TemplateCheckWithVisitor {
|
|
2735
2793
|
constructor() {
|
|
@@ -2762,9 +2820,9 @@ var factory4 = {
|
|
|
2762
2820
|
create: () => new MissingNgForOfLetCheck()
|
|
2763
2821
|
};
|
|
2764
2822
|
|
|
2765
|
-
// bazel-out/
|
|
2823
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
|
|
2766
2824
|
import { Binary } from "@angular/compiler";
|
|
2767
|
-
import
|
|
2825
|
+
import ts18 from "typescript";
|
|
2768
2826
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2769
2827
|
constructor() {
|
|
2770
2828
|
super(...arguments);
|
|
@@ -2779,7 +2837,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2779
2837
|
return [];
|
|
2780
2838
|
}
|
|
2781
2839
|
const typeLeft = symbolLeft.tsType;
|
|
2782
|
-
if (typeLeft.flags & (
|
|
2840
|
+
if (typeLeft.flags & (ts18.TypeFlags.Any | ts18.TypeFlags.Unknown)) {
|
|
2783
2841
|
return [];
|
|
2784
2842
|
}
|
|
2785
2843
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -2808,9 +2866,9 @@ var factory5 = {
|
|
|
2808
2866
|
}
|
|
2809
2867
|
};
|
|
2810
2868
|
|
|
2811
|
-
// bazel-out/
|
|
2869
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
|
|
2812
2870
|
import { SafeCall, SafeKeyedRead, SafePropertyRead } from "@angular/compiler";
|
|
2813
|
-
import
|
|
2871
|
+
import ts19 from "typescript";
|
|
2814
2872
|
var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2815
2873
|
constructor() {
|
|
2816
2874
|
super(...arguments);
|
|
@@ -2825,7 +2883,7 @@ var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2825
2883
|
return [];
|
|
2826
2884
|
}
|
|
2827
2885
|
const typeLeft = symbolLeft.tsType;
|
|
2828
|
-
if (typeLeft.flags & (
|
|
2886
|
+
if (typeLeft.flags & (ts19.TypeFlags.Any | ts19.TypeFlags.Unknown)) {
|
|
2829
2887
|
return [];
|
|
2830
2888
|
}
|
|
2831
2889
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -2855,7 +2913,7 @@ var factory6 = {
|
|
|
2855
2913
|
}
|
|
2856
2914
|
};
|
|
2857
2915
|
|
|
2858
|
-
// bazel-out/
|
|
2916
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.mjs
|
|
2859
2917
|
import { TmplAstBoundAttribute as TmplAstBoundAttribute2 } from "@angular/compiler";
|
|
2860
2918
|
var STYLE_SUFFIXES = ["px", "%", "em"];
|
|
2861
2919
|
var SuffixNotSupportedCheck = class extends TemplateCheckWithVisitor {
|
|
@@ -2879,7 +2937,7 @@ var factory7 = {
|
|
|
2879
2937
|
create: () => new SuffixNotSupportedCheck()
|
|
2880
2938
|
};
|
|
2881
2939
|
|
|
2882
|
-
// bazel-out/
|
|
2940
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
|
|
2883
2941
|
import { TmplAstTextAttribute } from "@angular/compiler";
|
|
2884
2942
|
var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
|
|
2885
2943
|
constructor() {
|
|
@@ -2918,7 +2976,7 @@ var factory8 = {
|
|
|
2918
2976
|
create: () => new TextAttributeNotBindingSpec()
|
|
2919
2977
|
};
|
|
2920
2978
|
|
|
2921
|
-
// bazel-out/
|
|
2979
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.mjs
|
|
2922
2980
|
import { ASTWithSource as ASTWithSource4, Call, Chain, Conditional, ParsedEventType, PropertyRead as PropertyRead3, SafeCall as SafeCall2, SafePropertyRead as SafePropertyRead2, TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
|
|
2923
2981
|
var UninvokedFunctionInEventBindingSpec = class extends TemplateCheckWithVisitor {
|
|
2924
2982
|
constructor() {
|
|
@@ -2970,7 +3028,7 @@ var factory9 = {
|
|
|
2970
3028
|
create: () => new UninvokedFunctionInEventBindingSpec()
|
|
2971
3029
|
};
|
|
2972
3030
|
|
|
2973
|
-
// bazel-out/
|
|
3031
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.mjs
|
|
2974
3032
|
import { AST, ASTWithSource as ASTWithSource5, TmplAstLetDeclaration } from "@angular/compiler";
|
|
2975
3033
|
var UnusedLetDeclarationCheck = class extends TemplateCheckWithVisitor {
|
|
2976
3034
|
constructor() {
|
|
@@ -3015,10 +3073,10 @@ var factory10 = {
|
|
|
3015
3073
|
create: () => new UnusedLetDeclarationCheck()
|
|
3016
3074
|
};
|
|
3017
3075
|
|
|
3018
|
-
// bazel-out/
|
|
3019
|
-
import
|
|
3076
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3077
|
+
import ts20 from "typescript";
|
|
3020
3078
|
|
|
3021
|
-
// bazel-out/
|
|
3079
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
|
|
3022
3080
|
var DiagnosticCategoryLabel;
|
|
3023
3081
|
(function(DiagnosticCategoryLabel2) {
|
|
3024
3082
|
DiagnosticCategoryLabel2["Warning"] = "warning";
|
|
@@ -3026,7 +3084,7 @@ var DiagnosticCategoryLabel;
|
|
|
3026
3084
|
DiagnosticCategoryLabel2["Suppress"] = "suppress";
|
|
3027
3085
|
})(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
|
|
3028
3086
|
|
|
3029
|
-
// bazel-out/
|
|
3087
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3030
3088
|
var ExtendedTemplateCheckerImpl = class {
|
|
3031
3089
|
constructor(templateTypeChecker, typeChecker, templateCheckFactories, options) {
|
|
3032
3090
|
var _a, _b, _c, _d, _e;
|
|
@@ -3065,9 +3123,9 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
3065
3123
|
function diagnosticLabelToCategory(label) {
|
|
3066
3124
|
switch (label) {
|
|
3067
3125
|
case DiagnosticCategoryLabel.Warning:
|
|
3068
|
-
return
|
|
3126
|
+
return ts20.DiagnosticCategory.Warning;
|
|
3069
3127
|
case DiagnosticCategoryLabel.Error:
|
|
3070
|
-
return
|
|
3128
|
+
return ts20.DiagnosticCategory.Error;
|
|
3071
3129
|
case DiagnosticCategoryLabel.Suppress:
|
|
3072
3130
|
return null;
|
|
3073
3131
|
default:
|
|
@@ -3079,7 +3137,7 @@ function assertNever(value) {
|
|
|
3079
3137
|
${value}`);
|
|
3080
3138
|
}
|
|
3081
3139
|
|
|
3082
|
-
// bazel-out/
|
|
3140
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
|
|
3083
3141
|
var ALL_DIAGNOSTIC_FACTORIES = [
|
|
3084
3142
|
factory2,
|
|
3085
3143
|
factory5,
|
|
@@ -3097,9 +3155,9 @@ var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
|
|
|
3097
3155
|
...ALL_DIAGNOSTIC_FACTORIES.map((factory11) => factory11.name)
|
|
3098
3156
|
]);
|
|
3099
3157
|
|
|
3100
|
-
// bazel-out/
|
|
3158
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.mjs
|
|
3101
3159
|
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";
|
|
3102
|
-
import
|
|
3160
|
+
import ts21 from "typescript";
|
|
3103
3161
|
var TemplateSemanticsCheckerImpl = class {
|
|
3104
3162
|
constructor(templateTypeChecker) {
|
|
3105
3163
|
this.templateTypeChecker = templateTypeChecker;
|
|
@@ -3174,7 +3232,7 @@ var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
|
|
|
3174
3232
|
}
|
|
3175
3233
|
makeIllegalTemplateVarDiagnostic(target, expressionNode, errorMessage) {
|
|
3176
3234
|
const span = target instanceof TmplAstVariable2 ? target.valueSpan || target.sourceSpan : target.sourceSpan;
|
|
3177
|
-
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan,
|
|
3235
|
+
return this.templateTypeChecker.makeTemplateDiagnostic(this.component, expressionNode.handlerSpan, ts21.DiagnosticCategory.Error, ngErrorCode(ErrorCode.WRITE_TO_READ_ONLY_VARIABLE), errorMessage, [
|
|
3178
3236
|
{
|
|
3179
3237
|
text: `'${target.name}' is declared here.`,
|
|
3180
3238
|
start: span.start.offset,
|
|
@@ -3188,8 +3246,8 @@ function unwrapAstWithSource(ast) {
|
|
|
3188
3246
|
return ast instanceof ASTWithSource6 ? ast.ast : ast;
|
|
3189
3247
|
}
|
|
3190
3248
|
|
|
3191
|
-
// bazel-out/
|
|
3192
|
-
import
|
|
3249
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/rules/initializer_api_usage_rule.mjs
|
|
3250
|
+
import ts22 from "typescript";
|
|
3193
3251
|
var APIS_TO_CHECK = [
|
|
3194
3252
|
INPUT_INITIALIZER_FN,
|
|
3195
3253
|
MODEL_INITIALIZER_FN,
|
|
@@ -3207,13 +3265,13 @@ var InitializerApiUsageRule = class {
|
|
|
3207
3265
|
});
|
|
3208
3266
|
}
|
|
3209
3267
|
checkNode(node) {
|
|
3210
|
-
if (!
|
|
3268
|
+
if (!ts22.isCallExpression(node)) {
|
|
3211
3269
|
return null;
|
|
3212
3270
|
}
|
|
3213
|
-
while (node.parent && (
|
|
3271
|
+
while (node.parent && (ts22.isParenthesizedExpression(node.parent) || ts22.isAsExpression(node.parent))) {
|
|
3214
3272
|
node = node.parent;
|
|
3215
3273
|
}
|
|
3216
|
-
if (!node.parent || !
|
|
3274
|
+
if (!node.parent || !ts22.isCallExpression(node)) {
|
|
3217
3275
|
return null;
|
|
3218
3276
|
}
|
|
3219
3277
|
const identifiedInitializer = tryParseInitializerApi(APIS_TO_CHECK, node, this.reflector, this.importedSymbolsTracker);
|
|
@@ -3221,12 +3279,12 @@ var InitializerApiUsageRule = class {
|
|
|
3221
3279
|
return null;
|
|
3222
3280
|
}
|
|
3223
3281
|
const functionName = identifiedInitializer.api.functionName + (identifiedInitializer.isRequired ? ".required" : "");
|
|
3224
|
-
if (
|
|
3282
|
+
if (ts22.isPropertyDeclaration(node.parent) && node.parent.initializer === node) {
|
|
3225
3283
|
let closestClass = node.parent;
|
|
3226
|
-
while (closestClass && !
|
|
3284
|
+
while (closestClass && !ts22.isClassDeclaration(closestClass)) {
|
|
3227
3285
|
closestClass = closestClass.parent;
|
|
3228
3286
|
}
|
|
3229
|
-
if (closestClass &&
|
|
3287
|
+
if (closestClass && ts22.isClassDeclaration(closestClass)) {
|
|
3230
3288
|
const decorators = this.reflector.getDecoratorsOfDeclaration(closestClass);
|
|
3231
3289
|
const isComponentOrDirective = decorators !== null && decorators.some((decorator) => {
|
|
3232
3290
|
var _a;
|
|
@@ -3239,7 +3297,7 @@ var InitializerApiUsageRule = class {
|
|
|
3239
3297
|
}
|
|
3240
3298
|
};
|
|
3241
3299
|
|
|
3242
|
-
// bazel-out/
|
|
3300
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.mjs
|
|
3243
3301
|
var SourceFileValidator = class {
|
|
3244
3302
|
constructor(reflector, importedSymbolsTracker) {
|
|
3245
3303
|
this.rules = [new InitializerApiUsageRule(reflector, importedSymbolsTracker)];
|
|
@@ -3277,7 +3335,7 @@ var SourceFileValidator = class {
|
|
|
3277
3335
|
}
|
|
3278
3336
|
};
|
|
3279
3337
|
|
|
3280
|
-
// bazel-out/
|
|
3338
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/core_version.mjs
|
|
3281
3339
|
function coreHasSymbol(program, symbol) {
|
|
3282
3340
|
const checker = program.getTypeChecker();
|
|
3283
3341
|
for (const sf of program.getSourceFiles().filter(isMaybeCore)) {
|
|
@@ -3296,7 +3354,7 @@ function isMaybeCore(sf) {
|
|
|
3296
3354
|
return sf.isDeclarationFile && sf.fileName.includes("@angular/core") && sf.fileName.endsWith("index.d.ts");
|
|
3297
3355
|
}
|
|
3298
3356
|
|
|
3299
|
-
// bazel-out/
|
|
3357
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/feature_detection.mjs
|
|
3300
3358
|
import semver from "semver";
|
|
3301
3359
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
3302
3360
|
if (coreVersion === `0.0.0-${"PLACEHOLDER"}`) {
|
|
@@ -3305,7 +3363,7 @@ function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
|
3305
3363
|
return semver.satisfies(coreVersion, minVersion);
|
|
3306
3364
|
}
|
|
3307
3365
|
|
|
3308
|
-
// bazel-out/
|
|
3366
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
3309
3367
|
var CompilationTicketKind;
|
|
3310
3368
|
(function(CompilationTicketKind2) {
|
|
3311
3369
|
CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -3399,7 +3457,7 @@ var NgCompiler = class {
|
|
|
3399
3457
|
this.currentProgram = inputProgram;
|
|
3400
3458
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
3401
3459
|
this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
|
|
3402
|
-
const moduleResolutionCache =
|
|
3460
|
+
const moduleResolutionCache = ts23.createModuleResolutionCache(
|
|
3403
3461
|
this.adapter.getCurrentDirectory(),
|
|
3404
3462
|
this.adapter.getCanonicalFileName.bind(this.adapter)
|
|
3405
3463
|
);
|
|
@@ -3443,7 +3501,7 @@ var NgCompiler = class {
|
|
|
3443
3501
|
}
|
|
3444
3502
|
for (const clazz of classesToUpdate) {
|
|
3445
3503
|
this.compilation.traitCompiler.updateResources(clazz);
|
|
3446
|
-
if (!
|
|
3504
|
+
if (!ts23.isClassDeclaration(clazz)) {
|
|
3447
3505
|
continue;
|
|
3448
3506
|
}
|
|
3449
3507
|
this.compilation.templateTypeChecker.invalidateClass(clazz);
|
|
@@ -3597,12 +3655,12 @@ var NgCompiler = class {
|
|
|
3597
3655
|
if (compilation.supportJitMode && compilation.jitDeclarationRegistry.jitDeclarations.size > 0) {
|
|
3598
3656
|
const { jitDeclarations } = compilation.jitDeclarationRegistry;
|
|
3599
3657
|
const jitDeclarationsArray = Array.from(jitDeclarations);
|
|
3600
|
-
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) =>
|
|
3658
|
+
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) => ts23.getOriginalNode(d)));
|
|
3601
3659
|
const sourceFilesWithJit = new Set(jitDeclarationsArray.map((d) => d.getSourceFile().fileName));
|
|
3602
3660
|
before.push((ctx) => {
|
|
3603
3661
|
const reflectionHost = new TypeScriptReflectionHost(this.inputProgram.getTypeChecker());
|
|
3604
3662
|
const jitTransform = angularJitApplicationTransform(this.inputProgram, compilation.isCore, (node) => {
|
|
3605
|
-
node =
|
|
3663
|
+
node = ts23.getOriginalNode(node, ts23.isClassDeclaration);
|
|
3606
3664
|
return reflectionHost.isClass(node) && jitDeclarationOriginalNodes.has(node);
|
|
3607
3665
|
})(ctx);
|
|
3608
3666
|
return (sourceFile) => {
|
|
@@ -3974,18 +4032,18 @@ function isAngularCorePackage(program) {
|
|
|
3974
4032
|
return false;
|
|
3975
4033
|
}
|
|
3976
4034
|
return r3Symbols.statements.some((stmt) => {
|
|
3977
|
-
if (!
|
|
4035
|
+
if (!ts23.isVariableStatement(stmt)) {
|
|
3978
4036
|
return false;
|
|
3979
4037
|
}
|
|
3980
|
-
const modifiers =
|
|
3981
|
-
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind ===
|
|
4038
|
+
const modifiers = ts23.getModifiers(stmt);
|
|
4039
|
+
if (modifiers === void 0 || !modifiers.some((mod) => mod.kind === ts23.SyntaxKind.ExportKeyword)) {
|
|
3982
4040
|
return false;
|
|
3983
4041
|
}
|
|
3984
4042
|
return stmt.declarationList.declarations.some((decl) => {
|
|
3985
|
-
if (!
|
|
4043
|
+
if (!ts23.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
|
|
3986
4044
|
return false;
|
|
3987
4045
|
}
|
|
3988
|
-
if (decl.initializer === void 0 || decl.initializer.kind !==
|
|
4046
|
+
if (decl.initializer === void 0 || decl.initializer.kind !== ts23.SyntaxKind.TrueKeyword) {
|
|
3989
4047
|
return false;
|
|
3990
4048
|
}
|
|
3991
4049
|
return true;
|
|
@@ -3999,7 +4057,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
|
|
|
3999
4057
|
var _a, _b, _c;
|
|
4000
4058
|
if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
|
|
4001
4059
|
yield makeConfigDiagnostic({
|
|
4002
|
-
category:
|
|
4060
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4003
4061
|
code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
|
|
4004
4062
|
messageText: `
|
|
4005
4063
|
Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
|
|
@@ -4018,7 +4076,7 @@ https://angular.dev/tools/cli/template-typecheck
|
|
|
4018
4076
|
}
|
|
4019
4077
|
if (options.extendedDiagnostics && options.strictTemplates === false) {
|
|
4020
4078
|
yield makeConfigDiagnostic({
|
|
4021
|
-
category:
|
|
4079
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4022
4080
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
|
|
4023
4081
|
messageText: `
|
|
4024
4082
|
Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
|
|
@@ -4035,7 +4093,7 @@ One of the following actions is required:
|
|
|
4035
4093
|
const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
|
|
4036
4094
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
4037
4095
|
yield makeConfigDiagnostic({
|
|
4038
|
-
category:
|
|
4096
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4039
4097
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4040
4098
|
messageText: `
|
|
4041
4099
|
Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
|
|
@@ -4048,7 +4106,7 @@ ${allowedCategoryLabels.join("\n")}
|
|
|
4048
4106
|
for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
|
|
4049
4107
|
if (!SUPPORTED_DIAGNOSTIC_NAMES.has(checkName)) {
|
|
4050
4108
|
yield makeConfigDiagnostic({
|
|
4051
|
-
category:
|
|
4109
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4052
4110
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
|
|
4053
4111
|
messageText: `
|
|
4054
4112
|
Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
|
|
@@ -4060,7 +4118,7 @@ ${Array.from(SUPPORTED_DIAGNOSTIC_NAMES).join("\n")}
|
|
|
4060
4118
|
}
|
|
4061
4119
|
if (!allowedCategoryLabels.includes(category)) {
|
|
4062
4120
|
yield makeConfigDiagnostic({
|
|
4063
|
-
category:
|
|
4121
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4064
4122
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4065
4123
|
messageText: `
|
|
4066
4124
|
Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
|
|
@@ -4090,7 +4148,7 @@ var ReferenceGraphAdapter = class {
|
|
|
4090
4148
|
for (const { node } of references) {
|
|
4091
4149
|
let sourceFile = node.getSourceFile();
|
|
4092
4150
|
if (sourceFile === void 0) {
|
|
4093
|
-
sourceFile =
|
|
4151
|
+
sourceFile = ts23.getOriginalNode(node).getSourceFile();
|
|
4094
4152
|
}
|
|
4095
4153
|
if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
|
|
4096
4154
|
this.graph.add(source, node);
|
|
@@ -4128,8 +4186,8 @@ function versionMapFromProgram(program, driver) {
|
|
|
4128
4186
|
return versions;
|
|
4129
4187
|
}
|
|
4130
4188
|
|
|
4131
|
-
// bazel-out/
|
|
4132
|
-
import
|
|
4189
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
4190
|
+
import ts24 from "typescript";
|
|
4133
4191
|
var DelegatingCompilerHost = class {
|
|
4134
4192
|
get jsDocParsingMode() {
|
|
4135
4193
|
return this.delegate.jsDocParsingMode;
|
|
@@ -4214,7 +4272,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4214
4272
|
entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
|
|
4215
4273
|
if (entryPoint === null) {
|
|
4216
4274
|
diagnostics.push({
|
|
4217
|
-
category:
|
|
4275
|
+
category: ts24.DiagnosticCategory.Error,
|
|
4218
4276
|
code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
|
|
4219
4277
|
file: void 0,
|
|
4220
4278
|
start: void 0,
|
|
@@ -4257,17 +4315,17 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4257
4315
|
return this.fileNameToModuleName !== void 0 ? this : null;
|
|
4258
4316
|
}
|
|
4259
4317
|
createCachedResolveModuleNamesFunction() {
|
|
4260
|
-
const moduleResolutionCache =
|
|
4318
|
+
const moduleResolutionCache = ts24.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
|
|
4261
4319
|
return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
|
|
4262
4320
|
return moduleNames.map((moduleName) => {
|
|
4263
|
-
const module =
|
|
4321
|
+
const module = ts24.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
|
|
4264
4322
|
return module.resolvedModule;
|
|
4265
4323
|
});
|
|
4266
4324
|
};
|
|
4267
4325
|
}
|
|
4268
4326
|
};
|
|
4269
4327
|
|
|
4270
|
-
// bazel-out/
|
|
4328
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
4271
4329
|
var NgtscProgram = class {
|
|
4272
4330
|
constructor(rootNames, options, delegateHost, oldProgram) {
|
|
4273
4331
|
this.options = options;
|
|
@@ -4284,7 +4342,7 @@ var NgtscProgram = class {
|
|
|
4284
4342
|
if (reuseProgram !== void 0) {
|
|
4285
4343
|
retagAllTsFiles(reuseProgram);
|
|
4286
4344
|
}
|
|
4287
|
-
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () =>
|
|
4345
|
+
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts25.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
|
|
4288
4346
|
perfRecorder.phase(PerfPhase.Unaccounted);
|
|
4289
4347
|
perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
|
|
4290
4348
|
this.host.postProgramCreationCleanup();
|
|
@@ -4493,37 +4551,37 @@ function mergeEmitResults(emitResults) {
|
|
|
4493
4551
|
return { diagnostics, emitSkipped, emittedFiles };
|
|
4494
4552
|
}
|
|
4495
4553
|
|
|
4496
|
-
// bazel-out/
|
|
4554
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
|
|
4497
4555
|
function createProgram({ rootNames, options, host, oldProgram }) {
|
|
4498
4556
|
return new NgtscProgram(rootNames, options, host, oldProgram);
|
|
4499
4557
|
}
|
|
4500
4558
|
|
|
4501
|
-
// bazel-out/
|
|
4502
|
-
import
|
|
4559
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4560
|
+
import ts27 from "typescript";
|
|
4503
4561
|
|
|
4504
|
-
// bazel-out/
|
|
4505
|
-
import
|
|
4562
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
|
|
4563
|
+
import ts26 from "typescript";
|
|
4506
4564
|
function createMessageDiagnostic(messageText) {
|
|
4507
4565
|
return {
|
|
4508
4566
|
file: void 0,
|
|
4509
4567
|
start: void 0,
|
|
4510
4568
|
length: void 0,
|
|
4511
|
-
category:
|
|
4569
|
+
category: ts26.DiagnosticCategory.Message,
|
|
4512
4570
|
messageText,
|
|
4513
4571
|
code: DEFAULT_ERROR_CODE,
|
|
4514
4572
|
source: SOURCE
|
|
4515
4573
|
};
|
|
4516
4574
|
}
|
|
4517
4575
|
|
|
4518
|
-
// bazel-out/
|
|
4576
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4519
4577
|
var defaultFormatHost = {
|
|
4520
|
-
getCurrentDirectory: () =>
|
|
4578
|
+
getCurrentDirectory: () => ts27.sys.getCurrentDirectory(),
|
|
4521
4579
|
getCanonicalFileName: (fileName) => fileName,
|
|
4522
|
-
getNewLine: () =>
|
|
4580
|
+
getNewLine: () => ts27.sys.newLine
|
|
4523
4581
|
};
|
|
4524
4582
|
function formatDiagnostics(diags, host = defaultFormatHost) {
|
|
4525
4583
|
if (diags && diags.length) {
|
|
4526
|
-
return diags.map((diagnostic) => replaceTsWithNgInErrors(
|
|
4584
|
+
return diags.map((diagnostic) => replaceTsWithNgInErrors(ts27.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
|
|
4527
4585
|
} else {
|
|
4528
4586
|
return "";
|
|
4529
4587
|
}
|
|
@@ -4540,7 +4598,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4540
4598
|
var _a;
|
|
4541
4599
|
try {
|
|
4542
4600
|
const fs = getFileSystem();
|
|
4543
|
-
const readConfigFile = (configFile) =>
|
|
4601
|
+
const readConfigFile = (configFile) => ts27.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
|
|
4544
4602
|
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
|
|
4545
4603
|
const { config: config2, error: error2 } = readConfigFile(configFile);
|
|
4546
4604
|
if (error2) {
|
|
@@ -4575,7 +4633,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4575
4633
|
...existingOptions
|
|
4576
4634
|
};
|
|
4577
4635
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4578
|
-
const { options, errors, fileNames: rootNames, projectReferences } =
|
|
4636
|
+
const { options, errors, fileNames: rootNames, projectReferences } = ts27.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
|
|
4579
4637
|
let emitFlags = EmitFlags.Default;
|
|
4580
4638
|
if (!(options["skipMetadataEmit"] || options["flatModuleOutFile"])) {
|
|
4581
4639
|
emitFlags |= EmitFlags.Metadata;
|
|
@@ -4587,7 +4645,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4587
4645
|
} catch (e) {
|
|
4588
4646
|
const errors = [
|
|
4589
4647
|
{
|
|
4590
|
-
category:
|
|
4648
|
+
category: ts27.DiagnosticCategory.Error,
|
|
4591
4649
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4592
4650
|
file: void 0,
|
|
4593
4651
|
start: void 0,
|
|
@@ -4602,7 +4660,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4602
4660
|
function createParseConfigHost(host, fs = getFileSystem()) {
|
|
4603
4661
|
return {
|
|
4604
4662
|
fileExists: host.exists.bind(host),
|
|
4605
|
-
readDirectory:
|
|
4663
|
+
readDirectory: ts27.sys.readDirectory,
|
|
4606
4664
|
readFile: host.readFile.bind(host),
|
|
4607
4665
|
useCaseSensitiveFileNames: fs.isCaseSensitive()
|
|
4608
4666
|
};
|
|
@@ -4622,7 +4680,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4622
4680
|
}
|
|
4623
4681
|
} else {
|
|
4624
4682
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4625
|
-
const { resolvedModule } =
|
|
4683
|
+
const { resolvedModule } = ts27.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts27.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
|
|
4626
4684
|
if (resolvedModule) {
|
|
4627
4685
|
return absoluteFrom(resolvedModule.resolvedFileName);
|
|
4628
4686
|
}
|
|
@@ -4632,7 +4690,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4632
4690
|
function exitCodeFromResult(diags) {
|
|
4633
4691
|
if (!diags)
|
|
4634
4692
|
return 0;
|
|
4635
|
-
if (diags.every((diag) => diag.category !==
|
|
4693
|
+
if (diags.every((diag) => diag.category !== ts27.DiagnosticCategory.Error)) {
|
|
4636
4694
|
return 0;
|
|
4637
4695
|
}
|
|
4638
4696
|
return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
|
|
@@ -4671,7 +4729,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
4671
4729
|
} catch (e) {
|
|
4672
4730
|
program = void 0;
|
|
4673
4731
|
allDiagnostics.push({
|
|
4674
|
-
category:
|
|
4732
|
+
category: ts27.DiagnosticCategory.Error,
|
|
4675
4733
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4676
4734
|
code: UNKNOWN_ERROR_CODE,
|
|
4677
4735
|
file: void 0,
|
|
@@ -4701,7 +4759,7 @@ function defaultGatherDiagnostics(program) {
|
|
|
4701
4759
|
return allDiagnostics;
|
|
4702
4760
|
}
|
|
4703
4761
|
function hasErrors(diags) {
|
|
4704
|
-
return diags.some((d) => d.category ===
|
|
4762
|
+
return diags.some((d) => d.category === ts27.DiagnosticCategory.Error);
|
|
4705
4763
|
}
|
|
4706
4764
|
|
|
4707
4765
|
export {
|
|
@@ -4746,4 +4804,4 @@ export {
|
|
|
4746
4804
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4747
4805
|
* found in the LICENSE file at https://angular.io/license
|
|
4748
4806
|
*/
|
|
4749
|
-
//# sourceMappingURL=chunk-
|
|
4807
|
+
//# sourceMappingURL=chunk-2Q6KYU3A.js.map
|