@angular/compiler-cli 13.2.0 → 14.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-QBU7RUKB.js → chunk-2XJJHADR.js} +36 -27
- package/bundles/chunk-2XJJHADR.js.map +6 -0
- package/bundles/{chunk-ADHVDA4A.js → chunk-3WNAIXKA.js} +7 -7
- package/bundles/{chunk-ADHVDA4A.js.map → chunk-3WNAIXKA.js.map} +1 -1
- package/bundles/{chunk-XHMJ6POQ.js → chunk-4EUDG74G.js} +71 -71
- package/bundles/{chunk-XHMJ6POQ.js.map → chunk-4EUDG74G.js.map} +1 -1
- package/bundles/{chunk-UESD6FVI.js → chunk-4N4Y5TPT.js} +36 -33
- package/bundles/chunk-4N4Y5TPT.js.map +6 -0
- package/bundles/{chunk-QDWL7SZJ.js → chunk-BPCUCINV.js} +2 -2
- package/bundles/{chunk-QDWL7SZJ.js.map → chunk-BPCUCINV.js.map} +0 -0
- package/bundles/{chunk-GLCRIILX.js → chunk-J6CW3T62.js} +5 -5
- package/bundles/{chunk-GLCRIILX.js.map → chunk-J6CW3T62.js.map} +0 -0
- package/bundles/{chunk-XDGI7TS4.js → chunk-JL6TC6CB.js} +181 -156
- package/bundles/chunk-JL6TC6CB.js.map +6 -0
- package/bundles/{chunk-5CHRTEXL.js → chunk-JR2JHPEZ.js} +40 -40
- package/bundles/{chunk-5CHRTEXL.js.map → chunk-JR2JHPEZ.js.map} +1 -1
- package/bundles/{chunk-SKBLJA43.js → chunk-JTYUTYS2.js} +3 -3
- package/bundles/{chunk-SKBLJA43.js.map → chunk-JTYUTYS2.js.map} +0 -0
- package/bundles/{chunk-O4XVCXRT.js → chunk-LL4S3DRM.js} +4 -4
- package/bundles/{chunk-O4XVCXRT.js.map → chunk-LL4S3DRM.js.map} +0 -0
- package/bundles/{chunk-LMCFGUUV.js → chunk-N4EP6MZR.js} +1777 -1547
- package/bundles/chunk-N4EP6MZR.js.map +6 -0
- package/bundles/{chunk-676MI6WZ.js → chunk-QZBA4KSX.js} +11 -11
- package/bundles/{chunk-676MI6WZ.js.map → chunk-QZBA4KSX.js.map} +1 -1
- package/bundles/{chunk-A5PL3TE6.js → chunk-RNVIUKDY.js} +6 -6
- package/bundles/{chunk-A5PL3TE6.js.map → chunk-RNVIUKDY.js.map} +0 -0
- package/bundles/{chunk-OFPFDCGQ.js → chunk-VOXD467J.js} +5 -5
- package/bundles/{chunk-OFPFDCGQ.js.map → chunk-VOXD467J.js.map} +0 -0
- package/bundles/{chunk-7PY7XEFH.js → chunk-XXMNTCYN.js} +6 -6
- package/bundles/{chunk-7PY7XEFH.js.map → chunk-XXMNTCYN.js.map} +0 -0
- package/bundles/index.js +12 -12
- package/bundles/linker/babel/index.js +12 -12
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +4 -4
- package/bundles/ngcc/index.js +12 -12
- package/bundles/ngcc/main-ngcc.js +13 -13
- package/bundles/ngcc/main-ngcc.js.map +1 -1
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +13 -13
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +4 -4
- package/bundles/private/bazel.js +1 -1
- package/bundles/private/localize.js +3 -3
- package/bundles/private/migrations.js +5 -5
- package/bundles/private/tooling.js +2 -2
- package/bundles/src/bin/ng_xi18n.js +10 -10
- package/bundles/src/bin/ngc.js +8 -8
- package/bundles_metadata.json +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -3
- package/src/ngtsc/annotations/common/index.d.ts +16 -0
- package/src/ngtsc/annotations/{src → common/src}/api.d.ts +1 -1
- package/src/ngtsc/annotations/common/src/di.d.ts +38 -0
- package/src/ngtsc/annotations/{src → common/src}/diagnostics.d.ts +15 -7
- package/src/ngtsc/annotations/common/src/evaluation.d.ts +18 -0
- package/src/ngtsc/annotations/{src → common/src}/factory.d.ts +2 -2
- package/src/ngtsc/annotations/{src → common/src}/metadata.d.ts +2 -2
- package/src/ngtsc/annotations/{src → common/src}/references_registry.d.ts +3 -3
- package/src/ngtsc/annotations/{src → common/src}/util.d.ts +7 -43
- package/src/ngtsc/annotations/component/index.d.ts +9 -0
- package/src/ngtsc/annotations/component/src/diagnostics.d.ts +20 -0
- package/src/ngtsc/annotations/component/src/handler.d.ts +92 -0
- package/src/ngtsc/annotations/component/src/metadata.d.ts +61 -0
- package/src/ngtsc/annotations/component/src/resources.d.ts +123 -0
- package/src/ngtsc/annotations/component/src/scope.d.ts +20 -0
- package/src/ngtsc/annotations/component/src/symbol.d.ts +20 -0
- package/src/ngtsc/annotations/component/src/util.d.ts +24 -0
- package/src/ngtsc/annotations/directive/index.d.ts +11 -0
- package/src/ngtsc/annotations/directive/src/handler.d.ts +59 -0
- package/src/ngtsc/annotations/directive/src/shared.d.ts +30 -0
- package/src/ngtsc/annotations/directive/src/symbol.d.ts +27 -0
- package/src/ngtsc/annotations/index.d.ts +4 -6
- package/src/ngtsc/annotations/ng_module/index.d.ts +9 -0
- package/src/ngtsc/annotations/{src/ng_module.d.ts → ng_module/src/handler.d.ts} +11 -11
- package/src/ngtsc/core/api/src/options.d.ts +0 -4
- package/src/ngtsc/diagnostics/src/error_code.d.ts +17 -0
- package/src/ngtsc/imports/src/emitter.d.ts +16 -2
- package/src/ngtsc/indexer/src/api.d.ts +1 -0
- package/src/ngtsc/indexer/src/template.d.ts +4 -1
- package/src/ngtsc/metadata/src/api.d.ts +5 -0
- package/bundles/chunk-LMCFGUUV.js.map +0 -6
- package/bundles/chunk-QBU7RUKB.js.map +0 -6
- package/bundles/chunk-UESD6FVI.js.map +0 -6
- package/bundles/chunk-XDGI7TS4.js.map +0 -6
- package/src/ngtsc/annotations/src/component.d.ts +0 -246
- package/src/ngtsc/annotations/src/directive.d.ts +0 -99
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
ivyTransformFactory,
|
|
35
35
|
retagAllTsFiles,
|
|
36
36
|
untagAllTsFiles
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-N4EP6MZR.js";
|
|
38
38
|
import {
|
|
39
39
|
TypeScriptReflectionHost,
|
|
40
40
|
isNamedClassDeclaration
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XXMNTCYN.js";
|
|
42
42
|
import {
|
|
43
43
|
AbsoluteModuleStrategy,
|
|
44
44
|
AliasStrategy,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
toUnredirectedSourceFile,
|
|
80
80
|
translateExpression,
|
|
81
81
|
translateType
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-2XJJHADR.js";
|
|
83
83
|
import {
|
|
84
84
|
LogicalFileSystem,
|
|
85
85
|
absoluteFrom,
|
|
@@ -89,20 +89,20 @@ import {
|
|
|
89
89
|
getSourceFileOrError,
|
|
90
90
|
join,
|
|
91
91
|
resolve
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-QZBA4KSX.js";
|
|
93
93
|
import {
|
|
94
94
|
ActivePerfRecorder,
|
|
95
95
|
DelegatingPerfRecorder,
|
|
96
96
|
PerfCheckpoint,
|
|
97
97
|
PerfEvent,
|
|
98
98
|
PerfPhase
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-J6CW3T62.js";
|
|
100
100
|
import {
|
|
101
101
|
__spreadProps,
|
|
102
102
|
__spreadValues
|
|
103
103
|
} from "./chunk-WQ3TNYTD.js";
|
|
104
104
|
|
|
105
|
-
// bazel-out/
|
|
105
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
106
106
|
var DEFAULT_ERROR_CODE = 100;
|
|
107
107
|
var UNKNOWN_ERROR_CODE = 500;
|
|
108
108
|
var SOURCE = "angular";
|
|
@@ -120,7 +120,7 @@ var EmitFlags;
|
|
|
120
120
|
EmitFlags2[EmitFlags2["All"] = 31] = "All";
|
|
121
121
|
})(EmitFlags || (EmitFlags = {}));
|
|
122
122
|
|
|
123
|
-
// bazel-out/
|
|
123
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
|
|
124
124
|
import ts from "typescript";
|
|
125
125
|
var wrapHostForTest = null;
|
|
126
126
|
function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, true) }) {
|
|
@@ -130,21 +130,21 @@ function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, t
|
|
|
130
130
|
return tsHost;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
// bazel-out/
|
|
133
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
|
|
134
134
|
var OptimizeFor;
|
|
135
135
|
(function(OptimizeFor2) {
|
|
136
136
|
OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
|
|
137
137
|
OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
|
|
138
138
|
})(OptimizeFor || (OptimizeFor = {}));
|
|
139
139
|
|
|
140
|
-
// bazel-out/
|
|
140
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
|
|
141
141
|
var CompletionKind;
|
|
142
142
|
(function(CompletionKind2) {
|
|
143
143
|
CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
|
|
144
144
|
CompletionKind2[CompletionKind2["Variable"] = 1] = "Variable";
|
|
145
145
|
})(CompletionKind || (CompletionKind = {}));
|
|
146
146
|
|
|
147
|
-
// bazel-out/
|
|
147
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
|
|
148
148
|
var SymbolKind;
|
|
149
149
|
(function(SymbolKind2) {
|
|
150
150
|
SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
|
|
@@ -160,11 +160,11 @@ var SymbolKind;
|
|
|
160
160
|
SymbolKind2[SymbolKind2["Pipe"] = 10] = "Pipe";
|
|
161
161
|
})(SymbolKind || (SymbolKind = {}));
|
|
162
162
|
|
|
163
|
-
// bazel-out/
|
|
163
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
164
164
|
import { HtmlParser, MessageBundle } from "@angular/compiler";
|
|
165
|
-
import
|
|
165
|
+
import ts32 from "typescript";
|
|
166
166
|
|
|
167
|
-
// bazel-out/
|
|
167
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
|
|
168
168
|
import { Xliff, Xliff2, Xmb } from "@angular/compiler";
|
|
169
169
|
import * as path from "path";
|
|
170
170
|
function i18nGetExtension(formatName) {
|
|
@@ -215,10 +215,10 @@ function getPathNormalizer(basePath) {
|
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
// bazel-out/
|
|
218
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
219
219
|
import ts2 from "typescript";
|
|
220
220
|
|
|
221
|
-
// bazel-out/
|
|
221
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
|
|
222
222
|
function toNumbers(value) {
|
|
223
223
|
const suffixIndex = value.lastIndexOf("-");
|
|
224
224
|
return value.slice(0, suffixIndex === -1 ? value.length : suffixIndex).split(".").map((segment) => {
|
|
@@ -253,7 +253,7 @@ function compareVersions(v1, v2) {
|
|
|
253
253
|
return compareNumbers(toNumbers(v1), toNumbers(v2));
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
// bazel-out/
|
|
256
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
257
257
|
var MIN_TS_VERSION = "4.4.2";
|
|
258
258
|
var MAX_TS_VERSION = "4.6.0";
|
|
259
259
|
var tsVersion = ts2.version;
|
|
@@ -266,10 +266,10 @@ function verifySupportedTypeScriptVersion() {
|
|
|
266
266
|
checkVersion(tsVersion, MIN_TS_VERSION, MAX_TS_VERSION);
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
// bazel-out/
|
|
270
|
-
import
|
|
269
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
270
|
+
import ts30 from "typescript";
|
|
271
271
|
|
|
272
|
-
// bazel-out/
|
|
272
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
273
273
|
var CycleAnalyzer = class {
|
|
274
274
|
constructor(importGraph) {
|
|
275
275
|
this.importGraph = importGraph;
|
|
@@ -340,7 +340,7 @@ var Cycle = class {
|
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
342
|
|
|
343
|
-
// bazel-out/
|
|
343
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
|
|
344
344
|
import ts3 from "typescript";
|
|
345
345
|
var ImportGraph = class {
|
|
346
346
|
constructor(checker, perf) {
|
|
@@ -432,7 +432,7 @@ var Found = class {
|
|
|
432
432
|
}
|
|
433
433
|
};
|
|
434
434
|
|
|
435
|
-
// bazel-out/
|
|
435
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
|
|
436
436
|
import ts4 from "typescript";
|
|
437
437
|
var FlatIndexGenerator = class {
|
|
438
438
|
constructor(entryPoint, relativeFlatIndexPath, moduleName) {
|
|
@@ -457,7 +457,7 @@ export * from '${relativeEntryPoint}';
|
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
459
|
|
|
460
|
-
// bazel-out/
|
|
460
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
|
|
461
461
|
function findFlatIndexEntryPoint(rootFiles) {
|
|
462
462
|
const tsFiles = rootFiles.filter((file) => isNonDeclarationTsPath(file));
|
|
463
463
|
let resolvedEntryPoint = null;
|
|
@@ -473,7 +473,7 @@ function findFlatIndexEntryPoint(rootFiles) {
|
|
|
473
473
|
return resolvedEntryPoint;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
// bazel-out/
|
|
476
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
|
|
477
477
|
import ts5 from "typescript";
|
|
478
478
|
function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
479
479
|
const diagnostics = [];
|
|
@@ -553,7 +553,7 @@ function getDescriptorOfDeclaration(decl) {
|
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
|
|
556
|
-
// bazel-out/
|
|
556
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
|
|
557
557
|
var ReferenceGraph = class {
|
|
558
558
|
constructor() {
|
|
559
559
|
this.references = /* @__PURE__ */ new Map();
|
|
@@ -607,7 +607,7 @@ var ReferenceGraph = class {
|
|
|
607
607
|
}
|
|
608
608
|
};
|
|
609
609
|
|
|
610
|
-
// bazel-out/
|
|
610
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
|
|
611
611
|
var NgOriginalFile = Symbol("NgOriginalFile");
|
|
612
612
|
var UpdateMode;
|
|
613
613
|
(function(UpdateMode2) {
|
|
@@ -615,7 +615,7 @@ var UpdateMode;
|
|
|
615
615
|
UpdateMode2[UpdateMode2["Incremental"] = 1] = "Incremental";
|
|
616
616
|
})(UpdateMode || (UpdateMode = {}));
|
|
617
617
|
|
|
618
|
-
// bazel-out/
|
|
618
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
619
619
|
import ts6 from "typescript";
|
|
620
620
|
var DelegatingCompilerHost = class {
|
|
621
621
|
constructor(delegate) {
|
|
@@ -726,7 +726,7 @@ var TsCreateProgramDriver = class {
|
|
|
726
726
|
}
|
|
727
727
|
};
|
|
728
728
|
|
|
729
|
-
// bazel-out/
|
|
729
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
|
|
730
730
|
var FileDependencyGraph = class {
|
|
731
731
|
constructor() {
|
|
732
732
|
this.nodes = /* @__PURE__ */ new Map();
|
|
@@ -793,7 +793,7 @@ function isLogicallyChanged(sf, node, changedTsPaths, deletedTsPaths, changedRes
|
|
|
793
793
|
return false;
|
|
794
794
|
}
|
|
795
795
|
|
|
796
|
-
// bazel-out/
|
|
796
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
|
|
797
797
|
var IncrementalStateKind;
|
|
798
798
|
(function(IncrementalStateKind2) {
|
|
799
799
|
IncrementalStateKind2[IncrementalStateKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -801,7 +801,7 @@ var IncrementalStateKind;
|
|
|
801
801
|
IncrementalStateKind2[IncrementalStateKind2["Analyzed"] = 2] = "Analyzed";
|
|
802
802
|
})(IncrementalStateKind || (IncrementalStateKind = {}));
|
|
803
803
|
|
|
804
|
-
// bazel-out/
|
|
804
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
|
|
805
805
|
var PhaseKind;
|
|
806
806
|
(function(PhaseKind2) {
|
|
807
807
|
PhaseKind2[PhaseKind2["Analysis"] = 0] = "Analysis";
|
|
@@ -1002,7 +1002,7 @@ function toOriginalSourceFile(sf) {
|
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
1004
|
|
|
1005
|
-
// bazel-out/
|
|
1005
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
|
|
1006
1006
|
var TrackedIncrementalBuildStrategy = class {
|
|
1007
1007
|
constructor() {
|
|
1008
1008
|
this.state = null;
|
|
@@ -1038,7 +1038,7 @@ var PatchedProgramIncrementalBuildStrategy = class {
|
|
|
1038
1038
|
};
|
|
1039
1039
|
var SYM_INCREMENTAL_STATE = Symbol("NgIncrementalState");
|
|
1040
1040
|
|
|
1041
|
-
// bazel-out/
|
|
1041
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
|
|
1042
1042
|
var IdentifierKind;
|
|
1043
1043
|
(function(IdentifierKind2) {
|
|
1044
1044
|
IdentifierKind2[IdentifierKind2["Property"] = 0] = "Property";
|
|
@@ -1056,7 +1056,7 @@ var AbsoluteSourceSpan = class {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
};
|
|
1058
1058
|
|
|
1059
|
-
// bazel-out/
|
|
1059
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
|
|
1060
1060
|
var IndexingContext = class {
|
|
1061
1061
|
constructor() {
|
|
1062
1062
|
this.components = /* @__PURE__ */ new Set();
|
|
@@ -1066,10 +1066,10 @@ var IndexingContext = class {
|
|
|
1066
1066
|
}
|
|
1067
1067
|
};
|
|
1068
1068
|
|
|
1069
|
-
// bazel-out/
|
|
1069
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
1070
1070
|
import { ParseSourceFile } from "@angular/compiler";
|
|
1071
1071
|
|
|
1072
|
-
// bazel-out/
|
|
1072
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
|
|
1073
1073
|
import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate } from "@angular/compiler";
|
|
1074
1074
|
var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
1075
1075
|
constructor(expressionStr, absoluteOffset, boundTemplate, targetToIdentifier) {
|
|
@@ -1079,11 +1079,12 @@ var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
|
1079
1079
|
this.boundTemplate = boundTemplate;
|
|
1080
1080
|
this.targetToIdentifier = targetToIdentifier;
|
|
1081
1081
|
this.identifiers = [];
|
|
1082
|
+
this.errors = [];
|
|
1082
1083
|
}
|
|
1083
1084
|
static getIdentifiers(ast, source, absoluteOffset, boundTemplate, targetToIdentifier) {
|
|
1084
1085
|
const visitor = new ExpressionVisitor(source, absoluteOffset, boundTemplate, targetToIdentifier);
|
|
1085
1086
|
visitor.visit(ast);
|
|
1086
|
-
return visitor.identifiers;
|
|
1087
|
+
return { identifiers: visitor.identifiers, errors: visitor.errors };
|
|
1087
1088
|
}
|
|
1088
1089
|
visit(ast) {
|
|
1089
1090
|
ast.visit(this);
|
|
@@ -1105,7 +1106,8 @@ var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
|
1105
1106
|
identifierStart = ast.nameSpan.start - this.absoluteOffset;
|
|
1106
1107
|
}
|
|
1107
1108
|
if (!this.expressionStr.substring(identifierStart).startsWith(ast.name)) {
|
|
1108
|
-
|
|
1109
|
+
this.errors.push(new Error(`Impossible state: "${ast.name}" not found in "${this.expressionStr}" at location ${identifierStart}`));
|
|
1110
|
+
return;
|
|
1109
1111
|
}
|
|
1110
1112
|
const absoluteStart = this.absoluteOffset + identifierStart;
|
|
1111
1113
|
const span = new AbsoluteSourceSpan(absoluteStart, absoluteStart + ast.name.length);
|
|
@@ -1125,6 +1127,7 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1125
1127
|
super();
|
|
1126
1128
|
this.boundTemplate = boundTemplate;
|
|
1127
1129
|
this.identifiers = /* @__PURE__ */ new Set();
|
|
1130
|
+
this.errors = [];
|
|
1128
1131
|
this.targetIdentifierCache = /* @__PURE__ */ new Map();
|
|
1129
1132
|
this.elementAndTemplateIdentifierCache = /* @__PURE__ */ new Map();
|
|
1130
1133
|
}
|
|
@@ -1136,7 +1139,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1136
1139
|
}
|
|
1137
1140
|
visitElement(element) {
|
|
1138
1141
|
const elementIdentifier = this.elementOrTemplateToIdentifier(element);
|
|
1139
|
-
|
|
1142
|
+
if (elementIdentifier !== null) {
|
|
1143
|
+
this.identifiers.add(elementIdentifier);
|
|
1144
|
+
}
|
|
1140
1145
|
this.visitAll(element.references);
|
|
1141
1146
|
this.visitAll(element.inputs);
|
|
1142
1147
|
this.visitAll(element.attributes);
|
|
@@ -1145,7 +1150,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1145
1150
|
}
|
|
1146
1151
|
visitTemplate(template) {
|
|
1147
1152
|
const templateIdentifier = this.elementOrTemplateToIdentifier(template);
|
|
1148
|
-
|
|
1153
|
+
if (templateIdentifier !== null) {
|
|
1154
|
+
this.identifiers.add(templateIdentifier);
|
|
1155
|
+
}
|
|
1149
1156
|
this.visitAll(template.variables);
|
|
1150
1157
|
this.visitAll(template.attributes);
|
|
1151
1158
|
this.visitAll(template.templateAttrs);
|
|
@@ -1156,8 +1163,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1156
1163
|
if (attribute.valueSpan === void 0) {
|
|
1157
1164
|
return;
|
|
1158
1165
|
}
|
|
1159
|
-
const identifiers = ExpressionVisitor.getIdentifiers(attribute.value, attribute.valueSpan.toString(), attribute.valueSpan.start.offset, this.boundTemplate, this.targetToIdentifier.bind(this));
|
|
1166
|
+
const { identifiers, errors } = ExpressionVisitor.getIdentifiers(attribute.value, attribute.valueSpan.toString(), attribute.valueSpan.start.offset, this.boundTemplate, this.targetToIdentifier.bind(this));
|
|
1160
1167
|
identifiers.forEach((id) => this.identifiers.add(id));
|
|
1168
|
+
this.errors.push(...errors);
|
|
1161
1169
|
}
|
|
1162
1170
|
visitBoundEvent(attribute) {
|
|
1163
1171
|
this.visitExpression(attribute.handler);
|
|
@@ -1167,10 +1175,16 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1167
1175
|
}
|
|
1168
1176
|
visitReference(reference) {
|
|
1169
1177
|
const referenceIdentifer = this.targetToIdentifier(reference);
|
|
1178
|
+
if (referenceIdentifer === null) {
|
|
1179
|
+
return;
|
|
1180
|
+
}
|
|
1170
1181
|
this.identifiers.add(referenceIdentifer);
|
|
1171
1182
|
}
|
|
1172
1183
|
visitVariable(variable) {
|
|
1173
1184
|
const variableIdentifier = this.targetToIdentifier(variable);
|
|
1185
|
+
if (variableIdentifier === null) {
|
|
1186
|
+
return;
|
|
1187
|
+
}
|
|
1174
1188
|
this.identifiers.add(variableIdentifier);
|
|
1175
1189
|
}
|
|
1176
1190
|
elementOrTemplateToIdentifier(node) {
|
|
@@ -1192,6 +1206,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1192
1206
|
}
|
|
1193
1207
|
const sourceSpan = node.startSourceSpan;
|
|
1194
1208
|
const start = this.getStartLocation(name, sourceSpan);
|
|
1209
|
+
if (start === null) {
|
|
1210
|
+
return null;
|
|
1211
|
+
}
|
|
1195
1212
|
const absoluteSpan = new AbsoluteSourceSpan(start, start + name.length);
|
|
1196
1213
|
const attributes = node.attributes.map(({ name: name2, sourceSpan: sourceSpan2 }) => {
|
|
1197
1214
|
return {
|
|
@@ -1222,23 +1239,30 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1222
1239
|
}
|
|
1223
1240
|
const { name, sourceSpan } = node;
|
|
1224
1241
|
const start = this.getStartLocation(name, sourceSpan);
|
|
1242
|
+
if (start === null) {
|
|
1243
|
+
return null;
|
|
1244
|
+
}
|
|
1225
1245
|
const span = new AbsoluteSourceSpan(start, start + name.length);
|
|
1226
1246
|
let identifier;
|
|
1227
1247
|
if (node instanceof TmplAstReference) {
|
|
1228
1248
|
const refTarget = this.boundTemplate.getReferenceTarget(node);
|
|
1229
1249
|
let target = null;
|
|
1230
1250
|
if (refTarget) {
|
|
1251
|
+
let node2 = null;
|
|
1252
|
+
let directive = null;
|
|
1231
1253
|
if (refTarget instanceof TmplAstElement || refTarget instanceof TmplAstTemplate) {
|
|
1232
|
-
|
|
1233
|
-
node: this.elementOrTemplateToIdentifier(refTarget),
|
|
1234
|
-
directive: null
|
|
1235
|
-
};
|
|
1254
|
+
node2 = this.elementOrTemplateToIdentifier(refTarget);
|
|
1236
1255
|
} else {
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
directive: refTarget.directive.ref.node
|
|
1240
|
-
};
|
|
1256
|
+
node2 = this.elementOrTemplateToIdentifier(refTarget.node);
|
|
1257
|
+
directive = refTarget.directive.ref.node;
|
|
1241
1258
|
}
|
|
1259
|
+
if (node2 === null) {
|
|
1260
|
+
return null;
|
|
1261
|
+
}
|
|
1262
|
+
target = {
|
|
1263
|
+
node: node2,
|
|
1264
|
+
directive
|
|
1265
|
+
};
|
|
1242
1266
|
}
|
|
1243
1267
|
identifier = {
|
|
1244
1268
|
name,
|
|
@@ -1259,7 +1283,8 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1259
1283
|
getStartLocation(name, context) {
|
|
1260
1284
|
const localStr = context.toString();
|
|
1261
1285
|
if (!localStr.includes(name)) {
|
|
1262
|
-
|
|
1286
|
+
this.errors.push(new Error(`Impossible state: "${name}" not found in "${localStr}"`));
|
|
1287
|
+
return null;
|
|
1263
1288
|
}
|
|
1264
1289
|
return context.start.offset + localStr.indexOf(name);
|
|
1265
1290
|
}
|
|
@@ -1267,8 +1292,9 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1267
1292
|
if (ast instanceof ASTWithSource && ast.source !== null) {
|
|
1268
1293
|
const targetToIdentifier = this.targetToIdentifier.bind(this);
|
|
1269
1294
|
const absoluteOffset = ast.sourceSpan.start;
|
|
1270
|
-
const identifiers = ExpressionVisitor.getIdentifiers(ast, ast.source, absoluteOffset, this.boundTemplate, targetToIdentifier);
|
|
1295
|
+
const { identifiers, errors } = ExpressionVisitor.getIdentifiers(ast, ast.source, absoluteOffset, this.boundTemplate, targetToIdentifier);
|
|
1271
1296
|
identifiers.forEach((id) => this.identifiers.add(id));
|
|
1297
|
+
this.errors.push(...errors);
|
|
1272
1298
|
}
|
|
1273
1299
|
}
|
|
1274
1300
|
};
|
|
@@ -1277,10 +1303,10 @@ function getTemplateIdentifiers(boundTemplate) {
|
|
|
1277
1303
|
if (boundTemplate.target.template !== void 0) {
|
|
1278
1304
|
visitor.visitAll(boundTemplate.target.template);
|
|
1279
1305
|
}
|
|
1280
|
-
return visitor.identifiers;
|
|
1306
|
+
return { identifiers: visitor.identifiers, errors: visitor.errors };
|
|
1281
1307
|
}
|
|
1282
1308
|
|
|
1283
|
-
// bazel-out/
|
|
1309
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
1284
1310
|
function generateAnalysis(context) {
|
|
1285
1311
|
const analysis = /* @__PURE__ */ new Map();
|
|
1286
1312
|
context.components.forEach(({ declaration, selector, boundTemplate, templateMeta }) => {
|
|
@@ -1299,22 +1325,24 @@ function generateAnalysis(context) {
|
|
|
1299
1325
|
} else {
|
|
1300
1326
|
templateFile = templateMeta.file;
|
|
1301
1327
|
}
|
|
1328
|
+
const { identifiers, errors } = getTemplateIdentifiers(boundTemplate);
|
|
1302
1329
|
analysis.set(declaration, {
|
|
1303
1330
|
name,
|
|
1304
1331
|
selector,
|
|
1305
1332
|
file: componentFile,
|
|
1306
1333
|
template: {
|
|
1307
|
-
identifiers
|
|
1334
|
+
identifiers,
|
|
1308
1335
|
usedComponents,
|
|
1309
1336
|
isInline: templateMeta.isInline,
|
|
1310
1337
|
file: templateFile
|
|
1311
|
-
}
|
|
1338
|
+
},
|
|
1339
|
+
errors
|
|
1312
1340
|
});
|
|
1313
1341
|
});
|
|
1314
1342
|
return analysis;
|
|
1315
1343
|
}
|
|
1316
1344
|
|
|
1317
|
-
// bazel-out/
|
|
1345
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
|
|
1318
1346
|
import ts7 from "typescript";
|
|
1319
1347
|
var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
|
|
1320
1348
|
var RESOURCE_MARKER = ".$ngresource$";
|
|
@@ -1460,7 +1488,7 @@ function createLookupResolutionHost(adapter) {
|
|
|
1460
1488
|
};
|
|
1461
1489
|
}
|
|
1462
1490
|
|
|
1463
|
-
// bazel-out/
|
|
1491
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/dependency.mjs
|
|
1464
1492
|
var MetadataDtsModuleScopeResolver = class {
|
|
1465
1493
|
constructor(dtsMetaReader, aliasingHost) {
|
|
1466
1494
|
this.dtsMetaReader = dtsMetaReader;
|
|
@@ -1546,7 +1574,7 @@ var MetadataDtsModuleScopeResolver = class {
|
|
|
1546
1574
|
}
|
|
1547
1575
|
};
|
|
1548
1576
|
|
|
1549
|
-
// bazel-out/
|
|
1577
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/local.mjs
|
|
1550
1578
|
import { ExternalExpr } from "@angular/compiler";
|
|
1551
1579
|
import ts8 from "typescript";
|
|
1552
1580
|
var LocalModuleScopeRegistry = class {
|
|
@@ -1856,7 +1884,7 @@ function reexportCollision(module, refA, refB) {
|
|
|
1856
1884
|
]);
|
|
1857
1885
|
}
|
|
1858
1886
|
|
|
1859
|
-
// bazel-out/
|
|
1887
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/typecheck.mjs
|
|
1860
1888
|
import { CssSelector, SelectorMatcher } from "@angular/compiler";
|
|
1861
1889
|
import ts9 from "typescript";
|
|
1862
1890
|
var TypeCheckScopeRegistry = class {
|
|
@@ -1917,10 +1945,10 @@ var TypeCheckScopeRegistry = class {
|
|
|
1917
1945
|
}
|
|
1918
1946
|
};
|
|
1919
1947
|
|
|
1920
|
-
// bazel-out/
|
|
1948
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
1921
1949
|
import { CssSelector as CssSelector2, DomElementSchemaRegistry as DomElementSchemaRegistry2 } from "@angular/compiler";
|
|
1922
1950
|
|
|
1923
|
-
// bazel-out/
|
|
1951
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
|
|
1924
1952
|
import ts10 from "typescript";
|
|
1925
1953
|
function makeTemplateDiagnostic(templateId, mapping, span, category, code, messageText, relatedMessages) {
|
|
1926
1954
|
if (mapping.type === "direct") {
|
|
@@ -1993,7 +2021,7 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
|
|
|
1993
2021
|
}
|
|
1994
2022
|
}
|
|
1995
2023
|
|
|
1996
|
-
// bazel-out/
|
|
2024
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
|
|
1997
2025
|
var TEMPLATE_ID = Symbol("ngTemplateId");
|
|
1998
2026
|
var NEXT_TEMPLATE_ID = Symbol("ngNextTemplateId");
|
|
1999
2027
|
function getTemplateId(clazz) {
|
|
@@ -2010,11 +2038,11 @@ function allocateTemplateId(sf) {
|
|
|
2010
2038
|
return `tcb${sf[NEXT_TEMPLATE_ID]++}`;
|
|
2011
2039
|
}
|
|
2012
2040
|
|
|
2013
|
-
// bazel-out/
|
|
2041
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
2014
2042
|
import { EmptyExpr, ImplicitReceiver as ImplicitReceiver2, PropertyRead as PropertyRead2, PropertyWrite as PropertyWrite2, SafePropertyRead, TmplAstReference as TmplAstReference2, TmplAstTextAttribute } from "@angular/compiler";
|
|
2015
2043
|
import ts12 from "typescript";
|
|
2016
2044
|
|
|
2017
|
-
// bazel-out/
|
|
2045
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
|
|
2018
2046
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan2 } from "@angular/compiler";
|
|
2019
2047
|
import ts11 from "typescript";
|
|
2020
2048
|
var parseSpanComment = /^(\d+),(\d+)$/;
|
|
@@ -2134,7 +2162,7 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
|
|
|
2134
2162
|
}) || false;
|
|
2135
2163
|
}
|
|
2136
2164
|
|
|
2137
|
-
// bazel-out/
|
|
2165
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
2138
2166
|
var CompletionEngine = class {
|
|
2139
2167
|
constructor(tcb, data, shimPath) {
|
|
2140
2168
|
this.tcb = tcb;
|
|
@@ -2285,10 +2313,10 @@ var CompletionEngine = class {
|
|
|
2285
2313
|
}
|
|
2286
2314
|
};
|
|
2287
2315
|
|
|
2288
|
-
// bazel-out/
|
|
2316
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
2289
2317
|
import ts26 from "typescript";
|
|
2290
2318
|
|
|
2291
|
-
// bazel-out/
|
|
2319
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
|
|
2292
2320
|
import { DomElementSchemaRegistry } from "@angular/compiler";
|
|
2293
2321
|
import ts13 from "typescript";
|
|
2294
2322
|
var REGISTRY = new DomElementSchemaRegistry();
|
|
@@ -2338,11 +2366,11 @@ var RegistryDomSchemaChecker = class {
|
|
|
2338
2366
|
}
|
|
2339
2367
|
};
|
|
2340
2368
|
|
|
2341
|
-
// bazel-out/
|
|
2369
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
2342
2370
|
import { ExpressionType, ExternalExpr as ExternalExpr2, TypeModifier } from "@angular/compiler";
|
|
2343
2371
|
import ts19 from "typescript";
|
|
2344
2372
|
|
|
2345
|
-
// bazel-out/
|
|
2373
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
|
|
2346
2374
|
import ts14 from "typescript";
|
|
2347
2375
|
var SAFE_TO_CAST_WITHOUT_PARENS = /* @__PURE__ */ new Set([
|
|
2348
2376
|
ts14.SyntaxKind.ParenthesizedExpression,
|
|
@@ -2411,16 +2439,16 @@ function isAccessExpression(node) {
|
|
|
2411
2439
|
return ts14.isPropertyAccessExpression(node) || ts14.isElementAccessExpression(node);
|
|
2412
2440
|
}
|
|
2413
2441
|
|
|
2414
|
-
// bazel-out/
|
|
2442
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
2415
2443
|
import ts18 from "typescript";
|
|
2416
2444
|
|
|
2417
|
-
// bazel-out/
|
|
2445
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
2418
2446
|
import ts17 from "typescript";
|
|
2419
2447
|
|
|
2420
|
-
// bazel-out/
|
|
2448
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
|
|
2421
2449
|
import ts16 from "typescript";
|
|
2422
2450
|
|
|
2423
|
-
// bazel-out/
|
|
2451
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_emitter.mjs
|
|
2424
2452
|
import ts15 from "typescript";
|
|
2425
2453
|
var INELIGIBLE = {};
|
|
2426
2454
|
function canEmitType(type, canEmit) {
|
|
@@ -2482,7 +2510,7 @@ var TypeEmitter = class {
|
|
|
2482
2510
|
}
|
|
2483
2511
|
};
|
|
2484
2512
|
|
|
2485
|
-
// bazel-out/
|
|
2513
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
|
|
2486
2514
|
var TypeParameterEmitter = class {
|
|
2487
2515
|
constructor(typeParameters, reflector) {
|
|
2488
2516
|
this.typeParameters = typeParameters;
|
|
@@ -2559,7 +2587,7 @@ var TypeParameterEmitter = class {
|
|
|
2559
2587
|
}
|
|
2560
2588
|
};
|
|
2561
2589
|
|
|
2562
|
-
// bazel-out/
|
|
2590
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
2563
2591
|
var TcbInliningRequirement;
|
|
2564
2592
|
(function(TcbInliningRequirement2) {
|
|
2565
2593
|
TcbInliningRequirement2[TcbInliningRequirement2["MustInline"] = 0] = "MustInline";
|
|
@@ -2639,7 +2667,7 @@ function checkIfGenericTypeBoundsCanBeEmitted(node, reflector, env) {
|
|
|
2639
2667
|
return emitter.canEmit((ref) => env.canReferenceType(ref));
|
|
2640
2668
|
}
|
|
2641
2669
|
|
|
2642
|
-
// bazel-out/
|
|
2670
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
2643
2671
|
function generateTypeCtorDeclarationFn(node, meta, nodeTypeRef, typeParams) {
|
|
2644
2672
|
const rawTypeArgs = typeParams !== void 0 ? generateGenericArgs(typeParams) : void 0;
|
|
2645
2673
|
const rawType = ts18.createTypeReferenceNode(nodeTypeRef, rawTypeArgs);
|
|
@@ -2710,7 +2738,7 @@ function typeParametersWithDefaultTypes(params) {
|
|
|
2710
2738
|
});
|
|
2711
2739
|
}
|
|
2712
2740
|
|
|
2713
|
-
// bazel-out/
|
|
2741
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
2714
2742
|
var Environment = class {
|
|
2715
2743
|
constructor(config, importManager, refEmitter, reflector, contextFile) {
|
|
2716
2744
|
this.config = config;
|
|
@@ -2778,11 +2806,11 @@ var Environment = class {
|
|
|
2778
2806
|
return translateExpression(ngExpr.expression, this.importManager);
|
|
2779
2807
|
}
|
|
2780
2808
|
canReferenceType(ref) {
|
|
2781
|
-
const result = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports);
|
|
2809
|
+
const result = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports | ImportFlags.AllowRelativeDtsImports);
|
|
2782
2810
|
return result.kind === 0;
|
|
2783
2811
|
}
|
|
2784
2812
|
referenceType(ref) {
|
|
2785
|
-
const ngExpr = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports);
|
|
2813
|
+
const ngExpr = this.refEmitter.emit(ref, this.contextFile, ImportFlags.NoAliasing | ImportFlags.AllowTypeImports | ImportFlags.AllowRelativeDtsImports);
|
|
2786
2814
|
assertSuccessfulReferenceEmit(ngExpr, this.contextFile, "symbol");
|
|
2787
2815
|
return translateType(new ExpressionType(ngExpr.expression), this.importManager);
|
|
2788
2816
|
}
|
|
@@ -2802,7 +2830,7 @@ var Environment = class {
|
|
|
2802
2830
|
}
|
|
2803
2831
|
};
|
|
2804
2832
|
|
|
2805
|
-
// bazel-out/
|
|
2833
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
|
|
2806
2834
|
import { TmplAstElement as TmplAstElement2 } from "@angular/compiler";
|
|
2807
2835
|
import ts20 from "typescript";
|
|
2808
2836
|
var OutOfBandDiagnosticRecorderImpl = class {
|
|
@@ -2934,7 +2962,7 @@ function makeInlineDiagnostic(templateId, code, node, messageText, relatedInform
|
|
|
2934
2962
|
});
|
|
2935
2963
|
}
|
|
2936
2964
|
|
|
2937
|
-
// bazel-out/
|
|
2965
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
|
|
2938
2966
|
import ts21 from "typescript";
|
|
2939
2967
|
var TypeCheckShimGenerator = class {
|
|
2940
2968
|
constructor() {
|
|
@@ -2952,11 +2980,11 @@ var TypeCheckShimGenerator = class {
|
|
|
2952
2980
|
}
|
|
2953
2981
|
};
|
|
2954
2982
|
|
|
2955
|
-
// bazel-out/
|
|
2983
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
2956
2984
|
import { BindingPipe, Call as Call2, DYNAMIC_TYPE, ImplicitReceiver as ImplicitReceiver4, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, SafeCall, SafePropertyRead as SafePropertyRead3, ThisReceiver, TmplAstBoundAttribute, TmplAstBoundText, TmplAstElement as TmplAstElement3, TmplAstIcu, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute2, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
|
|
2957
2985
|
import ts24 from "typescript";
|
|
2958
2986
|
|
|
2959
|
-
// bazel-out/
|
|
2987
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
|
|
2960
2988
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan3 } from "@angular/compiler";
|
|
2961
2989
|
import ts22 from "typescript";
|
|
2962
2990
|
function wrapForDiagnostics(expr) {
|
|
@@ -3002,7 +3030,7 @@ function translateDiagnostic(diagnostic, resolver) {
|
|
|
3002
3030
|
return makeTemplateDiagnostic(sourceLocation.id, templateSourceMapping, span, diagnostic.category, diagnostic.code, diagnostic.messageText);
|
|
3003
3031
|
}
|
|
3004
3032
|
|
|
3005
|
-
// bazel-out/
|
|
3033
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
|
|
3006
3034
|
import { ASTWithSource as ASTWithSource2, Call, EmptyExpr as EmptyExpr2, PropertyRead as PropertyRead3, SafeKeyedRead, SafePropertyRead as SafePropertyRead2 } from "@angular/compiler";
|
|
3007
3035
|
import ts23 from "typescript";
|
|
3008
3036
|
var NULL_AS_ANY = ts23.createAsExpression(ts23.createNull(), ts23.createKeywordTypeNode(ts23.SyntaxKind.AnyKeyword));
|
|
@@ -3177,9 +3205,6 @@ var AstTranslator = class {
|
|
|
3177
3205
|
addParseSpanInfo(node, ast.sourceSpan);
|
|
3178
3206
|
return node;
|
|
3179
3207
|
}
|
|
3180
|
-
visitQuote(ast) {
|
|
3181
|
-
return NULL_AS_ANY;
|
|
3182
|
-
}
|
|
3183
3208
|
visitSafePropertyRead(ast) {
|
|
3184
3209
|
let node;
|
|
3185
3210
|
const receiver = wrapForDiagnostics(this.translate(ast.receiver));
|
|
@@ -3320,9 +3345,6 @@ var VeSafeLhsInferenceBugDetector = class {
|
|
|
3320
3345
|
visitPropertyWrite(ast) {
|
|
3321
3346
|
return false;
|
|
3322
3347
|
}
|
|
3323
|
-
visitQuote(ast) {
|
|
3324
|
-
return false;
|
|
3325
|
-
}
|
|
3326
3348
|
visitSafePropertyRead(ast) {
|
|
3327
3349
|
return false;
|
|
3328
3350
|
}
|
|
@@ -3332,7 +3354,7 @@ var VeSafeLhsInferenceBugDetector = class {
|
|
|
3332
3354
|
};
|
|
3333
3355
|
VeSafeLhsInferenceBugDetector.SINGLETON = new VeSafeLhsInferenceBugDetector();
|
|
3334
3356
|
|
|
3335
|
-
// bazel-out/
|
|
3357
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_semantics.mjs
|
|
3336
3358
|
import { ImplicitReceiver as ImplicitReceiver3, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstVariable } from "@angular/compiler";
|
|
3337
3359
|
var ExpressionSemanticVisitor = class extends RecursiveAstVisitor2 {
|
|
3338
3360
|
constructor(templateId, boundTarget, oob) {
|
|
@@ -3356,7 +3378,7 @@ var ExpressionSemanticVisitor = class extends RecursiveAstVisitor2 {
|
|
|
3356
3378
|
}
|
|
3357
3379
|
};
|
|
3358
3380
|
|
|
3359
|
-
// bazel-out/
|
|
3381
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
3360
3382
|
var TcbGenericContextBehavior;
|
|
3361
3383
|
(function(TcbGenericContextBehavior2) {
|
|
3362
3384
|
TcbGenericContextBehavior2[TcbGenericContextBehavior2["UseEmitter"] = 0] = "UseEmitter";
|
|
@@ -4406,7 +4428,7 @@ var TcbEventHandlerTranslator = class extends TcbExpressionTranslator {
|
|
|
4406
4428
|
}
|
|
4407
4429
|
};
|
|
4408
4430
|
|
|
4409
|
-
// bazel-out/
|
|
4431
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
|
|
4410
4432
|
import ts25 from "typescript";
|
|
4411
4433
|
var TypeCheckFile = class extends Environment {
|
|
4412
4434
|
constructor(fileName, config, refEmitter, reflector, compilerHost) {
|
|
@@ -4442,7 +4464,7 @@ var TypeCheckFile = class extends Environment {
|
|
|
4442
4464
|
}
|
|
4443
4465
|
};
|
|
4444
4466
|
|
|
4445
|
-
// bazel-out/
|
|
4467
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
4446
4468
|
var InliningMode;
|
|
4447
4469
|
(function(InliningMode2) {
|
|
4448
4470
|
InliningMode2[InliningMode2["InlineOps"] = 0] = "InlineOps";
|
|
@@ -4672,10 +4694,10 @@ function splitStringAtPoints(str, points) {
|
|
|
4672
4694
|
return splits;
|
|
4673
4695
|
}
|
|
4674
4696
|
|
|
4675
|
-
// bazel-out/
|
|
4697
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
4676
4698
|
import { ParseLocation, ParseSourceSpan } from "@angular/compiler";
|
|
4677
4699
|
|
|
4678
|
-
// bazel-out/
|
|
4700
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
|
|
4679
4701
|
var LF_CHAR = 10;
|
|
4680
4702
|
var CR_CHAR = 13;
|
|
4681
4703
|
var LINE_SEP_CHAR = 8232;
|
|
@@ -4716,7 +4738,7 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
|
|
|
4716
4738
|
return low - 1;
|
|
4717
4739
|
}
|
|
4718
4740
|
|
|
4719
|
-
// bazel-out/
|
|
4741
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
4720
4742
|
var TemplateSource = class {
|
|
4721
4743
|
constructor(mapping, file) {
|
|
4722
4744
|
this.mapping = mapping;
|
|
@@ -4767,7 +4789,7 @@ var TemplateSourceManager = class {
|
|
|
4767
4789
|
}
|
|
4768
4790
|
};
|
|
4769
4791
|
|
|
4770
|
-
// bazel-out/
|
|
4792
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
|
|
4771
4793
|
import { AST, ASTWithSource as ASTWithSource3, BindingPipe as BindingPipe2, PropertyRead as PropertyRead5, PropertyWrite as PropertyWrite4, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement4, TmplAstReference as TmplAstReference4, TmplAstTemplate as TmplAstTemplate3, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable3 } from "@angular/compiler";
|
|
4772
4794
|
import ts27 from "typescript";
|
|
4773
4795
|
var SymbolBuilder = class {
|
|
@@ -5192,7 +5214,7 @@ function sourceSpanEqual(a, b) {
|
|
|
5192
5214
|
return a.start.offset === b.start.offset && a.end.offset === b.end.offset;
|
|
5193
5215
|
}
|
|
5194
5216
|
|
|
5195
|
-
// bazel-out/
|
|
5217
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
5196
5218
|
var REGISTRY2 = new DomElementSchemaRegistry2();
|
|
5197
5219
|
var TemplateTypeCheckerImpl = class {
|
|
5198
5220
|
constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, componentScopeReader, typeCheckScopeRegistry, perf) {
|
|
@@ -5708,10 +5730,10 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
|
5708
5730
|
}
|
|
5709
5731
|
};
|
|
5710
5732
|
|
|
5711
|
-
// bazel-out/
|
|
5733
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
5712
5734
|
import { TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
|
|
5713
5735
|
|
|
5714
|
-
// bazel-out/
|
|
5736
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
|
|
5715
5737
|
import { ASTWithSource as ASTWithSource4, RecursiveAstVisitor as RecursiveAstVisitor3 } from "@angular/compiler";
|
|
5716
5738
|
var TemplateCheckWithVisitor = class {
|
|
5717
5739
|
run(ctx, component, template) {
|
|
@@ -5788,7 +5810,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor3 {
|
|
|
5788
5810
|
}
|
|
5789
5811
|
};
|
|
5790
5812
|
|
|
5791
|
-
// bazel-out/
|
|
5813
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
5792
5814
|
var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
|
|
5793
5815
|
constructor() {
|
|
5794
5816
|
super(...arguments);
|
|
@@ -5813,8 +5835,9 @@ var factory = {
|
|
|
5813
5835
|
create: () => new InvalidBananaInBoxCheck()
|
|
5814
5836
|
};
|
|
5815
5837
|
|
|
5816
|
-
// bazel-out/
|
|
5838
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
|
|
5817
5839
|
import { Binary } from "@angular/compiler";
|
|
5840
|
+
import ts28 from "typescript";
|
|
5818
5841
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
5819
5842
|
constructor() {
|
|
5820
5843
|
super(...arguments);
|
|
@@ -5828,6 +5851,9 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
5828
5851
|
return [];
|
|
5829
5852
|
}
|
|
5830
5853
|
const typeLeft = symbolLeft.tsType;
|
|
5854
|
+
if (typeLeft.flags & (ts28.TypeFlags.Any | ts28.TypeFlags.Unknown)) {
|
|
5855
|
+
return [];
|
|
5856
|
+
}
|
|
5831
5857
|
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
5832
5858
|
return [];
|
|
5833
5859
|
const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
|
|
@@ -5843,17 +5869,18 @@ var factory2 = {
|
|
|
5843
5869
|
code: ErrorCode.NULLISH_COALESCING_NOT_NULLABLE,
|
|
5844
5870
|
name: ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE,
|
|
5845
5871
|
create: (options) => {
|
|
5846
|
-
|
|
5872
|
+
const strictNullChecks = options.strictNullChecks === void 0 ? !!options.strict : !!options.strictNullChecks;
|
|
5873
|
+
if (!strictNullChecks) {
|
|
5847
5874
|
return null;
|
|
5848
5875
|
}
|
|
5849
5876
|
return new NullishCoalescingNotNullableCheck();
|
|
5850
5877
|
}
|
|
5851
5878
|
};
|
|
5852
5879
|
|
|
5853
|
-
// bazel-out/
|
|
5854
|
-
import
|
|
5880
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
5881
|
+
import ts29 from "typescript";
|
|
5855
5882
|
|
|
5856
|
-
// bazel-out/
|
|
5883
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
|
|
5857
5884
|
var DiagnosticCategoryLabel;
|
|
5858
5885
|
(function(DiagnosticCategoryLabel2) {
|
|
5859
5886
|
DiagnosticCategoryLabel2["Warning"] = "warning";
|
|
@@ -5861,7 +5888,7 @@ var DiagnosticCategoryLabel;
|
|
|
5861
5888
|
DiagnosticCategoryLabel2["Suppress"] = "suppress";
|
|
5862
5889
|
})(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
|
|
5863
5890
|
|
|
5864
|
-
// bazel-out/
|
|
5891
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
5865
5892
|
var ExtendedTemplateCheckerImpl = class {
|
|
5866
5893
|
constructor(templateTypeChecker, typeChecker, templateCheckFactories, options) {
|
|
5867
5894
|
var _a, _b, _c, _d, _e;
|
|
@@ -5899,9 +5926,9 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
5899
5926
|
function diagnosticLabelToCategory(label) {
|
|
5900
5927
|
switch (label) {
|
|
5901
5928
|
case DiagnosticCategoryLabel.Warning:
|
|
5902
|
-
return
|
|
5929
|
+
return ts29.DiagnosticCategory.Warning;
|
|
5903
5930
|
case DiagnosticCategoryLabel.Error:
|
|
5904
|
-
return
|
|
5931
|
+
return ts29.DiagnosticCategory.Error;
|
|
5905
5932
|
case DiagnosticCategoryLabel.Suppress:
|
|
5906
5933
|
return null;
|
|
5907
5934
|
default:
|
|
@@ -5913,13 +5940,13 @@ function assertNever(value) {
|
|
|
5913
5940
|
${value}`);
|
|
5914
5941
|
}
|
|
5915
5942
|
|
|
5916
|
-
// bazel-out/
|
|
5943
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
|
|
5917
5944
|
var ALL_DIAGNOSTIC_FACTORIES = [
|
|
5918
5945
|
factory,
|
|
5919
5946
|
factory2
|
|
5920
5947
|
];
|
|
5921
5948
|
|
|
5922
|
-
// bazel-out/
|
|
5949
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
5923
5950
|
var CompilationTicketKind;
|
|
5924
5951
|
(function(CompilationTicketKind2) {
|
|
5925
5952
|
CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -5992,14 +6019,11 @@ var NgCompiler = class {
|
|
|
5992
6019
|
this.constructionDiagnostics = [];
|
|
5993
6020
|
this.nonTemplateDiagnostics = null;
|
|
5994
6021
|
this.delegatingPerfRecorder = new DelegatingPerfRecorder(this.perfRecorder);
|
|
5995
|
-
if (this.options._extendedTemplateDiagnostics === true && this.options.strictTemplates === false) {
|
|
5996
|
-
throw new Error("The '_extendedTemplateDiagnostics' option requires 'strictTemplates' to also be enabled.");
|
|
5997
|
-
}
|
|
5998
6022
|
this.constructionDiagnostics.push(...this.adapter.constructionDiagnostics, ...verifyCompatibleTypeCheckOptions(this.options));
|
|
5999
6023
|
this.currentProgram = inputProgram;
|
|
6000
6024
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
6001
6025
|
this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
|
|
6002
|
-
const moduleResolutionCache =
|
|
6026
|
+
const moduleResolutionCache = ts30.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
|
|
6003
6027
|
this.moduleResolver = new ModuleResolver(inputProgram, this.options, this.adapter, moduleResolutionCache);
|
|
6004
6028
|
this.resourceManager = new AdapterResourceLoader(adapter, this.options);
|
|
6005
6029
|
this.cycleAnalyzer = new CycleAnalyzer(new ImportGraph(inputProgram.getTypeChecker(), this.delegatingPerfRecorder));
|
|
@@ -6055,7 +6079,7 @@ var NgCompiler = class {
|
|
|
6055
6079
|
}
|
|
6056
6080
|
for (const clazz of classesToUpdate) {
|
|
6057
6081
|
this.compilation.traitCompiler.updateResources(clazz);
|
|
6058
|
-
if (!
|
|
6082
|
+
if (!ts30.isClassDeclaration(clazz)) {
|
|
6059
6083
|
continue;
|
|
6060
6084
|
}
|
|
6061
6085
|
this.compilation.templateTypeChecker.invalidateClass(clazz);
|
|
@@ -6406,12 +6430,12 @@ var NgCompiler = class {
|
|
|
6406
6430
|
const localMetaRegistry = new LocalMetadataRegistry();
|
|
6407
6431
|
const localMetaReader = localMetaRegistry;
|
|
6408
6432
|
const depScopeReader = new MetadataDtsModuleScopeResolver(dtsReader, aliasingHost);
|
|
6433
|
+
const metaReader = new CompoundMetadataReader([localMetaReader, dtsReader]);
|
|
6409
6434
|
const scopeRegistry = new LocalModuleScopeRegistry(localMetaReader, depScopeReader, refEmitter, aliasingHost);
|
|
6410
6435
|
const scopeReader = scopeRegistry;
|
|
6411
6436
|
const semanticDepGraphUpdater = this.incrementalCompilation.semanticDepGraphUpdater;
|
|
6412
6437
|
const metaRegistry = new CompoundMetadataRegistry([localMetaRegistry, scopeRegistry]);
|
|
6413
6438
|
const injectableRegistry = new InjectableClassRegistry(reflector);
|
|
6414
|
-
const metaReader = new CompoundMetadataReader([localMetaReader, dtsReader]);
|
|
6415
6439
|
const typeCheckScopeRegistry = new TypeCheckScopeRegistry(scopeReader, metaReader);
|
|
6416
6440
|
let referencesRegistry;
|
|
6417
6441
|
let exportReferenceGraph = null;
|
|
@@ -6427,7 +6451,7 @@ var NgCompiler = class {
|
|
|
6427
6451
|
const compilationMode = this.options.compilationMode === "partial" && !isCore ? CompilationMode.PARTIAL : CompilationMode.FULL;
|
|
6428
6452
|
const cycleHandlingStrategy = compilationMode === CompilationMode.FULL ? 0 : 1;
|
|
6429
6453
|
const handlers = [
|
|
6430
|
-
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, this.resourceManager, this.adapter.rootDirs, this.options.preserveWhitespaces || false, this.options.i18nUseExternalIds !== false, this.options.enableI18nLegacyMessageIdFormat !== false, this.usePoisonedData, this.options.i18nNormalizeLineEndingsInICUs, this.moduleResolver, this.cycleAnalyzer, cycleHandlingStrategy, refEmitter, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder),
|
|
6454
|
+
new ComponentDecoratorHandler(reflector, evaluator, metaRegistry, metaReader, scopeReader, depScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, 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, this.incrementalCompilation.depGraph, injectableRegistry, semanticDepGraphUpdater, this.closureCompilerEnabled, this.delegatingPerfRecorder),
|
|
6431
6455
|
new DirectiveDecoratorHandler(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, isCore, semanticDepGraphUpdater, this.closureCompilerEnabled, false, this.delegatingPerfRecorder),
|
|
6432
6456
|
new PipeDecoratorHandler(reflector, evaluator, metaRegistry, scopeRegistry, injectableRegistry, isCore, this.delegatingPerfRecorder),
|
|
6433
6457
|
new InjectableDecoratorHandler(reflector, isCore, this.options.strictInjectionParameters || false, injectableRegistry, this.delegatingPerfRecorder),
|
|
@@ -6463,17 +6487,17 @@ function isAngularCorePackage(program) {
|
|
|
6463
6487
|
return false;
|
|
6464
6488
|
}
|
|
6465
6489
|
return r3Symbols.statements.some((stmt) => {
|
|
6466
|
-
if (!
|
|
6490
|
+
if (!ts30.isVariableStatement(stmt)) {
|
|
6467
6491
|
return false;
|
|
6468
6492
|
}
|
|
6469
|
-
if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind ===
|
|
6493
|
+
if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts30.SyntaxKind.ExportKeyword)) {
|
|
6470
6494
|
return false;
|
|
6471
6495
|
}
|
|
6472
6496
|
return stmt.declarationList.declarations.some((decl) => {
|
|
6473
|
-
if (!
|
|
6497
|
+
if (!ts30.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
|
|
6474
6498
|
return false;
|
|
6475
6499
|
}
|
|
6476
|
-
if (decl.initializer === void 0 || decl.initializer.kind !==
|
|
6500
|
+
if (decl.initializer === void 0 || decl.initializer.kind !== ts30.SyntaxKind.TrueKeyword) {
|
|
6477
6501
|
return false;
|
|
6478
6502
|
}
|
|
6479
6503
|
return true;
|
|
@@ -6487,7 +6511,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
|
|
|
6487
6511
|
var _a, _b, _c;
|
|
6488
6512
|
if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
|
|
6489
6513
|
yield makeConfigDiagnostic({
|
|
6490
|
-
category:
|
|
6514
|
+
category: ts30.DiagnosticCategory.Error,
|
|
6491
6515
|
code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
|
|
6492
6516
|
messageText: `
|
|
6493
6517
|
Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
|
|
@@ -6506,7 +6530,7 @@ https://angular.io/guide/template-typecheck
|
|
|
6506
6530
|
}
|
|
6507
6531
|
if (options.extendedDiagnostics && options.strictTemplates === false) {
|
|
6508
6532
|
yield makeConfigDiagnostic({
|
|
6509
|
-
category:
|
|
6533
|
+
category: ts30.DiagnosticCategory.Error,
|
|
6510
6534
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
|
|
6511
6535
|
messageText: `
|
|
6512
6536
|
Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
|
|
@@ -6523,7 +6547,7 @@ One of the following actions is required:
|
|
|
6523
6547
|
const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
|
|
6524
6548
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
6525
6549
|
yield makeConfigDiagnostic({
|
|
6526
|
-
category:
|
|
6550
|
+
category: ts30.DiagnosticCategory.Error,
|
|
6527
6551
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
6528
6552
|
messageText: `
|
|
6529
6553
|
Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
|
|
@@ -6537,7 +6561,7 @@ ${allowedCategoryLabels.join("\n")}
|
|
|
6537
6561
|
for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
|
|
6538
6562
|
if (!allExtendedDiagnosticNames.includes(checkName)) {
|
|
6539
6563
|
yield makeConfigDiagnostic({
|
|
6540
|
-
category:
|
|
6564
|
+
category: ts30.DiagnosticCategory.Error,
|
|
6541
6565
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
|
|
6542
6566
|
messageText: `
|
|
6543
6567
|
Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
|
|
@@ -6549,7 +6573,7 @@ ${allExtendedDiagnosticNames.join("\n")}
|
|
|
6549
6573
|
}
|
|
6550
6574
|
if (!allowedCategoryLabels.includes(category)) {
|
|
6551
6575
|
yield makeConfigDiagnostic({
|
|
6552
|
-
category:
|
|
6576
|
+
category: ts30.DiagnosticCategory.Error,
|
|
6553
6577
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
6554
6578
|
messageText: `
|
|
6555
6579
|
Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
|
|
@@ -6579,7 +6603,7 @@ var ReferenceGraphAdapter = class {
|
|
|
6579
6603
|
for (const { node } of references) {
|
|
6580
6604
|
let sourceFile = node.getSourceFile();
|
|
6581
6605
|
if (sourceFile === void 0) {
|
|
6582
|
-
sourceFile =
|
|
6606
|
+
sourceFile = ts30.getOriginalNode(node).getSourceFile();
|
|
6583
6607
|
}
|
|
6584
6608
|
if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
|
|
6585
6609
|
this.graph.add(source, node);
|
|
@@ -6617,8 +6641,8 @@ function versionMapFromProgram(program, driver) {
|
|
|
6617
6641
|
return versions;
|
|
6618
6642
|
}
|
|
6619
6643
|
|
|
6620
|
-
// bazel-out/
|
|
6621
|
-
import
|
|
6644
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
6645
|
+
import ts31 from "typescript";
|
|
6622
6646
|
var DelegatingCompilerHost2 = class {
|
|
6623
6647
|
constructor(delegate) {
|
|
6624
6648
|
this.delegate = delegate;
|
|
@@ -6708,7 +6732,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
|
|
|
6708
6732
|
entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
|
|
6709
6733
|
if (entryPoint === null) {
|
|
6710
6734
|
diagnostics.push({
|
|
6711
|
-
category:
|
|
6735
|
+
category: ts31.DiagnosticCategory.Error,
|
|
6712
6736
|
code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
|
|
6713
6737
|
file: void 0,
|
|
6714
6738
|
start: void 0,
|
|
@@ -6748,17 +6772,17 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
|
|
|
6748
6772
|
return this.fileNameToModuleName !== void 0 ? this : null;
|
|
6749
6773
|
}
|
|
6750
6774
|
createCachedResolveModuleNamesFunction() {
|
|
6751
|
-
const moduleResolutionCache =
|
|
6775
|
+
const moduleResolutionCache = ts31.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
|
|
6752
6776
|
return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
|
|
6753
6777
|
return moduleNames.map((moduleName) => {
|
|
6754
|
-
const module =
|
|
6778
|
+
const module = ts31.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
|
|
6755
6779
|
return module.resolvedModule;
|
|
6756
6780
|
});
|
|
6757
6781
|
};
|
|
6758
6782
|
}
|
|
6759
6783
|
};
|
|
6760
6784
|
|
|
6761
|
-
// bazel-out/
|
|
6785
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
6762
6786
|
var NgtscProgram = class {
|
|
6763
6787
|
constructor(rootNames, options, delegateHost, oldProgram) {
|
|
6764
6788
|
this.options = options;
|
|
@@ -6772,7 +6796,7 @@ var NgtscProgram = class {
|
|
|
6772
6796
|
if (reuseProgram !== void 0) {
|
|
6773
6797
|
retagAllTsFiles(reuseProgram);
|
|
6774
6798
|
}
|
|
6775
|
-
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () =>
|
|
6799
|
+
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts32.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
|
|
6776
6800
|
perfRecorder.phase(PerfPhase.Unaccounted);
|
|
6777
6801
|
perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
|
|
6778
6802
|
this.host.postProgramCreationCleanup();
|
|
@@ -6965,38 +6989,38 @@ function mergeEmitResults(emitResults) {
|
|
|
6965
6989
|
return { diagnostics, emitSkipped, emittedFiles };
|
|
6966
6990
|
}
|
|
6967
6991
|
|
|
6968
|
-
// bazel-out/
|
|
6992
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
|
|
6969
6993
|
function createProgram({ rootNames, options, host, oldProgram }) {
|
|
6970
6994
|
return new NgtscProgram(rootNames, options, host, oldProgram);
|
|
6971
6995
|
}
|
|
6972
6996
|
|
|
6973
|
-
// bazel-out/
|
|
6974
|
-
import
|
|
6997
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
6998
|
+
import ts34 from "typescript";
|
|
6975
6999
|
|
|
6976
|
-
// bazel-out/
|
|
6977
|
-
import
|
|
7000
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
|
|
7001
|
+
import ts33 from "typescript";
|
|
6978
7002
|
var GENERATED_FILES = /(.*?)\.(ngfactory|shim\.ngstyle|ngstyle|ngsummary)\.(js|d\.ts|ts)$/;
|
|
6979
7003
|
function createMessageDiagnostic(messageText) {
|
|
6980
7004
|
return {
|
|
6981
7005
|
file: void 0,
|
|
6982
7006
|
start: void 0,
|
|
6983
7007
|
length: void 0,
|
|
6984
|
-
category:
|
|
7008
|
+
category: ts33.DiagnosticCategory.Message,
|
|
6985
7009
|
messageText,
|
|
6986
7010
|
code: DEFAULT_ERROR_CODE,
|
|
6987
7011
|
source: SOURCE
|
|
6988
7012
|
};
|
|
6989
7013
|
}
|
|
6990
7014
|
|
|
6991
|
-
// bazel-out/
|
|
7015
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
6992
7016
|
var defaultFormatHost = {
|
|
6993
|
-
getCurrentDirectory: () =>
|
|
7017
|
+
getCurrentDirectory: () => ts34.sys.getCurrentDirectory(),
|
|
6994
7018
|
getCanonicalFileName: (fileName) => fileName,
|
|
6995
|
-
getNewLine: () =>
|
|
7019
|
+
getNewLine: () => ts34.sys.newLine
|
|
6996
7020
|
};
|
|
6997
7021
|
function formatDiagnostics(diags, host = defaultFormatHost) {
|
|
6998
7022
|
if (diags && diags.length) {
|
|
6999
|
-
return diags.map((diagnostic) => replaceTsWithNgInErrors(
|
|
7023
|
+
return diags.map((diagnostic) => replaceTsWithNgInErrors(ts34.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
|
|
7000
7024
|
} else {
|
|
7001
7025
|
return "";
|
|
7002
7026
|
}
|
|
@@ -7010,10 +7034,10 @@ function calcProjectFileAndBasePath(project, host = getFileSystem()) {
|
|
|
7010
7034
|
return { projectFile, basePath };
|
|
7011
7035
|
}
|
|
7012
7036
|
function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
7013
|
-
var _a;
|
|
7037
|
+
var _a, _b;
|
|
7014
7038
|
try {
|
|
7015
7039
|
const fs = getFileSystem();
|
|
7016
|
-
const readConfigFile = (configFile) =>
|
|
7040
|
+
const readConfigFile = (configFile) => ts34.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
|
|
7017
7041
|
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
|
|
7018
7042
|
const { config: config2, error: error2 } = readConfigFile(configFile);
|
|
7019
7043
|
if (error2) {
|
|
@@ -7045,7 +7069,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
7045
7069
|
basePath
|
|
7046
7070
|
}, readAngularCompilerOptions(configFileName)), existingOptions);
|
|
7047
7071
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
7048
|
-
const { options, errors, fileNames: rootNames, projectReferences } =
|
|
7072
|
+
const { options, errors, fileNames: rootNames, projectReferences } = ts34.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
|
|
7049
7073
|
options.enableIvy = !!((_a = options.enableIvy) != null ? _a : true);
|
|
7050
7074
|
let emitFlags = EmitFlags.Default;
|
|
7051
7075
|
if (!(options.skipMetadataEmit || options.flatModuleOutFile)) {
|
|
@@ -7057,8 +7081,8 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
7057
7081
|
return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
|
|
7058
7082
|
} catch (e) {
|
|
7059
7083
|
const errors = [{
|
|
7060
|
-
category:
|
|
7061
|
-
messageText: e.stack,
|
|
7084
|
+
category: ts34.DiagnosticCategory.Error,
|
|
7085
|
+
messageText: (_b = e.stack) != null ? _b : e.message,
|
|
7062
7086
|
file: void 0,
|
|
7063
7087
|
start: void 0,
|
|
7064
7088
|
length: void 0,
|
|
@@ -7071,7 +7095,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
7071
7095
|
function createParseConfigHost(host, fs = getFileSystem()) {
|
|
7072
7096
|
return {
|
|
7073
7097
|
fileExists: host.exists.bind(host),
|
|
7074
|
-
readDirectory:
|
|
7098
|
+
readDirectory: ts34.sys.readDirectory,
|
|
7075
7099
|
readFile: host.readFile.bind(host),
|
|
7076
7100
|
useCaseSensitiveFileNames: fs.isCaseSensitive()
|
|
7077
7101
|
};
|
|
@@ -7091,7 +7115,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
7091
7115
|
}
|
|
7092
7116
|
} else {
|
|
7093
7117
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
7094
|
-
const { resolvedModule } =
|
|
7118
|
+
const { resolvedModule } = ts34.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts34.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
|
|
7095
7119
|
if (resolvedModule) {
|
|
7096
7120
|
return absoluteFrom(resolvedModule.resolvedFileName);
|
|
7097
7121
|
}
|
|
@@ -7101,12 +7125,13 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
7101
7125
|
function exitCodeFromResult(diags) {
|
|
7102
7126
|
if (!diags)
|
|
7103
7127
|
return 0;
|
|
7104
|
-
if (diags.every((diag) => diag.category !==
|
|
7128
|
+
if (diags.every((diag) => diag.category !== ts34.DiagnosticCategory.Error)) {
|
|
7105
7129
|
return 0;
|
|
7106
7130
|
}
|
|
7107
7131
|
return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
|
|
7108
7132
|
}
|
|
7109
7133
|
function performCompilation({ rootNames, options, host, oldProgram, emitCallback, mergeEmitResultsCallback, gatherDiagnostics = defaultGatherDiagnostics, customTransformers, emitFlags = EmitFlags.Default, modifiedResourceFiles = null }) {
|
|
7134
|
+
var _a;
|
|
7110
7135
|
let program;
|
|
7111
7136
|
let emitResult;
|
|
7112
7137
|
let allDiagnostics = [];
|
|
@@ -7133,8 +7158,8 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
7133
7158
|
} catch (e) {
|
|
7134
7159
|
program = void 0;
|
|
7135
7160
|
allDiagnostics.push({
|
|
7136
|
-
category:
|
|
7137
|
-
messageText: e.stack,
|
|
7161
|
+
category: ts34.DiagnosticCategory.Error,
|
|
7162
|
+
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
7138
7163
|
code: UNKNOWN_ERROR_CODE,
|
|
7139
7164
|
file: void 0,
|
|
7140
7165
|
start: void 0,
|
|
@@ -7160,7 +7185,7 @@ function defaultGatherDiagnostics(program) {
|
|
|
7160
7185
|
return allDiagnostics;
|
|
7161
7186
|
}
|
|
7162
7187
|
function hasErrors(diags) {
|
|
7163
|
-
return diags.some((d) => d.category ===
|
|
7188
|
+
return diags.some((d) => d.category === ts34.DiagnosticCategory.Error);
|
|
7164
7189
|
}
|
|
7165
7190
|
|
|
7166
7191
|
export {
|
|
@@ -7200,4 +7225,4 @@ export {
|
|
|
7200
7225
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7201
7226
|
* found in the LICENSE file at https://angular.io/license
|
|
7202
7227
|
*/
|
|
7203
|
-
//# sourceMappingURL=chunk-
|
|
7228
|
+
//# sourceMappingURL=chunk-JL6TC6CB.js.map
|