@angular/compiler-cli 18.2.1 → 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-5I46MBAD.js → chunk-2Q6KYU3A.js} +226 -166
- package/bundles/chunk-2Q6KYU3A.js.map +6 -0
- package/bundles/{chunk-NOUP24WG.js → chunk-2ZTB2SIK.js} +5 -5
- package/bundles/{chunk-XNL3EK5H.js → chunk-3W345P4E.js} +7 -7
- package/bundles/{chunk-ZHJO7SMX.js → chunk-7PEXPTYL.js} +12 -12
- package/bundles/{chunk-THQF5ZZE.js → chunk-ERN7RQQ7.js} +5 -5
- package/bundles/{chunk-56IXZIL6.js → chunk-FNLRHOJM.js} +130 -125
- package/bundles/chunk-FNLRHOJM.js.map +6 -0
- 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-4GMJ67OV.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/annotations/component/src/handler.d.ts +2 -1
- package/src/ngtsc/annotations/component/src/resources.d.ts +1 -0
- package/src/ngtsc/core/api/src/public_options.d.ts +7 -0
- 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-56IXZIL6.js.map +0 -6
- package/bundles/chunk-5I46MBAD.js.map +0 -6
- /package/bundles/{chunk-NOUP24WG.js.map → chunk-2ZTB2SIK.js.map} +0 -0
- /package/bundles/{chunk-XNL3EK5H.js.map → chunk-3W345P4E.js.map} +0 -0
- /package/bundles/{chunk-ZHJO7SMX.js.map → chunk-7PEXPTYL.js.map} +0 -0
- /package/bundles/{chunk-THQF5ZZE.js.map → chunk-ERN7RQQ7.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-4GMJ67OV.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) {
|
|
@@ -1024,7 +1082,9 @@ function i18nSerialize(bundle, formatName, options) {
|
|
|
1024
1082
|
let serializer;
|
|
1025
1083
|
switch (format) {
|
|
1026
1084
|
case "xmb":
|
|
1027
|
-
serializer = new Xmb(
|
|
1085
|
+
serializer = new Xmb(
|
|
1086
|
+
options.i18nPreserveWhitespaceForLegacyExtraction
|
|
1087
|
+
);
|
|
1028
1088
|
break;
|
|
1029
1089
|
case "xliff2":
|
|
1030
1090
|
case "xlf2":
|
|
@@ -1044,10 +1104,10 @@ function getPathNormalizer(basePath) {
|
|
|
1044
1104
|
};
|
|
1045
1105
|
}
|
|
1046
1106
|
|
|
1047
|
-
// bazel-out/
|
|
1048
|
-
import
|
|
1107
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1108
|
+
import ts12 from "typescript";
|
|
1049
1109
|
|
|
1050
|
-
// bazel-out/
|
|
1110
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
|
|
1051
1111
|
function toNumbers(value) {
|
|
1052
1112
|
const suffixIndex = value.lastIndexOf("-");
|
|
1053
1113
|
return value.slice(0, suffixIndex === -1 ? value.length : suffixIndex).split(".").map((segment) => {
|
|
@@ -1082,10 +1142,10 @@ function compareVersions(v1, v2) {
|
|
|
1082
1142
|
return compareNumbers(toNumbers(v1), toNumbers(v2));
|
|
1083
1143
|
}
|
|
1084
1144
|
|
|
1085
|
-
// bazel-out/
|
|
1145
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
1086
1146
|
var MIN_TS_VERSION = "5.4.0";
|
|
1087
1147
|
var MAX_TS_VERSION = "5.6.0";
|
|
1088
|
-
var tsVersion =
|
|
1148
|
+
var tsVersion = ts12.version;
|
|
1089
1149
|
function checkVersion(version, minVersion, maxVersion) {
|
|
1090
1150
|
if (compareVersions(version, minVersion) < 0 || compareVersions(version, maxVersion) >= 0) {
|
|
1091
1151
|
throw new Error(`The Angular Compiler requires TypeScript >=${minVersion} and <${maxVersion} but ${version} was found instead.`);
|
|
@@ -1095,11 +1155,11 @@ function verifySupportedTypeScriptVersion() {
|
|
|
1095
1155
|
checkVersion(tsVersion, MIN_TS_VERSION, MAX_TS_VERSION);
|
|
1096
1156
|
}
|
|
1097
1157
|
|
|
1098
|
-
// bazel-out/
|
|
1158
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
1099
1159
|
import { R3Identifiers } from "@angular/compiler";
|
|
1100
|
-
import
|
|
1160
|
+
import ts23 from "typescript";
|
|
1101
1161
|
|
|
1102
|
-
// bazel-out/
|
|
1162
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
1103
1163
|
var CycleAnalyzer = class {
|
|
1104
1164
|
constructor(importGraph) {
|
|
1105
1165
|
this.importGraph = importGraph;
|
|
@@ -1170,8 +1230,8 @@ var Cycle = class {
|
|
|
1170
1230
|
}
|
|
1171
1231
|
};
|
|
1172
1232
|
|
|
1173
|
-
// bazel-out/
|
|
1174
|
-
import
|
|
1233
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
|
|
1234
|
+
import ts13 from "typescript";
|
|
1175
1235
|
var ImportGraph = class {
|
|
1176
1236
|
constructor(checker, perf) {
|
|
1177
1237
|
this.checker = checker;
|
|
@@ -1215,10 +1275,10 @@ var ImportGraph = class {
|
|
|
1215
1275
|
return this.perf.inPhase(PerfPhase.CycleDetection, () => {
|
|
1216
1276
|
const imports = /* @__PURE__ */ new Set();
|
|
1217
1277
|
for (const stmt of sf.statements) {
|
|
1218
|
-
if (!
|
|
1278
|
+
if (!ts13.isImportDeclaration(stmt) && !ts13.isExportDeclaration(stmt) || stmt.moduleSpecifier === void 0) {
|
|
1219
1279
|
continue;
|
|
1220
1280
|
}
|
|
1221
|
-
if (
|
|
1281
|
+
if (ts13.isImportDeclaration(stmt) && stmt.importClause !== void 0 && isTypeOnlyImportClause(stmt.importClause)) {
|
|
1222
1282
|
continue;
|
|
1223
1283
|
}
|
|
1224
1284
|
const symbol = this.checker.getSymbolAtLocation(stmt.moduleSpecifier);
|
|
@@ -1226,7 +1286,7 @@ var ImportGraph = class {
|
|
|
1226
1286
|
continue;
|
|
1227
1287
|
}
|
|
1228
1288
|
const moduleFile = symbol.valueDeclaration;
|
|
1229
|
-
if (
|
|
1289
|
+
if (ts13.isSourceFile(moduleFile) && isLocalFile(moduleFile)) {
|
|
1230
1290
|
imports.add(moduleFile);
|
|
1231
1291
|
}
|
|
1232
1292
|
}
|
|
@@ -1241,7 +1301,7 @@ function isTypeOnlyImportClause(node) {
|
|
|
1241
1301
|
if (node.isTypeOnly) {
|
|
1242
1302
|
return true;
|
|
1243
1303
|
}
|
|
1244
|
-
if (node.namedBindings !== void 0 &&
|
|
1304
|
+
if (node.namedBindings !== void 0 && ts13.isNamedImports(node.namedBindings) && node.namedBindings.elements.every((specifier) => specifier.isTypeOnly)) {
|
|
1245
1305
|
return true;
|
|
1246
1306
|
}
|
|
1247
1307
|
return false;
|
|
@@ -1262,8 +1322,8 @@ var Found = class {
|
|
|
1262
1322
|
}
|
|
1263
1323
|
};
|
|
1264
1324
|
|
|
1265
|
-
// bazel-out/
|
|
1266
|
-
import
|
|
1325
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
|
|
1326
|
+
import ts14 from "typescript";
|
|
1267
1327
|
var FlatIndexGenerator = class {
|
|
1268
1328
|
constructor(entryPoint, relativeFlatIndexPath, moduleName) {
|
|
1269
1329
|
this.entryPoint = entryPoint;
|
|
@@ -1279,7 +1339,7 @@ var FlatIndexGenerator = class {
|
|
|
1279
1339
|
|
|
1280
1340
|
export * from '${relativeEntryPoint}';
|
|
1281
1341
|
`;
|
|
1282
|
-
const genFile =
|
|
1342
|
+
const genFile = ts14.createSourceFile(this.flatIndexPath, contents, ts14.ScriptTarget.ES2015, true, ts14.ScriptKind.TS);
|
|
1283
1343
|
if (this.moduleName !== null) {
|
|
1284
1344
|
genFile.moduleName = this.moduleName;
|
|
1285
1345
|
}
|
|
@@ -1287,7 +1347,7 @@ export * from '${relativeEntryPoint}';
|
|
|
1287
1347
|
}
|
|
1288
1348
|
};
|
|
1289
1349
|
|
|
1290
|
-
// bazel-out/
|
|
1350
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
|
|
1291
1351
|
function findFlatIndexEntryPoint(rootFiles) {
|
|
1292
1352
|
const tsFiles = rootFiles.filter((file) => isNonDeclarationTsPath(file));
|
|
1293
1353
|
let resolvedEntryPoint = null;
|
|
@@ -1303,8 +1363,8 @@ function findFlatIndexEntryPoint(rootFiles) {
|
|
|
1303
1363
|
return resolvedEntryPoint;
|
|
1304
1364
|
}
|
|
1305
1365
|
|
|
1306
|
-
// bazel-out/
|
|
1307
|
-
import
|
|
1366
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
|
|
1367
|
+
import ts15 from "typescript";
|
|
1308
1368
|
function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
1309
1369
|
const diagnostics = [];
|
|
1310
1370
|
const topLevelExports = /* @__PURE__ */ new Set();
|
|
@@ -1314,7 +1374,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1314
1374
|
}
|
|
1315
1375
|
const exportedSymbols = checker.getExportsOfModule(moduleSymbol);
|
|
1316
1376
|
exportedSymbols.forEach((symbol) => {
|
|
1317
|
-
if (symbol.flags &
|
|
1377
|
+
if (symbol.flags & ts15.SymbolFlags.Alias) {
|
|
1318
1378
|
symbol = checker.getAliasedSymbol(symbol);
|
|
1319
1379
|
}
|
|
1320
1380
|
const decl = symbol.valueDeclaration;
|
|
@@ -1338,7 +1398,7 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
1338
1398
|
visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
|
|
1339
1399
|
}
|
|
1340
1400
|
const diagnostic = {
|
|
1341
|
-
category:
|
|
1401
|
+
category: ts15.DiagnosticCategory.Error,
|
|
1342
1402
|
code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
|
|
1343
1403
|
file: transitiveReference.getSourceFile(),
|
|
1344
1404
|
...getPosOfDeclaration(transitiveReference),
|
|
@@ -1358,7 +1418,7 @@ function getPosOfDeclaration(decl) {
|
|
|
1358
1418
|
};
|
|
1359
1419
|
}
|
|
1360
1420
|
function getIdentifierOfDeclaration(decl) {
|
|
1361
|
-
if ((
|
|
1421
|
+
if ((ts15.isClassDeclaration(decl) || ts15.isVariableDeclaration(decl) || ts15.isFunctionDeclaration(decl)) && decl.name !== void 0 && ts15.isIdentifier(decl.name)) {
|
|
1362
1422
|
return decl.name;
|
|
1363
1423
|
} else {
|
|
1364
1424
|
return null;
|
|
@@ -1370,20 +1430,20 @@ function getNameOfDeclaration(decl) {
|
|
|
1370
1430
|
}
|
|
1371
1431
|
function getDescriptorOfDeclaration(decl) {
|
|
1372
1432
|
switch (decl.kind) {
|
|
1373
|
-
case
|
|
1433
|
+
case ts15.SyntaxKind.ClassDeclaration:
|
|
1374
1434
|
return "class";
|
|
1375
|
-
case
|
|
1435
|
+
case ts15.SyntaxKind.FunctionDeclaration:
|
|
1376
1436
|
return "function";
|
|
1377
|
-
case
|
|
1437
|
+
case ts15.SyntaxKind.VariableDeclaration:
|
|
1378
1438
|
return "variable";
|
|
1379
|
-
case
|
|
1439
|
+
case ts15.SyntaxKind.EnumDeclaration:
|
|
1380
1440
|
return "enum";
|
|
1381
1441
|
default:
|
|
1382
1442
|
return "declaration";
|
|
1383
1443
|
}
|
|
1384
1444
|
}
|
|
1385
1445
|
|
|
1386
|
-
// bazel-out/
|
|
1446
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
|
|
1387
1447
|
var ReferenceGraph = class {
|
|
1388
1448
|
constructor() {
|
|
1389
1449
|
this.references = /* @__PURE__ */ new Map();
|
|
@@ -1437,7 +1497,7 @@ var ReferenceGraph = class {
|
|
|
1437
1497
|
}
|
|
1438
1498
|
};
|
|
1439
1499
|
|
|
1440
|
-
// bazel-out/
|
|
1500
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
|
|
1441
1501
|
var FileDependencyGraph = class {
|
|
1442
1502
|
constructor() {
|
|
1443
1503
|
this.nodes = /* @__PURE__ */ new Map();
|
|
@@ -1504,7 +1564,7 @@ function isLogicallyChanged(sf, node, changedTsPaths, deletedTsPaths, changedRes
|
|
|
1504
1564
|
return false;
|
|
1505
1565
|
}
|
|
1506
1566
|
|
|
1507
|
-
// bazel-out/
|
|
1567
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
|
|
1508
1568
|
var IncrementalStateKind;
|
|
1509
1569
|
(function(IncrementalStateKind2) {
|
|
1510
1570
|
IncrementalStateKind2[IncrementalStateKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -1512,7 +1572,7 @@ var IncrementalStateKind;
|
|
|
1512
1572
|
IncrementalStateKind2[IncrementalStateKind2["Analyzed"] = 2] = "Analyzed";
|
|
1513
1573
|
})(IncrementalStateKind || (IncrementalStateKind = {}));
|
|
1514
1574
|
|
|
1515
|
-
// bazel-out/
|
|
1575
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
|
|
1516
1576
|
var PhaseKind;
|
|
1517
1577
|
(function(PhaseKind2) {
|
|
1518
1578
|
PhaseKind2[PhaseKind2["Analysis"] = 0] = "Analysis";
|
|
@@ -1713,7 +1773,7 @@ function toOriginalSourceFile(sf) {
|
|
|
1713
1773
|
}
|
|
1714
1774
|
}
|
|
1715
1775
|
|
|
1716
|
-
// bazel-out/
|
|
1776
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
|
|
1717
1777
|
var TrackedIncrementalBuildStrategy = class {
|
|
1718
1778
|
constructor() {
|
|
1719
1779
|
this.state = null;
|
|
@@ -1749,7 +1809,7 @@ var PatchedProgramIncrementalBuildStrategy = class {
|
|
|
1749
1809
|
};
|
|
1750
1810
|
var SYM_INCREMENTAL_STATE = Symbol("NgIncrementalState");
|
|
1751
1811
|
|
|
1752
|
-
// bazel-out/
|
|
1812
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
|
|
1753
1813
|
var IdentifierKind;
|
|
1754
1814
|
(function(IdentifierKind2) {
|
|
1755
1815
|
IdentifierKind2[IdentifierKind2["Property"] = 0] = "Property";
|
|
@@ -1768,7 +1828,7 @@ var AbsoluteSourceSpan = class {
|
|
|
1768
1828
|
}
|
|
1769
1829
|
};
|
|
1770
1830
|
|
|
1771
|
-
// bazel-out/
|
|
1831
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
|
|
1772
1832
|
var IndexingContext = class {
|
|
1773
1833
|
constructor() {
|
|
1774
1834
|
this.components = /* @__PURE__ */ new Set();
|
|
@@ -1778,10 +1838,10 @@ var IndexingContext = class {
|
|
|
1778
1838
|
}
|
|
1779
1839
|
};
|
|
1780
1840
|
|
|
1781
|
-
// bazel-out/
|
|
1841
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
1782
1842
|
import { ParseSourceFile } from "@angular/compiler";
|
|
1783
1843
|
|
|
1784
|
-
// bazel-out/
|
|
1844
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
|
|
1785
1845
|
import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstBoundDeferredTrigger, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate, TmplAstVariable } from "@angular/compiler";
|
|
1786
1846
|
var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
1787
1847
|
constructor(expressionStr, absoluteOffset, boundTemplate, targetToIdentifier) {
|
|
@@ -2076,7 +2136,7 @@ function getTemplateIdentifiers(boundTemplate) {
|
|
|
2076
2136
|
return { identifiers: visitor.identifiers, errors: visitor.errors };
|
|
2077
2137
|
}
|
|
2078
2138
|
|
|
2079
|
-
// bazel-out/
|
|
2139
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
2080
2140
|
function generateAnalysis(context) {
|
|
2081
2141
|
const analysis = /* @__PURE__ */ new Map();
|
|
2082
2142
|
context.components.forEach(({ declaration, selector, boundTemplate, templateMeta }) => {
|
|
@@ -2112,7 +2172,7 @@ function generateAnalysis(context) {
|
|
|
2112
2172
|
return analysis;
|
|
2113
2173
|
}
|
|
2114
2174
|
|
|
2115
|
-
// bazel-out/
|
|
2175
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/metadata/src/ng_module_index.mjs
|
|
2116
2176
|
var NgModuleIndexImpl = class {
|
|
2117
2177
|
constructor(metaReader, localReader) {
|
|
2118
2178
|
this.metaReader = metaReader;
|
|
@@ -2201,8 +2261,8 @@ var NgModuleIndexImpl = class {
|
|
|
2201
2261
|
}
|
|
2202
2262
|
};
|
|
2203
2263
|
|
|
2204
|
-
// bazel-out/
|
|
2205
|
-
import
|
|
2264
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
|
|
2265
|
+
import ts16 from "typescript";
|
|
2206
2266
|
var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
|
|
2207
2267
|
var RESOURCE_MARKER = ".$ngresource$";
|
|
2208
2268
|
var RESOURCE_MARKER_TS = RESOURCE_MARKER + ".ts";
|
|
@@ -2316,7 +2376,7 @@ var AdapterResourceLoader = class {
|
|
|
2316
2376
|
return this.adapter.rootDirs.map((rootDir) => join(rootDir, segment));
|
|
2317
2377
|
}
|
|
2318
2378
|
getResolvedCandidateLocations(url, fromFile) {
|
|
2319
|
-
const failedLookup =
|
|
2379
|
+
const failedLookup = ts16.resolveModuleName(url + RESOURCE_MARKER, fromFile, this.options, this.lookupResolutionHost);
|
|
2320
2380
|
if (failedLookup.failedLookupLocations === void 0) {
|
|
2321
2381
|
throw new Error(`Internal error: expected to find failedLookupLocations during resolution of resource '${url}' in context of ${fromFile}`);
|
|
2322
2382
|
}
|
|
@@ -2351,7 +2411,7 @@ function createLookupResolutionHost(adapter) {
|
|
|
2351
2411
|
};
|
|
2352
2412
|
}
|
|
2353
2413
|
|
|
2354
|
-
// bazel-out/
|
|
2414
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/standalone.mjs
|
|
2355
2415
|
var StandaloneComponentScopeReader = class {
|
|
2356
2416
|
constructor(metaReader, localModuleReader, dtsModuleReader) {
|
|
2357
2417
|
this.metaReader = metaReader;
|
|
@@ -2447,11 +2507,11 @@ var StandaloneComponentScopeReader = class {
|
|
|
2447
2507
|
}
|
|
2448
2508
|
};
|
|
2449
2509
|
|
|
2450
|
-
// bazel-out/
|
|
2510
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
2451
2511
|
import { ASTWithSource as ASTWithSource3, BindingType, Interpolation, PropertyRead as PropertyRead2, TmplAstBoundAttribute } from "@angular/compiler";
|
|
2452
2512
|
|
|
2453
|
-
// bazel-out/
|
|
2454
|
-
import
|
|
2513
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/symbol_util.mjs
|
|
2514
|
+
import ts17 from "typescript";
|
|
2455
2515
|
var SIGNAL_FNS = /* @__PURE__ */ new Set([
|
|
2456
2516
|
"WritableSignal",
|
|
2457
2517
|
"Signal",
|
|
@@ -2466,11 +2526,11 @@ function isSignalSymbol(symbol) {
|
|
|
2466
2526
|
const declarations = symbol.getDeclarations();
|
|
2467
2527
|
return declarations !== void 0 && declarations.some((decl) => {
|
|
2468
2528
|
const fileName = decl.getSourceFile().fileName;
|
|
2469
|
-
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"));
|
|
2470
2530
|
});
|
|
2471
2531
|
}
|
|
2472
2532
|
|
|
2473
|
-
// bazel-out/
|
|
2533
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
|
|
2474
2534
|
import { ASTWithSource as ASTWithSource2, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstBoundDeferredTrigger as TmplAstBoundDeferredTrigger2 } from "@angular/compiler";
|
|
2475
2535
|
var TemplateCheckWithVisitor = class {
|
|
2476
2536
|
constructor() {
|
|
@@ -2604,7 +2664,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor2 {
|
|
|
2604
2664
|
}
|
|
2605
2665
|
};
|
|
2606
2666
|
|
|
2607
|
-
// bazel-out/
|
|
2667
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.mjs
|
|
2608
2668
|
var SIGNAL_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["set", "update", "asReadonly"]);
|
|
2609
2669
|
var FUNCTION_INSTANCE_PROPERTIES = /* @__PURE__ */ new Set(["name", "length", "prototype"]);
|
|
2610
2670
|
var InterpolatedSignalCheck = class extends TemplateCheckWithVisitor {
|
|
@@ -2656,7 +2716,7 @@ var factory = {
|
|
|
2656
2716
|
create: () => new InterpolatedSignalCheck()
|
|
2657
2717
|
};
|
|
2658
2718
|
|
|
2659
|
-
// bazel-out/
|
|
2719
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
2660
2720
|
import { TmplAstBoundEvent } from "@angular/compiler";
|
|
2661
2721
|
var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
|
|
2662
2722
|
constructor() {
|
|
@@ -2682,7 +2742,7 @@ var factory2 = {
|
|
|
2682
2742
|
create: () => new InvalidBananaInBoxCheck()
|
|
2683
2743
|
};
|
|
2684
2744
|
|
|
2685
|
-
// bazel-out/
|
|
2745
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
|
|
2686
2746
|
import { TmplAstTemplate as TmplAstTemplate2 } from "@angular/compiler";
|
|
2687
2747
|
var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
|
|
2688
2748
|
["ngIf", { directive: "NgIf", builtIn: "@if" }],
|
|
@@ -2727,7 +2787,7 @@ var factory3 = {
|
|
|
2727
2787
|
}
|
|
2728
2788
|
};
|
|
2729
2789
|
|
|
2730
|
-
// bazel-out/
|
|
2790
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
|
|
2731
2791
|
import { TmplAstTemplate as TmplAstTemplate3 } from "@angular/compiler";
|
|
2732
2792
|
var MissingNgForOfLetCheck = class extends TemplateCheckWithVisitor {
|
|
2733
2793
|
constructor() {
|
|
@@ -2760,9 +2820,9 @@ var factory4 = {
|
|
|
2760
2820
|
create: () => new MissingNgForOfLetCheck()
|
|
2761
2821
|
};
|
|
2762
2822
|
|
|
2763
|
-
// bazel-out/
|
|
2823
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
|
|
2764
2824
|
import { Binary } from "@angular/compiler";
|
|
2765
|
-
import
|
|
2825
|
+
import ts18 from "typescript";
|
|
2766
2826
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2767
2827
|
constructor() {
|
|
2768
2828
|
super(...arguments);
|
|
@@ -2777,7 +2837,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2777
2837
|
return [];
|
|
2778
2838
|
}
|
|
2779
2839
|
const typeLeft = symbolLeft.tsType;
|
|
2780
|
-
if (typeLeft.flags & (
|
|
2840
|
+
if (typeLeft.flags & (ts18.TypeFlags.Any | ts18.TypeFlags.Unknown)) {
|
|
2781
2841
|
return [];
|
|
2782
2842
|
}
|
|
2783
2843
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -2806,9 +2866,9 @@ var factory5 = {
|
|
|
2806
2866
|
}
|
|
2807
2867
|
};
|
|
2808
2868
|
|
|
2809
|
-
// bazel-out/
|
|
2869
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
|
|
2810
2870
|
import { SafeCall, SafeKeyedRead, SafePropertyRead } from "@angular/compiler";
|
|
2811
|
-
import
|
|
2871
|
+
import ts19 from "typescript";
|
|
2812
2872
|
var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
2813
2873
|
constructor() {
|
|
2814
2874
|
super(...arguments);
|
|
@@ -2823,7 +2883,7 @@ var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
2823
2883
|
return [];
|
|
2824
2884
|
}
|
|
2825
2885
|
const typeLeft = symbolLeft.tsType;
|
|
2826
|
-
if (typeLeft.flags & (
|
|
2886
|
+
if (typeLeft.flags & (ts19.TypeFlags.Any | ts19.TypeFlags.Unknown)) {
|
|
2827
2887
|
return [];
|
|
2828
2888
|
}
|
|
2829
2889
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
@@ -2853,7 +2913,7 @@ var factory6 = {
|
|
|
2853
2913
|
}
|
|
2854
2914
|
};
|
|
2855
2915
|
|
|
2856
|
-
// bazel-out/
|
|
2916
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.mjs
|
|
2857
2917
|
import { TmplAstBoundAttribute as TmplAstBoundAttribute2 } from "@angular/compiler";
|
|
2858
2918
|
var STYLE_SUFFIXES = ["px", "%", "em"];
|
|
2859
2919
|
var SuffixNotSupportedCheck = class extends TemplateCheckWithVisitor {
|
|
@@ -2877,7 +2937,7 @@ var factory7 = {
|
|
|
2877
2937
|
create: () => new SuffixNotSupportedCheck()
|
|
2878
2938
|
};
|
|
2879
2939
|
|
|
2880
|
-
// bazel-out/
|
|
2940
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
|
|
2881
2941
|
import { TmplAstTextAttribute } from "@angular/compiler";
|
|
2882
2942
|
var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
|
|
2883
2943
|
constructor() {
|
|
@@ -2916,7 +2976,7 @@ var factory8 = {
|
|
|
2916
2976
|
create: () => new TextAttributeNotBindingSpec()
|
|
2917
2977
|
};
|
|
2918
2978
|
|
|
2919
|
-
// bazel-out/
|
|
2979
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.mjs
|
|
2920
2980
|
import { ASTWithSource as ASTWithSource4, Call, Chain, Conditional, ParsedEventType, PropertyRead as PropertyRead3, SafeCall as SafeCall2, SafePropertyRead as SafePropertyRead2, TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
|
|
2921
2981
|
var UninvokedFunctionInEventBindingSpec = class extends TemplateCheckWithVisitor {
|
|
2922
2982
|
constructor() {
|
|
@@ -2968,7 +3028,7 @@ var factory9 = {
|
|
|
2968
3028
|
create: () => new UninvokedFunctionInEventBindingSpec()
|
|
2969
3029
|
};
|
|
2970
3030
|
|
|
2971
|
-
// bazel-out/
|
|
3031
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.mjs
|
|
2972
3032
|
import { AST, ASTWithSource as ASTWithSource5, TmplAstLetDeclaration } from "@angular/compiler";
|
|
2973
3033
|
var UnusedLetDeclarationCheck = class extends TemplateCheckWithVisitor {
|
|
2974
3034
|
constructor() {
|
|
@@ -3013,10 +3073,10 @@ var factory10 = {
|
|
|
3013
3073
|
create: () => new UnusedLetDeclarationCheck()
|
|
3014
3074
|
};
|
|
3015
3075
|
|
|
3016
|
-
// bazel-out/
|
|
3017
|
-
import
|
|
3076
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3077
|
+
import ts20 from "typescript";
|
|
3018
3078
|
|
|
3019
|
-
// bazel-out/
|
|
3079
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
|
|
3020
3080
|
var DiagnosticCategoryLabel;
|
|
3021
3081
|
(function(DiagnosticCategoryLabel2) {
|
|
3022
3082
|
DiagnosticCategoryLabel2["Warning"] = "warning";
|
|
@@ -3024,7 +3084,7 @@ var DiagnosticCategoryLabel;
|
|
|
3024
3084
|
DiagnosticCategoryLabel2["Suppress"] = "suppress";
|
|
3025
3085
|
})(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
|
|
3026
3086
|
|
|
3027
|
-
// bazel-out/
|
|
3087
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
3028
3088
|
var ExtendedTemplateCheckerImpl = class {
|
|
3029
3089
|
constructor(templateTypeChecker, typeChecker, templateCheckFactories, options) {
|
|
3030
3090
|
var _a, _b, _c, _d, _e;
|
|
@@ -3063,9 +3123,9 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
3063
3123
|
function diagnosticLabelToCategory(label) {
|
|
3064
3124
|
switch (label) {
|
|
3065
3125
|
case DiagnosticCategoryLabel.Warning:
|
|
3066
|
-
return
|
|
3126
|
+
return ts20.DiagnosticCategory.Warning;
|
|
3067
3127
|
case DiagnosticCategoryLabel.Error:
|
|
3068
|
-
return
|
|
3128
|
+
return ts20.DiagnosticCategory.Error;
|
|
3069
3129
|
case DiagnosticCategoryLabel.Suppress:
|
|
3070
3130
|
return null;
|
|
3071
3131
|
default:
|
|
@@ -3077,7 +3137,7 @@ function assertNever(value) {
|
|
|
3077
3137
|
${value}`);
|
|
3078
3138
|
}
|
|
3079
3139
|
|
|
3080
|
-
// bazel-out/
|
|
3140
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
|
|
3081
3141
|
var ALL_DIAGNOSTIC_FACTORIES = [
|
|
3082
3142
|
factory2,
|
|
3083
3143
|
factory5,
|
|
@@ -3095,9 +3155,9 @@ var SUPPORTED_DIAGNOSTIC_NAMES = /* @__PURE__ */ new Set([
|
|
|
3095
3155
|
...ALL_DIAGNOSTIC_FACTORIES.map((factory11) => factory11.name)
|
|
3096
3156
|
]);
|
|
3097
3157
|
|
|
3098
|
-
// bazel-out/
|
|
3158
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.mjs
|
|
3099
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";
|
|
3100
|
-
import
|
|
3160
|
+
import ts21 from "typescript";
|
|
3101
3161
|
var TemplateSemanticsCheckerImpl = class {
|
|
3102
3162
|
constructor(templateTypeChecker) {
|
|
3103
3163
|
this.templateTypeChecker = templateTypeChecker;
|
|
@@ -3172,7 +3232,7 @@ var ExpressionsSemanticsVisitor = class extends RecursiveAstVisitor3 {
|
|
|
3172
3232
|
}
|
|
3173
3233
|
makeIllegalTemplateVarDiagnostic(target, expressionNode, errorMessage) {
|
|
3174
3234
|
const span = target instanceof TmplAstVariable2 ? target.valueSpan || target.sourceSpan : target.sourceSpan;
|
|
3175
|
-
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, [
|
|
3176
3236
|
{
|
|
3177
3237
|
text: `'${target.name}' is declared here.`,
|
|
3178
3238
|
start: span.start.offset,
|
|
@@ -3186,8 +3246,8 @@ function unwrapAstWithSource(ast) {
|
|
|
3186
3246
|
return ast instanceof ASTWithSource6 ? ast.ast : ast;
|
|
3187
3247
|
}
|
|
3188
3248
|
|
|
3189
|
-
// bazel-out/
|
|
3190
|
-
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";
|
|
3191
3251
|
var APIS_TO_CHECK = [
|
|
3192
3252
|
INPUT_INITIALIZER_FN,
|
|
3193
3253
|
MODEL_INITIALIZER_FN,
|
|
@@ -3205,13 +3265,13 @@ var InitializerApiUsageRule = class {
|
|
|
3205
3265
|
});
|
|
3206
3266
|
}
|
|
3207
3267
|
checkNode(node) {
|
|
3208
|
-
if (!
|
|
3268
|
+
if (!ts22.isCallExpression(node)) {
|
|
3209
3269
|
return null;
|
|
3210
3270
|
}
|
|
3211
|
-
while (node.parent && (
|
|
3271
|
+
while (node.parent && (ts22.isParenthesizedExpression(node.parent) || ts22.isAsExpression(node.parent))) {
|
|
3212
3272
|
node = node.parent;
|
|
3213
3273
|
}
|
|
3214
|
-
if (!node.parent || !
|
|
3274
|
+
if (!node.parent || !ts22.isCallExpression(node)) {
|
|
3215
3275
|
return null;
|
|
3216
3276
|
}
|
|
3217
3277
|
const identifiedInitializer = tryParseInitializerApi(APIS_TO_CHECK, node, this.reflector, this.importedSymbolsTracker);
|
|
@@ -3219,12 +3279,12 @@ var InitializerApiUsageRule = class {
|
|
|
3219
3279
|
return null;
|
|
3220
3280
|
}
|
|
3221
3281
|
const functionName = identifiedInitializer.api.functionName + (identifiedInitializer.isRequired ? ".required" : "");
|
|
3222
|
-
if (
|
|
3282
|
+
if (ts22.isPropertyDeclaration(node.parent) && node.parent.initializer === node) {
|
|
3223
3283
|
let closestClass = node.parent;
|
|
3224
|
-
while (closestClass && !
|
|
3284
|
+
while (closestClass && !ts22.isClassDeclaration(closestClass)) {
|
|
3225
3285
|
closestClass = closestClass.parent;
|
|
3226
3286
|
}
|
|
3227
|
-
if (closestClass &&
|
|
3287
|
+
if (closestClass && ts22.isClassDeclaration(closestClass)) {
|
|
3228
3288
|
const decorators = this.reflector.getDecoratorsOfDeclaration(closestClass);
|
|
3229
3289
|
const isComponentOrDirective = decorators !== null && decorators.some((decorator) => {
|
|
3230
3290
|
var _a;
|
|
@@ -3237,7 +3297,7 @@ var InitializerApiUsageRule = class {
|
|
|
3237
3297
|
}
|
|
3238
3298
|
};
|
|
3239
3299
|
|
|
3240
|
-
// bazel-out/
|
|
3300
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/validation/src/source_file_validator.mjs
|
|
3241
3301
|
var SourceFileValidator = class {
|
|
3242
3302
|
constructor(reflector, importedSymbolsTracker) {
|
|
3243
3303
|
this.rules = [new InitializerApiUsageRule(reflector, importedSymbolsTracker)];
|
|
@@ -3275,7 +3335,7 @@ var SourceFileValidator = class {
|
|
|
3275
3335
|
}
|
|
3276
3336
|
};
|
|
3277
3337
|
|
|
3278
|
-
// bazel-out/
|
|
3338
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/core_version.mjs
|
|
3279
3339
|
function coreHasSymbol(program, symbol) {
|
|
3280
3340
|
const checker = program.getTypeChecker();
|
|
3281
3341
|
for (const sf of program.getSourceFiles().filter(isMaybeCore)) {
|
|
@@ -3294,7 +3354,7 @@ function isMaybeCore(sf) {
|
|
|
3294
3354
|
return sf.isDeclarationFile && sf.fileName.includes("@angular/core") && sf.fileName.endsWith("index.d.ts");
|
|
3295
3355
|
}
|
|
3296
3356
|
|
|
3297
|
-
// bazel-out/
|
|
3357
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/feature_detection.mjs
|
|
3298
3358
|
import semver from "semver";
|
|
3299
3359
|
function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
3300
3360
|
if (coreVersion === `0.0.0-${"PLACEHOLDER"}`) {
|
|
@@ -3303,7 +3363,7 @@ function coreVersionSupportsFeature(coreVersion, minVersion) {
|
|
|
3303
3363
|
return semver.satisfies(coreVersion, minVersion);
|
|
3304
3364
|
}
|
|
3305
3365
|
|
|
3306
|
-
// bazel-out/
|
|
3366
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
3307
3367
|
var CompilationTicketKind;
|
|
3308
3368
|
(function(CompilationTicketKind2) {
|
|
3309
3369
|
CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -3397,7 +3457,7 @@ var NgCompiler = class {
|
|
|
3397
3457
|
this.currentProgram = inputProgram;
|
|
3398
3458
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
3399
3459
|
this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
|
|
3400
|
-
const moduleResolutionCache =
|
|
3460
|
+
const moduleResolutionCache = ts23.createModuleResolutionCache(
|
|
3401
3461
|
this.adapter.getCurrentDirectory(),
|
|
3402
3462
|
this.adapter.getCanonicalFileName.bind(this.adapter)
|
|
3403
3463
|
);
|
|
@@ -3441,7 +3501,7 @@ var NgCompiler = class {
|
|
|
3441
3501
|
}
|
|
3442
3502
|
for (const clazz of classesToUpdate) {
|
|
3443
3503
|
this.compilation.traitCompiler.updateResources(clazz);
|
|
3444
|
-
if (!
|
|
3504
|
+
if (!ts23.isClassDeclaration(clazz)) {
|
|
3445
3505
|
continue;
|
|
3446
3506
|
}
|
|
3447
3507
|
this.compilation.templateTypeChecker.invalidateClass(clazz);
|
|
@@ -3595,12 +3655,12 @@ var NgCompiler = class {
|
|
|
3595
3655
|
if (compilation.supportJitMode && compilation.jitDeclarationRegistry.jitDeclarations.size > 0) {
|
|
3596
3656
|
const { jitDeclarations } = compilation.jitDeclarationRegistry;
|
|
3597
3657
|
const jitDeclarationsArray = Array.from(jitDeclarations);
|
|
3598
|
-
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) =>
|
|
3658
|
+
const jitDeclarationOriginalNodes = new Set(jitDeclarationsArray.map((d) => ts23.getOriginalNode(d)));
|
|
3599
3659
|
const sourceFilesWithJit = new Set(jitDeclarationsArray.map((d) => d.getSourceFile().fileName));
|
|
3600
3660
|
before.push((ctx) => {
|
|
3601
3661
|
const reflectionHost = new TypeScriptReflectionHost(this.inputProgram.getTypeChecker());
|
|
3602
3662
|
const jitTransform = angularJitApplicationTransform(this.inputProgram, compilation.isCore, (node) => {
|
|
3603
|
-
node =
|
|
3663
|
+
node = ts23.getOriginalNode(node, ts23.isClassDeclaration);
|
|
3604
3664
|
return reflectionHost.isClass(node) && jitDeclarationOriginalNodes.has(node);
|
|
3605
3665
|
})(ctx);
|
|
3606
3666
|
return (sourceFile) => {
|
|
@@ -3834,7 +3894,7 @@ var NgCompiler = class {
|
|
|
3834
3894
|
return diagnostics;
|
|
3835
3895
|
}
|
|
3836
3896
|
makeCompilation() {
|
|
3837
|
-
var _a, _b, _c, _d;
|
|
3897
|
+
var _a, _b, _c, _d, _e;
|
|
3838
3898
|
const isCore = isAngularCorePackage(this.inputProgram);
|
|
3839
3899
|
let compilationMode = CompilationMode.FULL;
|
|
3840
3900
|
if (!isCore) {
|
|
@@ -3929,11 +3989,11 @@ var NgCompiler = class {
|
|
|
3929
3989
|
}
|
|
3930
3990
|
const jitDeclarationRegistry = new JitDeclarationRegistry();
|
|
3931
3991
|
const handlers = [
|
|
3932
|
-
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, localCompilationExtraImportsTracker, jitDeclarationRegistry),
|
|
3992
|
+
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, ngModuleScopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs === true, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, hostDirectivesResolver, importTracker, supportTestBed, compilationMode, deferredSymbolsTracker, !!this.options.forbidOrphanComponents, this.enableBlockSyntax, this.enableLetSyntax, localCompilationExtraImportsTracker, jitDeclarationRegistry, (_d = this.options.i18nPreserveWhitespaceForLegacyExtraction) != null ? _d : true),
|
|
3933
3993
|
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder, importTracker, supportTestBed, compilationMode, jitDeclarationRegistry),
|
|
3934
3994
|
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, ngModuleScopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder, supportTestBed, compilationMode, !!this.options.generateExtraImportsInLocalMode),
|
|
3935
3995
|
new InjectableDecoratorHandler(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, compilationMode),
|
|
3936
|
-
new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (
|
|
3996
|
+
new NgModuleDecoratorHandler(reflector, evaluator, metaReader, metaRegistry, ngModuleScopeRegistry, referencesRegistry, exportedProviderStatusResolver, semanticDepGraphUpdater, isCore, refEmitter, this.closureCompilerEnabled, (_e = this.options.onlyPublishPublicTypingsForNgModules) != null ? _e : false, injectableRegistry, this.delegatingPerfRecorder, supportTestBed, supportJitMode, compilationMode, localCompilationExtraImportsTracker, jitDeclarationRegistry)
|
|
3937
3997
|
];
|
|
3938
3998
|
const traitCompiler = new TraitCompiler(handlers, reflector, this.delegatingPerfRecorder, this.incrementalCompilation, this.options.compileNonExportedClasses !== false, compilationMode, dtsTransforms, semanticDepGraphUpdater, this.adapter);
|
|
3939
3999
|
const notifyingDriver = new NotifyingProgramDriverWrapper(this.programDriver, (program) => {
|
|
@@ -3972,18 +4032,18 @@ function isAngularCorePackage(program) {
|
|
|
3972
4032
|
return false;
|
|
3973
4033
|
}
|
|
3974
4034
|
return r3Symbols.statements.some((stmt) => {
|
|
3975
|
-
if (!
|
|
4035
|
+
if (!ts23.isVariableStatement(stmt)) {
|
|
3976
4036
|
return false;
|
|
3977
4037
|
}
|
|
3978
|
-
const modifiers =
|
|
3979
|
-
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)) {
|
|
3980
4040
|
return false;
|
|
3981
4041
|
}
|
|
3982
4042
|
return stmt.declarationList.declarations.some((decl) => {
|
|
3983
|
-
if (!
|
|
4043
|
+
if (!ts23.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
|
|
3984
4044
|
return false;
|
|
3985
4045
|
}
|
|
3986
|
-
if (decl.initializer === void 0 || decl.initializer.kind !==
|
|
4046
|
+
if (decl.initializer === void 0 || decl.initializer.kind !== ts23.SyntaxKind.TrueKeyword) {
|
|
3987
4047
|
return false;
|
|
3988
4048
|
}
|
|
3989
4049
|
return true;
|
|
@@ -3997,7 +4057,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
|
|
|
3997
4057
|
var _a, _b, _c;
|
|
3998
4058
|
if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
|
|
3999
4059
|
yield makeConfigDiagnostic({
|
|
4000
|
-
category:
|
|
4060
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4001
4061
|
code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
|
|
4002
4062
|
messageText: `
|
|
4003
4063
|
Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
|
|
@@ -4016,7 +4076,7 @@ https://angular.dev/tools/cli/template-typecheck
|
|
|
4016
4076
|
}
|
|
4017
4077
|
if (options.extendedDiagnostics && options.strictTemplates === false) {
|
|
4018
4078
|
yield makeConfigDiagnostic({
|
|
4019
|
-
category:
|
|
4079
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4020
4080
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
|
|
4021
4081
|
messageText: `
|
|
4022
4082
|
Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
|
|
@@ -4033,7 +4093,7 @@ One of the following actions is required:
|
|
|
4033
4093
|
const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
|
|
4034
4094
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
4035
4095
|
yield makeConfigDiagnostic({
|
|
4036
|
-
category:
|
|
4096
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4037
4097
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4038
4098
|
messageText: `
|
|
4039
4099
|
Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
|
|
@@ -4046,7 +4106,7 @@ ${allowedCategoryLabels.join("\n")}
|
|
|
4046
4106
|
for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
|
|
4047
4107
|
if (!SUPPORTED_DIAGNOSTIC_NAMES.has(checkName)) {
|
|
4048
4108
|
yield makeConfigDiagnostic({
|
|
4049
|
-
category:
|
|
4109
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4050
4110
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
|
|
4051
4111
|
messageText: `
|
|
4052
4112
|
Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
|
|
@@ -4058,7 +4118,7 @@ ${Array.from(SUPPORTED_DIAGNOSTIC_NAMES).join("\n")}
|
|
|
4058
4118
|
}
|
|
4059
4119
|
if (!allowedCategoryLabels.includes(category)) {
|
|
4060
4120
|
yield makeConfigDiagnostic({
|
|
4061
|
-
category:
|
|
4121
|
+
category: ts23.DiagnosticCategory.Error,
|
|
4062
4122
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
4063
4123
|
messageText: `
|
|
4064
4124
|
Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
|
|
@@ -4088,7 +4148,7 @@ var ReferenceGraphAdapter = class {
|
|
|
4088
4148
|
for (const { node } of references) {
|
|
4089
4149
|
let sourceFile = node.getSourceFile();
|
|
4090
4150
|
if (sourceFile === void 0) {
|
|
4091
|
-
sourceFile =
|
|
4151
|
+
sourceFile = ts23.getOriginalNode(node).getSourceFile();
|
|
4092
4152
|
}
|
|
4093
4153
|
if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
|
|
4094
4154
|
this.graph.add(source, node);
|
|
@@ -4126,8 +4186,8 @@ function versionMapFromProgram(program, driver) {
|
|
|
4126
4186
|
return versions;
|
|
4127
4187
|
}
|
|
4128
4188
|
|
|
4129
|
-
// bazel-out/
|
|
4130
|
-
import
|
|
4189
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
4190
|
+
import ts24 from "typescript";
|
|
4131
4191
|
var DelegatingCompilerHost = class {
|
|
4132
4192
|
get jsDocParsingMode() {
|
|
4133
4193
|
return this.delegate.jsDocParsingMode;
|
|
@@ -4212,7 +4272,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4212
4272
|
entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
|
|
4213
4273
|
if (entryPoint === null) {
|
|
4214
4274
|
diagnostics.push({
|
|
4215
|
-
category:
|
|
4275
|
+
category: ts24.DiagnosticCategory.Error,
|
|
4216
4276
|
code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
|
|
4217
4277
|
file: void 0,
|
|
4218
4278
|
start: void 0,
|
|
@@ -4255,17 +4315,17 @@ var NgCompilerHost = class extends DelegatingCompilerHost {
|
|
|
4255
4315
|
return this.fileNameToModuleName !== void 0 ? this : null;
|
|
4256
4316
|
}
|
|
4257
4317
|
createCachedResolveModuleNamesFunction() {
|
|
4258
|
-
const moduleResolutionCache =
|
|
4318
|
+
const moduleResolutionCache = ts24.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
|
|
4259
4319
|
return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
|
|
4260
4320
|
return moduleNames.map((moduleName) => {
|
|
4261
|
-
const module =
|
|
4321
|
+
const module = ts24.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
|
|
4262
4322
|
return module.resolvedModule;
|
|
4263
4323
|
});
|
|
4264
4324
|
};
|
|
4265
4325
|
}
|
|
4266
4326
|
};
|
|
4267
4327
|
|
|
4268
|
-
// bazel-out/
|
|
4328
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
4269
4329
|
var NgtscProgram = class {
|
|
4270
4330
|
constructor(rootNames, options, delegateHost, oldProgram) {
|
|
4271
4331
|
this.options = options;
|
|
@@ -4282,7 +4342,7 @@ var NgtscProgram = class {
|
|
|
4282
4342
|
if (reuseProgram !== void 0) {
|
|
4283
4343
|
retagAllTsFiles(reuseProgram);
|
|
4284
4344
|
}
|
|
4285
|
-
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () =>
|
|
4345
|
+
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts25.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
|
|
4286
4346
|
perfRecorder.phase(PerfPhase.Unaccounted);
|
|
4287
4347
|
perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
|
|
4288
4348
|
this.host.postProgramCreationCleanup();
|
|
@@ -4395,7 +4455,7 @@ var NgtscProgram = class {
|
|
|
4395
4455
|
}
|
|
4396
4456
|
emitXi18n() {
|
|
4397
4457
|
var _a, _b, _c;
|
|
4398
|
-
const ctx = new MessageBundle(new HtmlParser(), [], {}, (_a = this.options.i18nOutLocale) != null ? _a : null);
|
|
4458
|
+
const ctx = new MessageBundle(new HtmlParser(), [], {}, (_a = this.options.i18nOutLocale) != null ? _a : null, this.options.i18nPreserveWhitespaceForLegacyExtraction);
|
|
4399
4459
|
this.compiler.xi18n(ctx);
|
|
4400
4460
|
i18nExtract((_b = this.options.i18nOutFormat) != null ? _b : null, (_c = this.options.i18nOutFile) != null ? _c : null, this.host, this.options, ctx, resolve);
|
|
4401
4461
|
}
|
|
@@ -4491,37 +4551,37 @@ function mergeEmitResults(emitResults) {
|
|
|
4491
4551
|
return { diagnostics, emitSkipped, emittedFiles };
|
|
4492
4552
|
}
|
|
4493
4553
|
|
|
4494
|
-
// bazel-out/
|
|
4554
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
|
|
4495
4555
|
function createProgram({ rootNames, options, host, oldProgram }) {
|
|
4496
4556
|
return new NgtscProgram(rootNames, options, host, oldProgram);
|
|
4497
4557
|
}
|
|
4498
4558
|
|
|
4499
|
-
// bazel-out/
|
|
4500
|
-
import
|
|
4559
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4560
|
+
import ts27 from "typescript";
|
|
4501
4561
|
|
|
4502
|
-
// bazel-out/
|
|
4503
|
-
import
|
|
4562
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
|
|
4563
|
+
import ts26 from "typescript";
|
|
4504
4564
|
function createMessageDiagnostic(messageText) {
|
|
4505
4565
|
return {
|
|
4506
4566
|
file: void 0,
|
|
4507
4567
|
start: void 0,
|
|
4508
4568
|
length: void 0,
|
|
4509
|
-
category:
|
|
4569
|
+
category: ts26.DiagnosticCategory.Message,
|
|
4510
4570
|
messageText,
|
|
4511
4571
|
code: DEFAULT_ERROR_CODE,
|
|
4512
4572
|
source: SOURCE
|
|
4513
4573
|
};
|
|
4514
4574
|
}
|
|
4515
4575
|
|
|
4516
|
-
// bazel-out/
|
|
4576
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
4517
4577
|
var defaultFormatHost = {
|
|
4518
|
-
getCurrentDirectory: () =>
|
|
4578
|
+
getCurrentDirectory: () => ts27.sys.getCurrentDirectory(),
|
|
4519
4579
|
getCanonicalFileName: (fileName) => fileName,
|
|
4520
|
-
getNewLine: () =>
|
|
4580
|
+
getNewLine: () => ts27.sys.newLine
|
|
4521
4581
|
};
|
|
4522
4582
|
function formatDiagnostics(diags, host = defaultFormatHost) {
|
|
4523
4583
|
if (diags && diags.length) {
|
|
4524
|
-
return diags.map((diagnostic) => replaceTsWithNgInErrors(
|
|
4584
|
+
return diags.map((diagnostic) => replaceTsWithNgInErrors(ts27.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
|
|
4525
4585
|
} else {
|
|
4526
4586
|
return "";
|
|
4527
4587
|
}
|
|
@@ -4538,7 +4598,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4538
4598
|
var _a;
|
|
4539
4599
|
try {
|
|
4540
4600
|
const fs = getFileSystem();
|
|
4541
|
-
const readConfigFile = (configFile) =>
|
|
4601
|
+
const readConfigFile = (configFile) => ts27.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
|
|
4542
4602
|
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
|
|
4543
4603
|
const { config: config2, error: error2 } = readConfigFile(configFile);
|
|
4544
4604
|
if (error2) {
|
|
@@ -4573,7 +4633,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4573
4633
|
...existingOptions
|
|
4574
4634
|
};
|
|
4575
4635
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4576
|
-
const { options, errors, fileNames: rootNames, projectReferences } =
|
|
4636
|
+
const { options, errors, fileNames: rootNames, projectReferences } = ts27.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
|
|
4577
4637
|
let emitFlags = EmitFlags.Default;
|
|
4578
4638
|
if (!(options["skipMetadataEmit"] || options["flatModuleOutFile"])) {
|
|
4579
4639
|
emitFlags |= EmitFlags.Metadata;
|
|
@@ -4585,7 +4645,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4585
4645
|
} catch (e) {
|
|
4586
4646
|
const errors = [
|
|
4587
4647
|
{
|
|
4588
|
-
category:
|
|
4648
|
+
category: ts27.DiagnosticCategory.Error,
|
|
4589
4649
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4590
4650
|
file: void 0,
|
|
4591
4651
|
start: void 0,
|
|
@@ -4600,7 +4660,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
4600
4660
|
function createParseConfigHost(host, fs = getFileSystem()) {
|
|
4601
4661
|
return {
|
|
4602
4662
|
fileExists: host.exists.bind(host),
|
|
4603
|
-
readDirectory:
|
|
4663
|
+
readDirectory: ts27.sys.readDirectory,
|
|
4604
4664
|
readFile: host.readFile.bind(host),
|
|
4605
4665
|
useCaseSensitiveFileNames: fs.isCaseSensitive()
|
|
4606
4666
|
};
|
|
@@ -4620,7 +4680,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4620
4680
|
}
|
|
4621
4681
|
} else {
|
|
4622
4682
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
4623
|
-
const { resolvedModule } =
|
|
4683
|
+
const { resolvedModule } = ts27.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts27.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
|
|
4624
4684
|
if (resolvedModule) {
|
|
4625
4685
|
return absoluteFrom(resolvedModule.resolvedFileName);
|
|
4626
4686
|
}
|
|
@@ -4630,7 +4690,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
4630
4690
|
function exitCodeFromResult(diags) {
|
|
4631
4691
|
if (!diags)
|
|
4632
4692
|
return 0;
|
|
4633
|
-
if (diags.every((diag) => diag.category !==
|
|
4693
|
+
if (diags.every((diag) => diag.category !== ts27.DiagnosticCategory.Error)) {
|
|
4634
4694
|
return 0;
|
|
4635
4695
|
}
|
|
4636
4696
|
return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
|
|
@@ -4669,7 +4729,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
4669
4729
|
} catch (e) {
|
|
4670
4730
|
program = void 0;
|
|
4671
4731
|
allDiagnostics.push({
|
|
4672
|
-
category:
|
|
4732
|
+
category: ts27.DiagnosticCategory.Error,
|
|
4673
4733
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
4674
4734
|
code: UNKNOWN_ERROR_CODE,
|
|
4675
4735
|
file: void 0,
|
|
@@ -4699,7 +4759,7 @@ function defaultGatherDiagnostics(program) {
|
|
|
4699
4759
|
return allDiagnostics;
|
|
4700
4760
|
}
|
|
4701
4761
|
function hasErrors(diags) {
|
|
4702
|
-
return diags.some((d) => d.category ===
|
|
4762
|
+
return diags.some((d) => d.category === ts27.DiagnosticCategory.Error);
|
|
4703
4763
|
}
|
|
4704
4764
|
|
|
4705
4765
|
export {
|
|
@@ -4744,4 +4804,4 @@ export {
|
|
|
4744
4804
|
* Use of this source code is governed by an MIT-style license that can be
|
|
4745
4805
|
* found in the LICENSE file at https://angular.io/license
|
|
4746
4806
|
*/
|
|
4747
|
-
//# sourceMappingURL=chunk-
|
|
4807
|
+
//# sourceMappingURL=chunk-2Q6KYU3A.js.map
|