@angular/compiler-cli 14.1.0-next.3 → 14.1.0
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-DPA2FBDE.js → chunk-24DFPZCS.js} +34 -26
- package/bundles/chunk-24DFPZCS.js.map +6 -0
- package/bundles/{chunk-TV7VZNWL.js → chunk-4JF5LVDW.js} +9 -12
- package/bundles/chunk-4JF5LVDW.js.map +6 -0
- package/bundles/{chunk-LC26KH5A.js → chunk-ACXPVP2W.js} +5 -5
- package/bundles/chunk-ACXPVP2W.js.map +6 -0
- package/bundles/{chunk-SOSZHK6P.js → chunk-ATB3HJXN.js} +34 -37
- package/bundles/chunk-ATB3HJXN.js.map +6 -0
- package/bundles/{chunk-OCR5YQMJ.js → chunk-BCXYCOVM.js} +344 -178
- package/bundles/chunk-BCXYCOVM.js.map +6 -0
- package/bundles/{chunk-2WG4XIQ4.js → chunk-C6DN5BLC.js} +8 -12
- package/bundles/chunk-C6DN5BLC.js.map +6 -0
- package/bundles/{chunk-WH4QSABR.js → chunk-CYVTLM4Z.js} +8 -12
- package/bundles/chunk-CYVTLM4Z.js.map +6 -0
- package/bundles/{chunk-ZCDB56AX.js → chunk-E7NQQTT7.js} +3 -3
- package/bundles/{chunk-ZCDB56AX.js.map → chunk-E7NQQTT7.js.map} +1 -1
- package/bundles/{chunk-BRHP6XKM.js → chunk-FM6NPN5V.js} +4 -4
- package/bundles/{chunk-BRHP6XKM.js.map → chunk-FM6NPN5V.js.map} +0 -0
- package/bundles/{chunk-DOITZI4O.js → chunk-KPEPSPYQ.js} +122 -118
- package/bundles/chunk-KPEPSPYQ.js.map +6 -0
- package/bundles/{chunk-EIL2D5BG.js → chunk-MN3YDSGE.js} +46 -47
- package/bundles/chunk-MN3YDSGE.js.map +6 -0
- package/bundles/{chunk-5K2JLFXT.js → chunk-NFCN3OZI.js} +6 -6
- package/bundles/chunk-NFCN3OZI.js.map +6 -0
- package/bundles/{chunk-SJL5HBUW.js → chunk-R3C7RFJ4.js} +2 -2
- package/bundles/{chunk-SJL5HBUW.js.map → chunk-R3C7RFJ4.js.map} +0 -0
- package/bundles/{chunk-CHS76256.js → chunk-S2H6ZNBD.js} +80 -84
- package/bundles/chunk-S2H6ZNBD.js.map +6 -0
- package/bundles/{chunk-TD64C4QJ.js → chunk-TOKOIIBI.js} +8 -8
- package/bundles/chunk-TOKOIIBI.js.map +6 -0
- package/bundles/{chunk-GMSUYBZP.js → chunk-XYNRD7NE.js} +1 -33
- package/bundles/{chunk-GMSUYBZP.js.map → chunk-XYNRD7NE.js.map} +0 -0
- package/bundles/index.js +14 -16
- package/bundles/index.js.map +1 -1
- package/bundles/linker/babel/index.js +20 -24
- package/bundles/linker/babel/index.js.map +1 -1
- package/bundles/linker/index.js +5 -5
- package/bundles/ngcc/index.js +13 -13
- package/bundles/ngcc/main-ngcc.js +14 -14
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js +14 -14
- package/bundles/ngcc/src/execution/cluster/ngcc_cluster_worker.js.map +1 -1
- package/bundles/ngcc/src/locking/lock_file_with_child_process/ngcc_lock_unlocker.js +5 -5
- package/bundles/private/bazel.js +2 -2
- package/bundles/private/localize.js +4 -4
- package/bundles/private/migrations.js +6 -6
- package/bundles/private/tooling.js +3 -3
- package/bundles/src/bin/ng_xi18n.js +12 -15
- package/bundles/src/bin/ng_xi18n.js.map +1 -1
- package/bundles/src/bin/ngc.js +9 -9
- package/bundles_metadata.json +1 -1
- package/linker/src/linker_import_generator.d.ts +1 -1
- package/ngcc/src/host/commonjs_umd_utils.d.ts +2 -2
- package/ngcc/src/host/esm5_host.d.ts +1 -1
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/package.json +2 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +1 -1
- package/src/ngtsc/core/src/compiler.d.ts +2 -2
- package/src/ngtsc/diagnostics/src/error_code.d.ts +49 -1
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +5 -1
- package/src/ngtsc/incremental/src/state.d.ts +1 -1
- package/src/ngtsc/indexer/src/context.d.ts +1 -1
- package/src/ngtsc/metadata/src/registry.d.ts +2 -1
- package/src/ngtsc/perf/src/recorder.d.ts +1 -1
- package/src/ngtsc/reflection/src/host.d.ts +1 -1
- package/src/ngtsc/scope/src/dependency.d.ts +1 -1
- package/src/ngtsc/translator/src/api/ast_factory.d.ts +2 -2
- package/src/ngtsc/translator/src/import_manager.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/api/extended_template_checker.d.ts +1 -1
- package/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.d.ts +10 -0
- package/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.d.ts +11 -0
- package/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.d.ts +11 -0
- package/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.d.ts +11 -0
- package/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.d.ts +11 -0
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
- package/src/transformers/api.d.ts +2 -2
- package/bundles/chunk-2WG4XIQ4.js.map +0 -6
- package/bundles/chunk-5K2JLFXT.js.map +0 -6
- package/bundles/chunk-CHS76256.js.map +0 -6
- package/bundles/chunk-DOITZI4O.js.map +0 -6
- package/bundles/chunk-DPA2FBDE.js.map +0 -6
- package/bundles/chunk-EIL2D5BG.js.map +0 -6
- package/bundles/chunk-LC26KH5A.js.map +0 -6
- package/bundles/chunk-OCR5YQMJ.js.map +0 -6
- package/bundles/chunk-SOSZHK6P.js.map +0 -6
- package/bundles/chunk-TD64C4QJ.js.map +0 -6
- package/bundles/chunk-TV7VZNWL.js.map +0 -6
- package/bundles/chunk-WH4QSABR.js.map +0 -6
|
@@ -30,11 +30,11 @@ import {
|
|
|
30
30
|
aliasTransformFactory,
|
|
31
31
|
declarationTransformFactory,
|
|
32
32
|
ivyTransformFactory
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-KPEPSPYQ.js";
|
|
34
34
|
import {
|
|
35
35
|
TypeScriptReflectionHost,
|
|
36
36
|
isNamedClassDeclaration
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-NFCN3OZI.js";
|
|
38
38
|
import {
|
|
39
39
|
AbsoluteModuleStrategy,
|
|
40
40
|
AliasStrategy,
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
toUnredirectedSourceFile,
|
|
74
74
|
translateExpression,
|
|
75
75
|
translateType
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-24DFPZCS.js";
|
|
77
77
|
import {
|
|
78
78
|
LogicalFileSystem,
|
|
79
79
|
absoluteFrom,
|
|
@@ -84,20 +84,16 @@ import {
|
|
|
84
84
|
getSourceFileOrError,
|
|
85
85
|
join,
|
|
86
86
|
resolve
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-TOKOIIBI.js";
|
|
88
88
|
import {
|
|
89
89
|
ActivePerfRecorder,
|
|
90
90
|
DelegatingPerfRecorder,
|
|
91
91
|
PerfCheckpoint,
|
|
92
92
|
PerfEvent,
|
|
93
93
|
PerfPhase
|
|
94
|
-
} from "./chunk-
|
|
95
|
-
import {
|
|
96
|
-
__spreadProps,
|
|
97
|
-
__spreadValues
|
|
98
|
-
} from "./chunk-GMSUYBZP.js";
|
|
94
|
+
} from "./chunk-ACXPVP2W.js";
|
|
99
95
|
|
|
100
|
-
// bazel-out/
|
|
96
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/api.mjs
|
|
101
97
|
var DEFAULT_ERROR_CODE = 100;
|
|
102
98
|
var UNKNOWN_ERROR_CODE = 500;
|
|
103
99
|
var SOURCE = "angular";
|
|
@@ -115,7 +111,7 @@ var EmitFlags;
|
|
|
115
111
|
EmitFlags2[EmitFlags2["All"] = 31] = "All";
|
|
116
112
|
})(EmitFlags || (EmitFlags = {}));
|
|
117
113
|
|
|
118
|
-
// bazel-out/
|
|
114
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/compiler_host.mjs
|
|
119
115
|
import ts from "typescript";
|
|
120
116
|
var wrapHostForTest = null;
|
|
121
117
|
function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, true) }) {
|
|
@@ -125,21 +121,21 @@ function createCompilerHost({ options, tsHost = ts.createCompilerHost(options, t
|
|
|
125
121
|
return tsHost;
|
|
126
122
|
}
|
|
127
123
|
|
|
128
|
-
// bazel-out/
|
|
124
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/checker.mjs
|
|
129
125
|
var OptimizeFor;
|
|
130
126
|
(function(OptimizeFor2) {
|
|
131
127
|
OptimizeFor2[OptimizeFor2["SingleFile"] = 0] = "SingleFile";
|
|
132
128
|
OptimizeFor2[OptimizeFor2["WholeProgram"] = 1] = "WholeProgram";
|
|
133
129
|
})(OptimizeFor || (OptimizeFor = {}));
|
|
134
130
|
|
|
135
|
-
// bazel-out/
|
|
131
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/completion.mjs
|
|
136
132
|
var CompletionKind;
|
|
137
133
|
(function(CompletionKind2) {
|
|
138
134
|
CompletionKind2[CompletionKind2["Reference"] = 0] = "Reference";
|
|
139
135
|
CompletionKind2[CompletionKind2["Variable"] = 1] = "Variable";
|
|
140
136
|
})(CompletionKind || (CompletionKind = {}));
|
|
141
137
|
|
|
142
|
-
// bazel-out/
|
|
138
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/api/symbols.mjs
|
|
143
139
|
var SymbolKind;
|
|
144
140
|
(function(SymbolKind2) {
|
|
145
141
|
SymbolKind2[SymbolKind2["Input"] = 0] = "Input";
|
|
@@ -155,11 +151,11 @@ var SymbolKind;
|
|
|
155
151
|
SymbolKind2[SymbolKind2["Pipe"] = 10] = "Pipe";
|
|
156
152
|
})(SymbolKind || (SymbolKind = {}));
|
|
157
153
|
|
|
158
|
-
// bazel-out/
|
|
154
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
159
155
|
import { HtmlParser, MessageBundle } from "@angular/compiler";
|
|
160
|
-
import
|
|
156
|
+
import ts34 from "typescript";
|
|
161
157
|
|
|
162
|
-
// bazel-out/
|
|
158
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/i18n.mjs
|
|
163
159
|
import { Xliff, Xliff2, Xmb } from "@angular/compiler";
|
|
164
160
|
import * as path from "path";
|
|
165
161
|
function i18nGetExtension(formatName) {
|
|
@@ -210,10 +206,10 @@ function getPathNormalizer(basePath) {
|
|
|
210
206
|
};
|
|
211
207
|
}
|
|
212
208
|
|
|
213
|
-
// bazel-out/
|
|
209
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
214
210
|
import ts2 from "typescript";
|
|
215
211
|
|
|
216
|
-
// bazel-out/
|
|
212
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/version_helpers.mjs
|
|
217
213
|
function toNumbers(value) {
|
|
218
214
|
const suffixIndex = value.lastIndexOf("-");
|
|
219
215
|
return value.slice(0, suffixIndex === -1 ? value.length : suffixIndex).split(".").map((segment) => {
|
|
@@ -248,7 +244,7 @@ function compareVersions(v1, v2) {
|
|
|
248
244
|
return compareNumbers(toNumbers(v1), toNumbers(v2));
|
|
249
245
|
}
|
|
250
246
|
|
|
251
|
-
// bazel-out/
|
|
247
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/typescript_support.mjs
|
|
252
248
|
var MIN_TS_VERSION = "4.6.2";
|
|
253
249
|
var MAX_TS_VERSION = "4.8.0";
|
|
254
250
|
var tsVersion = ts2.version;
|
|
@@ -261,10 +257,10 @@ function verifySupportedTypeScriptVersion() {
|
|
|
261
257
|
checkVersion(tsVersion, MIN_TS_VERSION, MAX_TS_VERSION);
|
|
262
258
|
}
|
|
263
259
|
|
|
264
|
-
// bazel-out/
|
|
265
|
-
import
|
|
260
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
261
|
+
import ts32 from "typescript";
|
|
266
262
|
|
|
267
|
-
// bazel-out/
|
|
263
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/analyzer.mjs
|
|
268
264
|
var CycleAnalyzer = class {
|
|
269
265
|
constructor(importGraph) {
|
|
270
266
|
this.importGraph = importGraph;
|
|
@@ -335,7 +331,7 @@ var Cycle = class {
|
|
|
335
331
|
}
|
|
336
332
|
};
|
|
337
333
|
|
|
338
|
-
// bazel-out/
|
|
334
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/cycles/src/imports.mjs
|
|
339
335
|
import ts3 from "typescript";
|
|
340
336
|
var ImportGraph = class {
|
|
341
337
|
constructor(checker, perf) {
|
|
@@ -427,7 +423,7 @@ var Found = class {
|
|
|
427
423
|
}
|
|
428
424
|
};
|
|
429
425
|
|
|
430
|
-
// bazel-out/
|
|
426
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/generator.mjs
|
|
431
427
|
import ts4 from "typescript";
|
|
432
428
|
var FlatIndexGenerator = class {
|
|
433
429
|
constructor(entryPoint, relativeFlatIndexPath, moduleName) {
|
|
@@ -452,7 +448,7 @@ export * from '${relativeEntryPoint}';
|
|
|
452
448
|
}
|
|
453
449
|
};
|
|
454
450
|
|
|
455
|
-
// bazel-out/
|
|
451
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/logic.mjs
|
|
456
452
|
function findFlatIndexEntryPoint(rootFiles) {
|
|
457
453
|
const tsFiles = rootFiles.filter((file) => isNonDeclarationTsPath(file));
|
|
458
454
|
let resolvedEntryPoint = null;
|
|
@@ -468,7 +464,7 @@ function findFlatIndexEntryPoint(rootFiles) {
|
|
|
468
464
|
return resolvedEntryPoint;
|
|
469
465
|
}
|
|
470
466
|
|
|
471
|
-
// bazel-out/
|
|
467
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/private_export_checker.mjs
|
|
472
468
|
import ts5 from "typescript";
|
|
473
469
|
function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
474
470
|
const diagnostics = [];
|
|
@@ -502,13 +498,13 @@ function checkForPrivateExports(entryPoint, checker, refGraph) {
|
|
|
502
498
|
if (transitivePath !== null) {
|
|
503
499
|
visibleVia = transitivePath.map((seg) => getNameOfDeclaration(seg)).join(" -> ");
|
|
504
500
|
}
|
|
505
|
-
const diagnostic =
|
|
501
|
+
const diagnostic = {
|
|
506
502
|
category: ts5.DiagnosticCategory.Error,
|
|
507
503
|
code: ngErrorCode(ErrorCode.SYMBOL_NOT_EXPORTED),
|
|
508
|
-
file: transitiveReference.getSourceFile()
|
|
509
|
-
|
|
504
|
+
file: transitiveReference.getSourceFile(),
|
|
505
|
+
...getPosOfDeclaration(transitiveReference),
|
|
510
506
|
messageText: `Unsupported private ${descriptor} ${name}. This ${descriptor} is visible to consumers via ${visibleVia}, but is not exported from the top-level library entrypoint.`
|
|
511
|
-
}
|
|
507
|
+
};
|
|
512
508
|
diagnostics.push(diagnostic);
|
|
513
509
|
}
|
|
514
510
|
});
|
|
@@ -548,7 +544,7 @@ function getDescriptorOfDeclaration(decl) {
|
|
|
548
544
|
}
|
|
549
545
|
}
|
|
550
546
|
|
|
551
|
-
// bazel-out/
|
|
547
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/entry_point/src/reference_graph.mjs
|
|
552
548
|
var ReferenceGraph = class {
|
|
553
549
|
constructor() {
|
|
554
550
|
this.references = /* @__PURE__ */ new Map();
|
|
@@ -602,7 +598,7 @@ var ReferenceGraph = class {
|
|
|
602
598
|
}
|
|
603
599
|
};
|
|
604
600
|
|
|
605
|
-
// bazel-out/
|
|
601
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/api.mjs
|
|
606
602
|
var NgOriginalFile = Symbol("NgOriginalFile");
|
|
607
603
|
var UpdateMode;
|
|
608
604
|
(function(UpdateMode2) {
|
|
@@ -610,13 +606,13 @@ var UpdateMode;
|
|
|
610
606
|
UpdateMode2[UpdateMode2["Incremental"] = 1] = "Incremental";
|
|
611
607
|
})(UpdateMode || (UpdateMode = {}));
|
|
612
608
|
|
|
613
|
-
// bazel-out/
|
|
609
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
614
610
|
import ts9 from "typescript";
|
|
615
611
|
|
|
616
|
-
// bazel-out/
|
|
612
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
|
|
617
613
|
import ts6 from "typescript";
|
|
618
614
|
|
|
619
|
-
// bazel-out/
|
|
615
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/expando.mjs
|
|
620
616
|
var NgExtension = Symbol("NgExtension");
|
|
621
617
|
function isExtended(sf) {
|
|
622
618
|
return sf[NgExtension] !== void 0;
|
|
@@ -676,7 +672,7 @@ function retagTsFile(sf) {
|
|
|
676
672
|
}
|
|
677
673
|
}
|
|
678
674
|
|
|
679
|
-
// bazel-out/
|
|
675
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/util.mjs
|
|
680
676
|
var TS_EXTENSIONS = /\.tsx?$/i;
|
|
681
677
|
function makeShimFileName(fileName, suffix) {
|
|
682
678
|
return absoluteFrom(fileName.replace(TS_EXTENSIONS, suffix));
|
|
@@ -691,7 +687,7 @@ function generatedModuleName(originalModuleName, originalFileName, genSuffix) {
|
|
|
691
687
|
return moduleName;
|
|
692
688
|
}
|
|
693
689
|
|
|
694
|
-
// bazel-out/
|
|
690
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/adapter.mjs
|
|
695
691
|
var ShimAdapter = class {
|
|
696
692
|
constructor(delegate, tsRootFiles, topLevelGenerators, perFileGenerators, oldProgram) {
|
|
697
693
|
this.delegate = delegate;
|
|
@@ -788,7 +784,7 @@ var ShimAdapter = class {
|
|
|
788
784
|
}
|
|
789
785
|
};
|
|
790
786
|
|
|
791
|
-
// bazel-out/
|
|
787
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/factory_generator.mjs
|
|
792
788
|
import ts7 from "typescript";
|
|
793
789
|
var TS_DTS_SUFFIX = /(\.d)?\.ts$/;
|
|
794
790
|
var STRIP_NG_FACTORY = /(.*)NgFactory$/;
|
|
@@ -935,7 +931,7 @@ function updateInitializers(stmt, update) {
|
|
|
935
931
|
return ts7.factory.updateVariableStatement(stmt, stmt.modifiers, ts7.factory.updateVariableDeclarationList(stmt.declarationList, stmt.declarationList.declarations.map((decl) => ts7.updateVariableDeclaration(decl, decl.name, decl.type, update(decl.initializer)))));
|
|
936
932
|
}
|
|
937
933
|
|
|
938
|
-
// bazel-out/
|
|
934
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/reference_tagger.mjs
|
|
939
935
|
var ShimReferenceTagger = class {
|
|
940
936
|
constructor(shimExtensions) {
|
|
941
937
|
this.tagged = /* @__PURE__ */ new Set();
|
|
@@ -969,7 +965,7 @@ var ShimReferenceTagger = class {
|
|
|
969
965
|
}
|
|
970
966
|
};
|
|
971
967
|
|
|
972
|
-
// bazel-out/
|
|
968
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/shims/src/summary_generator.mjs
|
|
973
969
|
import ts8 from "typescript";
|
|
974
970
|
var SummaryGenerator = class {
|
|
975
971
|
constructor() {
|
|
@@ -1009,7 +1005,7 @@ function isExported2(decl) {
|
|
|
1009
1005
|
return decl.modifiers !== void 0 && decl.modifiers.some((mod) => mod.kind == ts8.SyntaxKind.ExportKeyword);
|
|
1010
1006
|
}
|
|
1011
1007
|
|
|
1012
|
-
// bazel-out/
|
|
1008
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program_driver/src/ts_create_program_driver.mjs
|
|
1013
1009
|
var DelegatingCompilerHost = class {
|
|
1014
1010
|
constructor(delegate) {
|
|
1015
1011
|
this.delegate = delegate;
|
|
@@ -1119,7 +1115,7 @@ var TsCreateProgramDriver = class {
|
|
|
1119
1115
|
}
|
|
1120
1116
|
};
|
|
1121
1117
|
|
|
1122
|
-
// bazel-out/
|
|
1118
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/dependency_tracking.mjs
|
|
1123
1119
|
var FileDependencyGraph = class {
|
|
1124
1120
|
constructor() {
|
|
1125
1121
|
this.nodes = /* @__PURE__ */ new Map();
|
|
@@ -1186,7 +1182,7 @@ function isLogicallyChanged(sf, node, changedTsPaths, deletedTsPaths, changedRes
|
|
|
1186
1182
|
return false;
|
|
1187
1183
|
}
|
|
1188
1184
|
|
|
1189
|
-
// bazel-out/
|
|
1185
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/state.mjs
|
|
1190
1186
|
var IncrementalStateKind;
|
|
1191
1187
|
(function(IncrementalStateKind2) {
|
|
1192
1188
|
IncrementalStateKind2[IncrementalStateKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -1194,7 +1190,7 @@ var IncrementalStateKind;
|
|
|
1194
1190
|
IncrementalStateKind2[IncrementalStateKind2["Analyzed"] = 2] = "Analyzed";
|
|
1195
1191
|
})(IncrementalStateKind || (IncrementalStateKind = {}));
|
|
1196
1192
|
|
|
1197
|
-
// bazel-out/
|
|
1193
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/incremental.mjs
|
|
1198
1194
|
var PhaseKind;
|
|
1199
1195
|
(function(PhaseKind2) {
|
|
1200
1196
|
PhaseKind2[PhaseKind2["Analysis"] = 0] = "Analysis";
|
|
@@ -1395,7 +1391,7 @@ function toOriginalSourceFile(sf) {
|
|
|
1395
1391
|
}
|
|
1396
1392
|
}
|
|
1397
1393
|
|
|
1398
|
-
// bazel-out/
|
|
1394
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/src/strategy.mjs
|
|
1399
1395
|
var TrackedIncrementalBuildStrategy = class {
|
|
1400
1396
|
constructor() {
|
|
1401
1397
|
this.state = null;
|
|
@@ -1431,7 +1427,7 @@ var PatchedProgramIncrementalBuildStrategy = class {
|
|
|
1431
1427
|
};
|
|
1432
1428
|
var SYM_INCREMENTAL_STATE = Symbol("NgIncrementalState");
|
|
1433
1429
|
|
|
1434
|
-
// bazel-out/
|
|
1430
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/api.mjs
|
|
1435
1431
|
var IdentifierKind;
|
|
1436
1432
|
(function(IdentifierKind2) {
|
|
1437
1433
|
IdentifierKind2[IdentifierKind2["Property"] = 0] = "Property";
|
|
@@ -1449,7 +1445,7 @@ var AbsoluteSourceSpan = class {
|
|
|
1449
1445
|
}
|
|
1450
1446
|
};
|
|
1451
1447
|
|
|
1452
|
-
// bazel-out/
|
|
1448
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/context.mjs
|
|
1453
1449
|
var IndexingContext = class {
|
|
1454
1450
|
constructor() {
|
|
1455
1451
|
this.components = /* @__PURE__ */ new Set();
|
|
@@ -1459,10 +1455,10 @@ var IndexingContext = class {
|
|
|
1459
1455
|
}
|
|
1460
1456
|
};
|
|
1461
1457
|
|
|
1462
|
-
// bazel-out/
|
|
1458
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
1463
1459
|
import { ParseSourceFile } from "@angular/compiler";
|
|
1464
1460
|
|
|
1465
|
-
// bazel-out/
|
|
1461
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/template.mjs
|
|
1466
1462
|
import { ASTWithSource, ImplicitReceiver, PropertyRead, PropertyWrite, RecursiveAstVisitor, TmplAstElement, TmplAstRecursiveVisitor, TmplAstReference, TmplAstTemplate } from "@angular/compiler";
|
|
1467
1463
|
var ExpressionVisitor = class extends RecursiveAstVisitor {
|
|
1468
1464
|
constructor(expressionStr, absoluteOffset, boundTemplate, targetToIdentifier) {
|
|
@@ -1567,11 +1563,11 @@ var TemplateVisitor = class extends TmplAstRecursiveVisitor {
|
|
|
1567
1563
|
this.visitExpression(text.value);
|
|
1568
1564
|
}
|
|
1569
1565
|
visitReference(reference) {
|
|
1570
|
-
const
|
|
1571
|
-
if (
|
|
1566
|
+
const referenceIdentifier = this.targetToIdentifier(reference);
|
|
1567
|
+
if (referenceIdentifier === null) {
|
|
1572
1568
|
return;
|
|
1573
1569
|
}
|
|
1574
|
-
this.identifiers.add(
|
|
1570
|
+
this.identifiers.add(referenceIdentifier);
|
|
1575
1571
|
}
|
|
1576
1572
|
visitVariable(variable) {
|
|
1577
1573
|
const variableIdentifier = this.targetToIdentifier(variable);
|
|
@@ -1699,7 +1695,7 @@ function getTemplateIdentifiers(boundTemplate) {
|
|
|
1699
1695
|
return { identifiers: visitor.identifiers, errors: visitor.errors };
|
|
1700
1696
|
}
|
|
1701
1697
|
|
|
1702
|
-
// bazel-out/
|
|
1698
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/indexer/src/transform.mjs
|
|
1703
1699
|
function generateAnalysis(context) {
|
|
1704
1700
|
const analysis = /* @__PURE__ */ new Map();
|
|
1705
1701
|
context.components.forEach(({ declaration, selector, boundTemplate, templateMeta }) => {
|
|
@@ -1735,7 +1731,7 @@ function generateAnalysis(context) {
|
|
|
1735
1731
|
return analysis;
|
|
1736
1732
|
}
|
|
1737
1733
|
|
|
1738
|
-
// bazel-out/
|
|
1734
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/resource/src/loader.mjs
|
|
1739
1735
|
import ts10 from "typescript";
|
|
1740
1736
|
var CSS_PREPROCESSOR_EXT = /(\.scss|\.sass|\.less|\.styl)$/;
|
|
1741
1737
|
var RESOURCE_MARKER = ".$ngresource$";
|
|
@@ -1881,7 +1877,7 @@ function createLookupResolutionHost(adapter) {
|
|
|
1881
1877
|
};
|
|
1882
1878
|
}
|
|
1883
1879
|
|
|
1884
|
-
// bazel-out/
|
|
1880
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/scope/src/standalone.mjs
|
|
1885
1881
|
var StandaloneComponentScopeReader = class {
|
|
1886
1882
|
constructor(metaReader, localModuleReader, dtsModuleReader) {
|
|
1887
1883
|
this.metaReader = metaReader;
|
|
@@ -1909,19 +1905,19 @@ var StandaloneComponentScopeReader = class {
|
|
|
1909
1905
|
seen.add(ref.node);
|
|
1910
1906
|
const dirMeta = this.metaReader.getDirectiveMetadata(ref);
|
|
1911
1907
|
if (dirMeta !== null) {
|
|
1912
|
-
dependencies.add(
|
|
1908
|
+
dependencies.add({ ...dirMeta, ref });
|
|
1913
1909
|
isPoisoned = isPoisoned || dirMeta.isPoisoned || !dirMeta.isStandalone;
|
|
1914
1910
|
continue;
|
|
1915
1911
|
}
|
|
1916
1912
|
const pipeMeta = this.metaReader.getPipeMetadata(ref);
|
|
1917
1913
|
if (pipeMeta !== null) {
|
|
1918
|
-
dependencies.add(
|
|
1914
|
+
dependencies.add({ ...pipeMeta, ref });
|
|
1919
1915
|
isPoisoned = isPoisoned || !pipeMeta.isStandalone;
|
|
1920
1916
|
continue;
|
|
1921
1917
|
}
|
|
1922
1918
|
const ngModuleMeta = this.metaReader.getNgModuleMetadata(ref);
|
|
1923
1919
|
if (ngModuleMeta !== null) {
|
|
1924
|
-
dependencies.add(
|
|
1920
|
+
dependencies.add({ ...ngModuleMeta, ref });
|
|
1925
1921
|
let ngModuleScope;
|
|
1926
1922
|
if (ref.node.getSourceFile().isDeclarationFile) {
|
|
1927
1923
|
ngModuleScope = this.dtsModuleReader.resolve(ref);
|
|
@@ -1959,10 +1955,10 @@ var StandaloneComponentScopeReader = class {
|
|
|
1959
1955
|
}
|
|
1960
1956
|
};
|
|
1961
1957
|
|
|
1962
|
-
// bazel-out/
|
|
1958
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
1963
1959
|
import { CssSelector, DomElementSchemaRegistry as DomElementSchemaRegistry2 } from "@angular/compiler";
|
|
1964
1960
|
|
|
1965
|
-
// bazel-out/
|
|
1961
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.mjs
|
|
1966
1962
|
import ts11 from "typescript";
|
|
1967
1963
|
function makeTemplateDiagnostic(templateId, mapping, span, category, code, messageText, relatedMessages) {
|
|
1968
1964
|
if (mapping.type === "direct") {
|
|
@@ -2035,7 +2031,7 @@ function makeTemplateDiagnostic(templateId, mapping, span, category, code, messa
|
|
|
2035
2031
|
}
|
|
2036
2032
|
}
|
|
2037
2033
|
|
|
2038
|
-
// bazel-out/
|
|
2034
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/id.mjs
|
|
2039
2035
|
var TEMPLATE_ID = Symbol("ngTemplateId");
|
|
2040
2036
|
var NEXT_TEMPLATE_ID = Symbol("ngNextTemplateId");
|
|
2041
2037
|
function getTemplateId(clazz) {
|
|
@@ -2052,11 +2048,11 @@ function allocateTemplateId(sf) {
|
|
|
2052
2048
|
return `tcb${sf[NEXT_TEMPLATE_ID]++}`;
|
|
2053
2049
|
}
|
|
2054
2050
|
|
|
2055
|
-
// bazel-out/
|
|
2051
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
2056
2052
|
import { EmptyExpr, ImplicitReceiver as ImplicitReceiver2, PropertyRead as PropertyRead2, PropertyWrite as PropertyWrite2, SafePropertyRead, TmplAstReference as TmplAstReference2, TmplAstTextAttribute } from "@angular/compiler";
|
|
2057
2053
|
import ts13 from "typescript";
|
|
2058
2054
|
|
|
2059
|
-
// bazel-out/
|
|
2055
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/comments.mjs
|
|
2060
2056
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan2 } from "@angular/compiler";
|
|
2061
2057
|
import ts12 from "typescript";
|
|
2062
2058
|
var parseSpanComment = /^(\d+),(\d+)$/;
|
|
@@ -2176,7 +2172,7 @@ function hasExpressionIdentifier(sourceFile, node, identifier) {
|
|
|
2176
2172
|
}) || false;
|
|
2177
2173
|
}
|
|
2178
2174
|
|
|
2179
|
-
// bazel-out/
|
|
2175
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/completion.mjs
|
|
2180
2176
|
var CompletionEngine = class {
|
|
2181
2177
|
constructor(tcb, data, tcbPath, tcbIsShim) {
|
|
2182
2178
|
this.tcb = tcb;
|
|
@@ -2333,10 +2329,10 @@ var CompletionEngine = class {
|
|
|
2333
2329
|
}
|
|
2334
2330
|
};
|
|
2335
2331
|
|
|
2336
|
-
// bazel-out/
|
|
2332
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
2337
2333
|
import ts27 from "typescript";
|
|
2338
2334
|
|
|
2339
|
-
// bazel-out/
|
|
2335
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/dom.mjs
|
|
2340
2336
|
import { DomElementSchemaRegistry } from "@angular/compiler";
|
|
2341
2337
|
import ts14 from "typescript";
|
|
2342
2338
|
var REGISTRY = new DomElementSchemaRegistry();
|
|
@@ -2389,11 +2385,11 @@ var RegistryDomSchemaChecker = class {
|
|
|
2389
2385
|
}
|
|
2390
2386
|
};
|
|
2391
2387
|
|
|
2392
|
-
// bazel-out/
|
|
2388
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
2393
2389
|
import { ExpressionType, ExternalExpr, TypeModifier } from "@angular/compiler";
|
|
2394
2390
|
import ts20 from "typescript";
|
|
2395
2391
|
|
|
2396
|
-
// bazel-out/
|
|
2392
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/ts_util.mjs
|
|
2397
2393
|
import ts15 from "typescript";
|
|
2398
2394
|
var PARSED_TS_VERSION = parseFloat(ts15.versionMajorMinor);
|
|
2399
2395
|
var SAFE_TO_CAST_WITHOUT_PARENS = /* @__PURE__ */ new Set([
|
|
@@ -2444,16 +2440,16 @@ function isAccessExpression(node) {
|
|
|
2444
2440
|
return ts15.isPropertyAccessExpression(node) || ts15.isElementAccessExpression(node);
|
|
2445
2441
|
}
|
|
2446
2442
|
|
|
2447
|
-
// bazel-out/
|
|
2443
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
2448
2444
|
import ts19 from "typescript";
|
|
2449
2445
|
|
|
2450
|
-
// bazel-out/
|
|
2446
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
2451
2447
|
import ts18 from "typescript";
|
|
2452
2448
|
|
|
2453
|
-
// bazel-out/
|
|
2449
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
|
|
2454
2450
|
import ts17 from "typescript";
|
|
2455
2451
|
|
|
2456
|
-
// bazel-out/
|
|
2452
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_emitter.mjs
|
|
2457
2453
|
import ts16 from "typescript";
|
|
2458
2454
|
var INELIGIBLE = {};
|
|
2459
2455
|
function canEmitType(type, canEmit) {
|
|
@@ -2515,7 +2511,7 @@ var TypeEmitter = class {
|
|
|
2515
2511
|
}
|
|
2516
2512
|
};
|
|
2517
2513
|
|
|
2518
|
-
// bazel-out/
|
|
2514
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_parameter_emitter.mjs
|
|
2519
2515
|
var TypeParameterEmitter = class {
|
|
2520
2516
|
constructor(typeParameters, reflector) {
|
|
2521
2517
|
this.typeParameters = typeParameters;
|
|
@@ -2592,7 +2588,7 @@ var TypeParameterEmitter = class {
|
|
|
2592
2588
|
}
|
|
2593
2589
|
};
|
|
2594
2590
|
|
|
2595
|
-
// bazel-out/
|
|
2591
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/tcb_util.mjs
|
|
2596
2592
|
var TcbInliningRequirement;
|
|
2597
2593
|
(function(TcbInliningRequirement2) {
|
|
2598
2594
|
TcbInliningRequirement2[TcbInliningRequirement2["MustInline"] = 0] = "MustInline";
|
|
@@ -2604,7 +2600,7 @@ function requiresInlineTypeCheckBlock(ref, env, usedPipes, reflector) {
|
|
|
2604
2600
|
return TcbInliningRequirement.MustInline;
|
|
2605
2601
|
} else if (!checkIfGenericTypeBoundsCanBeEmitted(ref.node, reflector, env)) {
|
|
2606
2602
|
return TcbInliningRequirement.ShouldInlineForGenericBounds;
|
|
2607
|
-
} else if (
|
|
2603
|
+
} else if (usedPipes.some((pipeRef) => !env.canReferenceType(pipeRef))) {
|
|
2608
2604
|
return TcbInliningRequirement.MustInline;
|
|
2609
2605
|
} else {
|
|
2610
2606
|
return TcbInliningRequirement.None;
|
|
@@ -2672,7 +2668,7 @@ function checkIfGenericTypeBoundsCanBeEmitted(node, reflector, env) {
|
|
|
2672
2668
|
return emitter.canEmit((ref) => env.canReferenceType(ref));
|
|
2673
2669
|
}
|
|
2674
2670
|
|
|
2675
|
-
// bazel-out/
|
|
2671
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_constructor.mjs
|
|
2676
2672
|
function generateTypeCtorDeclarationFn(node, meta, nodeTypeRef, typeParams) {
|
|
2677
2673
|
const rawTypeArgs = typeParams !== void 0 ? generateGenericArgs(typeParams) : void 0;
|
|
2678
2674
|
const rawType = ts19.factory.createTypeReferenceNode(nodeTypeRef, rawTypeArgs);
|
|
@@ -2743,7 +2739,7 @@ function typeParametersWithDefaultTypes(params) {
|
|
|
2743
2739
|
});
|
|
2744
2740
|
}
|
|
2745
2741
|
|
|
2746
|
-
// bazel-out/
|
|
2742
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/environment.mjs
|
|
2747
2743
|
var Environment = class {
|
|
2748
2744
|
constructor(config, importManager, refEmitter, reflector, contextFile) {
|
|
2749
2745
|
this.config = config;
|
|
@@ -2835,7 +2831,7 @@ var Environment = class {
|
|
|
2835
2831
|
}
|
|
2836
2832
|
};
|
|
2837
2833
|
|
|
2838
|
-
// bazel-out/
|
|
2834
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/oob.mjs
|
|
2839
2835
|
import { TmplAstElement as TmplAstElement2 } from "@angular/compiler";
|
|
2840
2836
|
import ts21 from "typescript";
|
|
2841
2837
|
var OutOfBandDiagnosticRecorderImpl = class {
|
|
@@ -2961,13 +2957,14 @@ Consider enabling the 'strictTemplates' option in your tsconfig.json for better
|
|
|
2961
2957
|
}
|
|
2962
2958
|
};
|
|
2963
2959
|
function makeInlineDiagnostic(templateId, code, node, messageText, relatedInformation) {
|
|
2964
|
-
return
|
|
2960
|
+
return {
|
|
2961
|
+
...makeDiagnostic(code, node, messageText, relatedInformation),
|
|
2965
2962
|
componentFile: node.getSourceFile(),
|
|
2966
2963
|
templateId
|
|
2967
|
-
}
|
|
2964
|
+
};
|
|
2968
2965
|
}
|
|
2969
2966
|
|
|
2970
|
-
// bazel-out/
|
|
2967
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/shim.mjs
|
|
2971
2968
|
import ts22 from "typescript";
|
|
2972
2969
|
var TypeCheckShimGenerator = class {
|
|
2973
2970
|
constructor() {
|
|
@@ -2985,11 +2982,11 @@ var TypeCheckShimGenerator = class {
|
|
|
2985
2982
|
}
|
|
2986
2983
|
};
|
|
2987
2984
|
|
|
2988
|
-
// bazel-out/
|
|
2985
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
2989
2986
|
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";
|
|
2990
2987
|
import ts25 from "typescript";
|
|
2991
2988
|
|
|
2992
|
-
// bazel-out/
|
|
2989
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/diagnostics.mjs
|
|
2993
2990
|
import { AbsoluteSourceSpan as AbsoluteSourceSpan3 } from "@angular/compiler";
|
|
2994
2991
|
import ts23 from "typescript";
|
|
2995
2992
|
function wrapForDiagnostics(expr) {
|
|
@@ -3035,7 +3032,7 @@ function translateDiagnostic(diagnostic, resolver) {
|
|
|
3035
3032
|
return makeTemplateDiagnostic(sourceLocation.id, templateSourceMapping, span, diagnostic.category, diagnostic.code, diagnostic.messageText);
|
|
3036
3033
|
}
|
|
3037
3034
|
|
|
3038
|
-
// bazel-out/
|
|
3035
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/expression.mjs
|
|
3039
3036
|
import { ASTWithSource as ASTWithSource2, Call, EmptyExpr as EmptyExpr2, PropertyRead as PropertyRead3, SafeKeyedRead, SafePropertyRead as SafePropertyRead2 } from "@angular/compiler";
|
|
3040
3037
|
import ts24 from "typescript";
|
|
3041
3038
|
var NULL_AS_ANY = ts24.factory.createAsExpression(ts24.factory.createNull(), ts24.factory.createKeywordTypeNode(ts24.SyntaxKind.AnyKeyword));
|
|
@@ -3365,7 +3362,7 @@ var VeSafeLhsInferenceBugDetector = class {
|
|
|
3365
3362
|
};
|
|
3366
3363
|
VeSafeLhsInferenceBugDetector.SINGLETON = new VeSafeLhsInferenceBugDetector();
|
|
3367
3364
|
|
|
3368
|
-
// bazel-out/
|
|
3365
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_semantics.mjs
|
|
3369
3366
|
import { ImplicitReceiver as ImplicitReceiver3, RecursiveAstVisitor as RecursiveAstVisitor2, TmplAstVariable } from "@angular/compiler";
|
|
3370
3367
|
var ExpressionSemanticVisitor = class extends RecursiveAstVisitor2 {
|
|
3371
3368
|
constructor(templateId, boundTarget, oob) {
|
|
@@ -3389,7 +3386,7 @@ var ExpressionSemanticVisitor = class extends RecursiveAstVisitor2 {
|
|
|
3389
3386
|
}
|
|
3390
3387
|
};
|
|
3391
3388
|
|
|
3392
|
-
// bazel-out/
|
|
3389
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.mjs
|
|
3393
3390
|
var TcbGenericContextBehavior;
|
|
3394
3391
|
(function(TcbGenericContextBehavior2) {
|
|
3395
3392
|
TcbGenericContextBehavior2[TcbGenericContextBehavior2["UseEmitter"] = 0] = "UseEmitter";
|
|
@@ -4440,7 +4437,7 @@ var TcbEventHandlerTranslator = class extends TcbExpressionTranslator {
|
|
|
4440
4437
|
}
|
|
4441
4438
|
};
|
|
4442
4439
|
|
|
4443
|
-
// bazel-out/
|
|
4440
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_file.mjs
|
|
4444
4441
|
import ts26 from "typescript";
|
|
4445
4442
|
var TypeCheckFile = class extends Environment {
|
|
4446
4443
|
constructor(fileName, config, refEmitter, reflector, compilerHost) {
|
|
@@ -4476,7 +4473,7 @@ var TypeCheckFile = class extends Environment {
|
|
|
4476
4473
|
}
|
|
4477
4474
|
};
|
|
4478
4475
|
|
|
4479
|
-
// bazel-out/
|
|
4476
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/context.mjs
|
|
4480
4477
|
var InliningMode;
|
|
4481
4478
|
(function(InliningMode2) {
|
|
4482
4479
|
InliningMode2[InliningMode2["InlineOps"] = 0] = "InlineOps";
|
|
@@ -4534,7 +4531,14 @@ var TypeCheckContextImpl = class {
|
|
|
4534
4531
|
boundTarget,
|
|
4535
4532
|
templateDiagnostics
|
|
4536
4533
|
});
|
|
4537
|
-
const
|
|
4534
|
+
const usedPipes = [];
|
|
4535
|
+
for (const name of boundTarget.getUsedPipes()) {
|
|
4536
|
+
if (!pipes.has(name)) {
|
|
4537
|
+
continue;
|
|
4538
|
+
}
|
|
4539
|
+
usedPipes.push(pipes.get(name));
|
|
4540
|
+
}
|
|
4541
|
+
const inliningRequirement = requiresInlineTypeCheckBlock(ref, shimData.file, usedPipes, this.reflector);
|
|
4538
4542
|
if (this.inlining === InliningMode.Error && inliningRequirement === TcbInliningRequirement.MustInline) {
|
|
4539
4543
|
shimData.oobRecorder.requiresInlineTcb(templateId, ref.node);
|
|
4540
4544
|
this.perf.eventCount(PerfEvent.SkipGenerateTcbNoInline);
|
|
@@ -4707,10 +4711,10 @@ function splitStringAtPoints(str, points) {
|
|
|
4707
4711
|
return splits;
|
|
4708
4712
|
}
|
|
4709
4713
|
|
|
4710
|
-
// bazel-out/
|
|
4714
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
4711
4715
|
import { ParseLocation, ParseSourceSpan } from "@angular/compiler";
|
|
4712
4716
|
|
|
4713
|
-
// bazel-out/
|
|
4717
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/line_mappings.mjs
|
|
4714
4718
|
var LF_CHAR = 10;
|
|
4715
4719
|
var CR_CHAR = 13;
|
|
4716
4720
|
var LINE_SEP_CHAR = 8232;
|
|
@@ -4751,7 +4755,7 @@ function findClosestLineStartPosition(linesMap, position, low = 0, high = linesM
|
|
|
4751
4755
|
return low - 1;
|
|
4752
4756
|
}
|
|
4753
4757
|
|
|
4754
|
-
// bazel-out/
|
|
4758
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/source.mjs
|
|
4755
4759
|
var TemplateSource = class {
|
|
4756
4760
|
constructor(mapping, file) {
|
|
4757
4761
|
this.mapping = mapping;
|
|
@@ -4802,7 +4806,7 @@ var TemplateSourceManager = class {
|
|
|
4802
4806
|
}
|
|
4803
4807
|
};
|
|
4804
4808
|
|
|
4805
|
-
// bazel-out/
|
|
4809
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
|
|
4806
4810
|
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";
|
|
4807
4811
|
import ts28 from "typescript";
|
|
4808
4812
|
var SymbolBuilder = class {
|
|
@@ -4857,11 +4861,12 @@ var SymbolBuilder = class {
|
|
|
4857
4861
|
return null;
|
|
4858
4862
|
}
|
|
4859
4863
|
const directives = this.getDirectivesOfNode(element);
|
|
4860
|
-
return
|
|
4864
|
+
return {
|
|
4865
|
+
...symbolFromDeclaration,
|
|
4861
4866
|
kind: SymbolKind.Element,
|
|
4862
4867
|
directives,
|
|
4863
4868
|
templateNode: element
|
|
4864
|
-
}
|
|
4869
|
+
};
|
|
4865
4870
|
}
|
|
4866
4871
|
getDirectivesOfNode(element) {
|
|
4867
4872
|
var _a;
|
|
@@ -4884,14 +4889,15 @@ var SymbolBuilder = class {
|
|
|
4884
4889
|
return null;
|
|
4885
4890
|
}
|
|
4886
4891
|
const isComponent = (_a2 = meta.isComponent) != null ? _a2 : null;
|
|
4887
|
-
const directiveSymbol =
|
|
4892
|
+
const directiveSymbol = {
|
|
4893
|
+
...symbol,
|
|
4888
4894
|
tsSymbol: symbol.tsSymbol,
|
|
4889
4895
|
selector: meta.selector,
|
|
4890
4896
|
isComponent,
|
|
4891
4897
|
ngModule,
|
|
4892
4898
|
kind: SymbolKind.Directive,
|
|
4893
4899
|
isStructural: meta.isStructural
|
|
4894
|
-
}
|
|
4900
|
+
};
|
|
4895
4901
|
return directiveSymbol;
|
|
4896
4902
|
}).filter((d) => d !== null);
|
|
4897
4903
|
}
|
|
@@ -5028,11 +5034,12 @@ var SymbolBuilder = class {
|
|
|
5028
5034
|
if (target === null) {
|
|
5029
5035
|
continue;
|
|
5030
5036
|
}
|
|
5031
|
-
bindings.push(
|
|
5037
|
+
bindings.push({
|
|
5038
|
+
...symbolInfo,
|
|
5032
5039
|
tsSymbol: symbolInfo.tsSymbol,
|
|
5033
5040
|
kind: SymbolKind.Binding,
|
|
5034
5041
|
target
|
|
5035
|
-
})
|
|
5042
|
+
});
|
|
5036
5043
|
}
|
|
5037
5044
|
if (bindings.length === 0) {
|
|
5038
5045
|
return null;
|
|
@@ -5149,13 +5156,14 @@ var SymbolBuilder = class {
|
|
|
5149
5156
|
if (symbolInfo === null) {
|
|
5150
5157
|
return null;
|
|
5151
5158
|
}
|
|
5152
|
-
return
|
|
5153
|
-
kind: SymbolKind.Pipe
|
|
5154
|
-
|
|
5155
|
-
classSymbol:
|
|
5159
|
+
return {
|
|
5160
|
+
kind: SymbolKind.Pipe,
|
|
5161
|
+
...symbolInfo,
|
|
5162
|
+
classSymbol: {
|
|
5163
|
+
...pipeInstance,
|
|
5156
5164
|
tsSymbol: pipeInstance.tsSymbol
|
|
5157
|
-
}
|
|
5158
|
-
}
|
|
5165
|
+
}
|
|
5166
|
+
};
|
|
5159
5167
|
}
|
|
5160
5168
|
getSymbolOfTemplateExpression(expression) {
|
|
5161
5169
|
if (expression instanceof ASTWithSource3) {
|
|
@@ -5187,13 +5195,14 @@ var SymbolBuilder = class {
|
|
|
5187
5195
|
if (whenTrueSymbol === null) {
|
|
5188
5196
|
return null;
|
|
5189
5197
|
}
|
|
5190
|
-
return
|
|
5198
|
+
return {
|
|
5199
|
+
...whenTrueSymbol,
|
|
5191
5200
|
kind: SymbolKind.Expression,
|
|
5192
5201
|
tsType: this.getTypeChecker().getTypeAtLocation(node)
|
|
5193
|
-
}
|
|
5202
|
+
};
|
|
5194
5203
|
} else {
|
|
5195
5204
|
const symbolInfo = this.getSymbolOfTsNode(node);
|
|
5196
|
-
return symbolInfo === null ? null :
|
|
5205
|
+
return symbolInfo === null ? null : { ...symbolInfo, kind: SymbolKind.Expression };
|
|
5197
5206
|
}
|
|
5198
5207
|
}
|
|
5199
5208
|
getSymbolOfTsNode(node) {
|
|
@@ -5242,7 +5251,7 @@ function sourceSpanEqual(a, b) {
|
|
|
5242
5251
|
return a.start.offset === b.start.offset && a.end.offset === b.end.offset;
|
|
5243
5252
|
}
|
|
5244
5253
|
|
|
5245
|
-
// bazel-out/
|
|
5254
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/checker.mjs
|
|
5246
5255
|
var REGISTRY2 = new DomElementSchemaRegistry2();
|
|
5247
5256
|
var TemplateTypeCheckerImpl = class {
|
|
5248
5257
|
constructor(originalProgram, programDriver, typeCheckAdapter, config, refEmitter, reflector, compilerHost, priorBuild, componentScopeReader, typeCheckScopeRegistry, perf) {
|
|
@@ -5442,9 +5451,10 @@ var TemplateTypeCheckerImpl = class {
|
|
|
5442
5451
|
const fileRecord = this.state.get(sfPath);
|
|
5443
5452
|
const templateId = fileRecord.sourceManager.getTemplateId(clazz);
|
|
5444
5453
|
const mapping = fileRecord.sourceManager.getSourceMapping(templateId);
|
|
5445
|
-
return
|
|
5454
|
+
return {
|
|
5455
|
+
...makeTemplateDiagnostic(templateId, mapping, sourceSpan, category, ngErrorCode(errorCode), message, relatedInformation),
|
|
5446
5456
|
__ngCode: errorCode
|
|
5447
|
-
}
|
|
5457
|
+
};
|
|
5448
5458
|
}
|
|
5449
5459
|
getOrCreateCompletionEngine(component) {
|
|
5450
5460
|
if (this.completionCache.has(component)) {
|
|
@@ -5778,10 +5788,10 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
|
|
|
5778
5788
|
}
|
|
5779
5789
|
};
|
|
5780
5790
|
|
|
5781
|
-
// bazel-out/
|
|
5791
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
5782
5792
|
import { TmplAstBoundEvent as TmplAstBoundEvent2 } from "@angular/compiler";
|
|
5783
5793
|
|
|
5784
|
-
// bazel-out/
|
|
5794
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/api/api.mjs
|
|
5785
5795
|
import { ASTWithSource as ASTWithSource4, RecursiveAstVisitor as RecursiveAstVisitor3 } from "@angular/compiler";
|
|
5786
5796
|
var TemplateCheckWithVisitor = class {
|
|
5787
5797
|
run(ctx, component, template) {
|
|
@@ -5858,7 +5868,7 @@ var TemplateVisitor2 = class extends RecursiveAstVisitor3 {
|
|
|
5858
5868
|
}
|
|
5859
5869
|
};
|
|
5860
5870
|
|
|
5861
|
-
// bazel-out/
|
|
5871
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.mjs
|
|
5862
5872
|
var InvalidBananaInBoxCheck = class extends TemplateCheckWithVisitor {
|
|
5863
5873
|
constructor() {
|
|
5864
5874
|
super(...arguments);
|
|
@@ -5883,9 +5893,14 @@ var factory = {
|
|
|
5883
5893
|
create: () => new InvalidBananaInBoxCheck()
|
|
5884
5894
|
};
|
|
5885
5895
|
|
|
5886
|
-
// bazel-out/
|
|
5896
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.mjs
|
|
5887
5897
|
import { TmplAstTemplate as TmplAstTemplate4 } from "@angular/compiler";
|
|
5888
|
-
var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new
|
|
5898
|
+
var KNOWN_CONTROL_FLOW_DIRECTIVES = /* @__PURE__ */ new Map([
|
|
5899
|
+
["ngIf", "NgIf"],
|
|
5900
|
+
["ngFor", "NgForOf"],
|
|
5901
|
+
["ngSwitchCase", "NgSwitchCase"],
|
|
5902
|
+
["ngSwitchDefault", "NgSwitchDefault"]
|
|
5903
|
+
]);
|
|
5889
5904
|
var MissingControlFlowDirectiveCheck = class extends TemplateCheckWithVisitor {
|
|
5890
5905
|
constructor() {
|
|
5891
5906
|
super(...arguments);
|
|
@@ -5909,7 +5924,8 @@ var MissingControlFlowDirectiveCheck = class extends TemplateCheckWithVisitor {
|
|
|
5909
5924
|
return [];
|
|
5910
5925
|
}
|
|
5911
5926
|
const sourceSpan = controlFlowAttr.keySpan || controlFlowAttr.sourceSpan;
|
|
5912
|
-
const
|
|
5927
|
+
const correspondingImport = KNOWN_CONTROL_FLOW_DIRECTIVES.get(controlFlowAttr.name);
|
|
5928
|
+
const errorMessage = `The \`*${controlFlowAttr.name}\` directive was used in the template, but neither the \`${correspondingImport}\` directive nor the \`CommonModule\` was imported. Please make sure that either the \`${correspondingImport}\` directive or the \`CommonModule\` is included in the \`@Component.imports\` array of this component.`;
|
|
5913
5929
|
const diagnostic = ctx.makeTemplateDiagnostic(sourceSpan, errorMessage);
|
|
5914
5930
|
return [diagnostic];
|
|
5915
5931
|
}
|
|
@@ -5922,7 +5938,40 @@ var factory2 = {
|
|
|
5922
5938
|
}
|
|
5923
5939
|
};
|
|
5924
5940
|
|
|
5925
|
-
// bazel-out/
|
|
5941
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.mjs
|
|
5942
|
+
import { TmplAstTemplate as TmplAstTemplate5 } from "@angular/compiler";
|
|
5943
|
+
var MissingNgForOfLetCheck = class extends TemplateCheckWithVisitor {
|
|
5944
|
+
constructor() {
|
|
5945
|
+
super(...arguments);
|
|
5946
|
+
this.code = ErrorCode.MISSING_NGFOROF_LET;
|
|
5947
|
+
}
|
|
5948
|
+
visitNode(ctx, component, node) {
|
|
5949
|
+
const isTemplate = node instanceof TmplAstTemplate5;
|
|
5950
|
+
if (!(node instanceof TmplAstTemplate5)) {
|
|
5951
|
+
return [];
|
|
5952
|
+
}
|
|
5953
|
+
if (node.templateAttrs.length === 0) {
|
|
5954
|
+
return [];
|
|
5955
|
+
}
|
|
5956
|
+
const attr = node.templateAttrs.find((x) => x.name === "ngFor");
|
|
5957
|
+
if (attr === void 0) {
|
|
5958
|
+
return [];
|
|
5959
|
+
}
|
|
5960
|
+
if (node.variables.length > 0) {
|
|
5961
|
+
return [];
|
|
5962
|
+
}
|
|
5963
|
+
const errorString = "Your ngFor is missing a value. Did you forget to add the `let` keyword?";
|
|
5964
|
+
const diagnostic = ctx.makeTemplateDiagnostic(attr.sourceSpan, errorString);
|
|
5965
|
+
return [diagnostic];
|
|
5966
|
+
}
|
|
5967
|
+
};
|
|
5968
|
+
var factory3 = {
|
|
5969
|
+
code: ErrorCode.MISSING_NGFOROF_LET,
|
|
5970
|
+
name: ExtendedTemplateDiagnosticName.MISSING_NGFOROF_LET,
|
|
5971
|
+
create: () => new MissingNgForOfLetCheck()
|
|
5972
|
+
};
|
|
5973
|
+
|
|
5974
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.mjs
|
|
5926
5975
|
import { Binary } from "@angular/compiler";
|
|
5927
5976
|
import ts29 from "typescript";
|
|
5928
5977
|
var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
@@ -5955,7 +6004,7 @@ var NullishCoalescingNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
|
5955
6004
|
return [diagnostic];
|
|
5956
6005
|
}
|
|
5957
6006
|
};
|
|
5958
|
-
var
|
|
6007
|
+
var factory4 = {
|
|
5959
6008
|
code: ErrorCode.NULLISH_COALESCING_NOT_NULLABLE,
|
|
5960
6009
|
name: ExtendedTemplateDiagnosticName.NULLISH_COALESCING_NOT_NULLABLE,
|
|
5961
6010
|
create: (options) => {
|
|
@@ -5967,10 +6016,119 @@ var factory3 = {
|
|
|
5967
6016
|
}
|
|
5968
6017
|
};
|
|
5969
6018
|
|
|
5970
|
-
// bazel-out/
|
|
6019
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.mjs
|
|
6020
|
+
import { SafeCall as SafeCall2, SafeKeyedRead as SafeKeyedRead2, SafePropertyRead as SafePropertyRead5 } from "@angular/compiler";
|
|
5971
6021
|
import ts30 from "typescript";
|
|
6022
|
+
var OptionalChainNotNullableCheck = class extends TemplateCheckWithVisitor {
|
|
6023
|
+
constructor() {
|
|
6024
|
+
super(...arguments);
|
|
6025
|
+
this.code = ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE;
|
|
6026
|
+
}
|
|
6027
|
+
visitNode(ctx, component, node) {
|
|
6028
|
+
if (!(node instanceof SafeCall2) && !(node instanceof SafePropertyRead5) && !(node instanceof SafeKeyedRead2))
|
|
6029
|
+
return [];
|
|
6030
|
+
const symbolLeft = ctx.templateTypeChecker.getSymbolOfNode(node.receiver, component);
|
|
6031
|
+
if (symbolLeft === null || symbolLeft.kind !== SymbolKind.Expression) {
|
|
6032
|
+
return [];
|
|
6033
|
+
}
|
|
6034
|
+
const typeLeft = symbolLeft.tsType;
|
|
6035
|
+
if (typeLeft.flags & (ts30.TypeFlags.Any | ts30.TypeFlags.Unknown)) {
|
|
6036
|
+
return [];
|
|
6037
|
+
}
|
|
6038
|
+
if (typeLeft.getNonNullableType() !== typeLeft)
|
|
6039
|
+
return [];
|
|
6040
|
+
const symbol = ctx.templateTypeChecker.getSymbolOfNode(node, component);
|
|
6041
|
+
if (symbol.kind !== SymbolKind.Expression) {
|
|
6042
|
+
return [];
|
|
6043
|
+
}
|
|
6044
|
+
const templateMapping = ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation);
|
|
6045
|
+
if (templateMapping === null) {
|
|
6046
|
+
return [];
|
|
6047
|
+
}
|
|
6048
|
+
const advice = node instanceof SafePropertyRead5 ? `the '?.' operator can be replaced with the '.' operator` : `the '?.' operator can be safely removed`;
|
|
6049
|
+
const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, `The left side of this optional chain operation does not include 'null' or 'undefined' in its type, therefore ${advice}.`);
|
|
6050
|
+
return [diagnostic];
|
|
6051
|
+
}
|
|
6052
|
+
};
|
|
6053
|
+
var factory5 = {
|
|
6054
|
+
code: ErrorCode.OPTIONAL_CHAIN_NOT_NULLABLE,
|
|
6055
|
+
name: ExtendedTemplateDiagnosticName.OPTIONAL_CHAIN_NOT_NULLABLE,
|
|
6056
|
+
create: (options) => {
|
|
6057
|
+
const strictNullChecks = options.strictNullChecks === void 0 ? !!options.strict : !!options.strictNullChecks;
|
|
6058
|
+
if (!strictNullChecks) {
|
|
6059
|
+
return null;
|
|
6060
|
+
}
|
|
6061
|
+
return new OptionalChainNotNullableCheck();
|
|
6062
|
+
}
|
|
6063
|
+
};
|
|
6064
|
+
|
|
6065
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.mjs
|
|
6066
|
+
import { TmplAstBoundAttribute as TmplAstBoundAttribute3 } from "@angular/compiler";
|
|
6067
|
+
var STYLE_SUFFIXES = ["px", "%", "em"];
|
|
6068
|
+
var SuffixNotSupportedCheck = class extends TemplateCheckWithVisitor {
|
|
6069
|
+
constructor() {
|
|
6070
|
+
super(...arguments);
|
|
6071
|
+
this.code = ErrorCode.SUFFIX_NOT_SUPPORTED;
|
|
6072
|
+
}
|
|
6073
|
+
visitNode(ctx, component, node) {
|
|
6074
|
+
if (!(node instanceof TmplAstBoundAttribute3))
|
|
6075
|
+
return [];
|
|
6076
|
+
if (!node.keySpan.toString().startsWith("attr.") || !STYLE_SUFFIXES.some((suffix) => node.name.endsWith(`.${suffix}`))) {
|
|
6077
|
+
return [];
|
|
6078
|
+
}
|
|
6079
|
+
const diagnostic = ctx.makeTemplateDiagnostic(node.keySpan, `The ${STYLE_SUFFIXES.map((suffix) => `'.${suffix}'`).join(", ")} suffixes are only supported on style bindings.`);
|
|
6080
|
+
return [diagnostic];
|
|
6081
|
+
}
|
|
6082
|
+
};
|
|
6083
|
+
var factory6 = {
|
|
6084
|
+
code: ErrorCode.SUFFIX_NOT_SUPPORTED,
|
|
6085
|
+
name: ExtendedTemplateDiagnosticName.SUFFIX_NOT_SUPPORTED,
|
|
6086
|
+
create: () => new SuffixNotSupportedCheck()
|
|
6087
|
+
};
|
|
5972
6088
|
|
|
5973
|
-
// bazel-out/
|
|
6089
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.mjs
|
|
6090
|
+
import { TmplAstTextAttribute as TmplAstTextAttribute4 } from "@angular/compiler";
|
|
6091
|
+
var TextAttributeNotBindingSpec = class extends TemplateCheckWithVisitor {
|
|
6092
|
+
constructor() {
|
|
6093
|
+
super(...arguments);
|
|
6094
|
+
this.code = ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING;
|
|
6095
|
+
}
|
|
6096
|
+
visitNode(ctx, component, node) {
|
|
6097
|
+
if (!(node instanceof TmplAstTextAttribute4))
|
|
6098
|
+
return [];
|
|
6099
|
+
const name = node.name;
|
|
6100
|
+
if (!name.startsWith("attr.") && !name.startsWith("style.") && !name.startsWith("class.")) {
|
|
6101
|
+
return [];
|
|
6102
|
+
}
|
|
6103
|
+
let errorString;
|
|
6104
|
+
if (name.startsWith("attr.")) {
|
|
6105
|
+
const staticAttr = name.replace("attr.", "");
|
|
6106
|
+
errorString = `Static attributes should be written without the 'attr.' prefix.`;
|
|
6107
|
+
if (node.value) {
|
|
6108
|
+
errorString += ` For example, ${staticAttr}="${node.value}".`;
|
|
6109
|
+
}
|
|
6110
|
+
} else {
|
|
6111
|
+
const expectedKey = `[${name}]`;
|
|
6112
|
+
const expectedValue = node.value === "true" || node.value === "false" ? node.value : `'${node.value}'`;
|
|
6113
|
+
errorString = "Attribute, style, and class bindings should be enclosed with square braces.";
|
|
6114
|
+
if (node.value) {
|
|
6115
|
+
errorString += ` For example, '${expectedKey}="${expectedValue}"'.`;
|
|
6116
|
+
}
|
|
6117
|
+
}
|
|
6118
|
+
const diagnostic = ctx.makeTemplateDiagnostic(node.sourceSpan, errorString);
|
|
6119
|
+
return [diagnostic];
|
|
6120
|
+
}
|
|
6121
|
+
};
|
|
6122
|
+
var factory7 = {
|
|
6123
|
+
code: ErrorCode.TEXT_ATTRIBUTE_NOT_BINDING,
|
|
6124
|
+
name: ExtendedTemplateDiagnosticName.TEXT_ATTRIBUTE_NOT_BINDING,
|
|
6125
|
+
create: () => new TextAttributeNotBindingSpec()
|
|
6126
|
+
};
|
|
6127
|
+
|
|
6128
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
6129
|
+
import ts31 from "typescript";
|
|
6130
|
+
|
|
6131
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/api/src/public_options.mjs
|
|
5974
6132
|
var DiagnosticCategoryLabel;
|
|
5975
6133
|
(function(DiagnosticCategoryLabel2) {
|
|
5976
6134
|
DiagnosticCategoryLabel2["Warning"] = "warning";
|
|
@@ -5978,18 +6136,18 @@ var DiagnosticCategoryLabel;
|
|
|
5978
6136
|
DiagnosticCategoryLabel2["Suppress"] = "suppress";
|
|
5979
6137
|
})(DiagnosticCategoryLabel || (DiagnosticCategoryLabel = {}));
|
|
5980
6138
|
|
|
5981
|
-
// bazel-out/
|
|
6139
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/src/extended_template_checker.mjs
|
|
5982
6140
|
var ExtendedTemplateCheckerImpl = class {
|
|
5983
6141
|
constructor(templateTypeChecker, typeChecker, templateCheckFactories, options) {
|
|
5984
6142
|
var _a, _b, _c, _d, _e;
|
|
5985
6143
|
this.partialCtx = { templateTypeChecker, typeChecker };
|
|
5986
6144
|
this.templateChecks = /* @__PURE__ */ new Map();
|
|
5987
|
-
for (const
|
|
5988
|
-
const category = diagnosticLabelToCategory((_e = (_d = (_b = (_a = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _a.checks) == null ? void 0 : _b[
|
|
6145
|
+
for (const factory8 of templateCheckFactories) {
|
|
6146
|
+
const category = diagnosticLabelToCategory((_e = (_d = (_b = (_a = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _a.checks) == null ? void 0 : _b[factory8.name]) != null ? _d : (_c = options == null ? void 0 : options.extendedDiagnostics) == null ? void 0 : _c.defaultCategory) != null ? _e : DiagnosticCategoryLabel.Warning);
|
|
5989
6147
|
if (category === null) {
|
|
5990
6148
|
continue;
|
|
5991
6149
|
}
|
|
5992
|
-
const check =
|
|
6150
|
+
const check = factory8.create(options);
|
|
5993
6151
|
if (check === null) {
|
|
5994
6152
|
continue;
|
|
5995
6153
|
}
|
|
@@ -6003,11 +6161,12 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
6003
6161
|
}
|
|
6004
6162
|
const diagnostics = [];
|
|
6005
6163
|
for (const [check, category] of this.templateChecks.entries()) {
|
|
6006
|
-
const ctx =
|
|
6164
|
+
const ctx = {
|
|
6165
|
+
...this.partialCtx,
|
|
6007
6166
|
makeTemplateDiagnostic: (span, message, relatedInformation) => {
|
|
6008
6167
|
return this.partialCtx.templateTypeChecker.makeTemplateDiagnostic(component, span, category, check.code, message, relatedInformation);
|
|
6009
6168
|
}
|
|
6010
|
-
}
|
|
6169
|
+
};
|
|
6011
6170
|
diagnostics.push(...check.run(ctx, component, template));
|
|
6012
6171
|
}
|
|
6013
6172
|
return diagnostics;
|
|
@@ -6016,9 +6175,9 @@ var ExtendedTemplateCheckerImpl = class {
|
|
|
6016
6175
|
function diagnosticLabelToCategory(label) {
|
|
6017
6176
|
switch (label) {
|
|
6018
6177
|
case DiagnosticCategoryLabel.Warning:
|
|
6019
|
-
return
|
|
6178
|
+
return ts31.DiagnosticCategory.Warning;
|
|
6020
6179
|
case DiagnosticCategoryLabel.Error:
|
|
6021
|
-
return
|
|
6180
|
+
return ts31.DiagnosticCategory.Error;
|
|
6022
6181
|
case DiagnosticCategoryLabel.Suppress:
|
|
6023
6182
|
return null;
|
|
6024
6183
|
default:
|
|
@@ -6030,14 +6189,18 @@ function assertNever(value) {
|
|
|
6030
6189
|
${value}`);
|
|
6031
6190
|
}
|
|
6032
6191
|
|
|
6033
|
-
// bazel-out/
|
|
6192
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/extended/index.mjs
|
|
6034
6193
|
var ALL_DIAGNOSTIC_FACTORIES = [
|
|
6035
6194
|
factory,
|
|
6195
|
+
factory4,
|
|
6196
|
+
factory5,
|
|
6197
|
+
factory2,
|
|
6198
|
+
factory7,
|
|
6036
6199
|
factory3,
|
|
6037
|
-
|
|
6200
|
+
factory6
|
|
6038
6201
|
];
|
|
6039
6202
|
|
|
6040
|
-
// bazel-out/
|
|
6203
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/compiler.mjs
|
|
6041
6204
|
var CompilationTicketKind;
|
|
6042
6205
|
(function(CompilationTicketKind2) {
|
|
6043
6206
|
CompilationTicketKind2[CompilationTicketKind2["Fresh"] = 0] = "Fresh";
|
|
@@ -6114,7 +6277,7 @@ var NgCompiler = class {
|
|
|
6114
6277
|
this.currentProgram = inputProgram;
|
|
6115
6278
|
this.closureCompilerEnabled = !!this.options.annotateForClosureCompiler;
|
|
6116
6279
|
this.entryPoint = adapter.entryPoint !== null ? getSourceFileOrNull(inputProgram, adapter.entryPoint) : null;
|
|
6117
|
-
const moduleResolutionCache =
|
|
6280
|
+
const moduleResolutionCache = ts32.createModuleResolutionCache(this.adapter.getCurrentDirectory(), this.adapter.getCanonicalFileName.bind(this.adapter));
|
|
6118
6281
|
this.moduleResolver = new ModuleResolver(inputProgram, this.options, this.adapter, moduleResolutionCache);
|
|
6119
6282
|
this.resourceManager = new AdapterResourceLoader(adapter, this.options);
|
|
6120
6283
|
this.cycleAnalyzer = new CycleAnalyzer(new ImportGraph(inputProgram.getTypeChecker(), this.delegatingPerfRecorder));
|
|
@@ -6170,7 +6333,7 @@ var NgCompiler = class {
|
|
|
6170
6333
|
}
|
|
6171
6334
|
for (const clazz of classesToUpdate) {
|
|
6172
6335
|
this.compilation.traitCompiler.updateResources(clazz);
|
|
6173
|
-
if (!
|
|
6336
|
+
if (!ts32.isClassDeclaration(clazz)) {
|
|
6174
6337
|
continue;
|
|
6175
6338
|
}
|
|
6176
6339
|
this.compilation.templateTypeChecker.invalidateClass(clazz);
|
|
@@ -6211,9 +6374,10 @@ var NgCompiler = class {
|
|
|
6211
6374
|
addMessageTextDetails(diagnostics) {
|
|
6212
6375
|
return diagnostics.map((diag) => {
|
|
6213
6376
|
if (diag.code && COMPILER_ERRORS_WITH_GUIDES.has(ngErrorCode(diag.code))) {
|
|
6214
|
-
return
|
|
6377
|
+
return {
|
|
6378
|
+
...diag,
|
|
6215
6379
|
messageText: diag.messageText + `. Find more at ${ERROR_DETAILS_PAGE_BASE_URL}/NG${ngErrorCode(diag.code)}`
|
|
6216
|
-
}
|
|
6380
|
+
};
|
|
6217
6381
|
}
|
|
6218
6382
|
return diag;
|
|
6219
6383
|
});
|
|
@@ -6580,17 +6744,17 @@ function isAngularCorePackage(program) {
|
|
|
6580
6744
|
return false;
|
|
6581
6745
|
}
|
|
6582
6746
|
return r3Symbols.statements.some((stmt) => {
|
|
6583
|
-
if (!
|
|
6747
|
+
if (!ts32.isVariableStatement(stmt)) {
|
|
6584
6748
|
return false;
|
|
6585
6749
|
}
|
|
6586
|
-
if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind ===
|
|
6750
|
+
if (stmt.modifiers === void 0 || !stmt.modifiers.some((mod) => mod.kind === ts32.SyntaxKind.ExportKeyword)) {
|
|
6587
6751
|
return false;
|
|
6588
6752
|
}
|
|
6589
6753
|
return stmt.declarationList.declarations.some((decl) => {
|
|
6590
|
-
if (!
|
|
6754
|
+
if (!ts32.isIdentifier(decl.name) || decl.name.text !== "ITS_JUST_ANGULAR") {
|
|
6591
6755
|
return false;
|
|
6592
6756
|
}
|
|
6593
|
-
if (decl.initializer === void 0 || decl.initializer.kind !==
|
|
6757
|
+
if (decl.initializer === void 0 || decl.initializer.kind !== ts32.SyntaxKind.TrueKeyword) {
|
|
6594
6758
|
return false;
|
|
6595
6759
|
}
|
|
6596
6760
|
return true;
|
|
@@ -6604,7 +6768,7 @@ function* verifyCompatibleTypeCheckOptions(options) {
|
|
|
6604
6768
|
var _a, _b, _c;
|
|
6605
6769
|
if (options.fullTemplateTypeCheck === false && options.strictTemplates === true) {
|
|
6606
6770
|
yield makeConfigDiagnostic({
|
|
6607
|
-
category:
|
|
6771
|
+
category: ts32.DiagnosticCategory.Error,
|
|
6608
6772
|
code: ErrorCode.CONFIG_STRICT_TEMPLATES_IMPLIES_FULL_TEMPLATE_TYPECHECK,
|
|
6609
6773
|
messageText: `
|
|
6610
6774
|
Angular compiler option "strictTemplates" is enabled, however "fullTemplateTypeCheck" is disabled.
|
|
@@ -6623,7 +6787,7 @@ https://angular.io/guide/template-typecheck
|
|
|
6623
6787
|
}
|
|
6624
6788
|
if (options.extendedDiagnostics && options.strictTemplates === false) {
|
|
6625
6789
|
yield makeConfigDiagnostic({
|
|
6626
|
-
category:
|
|
6790
|
+
category: ts32.DiagnosticCategory.Error,
|
|
6627
6791
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_IMPLIES_STRICT_TEMPLATES,
|
|
6628
6792
|
messageText: `
|
|
6629
6793
|
Angular compiler option "extendedDiagnostics" is configured, however "strictTemplates" is disabled.
|
|
@@ -6640,7 +6804,7 @@ One of the following actions is required:
|
|
|
6640
6804
|
const defaultCategory = (_a = options.extendedDiagnostics) == null ? void 0 : _a.defaultCategory;
|
|
6641
6805
|
if (defaultCategory && !allowedCategoryLabels.includes(defaultCategory)) {
|
|
6642
6806
|
yield makeConfigDiagnostic({
|
|
6643
|
-
category:
|
|
6807
|
+
category: ts32.DiagnosticCategory.Error,
|
|
6644
6808
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
6645
6809
|
messageText: `
|
|
6646
6810
|
Angular compiler option "extendedDiagnostics.defaultCategory" has an unknown diagnostic category: "${defaultCategory}".
|
|
@@ -6650,11 +6814,11 @@ ${allowedCategoryLabels.join("\n")}
|
|
|
6650
6814
|
`.trim()
|
|
6651
6815
|
});
|
|
6652
6816
|
}
|
|
6653
|
-
const allExtendedDiagnosticNames = ALL_DIAGNOSTIC_FACTORIES.map((
|
|
6817
|
+
const allExtendedDiagnosticNames = ALL_DIAGNOSTIC_FACTORIES.map((factory8) => factory8.name);
|
|
6654
6818
|
for (const [checkName, category] of Object.entries((_c = (_b = options.extendedDiagnostics) == null ? void 0 : _b.checks) != null ? _c : {})) {
|
|
6655
6819
|
if (!allExtendedDiagnosticNames.includes(checkName)) {
|
|
6656
6820
|
yield makeConfigDiagnostic({
|
|
6657
|
-
category:
|
|
6821
|
+
category: ts32.DiagnosticCategory.Error,
|
|
6658
6822
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CHECK,
|
|
6659
6823
|
messageText: `
|
|
6660
6824
|
Angular compiler option "extendedDiagnostics.checks" has an unknown check: "${checkName}".
|
|
@@ -6666,7 +6830,7 @@ ${allExtendedDiagnosticNames.join("\n")}
|
|
|
6666
6830
|
}
|
|
6667
6831
|
if (!allowedCategoryLabels.includes(category)) {
|
|
6668
6832
|
yield makeConfigDiagnostic({
|
|
6669
|
-
category:
|
|
6833
|
+
category: ts32.DiagnosticCategory.Error,
|
|
6670
6834
|
code: ErrorCode.CONFIG_EXTENDED_DIAGNOSTICS_UNKNOWN_CATEGORY_LABEL,
|
|
6671
6835
|
messageText: `
|
|
6672
6836
|
Angular compiler option "extendedDiagnostics.checks['${checkName}']" has an unknown diagnostic category: "${category}".
|
|
@@ -6696,7 +6860,7 @@ var ReferenceGraphAdapter = class {
|
|
|
6696
6860
|
for (const { node } of references) {
|
|
6697
6861
|
let sourceFile = node.getSourceFile();
|
|
6698
6862
|
if (sourceFile === void 0) {
|
|
6699
|
-
sourceFile =
|
|
6863
|
+
sourceFile = ts32.getOriginalNode(node).getSourceFile();
|
|
6700
6864
|
}
|
|
6701
6865
|
if (sourceFile === void 0 || !isDtsPath(sourceFile.fileName)) {
|
|
6702
6866
|
this.graph.add(source, node);
|
|
@@ -6734,8 +6898,8 @@ function versionMapFromProgram(program, driver) {
|
|
|
6734
6898
|
return versions;
|
|
6735
6899
|
}
|
|
6736
6900
|
|
|
6737
|
-
// bazel-out/
|
|
6738
|
-
import
|
|
6901
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/core/src/host.mjs
|
|
6902
|
+
import ts33 from "typescript";
|
|
6739
6903
|
var DelegatingCompilerHost2 = class {
|
|
6740
6904
|
constructor(delegate) {
|
|
6741
6905
|
this.delegate = delegate;
|
|
@@ -6825,7 +6989,7 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
|
|
|
6825
6989
|
entryPoint = findFlatIndexEntryPoint(normalizedTsInputFiles);
|
|
6826
6990
|
if (entryPoint === null) {
|
|
6827
6991
|
diagnostics.push({
|
|
6828
|
-
category:
|
|
6992
|
+
category: ts33.DiagnosticCategory.Error,
|
|
6829
6993
|
code: ngErrorCode(ErrorCode.CONFIG_FLAT_MODULE_NO_INDEX),
|
|
6830
6994
|
file: void 0,
|
|
6831
6995
|
start: void 0,
|
|
@@ -6868,17 +7032,17 @@ var NgCompilerHost = class extends DelegatingCompilerHost2 {
|
|
|
6868
7032
|
return this.fileNameToModuleName !== void 0 ? this : null;
|
|
6869
7033
|
}
|
|
6870
7034
|
createCachedResolveModuleNamesFunction() {
|
|
6871
|
-
const moduleResolutionCache =
|
|
7035
|
+
const moduleResolutionCache = ts33.createModuleResolutionCache(this.getCurrentDirectory(), this.getCanonicalFileName.bind(this));
|
|
6872
7036
|
return (moduleNames, containingFile, reusedNames, redirectedReference, options) => {
|
|
6873
7037
|
return moduleNames.map((moduleName) => {
|
|
6874
|
-
const module =
|
|
7038
|
+
const module = ts33.resolveModuleName(moduleName, containingFile, options, this, moduleResolutionCache, redirectedReference);
|
|
6875
7039
|
return module.resolvedModule;
|
|
6876
7040
|
});
|
|
6877
7041
|
};
|
|
6878
7042
|
}
|
|
6879
7043
|
};
|
|
6880
7044
|
|
|
6881
|
-
// bazel-out/
|
|
7045
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/program.mjs
|
|
6882
7046
|
var NgtscProgram = class {
|
|
6883
7047
|
constructor(rootNames, options, delegateHost, oldProgram) {
|
|
6884
7048
|
this.options = options;
|
|
@@ -6892,7 +7056,7 @@ var NgtscProgram = class {
|
|
|
6892
7056
|
if (reuseProgram !== void 0) {
|
|
6893
7057
|
retagAllTsFiles(reuseProgram);
|
|
6894
7058
|
}
|
|
6895
|
-
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () =>
|
|
7059
|
+
this.tsProgram = perfRecorder.inPhase(PerfPhase.TypeScriptProgramCreate, () => ts34.createProgram(this.host.inputFiles, options, this.host, reuseProgram));
|
|
6896
7060
|
perfRecorder.phase(PerfPhase.Unaccounted);
|
|
6897
7061
|
perfRecorder.memory(PerfCheckpoint.TypeScriptProgramCreate);
|
|
6898
7062
|
this.host.postProgramCreationCleanup();
|
|
@@ -7087,38 +7251,38 @@ function mergeEmitResults(emitResults) {
|
|
|
7087
7251
|
return { diagnostics, emitSkipped, emittedFiles };
|
|
7088
7252
|
}
|
|
7089
7253
|
|
|
7090
|
-
// bazel-out/
|
|
7254
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/program.mjs
|
|
7091
7255
|
function createProgram({ rootNames, options, host, oldProgram }) {
|
|
7092
7256
|
return new NgtscProgram(rootNames, options, host, oldProgram);
|
|
7093
7257
|
}
|
|
7094
7258
|
|
|
7095
|
-
// bazel-out/
|
|
7096
|
-
import
|
|
7259
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
7260
|
+
import ts36 from "typescript";
|
|
7097
7261
|
|
|
7098
|
-
// bazel-out/
|
|
7099
|
-
import
|
|
7262
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/transformers/util.mjs
|
|
7263
|
+
import ts35 from "typescript";
|
|
7100
7264
|
var GENERATED_FILES = /(.*?)\.(ngfactory|shim\.ngstyle|ngstyle|ngsummary)\.(js|d\.ts|ts)$/;
|
|
7101
7265
|
function createMessageDiagnostic(messageText) {
|
|
7102
7266
|
return {
|
|
7103
7267
|
file: void 0,
|
|
7104
7268
|
start: void 0,
|
|
7105
7269
|
length: void 0,
|
|
7106
|
-
category:
|
|
7270
|
+
category: ts35.DiagnosticCategory.Message,
|
|
7107
7271
|
messageText,
|
|
7108
7272
|
code: DEFAULT_ERROR_CODE,
|
|
7109
7273
|
source: SOURCE
|
|
7110
7274
|
};
|
|
7111
7275
|
}
|
|
7112
7276
|
|
|
7113
|
-
// bazel-out/
|
|
7277
|
+
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/perform_compile.mjs
|
|
7114
7278
|
var defaultFormatHost = {
|
|
7115
|
-
getCurrentDirectory: () =>
|
|
7279
|
+
getCurrentDirectory: () => ts36.sys.getCurrentDirectory(),
|
|
7116
7280
|
getCanonicalFileName: (fileName) => fileName,
|
|
7117
|
-
getNewLine: () =>
|
|
7281
|
+
getNewLine: () => ts36.sys.newLine
|
|
7118
7282
|
};
|
|
7119
7283
|
function formatDiagnostics(diags, host = defaultFormatHost) {
|
|
7120
7284
|
if (diags && diags.length) {
|
|
7121
|
-
return diags.map((diagnostic) => replaceTsWithNgInErrors(
|
|
7285
|
+
return diags.map((diagnostic) => replaceTsWithNgInErrors(ts36.formatDiagnosticsWithColorAndContext([diagnostic], host))).join("");
|
|
7122
7286
|
} else {
|
|
7123
7287
|
return "";
|
|
7124
7288
|
}
|
|
@@ -7135,13 +7299,13 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
7135
7299
|
var _a, _b;
|
|
7136
7300
|
try {
|
|
7137
7301
|
const fs = getFileSystem();
|
|
7138
|
-
const readConfigFile = (configFile) =>
|
|
7302
|
+
const readConfigFile = (configFile) => ts36.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
|
|
7139
7303
|
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
|
|
7140
7304
|
const { config: config2, error: error2 } = readConfigFile(configFile);
|
|
7141
7305
|
if (error2) {
|
|
7142
7306
|
return parentOptions;
|
|
7143
7307
|
}
|
|
7144
|
-
const existingNgCompilerOptions =
|
|
7308
|
+
const existingNgCompilerOptions = { ...config2.angularCompilerOptions, ...parentOptions };
|
|
7145
7309
|
if (config2.extends && typeof config2.extends === "string") {
|
|
7146
7310
|
const extendedConfigPath = getExtendedConfigPath(configFile, config2.extends, host, fs);
|
|
7147
7311
|
if (extendedConfigPath !== null) {
|
|
@@ -7162,12 +7326,14 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
7162
7326
|
emitFlags: EmitFlags.Default
|
|
7163
7327
|
};
|
|
7164
7328
|
}
|
|
7165
|
-
const existingCompilerOptions =
|
|
7329
|
+
const existingCompilerOptions = {
|
|
7166
7330
|
genDir: basePath,
|
|
7167
|
-
basePath
|
|
7168
|
-
|
|
7331
|
+
basePath,
|
|
7332
|
+
...readAngularCompilerOptions(configFileName),
|
|
7333
|
+
...existingOptions
|
|
7334
|
+
};
|
|
7169
7335
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
7170
|
-
const { options, errors, fileNames: rootNames, projectReferences } =
|
|
7336
|
+
const { options, errors, fileNames: rootNames, projectReferences } = ts36.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
|
|
7171
7337
|
options.enableIvy = !!((_a = options.enableIvy) != null ? _a : true);
|
|
7172
7338
|
let emitFlags = EmitFlags.Default;
|
|
7173
7339
|
if (!(options.skipMetadataEmit || options.flatModuleOutFile)) {
|
|
@@ -7179,7 +7345,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
7179
7345
|
return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
|
|
7180
7346
|
} catch (e) {
|
|
7181
7347
|
const errors = [{
|
|
7182
|
-
category:
|
|
7348
|
+
category: ts36.DiagnosticCategory.Error,
|
|
7183
7349
|
messageText: (_b = e.stack) != null ? _b : e.message,
|
|
7184
7350
|
file: void 0,
|
|
7185
7351
|
start: void 0,
|
|
@@ -7193,7 +7359,7 @@ function readConfiguration(project, existingOptions, host = getFileSystem()) {
|
|
|
7193
7359
|
function createParseConfigHost(host, fs = getFileSystem()) {
|
|
7194
7360
|
return {
|
|
7195
7361
|
fileExists: host.exists.bind(host),
|
|
7196
|
-
readDirectory:
|
|
7362
|
+
readDirectory: ts36.sys.readDirectory,
|
|
7197
7363
|
readFile: host.readFile.bind(host),
|
|
7198
7364
|
useCaseSensitiveFileNames: fs.isCaseSensitive()
|
|
7199
7365
|
};
|
|
@@ -7213,7 +7379,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
7213
7379
|
}
|
|
7214
7380
|
} else {
|
|
7215
7381
|
const parseConfigHost = createParseConfigHost(host, fs);
|
|
7216
|
-
const { resolvedModule } =
|
|
7382
|
+
const { resolvedModule } = ts36.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts36.ModuleResolutionKind.NodeJs, resolveJsonModule: true }, parseConfigHost);
|
|
7217
7383
|
if (resolvedModule) {
|
|
7218
7384
|
return absoluteFrom(resolvedModule.resolvedFileName);
|
|
7219
7385
|
}
|
|
@@ -7223,7 +7389,7 @@ function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
|
|
|
7223
7389
|
function exitCodeFromResult(diags) {
|
|
7224
7390
|
if (!diags)
|
|
7225
7391
|
return 0;
|
|
7226
|
-
if (diags.every((diag) => diag.category !==
|
|
7392
|
+
if (diags.every((diag) => diag.category !== ts36.DiagnosticCategory.Error)) {
|
|
7227
7393
|
return 0;
|
|
7228
7394
|
}
|
|
7229
7395
|
return diags.some((d) => d.source === "angular" && d.code === UNKNOWN_ERROR_CODE) ? 2 : 1;
|
|
@@ -7256,7 +7422,7 @@ function performCompilation({ rootNames, options, host, oldProgram, emitCallback
|
|
|
7256
7422
|
} catch (e) {
|
|
7257
7423
|
program = void 0;
|
|
7258
7424
|
allDiagnostics.push({
|
|
7259
|
-
category:
|
|
7425
|
+
category: ts36.DiagnosticCategory.Error,
|
|
7260
7426
|
messageText: (_a = e.stack) != null ? _a : e.message,
|
|
7261
7427
|
code: UNKNOWN_ERROR_CODE,
|
|
7262
7428
|
file: void 0,
|
|
@@ -7283,7 +7449,7 @@ function defaultGatherDiagnostics(program) {
|
|
|
7283
7449
|
return allDiagnostics;
|
|
7284
7450
|
}
|
|
7285
7451
|
function hasErrors(diags) {
|
|
7286
|
-
return diags.some((d) => d.category ===
|
|
7452
|
+
return diags.some((d) => d.category === ts36.DiagnosticCategory.Error);
|
|
7287
7453
|
}
|
|
7288
7454
|
|
|
7289
7455
|
export {
|
|
@@ -7323,4 +7489,4 @@ export {
|
|
|
7323
7489
|
* found in the LICENSE file at https://angular.io/license
|
|
7324
7490
|
*/
|
|
7325
7491
|
// Closure Compiler ignores @suppress and similar if the comment contains @license.
|
|
7326
|
-
//# sourceMappingURL=chunk-
|
|
7492
|
+
//# sourceMappingURL=chunk-BCXYCOVM.js.map
|