@angular/compiler-cli 13.1.0-next.3 → 13.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/{chunk-UMUIU7TE.js → chunk-7UHLQOIO.js} +4 -4
- package/bundles/{chunk-UMUIU7TE.js.map → chunk-7UHLQOIO.js.map} +0 -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-COAETSNP.js → chunk-CKZCKW5B.js} +785 -1129
- package/bundles/chunk-CKZCKW5B.js.map +6 -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-SKBLJA43.js → chunk-JTYUTYS2.js} +3 -3
- package/bundles/{chunk-SKBLJA43.js.map → chunk-JTYUTYS2.js.map} +0 -0
- package/bundles/{chunk-UIKTHF6Z.js → chunk-K5FPDA5B.js} +61 -63
- package/bundles/chunk-K5FPDA5B.js.map +6 -0
- package/bundles/{chunk-MFCLQBFK.js → chunk-KU4D2JVX.js} +39 -41
- package/bundles/chunk-KU4D2JVX.js.map +6 -0
- package/bundles/{chunk-7HVF6UHR.js → chunk-KXVQ4SSM.js} +24 -22
- package/bundles/chunk-KXVQ4SSM.js.map +6 -0
- package/bundles/{chunk-IESRH26X.js → chunk-L23I4NJT.js} +744 -434
- package/bundles/chunk-L23I4NJT.js.map +6 -0
- package/bundles/{chunk-QL6ZC3U3.js → chunk-RDTZZXLZ.js} +12 -12
- package/bundles/{chunk-QL6ZC3U3.js.map → chunk-RDTZZXLZ.js.map} +1 -1
- package/bundles/{chunk-EP5JHXG2.js → chunk-RGGJJ7ZZ.js} +39 -60
- package/bundles/chunk-RGGJJ7ZZ.js.map +6 -0
- package/bundles/{chunk-JJMLEEKA.js → chunk-RNVIUKDY.js} +9 -9
- package/bundles/chunk-RNVIUKDY.js.map +6 -0
- package/bundles/{chunk-HDZS2JG2.js → chunk-VUEDWBJP.js} +270 -100
- package/bundles/chunk-VUEDWBJP.js.map +6 -0
- package/bundles/{chunk-XA5IZLLC.js → chunk-WQ3TNYTD.js} +6 -6
- package/bundles/{chunk-XA5IZLLC.js.map → chunk-WQ3TNYTD.js.map} +0 -0
- package/bundles/{chunk-4EDYFHXN.js → chunk-XXMNTCYN.js} +9 -9
- package/bundles/chunk-XXMNTCYN.js.map +6 -0
- package/bundles/{chunk-7HBAJSZA.js → chunk-ZLL7BXGD.js} +228 -190
- package/bundles/chunk-ZLL7BXGD.js.map +6 -0
- package/bundles/index.js +16 -30
- package/bundles/index.js.map +2 -2
- package/bundles/linker/babel/index.js +85 -85
- 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/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 +11 -11
- package/bundles/src/bin/ngc.js +11 -11
- package/bundles/src/bin/ngc.js.map +1 -1
- package/bundles_metadata.json +1 -1
- package/index.d.ts +2 -2
- package/ngcc/src/packages/adjust_cjs_umd_exports.d.ts +17 -0
- package/ngcc/src/packages/build_marker.d.ts +1 -1
- package/ngcc/src/packages/source_file_cache.d.ts +2 -1
- package/package.json +2 -2
- package/src/main.d.ts +3 -3
- package/src/ngtsc/annotations/src/util.d.ts +1 -1
- package/src/ngtsc/core/api/src/options.d.ts +3 -2
- package/src/ngtsc/core/api/src/public_options.d.ts +38 -0
- package/src/ngtsc/core/src/host.d.ts +1 -1
- package/src/ngtsc/diagnostics/index.d.ts +2 -1
- package/src/ngtsc/diagnostics/src/error.d.ts +1 -0
- package/src/ngtsc/diagnostics/src/error_code.d.ts +7 -0
- package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -1
- package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +21 -0
- package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -0
- package/src/ngtsc/imports/index.d.ts +1 -1
- package/src/ngtsc/imports/src/emitter.d.ts +40 -8
- package/src/ngtsc/program.d.ts +3 -6
- package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
- package/src/ngtsc/translator/src/translator.d.ts +0 -5
- package/src/ngtsc/translator/src/type_translator.d.ts +0 -2
- package/src/ngtsc/typecheck/extended/api/api.d.ts +30 -10
- package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +3 -14
- package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +3 -15
- package/src/ngtsc/typecheck/extended/index.d.ts +3 -0
- package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +5 -4
- package/src/ngtsc/typecheck/src/environment.d.ts +3 -1
- package/src/ngtsc/typecheck/src/tcb_util.d.ts +10 -2
- package/src/ngtsc/typecheck/src/type_constructor.d.ts +3 -2
- package/src/ngtsc/typecheck/src/type_emitter.d.ts +7 -21
- package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +2 -2
- package/src/ngtsc/util/src/typescript.d.ts +0 -5
- package/src/perform_compile.d.ts +5 -10
- package/src/perform_watch.d.ts +4 -4
- package/src/transformers/api.d.ts +3 -30
- package/src/transformers/util.d.ts +4 -6
- package/bundles/chunk-4EDYFHXN.js.map +0 -6
- package/bundles/chunk-7HBAJSZA.js.map +0 -6
- package/bundles/chunk-7HVF6UHR.js.map +0 -6
- package/bundles/chunk-COAETSNP.js.map +0 -6
- package/bundles/chunk-EP5JHXG2.js.map +0 -6
- package/bundles/chunk-HDZS2JG2.js.map +0 -6
- package/bundles/chunk-IESRH26X.js.map +0 -6
- package/bundles/chunk-JJMLEEKA.js.map +0 -6
- package/bundles/chunk-MFCLQBFK.js.map +0 -6
- package/bundles/chunk-UIKTHF6Z.js.map +0 -6
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
MetadataDtsModuleScopeResolver,
|
|
11
11
|
TypeCheckScopeRegistry,
|
|
12
12
|
readConfiguration
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CKZCKW5B.js";
|
|
14
14
|
import {
|
|
15
15
|
CompilationMode,
|
|
16
16
|
ComponentDecoratorHandler,
|
|
@@ -30,10 +30,8 @@ import {
|
|
|
30
30
|
TraitCompiler,
|
|
31
31
|
TraitState,
|
|
32
32
|
forwardRefResolver,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
replaceTsWithNgInErrors
|
|
36
|
-
} from "./chunk-IESRH26X.js";
|
|
33
|
+
readBaseClass
|
|
34
|
+
} from "./chunk-L23I4NJT.js";
|
|
37
35
|
import {
|
|
38
36
|
ClassMemberKind,
|
|
39
37
|
KnownDeclaration,
|
|
@@ -44,15 +42,15 @@ import {
|
|
|
44
42
|
isNamedFunctionDeclaration,
|
|
45
43
|
isNamedVariableDeclaration,
|
|
46
44
|
reflectObjectLiteral
|
|
47
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-XXMNTCYN.js";
|
|
48
46
|
import {
|
|
49
47
|
ConsoleLogger,
|
|
50
48
|
LogLevel
|
|
51
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JTYUTYS2.js";
|
|
52
50
|
import {
|
|
53
51
|
ContentOrigin,
|
|
54
52
|
SourceFileLoader
|
|
55
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-RDTZZXLZ.js";
|
|
56
54
|
import {
|
|
57
55
|
AbsoluteModuleStrategy,
|
|
58
56
|
ImportManager,
|
|
@@ -66,12 +64,14 @@ import {
|
|
|
66
64
|
ReferenceEmitter,
|
|
67
65
|
isAssignment,
|
|
68
66
|
isDtsPath,
|
|
67
|
+
isFatalDiagnosticError,
|
|
69
68
|
isFromDtsFile,
|
|
70
69
|
isSymbolWithValueDeclaration,
|
|
70
|
+
replaceTsWithNgInErrors,
|
|
71
71
|
translateStatement,
|
|
72
72
|
translateType,
|
|
73
73
|
validateAndRewriteCoreSymbol
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-VUEDWBJP.js";
|
|
75
75
|
import {
|
|
76
76
|
LogicalFileSystem,
|
|
77
77
|
NgtscCompilerHost,
|
|
@@ -83,25 +83,25 @@ import {
|
|
|
83
83
|
isRooted,
|
|
84
84
|
relative,
|
|
85
85
|
toRelativeImport
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-RGGJJ7ZZ.js";
|
|
87
87
|
import {
|
|
88
88
|
NOOP_PERF_RECORDER
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-J6CW3T62.js";
|
|
90
90
|
import {
|
|
91
91
|
__spreadProps,
|
|
92
92
|
__spreadValues
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-WQ3TNYTD.js";
|
|
94
94
|
|
|
95
|
-
// bazel-out/
|
|
96
|
-
import
|
|
95
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/create_compile_function.mjs
|
|
96
|
+
import ts23 from "typescript";
|
|
97
97
|
|
|
98
|
-
// bazel-out/
|
|
98
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/entry_point.mjs
|
|
99
99
|
import ts7 from "typescript";
|
|
100
100
|
|
|
101
|
-
// bazel-out/
|
|
101
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/umd_host.mjs
|
|
102
102
|
import ts6 from "typescript";
|
|
103
103
|
|
|
104
|
-
// bazel-out/
|
|
104
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/utils.mjs
|
|
105
105
|
import ts from "typescript";
|
|
106
106
|
function isDefined(value) {
|
|
107
107
|
return value !== void 0 && value !== null;
|
|
@@ -172,7 +172,7 @@ function stripExtension(fileName) {
|
|
|
172
172
|
return fileName.replace(/\..+$/, "");
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
// bazel-out/
|
|
175
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/commonjs_umd_utils.mjs
|
|
176
176
|
import ts2 from "typescript";
|
|
177
177
|
function findNamespaceOfIdentifier(id) {
|
|
178
178
|
return id.parent && ts2.isPropertyAccessExpression(id.parent) && id.parent.name === id && ts2.isIdentifier(id.parent.expression) ? id.parent.expression : null;
|
|
@@ -258,10 +258,10 @@ function skipAliases(node) {
|
|
|
258
258
|
return node;
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
// bazel-out/
|
|
261
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/esm2015_host.mjs
|
|
262
262
|
import ts4 from "typescript";
|
|
263
263
|
|
|
264
|
-
// bazel-out/
|
|
264
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/util.mjs
|
|
265
265
|
function isWithinPackage(packagePath, filePath) {
|
|
266
266
|
const relativePath = relative(packagePath, filePath);
|
|
267
267
|
return isLocalRelativePath(relativePath) && !relativePath.startsWith("node_modules/");
|
|
@@ -276,13 +276,13 @@ var NoopDependencyTracker = class {
|
|
|
276
276
|
};
|
|
277
277
|
var NOOP_DEPENDENCY_TRACKER = new NoopDependencyTracker();
|
|
278
278
|
|
|
279
|
-
// bazel-out/
|
|
279
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/utils.mjs
|
|
280
280
|
import ts3 from "typescript";
|
|
281
281
|
function stripParentheses(node) {
|
|
282
282
|
return ts3.isParenthesizedExpression(node) ? node.expression : node;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
// bazel-out/
|
|
285
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/esm2015_host.mjs
|
|
286
286
|
var DECORATORS = "decorators";
|
|
287
287
|
var PROP_DECORATORS = "propDecorators";
|
|
288
288
|
var CONSTRUCTOR = "__constructor";
|
|
@@ -296,9 +296,9 @@ var Esm2015ReflectionHost = class extends TypeScriptReflectionHost {
|
|
|
296
296
|
this.dts = dts;
|
|
297
297
|
this.publicDtsDeclarationMap = null;
|
|
298
298
|
this.privateDtsDeclarationMap = null;
|
|
299
|
-
this.preprocessedSourceFiles = new Set();
|
|
300
|
-
this.aliasedClassDeclarations = new Map();
|
|
301
|
-
this.decoratorCache = new Map();
|
|
299
|
+
this.preprocessedSourceFiles = /* @__PURE__ */ new Set();
|
|
300
|
+
this.aliasedClassDeclarations = /* @__PURE__ */ new Map();
|
|
301
|
+
this.decoratorCache = /* @__PURE__ */ new Map();
|
|
302
302
|
}
|
|
303
303
|
getClassSymbol(declaration) {
|
|
304
304
|
const symbol = this.getClassSymbolFromOuterDeclaration(declaration);
|
|
@@ -441,7 +441,7 @@ ${declaration.getText()}`);
|
|
|
441
441
|
return null;
|
|
442
442
|
}
|
|
443
443
|
findClassSymbols(sourceFile) {
|
|
444
|
-
const classes = new Map();
|
|
444
|
+
const classes = /* @__PURE__ */ new Map();
|
|
445
445
|
this.getModuleStatements(sourceFile).forEach((statement) => this.addClassSymbolsFromStatement(classes, statement));
|
|
446
446
|
return Array.from(classes.values());
|
|
447
447
|
}
|
|
@@ -781,7 +781,7 @@ ${declaration.getText()}`);
|
|
|
781
781
|
return members;
|
|
782
782
|
}
|
|
783
783
|
getMemberDecoratorsFromStaticProperty(decoratorsProperty) {
|
|
784
|
-
const memberDecorators = new Map();
|
|
784
|
+
const memberDecorators = /* @__PURE__ */ new Map();
|
|
785
785
|
const propDecoratorsMap = getPropertyValueFromSymbol(decoratorsProperty);
|
|
786
786
|
if (propDecoratorsMap && ts4.isObjectLiteralExpression(propDecoratorsMap)) {
|
|
787
787
|
const propertiesMap = reflectObjectLiteral(propDecoratorsMap);
|
|
@@ -796,7 +796,7 @@ ${declaration.getText()}`);
|
|
|
796
796
|
}
|
|
797
797
|
computeDecoratorInfoFromHelperCalls(classSymbol) {
|
|
798
798
|
let classDecorators = null;
|
|
799
|
-
const memberDecorators = new Map();
|
|
799
|
+
const memberDecorators = /* @__PURE__ */ new Map();
|
|
800
800
|
const constructorParamInfo = [];
|
|
801
801
|
const getConstructorParamInfo = (index) => {
|
|
802
802
|
let param = constructorParamInfo[index];
|
|
@@ -1141,8 +1141,8 @@ ${declaration.getText()}`);
|
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
1143
|
computePublicDtsDeclarationMap(src, dts) {
|
|
1144
|
-
const declarationMap = new Map();
|
|
1145
|
-
const dtsDeclarationMap = new Map();
|
|
1144
|
+
const declarationMap = /* @__PURE__ */ new Map();
|
|
1145
|
+
const dtsDeclarationMap = /* @__PURE__ */ new Map();
|
|
1146
1146
|
const rootDts = getRootFileOrFail(dts);
|
|
1147
1147
|
this.collectDtsExportedDeclarations(dtsDeclarationMap, rootDts, dts.program.getTypeChecker());
|
|
1148
1148
|
const rootSrc = getRootFileOrFail(src);
|
|
@@ -1150,8 +1150,8 @@ ${declaration.getText()}`);
|
|
|
1150
1150
|
return declarationMap;
|
|
1151
1151
|
}
|
|
1152
1152
|
computePrivateDtsDeclarationMap(src, dts) {
|
|
1153
|
-
const declarationMap = new Map();
|
|
1154
|
-
const dtsDeclarationMap = new Map();
|
|
1153
|
+
const declarationMap = /* @__PURE__ */ new Map();
|
|
1154
|
+
const dtsDeclarationMap = /* @__PURE__ */ new Map();
|
|
1155
1155
|
const typeChecker = dts.program.getTypeChecker();
|
|
1156
1156
|
const dtsFiles = getNonRootPackageFiles(dts);
|
|
1157
1157
|
for (const dtsFile of dtsFiles) {
|
|
@@ -1510,7 +1510,7 @@ function getOuterNodeFromInnerDeclaration(node) {
|
|
|
1510
1510
|
return outerNode;
|
|
1511
1511
|
}
|
|
1512
1512
|
|
|
1513
|
-
// bazel-out/
|
|
1513
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/esm5_host.mjs
|
|
1514
1514
|
import ts5 from "typescript";
|
|
1515
1515
|
var Esm5ReflectionHost = class extends Esm2015ReflectionHost {
|
|
1516
1516
|
getBaseClassExpression(clazz) {
|
|
@@ -1844,7 +1844,7 @@ function getIifeFn(classSymbol) {
|
|
|
1844
1844
|
return iifeWrapper && ts5.isFunctionExpression(iifeWrapper) ? iifeWrapper : null;
|
|
1845
1845
|
}
|
|
1846
1846
|
|
|
1847
|
-
// bazel-out/
|
|
1847
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/umd_host.mjs
|
|
1848
1848
|
var UmdReflectionHost = class extends Esm5ReflectionHost {
|
|
1849
1849
|
constructor(logger, isCore, src, dts = null) {
|
|
1850
1850
|
super(logger, isCore, src, dts);
|
|
@@ -1971,7 +1971,7 @@ var UmdReflectionHost = class extends Esm5ReflectionHost {
|
|
|
1971
1971
|
return parseStatementForUmdModule(sourceFile.statements[0]);
|
|
1972
1972
|
}
|
|
1973
1973
|
computeExportsOfUmdModule(sourceFile) {
|
|
1974
|
-
const moduleMap = new Map();
|
|
1974
|
+
const moduleMap = /* @__PURE__ */ new Map();
|
|
1975
1975
|
for (const statement of this.getModuleStatements(sourceFile)) {
|
|
1976
1976
|
if (isExportsStatement(statement)) {
|
|
1977
1977
|
const exportDeclaration = this.extractBasicUmdExportDeclaration(statement);
|
|
@@ -2327,31 +2327,24 @@ function isTypeOf(node, ...types) {
|
|
|
2327
2327
|
}
|
|
2328
2328
|
function getImportsOfUmdModule(umdModule) {
|
|
2329
2329
|
const imports = [];
|
|
2330
|
-
const
|
|
2331
|
-
const
|
|
2332
|
-
|
|
2333
|
-
|
|
2330
|
+
const factoryFnParams = umdModule.factoryFn.parameters;
|
|
2331
|
+
const cjsFactoryCallArgs = umdModule.factoryCalls.cjsCallForImports.arguments;
|
|
2332
|
+
for (let i = 0; i < factoryFnParams.length; i++) {
|
|
2333
|
+
const arg = cjsFactoryCallArgs[i];
|
|
2334
|
+
if (arg !== void 0 && isRequireCall(arg)) {
|
|
2334
2335
|
imports.push({
|
|
2335
|
-
parameter:
|
|
2336
|
-
path:
|
|
2336
|
+
parameter: factoryFnParams[i],
|
|
2337
|
+
path: arg.arguments[0].text
|
|
2337
2338
|
});
|
|
2338
2339
|
}
|
|
2339
2340
|
}
|
|
2340
2341
|
return imports;
|
|
2341
2342
|
}
|
|
2342
|
-
function getRequiredModulePath(cjsFactoryCall, paramIndex) {
|
|
2343
|
-
const requireCall = cjsFactoryCall.arguments[paramIndex];
|
|
2344
|
-
if (requireCall !== void 0 && !isRequireCall(requireCall)) {
|
|
2345
|
-
throw new Error(`Argument at index ${paramIndex} of UMD factory call is not a \`require\` call with a single string argument:
|
|
2346
|
-
` + cjsFactoryCall.getText());
|
|
2347
|
-
}
|
|
2348
|
-
return requireCall.arguments[0].text;
|
|
2349
|
-
}
|
|
2350
2343
|
function isExportsIdentifier(node) {
|
|
2351
2344
|
return ts6.isIdentifier(node) && node.text === "exports";
|
|
2352
2345
|
}
|
|
2353
2346
|
|
|
2354
|
-
// bazel-out/
|
|
2347
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/entry_point.mjs
|
|
2355
2348
|
var SUPPORTED_FORMAT_PROPERTIES = ["fesm2015", "fesm5", "es2015", "esm2015", "esm5", "main", "module", "browser"];
|
|
2356
2349
|
var NO_ENTRY_POINT = "no-entry-point";
|
|
2357
2350
|
var IGNORED_ENTRY_POINT = "ignored-entry-point";
|
|
@@ -2510,7 +2503,7 @@ function getRepositoryUrl(packageJson) {
|
|
|
2510
2503
|
return packageJson.repository.url;
|
|
2511
2504
|
}
|
|
2512
2505
|
|
|
2513
|
-
// bazel-out/
|
|
2506
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/tasks/api.mjs
|
|
2514
2507
|
var DtsProcessing;
|
|
2515
2508
|
(function(DtsProcessing2) {
|
|
2516
2509
|
DtsProcessing2[DtsProcessing2["Yes"] = 0] = "Yes";
|
|
@@ -2519,21 +2512,58 @@ var DtsProcessing;
|
|
|
2519
2512
|
})(DtsProcessing || (DtsProcessing = {}));
|
|
2520
2513
|
var TaskDependencies = Map;
|
|
2521
2514
|
|
|
2522
|
-
// bazel-out/
|
|
2523
|
-
import ts9 from "typescript";
|
|
2524
|
-
|
|
2525
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/patch_ts_expando_initializer.mjs
|
|
2515
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/adjust_cjs_umd_exports.mjs
|
|
2526
2516
|
import ts8 from "typescript";
|
|
2517
|
+
function adjustElementAccessExports(sourceText) {
|
|
2518
|
+
if (!/exports\[["']/.test(sourceText)) {
|
|
2519
|
+
return sourceText;
|
|
2520
|
+
}
|
|
2521
|
+
const replacements = [];
|
|
2522
|
+
const sf = ts8.createSourceFile("input.js", sourceText, ts8.ScriptTarget.ES5, false, ts8.ScriptKind.JS);
|
|
2523
|
+
ts8.forEachChild(sf, function visitNode(node) {
|
|
2524
|
+
if (ts8.isElementAccessExpression(node) && isExportsIdentifier2(node.expression) && ts8.isStringLiteral(node.argumentExpression) && isJsIdentifier(node.argumentExpression.text)) {
|
|
2525
|
+
replacements.push({
|
|
2526
|
+
start: node.getStart(sf),
|
|
2527
|
+
end: node.getEnd(),
|
|
2528
|
+
identifier: node.argumentExpression.text
|
|
2529
|
+
});
|
|
2530
|
+
}
|
|
2531
|
+
ts8.forEachChild(node, visitNode);
|
|
2532
|
+
});
|
|
2533
|
+
replacements.sort((a, b) => a.start - b.start);
|
|
2534
|
+
const parts = [];
|
|
2535
|
+
let currentIndex = 0;
|
|
2536
|
+
for (const replacement of replacements) {
|
|
2537
|
+
parts.push(sourceText.substring(currentIndex, replacement.start));
|
|
2538
|
+
parts.push(`exports. ${replacement.identifier} `);
|
|
2539
|
+
currentIndex = replacement.end;
|
|
2540
|
+
}
|
|
2541
|
+
parts.push(sourceText.substring(currentIndex));
|
|
2542
|
+
return parts.join("");
|
|
2543
|
+
}
|
|
2544
|
+
function isExportsIdentifier2(expr) {
|
|
2545
|
+
return ts8.isIdentifier(expr) && expr.text === "exports";
|
|
2546
|
+
}
|
|
2547
|
+
var identifierPattern = /^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/;
|
|
2548
|
+
function isJsIdentifier(text) {
|
|
2549
|
+
return identifierPattern.test(text);
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/bundle_program.mjs
|
|
2553
|
+
import ts10 from "typescript";
|
|
2554
|
+
|
|
2555
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/patch_ts_expando_initializer.mjs
|
|
2556
|
+
import ts9 from "typescript";
|
|
2527
2557
|
function patchTsGetExpandoInitializer() {
|
|
2528
2558
|
if (isTs31778GetExpandoInitializerFixed()) {
|
|
2529
2559
|
return null;
|
|
2530
2560
|
}
|
|
2531
|
-
const originalGetExpandoInitializer =
|
|
2561
|
+
const originalGetExpandoInitializer = ts9.getExpandoInitializer;
|
|
2532
2562
|
if (originalGetExpandoInitializer === void 0) {
|
|
2533
2563
|
throw makeUnsupportedTypeScriptError();
|
|
2534
2564
|
}
|
|
2535
|
-
|
|
2536
|
-
if (
|
|
2565
|
+
ts9.getExpandoInitializer = (initializer, isPrototypeAssignment) => {
|
|
2566
|
+
if (ts9.isParenthesizedExpression(initializer) && ts9.isCallExpression(initializer.expression)) {
|
|
2537
2567
|
initializer = initializer.expression;
|
|
2538
2568
|
}
|
|
2539
2569
|
return originalGetExpandoInitializer(initializer, isPrototypeAssignment);
|
|
@@ -2542,7 +2572,7 @@ function patchTsGetExpandoInitializer() {
|
|
|
2542
2572
|
}
|
|
2543
2573
|
function restoreGetExpandoInitializer(originalGetExpandoInitializer) {
|
|
2544
2574
|
if (originalGetExpandoInitializer !== null) {
|
|
2545
|
-
|
|
2575
|
+
ts9.getExpandoInitializer = originalGetExpandoInitializer;
|
|
2546
2576
|
}
|
|
2547
2577
|
}
|
|
2548
2578
|
var ts31778FixedResult = null;
|
|
@@ -2573,7 +2603,7 @@ function checkIfExpandoPropertyIsPresent() {
|
|
|
2573
2603
|
}());
|
|
2574
2604
|
A.expando = true;
|
|
2575
2605
|
}());`;
|
|
2576
|
-
const sourceFile =
|
|
2606
|
+
const sourceFile = ts9.createSourceFile("test.js", sourceText, ts9.ScriptTarget.ES5, true, ts9.ScriptKind.JS);
|
|
2577
2607
|
const host = {
|
|
2578
2608
|
getSourceFile() {
|
|
2579
2609
|
return sourceFile;
|
|
@@ -2606,14 +2636,14 @@ function checkIfExpandoPropertyIsPresent() {
|
|
|
2606
2636
|
}
|
|
2607
2637
|
};
|
|
2608
2638
|
const options = { noResolve: true, noLib: true, noEmit: true, allowJs: true };
|
|
2609
|
-
const program =
|
|
2639
|
+
const program = ts9.createProgram(["test.js"], options, host);
|
|
2610
2640
|
function visitor(node) {
|
|
2611
|
-
if (
|
|
2641
|
+
if (ts9.isVariableDeclaration(node) && hasNameIdentifier(node) && node.name.text === "A") {
|
|
2612
2642
|
return node;
|
|
2613
2643
|
}
|
|
2614
|
-
return
|
|
2644
|
+
return ts9.forEachChild(node, visitor);
|
|
2615
2645
|
}
|
|
2616
|
-
const declaration =
|
|
2646
|
+
const declaration = ts9.forEachChild(sourceFile, visitor);
|
|
2617
2647
|
if (declaration === void 0) {
|
|
2618
2648
|
throw new Error("Unable to find declaration of outer A");
|
|
2619
2649
|
}
|
|
@@ -2627,12 +2657,12 @@ function makeUnsupportedTypeScriptError() {
|
|
|
2627
2657
|
return new Error("The TypeScript version used is not supported by ngcc.");
|
|
2628
2658
|
}
|
|
2629
2659
|
|
|
2630
|
-
// bazel-out/
|
|
2660
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/bundle_program.mjs
|
|
2631
2661
|
function makeBundleProgram(fs, isCore, pkg, path, r3FileName, options, host, additionalFiles = []) {
|
|
2632
2662
|
const r3SymbolsPath = isCore ? findR3SymbolsPath(fs, fs.dirname(path), r3FileName) : null;
|
|
2633
2663
|
let rootPaths = r3SymbolsPath ? [path, r3SymbolsPath, ...additionalFiles] : [path, ...additionalFiles];
|
|
2634
2664
|
const originalGetExpandoInitializer = patchTsGetExpandoInitializer();
|
|
2635
|
-
const program =
|
|
2665
|
+
const program = ts10.createProgram(rootPaths, options, host);
|
|
2636
2666
|
program.getTypeChecker();
|
|
2637
2667
|
restoreGetExpandoInitializer(originalGetExpandoInitializer);
|
|
2638
2668
|
const file = program.getSourceFile(path);
|
|
@@ -2657,8 +2687,8 @@ function findR3SymbolsPath(fs, directory, filename) {
|
|
|
2657
2687
|
return null;
|
|
2658
2688
|
}
|
|
2659
2689
|
|
|
2660
|
-
// bazel-out/
|
|
2661
|
-
import
|
|
2690
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/ngcc_compiler_host.mjs
|
|
2691
|
+
import ts11 from "typescript";
|
|
2662
2692
|
var NgccSourcesCompilerHost = class extends NgtscCompilerHost {
|
|
2663
2693
|
constructor(fs, options, cache, moduleResolutionCache, packagePath) {
|
|
2664
2694
|
super(fs, options);
|
|
@@ -2671,14 +2701,14 @@ var NgccSourcesCompilerHost = class extends NgtscCompilerHost {
|
|
|
2671
2701
|
}
|
|
2672
2702
|
resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference) {
|
|
2673
2703
|
return moduleNames.map((moduleName) => {
|
|
2674
|
-
const { resolvedModule } =
|
|
2675
|
-
if ((resolvedModule == null ? void 0 : resolvedModule.extension) ===
|
|
2704
|
+
const { resolvedModule } = ts11.resolveModuleName(moduleName, containingFile, this.options, this, this.moduleResolutionCache, redirectedReference);
|
|
2705
|
+
if ((resolvedModule == null ? void 0 : resolvedModule.extension) === ts11.Extension.Dts && containingFile.endsWith(".js") && isRelativePath(moduleName)) {
|
|
2676
2706
|
const jsFile = resolvedModule.resolvedFileName.replace(/\.d\.ts$/, ".js");
|
|
2677
2707
|
if (this.fileExists(jsFile)) {
|
|
2678
|
-
return __spreadProps(__spreadValues({}, resolvedModule), { resolvedFileName: jsFile, extension:
|
|
2708
|
+
return __spreadProps(__spreadValues({}, resolvedModule), { resolvedFileName: jsFile, extension: ts11.Extension.Js });
|
|
2679
2709
|
}
|
|
2680
2710
|
}
|
|
2681
|
-
if ((resolvedModule == null ? void 0 : resolvedModule.extension) ===
|
|
2711
|
+
if ((resolvedModule == null ? void 0 : resolvedModule.extension) === ts11.Extension.Js && !isWithinPackage(this.packagePath, this.fs.resolve(resolvedModule.resolvedFileName))) {
|
|
2682
2712
|
return void 0;
|
|
2683
2713
|
}
|
|
2684
2714
|
return resolvedModule;
|
|
@@ -2696,18 +2726,18 @@ var NgccDtsCompilerHost = class extends NgtscCompilerHost {
|
|
|
2696
2726
|
}
|
|
2697
2727
|
resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference) {
|
|
2698
2728
|
return moduleNames.map((moduleName) => {
|
|
2699
|
-
const { resolvedModule } =
|
|
2729
|
+
const { resolvedModule } = ts11.resolveModuleName(moduleName, containingFile, this.options, this, this.moduleResolutionCache, redirectedReference);
|
|
2700
2730
|
return resolvedModule;
|
|
2701
2731
|
});
|
|
2702
2732
|
}
|
|
2703
2733
|
};
|
|
2704
2734
|
|
|
2705
|
-
// bazel-out/
|
|
2706
|
-
import
|
|
2735
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/source_file_cache.mjs
|
|
2736
|
+
import ts12 from "typescript";
|
|
2707
2737
|
var SharedFileCache = class {
|
|
2708
2738
|
constructor(fs) {
|
|
2709
2739
|
this.fs = fs;
|
|
2710
|
-
this.sfCache = new Map();
|
|
2740
|
+
this.sfCache = /* @__PURE__ */ new Map();
|
|
2711
2741
|
}
|
|
2712
2742
|
getCachedSourceFile(fileName) {
|
|
2713
2743
|
const absPath = this.fs.resolve(fileName);
|
|
@@ -2725,7 +2755,7 @@ var SharedFileCache = class {
|
|
|
2725
2755
|
if (content === void 0) {
|
|
2726
2756
|
return void 0;
|
|
2727
2757
|
}
|
|
2728
|
-
const sf =
|
|
2758
|
+
const sf = ts12.createSourceFile(absPath, content, ts12.ScriptTarget.ES2015);
|
|
2729
2759
|
this.sfCache.set(absPath, sf);
|
|
2730
2760
|
}
|
|
2731
2761
|
return this.sfCache.get(absPath);
|
|
@@ -2736,7 +2766,7 @@ var SharedFileCache = class {
|
|
|
2736
2766
|
return void 0;
|
|
2737
2767
|
}
|
|
2738
2768
|
if (!this.sfCache.has(absPath) || this.sfCache.get(absPath).text !== content) {
|
|
2739
|
-
const sf =
|
|
2769
|
+
const sf = ts12.createSourceFile(absPath, content, ts12.ScriptTarget.ES2015);
|
|
2740
2770
|
this.sfCache.set(absPath, sf);
|
|
2741
2771
|
}
|
|
2742
2772
|
return this.sfCache.get(absPath);
|
|
@@ -2768,10 +2798,11 @@ function isFile(path, segments, fs) {
|
|
|
2768
2798
|
return true;
|
|
2769
2799
|
}
|
|
2770
2800
|
var EntryPointFileCache = class {
|
|
2771
|
-
constructor(fs, sharedFileCache) {
|
|
2801
|
+
constructor(fs, sharedFileCache, processSourceText) {
|
|
2772
2802
|
this.fs = fs;
|
|
2773
2803
|
this.sharedFileCache = sharedFileCache;
|
|
2774
|
-
this.
|
|
2804
|
+
this.processSourceText = processSourceText;
|
|
2805
|
+
this.sfCache = /* @__PURE__ */ new Map();
|
|
2775
2806
|
}
|
|
2776
2807
|
getCachedSourceFile(fileName, languageVersion) {
|
|
2777
2808
|
const staticSf = this.sharedFileCache.getCachedSourceFile(fileName);
|
|
@@ -2786,7 +2817,8 @@ var EntryPointFileCache = class {
|
|
|
2786
2817
|
if (content === void 0) {
|
|
2787
2818
|
return void 0;
|
|
2788
2819
|
}
|
|
2789
|
-
const
|
|
2820
|
+
const processed = this.processSourceText(content);
|
|
2821
|
+
const sf = ts12.createSourceFile(fileName, processed, languageVersion);
|
|
2790
2822
|
this.sfCache.set(absPath, sf);
|
|
2791
2823
|
return sf;
|
|
2792
2824
|
}
|
|
@@ -2798,16 +2830,24 @@ function readFile(absPath, fs) {
|
|
|
2798
2830
|
return fs.readFile(absPath);
|
|
2799
2831
|
}
|
|
2800
2832
|
function createModuleResolutionCache(fs) {
|
|
2801
|
-
return
|
|
2833
|
+
return ts12.createModuleResolutionCache(fs.pwd(), (fileName) => {
|
|
2802
2834
|
return fs.isCaseSensitive() ? fileName : fileName.toLowerCase();
|
|
2803
2835
|
});
|
|
2804
2836
|
}
|
|
2805
2837
|
|
|
2806
|
-
// bazel-out/
|
|
2838
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/entry_point_bundle.mjs
|
|
2839
|
+
function createSourceTextProcessor(format) {
|
|
2840
|
+
if (format === "umd" || format === "commonjs") {
|
|
2841
|
+
return adjustElementAccessExports;
|
|
2842
|
+
} else {
|
|
2843
|
+
return (sourceText) => sourceText;
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2807
2846
|
function makeEntryPointBundle(fs, entryPoint, sharedFileCache, moduleResolutionCache, formatPath, isCore, format, dtsProcessing, pathMappings, mirrorDtsFromSrc = false, enableI18nLegacyMessageIdFormat = true) {
|
|
2808
2847
|
const rootDir = entryPoint.packagePath;
|
|
2809
2848
|
const options = __spreadValues({ allowJs: true, maxNodeModuleJsDepth: Infinity, rootDir }, pathMappings);
|
|
2810
|
-
const
|
|
2849
|
+
const processSourceText = createSourceTextProcessor(format);
|
|
2850
|
+
const entryPointCache = new EntryPointFileCache(fs, sharedFileCache, processSourceText);
|
|
2811
2851
|
const dtsHost = new NgccDtsCompilerHost(fs, options, entryPointCache, moduleResolutionCache);
|
|
2812
2852
|
const srcHost = new NgccSourcesCompilerHost(fs, options, entryPointCache, moduleResolutionCache, entryPoint.packagePath);
|
|
2813
2853
|
const absFormatPath = fs.resolve(entryPoint.path, formatPath);
|
|
@@ -2844,14 +2884,14 @@ function computePotentialDtsFilesFromJsFiles(fs, srcProgram, formatPath, typings
|
|
|
2844
2884
|
return additionalFiles;
|
|
2845
2885
|
}
|
|
2846
2886
|
|
|
2847
|
-
// bazel-out/
|
|
2848
|
-
import
|
|
2887
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/transformer.mjs
|
|
2888
|
+
import ts22 from "typescript";
|
|
2849
2889
|
|
|
2850
|
-
// bazel-out/
|
|
2890
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/decoration_analyzer.mjs
|
|
2851
2891
|
import { ConstantPool } from "@angular/compiler";
|
|
2852
2892
|
|
|
2853
|
-
// bazel-out/
|
|
2854
|
-
import
|
|
2893
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/utils.mjs
|
|
2894
|
+
import ts13 from "typescript";
|
|
2855
2895
|
function isClassDeclaration(clazz) {
|
|
2856
2896
|
return isNamedClassDeclaration(clazz) || isNamedFunctionDeclaration(clazz) || isNamedVariableDeclaration(clazz);
|
|
2857
2897
|
}
|
|
@@ -2876,7 +2916,7 @@ function createDirectiveDecorator(clazz, metadata) {
|
|
|
2876
2916
|
if (metadata.exportAs !== null) {
|
|
2877
2917
|
metaArgs.push(property("exportAs", metadata.exportAs.join(", ")));
|
|
2878
2918
|
}
|
|
2879
|
-
args.push(reifySourceFile(
|
|
2919
|
+
args.push(reifySourceFile(ts13.createObjectLiteral(metaArgs)));
|
|
2880
2920
|
}
|
|
2881
2921
|
return {
|
|
2882
2922
|
name: "Directive",
|
|
@@ -2904,7 +2944,7 @@ function createComponentDecorator(clazz, metadata) {
|
|
|
2904
2944
|
node: null,
|
|
2905
2945
|
synthesizedFor: clazz.name,
|
|
2906
2946
|
args: [
|
|
2907
|
-
reifySourceFile(
|
|
2947
|
+
reifySourceFile(ts13.createObjectLiteral(metaArgs))
|
|
2908
2948
|
]
|
|
2909
2949
|
};
|
|
2910
2950
|
}
|
|
@@ -2919,21 +2959,21 @@ function createInjectableDecorator(clazz) {
|
|
|
2919
2959
|
};
|
|
2920
2960
|
}
|
|
2921
2961
|
function property(name, value) {
|
|
2922
|
-
return
|
|
2962
|
+
return ts13.createPropertyAssignment(name, ts13.createStringLiteral(value));
|
|
2923
2963
|
}
|
|
2924
|
-
var EMPTY_SF =
|
|
2964
|
+
var EMPTY_SF = ts13.createSourceFile("(empty)", "", ts13.ScriptTarget.Latest);
|
|
2925
2965
|
function reifySourceFile(expr) {
|
|
2926
|
-
const printer =
|
|
2927
|
-
const exprText = printer.printNode(
|
|
2928
|
-
const sf =
|
|
2966
|
+
const printer = ts13.createPrinter();
|
|
2967
|
+
const exprText = printer.printNode(ts13.EmitHint.Unspecified, expr, EMPTY_SF);
|
|
2968
|
+
const sf = ts13.createSourceFile("(synthetic)", `const expr = ${exprText};`, ts13.ScriptTarget.Latest, true, ts13.ScriptKind.JS);
|
|
2929
2969
|
const stmt = sf.statements[0];
|
|
2930
|
-
if (!
|
|
2931
|
-
throw new Error(`Expected VariableStatement, got ${
|
|
2970
|
+
if (!ts13.isVariableStatement(stmt)) {
|
|
2971
|
+
throw new Error(`Expected VariableStatement, got ${ts13.SyntaxKind[stmt.kind]}`);
|
|
2932
2972
|
}
|
|
2933
2973
|
return stmt.declarationList.declarations[0].initializer;
|
|
2934
2974
|
}
|
|
2935
2975
|
|
|
2936
|
-
// bazel-out/
|
|
2976
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/missing_injectable_migration.mjs
|
|
2937
2977
|
var MissingInjectableMigration = class {
|
|
2938
2978
|
apply(clazz, host) {
|
|
2939
2979
|
const decorators = host.reflectionHost.getDecoratorsOfDeclaration(clazz);
|
|
@@ -3017,7 +3057,7 @@ function migrateProviderClass(provider, host) {
|
|
|
3017
3057
|
host.injectSyntheticDecorator(clazz, createInjectableDecorator(clazz));
|
|
3018
3058
|
}
|
|
3019
3059
|
}
|
|
3020
|
-
var NO_MIGRATE_DECORATORS = new Set(["Injectable", "Directive", "Component", "Pipe"]);
|
|
3060
|
+
var NO_MIGRATE_DECORATORS = /* @__PURE__ */ new Set(["Injectable", "Directive", "Component", "Pipe"]);
|
|
3021
3061
|
function needsInjectableDecorator(clazz, host) {
|
|
3022
3062
|
const decorators = host.getAllDecorators(clazz);
|
|
3023
3063
|
if (decorators === null) {
|
|
@@ -3038,7 +3078,7 @@ function getAngularCoreDecoratorName(decorator) {
|
|
|
3038
3078
|
return decorator.import.name;
|
|
3039
3079
|
}
|
|
3040
3080
|
|
|
3041
|
-
// bazel-out/
|
|
3081
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/undecorated_child_migration.mjs
|
|
3042
3082
|
var UndecoratedChildMigration = class {
|
|
3043
3083
|
apply(clazz, host) {
|
|
3044
3084
|
const moduleMeta = host.metadata.getNgModuleMetadata(new Reference(clazz));
|
|
@@ -3073,7 +3113,7 @@ var UndecoratedChildMigration = class {
|
|
|
3073
3113
|
}
|
|
3074
3114
|
};
|
|
3075
3115
|
|
|
3076
|
-
// bazel-out/
|
|
3116
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/migrations/undecorated_parent_migration.mjs
|
|
3077
3117
|
var UndecoratedParentMigration = class {
|
|
3078
3118
|
apply(clazz, host) {
|
|
3079
3119
|
if (!hasDirectiveDecorator(host, clazz) || hasConstructor(host, clazz)) {
|
|
@@ -3106,8 +3146,8 @@ function determineBaseClass(clazz, host) {
|
|
|
3106
3146
|
return baseClass;
|
|
3107
3147
|
}
|
|
3108
3148
|
|
|
3109
|
-
// bazel-out/
|
|
3110
|
-
import
|
|
3149
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/migration_host.mjs
|
|
3150
|
+
import ts14 from "typescript";
|
|
3111
3151
|
var DefaultMigrationHost = class {
|
|
3112
3152
|
constructor(reflectionHost, metadata, evaluator, compiler, entryPointPath) {
|
|
3113
3153
|
this.reflectionHost = reflectionHost;
|
|
@@ -3138,14 +3178,14 @@ function createMigrationDiagnostic(diagnostic, source, decorator) {
|
|
|
3138
3178
|
const clone = __spreadValues({}, diagnostic);
|
|
3139
3179
|
const chain = [{
|
|
3140
3180
|
messageText: `Occurs for @${decorator.name} decorator inserted by an automatic migration`,
|
|
3141
|
-
category:
|
|
3181
|
+
category: ts14.DiagnosticCategory.Message,
|
|
3142
3182
|
code: 0
|
|
3143
3183
|
}];
|
|
3144
3184
|
if (decorator.args !== null) {
|
|
3145
3185
|
const args = decorator.args.map((arg) => arg.getText()).join(", ");
|
|
3146
3186
|
chain.push({
|
|
3147
3187
|
messageText: `@${decorator.name}(${args})`,
|
|
3148
|
-
category:
|
|
3188
|
+
category: ts14.DiagnosticCategory.Message,
|
|
3149
3189
|
code: 0
|
|
3150
3190
|
});
|
|
3151
3191
|
}
|
|
@@ -3166,7 +3206,7 @@ function createMigrationDiagnostic(diagnostic, source, decorator) {
|
|
|
3166
3206
|
return clone;
|
|
3167
3207
|
}
|
|
3168
3208
|
|
|
3169
|
-
// bazel-out/
|
|
3209
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/ngcc_trait_compiler.mjs
|
|
3170
3210
|
var NgccTraitCompiler = class extends TraitCompiler {
|
|
3171
3211
|
constructor(handlers, ngccReflector) {
|
|
3172
3212
|
super(handlers, ngccReflector, NOOP_PERF_RECORDER, new NoIncrementalBuild(), true, CompilationMode.FULL, new DtsTransformRegistry(), null);
|
|
@@ -3211,10 +3251,10 @@ var NoIncrementalBuild = class {
|
|
|
3211
3251
|
}
|
|
3212
3252
|
};
|
|
3213
3253
|
|
|
3214
|
-
// bazel-out/
|
|
3254
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/types.mjs
|
|
3215
3255
|
var DecorationAnalyses = Map;
|
|
3216
3256
|
|
|
3217
|
-
// bazel-out/
|
|
3257
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/decoration_analyzer.mjs
|
|
3218
3258
|
var NgccResourceLoader = class {
|
|
3219
3259
|
constructor(fs) {
|
|
3220
3260
|
this.fs = fs;
|
|
@@ -3370,8 +3410,8 @@ var DecorationAnalyzer = class {
|
|
|
3370
3410
|
}
|
|
3371
3411
|
};
|
|
3372
3412
|
|
|
3373
|
-
// bazel-out/
|
|
3374
|
-
import
|
|
3413
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/module_with_providers_analyzer.mjs
|
|
3414
|
+
import ts15 from "typescript";
|
|
3375
3415
|
var ModuleWithProvidersAnalyses = Map;
|
|
3376
3416
|
var ModuleWithProvidersAnalyzer = class {
|
|
3377
3417
|
constructor(host, typeChecker, referencesRegistry, processDts) {
|
|
@@ -3393,7 +3433,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3393
3433
|
if (this.processDts) {
|
|
3394
3434
|
const dtsFn = this.getDtsModuleWithProvidersFunction(fn);
|
|
3395
3435
|
const dtsFnType = dtsFn.declaration.type;
|
|
3396
|
-
const typeParam = dtsFnType &&
|
|
3436
|
+
const typeParam = dtsFnType && ts15.isTypeReferenceNode(dtsFnType) && dtsFnType.typeArguments && dtsFnType.typeArguments[0] || null;
|
|
3397
3437
|
if (!typeParam || isAnyKeyword(typeParam)) {
|
|
3398
3438
|
const dtsFile = dtsFn.declaration.getSourceFile();
|
|
3399
3439
|
const analysis = analyses.has(dtsFile) ? analyses.get(dtsFile) : [];
|
|
@@ -3438,7 +3478,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3438
3478
|
return infos;
|
|
3439
3479
|
}
|
|
3440
3480
|
parseForModuleWithProviders(name, node, implementation = node, container = null) {
|
|
3441
|
-
if (implementation === null || !
|
|
3481
|
+
if (implementation === null || !ts15.isFunctionDeclaration(implementation) && !ts15.isMethodDeclaration(implementation) && !ts15.isFunctionExpression(implementation)) {
|
|
3442
3482
|
return null;
|
|
3443
3483
|
}
|
|
3444
3484
|
const declaration = implementation;
|
|
@@ -3451,7 +3491,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3451
3491
|
return null;
|
|
3452
3492
|
}
|
|
3453
3493
|
const lastStatement = body[body.length - 1];
|
|
3454
|
-
if (!
|
|
3494
|
+
if (!ts15.isReturnStatement(lastStatement) || lastStatement.expression === void 0) {
|
|
3455
3495
|
return null;
|
|
3456
3496
|
}
|
|
3457
3497
|
const result = this.evaluator.evaluate(lastStatement.expression);
|
|
@@ -3473,7 +3513,7 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3473
3513
|
const containerClass = fn.container && this.host.getClassSymbol(fn.container);
|
|
3474
3514
|
if (containerClass) {
|
|
3475
3515
|
const dtsClass = this.host.getDtsDeclaration(containerClass.declaration.valueDeclaration);
|
|
3476
|
-
dtsFn = dtsClass &&
|
|
3516
|
+
dtsFn = dtsClass && ts15.isClassDeclaration(dtsClass) ? dtsClass.members.find((member) => ts15.isMethodDeclaration(member) && ts15.isIdentifier(member.name) && member.name.text === fn.name) : null;
|
|
3477
3517
|
} else {
|
|
3478
3518
|
dtsFn = this.host.getDtsDeclaration(fn.declaration);
|
|
3479
3519
|
}
|
|
@@ -3503,17 +3543,17 @@ var ModuleWithProvidersAnalyzer = class {
|
|
|
3503
3543
|
}
|
|
3504
3544
|
};
|
|
3505
3545
|
function isFunctionOrMethod(declaration) {
|
|
3506
|
-
return
|
|
3546
|
+
return ts15.isFunctionDeclaration(declaration) || ts15.isMethodDeclaration(declaration);
|
|
3507
3547
|
}
|
|
3508
3548
|
function isAnyKeyword(typeParam) {
|
|
3509
|
-
return typeParam.kind ===
|
|
3549
|
+
return typeParam.kind === ts15.SyntaxKind.AnyKeyword;
|
|
3510
3550
|
}
|
|
3511
3551
|
|
|
3512
|
-
// bazel-out/
|
|
3552
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/ngcc_references_registry.mjs
|
|
3513
3553
|
var NgccReferencesRegistry = class {
|
|
3514
3554
|
constructor(host) {
|
|
3515
3555
|
this.host = host;
|
|
3516
|
-
this.map = new Map();
|
|
3556
|
+
this.map = /* @__PURE__ */ new Map();
|
|
3517
3557
|
}
|
|
3518
3558
|
add(source, ...references) {
|
|
3519
3559
|
references.forEach((ref) => {
|
|
@@ -3530,7 +3570,7 @@ var NgccReferencesRegistry = class {
|
|
|
3530
3570
|
}
|
|
3531
3571
|
};
|
|
3532
3572
|
|
|
3533
|
-
// bazel-out/
|
|
3573
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/analysis/private_declarations_analyzer.mjs
|
|
3534
3574
|
var PrivateDeclarationsAnalyzer = class {
|
|
3535
3575
|
constructor(host, referencesRegistry) {
|
|
3536
3576
|
this.host = host;
|
|
@@ -3571,8 +3611,8 @@ var PrivateDeclarationsAnalyzer = class {
|
|
|
3571
3611
|
}
|
|
3572
3612
|
};
|
|
3573
3613
|
|
|
3574
|
-
// bazel-out/
|
|
3575
|
-
import
|
|
3614
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/commonjs_host.mjs
|
|
3615
|
+
import ts16 from "typescript";
|
|
3576
3616
|
var CommonJsReflectionHost = class extends Esm5ReflectionHost {
|
|
3577
3617
|
constructor(logger, isCore, src, dts = null) {
|
|
3578
3618
|
super(logger, isCore, src, dts);
|
|
@@ -3612,7 +3652,7 @@ var CommonJsReflectionHost = class extends Esm5ReflectionHost {
|
|
|
3612
3652
|
return calls;
|
|
3613
3653
|
}
|
|
3614
3654
|
computeExportsOfCommonJsModule(sourceFile) {
|
|
3615
|
-
const moduleMap = new Map();
|
|
3655
|
+
const moduleMap = /* @__PURE__ */ new Map();
|
|
3616
3656
|
for (const statement of this.getModuleStatements(sourceFile)) {
|
|
3617
3657
|
if (isExportsStatement(statement)) {
|
|
3618
3658
|
const exportDeclaration = this.extractBasicCommonJsExportDeclaration(statement);
|
|
@@ -3646,7 +3686,7 @@ var CommonJsReflectionHost = class extends Esm5ReflectionHost {
|
|
|
3646
3686
|
}
|
|
3647
3687
|
extractCommonJsWildcardReexports(statement, containingFile) {
|
|
3648
3688
|
const reexportArg = statement.expression.arguments[0];
|
|
3649
|
-
const requireCall = isRequireCall(reexportArg) ? reexportArg :
|
|
3689
|
+
const requireCall = isRequireCall(reexportArg) ? reexportArg : ts16.isIdentifier(reexportArg) ? findRequireCallReference(reexportArg, this.checker) : null;
|
|
3650
3690
|
if (requireCall === null) {
|
|
3651
3691
|
return [];
|
|
3652
3692
|
}
|
|
@@ -3729,13 +3769,13 @@ var CommonJsReflectionHost = class extends Esm5ReflectionHost {
|
|
|
3729
3769
|
const moduleInfo = this.compilerHost.resolveModuleNames([moduleName], containingFile.fileName, void 0, void 0, this.program.getCompilerOptions())[0];
|
|
3730
3770
|
return moduleInfo && this.program.getSourceFile(absoluteFrom(moduleInfo.resolvedFileName));
|
|
3731
3771
|
} else {
|
|
3732
|
-
const moduleInfo =
|
|
3772
|
+
const moduleInfo = ts16.resolveModuleName(moduleName, containingFile.fileName, this.program.getCompilerOptions(), this.compilerHost);
|
|
3733
3773
|
return moduleInfo.resolvedModule && this.program.getSourceFile(absoluteFrom(moduleInfo.resolvedModule.resolvedFileName));
|
|
3734
3774
|
}
|
|
3735
3775
|
}
|
|
3736
3776
|
};
|
|
3737
3777
|
|
|
3738
|
-
// bazel-out/
|
|
3778
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/host/delegating_host.mjs
|
|
3739
3779
|
var DelegatingReflectionHost = class {
|
|
3740
3780
|
constructor(tsHost, ngccHost) {
|
|
3741
3781
|
this.tsHost = tsHost;
|
|
@@ -3856,16 +3896,16 @@ var DelegatingReflectionHost = class {
|
|
|
3856
3896
|
}
|
|
3857
3897
|
};
|
|
3858
3898
|
|
|
3859
|
-
// bazel-out/
|
|
3899
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/commonjs_rendering_formatter.mjs
|
|
3900
|
+
import ts19 from "typescript";
|
|
3901
|
+
|
|
3902
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm5_rendering_formatter.mjs
|
|
3860
3903
|
import ts18 from "typescript";
|
|
3861
3904
|
|
|
3862
|
-
// bazel-out/
|
|
3905
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.mjs
|
|
3863
3906
|
import ts17 from "typescript";
|
|
3864
3907
|
|
|
3865
|
-
// bazel-out/
|
|
3866
|
-
import ts16 from "typescript";
|
|
3867
|
-
|
|
3868
|
-
// bazel-out/k8-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/ngcc_import_rewriter.mjs
|
|
3908
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/ngcc_import_rewriter.mjs
|
|
3869
3909
|
var NgccFlatImportRewriter = class {
|
|
3870
3910
|
shouldImportSymbol(symbol, specifier) {
|
|
3871
3911
|
if (specifier === "@angular/core") {
|
|
@@ -3886,7 +3926,7 @@ var NgccFlatImportRewriter = class {
|
|
|
3886
3926
|
}
|
|
3887
3927
|
};
|
|
3888
3928
|
|
|
3889
|
-
// bazel-out/
|
|
3929
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/utils.mjs
|
|
3890
3930
|
function getImportRewriter(r3SymbolsFile, isCore, isFlat) {
|
|
3891
3931
|
if (isCore && isFlat) {
|
|
3892
3932
|
return new NgccFlatImportRewriter();
|
|
@@ -3900,13 +3940,13 @@ function stripExtension2(filePath) {
|
|
|
3900
3940
|
return filePath.replace(/\.(js|d\.ts)$/, "");
|
|
3901
3941
|
}
|
|
3902
3942
|
|
|
3903
|
-
// bazel-out/
|
|
3943
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.mjs
|
|
3904
3944
|
var EsmRenderingFormatter = class {
|
|
3905
3945
|
constructor(fs, host, isCore) {
|
|
3906
3946
|
this.fs = fs;
|
|
3907
3947
|
this.host = host;
|
|
3908
3948
|
this.isCore = isCore;
|
|
3909
|
-
this.printer =
|
|
3949
|
+
this.printer = ts17.createPrinter({ newLine: ts17.NewLineKind.LineFeed });
|
|
3910
3950
|
}
|
|
3911
3951
|
addImports(output, imports, sf) {
|
|
3912
3952
|
if (imports.length === 0) {
|
|
@@ -3966,14 +4006,14 @@ export {${e.symbolName} as ${e.asAlias}} from '${e.fromModule}';`;
|
|
|
3966
4006
|
}
|
|
3967
4007
|
removeDecorators(output, decoratorsToRemove) {
|
|
3968
4008
|
decoratorsToRemove.forEach((nodesToRemove, containerNode) => {
|
|
3969
|
-
if (
|
|
4009
|
+
if (ts17.isArrayLiteralExpression(containerNode)) {
|
|
3970
4010
|
const items = containerNode.elements;
|
|
3971
4011
|
if (items.length === nodesToRemove.length) {
|
|
3972
4012
|
const statement = findStatement(containerNode);
|
|
3973
4013
|
if (statement) {
|
|
3974
|
-
if (
|
|
4014
|
+
if (ts17.isExpressionStatement(statement)) {
|
|
3975
4015
|
output.remove(statement.getFullStart(), statement.getEnd());
|
|
3976
|
-
} else if (
|
|
4016
|
+
} else if (ts17.isReturnStatement(statement) && statement.expression && isAssignment2(statement.expression)) {
|
|
3977
4017
|
const startOfRemoval = statement.expression.left.getEnd();
|
|
3978
4018
|
const endOfRemoval = getEndExceptSemicolon(statement);
|
|
3979
4019
|
output.remove(startOfRemoval, endOfRemoval);
|
|
@@ -4006,7 +4046,7 @@ export {${e.symbolName} as ${e.asAlias}} from '${e.fromModule}';`;
|
|
|
4006
4046
|
const importPath = info.ngModule.ownedByModuleGuess || (declarationFile !== ngModuleFile ? stripExtension2(relativeImport) : null);
|
|
4007
4047
|
const ngModule = generateImportString(importManager, importPath, ngModuleName);
|
|
4008
4048
|
if (info.declaration.type) {
|
|
4009
|
-
const typeName = info.declaration.type &&
|
|
4049
|
+
const typeName = info.declaration.type && ts17.isTypeReferenceNode(info.declaration.type) ? info.declaration.type.typeName : null;
|
|
4010
4050
|
if (this.isCoreModuleWithProvidersType(typeName)) {
|
|
4011
4051
|
outputText.overwrite(info.declaration.type.getStart(), info.declaration.type.getEnd(), `ModuleWithProviders<${ngModule}>`);
|
|
4012
4052
|
} else {
|
|
@@ -4015,32 +4055,32 @@ export {${e.symbolName} as ${e.asAlias}} from '${e.fromModule}';`;
|
|
|
4015
4055
|
}
|
|
4016
4056
|
} else {
|
|
4017
4057
|
const lastToken = info.declaration.getLastToken();
|
|
4018
|
-
const insertPoint = lastToken && lastToken.kind ===
|
|
4058
|
+
const insertPoint = lastToken && lastToken.kind === ts17.SyntaxKind.SemicolonToken ? lastToken.getStart() : info.declaration.getEnd();
|
|
4019
4059
|
outputText.appendLeft(insertPoint, `: ${generateImportString(importManager, "@angular/core", "ModuleWithProviders")}<${ngModule}>`);
|
|
4020
4060
|
}
|
|
4021
4061
|
});
|
|
4022
4062
|
}
|
|
4023
4063
|
printStatement(stmt, sourceFile, importManager) {
|
|
4024
4064
|
const node = translateStatement(stmt, importManager);
|
|
4025
|
-
const code = this.printer.printNode(
|
|
4065
|
+
const code = this.printer.printNode(ts17.EmitHint.Unspecified, node, sourceFile);
|
|
4026
4066
|
return code;
|
|
4027
4067
|
}
|
|
4028
4068
|
findEndOfImports(sf) {
|
|
4029
4069
|
for (const stmt of sf.statements) {
|
|
4030
|
-
if (!
|
|
4070
|
+
if (!ts17.isImportDeclaration(stmt) && !ts17.isImportEqualsDeclaration(stmt) && !ts17.isNamespaceImport(stmt)) {
|
|
4031
4071
|
return stmt.getStart();
|
|
4032
4072
|
}
|
|
4033
4073
|
}
|
|
4034
4074
|
return 0;
|
|
4035
4075
|
}
|
|
4036
4076
|
isCoreModuleWithProvidersType(typeName) {
|
|
4037
|
-
const id = typeName &&
|
|
4077
|
+
const id = typeName && ts17.isIdentifier(typeName) ? this.host.getImportOfIdentifier(typeName) : null;
|
|
4038
4078
|
return id && id.name === "ModuleWithProviders" && (this.isCore || id.from === "@angular/core");
|
|
4039
4079
|
}
|
|
4040
4080
|
};
|
|
4041
4081
|
function findStatement(node) {
|
|
4042
4082
|
while (node) {
|
|
4043
|
-
if (
|
|
4083
|
+
if (ts17.isExpressionStatement(node) || ts17.isReturnStatement(node)) {
|
|
4044
4084
|
return node;
|
|
4045
4085
|
}
|
|
4046
4086
|
node = node.parent;
|
|
@@ -4057,10 +4097,10 @@ function getNextSiblingInArray(node, array) {
|
|
|
4057
4097
|
}
|
|
4058
4098
|
function getEndExceptSemicolon(statement) {
|
|
4059
4099
|
const lastToken = statement.getLastToken();
|
|
4060
|
-
return lastToken && lastToken.kind ===
|
|
4100
|
+
return lastToken && lastToken.kind === ts17.SyntaxKind.SemicolonToken ? statement.getEnd() - 1 : statement.getEnd();
|
|
4061
4101
|
}
|
|
4062
4102
|
|
|
4063
|
-
// bazel-out/
|
|
4103
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/esm5_rendering_formatter.mjs
|
|
4064
4104
|
var Esm5RenderingFormatter = class extends EsmRenderingFormatter {
|
|
4065
4105
|
addDefinitions(output, compiledClass, definitions) {
|
|
4066
4106
|
const classSymbol = this.host.getClassSymbol(compiledClass.declaration);
|
|
@@ -4071,10 +4111,10 @@ Expected an ES5 IIFE wrapped function. But got:
|
|
|
4071
4111
|
}
|
|
4072
4112
|
const declarationStatement = getContainingStatement(classSymbol.implementation.valueDeclaration);
|
|
4073
4113
|
const iifeBody = declarationStatement.parent;
|
|
4074
|
-
if (!iifeBody || !
|
|
4114
|
+
if (!iifeBody || !ts18.isBlock(iifeBody)) {
|
|
4075
4115
|
throw new Error(`Compiled class declaration is not inside an IIFE: ${compiledClass.name} in ${compiledClass.declaration.getSourceFile().fileName}`);
|
|
4076
4116
|
}
|
|
4077
|
-
const returnStatement = iifeBody.statements.find(
|
|
4117
|
+
const returnStatement = iifeBody.statements.find(ts18.isReturnStatement);
|
|
4078
4118
|
if (!returnStatement) {
|
|
4079
4119
|
throw new Error(`Compiled class wrapper IIFE does not have a return statement: ${compiledClass.name} in ${compiledClass.declaration.getSourceFile().fileName}`);
|
|
4080
4120
|
}
|
|
@@ -4083,12 +4123,12 @@ Expected an ES5 IIFE wrapped function. But got:
|
|
|
4083
4123
|
}
|
|
4084
4124
|
printStatement(stmt, sourceFile, importManager) {
|
|
4085
4125
|
const node = translateStatement(stmt, importManager, { downlevelTaggedTemplates: true, downlevelVariableDeclarations: true });
|
|
4086
|
-
const code = this.printer.printNode(
|
|
4126
|
+
const code = this.printer.printNode(ts18.EmitHint.Unspecified, node, sourceFile);
|
|
4087
4127
|
return code;
|
|
4088
4128
|
}
|
|
4089
4129
|
};
|
|
4090
4130
|
|
|
4091
|
-
// bazel-out/
|
|
4131
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/commonjs_rendering_formatter.mjs
|
|
4092
4132
|
var CommonJsRenderingFormatter = class extends Esm5RenderingFormatter {
|
|
4093
4133
|
constructor(fs, commonJsHost, isCore) {
|
|
4094
4134
|
super(fs, commonJsHost, isCore);
|
|
@@ -4125,10 +4165,10 @@ exports.${e.asAlias} = ${importNamespace}${namedImport.symbol};`;
|
|
|
4125
4165
|
}
|
|
4126
4166
|
findEndOfImports(sf) {
|
|
4127
4167
|
for (const statement of sf.statements) {
|
|
4128
|
-
if (
|
|
4168
|
+
if (ts19.isExpressionStatement(statement) && isRequireCall(statement.expression)) {
|
|
4129
4169
|
continue;
|
|
4130
4170
|
}
|
|
4131
|
-
const declarations =
|
|
4171
|
+
const declarations = ts19.isVariableStatement(statement) ? Array.from(statement.declarationList.declarations) : [];
|
|
4132
4172
|
if (declarations.some((d) => !d.initializer || !isRequireCall(d.initializer))) {
|
|
4133
4173
|
return statement.getStart();
|
|
4134
4174
|
}
|
|
@@ -4137,15 +4177,15 @@ exports.${e.asAlias} = ${importNamespace}${namedImport.symbol};`;
|
|
|
4137
4177
|
}
|
|
4138
4178
|
};
|
|
4139
4179
|
|
|
4140
|
-
// bazel-out/
|
|
4180
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/dts_renderer.mjs
|
|
4141
4181
|
import MagicString from "magic-string";
|
|
4142
|
-
import
|
|
4182
|
+
import ts20 from "typescript";
|
|
4143
4183
|
|
|
4144
|
-
// bazel-out/
|
|
4184
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/constants.mjs
|
|
4145
4185
|
var IMPORT_PREFIX = "\u0275ngcc";
|
|
4146
4186
|
var NGCC_TIMED_OUT_EXIT_CODE = 177;
|
|
4147
4187
|
|
|
4148
|
-
// bazel-out/
|
|
4188
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/source_maps.mjs
|
|
4149
4189
|
import mapHelpers from "convert-source-map";
|
|
4150
4190
|
function renderSourceAndMap(logger, fs, sourceFile, generatedMagicString) {
|
|
4151
4191
|
var _a;
|
|
@@ -4180,7 +4220,7 @@ ${sourceMapComment}` },
|
|
|
4180
4220
|
}
|
|
4181
4221
|
}
|
|
4182
4222
|
|
|
4183
|
-
// bazel-out/
|
|
4223
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/dts_renderer.mjs
|
|
4184
4224
|
var DtsRenderInfo = class {
|
|
4185
4225
|
constructor() {
|
|
4186
4226
|
this.classInfo = [];
|
|
@@ -4210,14 +4250,14 @@ var DtsRenderer = class {
|
|
|
4210
4250
|
}
|
|
4211
4251
|
renderDtsFile(dtsFile, renderInfo) {
|
|
4212
4252
|
const outputText = new MagicString(dtsFile.text);
|
|
4213
|
-
const printer =
|
|
4253
|
+
const printer = ts20.createPrinter();
|
|
4214
4254
|
const importManager = new ImportManager(getImportRewriter(this.bundle.dts.r3SymbolsFile, this.bundle.isCore, false), IMPORT_PREFIX);
|
|
4215
4255
|
renderInfo.classInfo.forEach((dtsClass) => {
|
|
4216
4256
|
const endOfClass = dtsClass.dtsDeclaration.getEnd();
|
|
4217
4257
|
dtsClass.compilation.forEach((declaration) => {
|
|
4218
4258
|
const type = translateType(declaration.type, importManager);
|
|
4219
4259
|
markForEmitAsSingleLine(type);
|
|
4220
|
-
const typeStr = printer.printNode(
|
|
4260
|
+
const typeStr = printer.printNode(ts20.EmitHint.Unspecified, type, dtsFile);
|
|
4221
4261
|
const newStatement = ` static ${declaration.name}: ${typeStr};
|
|
4222
4262
|
`;
|
|
4223
4263
|
outputText.appendRight(endOfClass - 1, newStatement);
|
|
@@ -4236,7 +4276,7 @@ export {${e.symbolName} as ${e.asAlias}} from '${e.fromModule}';`;
|
|
|
4236
4276
|
return renderSourceAndMap(this.logger, this.fs, dtsFile, outputText);
|
|
4237
4277
|
}
|
|
4238
4278
|
getTypingsFilesToRender(decorationAnalyses, privateDeclarationsAnalyses, moduleWithProvidersAnalyses) {
|
|
4239
|
-
const dtsMap = new Map();
|
|
4279
|
+
const dtsMap = /* @__PURE__ */ new Map();
|
|
4240
4280
|
decorationAnalyses.forEach((compiledFile) => {
|
|
4241
4281
|
let appliedReexports = false;
|
|
4242
4282
|
compiledFile.compiledClasses.forEach((compiledClass) => {
|
|
@@ -4277,18 +4317,18 @@ The simplest fix for this is to ensure that this class is exported from the pack
|
|
|
4277
4317
|
}
|
|
4278
4318
|
};
|
|
4279
4319
|
function markForEmitAsSingleLine(node) {
|
|
4280
|
-
|
|
4281
|
-
|
|
4320
|
+
ts20.setEmitFlags(node, ts20.EmitFlags.SingleLine);
|
|
4321
|
+
ts20.forEachChild(node, markForEmitAsSingleLine);
|
|
4282
4322
|
}
|
|
4283
4323
|
|
|
4284
|
-
// bazel-out/
|
|
4324
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/renderer.mjs
|
|
4285
4325
|
import { jsDocComment, WrappedNodeExpr, WritePropExpr } from "@angular/compiler";
|
|
4286
4326
|
import MagicString2 from "magic-string";
|
|
4287
4327
|
|
|
4288
|
-
// bazel-out/
|
|
4328
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/rendering_formatter.mjs
|
|
4289
4329
|
var RedundantDecoratorMap = Map;
|
|
4290
4330
|
|
|
4291
|
-
// bazel-out/
|
|
4331
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/renderer.mjs
|
|
4292
4332
|
var Renderer = class {
|
|
4293
4333
|
constructor(host, srcFormatter, fs, logger, bundle, tsConfig = null) {
|
|
4294
4334
|
this.host = host;
|
|
@@ -4391,8 +4431,8 @@ function createAssignmentStatement(receiverName, propName, initializer, leadingC
|
|
|
4391
4431
|
return statement;
|
|
4392
4432
|
}
|
|
4393
4433
|
|
|
4394
|
-
// bazel-out/
|
|
4395
|
-
import
|
|
4434
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/rendering/umd_rendering_formatter.mjs
|
|
4435
|
+
import ts21 from "typescript";
|
|
4396
4436
|
var UmdRenderingFormatter = class extends Esm5RenderingFormatter {
|
|
4397
4437
|
constructor(fs, umdHost, isCore) {
|
|
4398
4438
|
super(fs, umdHost, isCore);
|
|
@@ -4476,7 +4516,7 @@ function renderAmdDependencies(output, amdDefineCall, imports) {
|
|
|
4476
4516
|
const importString = imports.map((i) => `'${i.specifier}'`).join(",");
|
|
4477
4517
|
const factoryIndex = amdDefineCall.arguments.length - 1;
|
|
4478
4518
|
const dependencyArray = amdDefineCall.arguments[factoryIndex - 1];
|
|
4479
|
-
if (dependencyArray === void 0 || !
|
|
4519
|
+
if (dependencyArray === void 0 || !ts21.isArrayLiteralExpression(dependencyArray)) {
|
|
4480
4520
|
const injectionPoint = amdDefineCall.arguments[factoryIndex].getFullStart();
|
|
4481
4521
|
output.appendLeft(injectionPoint, `[${importString}],`);
|
|
4482
4522
|
} else {
|
|
@@ -4507,7 +4547,7 @@ function getGlobalIdentifier(i) {
|
|
|
4507
4547
|
return i.specifier.replace(/^@angular\//, "ng.").replace(/^@/, "").replace(/\//g, ".").replace(/[-_]+(.?)/g, (_, c) => c.toUpperCase()).replace(/^./, (c) => c.toLowerCase());
|
|
4508
4548
|
}
|
|
4509
4549
|
|
|
4510
|
-
// bazel-out/
|
|
4550
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/packages/transformer.mjs
|
|
4511
4551
|
var Transformer = class {
|
|
4512
4552
|
constructor(fs, logger, tsConfig = null) {
|
|
4513
4553
|
this.fs = fs;
|
|
@@ -4585,10 +4625,10 @@ var Transformer = class {
|
|
|
4585
4625
|
}
|
|
4586
4626
|
};
|
|
4587
4627
|
function hasErrors(diagnostics) {
|
|
4588
|
-
return diagnostics.some((d) => d.category ===
|
|
4628
|
+
return diagnostics.some((d) => d.category === ts22.DiagnosticCategory.Error);
|
|
4589
4629
|
}
|
|
4590
4630
|
|
|
4591
|
-
// bazel-out/
|
|
4631
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/create_compile_function.mjs
|
|
4592
4632
|
function getCreateCompileFn(fileSystem, logger, fileWriter, enableI18nLegacyMessageIdFormat, tsConfig, pathMappings) {
|
|
4593
4633
|
return (beforeWritingFiles, onTaskCompleted) => {
|
|
4594
4634
|
const transformer = new Transformer(fileSystem, logger, tsConfig);
|
|
@@ -4609,7 +4649,7 @@ function getCreateCompileFn(fileSystem, logger, fileWriter, enableI18nLegacyMess
|
|
|
4609
4649
|
const result = transformer.transform(bundle);
|
|
4610
4650
|
if (result.success) {
|
|
4611
4651
|
if (result.diagnostics.length > 0) {
|
|
4612
|
-
logger.warn(replaceTsWithNgInErrors(
|
|
4652
|
+
logger.warn(replaceTsWithNgInErrors(ts23.formatDiagnosticsWithColorAndContext(result.diagnostics, bundle.src.host)));
|
|
4613
4653
|
}
|
|
4614
4654
|
const writeBundle = () => {
|
|
4615
4655
|
fileWriter.writeBundle(bundle, result.transformedFiles, formatPropertiesToMarkAsProcessed);
|
|
@@ -4619,7 +4659,7 @@ function getCreateCompileFn(fileSystem, logger, fileWriter, enableI18nLegacyMess
|
|
|
4619
4659
|
const beforeWritingResult = beforeWritingFiles(result.transformedFiles);
|
|
4620
4660
|
return beforeWritingResult instanceof Promise ? beforeWritingResult.then(writeBundle) : writeBundle();
|
|
4621
4661
|
} else {
|
|
4622
|
-
const errors = replaceTsWithNgInErrors(
|
|
4662
|
+
const errors = replaceTsWithNgInErrors(ts23.formatDiagnosticsWithColorAndContext(result.diagnostics, bundle.src.host));
|
|
4623
4663
|
onTaskCompleted(task, 1, `compilation errors:
|
|
4624
4664
|
${errors}`);
|
|
4625
4665
|
}
|
|
@@ -4627,12 +4667,10 @@ ${errors}`);
|
|
|
4627
4667
|
};
|
|
4628
4668
|
}
|
|
4629
4669
|
|
|
4630
|
-
// bazel-out/
|
|
4631
|
-
import
|
|
4632
|
-
cpus
|
|
4633
|
-
} from "os";
|
|
4670
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/ngcc_options.mjs
|
|
4671
|
+
import * as os from "os";
|
|
4634
4672
|
|
|
4635
|
-
// bazel-out/
|
|
4673
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/path_mappings.mjs
|
|
4636
4674
|
function getPathMappingsFromTsConfig(fs, tsConfig, projectPath) {
|
|
4637
4675
|
if (tsConfig !== null && tsConfig.options.baseUrl !== void 0 && tsConfig.options.paths !== void 0) {
|
|
4638
4676
|
return {
|
|
@@ -4642,7 +4680,7 @@ function getPathMappingsFromTsConfig(fs, tsConfig, projectPath) {
|
|
|
4642
4680
|
}
|
|
4643
4681
|
}
|
|
4644
4682
|
|
|
4645
|
-
// bazel-out/
|
|
4683
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/writing/in_place_file_writer.mjs
|
|
4646
4684
|
var NGCC_BACKUP_EXTENSION = ".__ivy_ngcc_bak";
|
|
4647
4685
|
var InPlaceFileWriter = class {
|
|
4648
4686
|
constructor(fs, logger, errorOnFailedEntryPoint) {
|
|
@@ -4691,7 +4729,7 @@ This error may be caused by one of the following:
|
|
|
4691
4729
|
}
|
|
4692
4730
|
};
|
|
4693
4731
|
|
|
4694
|
-
// bazel-out/
|
|
4732
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/writing/new_entry_point_file_writer.mjs
|
|
4695
4733
|
var NGCC_DIRECTORY = "__ivy_ngcc__";
|
|
4696
4734
|
var NGCC_PROPERTY_EXTENSION = "_ivy_ngcc";
|
|
4697
4735
|
var NewEntryPointFileWriter = class extends InPlaceFileWriter {
|
|
@@ -4799,7 +4837,7 @@ var NewEntryPointFileWriter = class extends InPlaceFileWriter {
|
|
|
4799
4837
|
}
|
|
4800
4838
|
};
|
|
4801
4839
|
|
|
4802
|
-
// bazel-out/
|
|
4840
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/ngcc_options.mjs
|
|
4803
4841
|
function getSharedSetup(options) {
|
|
4804
4842
|
const fileSystem = getFileSystem();
|
|
4805
4843
|
const absBasePath = absoluteFrom(options.basePath);
|
|
@@ -4864,7 +4902,7 @@ If you did intend to use this file, then you can hide this warning by providing
|
|
|
4864
4902
|
function getMaxNumberOfWorkers() {
|
|
4865
4903
|
const maxWorkers = process.env.NGCC_MAX_WORKERS;
|
|
4866
4904
|
if (maxWorkers === void 0) {
|
|
4867
|
-
return Math.max(1, Math.min(4, cpus().length - 1));
|
|
4905
|
+
return Math.max(1, Math.min(4, os.cpus().length - 1));
|
|
4868
4906
|
}
|
|
4869
4907
|
const numericMaxWorkers = +maxWorkers.trim();
|
|
4870
4908
|
if (!Number.isInteger(numericMaxWorkers)) {
|
|
@@ -4875,11 +4913,11 @@ function getMaxNumberOfWorkers() {
|
|
|
4875
4913
|
return numericMaxWorkers;
|
|
4876
4914
|
}
|
|
4877
4915
|
|
|
4878
|
-
// bazel-out/
|
|
4916
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/tasks/utils.mjs
|
|
4879
4917
|
var stringifyTask = (task) => `{entryPoint: ${task.entryPoint.name}, formatProperty: ${task.formatProperty}, processDts: ${DtsProcessing[task.processDts]}}`;
|
|
4880
4918
|
function computeTaskDependencies(tasks, graph) {
|
|
4881
4919
|
const dependencies = new TaskDependencies();
|
|
4882
|
-
const candidateDependencies = new Map();
|
|
4920
|
+
const candidateDependencies = /* @__PURE__ */ new Map();
|
|
4883
4921
|
tasks.forEach((task) => {
|
|
4884
4922
|
const entryPointPath = task.entryPoint.path;
|
|
4885
4923
|
const deps = graph.dependenciesOf(entryPointPath);
|
|
@@ -4910,12 +4948,12 @@ function computeTaskDependencies(tasks, graph) {
|
|
|
4910
4948
|
}
|
|
4911
4949
|
function getDependentsSet(map, task) {
|
|
4912
4950
|
if (!map.has(task)) {
|
|
4913
|
-
map.set(task, new Set());
|
|
4951
|
+
map.set(task, /* @__PURE__ */ new Set());
|
|
4914
4952
|
}
|
|
4915
4953
|
return map.get(task);
|
|
4916
4954
|
}
|
|
4917
4955
|
function getBlockedTasks(dependencies) {
|
|
4918
|
-
const blockedTasks = new Map();
|
|
4956
|
+
const blockedTasks = /* @__PURE__ */ new Map();
|
|
4919
4957
|
for (const [dependency, dependents] of dependencies) {
|
|
4920
4958
|
for (const dependent of dependents) {
|
|
4921
4959
|
const dependentSet = getDependentsSet(blockedTasks, dependent);
|
|
@@ -4925,7 +4963,7 @@ function getBlockedTasks(dependencies) {
|
|
|
4925
4963
|
return blockedTasks;
|
|
4926
4964
|
}
|
|
4927
4965
|
function sortTasksByPriority(tasks, dependencies) {
|
|
4928
|
-
const priorityPerTask = new Map();
|
|
4966
|
+
const priorityPerTask = /* @__PURE__ */ new Map();
|
|
4929
4967
|
const computePriority = (task, idx) => [dependencies.has(task) ? dependencies.get(task).size : 0, idx];
|
|
4930
4968
|
tasks.forEach((task, i) => priorityPerTask.set(task, computePriority(task, i)));
|
|
4931
4969
|
return tasks.slice().sort((task1, task2) => {
|
|
@@ -4935,7 +4973,7 @@ function sortTasksByPriority(tasks, dependencies) {
|
|
|
4935
4973
|
});
|
|
4936
4974
|
}
|
|
4937
4975
|
|
|
4938
|
-
// bazel-out/
|
|
4976
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/execution/cluster/utils.mjs
|
|
4939
4977
|
import cluster from "cluster";
|
|
4940
4978
|
var Deferred = class {
|
|
4941
4979
|
constructor() {
|
|
@@ -4969,7 +5007,7 @@ var sendMessageToWorker = (workerId, msg) => {
|
|
|
4969
5007
|
});
|
|
4970
5008
|
};
|
|
4971
5009
|
|
|
4972
|
-
// bazel-out/
|
|
5010
|
+
// bazel-out/darwin-fastbuild/bin/packages/compiler-cli/ngcc/src/writing/package_json_updater.mjs
|
|
4973
5011
|
var PackageJsonUpdate = class {
|
|
4974
5012
|
constructor(writeChangesImpl) {
|
|
4975
5013
|
this.writeChangesImpl = writeChangesImpl;
|
|
@@ -5103,4 +5141,4 @@ export {
|
|
|
5103
5141
|
* Use of this source code is governed by an MIT-style license that can be
|
|
5104
5142
|
* found in the LICENSE file at https://angular.io/license
|
|
5105
5143
|
*/
|
|
5106
|
-
//# sourceMappingURL=chunk-
|
|
5144
|
+
//# sourceMappingURL=chunk-ZLL7BXGD.js.map
|