@absolutejs/absolute 0.19.0-beta.1092 → 0.19.0-beta.1093
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/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/build.js +414 -382
- package/dist/build.js.map +3 -3
- package/dist/index.js +417 -385
- package/dist/index.js.map +3 -3
- package/dist/src/build/parseVueSpaRoutes.d.ts +0 -15
- package/package.json +1 -1
package/dist/build.js
CHANGED
|
@@ -13883,23 +13883,55 @@ var init_compileSvelte = __esm(() => {
|
|
|
13883
13883
|
});
|
|
13884
13884
|
|
|
13885
13885
|
// src/build/parseVueSpaRoutes.ts
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
if (
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
13892
|
-
|
|
13893
|
-
const [, path, importPath] = match;
|
|
13894
|
-
if (path && importPath)
|
|
13895
|
-
entries.push({ importPath, path });
|
|
13886
|
+
import ts11 from "typescript";
|
|
13887
|
+
var propertyName = (node) => ts11.isIdentifier(node) || ts11.isStringLiteralLike(node) ? node.text : null, stringValue = (node) => ts11.isStringLiteralLike(node) ? node.text : null, findVueImport = (node) => {
|
|
13888
|
+
if (ts11.isCallExpression(node) && node.expression.kind === ts11.SyntaxKind.ImportKeyword) {
|
|
13889
|
+
const [specifier] = node.arguments;
|
|
13890
|
+
if (specifier && ts11.isStringLiteralLike(specifier)) {
|
|
13891
|
+
return specifier.text.endsWith(".vue") ? specifier.text : null;
|
|
13892
|
+
}
|
|
13896
13893
|
}
|
|
13894
|
+
let found = null;
|
|
13895
|
+
ts11.forEachChild(node, (child) => {
|
|
13896
|
+
if (found === null)
|
|
13897
|
+
found = findVueImport(child);
|
|
13898
|
+
});
|
|
13899
|
+
return found;
|
|
13900
|
+
}, parseRoute = (node) => {
|
|
13901
|
+
if (!ts11.isObjectLiteralExpression(node))
|
|
13902
|
+
return null;
|
|
13903
|
+
let path = null;
|
|
13904
|
+
let importPath = null;
|
|
13905
|
+
for (const property of node.properties) {
|
|
13906
|
+
if (!ts11.isPropertyAssignment(property))
|
|
13907
|
+
continue;
|
|
13908
|
+
const name = propertyName(property.name);
|
|
13909
|
+
if (name === "path")
|
|
13910
|
+
path = stringValue(property.initializer);
|
|
13911
|
+
if (name === "component")
|
|
13912
|
+
importPath = findVueImport(property.initializer);
|
|
13913
|
+
}
|
|
13914
|
+
return path && importPath ? { importPath, path } : null;
|
|
13915
|
+
}, parseVueSpaRoutes = (source) => {
|
|
13916
|
+
const sourceFile = ts11.createSourceFile("absolute-vue-routes.ts", source, ts11.ScriptTarget.Latest, true, ts11.ScriptKind.TS);
|
|
13917
|
+
const entries = [];
|
|
13918
|
+
const visit = (node) => {
|
|
13919
|
+
if (ts11.isCallExpression(node) && ts11.isIdentifier(node.expression) && node.expression.text === "defineRoutes") {
|
|
13920
|
+
const [routes] = node.arguments;
|
|
13921
|
+
if (routes && ts11.isArrayLiteralExpression(routes)) {
|
|
13922
|
+
for (const element of routes.elements) {
|
|
13923
|
+
const route = parseRoute(element);
|
|
13924
|
+
if (route)
|
|
13925
|
+
entries.push(route);
|
|
13926
|
+
}
|
|
13927
|
+
}
|
|
13928
|
+
}
|
|
13929
|
+
ts11.forEachChild(node, visit);
|
|
13930
|
+
};
|
|
13931
|
+
ts11.forEachChild(sourceFile, visit);
|
|
13897
13932
|
return entries;
|
|
13898
13933
|
};
|
|
13899
|
-
var init_parseVueSpaRoutes =
|
|
13900
|
-
ROUTES_BLOCK_RE = /export\s+const\s+routes\s*=\s*defineRoutes\s*\(\s*\[([\s\S]*?)\]\s*\)\s*;?/;
|
|
13901
|
-
ROUTE_ENTRY_RE = /path:\s*['"`]([^'"`]+)['"`][\s\S]*?import\(\s*['"`]([^'"`]+\.vue)['"`]\s*\)/g;
|
|
13902
|
-
});
|
|
13934
|
+
var init_parseVueSpaRoutes = () => {};
|
|
13903
13935
|
|
|
13904
13936
|
// src/build/chainInlineSourcemaps.ts
|
|
13905
13937
|
var exports_chainInlineSourcemaps = {};
|
|
@@ -15342,14 +15374,14 @@ __export(exports_compileAngular, {
|
|
|
15342
15374
|
import { existsSync as existsSync23, readFileSync as readFileSync19, promises as fs5 } from "fs";
|
|
15343
15375
|
import { join as join30, basename as basename9, sep as sep3, dirname as dirname15, resolve as resolve21, relative as relative12 } from "path";
|
|
15344
15376
|
var {Glob: Glob6 } = globalThis.Bun;
|
|
15345
|
-
import
|
|
15377
|
+
import ts12 from "typescript";
|
|
15346
15378
|
var traceAngularPhase = async (name, fn2, metadata) => {
|
|
15347
15379
|
const tracePhase = globalThis.__absoluteBuildTracePhase;
|
|
15348
15380
|
return tracePhase ? tracePhase(`compile/angular/${name}`, fn2, metadata) : await fn2();
|
|
15349
15381
|
}, readTsconfigPathAliases = () => {
|
|
15350
15382
|
try {
|
|
15351
15383
|
const configPath2 = resolve21(process.cwd(), "tsconfig.json");
|
|
15352
|
-
const config =
|
|
15384
|
+
const config = ts12.readConfigFile(configPath2, ts12.sys.readFile).config;
|
|
15353
15385
|
const compilerOptions = config?.compilerOptions ?? {};
|
|
15354
15386
|
const baseUrl = resolve21(process.cwd(), compilerOptions.baseUrl ?? ".");
|
|
15355
15387
|
const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
|
|
@@ -15478,7 +15510,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
15478
15510
|
return resolve21(import.meta.dir, "./dev/client");
|
|
15479
15511
|
}, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
|
|
15480
15512
|
try {
|
|
15481
|
-
return
|
|
15513
|
+
return ts12.flattenDiagnosticMessageText(diagnostic.messageText, `
|
|
15482
15514
|
`);
|
|
15483
15515
|
} catch {
|
|
15484
15516
|
return String(diagnostic.messageText || "Unknown error");
|
|
@@ -15486,7 +15518,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
15486
15518
|
}, throwOnCompilationErrors = (diagnostics) => {
|
|
15487
15519
|
if (!diagnostics?.length)
|
|
15488
15520
|
return;
|
|
15489
|
-
const errors = diagnostics.filter((diag) => diag.category ===
|
|
15521
|
+
const errors = diagnostics.filter((diag) => diag.category === ts12.DiagnosticCategory.Error);
|
|
15490
15522
|
if (!errors.length)
|
|
15491
15523
|
return;
|
|
15492
15524
|
const fullMessage = errors.map(formatDiagnosticMessage).join(`
|
|
@@ -15528,22 +15560,22 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
15528
15560
|
}
|
|
15529
15561
|
return `${path}.js${query}`;
|
|
15530
15562
|
}, isRelativeModuleSpecifier = (specifier) => specifier.startsWith("./") || specifier.startsWith("../"), extractLocalImportSpecifiers = (source, fileName) => {
|
|
15531
|
-
const sourceFile =
|
|
15563
|
+
const sourceFile = ts12.createSourceFile(fileName, source, ts12.ScriptTarget.Latest, true, ts12.ScriptKind.TS);
|
|
15532
15564
|
const specifiers = [];
|
|
15533
15565
|
const addSpecifier = (node) => {
|
|
15534
|
-
if (!node || !
|
|
15566
|
+
if (!node || !ts12.isStringLiteralLike(node))
|
|
15535
15567
|
return;
|
|
15536
15568
|
const specifier = node.text;
|
|
15537
15569
|
if (isRelativeModuleSpecifier(specifier))
|
|
15538
15570
|
specifiers.push(specifier);
|
|
15539
15571
|
};
|
|
15540
15572
|
const visit = (node) => {
|
|
15541
|
-
if (
|
|
15573
|
+
if (ts12.isImportDeclaration(node) || ts12.isExportDeclaration(node)) {
|
|
15542
15574
|
addSpecifier(node.moduleSpecifier);
|
|
15543
|
-
} else if (
|
|
15575
|
+
} else if (ts12.isCallExpression(node) && node.expression.kind === ts12.SyntaxKind.ImportKeyword) {
|
|
15544
15576
|
addSpecifier(node.arguments[0]);
|
|
15545
15577
|
}
|
|
15546
|
-
|
|
15578
|
+
ts12.forEachChild(node, visit);
|
|
15547
15579
|
};
|
|
15548
15580
|
visit(sourceFile);
|
|
15549
15581
|
return specifiers;
|
|
@@ -15691,25 +15723,25 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
15691
15723
|
emitDecoratorMetadata: true,
|
|
15692
15724
|
esModuleInterop: true,
|
|
15693
15725
|
experimentalDecorators: true,
|
|
15694
|
-
module:
|
|
15695
|
-
moduleResolution:
|
|
15696
|
-
newLine:
|
|
15726
|
+
module: ts12.ModuleKind.ESNext,
|
|
15727
|
+
moduleResolution: ts12.ModuleResolutionKind.Bundler,
|
|
15728
|
+
newLine: ts12.NewLineKind.LineFeed,
|
|
15697
15729
|
noLib: false,
|
|
15698
15730
|
outDir,
|
|
15699
15731
|
skipLibCheck: true,
|
|
15700
|
-
target:
|
|
15732
|
+
target: ts12.ScriptTarget.ES2022,
|
|
15701
15733
|
...config.options
|
|
15702
15734
|
};
|
|
15703
|
-
options.target =
|
|
15735
|
+
options.target = ts12.ScriptTarget.ES2022;
|
|
15704
15736
|
options.experimentalDecorators = true;
|
|
15705
15737
|
options.emitDecoratorMetadata = true;
|
|
15706
|
-
options.newLine =
|
|
15738
|
+
options.newLine = ts12.NewLineKind.LineFeed;
|
|
15707
15739
|
options.outDir = outDir;
|
|
15708
15740
|
options.noEmit = false;
|
|
15709
15741
|
options.incremental = false;
|
|
15710
15742
|
options.tsBuildInfoFile = undefined;
|
|
15711
15743
|
options.rootDir = process.cwd();
|
|
15712
|
-
const host = await traceAngularPhase("aot/create-compiler-host", () =>
|
|
15744
|
+
const host = await traceAngularPhase("aot/create-compiler-host", () => ts12.createCompilerHost(options));
|
|
15713
15745
|
const originalGetDefaultLibLocation = host.getDefaultLibLocation;
|
|
15714
15746
|
host.getDefaultLibLocation = () => tsLibDir || (originalGetDefaultLibLocation ? originalGetDefaultLibLocation() : "");
|
|
15715
15747
|
const originalGetDefaultLibFileName = host.getDefaultLibFileName;
|
|
@@ -15755,7 +15787,7 @@ var traceAngularPhase = async (name, fn2, metadata) => {
|
|
|
15755
15787
|
host.getSourceFile = (fileName, languageVersion, onError) => {
|
|
15756
15788
|
const source = transformedSources.get(resolve21(fileName));
|
|
15757
15789
|
if (source) {
|
|
15758
|
-
return
|
|
15790
|
+
return ts12.createSourceFile(fileName, source, languageVersion, true);
|
|
15759
15791
|
}
|
|
15760
15792
|
return originalGetSourceFileForCompile?.call(host, fileName, languageVersion, onError);
|
|
15761
15793
|
};
|
|
@@ -16644,18 +16676,18 @@ var init_compileAngular = __esm(() => {
|
|
|
16644
16676
|
});
|
|
16645
16677
|
|
|
16646
16678
|
// src/dev/angular/hmrImportGenerator.ts
|
|
16647
|
-
import
|
|
16679
|
+
import ts13 from "typescript";
|
|
16648
16680
|
var createHmrImportGenerator = (namespaceMap) => ({
|
|
16649
16681
|
addImport(request) {
|
|
16650
16682
|
const ns = namespaceMap.get(request.exportModuleSpecifier);
|
|
16651
16683
|
if (!ns) {
|
|
16652
16684
|
throw new Error(`HMR import generator has no namespace mapping for ${request.exportModuleSpecifier}. ` + `Add it to namespaceDependencies before calling compileHmrUpdateCallback.`);
|
|
16653
16685
|
}
|
|
16654
|
-
const namespaceId =
|
|
16686
|
+
const namespaceId = ts13.factory.createIdentifier(ns);
|
|
16655
16687
|
if (request.exportSymbolName === null) {
|
|
16656
16688
|
return namespaceId;
|
|
16657
16689
|
}
|
|
16658
|
-
return
|
|
16690
|
+
return ts13.factory.createPropertyAccessExpression(namespaceId, ts13.factory.createIdentifier(request.exportSymbolName));
|
|
16659
16691
|
}
|
|
16660
16692
|
});
|
|
16661
16693
|
var init_hmrImportGenerator = () => {};
|
|
@@ -17028,13 +17060,13 @@ var init_translator = __esm(() => {
|
|
|
17028
17060
|
});
|
|
17029
17061
|
|
|
17030
17062
|
// src/dev/angular/vendor/translator/ts_util.ts
|
|
17031
|
-
import
|
|
17063
|
+
import ts14 from "typescript";
|
|
17032
17064
|
function tsNumericExpression(value) {
|
|
17033
17065
|
if (value < 0) {
|
|
17034
|
-
const operand =
|
|
17035
|
-
return
|
|
17066
|
+
const operand = ts14.factory.createNumericLiteral(Math.abs(value));
|
|
17067
|
+
return ts14.factory.createPrefixUnaryExpression(ts14.SyntaxKind.MinusToken, operand);
|
|
17036
17068
|
}
|
|
17037
|
-
return
|
|
17069
|
+
return ts14.factory.createNumericLiteral(value);
|
|
17038
17070
|
}
|
|
17039
17071
|
var init_ts_util = __esm(() => {
|
|
17040
17072
|
/*!
|
|
@@ -17047,142 +17079,142 @@ var init_ts_util = __esm(() => {
|
|
|
17047
17079
|
});
|
|
17048
17080
|
|
|
17049
17081
|
// src/dev/angular/vendor/translator/typescript_ast_factory.ts
|
|
17050
|
-
import
|
|
17082
|
+
import ts15 from "typescript";
|
|
17051
17083
|
|
|
17052
17084
|
class TypeScriptAstFactory {
|
|
17053
17085
|
annotateForClosureCompiler;
|
|
17054
17086
|
externalSourceFiles = new Map;
|
|
17055
17087
|
UNARY_OPERATORS = /* @__PURE__ */ (() => ({
|
|
17056
|
-
"+":
|
|
17057
|
-
"-":
|
|
17058
|
-
"!":
|
|
17088
|
+
"+": ts15.SyntaxKind.PlusToken,
|
|
17089
|
+
"-": ts15.SyntaxKind.MinusToken,
|
|
17090
|
+
"!": ts15.SyntaxKind.ExclamationToken
|
|
17059
17091
|
}))();
|
|
17060
17092
|
BINARY_OPERATORS = /* @__PURE__ */ (() => ({
|
|
17061
|
-
"&&":
|
|
17062
|
-
">":
|
|
17063
|
-
">=":
|
|
17064
|
-
"&":
|
|
17065
|
-
"|":
|
|
17066
|
-
"/":
|
|
17067
|
-
"==":
|
|
17068
|
-
"===":
|
|
17069
|
-
"<":
|
|
17070
|
-
"<=":
|
|
17071
|
-
"-":
|
|
17072
|
-
"%":
|
|
17073
|
-
"*":
|
|
17074
|
-
"**":
|
|
17075
|
-
"!=":
|
|
17076
|
-
"!==":
|
|
17077
|
-
"||":
|
|
17078
|
-
"+":
|
|
17079
|
-
"??":
|
|
17080
|
-
"=":
|
|
17081
|
-
"+=":
|
|
17082
|
-
"-=":
|
|
17083
|
-
"*=":
|
|
17084
|
-
"/=":
|
|
17085
|
-
"%=":
|
|
17086
|
-
"**=":
|
|
17087
|
-
"&&=":
|
|
17088
|
-
"||=":
|
|
17089
|
-
"??=":
|
|
17090
|
-
in:
|
|
17091
|
-
instanceof:
|
|
17093
|
+
"&&": ts15.SyntaxKind.AmpersandAmpersandToken,
|
|
17094
|
+
">": ts15.SyntaxKind.GreaterThanToken,
|
|
17095
|
+
">=": ts15.SyntaxKind.GreaterThanEqualsToken,
|
|
17096
|
+
"&": ts15.SyntaxKind.AmpersandToken,
|
|
17097
|
+
"|": ts15.SyntaxKind.BarToken,
|
|
17098
|
+
"/": ts15.SyntaxKind.SlashToken,
|
|
17099
|
+
"==": ts15.SyntaxKind.EqualsEqualsToken,
|
|
17100
|
+
"===": ts15.SyntaxKind.EqualsEqualsEqualsToken,
|
|
17101
|
+
"<": ts15.SyntaxKind.LessThanToken,
|
|
17102
|
+
"<=": ts15.SyntaxKind.LessThanEqualsToken,
|
|
17103
|
+
"-": ts15.SyntaxKind.MinusToken,
|
|
17104
|
+
"%": ts15.SyntaxKind.PercentToken,
|
|
17105
|
+
"*": ts15.SyntaxKind.AsteriskToken,
|
|
17106
|
+
"**": ts15.SyntaxKind.AsteriskAsteriskToken,
|
|
17107
|
+
"!=": ts15.SyntaxKind.ExclamationEqualsToken,
|
|
17108
|
+
"!==": ts15.SyntaxKind.ExclamationEqualsEqualsToken,
|
|
17109
|
+
"||": ts15.SyntaxKind.BarBarToken,
|
|
17110
|
+
"+": ts15.SyntaxKind.PlusToken,
|
|
17111
|
+
"??": ts15.SyntaxKind.QuestionQuestionToken,
|
|
17112
|
+
"=": ts15.SyntaxKind.EqualsToken,
|
|
17113
|
+
"+=": ts15.SyntaxKind.PlusEqualsToken,
|
|
17114
|
+
"-=": ts15.SyntaxKind.MinusEqualsToken,
|
|
17115
|
+
"*=": ts15.SyntaxKind.AsteriskEqualsToken,
|
|
17116
|
+
"/=": ts15.SyntaxKind.SlashEqualsToken,
|
|
17117
|
+
"%=": ts15.SyntaxKind.PercentEqualsToken,
|
|
17118
|
+
"**=": ts15.SyntaxKind.AsteriskAsteriskEqualsToken,
|
|
17119
|
+
"&&=": ts15.SyntaxKind.AmpersandAmpersandEqualsToken,
|
|
17120
|
+
"||=": ts15.SyntaxKind.BarBarEqualsToken,
|
|
17121
|
+
"??=": ts15.SyntaxKind.QuestionQuestionEqualsToken,
|
|
17122
|
+
in: ts15.SyntaxKind.InKeyword,
|
|
17123
|
+
instanceof: ts15.SyntaxKind.InstanceOfKeyword
|
|
17092
17124
|
}))();
|
|
17093
17125
|
VAR_TYPES = /* @__PURE__ */ (() => ({
|
|
17094
|
-
const:
|
|
17095
|
-
let:
|
|
17096
|
-
var:
|
|
17126
|
+
const: ts15.NodeFlags.Const,
|
|
17127
|
+
let: ts15.NodeFlags.Let,
|
|
17128
|
+
var: ts15.NodeFlags.None
|
|
17097
17129
|
}))();
|
|
17098
17130
|
constructor(annotateForClosureCompiler) {
|
|
17099
17131
|
this.annotateForClosureCompiler = annotateForClosureCompiler;
|
|
17100
17132
|
}
|
|
17101
17133
|
attachComments = attachComments;
|
|
17102
|
-
createArrayLiteral =
|
|
17134
|
+
createArrayLiteral = ts15.factory.createArrayLiteralExpression;
|
|
17103
17135
|
createAssignment(target, operator, value) {
|
|
17104
|
-
return
|
|
17136
|
+
return ts15.factory.createBinaryExpression(target, this.BINARY_OPERATORS[operator], value);
|
|
17105
17137
|
}
|
|
17106
17138
|
createBinaryExpression(leftOperand, operator, rightOperand) {
|
|
17107
|
-
return
|
|
17139
|
+
return ts15.factory.createBinaryExpression(leftOperand, this.BINARY_OPERATORS[operator], rightOperand);
|
|
17108
17140
|
}
|
|
17109
17141
|
createBlock(body) {
|
|
17110
|
-
return
|
|
17142
|
+
return ts15.factory.createBlock(body);
|
|
17111
17143
|
}
|
|
17112
17144
|
createCallExpression(callee, args, pure) {
|
|
17113
|
-
const call =
|
|
17145
|
+
const call = ts15.factory.createCallExpression(callee, undefined, args);
|
|
17114
17146
|
if (pure) {
|
|
17115
|
-
|
|
17147
|
+
ts15.addSyntheticLeadingComment(call, ts15.SyntaxKind.MultiLineCommentTrivia, this.annotateForClosureCompiler ? "* @pureOrBreakMyCode " /* CLOSURE */ : "@__PURE__" /* TERSER */, false);
|
|
17116
17148
|
}
|
|
17117
17149
|
return call;
|
|
17118
17150
|
}
|
|
17119
17151
|
createConditional(condition, whenTrue, whenFalse) {
|
|
17120
|
-
return
|
|
17152
|
+
return ts15.factory.createConditionalExpression(condition, undefined, whenTrue, undefined, whenFalse);
|
|
17121
17153
|
}
|
|
17122
|
-
createElementAccess =
|
|
17123
|
-
createExpressionStatement =
|
|
17154
|
+
createElementAccess = ts15.factory.createElementAccessExpression;
|
|
17155
|
+
createExpressionStatement = ts15.factory.createExpressionStatement;
|
|
17124
17156
|
createDynamicImport(url) {
|
|
17125
|
-
return
|
|
17126
|
-
typeof url === "string" ?
|
|
17157
|
+
return ts15.factory.createCallExpression(ts15.factory.createToken(ts15.SyntaxKind.ImportKeyword), undefined, [
|
|
17158
|
+
typeof url === "string" ? ts15.factory.createStringLiteral(url) : url
|
|
17127
17159
|
]);
|
|
17128
17160
|
}
|
|
17129
17161
|
createFunctionDeclaration(functionName, parameters, body) {
|
|
17130
|
-
if (!
|
|
17131
|
-
throw new Error(`Invalid syntax, expected a block, but got ${
|
|
17162
|
+
if (!ts15.isBlock(body)) {
|
|
17163
|
+
throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
|
|
17132
17164
|
}
|
|
17133
|
-
return
|
|
17165
|
+
return ts15.factory.createFunctionDeclaration(undefined, undefined, functionName, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
|
|
17134
17166
|
}
|
|
17135
17167
|
createFunctionExpression(functionName, parameters, body) {
|
|
17136
|
-
if (!
|
|
17137
|
-
throw new Error(`Invalid syntax, expected a block, but got ${
|
|
17168
|
+
if (!ts15.isBlock(body)) {
|
|
17169
|
+
throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
|
|
17138
17170
|
}
|
|
17139
|
-
return
|
|
17171
|
+
return ts15.factory.createFunctionExpression(undefined, undefined, functionName ?? undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, body);
|
|
17140
17172
|
}
|
|
17141
17173
|
createArrowFunctionExpression(parameters, body) {
|
|
17142
|
-
if (
|
|
17143
|
-
throw new Error(`Invalid syntax, expected a block, but got ${
|
|
17174
|
+
if (ts15.isStatement(body) && !ts15.isBlock(body)) {
|
|
17175
|
+
throw new Error(`Invalid syntax, expected a block, but got ${ts15.SyntaxKind[body.kind]}.`);
|
|
17144
17176
|
}
|
|
17145
|
-
return
|
|
17177
|
+
return ts15.factory.createArrowFunction(undefined, undefined, parameters.map((param) => this.createParameter(param)), undefined, undefined, body);
|
|
17146
17178
|
}
|
|
17147
17179
|
createParameter(param) {
|
|
17148
|
-
return
|
|
17180
|
+
return ts15.factory.createParameterDeclaration(undefined, undefined, param.name, undefined, param.type ?? undefined);
|
|
17149
17181
|
}
|
|
17150
|
-
createIdentifier =
|
|
17182
|
+
createIdentifier = ts15.factory.createIdentifier;
|
|
17151
17183
|
createIfStatement(condition, thenStatement, elseStatement) {
|
|
17152
|
-
return
|
|
17184
|
+
return ts15.factory.createIfStatement(condition, thenStatement, elseStatement ?? undefined);
|
|
17153
17185
|
}
|
|
17154
17186
|
createLiteral(value) {
|
|
17155
17187
|
if (value === undefined) {
|
|
17156
|
-
return
|
|
17188
|
+
return ts15.factory.createIdentifier("undefined");
|
|
17157
17189
|
} else if (value === null) {
|
|
17158
|
-
return
|
|
17190
|
+
return ts15.factory.createNull();
|
|
17159
17191
|
} else if (typeof value === "boolean") {
|
|
17160
|
-
return value ?
|
|
17192
|
+
return value ? ts15.factory.createTrue() : ts15.factory.createFalse();
|
|
17161
17193
|
} else if (typeof value === "number") {
|
|
17162
17194
|
return tsNumericExpression(value);
|
|
17163
17195
|
} else {
|
|
17164
|
-
return
|
|
17196
|
+
return ts15.factory.createStringLiteral(value);
|
|
17165
17197
|
}
|
|
17166
17198
|
}
|
|
17167
17199
|
createNewExpression(expression, args) {
|
|
17168
|
-
return
|
|
17200
|
+
return ts15.factory.createNewExpression(expression, undefined, args);
|
|
17169
17201
|
}
|
|
17170
17202
|
createObjectLiteral(properties) {
|
|
17171
|
-
return
|
|
17203
|
+
return ts15.factory.createObjectLiteralExpression(properties.map((prop) => {
|
|
17172
17204
|
if (prop.kind === "spread") {
|
|
17173
|
-
return
|
|
17205
|
+
return ts15.factory.createSpreadAssignment(prop.expression);
|
|
17174
17206
|
}
|
|
17175
|
-
return
|
|
17207
|
+
return ts15.factory.createPropertyAssignment(prop.quoted ? ts15.factory.createStringLiteral(prop.propertyName) : ts15.factory.createIdentifier(prop.propertyName), prop.value);
|
|
17176
17208
|
}));
|
|
17177
17209
|
}
|
|
17178
|
-
createParenthesizedExpression =
|
|
17179
|
-
createPropertyAccess =
|
|
17180
|
-
createSpreadElement =
|
|
17210
|
+
createParenthesizedExpression = ts15.factory.createParenthesizedExpression;
|
|
17211
|
+
createPropertyAccess = ts15.factory.createPropertyAccessExpression;
|
|
17212
|
+
createSpreadElement = ts15.factory.createSpreadElement;
|
|
17181
17213
|
createReturnStatement(expression) {
|
|
17182
|
-
return
|
|
17214
|
+
return ts15.factory.createReturnStatement(expression ?? undefined);
|
|
17183
17215
|
}
|
|
17184
17216
|
createTaggedTemplate(tag, template) {
|
|
17185
|
-
return
|
|
17217
|
+
return ts15.factory.createTaggedTemplateExpression(tag, undefined, this.createTemplateLiteral(template));
|
|
17186
17218
|
}
|
|
17187
17219
|
createTemplateLiteral(template) {
|
|
17188
17220
|
let templateLiteral;
|
|
@@ -17192,7 +17224,7 @@ class TypeScriptAstFactory {
|
|
|
17192
17224
|
throw new Error("createTemplateLiteral: template has no elements");
|
|
17193
17225
|
}
|
|
17194
17226
|
if (length === 1) {
|
|
17195
|
-
templateLiteral =
|
|
17227
|
+
templateLiteral = ts15.factory.createNoSubstitutionTemplateLiteral(head.cooked, head.raw);
|
|
17196
17228
|
} else {
|
|
17197
17229
|
const spans = [];
|
|
17198
17230
|
for (let i = 1;i < length - 1; i++) {
|
|
@@ -17206,7 +17238,7 @@ class TypeScriptAstFactory {
|
|
|
17206
17238
|
if (range !== null) {
|
|
17207
17239
|
this.setSourceMapRange(middle, range);
|
|
17208
17240
|
}
|
|
17209
|
-
spans.push(
|
|
17241
|
+
spans.push(ts15.factory.createTemplateSpan(expression, middle));
|
|
17210
17242
|
}
|
|
17211
17243
|
const resolvedExpression = template.expressions[length - 2];
|
|
17212
17244
|
const templatePart = template.elements[length - 1];
|
|
@@ -17217,27 +17249,27 @@ class TypeScriptAstFactory {
|
|
|
17217
17249
|
if (templatePart.range !== null) {
|
|
17218
17250
|
this.setSourceMapRange(templateTail, templatePart.range);
|
|
17219
17251
|
}
|
|
17220
|
-
spans.push(
|
|
17221
|
-
templateLiteral =
|
|
17252
|
+
spans.push(ts15.factory.createTemplateSpan(resolvedExpression, templateTail));
|
|
17253
|
+
templateLiteral = ts15.factory.createTemplateExpression(ts15.factory.createTemplateHead(head.cooked, head.raw), spans);
|
|
17222
17254
|
}
|
|
17223
17255
|
if (head.range !== null) {
|
|
17224
17256
|
this.setSourceMapRange(templateLiteral, head.range);
|
|
17225
17257
|
}
|
|
17226
17258
|
return templateLiteral;
|
|
17227
17259
|
}
|
|
17228
|
-
createThrowStatement =
|
|
17229
|
-
createTypeOfExpression =
|
|
17230
|
-
createVoidExpression =
|
|
17260
|
+
createThrowStatement = ts15.factory.createThrowStatement;
|
|
17261
|
+
createTypeOfExpression = ts15.factory.createTypeOfExpression;
|
|
17262
|
+
createVoidExpression = ts15.factory.createVoidExpression;
|
|
17231
17263
|
createUnaryExpression(operator, operand) {
|
|
17232
|
-
return
|
|
17264
|
+
return ts15.factory.createPrefixUnaryExpression(this.UNARY_OPERATORS[operator], operand);
|
|
17233
17265
|
}
|
|
17234
17266
|
createVariableDeclaration(variableName, initializer, variableType, type) {
|
|
17235
|
-
return
|
|
17236
|
-
|
|
17267
|
+
return ts15.factory.createVariableStatement(undefined, ts15.factory.createVariableDeclarationList([
|
|
17268
|
+
ts15.factory.createVariableDeclaration(variableName, undefined, type ?? undefined, initializer ?? undefined)
|
|
17237
17269
|
], this.VAR_TYPES[variableType]));
|
|
17238
17270
|
}
|
|
17239
17271
|
createRegularExpressionLiteral(body, flags) {
|
|
17240
|
-
return
|
|
17272
|
+
return ts15.factory.createRegularExpressionLiteral(`/${body}/${flags ?? ""}`);
|
|
17241
17273
|
}
|
|
17242
17274
|
setSourceMapRange(node, sourceMapRange) {
|
|
17243
17275
|
if (sourceMapRange === null) {
|
|
@@ -17245,10 +17277,10 @@ class TypeScriptAstFactory {
|
|
|
17245
17277
|
}
|
|
17246
17278
|
const url = sourceMapRange.url;
|
|
17247
17279
|
if (!this.externalSourceFiles.has(url)) {
|
|
17248
|
-
this.externalSourceFiles.set(url,
|
|
17280
|
+
this.externalSourceFiles.set(url, ts15.createSourceMapSource(url, sourceMapRange.content, (pos) => pos));
|
|
17249
17281
|
}
|
|
17250
17282
|
const source = this.externalSourceFiles.get(url);
|
|
17251
|
-
|
|
17283
|
+
ts15.setSourceMapRange(node, {
|
|
17252
17284
|
pos: sourceMapRange.start.offset,
|
|
17253
17285
|
end: sourceMapRange.end.offset,
|
|
17254
17286
|
source
|
|
@@ -17258,77 +17290,77 @@ class TypeScriptAstFactory {
|
|
|
17258
17290
|
createBuiltInType(type) {
|
|
17259
17291
|
switch (type) {
|
|
17260
17292
|
case "any":
|
|
17261
|
-
return
|
|
17293
|
+
return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.AnyKeyword);
|
|
17262
17294
|
case "boolean":
|
|
17263
|
-
return
|
|
17295
|
+
return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.BooleanKeyword);
|
|
17264
17296
|
case "number":
|
|
17265
|
-
return
|
|
17297
|
+
return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.NumberKeyword);
|
|
17266
17298
|
case "string":
|
|
17267
|
-
return
|
|
17299
|
+
return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.StringKeyword);
|
|
17268
17300
|
case "function":
|
|
17269
|
-
return
|
|
17301
|
+
return ts15.factory.createTypeReferenceNode(ts15.factory.createIdentifier("Function"));
|
|
17270
17302
|
case "never":
|
|
17271
|
-
return
|
|
17303
|
+
return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.NeverKeyword);
|
|
17272
17304
|
case "unknown":
|
|
17273
|
-
return
|
|
17305
|
+
return ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.UnknownKeyword);
|
|
17274
17306
|
}
|
|
17275
17307
|
}
|
|
17276
17308
|
createExpressionType(expression, typeParams) {
|
|
17277
17309
|
const typeName = getEntityTypeFromExpression(expression);
|
|
17278
|
-
return
|
|
17310
|
+
return ts15.factory.createTypeReferenceNode(typeName, typeParams ?? undefined);
|
|
17279
17311
|
}
|
|
17280
17312
|
createArrayType(elementType) {
|
|
17281
|
-
return
|
|
17313
|
+
return ts15.factory.createArrayTypeNode(elementType);
|
|
17282
17314
|
}
|
|
17283
17315
|
createMapType(valueType) {
|
|
17284
|
-
return
|
|
17285
|
-
|
|
17286
|
-
|
|
17316
|
+
return ts15.factory.createTypeLiteralNode([
|
|
17317
|
+
ts15.factory.createIndexSignature(undefined, [
|
|
17318
|
+
ts15.factory.createParameterDeclaration(undefined, undefined, "key", undefined, ts15.factory.createKeywordTypeNode(ts15.SyntaxKind.StringKeyword))
|
|
17287
17319
|
], valueType)
|
|
17288
17320
|
]);
|
|
17289
17321
|
}
|
|
17290
17322
|
transplantType(type) {
|
|
17291
|
-
if (typeof type.kind === "number" && typeof type.getSourceFile === "function" &&
|
|
17323
|
+
if (typeof type.kind === "number" && typeof type.getSourceFile === "function" && ts15.isTypeNode(type)) {
|
|
17292
17324
|
return type;
|
|
17293
17325
|
}
|
|
17294
17326
|
throw new Error("Attempting to transplant a type node from a non-TypeScript AST: " + type);
|
|
17295
17327
|
}
|
|
17296
17328
|
}
|
|
17297
17329
|
function createTemplateMiddle(cooked, raw) {
|
|
17298
|
-
const node =
|
|
17299
|
-
node.kind =
|
|
17330
|
+
const node = ts15.factory.createTemplateHead(cooked, raw);
|
|
17331
|
+
node.kind = ts15.SyntaxKind.TemplateMiddle;
|
|
17300
17332
|
return node;
|
|
17301
17333
|
}
|
|
17302
17334
|
function createTemplateTail(cooked, raw) {
|
|
17303
|
-
const node =
|
|
17304
|
-
node.kind =
|
|
17335
|
+
const node = ts15.factory.createTemplateHead(cooked, raw);
|
|
17336
|
+
node.kind = ts15.SyntaxKind.TemplateTail;
|
|
17305
17337
|
return node;
|
|
17306
17338
|
}
|
|
17307
17339
|
function attachComments(statement, leadingComments) {
|
|
17308
17340
|
for (const comment of leadingComments) {
|
|
17309
|
-
const commentKind = comment.multiline ?
|
|
17341
|
+
const commentKind = comment.multiline ? ts15.SyntaxKind.MultiLineCommentTrivia : ts15.SyntaxKind.SingleLineCommentTrivia;
|
|
17310
17342
|
if (comment.multiline) {
|
|
17311
|
-
|
|
17343
|
+
ts15.addSyntheticLeadingComment(statement, commentKind, comment.toString(), comment.trailingNewline);
|
|
17312
17344
|
} else {
|
|
17313
17345
|
for (const line of comment.toString().split(`
|
|
17314
17346
|
`)) {
|
|
17315
|
-
|
|
17347
|
+
ts15.addSyntheticLeadingComment(statement, commentKind, line, comment.trailingNewline);
|
|
17316
17348
|
}
|
|
17317
17349
|
}
|
|
17318
17350
|
}
|
|
17319
17351
|
}
|
|
17320
17352
|
function getEntityTypeFromExpression(expression) {
|
|
17321
|
-
if (
|
|
17353
|
+
if (ts15.isIdentifier(expression)) {
|
|
17322
17354
|
return expression;
|
|
17323
17355
|
}
|
|
17324
|
-
if (
|
|
17356
|
+
if (ts15.isPropertyAccessExpression(expression)) {
|
|
17325
17357
|
const left = getEntityTypeFromExpression(expression.expression);
|
|
17326
|
-
if (!
|
|
17358
|
+
if (!ts15.isIdentifier(expression.name)) {
|
|
17327
17359
|
throw new Error(`Unsupported property access for type reference: ${expression.name.text}`);
|
|
17328
17360
|
}
|
|
17329
|
-
return
|
|
17361
|
+
return ts15.factory.createQualifiedName(left, expression.name);
|
|
17330
17362
|
}
|
|
17331
|
-
throw new Error(`Unsupported expression for type reference: ${
|
|
17363
|
+
throw new Error(`Unsupported expression for type reference: ${ts15.SyntaxKind[expression.kind]}`);
|
|
17332
17364
|
}
|
|
17333
17365
|
var init_typescript_ast_factory = __esm(() => {
|
|
17334
17366
|
init_ts_util();
|
|
@@ -17363,7 +17395,7 @@ __export(exports_fastHmrCompiler, {
|
|
|
17363
17395
|
});
|
|
17364
17396
|
import { existsSync as existsSync24, readFileSync as readFileSync20, statSync as statSync2 } from "fs";
|
|
17365
17397
|
import { dirname as dirname16, extname as extname7, relative as relative13, resolve as resolve22 } from "path";
|
|
17366
|
-
import
|
|
17398
|
+
import ts16 from "typescript";
|
|
17367
17399
|
var fail = (reason, detail, location) => ({
|
|
17368
17400
|
ok: false,
|
|
17369
17401
|
reason,
|
|
@@ -17448,23 +17480,23 @@ var fail = (reason, detail, location) => ({
|
|
|
17448
17480
|
}
|
|
17449
17481
|
let sourceFile;
|
|
17450
17482
|
try {
|
|
17451
|
-
sourceFile =
|
|
17483
|
+
sourceFile = ts16.createSourceFile(componentFilePath, source, ts16.ScriptTarget.Latest, true, ts16.ScriptKind.TS);
|
|
17452
17484
|
} catch {
|
|
17453
17485
|
return;
|
|
17454
17486
|
}
|
|
17455
17487
|
for (const stmt of sourceFile.statements) {
|
|
17456
|
-
if (!
|
|
17488
|
+
if (!ts16.isClassDeclaration(stmt))
|
|
17457
17489
|
continue;
|
|
17458
17490
|
const className = stmt.name?.text;
|
|
17459
17491
|
if (!className)
|
|
17460
17492
|
continue;
|
|
17461
|
-
const decorators =
|
|
17493
|
+
const decorators = ts16.getDecorators(stmt) ?? [];
|
|
17462
17494
|
const decoratorName = (() => {
|
|
17463
17495
|
for (const d2 of decorators) {
|
|
17464
|
-
if (!
|
|
17496
|
+
if (!ts16.isCallExpression(d2.expression))
|
|
17465
17497
|
continue;
|
|
17466
17498
|
const expr = d2.expression.expression;
|
|
17467
|
-
if (!
|
|
17499
|
+
if (!ts16.isIdentifier(expr))
|
|
17468
17500
|
continue;
|
|
17469
17501
|
if (expr.text === "Component" || expr.text === "Directive" || expr.text === "Pipe" || expr.text === "Injectable") {
|
|
17470
17502
|
return expr.text;
|
|
@@ -17478,16 +17510,16 @@ var fail = (reason, detail, location) => ({
|
|
|
17478
17510
|
const id = encodeURIComponent(`${projectRel}@${className}`);
|
|
17479
17511
|
if (decoratorName === "Component") {
|
|
17480
17512
|
const componentDecorator = decorators.find((d2) => {
|
|
17481
|
-
if (!
|
|
17513
|
+
if (!ts16.isCallExpression(d2.expression))
|
|
17482
17514
|
return false;
|
|
17483
17515
|
const expr = d2.expression.expression;
|
|
17484
|
-
return
|
|
17516
|
+
return ts16.isIdentifier(expr) && expr.text === "Component";
|
|
17485
17517
|
});
|
|
17486
17518
|
if (!componentDecorator)
|
|
17487
17519
|
continue;
|
|
17488
17520
|
const decoratorCall = componentDecorator.expression;
|
|
17489
17521
|
const args = decoratorCall.arguments[0];
|
|
17490
|
-
if (!args || !
|
|
17522
|
+
if (!args || !ts16.isObjectLiteralExpression(args))
|
|
17491
17523
|
continue;
|
|
17492
17524
|
const decoratorMeta = readDecoratorMeta(args);
|
|
17493
17525
|
const { inputs, outputs } = extractInputsAndOutputs(stmt, null);
|
|
@@ -17520,11 +17552,11 @@ var fail = (reason, detail, location) => ({
|
|
|
17520
17552
|
return false;
|
|
17521
17553
|
return true;
|
|
17522
17554
|
}, ENTITY_DECORATOR_NAMES, findEntityDecorator = (cls) => {
|
|
17523
|
-
for (const dec of
|
|
17555
|
+
for (const dec of ts16.getDecorators(cls) ?? []) {
|
|
17524
17556
|
const expr = dec.expression;
|
|
17525
|
-
if (!
|
|
17557
|
+
if (!ts16.isCallExpression(expr))
|
|
17526
17558
|
continue;
|
|
17527
|
-
if (!
|
|
17559
|
+
if (!ts16.isIdentifier(expr.expression))
|
|
17528
17560
|
continue;
|
|
17529
17561
|
if (ENTITY_DECORATOR_NAMES.has(expr.expression.text))
|
|
17530
17562
|
return dec;
|
|
@@ -17542,18 +17574,18 @@ var fail = (reason, detail, location) => ({
|
|
|
17542
17574
|
}
|
|
17543
17575
|
const ctorParamTypes = [];
|
|
17544
17576
|
for (const member of cls.members) {
|
|
17545
|
-
if (!
|
|
17577
|
+
if (!ts16.isConstructorDeclaration(member))
|
|
17546
17578
|
continue;
|
|
17547
17579
|
for (const param of member.parameters) {
|
|
17548
17580
|
const typeText = param.type ? param.type.getText() : "";
|
|
17549
|
-
const decorators =
|
|
17581
|
+
const decorators = ts16.getDecorators(param) ?? [];
|
|
17550
17582
|
const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
|
|
17551
17583
|
const e = d2.expression;
|
|
17552
|
-
if (
|
|
17584
|
+
if (ts16.isCallExpression(e) && ts16.isIdentifier(e.expression)) {
|
|
17553
17585
|
const args = e.arguments.map((a) => a.getText()).join(",");
|
|
17554
17586
|
return `@${e.expression.text}(${args})`;
|
|
17555
17587
|
}
|
|
17556
|
-
if (
|
|
17588
|
+
if (ts16.isIdentifier(e))
|
|
17557
17589
|
return `@${e.text}`;
|
|
17558
17590
|
return "@<unknown>";
|
|
17559
17591
|
}).join("");
|
|
@@ -17575,23 +17607,23 @@ var fail = (reason, detail, location) => ({
|
|
|
17575
17607
|
const walk = (node) => {
|
|
17576
17608
|
if (found)
|
|
17577
17609
|
return;
|
|
17578
|
-
if (
|
|
17610
|
+
if (ts16.isClassDeclaration(node) && node.name?.text === className) {
|
|
17579
17611
|
found = node;
|
|
17580
17612
|
return;
|
|
17581
17613
|
}
|
|
17582
|
-
|
|
17614
|
+
ts16.forEachChild(node, walk);
|
|
17583
17615
|
};
|
|
17584
17616
|
walk(sourceFile);
|
|
17585
17617
|
return found;
|
|
17586
17618
|
}, getClassDecorators = (cls) => {
|
|
17587
|
-
const modifiers =
|
|
17619
|
+
const modifiers = ts16.getDecorators(cls) ?? [];
|
|
17588
17620
|
return [...modifiers];
|
|
17589
17621
|
}, findComponentDecorator = (cls) => {
|
|
17590
17622
|
for (const decorator of getClassDecorators(cls)) {
|
|
17591
17623
|
const expr = decorator.expression;
|
|
17592
|
-
if (
|
|
17624
|
+
if (ts16.isCallExpression(expr)) {
|
|
17593
17625
|
const fn2 = expr.expression;
|
|
17594
|
-
if (
|
|
17626
|
+
if (ts16.isIdentifier(fn2) && fn2.text === "Component") {
|
|
17595
17627
|
return decorator;
|
|
17596
17628
|
}
|
|
17597
17629
|
}
|
|
@@ -17599,15 +17631,15 @@ var fail = (reason, detail, location) => ({
|
|
|
17599
17631
|
return null;
|
|
17600
17632
|
}, getDecoratorArgsObject = (decorator) => {
|
|
17601
17633
|
const call = decorator.expression;
|
|
17602
|
-
if (!
|
|
17634
|
+
if (!ts16.isCallExpression(call))
|
|
17603
17635
|
return null;
|
|
17604
17636
|
const arg = call.arguments[0];
|
|
17605
|
-
if (!arg || !
|
|
17637
|
+
if (!arg || !ts16.isObjectLiteralExpression(arg))
|
|
17606
17638
|
return null;
|
|
17607
17639
|
return arg;
|
|
17608
17640
|
}, getProperty = (obj, name) => {
|
|
17609
17641
|
for (const prop of obj.properties) {
|
|
17610
|
-
if (
|
|
17642
|
+
if (ts16.isPropertyAssignment(prop) && (ts16.isIdentifier(prop.name) && prop.name.text === name || ts16.isStringLiteral(prop.name) && prop.name.text === name)) {
|
|
17611
17643
|
return prop.initializer;
|
|
17612
17644
|
}
|
|
17613
17645
|
}
|
|
@@ -17616,7 +17648,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17616
17648
|
const expr = getProperty(obj, name);
|
|
17617
17649
|
if (!expr)
|
|
17618
17650
|
return null;
|
|
17619
|
-
if (
|
|
17651
|
+
if (ts16.isStringLiteral(expr) || ts16.isNoSubstitutionTemplateLiteral(expr)) {
|
|
17620
17652
|
return expr.text;
|
|
17621
17653
|
}
|
|
17622
17654
|
return null;
|
|
@@ -17624,22 +17656,22 @@ var fail = (reason, detail, location) => ({
|
|
|
17624
17656
|
const expr = getProperty(obj, name);
|
|
17625
17657
|
if (!expr)
|
|
17626
17658
|
return null;
|
|
17627
|
-
if (expr.kind ===
|
|
17659
|
+
if (expr.kind === ts16.SyntaxKind.TrueKeyword)
|
|
17628
17660
|
return true;
|
|
17629
|
-
if (expr.kind ===
|
|
17661
|
+
if (expr.kind === ts16.SyntaxKind.FalseKeyword)
|
|
17630
17662
|
return false;
|
|
17631
17663
|
return null;
|
|
17632
17664
|
}, isAngularDecoratorIdentifier = (name) => name === "Component" || name === "Directive" || name === "Pipe" || name === "Injectable", classHasAngularDecorator = (cls) => {
|
|
17633
|
-
for (const dec of
|
|
17665
|
+
for (const dec of ts16.getDecorators(cls) ?? []) {
|
|
17634
17666
|
const expr = dec.expression;
|
|
17635
|
-
if (
|
|
17667
|
+
if (ts16.isCallExpression(expr) && ts16.isIdentifier(expr.expression) && isAngularDecoratorIdentifier(expr.expression.text)) {
|
|
17636
17668
|
return true;
|
|
17637
17669
|
}
|
|
17638
17670
|
}
|
|
17639
17671
|
return false;
|
|
17640
17672
|
}, findClassInSourceFile = (sf, className) => {
|
|
17641
17673
|
for (const stmt of sf.statements) {
|
|
17642
|
-
if (
|
|
17674
|
+
if (ts16.isClassDeclaration(stmt) && stmt.name?.text === className) {
|
|
17643
17675
|
return stmt;
|
|
17644
17676
|
}
|
|
17645
17677
|
}
|
|
@@ -17649,15 +17681,15 @@ var fail = (reason, detail, location) => ({
|
|
|
17649
17681
|
if (sameFile)
|
|
17650
17682
|
return classHasAngularDecorator(sameFile);
|
|
17651
17683
|
for (const stmt of sourceFile.statements) {
|
|
17652
|
-
if (!
|
|
17684
|
+
if (!ts16.isImportDeclaration(stmt))
|
|
17653
17685
|
continue;
|
|
17654
|
-
if (!
|
|
17686
|
+
if (!ts16.isStringLiteral(stmt.moduleSpecifier))
|
|
17655
17687
|
continue;
|
|
17656
17688
|
const clause = stmt.importClause;
|
|
17657
17689
|
if (!clause || clause.isTypeOnly)
|
|
17658
17690
|
continue;
|
|
17659
17691
|
const named = clause.namedBindings;
|
|
17660
|
-
if (!named || !
|
|
17692
|
+
if (!named || !ts16.isNamedImports(named))
|
|
17661
17693
|
continue;
|
|
17662
17694
|
const found = named.elements.find((el) => el.name.text === parentClassName);
|
|
17663
17695
|
if (!found)
|
|
@@ -17682,7 +17714,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17682
17714
|
} catch {
|
|
17683
17715
|
continue;
|
|
17684
17716
|
}
|
|
17685
|
-
const parentSf =
|
|
17717
|
+
const parentSf = ts16.createSourceFile(candidate, content, ts16.ScriptTarget.Latest, true);
|
|
17686
17718
|
const parentCls = findClassInSourceFile(parentSf, parentClassName);
|
|
17687
17719
|
if (!parentCls)
|
|
17688
17720
|
continue;
|
|
@@ -17694,11 +17726,11 @@ var fail = (reason, detail, location) => ({
|
|
|
17694
17726
|
}, inheritsDecoratedClass = (cls, sourceFile, componentDir, projectRoot) => {
|
|
17695
17727
|
const heritage = cls.heritageClauses ?? [];
|
|
17696
17728
|
for (const clause of heritage) {
|
|
17697
|
-
if (clause.token !==
|
|
17729
|
+
if (clause.token !== ts16.SyntaxKind.ExtendsKeyword)
|
|
17698
17730
|
continue;
|
|
17699
17731
|
for (const typeNode of clause.types) {
|
|
17700
17732
|
const expr = typeNode.expression;
|
|
17701
|
-
if (!
|
|
17733
|
+
if (!ts16.isIdentifier(expr)) {
|
|
17702
17734
|
return true;
|
|
17703
17735
|
}
|
|
17704
17736
|
if (parentHasAngularDecoratorAcrossFiles(expr.text, sourceFile, componentDir, projectRoot)) {
|
|
@@ -17709,18 +17741,18 @@ var fail = (reason, detail, location) => ({
|
|
|
17709
17741
|
return false;
|
|
17710
17742
|
}, CONTROL_CREATE_METHOD_NAME = "\u0275ngControlCreate", extractControlCreate = (cls) => {
|
|
17711
17743
|
for (const member of cls.members) {
|
|
17712
|
-
if (!
|
|
17744
|
+
if (!ts16.isMethodDeclaration(member))
|
|
17713
17745
|
continue;
|
|
17714
|
-
if (member.modifiers?.some((m) => m.kind ===
|
|
17746
|
+
if (member.modifiers?.some((m) => m.kind === ts16.SyntaxKind.StaticKeyword))
|
|
17715
17747
|
continue;
|
|
17716
17748
|
const { name } = member;
|
|
17717
17749
|
if (name === undefined)
|
|
17718
17750
|
continue;
|
|
17719
|
-
const nameText =
|
|
17751
|
+
const nameText = ts16.isIdentifier(name) ? name.text : name.getText();
|
|
17720
17752
|
if (nameText !== CONTROL_CREATE_METHOD_NAME)
|
|
17721
17753
|
continue;
|
|
17722
17754
|
const firstParam = member.parameters[0];
|
|
17723
|
-
if (firstParam === undefined || firstParam.type === undefined || !
|
|
17755
|
+
if (firstParam === undefined || firstParam.type === undefined || !ts16.isTypeReferenceNode(firstParam.type)) {
|
|
17724
17756
|
return { passThroughInput: null };
|
|
17725
17757
|
}
|
|
17726
17758
|
const typeArgs = firstParam.type.typeArguments;
|
|
@@ -17728,16 +17760,16 @@ var fail = (reason, detail, location) => ({
|
|
|
17728
17760
|
return { passThroughInput: null };
|
|
17729
17761
|
}
|
|
17730
17762
|
const arg = typeArgs[0];
|
|
17731
|
-
if (arg === undefined || !
|
|
17763
|
+
if (arg === undefined || !ts16.isLiteralTypeNode(arg) || !ts16.isStringLiteral(arg.literal)) {
|
|
17732
17764
|
return { passThroughInput: null };
|
|
17733
17765
|
}
|
|
17734
17766
|
return { passThroughInput: arg.literal.text };
|
|
17735
17767
|
}
|
|
17736
17768
|
return null;
|
|
17737
17769
|
}, resolveEnumPropertyAccess = (expr, enumName, values) => {
|
|
17738
|
-
if (!
|
|
17770
|
+
if (!ts16.isPropertyAccessExpression(expr))
|
|
17739
17771
|
return null;
|
|
17740
|
-
if (!
|
|
17772
|
+
if (!ts16.isIdentifier(expr.expression))
|
|
17741
17773
|
return null;
|
|
17742
17774
|
if (expr.expression.text !== enumName)
|
|
17743
17775
|
return null;
|
|
@@ -17756,21 +17788,21 @@ var fail = (reason, detail, location) => ({
|
|
|
17756
17788
|
const hostExpr = getProperty(args, "host");
|
|
17757
17789
|
const schemasExpr = getProperty(args, "schemas");
|
|
17758
17790
|
const styleUrls = [];
|
|
17759
|
-
if (styleUrlsExpr &&
|
|
17791
|
+
if (styleUrlsExpr && ts16.isArrayLiteralExpression(styleUrlsExpr)) {
|
|
17760
17792
|
for (const el of styleUrlsExpr.elements) {
|
|
17761
|
-
if (
|
|
17793
|
+
if (ts16.isStringLiteral(el))
|
|
17762
17794
|
styleUrls.push(el.text);
|
|
17763
17795
|
}
|
|
17764
17796
|
}
|
|
17765
17797
|
const styles = [];
|
|
17766
17798
|
if (stylesExpr) {
|
|
17767
|
-
if (
|
|
17799
|
+
if (ts16.isArrayLiteralExpression(stylesExpr)) {
|
|
17768
17800
|
for (const el of stylesExpr.elements) {
|
|
17769
|
-
if (
|
|
17801
|
+
if (ts16.isStringLiteral(el) || ts16.isNoSubstitutionTemplateLiteral(el)) {
|
|
17770
17802
|
styles.push(el.text);
|
|
17771
17803
|
}
|
|
17772
17804
|
}
|
|
17773
|
-
} else if (
|
|
17805
|
+
} else if (ts16.isStringLiteral(stylesExpr) || ts16.isNoSubstitutionTemplateLiteral(stylesExpr)) {
|
|
17774
17806
|
styles.push(stylesExpr.text);
|
|
17775
17807
|
}
|
|
17776
17808
|
}
|
|
@@ -17783,15 +17815,15 @@ var fail = (reason, detail, location) => ({
|
|
|
17783
17815
|
encapsulation,
|
|
17784
17816
|
hasProviders: getProperty(args, "providers") !== null,
|
|
17785
17817
|
hasViewProviders: getProperty(args, "viewProviders") !== null,
|
|
17786
|
-
importsExpr: importsExpr &&
|
|
17787
|
-
hostDirectivesExpr: hostDirectivesExpr &&
|
|
17788
|
-
animationsExpr: animationsExpr &&
|
|
17789
|
-
providersExpr: providersExpr &&
|
|
17790
|
-
viewProvidersExpr: viewProvidersExpr &&
|
|
17791
|
-
inputsArrayExpr: inputsArrayExpr &&
|
|
17792
|
-
outputsArrayExpr: outputsArrayExpr &&
|
|
17793
|
-
hostExpr: hostExpr &&
|
|
17794
|
-
schemasExpr: schemasExpr &&
|
|
17818
|
+
importsExpr: importsExpr && ts16.isArrayLiteralExpression(importsExpr) ? importsExpr : null,
|
|
17819
|
+
hostDirectivesExpr: hostDirectivesExpr && ts16.isArrayLiteralExpression(hostDirectivesExpr) ? hostDirectivesExpr : null,
|
|
17820
|
+
animationsExpr: animationsExpr && ts16.isArrayLiteralExpression(animationsExpr) ? animationsExpr : null,
|
|
17821
|
+
providersExpr: providersExpr && ts16.isArrayLiteralExpression(providersExpr) ? providersExpr : null,
|
|
17822
|
+
viewProvidersExpr: viewProvidersExpr && ts16.isArrayLiteralExpression(viewProvidersExpr) ? viewProvidersExpr : null,
|
|
17823
|
+
inputsArrayExpr: inputsArrayExpr && ts16.isArrayLiteralExpression(inputsArrayExpr) ? inputsArrayExpr : null,
|
|
17824
|
+
outputsArrayExpr: outputsArrayExpr && ts16.isArrayLiteralExpression(outputsArrayExpr) ? outputsArrayExpr : null,
|
|
17825
|
+
hostExpr: hostExpr && ts16.isObjectLiteralExpression(hostExpr) ? hostExpr : null,
|
|
17826
|
+
schemasExpr: schemasExpr && ts16.isArrayLiteralExpression(schemasExpr) ? schemasExpr : null,
|
|
17795
17827
|
preserveWhitespaces: getBooleanProperty(args, "preserveWhitespaces") ?? projectDefaults.preserveWhitespaces ?? false,
|
|
17796
17828
|
selector: getStringProperty(args, "selector"),
|
|
17797
17829
|
standalone: getBooleanProperty(args, "standalone") ?? true,
|
|
@@ -17802,13 +17834,13 @@ var fail = (reason, detail, location) => ({
|
|
|
17802
17834
|
templateUrl: getStringProperty(args, "templateUrl")
|
|
17803
17835
|
};
|
|
17804
17836
|
}, extractDecoratorInput = (prop, compiler) => {
|
|
17805
|
-
const decorators =
|
|
17837
|
+
const decorators = ts16.getDecorators(prop) ?? [];
|
|
17806
17838
|
for (const decorator of decorators) {
|
|
17807
17839
|
const expr = decorator.expression;
|
|
17808
|
-
if (!
|
|
17840
|
+
if (!ts16.isCallExpression(expr))
|
|
17809
17841
|
continue;
|
|
17810
17842
|
const fn2 = expr.expression;
|
|
17811
|
-
if (!
|
|
17843
|
+
if (!ts16.isIdentifier(fn2) || fn2.text !== "Input")
|
|
17812
17844
|
continue;
|
|
17813
17845
|
const classPropertyName = prop.name.getText();
|
|
17814
17846
|
let bindingPropertyName = classPropertyName;
|
|
@@ -17816,9 +17848,9 @@ var fail = (reason, detail, location) => ({
|
|
|
17816
17848
|
let transformFunction = null;
|
|
17817
17849
|
const arg = expr.arguments[0];
|
|
17818
17850
|
if (arg) {
|
|
17819
|
-
if (
|
|
17851
|
+
if (ts16.isStringLiteral(arg)) {
|
|
17820
17852
|
bindingPropertyName = arg.text;
|
|
17821
|
-
} else if (
|
|
17853
|
+
} else if (ts16.isObjectLiteralExpression(arg)) {
|
|
17822
17854
|
const aliasNode = getStringProperty(arg, "alias");
|
|
17823
17855
|
if (aliasNode !== null)
|
|
17824
17856
|
bindingPropertyName = aliasNode;
|
|
@@ -17842,11 +17874,11 @@ var fail = (reason, detail, location) => ({
|
|
|
17842
17874
|
}
|
|
17843
17875
|
return null;
|
|
17844
17876
|
}, isInputSignalCall = (init) => {
|
|
17845
|
-
if (
|
|
17877
|
+
if (ts16.isCallExpression(init)) {
|
|
17846
17878
|
const fn2 = init.expression;
|
|
17847
|
-
if (
|
|
17879
|
+
if (ts16.isIdentifier(fn2) && fn2.text === "input")
|
|
17848
17880
|
return true;
|
|
17849
|
-
if (
|
|
17881
|
+
if (ts16.isPropertyAccessExpression(fn2) && ts16.isIdentifier(fn2.expression) && fn2.expression.text === "input") {
|
|
17850
17882
|
return true;
|
|
17851
17883
|
}
|
|
17852
17884
|
}
|
|
@@ -17857,13 +17889,13 @@ var fail = (reason, detail, location) => ({
|
|
|
17857
17889
|
const classPropertyName = prop.name.getText();
|
|
17858
17890
|
const call = prop.initializer;
|
|
17859
17891
|
let required = false;
|
|
17860
|
-
if (
|
|
17892
|
+
if (ts16.isPropertyAccessExpression(call.expression) && ts16.isIdentifier(call.expression.name) && call.expression.name.text === "required") {
|
|
17861
17893
|
required = true;
|
|
17862
17894
|
}
|
|
17863
17895
|
let bindingPropertyName = classPropertyName;
|
|
17864
17896
|
let transformFunction = null;
|
|
17865
17897
|
const optsArg = call.arguments[required ? 0 : 1];
|
|
17866
|
-
if (optsArg &&
|
|
17898
|
+
if (optsArg && ts16.isObjectLiteralExpression(optsArg)) {
|
|
17867
17899
|
const aliasNode = getStringProperty(optsArg, "alias");
|
|
17868
17900
|
if (aliasNode !== null)
|
|
17869
17901
|
bindingPropertyName = aliasNode;
|
|
@@ -17883,28 +17915,28 @@ var fail = (reason, detail, location) => ({
|
|
|
17883
17915
|
}
|
|
17884
17916
|
};
|
|
17885
17917
|
}, extractDecoratorOutput = (prop) => {
|
|
17886
|
-
const decorators =
|
|
17918
|
+
const decorators = ts16.getDecorators(prop) ?? [];
|
|
17887
17919
|
for (const decorator of decorators) {
|
|
17888
17920
|
const expr = decorator.expression;
|
|
17889
|
-
if (!
|
|
17921
|
+
if (!ts16.isCallExpression(expr))
|
|
17890
17922
|
continue;
|
|
17891
17923
|
const fn2 = expr.expression;
|
|
17892
|
-
if (!
|
|
17924
|
+
if (!ts16.isIdentifier(fn2) || fn2.text !== "Output")
|
|
17893
17925
|
continue;
|
|
17894
17926
|
const classPropertyName = prop.name.getText();
|
|
17895
17927
|
let bindingName = classPropertyName;
|
|
17896
17928
|
const arg = expr.arguments[0];
|
|
17897
|
-
if (arg &&
|
|
17929
|
+
if (arg && ts16.isStringLiteral(arg))
|
|
17898
17930
|
bindingName = arg.text;
|
|
17899
17931
|
return { bindingName, classPropertyName };
|
|
17900
17932
|
}
|
|
17901
17933
|
return null;
|
|
17902
17934
|
}, isOutputSignalCall = (init) => {
|
|
17903
|
-
if (
|
|
17935
|
+
if (ts16.isCallExpression(init)) {
|
|
17904
17936
|
const fn2 = init.expression;
|
|
17905
|
-
if (
|
|
17937
|
+
if (ts16.isIdentifier(fn2) && fn2.text === "output")
|
|
17906
17938
|
return true;
|
|
17907
|
-
if (
|
|
17939
|
+
if (ts16.isPropertyAccessExpression(fn2) && ts16.isIdentifier(fn2.expression) && fn2.expression.text === "output") {
|
|
17908
17940
|
return true;
|
|
17909
17941
|
}
|
|
17910
17942
|
}
|
|
@@ -17916,7 +17948,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17916
17948
|
const call = prop.initializer;
|
|
17917
17949
|
let bindingName = classPropertyName;
|
|
17918
17950
|
const optsArg = call.arguments[0];
|
|
17919
|
-
if (optsArg &&
|
|
17951
|
+
if (optsArg && ts16.isObjectLiteralExpression(optsArg)) {
|
|
17920
17952
|
const aliasNode = getStringProperty(optsArg, "alias");
|
|
17921
17953
|
if (aliasNode !== null)
|
|
17922
17954
|
bindingName = aliasNode;
|
|
@@ -17928,7 +17960,7 @@ var fail = (reason, detail, location) => ({
|
|
|
17928
17960
|
let hasDecoratorIO = false;
|
|
17929
17961
|
let hasSignalIO = false;
|
|
17930
17962
|
for (const member of cls.members) {
|
|
17931
|
-
if (!
|
|
17963
|
+
if (!ts16.isPropertyDeclaration(member))
|
|
17932
17964
|
continue;
|
|
17933
17965
|
const decoratorIn = extractDecoratorInput(member, compiler);
|
|
17934
17966
|
if (decoratorIn) {
|
|
@@ -17962,21 +17994,21 @@ var fail = (reason, detail, location) => ({
|
|
|
17962
17994
|
specialAttributes: {}
|
|
17963
17995
|
}), parseHostObjectInto = (host, args, hostExprNode, compiler) => {
|
|
17964
17996
|
const hostNode = getProperty(args, "host");
|
|
17965
|
-
if (!hostNode || !
|
|
17997
|
+
if (!hostNode || !ts16.isObjectLiteralExpression(hostNode)) {
|
|
17966
17998
|
if (!hostExprNode)
|
|
17967
17999
|
return;
|
|
17968
18000
|
}
|
|
17969
|
-
const obj = hostNode &&
|
|
18001
|
+
const obj = hostNode && ts16.isObjectLiteralExpression(hostNode) ? hostNode : hostExprNode;
|
|
17970
18002
|
if (!obj)
|
|
17971
18003
|
return;
|
|
17972
18004
|
for (const prop of obj.properties) {
|
|
17973
|
-
if (!
|
|
18005
|
+
if (!ts16.isPropertyAssignment(prop))
|
|
17974
18006
|
continue;
|
|
17975
18007
|
const keyNode = prop.name;
|
|
17976
18008
|
let key;
|
|
17977
|
-
if (
|
|
18009
|
+
if (ts16.isStringLiteral(keyNode) || ts16.isNoSubstitutionTemplateLiteral(keyNode)) {
|
|
17978
18010
|
key = keyNode.text;
|
|
17979
|
-
} else if (
|
|
18011
|
+
} else if (ts16.isIdentifier(keyNode)) {
|
|
17980
18012
|
key = keyNode.text;
|
|
17981
18013
|
} else {
|
|
17982
18014
|
continue;
|
|
@@ -17993,36 +18025,36 @@ var fail = (reason, detail, location) => ({
|
|
|
17993
18025
|
}
|
|
17994
18026
|
}, mergeMemberHostDecorators = (host, cls) => {
|
|
17995
18027
|
for (const member of cls.members) {
|
|
17996
|
-
if (!
|
|
18028
|
+
if (!ts16.canHaveDecorators(member))
|
|
17997
18029
|
continue;
|
|
17998
|
-
const decorators =
|
|
18030
|
+
const decorators = ts16.getDecorators(member) ?? [];
|
|
17999
18031
|
for (const dec of decorators) {
|
|
18000
18032
|
const expr = dec.expression;
|
|
18001
|
-
if (!
|
|
18033
|
+
if (!ts16.isCallExpression(expr))
|
|
18002
18034
|
continue;
|
|
18003
18035
|
const fn2 = expr.expression;
|
|
18004
|
-
if (!
|
|
18036
|
+
if (!ts16.isIdentifier(fn2))
|
|
18005
18037
|
continue;
|
|
18006
18038
|
if (fn2.text === "HostBinding") {
|
|
18007
|
-
if (!
|
|
18039
|
+
if (!ts16.isPropertyDeclaration(member) && !ts16.isGetAccessor(member))
|
|
18008
18040
|
continue;
|
|
18009
|
-
const
|
|
18041
|
+
const propertyName2 = member.name.text;
|
|
18010
18042
|
const target = expr.arguments[0];
|
|
18011
|
-
const key = target &&
|
|
18012
|
-
host.properties[key] =
|
|
18043
|
+
const key = target && ts16.isStringLiteral(target) ? target.text : propertyName2;
|
|
18044
|
+
host.properties[key] = propertyName2;
|
|
18013
18045
|
} else if (fn2.text === "HostListener") {
|
|
18014
|
-
if (!
|
|
18046
|
+
if (!ts16.isMethodDeclaration(member))
|
|
18015
18047
|
continue;
|
|
18016
18048
|
const methodName = member.name.text;
|
|
18017
18049
|
const eventArg = expr.arguments[0];
|
|
18018
|
-
if (!eventArg || !
|
|
18050
|
+
if (!eventArg || !ts16.isStringLiteral(eventArg))
|
|
18019
18051
|
continue;
|
|
18020
18052
|
const event = eventArg.text;
|
|
18021
18053
|
const argsArg = expr.arguments[1];
|
|
18022
18054
|
const argsList = [];
|
|
18023
|
-
if (argsArg &&
|
|
18055
|
+
if (argsArg && ts16.isArrayLiteralExpression(argsArg)) {
|
|
18024
18056
|
for (const el of argsArg.elements) {
|
|
18025
|
-
if (
|
|
18057
|
+
if (ts16.isStringLiteral(el))
|
|
18026
18058
|
argsList.push(el.text);
|
|
18027
18059
|
}
|
|
18028
18060
|
}
|
|
@@ -18035,14 +18067,14 @@ var fail = (reason, detail, location) => ({
|
|
|
18035
18067
|
let descendants = true;
|
|
18036
18068
|
let emitDistinctChangesOnly = true;
|
|
18037
18069
|
const opts = args[1];
|
|
18038
|
-
if (opts &&
|
|
18070
|
+
if (opts && ts16.isObjectLiteralExpression(opts)) {
|
|
18039
18071
|
static_ = getBooleanProperty(opts, "static") ?? false;
|
|
18040
18072
|
descendants = getBooleanProperty(opts, "descendants") ?? true;
|
|
18041
18073
|
emitDistinctChangesOnly = getBooleanProperty(opts, "emitDistinctChangesOnly") ?? true;
|
|
18042
18074
|
}
|
|
18043
18075
|
return { descendants, emitDistinctChangesOnly, static_ };
|
|
18044
18076
|
}, queryPredicateFromArg = (arg, compiler) => {
|
|
18045
|
-
if (
|
|
18077
|
+
if (ts16.isStringLiteral(arg)) {
|
|
18046
18078
|
return arg.text.split(",").map((s2) => s2.trim()).filter(Boolean);
|
|
18047
18079
|
}
|
|
18048
18080
|
return {
|
|
@@ -18053,17 +18085,17 @@ var fail = (reason, detail, location) => ({
|
|
|
18053
18085
|
const contentQueries = [];
|
|
18054
18086
|
const viewQueries = [];
|
|
18055
18087
|
for (const member of cls.members) {
|
|
18056
|
-
if (!
|
|
18088
|
+
if (!ts16.isPropertyDeclaration(member))
|
|
18057
18089
|
continue;
|
|
18058
|
-
const decorators =
|
|
18090
|
+
const decorators = ts16.getDecorators(member) ?? [];
|
|
18059
18091
|
for (const dec of decorators) {
|
|
18060
18092
|
const expr = dec.expression;
|
|
18061
|
-
if (!
|
|
18093
|
+
if (!ts16.isCallExpression(expr))
|
|
18062
18094
|
continue;
|
|
18063
18095
|
const fn2 = expr.expression;
|
|
18064
|
-
if (!
|
|
18096
|
+
if (!ts16.isIdentifier(fn2) || !QUERY_DECORATORS.has(fn2.text))
|
|
18065
18097
|
continue;
|
|
18066
|
-
const
|
|
18098
|
+
const propertyName2 = member.name.text;
|
|
18067
18099
|
const tokenArg = expr.arguments[0];
|
|
18068
18100
|
if (!tokenArg)
|
|
18069
18101
|
continue;
|
|
@@ -18073,7 +18105,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18073
18105
|
const { static_, descendants, emitDistinctChangesOnly } = parseQueryDecoratorOptions(expr.arguments);
|
|
18074
18106
|
const opts = expr.arguments[1];
|
|
18075
18107
|
let read = null;
|
|
18076
|
-
if (opts &&
|
|
18108
|
+
if (opts && ts16.isObjectLiteralExpression(opts)) {
|
|
18077
18109
|
const readNode = getProperty(opts, "read");
|
|
18078
18110
|
if (readNode) {
|
|
18079
18111
|
read = new compiler.WrappedNodeExpr(readNode);
|
|
@@ -18085,7 +18117,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18085
18117
|
first: fn2.text === "ViewChild" || fn2.text === "ContentChild",
|
|
18086
18118
|
isSignal: false,
|
|
18087
18119
|
predicate,
|
|
18088
|
-
propertyName,
|
|
18120
|
+
propertyName: propertyName2,
|
|
18089
18121
|
read,
|
|
18090
18122
|
static: static_
|
|
18091
18123
|
};
|
|
@@ -18101,15 +18133,15 @@ var fail = (reason, detail, location) => ({
|
|
|
18101
18133
|
const contentQueries = [];
|
|
18102
18134
|
const viewQueries = [];
|
|
18103
18135
|
for (const member of cls.members) {
|
|
18104
|
-
if (!
|
|
18136
|
+
if (!ts16.isPropertyDeclaration(member) || !member.initializer)
|
|
18105
18137
|
continue;
|
|
18106
18138
|
const init = member.initializer;
|
|
18107
|
-
if (!
|
|
18139
|
+
if (!ts16.isCallExpression(init))
|
|
18108
18140
|
continue;
|
|
18109
18141
|
let queryName;
|
|
18110
|
-
if (
|
|
18142
|
+
if (ts16.isIdentifier(init.expression)) {
|
|
18111
18143
|
queryName = init.expression.text;
|
|
18112
|
-
} else if (
|
|
18144
|
+
} else if (ts16.isPropertyAccessExpression(init.expression) && ts16.isIdentifier(init.expression.expression) && init.expression.name.text === "required") {
|
|
18113
18145
|
queryName = init.expression.expression.text;
|
|
18114
18146
|
} else {
|
|
18115
18147
|
continue;
|
|
@@ -18117,7 +18149,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18117
18149
|
const runtime = SIGNAL_QUERY_TO_RUNTIME[queryName];
|
|
18118
18150
|
if (!runtime)
|
|
18119
18151
|
continue;
|
|
18120
|
-
const
|
|
18152
|
+
const propertyName2 = member.name.text;
|
|
18121
18153
|
const tokenArg = init.arguments[0];
|
|
18122
18154
|
if (!tokenArg)
|
|
18123
18155
|
continue;
|
|
@@ -18127,7 +18159,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18127
18159
|
let descendants = true;
|
|
18128
18160
|
let read = null;
|
|
18129
18161
|
const opts = init.arguments[1];
|
|
18130
|
-
if (opts &&
|
|
18162
|
+
if (opts && ts16.isObjectLiteralExpression(opts)) {
|
|
18131
18163
|
descendants = getBooleanProperty(opts, "descendants") ?? true;
|
|
18132
18164
|
const readNode = getProperty(opts, "read");
|
|
18133
18165
|
if (readNode)
|
|
@@ -18139,7 +18171,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18139
18171
|
first: runtime.first,
|
|
18140
18172
|
isSignal: true,
|
|
18141
18173
|
predicate,
|
|
18142
|
-
propertyName,
|
|
18174
|
+
propertyName: propertyName2,
|
|
18143
18175
|
read,
|
|
18144
18176
|
static: false
|
|
18145
18177
|
};
|
|
@@ -18153,13 +18185,13 @@ var fail = (reason, detail, location) => ({
|
|
|
18153
18185
|
const node = getProperty(args, "exportAs");
|
|
18154
18186
|
if (!node)
|
|
18155
18187
|
return null;
|
|
18156
|
-
if (
|
|
18188
|
+
if (ts16.isStringLiteral(node)) {
|
|
18157
18189
|
return node.text.split(",").map((s2) => s2.trim()).filter(Boolean);
|
|
18158
18190
|
}
|
|
18159
|
-
if (
|
|
18191
|
+
if (ts16.isArrayLiteralExpression(node)) {
|
|
18160
18192
|
const out = [];
|
|
18161
18193
|
for (const el of node.elements) {
|
|
18162
|
-
if (
|
|
18194
|
+
if (ts16.isStringLiteral(el))
|
|
18163
18195
|
out.push(el.text);
|
|
18164
18196
|
}
|
|
18165
18197
|
return out.length > 0 ? out : null;
|
|
@@ -18167,11 +18199,11 @@ var fail = (reason, detail, location) => ({
|
|
|
18167
18199
|
return null;
|
|
18168
18200
|
}, extractHostDirectives = (args, compiler) => {
|
|
18169
18201
|
const node = getProperty(args, "hostDirectives");
|
|
18170
|
-
if (!node || !
|
|
18202
|
+
if (!node || !ts16.isArrayLiteralExpression(node))
|
|
18171
18203
|
return null;
|
|
18172
18204
|
const out = [];
|
|
18173
18205
|
for (const el of node.elements) {
|
|
18174
|
-
if (
|
|
18206
|
+
if (ts16.isIdentifier(el)) {
|
|
18175
18207
|
out.push({
|
|
18176
18208
|
directive: {
|
|
18177
18209
|
type: new compiler.WrappedNodeExpr(el),
|
|
@@ -18183,7 +18215,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18183
18215
|
});
|
|
18184
18216
|
continue;
|
|
18185
18217
|
}
|
|
18186
|
-
if (!
|
|
18218
|
+
if (!ts16.isObjectLiteralExpression(el))
|
|
18187
18219
|
continue;
|
|
18188
18220
|
const directiveNode = getProperty(el, "directive");
|
|
18189
18221
|
if (!directiveNode)
|
|
@@ -18191,11 +18223,11 @@ var fail = (reason, detail, location) => ({
|
|
|
18191
18223
|
const inputsNode = getProperty(el, "inputs");
|
|
18192
18224
|
const outputsNode = getProperty(el, "outputs");
|
|
18193
18225
|
const collectMap = (n) => {
|
|
18194
|
-
if (!n || !
|
|
18226
|
+
if (!n || !ts16.isArrayLiteralExpression(n))
|
|
18195
18227
|
return null;
|
|
18196
18228
|
const map = {};
|
|
18197
18229
|
for (const item of n.elements) {
|
|
18198
|
-
if (!
|
|
18230
|
+
if (!ts16.isStringLiteral(item))
|
|
18199
18231
|
continue;
|
|
18200
18232
|
const [name, alias] = item.text.split(":").map((s2) => s2.trim());
|
|
18201
18233
|
if (name)
|
|
@@ -18265,10 +18297,10 @@ var fail = (reason, detail, location) => ({
|
|
|
18265
18297
|
});
|
|
18266
18298
|
return null;
|
|
18267
18299
|
}
|
|
18268
|
-
const sf =
|
|
18300
|
+
const sf = ts16.createSourceFile(filePath, source, ts16.ScriptTarget.Latest, true);
|
|
18269
18301
|
let info = null;
|
|
18270
18302
|
for (const stmt of sf.statements) {
|
|
18271
|
-
if (!
|
|
18303
|
+
if (!ts16.isClassDeclaration(stmt))
|
|
18272
18304
|
continue;
|
|
18273
18305
|
if (!stmt.name || stmt.name.text !== className)
|
|
18274
18306
|
continue;
|
|
@@ -18403,9 +18435,9 @@ var fail = (reason, detail, location) => ({
|
|
|
18403
18435
|
}, buildClassToSpecMap = (sourceFile) => {
|
|
18404
18436
|
const result = new Map;
|
|
18405
18437
|
for (const stmt of sourceFile.statements) {
|
|
18406
|
-
if (!
|
|
18438
|
+
if (!ts16.isImportDeclaration(stmt))
|
|
18407
18439
|
continue;
|
|
18408
|
-
if (!
|
|
18440
|
+
if (!ts16.isStringLiteral(stmt.moduleSpecifier))
|
|
18409
18441
|
continue;
|
|
18410
18442
|
const spec = stmt.moduleSpecifier.text;
|
|
18411
18443
|
const clause = stmt.importClause;
|
|
@@ -18414,7 +18446,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18414
18446
|
if (clause.name)
|
|
18415
18447
|
result.set(clause.name.text, spec);
|
|
18416
18448
|
const named = clause.namedBindings;
|
|
18417
|
-
if (named &&
|
|
18449
|
+
if (named && ts16.isNamedImports(named)) {
|
|
18418
18450
|
for (const el of named.elements) {
|
|
18419
18451
|
if (el.isTypeOnly)
|
|
18420
18452
|
continue;
|
|
@@ -18527,7 +18559,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18527
18559
|
return result;
|
|
18528
18560
|
const classToSpec = buildClassToSpecMap(sourceFile);
|
|
18529
18561
|
for (const el of importsExpr.elements) {
|
|
18530
|
-
if (!
|
|
18562
|
+
if (!ts16.isIdentifier(el))
|
|
18531
18563
|
continue;
|
|
18532
18564
|
const className = el.text;
|
|
18533
18565
|
const spec = classToSpec.get(className);
|
|
@@ -18546,35 +18578,35 @@ var fail = (reason, detail, location) => ({
|
|
|
18546
18578
|
}
|
|
18547
18579
|
return (h2 >>> 0).toString(36);
|
|
18548
18580
|
}, initializerShapeIsStructural = (node) => {
|
|
18549
|
-
if (
|
|
18581
|
+
if (ts16.isArrowFunction(node) || ts16.isFunctionExpression(node) || ts16.isCallExpression(node) || ts16.isNewExpression(node)) {
|
|
18550
18582
|
return true;
|
|
18551
18583
|
}
|
|
18552
|
-
if (
|
|
18584
|
+
if (ts16.isConditionalExpression(node)) {
|
|
18553
18585
|
return initializerShapeIsStructural(node.whenTrue) || initializerShapeIsStructural(node.whenFalse);
|
|
18554
18586
|
}
|
|
18555
|
-
if (
|
|
18587
|
+
if (ts16.isParenthesizedExpression(node)) {
|
|
18556
18588
|
return initializerShapeIsStructural(node.expression);
|
|
18557
18589
|
}
|
|
18558
|
-
if (
|
|
18590
|
+
if (ts16.isAsExpression(node) || ts16.isTypeAssertionExpression(node)) {
|
|
18559
18591
|
return initializerShapeIsStructural(node.expression);
|
|
18560
18592
|
}
|
|
18561
|
-
if (
|
|
18593
|
+
if (ts16.isNonNullExpression(node)) {
|
|
18562
18594
|
return initializerShapeIsStructural(node.expression);
|
|
18563
18595
|
}
|
|
18564
|
-
if (
|
|
18596
|
+
if (ts16.isObjectLiteralExpression(node)) {
|
|
18565
18597
|
for (const prop of node.properties) {
|
|
18566
|
-
if (
|
|
18598
|
+
if (ts16.isPropertyAssignment(prop) && initializerShapeIsStructural(prop.initializer)) {
|
|
18567
18599
|
return true;
|
|
18568
18600
|
}
|
|
18569
|
-
if (
|
|
18601
|
+
if (ts16.isShorthandPropertyAssignment(prop))
|
|
18570
18602
|
continue;
|
|
18571
|
-
if (
|
|
18603
|
+
if (ts16.isSpreadAssignment(prop) && initializerShapeIsStructural(prop.expression)) {
|
|
18572
18604
|
return true;
|
|
18573
18605
|
}
|
|
18574
18606
|
}
|
|
18575
18607
|
return false;
|
|
18576
18608
|
}
|
|
18577
|
-
if (
|
|
18609
|
+
if (ts16.isArrayLiteralExpression(node)) {
|
|
18578
18610
|
for (const el of node.elements) {
|
|
18579
18611
|
if (initializerShapeIsStructural(el))
|
|
18580
18612
|
return true;
|
|
@@ -18585,7 +18617,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18585
18617
|
}, extractArrowFieldSig = (cls) => {
|
|
18586
18618
|
const entries = [];
|
|
18587
18619
|
for (const member of cls.members) {
|
|
18588
|
-
if (!
|
|
18620
|
+
if (!ts16.isPropertyDeclaration(member))
|
|
18589
18621
|
continue;
|
|
18590
18622
|
const init = member.initializer;
|
|
18591
18623
|
if (!init)
|
|
@@ -18595,12 +18627,12 @@ var fail = (reason, detail, location) => ({
|
|
|
18595
18627
|
const name = member.name.getText();
|
|
18596
18628
|
let bodyText;
|
|
18597
18629
|
try {
|
|
18598
|
-
const printer =
|
|
18599
|
-
newLine:
|
|
18630
|
+
const printer = ts16.createPrinter({
|
|
18631
|
+
newLine: ts16.NewLineKind.LineFeed,
|
|
18600
18632
|
omitTrailingSemicolon: true,
|
|
18601
18633
|
removeComments: true
|
|
18602
18634
|
});
|
|
18603
|
-
bodyText = printer.printNode(
|
|
18635
|
+
bodyText = printer.printNode(ts16.EmitHint.Unspecified, init, cls.getSourceFile());
|
|
18604
18636
|
} catch {
|
|
18605
18637
|
bodyText = init.getText();
|
|
18606
18638
|
}
|
|
@@ -18611,9 +18643,9 @@ var fail = (reason, detail, location) => ({
|
|
|
18611
18643
|
}, INPUT_OUTPUT_DECORATORS, extractMemberDecoratorSig = (cls) => {
|
|
18612
18644
|
const entries = [];
|
|
18613
18645
|
for (const member of cls.members) {
|
|
18614
|
-
if (!
|
|
18646
|
+
if (!ts16.canHaveDecorators(member))
|
|
18615
18647
|
continue;
|
|
18616
|
-
const decorators =
|
|
18648
|
+
const decorators = ts16.getDecorators(member) ?? [];
|
|
18617
18649
|
if (decorators.length === 0)
|
|
18618
18650
|
continue;
|
|
18619
18651
|
const memberName = member.name?.getText() ?? "<anon>";
|
|
@@ -18621,14 +18653,14 @@ var fail = (reason, detail, location) => ({
|
|
|
18621
18653
|
const expr = decorator.expression;
|
|
18622
18654
|
let decName = "<unknown>";
|
|
18623
18655
|
let argText = "";
|
|
18624
|
-
if (
|
|
18625
|
-
if (
|
|
18656
|
+
if (ts16.isCallExpression(expr)) {
|
|
18657
|
+
if (ts16.isIdentifier(expr.expression)) {
|
|
18626
18658
|
decName = expr.expression.text;
|
|
18627
18659
|
}
|
|
18628
18660
|
if (expr.arguments.length > 0) {
|
|
18629
18661
|
argText = expr.arguments.map((a) => a.getText()).join(",");
|
|
18630
18662
|
}
|
|
18631
|
-
} else if (
|
|
18663
|
+
} else if (ts16.isIdentifier(expr)) {
|
|
18632
18664
|
decName = expr.text;
|
|
18633
18665
|
}
|
|
18634
18666
|
if (INPUT_OUTPUT_DECORATORS.has(decName))
|
|
@@ -18653,18 +18685,18 @@ var fail = (reason, detail, location) => ({
|
|
|
18653
18685
|
} catch {
|
|
18654
18686
|
return true;
|
|
18655
18687
|
}
|
|
18656
|
-
const sf =
|
|
18688
|
+
const sf = ts16.createSourceFile(filePath, source, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
|
|
18657
18689
|
let hasProviders = false;
|
|
18658
18690
|
const visit = (node) => {
|
|
18659
18691
|
if (hasProviders)
|
|
18660
18692
|
return;
|
|
18661
|
-
if (
|
|
18662
|
-
for (const decorator of
|
|
18693
|
+
if (ts16.isClassDeclaration(node)) {
|
|
18694
|
+
for (const decorator of ts16.getDecorators(node) ?? []) {
|
|
18663
18695
|
const expr = decorator.expression;
|
|
18664
|
-
if (!
|
|
18696
|
+
if (!ts16.isCallExpression(expr))
|
|
18665
18697
|
continue;
|
|
18666
18698
|
const arg = expr.arguments[0];
|
|
18667
|
-
if (!arg || !
|
|
18699
|
+
if (!arg || !ts16.isObjectLiteralExpression(arg))
|
|
18668
18700
|
continue;
|
|
18669
18701
|
if (getProperty(arg, "providers") !== null) {
|
|
18670
18702
|
hasProviders = true;
|
|
@@ -18672,7 +18704,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18672
18704
|
}
|
|
18673
18705
|
}
|
|
18674
18706
|
}
|
|
18675
|
-
|
|
18707
|
+
ts16.forEachChild(node, visit);
|
|
18676
18708
|
};
|
|
18677
18709
|
visit(sf);
|
|
18678
18710
|
providerProbeCache.set(filePath, {
|
|
@@ -18682,10 +18714,10 @@ var fail = (reason, detail, location) => ({
|
|
|
18682
18714
|
return hasProviders;
|
|
18683
18715
|
}, TS_EXTENSIONS, resolveImportSource = (identifierName, sourceFile, componentDir) => {
|
|
18684
18716
|
for (const stmt of sourceFile.statements) {
|
|
18685
|
-
if (!
|
|
18717
|
+
if (!ts16.isImportDeclaration(stmt))
|
|
18686
18718
|
continue;
|
|
18687
18719
|
const moduleSpec = stmt.moduleSpecifier;
|
|
18688
|
-
if (!
|
|
18720
|
+
if (!ts16.isStringLiteral(moduleSpec))
|
|
18689
18721
|
continue;
|
|
18690
18722
|
const spec = moduleSpec.text;
|
|
18691
18723
|
if (!spec.startsWith(".") && !spec.startsWith("/"))
|
|
@@ -18699,7 +18731,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18699
18731
|
}
|
|
18700
18732
|
if (importClause.namedBindings) {
|
|
18701
18733
|
const nb = importClause.namedBindings;
|
|
18702
|
-
if (
|
|
18734
|
+
if (ts16.isNamespaceImport(nb)) {
|
|
18703
18735
|
if (nb.name.text === identifierName)
|
|
18704
18736
|
matches = true;
|
|
18705
18737
|
} else {
|
|
@@ -18729,7 +18761,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18729
18761
|
return [];
|
|
18730
18762
|
const sig = [];
|
|
18731
18763
|
for (const entry of importsExpr.elements) {
|
|
18732
|
-
if (
|
|
18764
|
+
if (ts16.isIdentifier(entry)) {
|
|
18733
18765
|
const importPath = resolveImportSource(entry.text, sourceFile, componentDir);
|
|
18734
18766
|
if (importPath) {
|
|
18735
18767
|
if (fileHasModuleProviders(importPath)) {
|
|
@@ -18748,13 +18780,13 @@ var fail = (reason, detail, location) => ({
|
|
|
18748
18780
|
}, extractPropertyFieldNames = (cls) => {
|
|
18749
18781
|
const names = [];
|
|
18750
18782
|
for (const member of cls.members) {
|
|
18751
|
-
if (!
|
|
18783
|
+
if (!ts16.isPropertyDeclaration(member) && !ts16.isMethodDeclaration(member) && !ts16.isGetAccessorDeclaration(member) && !ts16.isSetAccessorDeclaration(member)) {
|
|
18752
18784
|
continue;
|
|
18753
18785
|
}
|
|
18754
18786
|
const { name } = member;
|
|
18755
18787
|
if (name === undefined)
|
|
18756
18788
|
continue;
|
|
18757
|
-
const text =
|
|
18789
|
+
const text = ts16.isIdentifier(name) ? name.text : ts16.isStringLiteral(name) || ts16.isNoSubstitutionTemplateLiteral(name) ? name.text : name.getText();
|
|
18758
18790
|
if (text.length > 0)
|
|
18759
18791
|
names.push(text);
|
|
18760
18792
|
}
|
|
@@ -18762,7 +18794,7 @@ var fail = (reason, detail, location) => ({
|
|
|
18762
18794
|
}, extractTopLevelImports = (sourceFile) => {
|
|
18763
18795
|
const names = new Set;
|
|
18764
18796
|
for (const stmt of sourceFile.statements) {
|
|
18765
|
-
if (!
|
|
18797
|
+
if (!ts16.isImportDeclaration(stmt))
|
|
18766
18798
|
continue;
|
|
18767
18799
|
const clause = stmt.importClause;
|
|
18768
18800
|
if (!clause)
|
|
@@ -18774,9 +18806,9 @@ var fail = (reason, detail, location) => ({
|
|
|
18774
18806
|
const bindings = clause.namedBindings;
|
|
18775
18807
|
if (!bindings)
|
|
18776
18808
|
continue;
|
|
18777
|
-
if (
|
|
18809
|
+
if (ts16.isNamespaceImport(bindings)) {
|
|
18778
18810
|
names.add(bindings.name.text);
|
|
18779
|
-
} else if (
|
|
18811
|
+
} else if (ts16.isNamedImports(bindings)) {
|
|
18780
18812
|
for (const el of bindings.elements) {
|
|
18781
18813
|
if (el.isTypeOnly)
|
|
18782
18814
|
continue;
|
|
@@ -18788,18 +18820,18 @@ var fail = (reason, detail, location) => ({
|
|
|
18788
18820
|
}, extractFingerprint = (cls, className, decoratorMeta, inputs, outputs, sourceFile, componentDir) => {
|
|
18789
18821
|
const ctorParamTypes = [];
|
|
18790
18822
|
for (const member of cls.members) {
|
|
18791
|
-
if (!
|
|
18823
|
+
if (!ts16.isConstructorDeclaration(member))
|
|
18792
18824
|
continue;
|
|
18793
18825
|
for (const param of member.parameters) {
|
|
18794
18826
|
const typeText = param.type ? param.type.getText() : "";
|
|
18795
|
-
const decorators =
|
|
18827
|
+
const decorators = ts16.getDecorators(param) ?? [];
|
|
18796
18828
|
const decoratorSig = decorators.length === 0 ? "" : decorators.map((d2) => {
|
|
18797
18829
|
const expr = d2.expression;
|
|
18798
|
-
if (
|
|
18830
|
+
if (ts16.isCallExpression(expr) && ts16.isIdentifier(expr.expression)) {
|
|
18799
18831
|
const args = expr.arguments.map((a) => a.getText()).join(",");
|
|
18800
18832
|
return `@${expr.expression.text}(${args})`;
|
|
18801
18833
|
}
|
|
18802
|
-
if (
|
|
18834
|
+
if (ts16.isIdentifier(expr)) {
|
|
18803
18835
|
return `@${expr.text}`;
|
|
18804
18836
|
}
|
|
18805
18837
|
return "@<unknown>";
|
|
@@ -18815,12 +18847,12 @@ var fail = (reason, detail, location) => ({
|
|
|
18815
18847
|
const providerImportSig = extractProviderImportSig(decoratorMeta.importsExpr, sourceFile, componentDir);
|
|
18816
18848
|
const topLevelImports = extractTopLevelImports(sourceFile);
|
|
18817
18849
|
const propertyFieldNames = extractPropertyFieldNames(cls);
|
|
18818
|
-
const printer =
|
|
18819
|
-
newLine:
|
|
18850
|
+
const printer = ts16.createPrinter({
|
|
18851
|
+
newLine: ts16.NewLineKind.LineFeed,
|
|
18820
18852
|
omitTrailingSemicolon: true,
|
|
18821
18853
|
removeComments: true
|
|
18822
18854
|
});
|
|
18823
|
-
const canonicalText = (node) => printer.printNode(
|
|
18855
|
+
const canonicalText = (node) => printer.printNode(ts16.EmitHint.Unspecified, node, sourceFile);
|
|
18824
18856
|
const importsArraySig = decoratorMeta.importsExpr ? djb2Hash(canonicalText(decoratorMeta.importsExpr)) : "";
|
|
18825
18857
|
const hostDirectivesSig = decoratorMeta.hostDirectivesExpr ? djb2Hash(canonicalText(decoratorMeta.hostDirectivesExpr)) : "";
|
|
18826
18858
|
const animationsArraySig = decoratorMeta.animationsExpr ? djb2Hash(canonicalText(decoratorMeta.animationsExpr)) : "";
|
|
@@ -18833,13 +18865,13 @@ var fail = (reason, detail, location) => ({
|
|
|
18833
18865
|
const PAGE_EXPORT_NAMES = new Set(["providers", "routes"]);
|
|
18834
18866
|
const pageExportEntries = [];
|
|
18835
18867
|
for (const stmt of sourceFile.statements) {
|
|
18836
|
-
if (!
|
|
18868
|
+
if (!ts16.isVariableStatement(stmt))
|
|
18837
18869
|
continue;
|
|
18838
|
-
const isExported = stmt.modifiers?.some((m) => m.kind ===
|
|
18870
|
+
const isExported = stmt.modifiers?.some((m) => m.kind === ts16.SyntaxKind.ExportKeyword);
|
|
18839
18871
|
if (!isExported)
|
|
18840
18872
|
continue;
|
|
18841
18873
|
for (const decl of stmt.declarationList.declarations) {
|
|
18842
|
-
if (!
|
|
18874
|
+
if (!ts16.isIdentifier(decl.name))
|
|
18843
18875
|
continue;
|
|
18844
18876
|
if (!PAGE_EXPORT_NAMES.has(decl.name.text))
|
|
18845
18877
|
continue;
|
|
@@ -18880,35 +18912,35 @@ var fail = (reason, detail, location) => ({
|
|
|
18880
18912
|
}, buildFreshClassMethodsBlock = (classNode, className) => {
|
|
18881
18913
|
const memberSources = [];
|
|
18882
18914
|
let hasStatic = false;
|
|
18883
|
-
const printer =
|
|
18915
|
+
const printer = ts16.createPrinter({ removeComments: true });
|
|
18884
18916
|
for (const member of classNode.members) {
|
|
18885
|
-
if (
|
|
18886
|
-
const modifiers = (
|
|
18887
|
-
const cleaned =
|
|
18888
|
-
memberSources.push(printer.printNode(
|
|
18917
|
+
if (ts16.isPropertyDeclaration(member)) {
|
|
18918
|
+
const modifiers = (ts16.getModifiers(member) ?? []).filter((m) => m.kind !== ts16.SyntaxKind.PrivateKeyword && m.kind !== ts16.SyntaxKind.PublicKeyword && m.kind !== ts16.SyntaxKind.ProtectedKeyword && m.kind !== ts16.SyntaxKind.ReadonlyKeyword && m.kind !== ts16.SyntaxKind.OverrideKeyword);
|
|
18919
|
+
const cleaned = ts16.factory.createPropertyDeclaration(modifiers, member.name, undefined, undefined, member.initializer);
|
|
18920
|
+
memberSources.push(printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
|
|
18889
18921
|
continue;
|
|
18890
18922
|
}
|
|
18891
|
-
if (
|
|
18892
|
-
const cleanedParams = member.parameters.map((param) =>
|
|
18893
|
-
const cleaned =
|
|
18894
|
-
memberSources.push(printer.printNode(
|
|
18923
|
+
if (ts16.isConstructorDeclaration(member)) {
|
|
18924
|
+
const cleanedParams = member.parameters.map((param) => ts16.factory.updateParameterDeclaration(param, (ts16.getModifiers(param) ?? []).filter((m) => m.kind !== ts16.SyntaxKind.PrivateKeyword && m.kind !== ts16.SyntaxKind.PublicKeyword && m.kind !== ts16.SyntaxKind.ProtectedKeyword && m.kind !== ts16.SyntaxKind.ReadonlyKeyword && m.kind !== ts16.SyntaxKind.OverrideKeyword), param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
|
|
18925
|
+
const cleaned = ts16.factory.createConstructorDeclaration([], cleanedParams, member.body);
|
|
18926
|
+
memberSources.push(printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile()));
|
|
18895
18927
|
continue;
|
|
18896
18928
|
}
|
|
18897
|
-
if (
|
|
18898
|
-
const modifiers =
|
|
18899
|
-
const isStatic = modifiers.some((m) => m.kind ===
|
|
18929
|
+
if (ts16.isMethodDeclaration(member) || ts16.isGetAccessorDeclaration(member) || ts16.isSetAccessorDeclaration(member)) {
|
|
18930
|
+
const modifiers = ts16.getModifiers(member) ?? [];
|
|
18931
|
+
const isStatic = modifiers.some((m) => m.kind === ts16.SyntaxKind.StaticKeyword);
|
|
18900
18932
|
if (isStatic)
|
|
18901
18933
|
hasStatic = true;
|
|
18902
|
-
const cleanedParams = member.parameters.map((param) =>
|
|
18934
|
+
const cleanedParams = member.parameters.map((param) => ts16.factory.updateParameterDeclaration(param, ts16.getModifiers(param) ?? [], param.dotDotDotToken, param.name, param.questionToken, param.type, param.initializer));
|
|
18903
18935
|
let cleaned;
|
|
18904
|
-
if (
|
|
18905
|
-
cleaned =
|
|
18906
|
-
} else if (
|
|
18907
|
-
cleaned =
|
|
18936
|
+
if (ts16.isMethodDeclaration(member)) {
|
|
18937
|
+
cleaned = ts16.factory.createMethodDeclaration(modifiers, member.asteriskToken, member.name, member.questionToken, member.typeParameters, cleanedParams, member.type, member.body);
|
|
18938
|
+
} else if (ts16.isGetAccessorDeclaration(member)) {
|
|
18939
|
+
cleaned = ts16.factory.createGetAccessorDeclaration(modifiers, member.name, cleanedParams, member.type, member.body);
|
|
18908
18940
|
} else {
|
|
18909
|
-
cleaned =
|
|
18941
|
+
cleaned = ts16.factory.createSetAccessorDeclaration(modifiers, member.name, cleanedParams, member.body);
|
|
18910
18942
|
}
|
|
18911
|
-
const printed = printer.printNode(
|
|
18943
|
+
const printed = printer.printNode(ts16.EmitHint.Unspecified, cleaned, classNode.getSourceFile());
|
|
18912
18944
|
memberSources.push(printed);
|
|
18913
18945
|
}
|
|
18914
18946
|
}
|
|
@@ -18920,10 +18952,10 @@ ${memberSources.join(`
|
|
|
18920
18952
|
}`;
|
|
18921
18953
|
let transpiled;
|
|
18922
18954
|
try {
|
|
18923
|
-
transpiled =
|
|
18955
|
+
transpiled = ts16.transpileModule(wrappedSource, {
|
|
18924
18956
|
compilerOptions: {
|
|
18925
|
-
module:
|
|
18926
|
-
target:
|
|
18957
|
+
module: ts16.ModuleKind.ES2022,
|
|
18958
|
+
target: ts16.ScriptTarget.ES2022
|
|
18927
18959
|
},
|
|
18928
18960
|
reportDiagnostics: false
|
|
18929
18961
|
}).outputText;
|
|
@@ -18997,7 +19029,7 @@ ${block}
|
|
|
18997
19029
|
if (existsSync24(tsconfigPath)) {
|
|
18998
19030
|
try {
|
|
18999
19031
|
const text = readFileSync20(tsconfigPath, "utf8");
|
|
19000
|
-
const parsed =
|
|
19032
|
+
const parsed = ts16.parseConfigFileTextToJson(tsconfigPath, text);
|
|
19001
19033
|
if (!parsed.error && parsed.config) {
|
|
19002
19034
|
const cfg = parsed.config;
|
|
19003
19035
|
const ang = cfg.angularCompilerOptions ?? {};
|
|
@@ -19031,7 +19063,7 @@ ${block}
|
|
|
19031
19063
|
return fail("unexpected-error", `import @angular/compiler: ${err}`);
|
|
19032
19064
|
}
|
|
19033
19065
|
const tsSource = readFileSync20(componentFilePath, "utf8");
|
|
19034
|
-
const sourceFile =
|
|
19066
|
+
const sourceFile = ts16.createSourceFile(componentFilePath, tsSource, ts16.ScriptTarget.ES2022, true, ts16.ScriptKind.TS);
|
|
19035
19067
|
const classNode = findClassDeclaration(sourceFile, className);
|
|
19036
19068
|
if (!classNode) {
|
|
19037
19069
|
return fail("class-not-found", `${className} in ${componentFilePath}`);
|
|
@@ -19158,7 +19190,7 @@ ${block}
|
|
|
19158
19190
|
isSignal: (hasSignalIO || advancedMetadata.contentQueries.some((q2) => q2.isSignal) || advancedMetadata.viewQueries.some((q2) => q2.isSignal)) && !hasDecoratorIO && !advancedMetadata.contentQueries.some((q2) => !q2.isSignal) && !advancedMetadata.viewQueries.some((q2) => !q2.isSignal),
|
|
19159
19191
|
isStandalone: decoratorMeta.standalone,
|
|
19160
19192
|
lifecycle: {
|
|
19161
|
-
usesOnChanges: classNode.members.some((m) =>
|
|
19193
|
+
usesOnChanges: classNode.members.some((m) => ts16.isMethodDeclaration(m) && m.name !== undefined && ts16.isIdentifier(m.name) && m.name.text === "ngOnChanges")
|
|
19162
19194
|
},
|
|
19163
19195
|
name: className,
|
|
19164
19196
|
outputs,
|
|
@@ -19207,15 +19239,15 @@ ${block}
|
|
|
19207
19239
|
}
|
|
19208
19240
|
const importGenerator = createHmrImportGenerator(namespaceMap);
|
|
19209
19241
|
const tsFunctionDecl = translateStatement(sourceFile, callback, importGenerator);
|
|
19210
|
-
const exportedDecl =
|
|
19211
|
-
|
|
19212
|
-
|
|
19242
|
+
const exportedDecl = ts16.factory.updateFunctionDeclaration(tsFunctionDecl, [
|
|
19243
|
+
ts16.factory.createToken(ts16.SyntaxKind.ExportKeyword),
|
|
19244
|
+
ts16.factory.createToken(ts16.SyntaxKind.DefaultKeyword)
|
|
19213
19245
|
], tsFunctionDecl.asteriskToken, tsFunctionDecl.name, tsFunctionDecl.typeParameters, tsFunctionDecl.parameters, tsFunctionDecl.type, tsFunctionDecl.body);
|
|
19214
|
-
const printer =
|
|
19215
|
-
newLine:
|
|
19246
|
+
const printer = ts16.createPrinter({
|
|
19247
|
+
newLine: ts16.NewLineKind.LineFeed,
|
|
19216
19248
|
removeComments: false
|
|
19217
19249
|
});
|
|
19218
|
-
const fnText = printer.printNode(
|
|
19250
|
+
const fnText = printer.printNode(ts16.EmitHint.Unspecified, exportedDecl, sourceFile);
|
|
19219
19251
|
const provisionalMethodsBlock = buildFreshClassMethodsBlock(classNode, className) ?? "";
|
|
19220
19252
|
const referencedNames = new Set;
|
|
19221
19253
|
const identRe = /[A-Za-z_$][A-Za-z0-9_$]*/g;
|
|
@@ -19225,33 +19257,33 @@ ${block}
|
|
|
19225
19257
|
}
|
|
19226
19258
|
const sourceScopeNames = new Set;
|
|
19227
19259
|
for (const stmt of sourceFile.statements) {
|
|
19228
|
-
if (
|
|
19229
|
-
if (!
|
|
19260
|
+
if (ts16.isImportDeclaration(stmt)) {
|
|
19261
|
+
if (!ts16.isStringLiteral(stmt.moduleSpecifier))
|
|
19230
19262
|
continue;
|
|
19231
19263
|
const clause = stmt.importClause;
|
|
19232
19264
|
if (clause?.name)
|
|
19233
19265
|
sourceScopeNames.add(clause.name.text);
|
|
19234
|
-
if (clause?.namedBindings &&
|
|
19266
|
+
if (clause?.namedBindings && ts16.isNamedImports(clause.namedBindings)) {
|
|
19235
19267
|
for (const el of clause.namedBindings.elements) {
|
|
19236
19268
|
if (el.isTypeOnly)
|
|
19237
19269
|
continue;
|
|
19238
19270
|
sourceScopeNames.add(el.name.text);
|
|
19239
19271
|
}
|
|
19240
|
-
} else if (clause?.namedBindings &&
|
|
19272
|
+
} else if (clause?.namedBindings && ts16.isNamespaceImport(clause.namedBindings)) {
|
|
19241
19273
|
sourceScopeNames.add(clause.namedBindings.name.text);
|
|
19242
19274
|
}
|
|
19243
19275
|
continue;
|
|
19244
19276
|
}
|
|
19245
|
-
if (
|
|
19277
|
+
if (ts16.isVariableStatement(stmt) || stmt.kind === ts16.SyntaxKind.VariableStatement) {
|
|
19246
19278
|
const varStmt = stmt;
|
|
19247
19279
|
for (const decl of varStmt.declarationList.declarations) {
|
|
19248
|
-
if (
|
|
19280
|
+
if (ts16.isIdentifier(decl.name)) {
|
|
19249
19281
|
sourceScopeNames.add(decl.name.text);
|
|
19250
19282
|
}
|
|
19251
19283
|
}
|
|
19252
19284
|
continue;
|
|
19253
19285
|
}
|
|
19254
|
-
if (
|
|
19286
|
+
if (ts16.isFunctionDeclaration(stmt) || ts16.isClassDeclaration(stmt)) {
|
|
19255
19287
|
if (stmt.name)
|
|
19256
19288
|
sourceScopeNames.add(stmt.name.text);
|
|
19257
19289
|
}
|
|
@@ -19262,7 +19294,7 @@ ${block}
|
|
|
19262
19294
|
}
|
|
19263
19295
|
const allImportedNames = new Set;
|
|
19264
19296
|
for (const stmt of sourceFile.statements) {
|
|
19265
|
-
if (!
|
|
19297
|
+
if (!ts16.isImportDeclaration(stmt))
|
|
19266
19298
|
continue;
|
|
19267
19299
|
const clause = stmt.importClause;
|
|
19268
19300
|
if (!clause || clause.isTypeOnly)
|
|
@@ -19272,7 +19304,7 @@ ${block}
|
|
|
19272
19304
|
const bindings = clause.namedBindings;
|
|
19273
19305
|
if (!bindings)
|
|
19274
19306
|
continue;
|
|
19275
|
-
if (
|
|
19307
|
+
if (ts16.isNamespaceImport(bindings)) {
|
|
19276
19308
|
allImportedNames.add(bindings.name.text);
|
|
19277
19309
|
} else {
|
|
19278
19310
|
for (const el of bindings.elements) {
|
|
@@ -19284,10 +19316,10 @@ ${block}
|
|
|
19284
19316
|
}
|
|
19285
19317
|
const depsToDestructure = [...sourceScopeNames].filter((n) => referencedNames.has(n) || allImportedNames.has(n));
|
|
19286
19318
|
const tsSourceText = fnText;
|
|
19287
|
-
const transpiled =
|
|
19319
|
+
const transpiled = ts16.transpileModule(tsSourceText, {
|
|
19288
19320
|
compilerOptions: {
|
|
19289
|
-
module:
|
|
19290
|
-
target:
|
|
19321
|
+
module: ts16.ModuleKind.ES2022,
|
|
19322
|
+
target: ts16.ScriptTarget.ES2022
|
|
19291
19323
|
},
|
|
19292
19324
|
fileName: componentFilePath,
|
|
19293
19325
|
reportDiagnostics: false
|
|
@@ -23714,7 +23746,7 @@ __export(exports_resolveOwningComponents, {
|
|
|
23714
23746
|
});
|
|
23715
23747
|
import { readdirSync as readdirSync8, readFileSync as readFileSync26, statSync as statSync5 } from "fs";
|
|
23716
23748
|
import { dirname as dirname22, extname as extname10, join as join39, resolve as resolve34 } from "path";
|
|
23717
|
-
import
|
|
23749
|
+
import ts17 from "typescript";
|
|
23718
23750
|
var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") || file4.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
|
|
23719
23751
|
const out = [];
|
|
23720
23752
|
const visit = (dir) => {
|
|
@@ -23740,13 +23772,13 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
23740
23772
|
return out;
|
|
23741
23773
|
}, getStringPropertyValue = (obj, name) => {
|
|
23742
23774
|
for (const prop of obj.properties) {
|
|
23743
|
-
if (!
|
|
23775
|
+
if (!ts17.isPropertyAssignment(prop))
|
|
23744
23776
|
continue;
|
|
23745
|
-
const propName =
|
|
23777
|
+
const propName = ts17.isIdentifier(prop.name) || ts17.isStringLiteral(prop.name) ? prop.name.text : null;
|
|
23746
23778
|
if (propName !== name)
|
|
23747
23779
|
continue;
|
|
23748
23780
|
const init = prop.initializer;
|
|
23749
|
-
if (
|
|
23781
|
+
if (ts17.isStringLiteral(init) || ts17.isNoSubstitutionTemplateLiteral(init)) {
|
|
23750
23782
|
return init.text;
|
|
23751
23783
|
}
|
|
23752
23784
|
}
|
|
@@ -23754,16 +23786,16 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
23754
23786
|
}, getStringArrayProperty = (obj, name) => {
|
|
23755
23787
|
const out = [];
|
|
23756
23788
|
for (const prop of obj.properties) {
|
|
23757
|
-
if (!
|
|
23789
|
+
if (!ts17.isPropertyAssignment(prop))
|
|
23758
23790
|
continue;
|
|
23759
|
-
const propName =
|
|
23791
|
+
const propName = ts17.isIdentifier(prop.name) || ts17.isStringLiteral(prop.name) ? prop.name.text : null;
|
|
23760
23792
|
if (propName !== name)
|
|
23761
23793
|
continue;
|
|
23762
23794
|
const init = prop.initializer;
|
|
23763
|
-
if (!
|
|
23795
|
+
if (!ts17.isArrayLiteralExpression(init))
|
|
23764
23796
|
continue;
|
|
23765
23797
|
for (const element of init.elements) {
|
|
23766
|
-
if (
|
|
23798
|
+
if (ts17.isStringLiteral(element) || ts17.isNoSubstitutionTemplateLiteral(element)) {
|
|
23767
23799
|
out.push(element.text);
|
|
23768
23800
|
}
|
|
23769
23801
|
}
|
|
@@ -23776,27 +23808,27 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
23776
23808
|
} catch {
|
|
23777
23809
|
return [];
|
|
23778
23810
|
}
|
|
23779
|
-
const sourceFile =
|
|
23811
|
+
const sourceFile = ts17.createSourceFile(filePath, source, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
|
|
23780
23812
|
const out = [];
|
|
23781
23813
|
const visit = (node) => {
|
|
23782
|
-
if (
|
|
23783
|
-
for (const decorator of
|
|
23814
|
+
if (ts17.isClassDeclaration(node) && node.name) {
|
|
23815
|
+
for (const decorator of ts17.getDecorators(node) ?? []) {
|
|
23784
23816
|
const expr = decorator.expression;
|
|
23785
|
-
if (!
|
|
23817
|
+
if (!ts17.isCallExpression(expr))
|
|
23786
23818
|
continue;
|
|
23787
23819
|
const fn2 = expr.expression;
|
|
23788
|
-
if (!
|
|
23820
|
+
if (!ts17.isIdentifier(fn2))
|
|
23789
23821
|
continue;
|
|
23790
23822
|
const kind = ENTITY_DECORATORS[fn2.text];
|
|
23791
23823
|
if (!kind)
|
|
23792
23824
|
continue;
|
|
23793
23825
|
let extendsName = null;
|
|
23794
23826
|
for (const heritage of node.heritageClauses ?? []) {
|
|
23795
|
-
if (heritage.token !==
|
|
23827
|
+
if (heritage.token !== ts17.SyntaxKind.ExtendsKeyword) {
|
|
23796
23828
|
continue;
|
|
23797
23829
|
}
|
|
23798
23830
|
const first = heritage.types[0];
|
|
23799
|
-
if (first &&
|
|
23831
|
+
if (first && ts17.isIdentifier(first.expression)) {
|
|
23800
23832
|
extendsName = first.expression.text;
|
|
23801
23833
|
}
|
|
23802
23834
|
break;
|
|
@@ -23809,7 +23841,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
23809
23841
|
templateUrls: []
|
|
23810
23842
|
};
|
|
23811
23843
|
const arg = expr.arguments[0];
|
|
23812
|
-
if (arg &&
|
|
23844
|
+
if (arg && ts17.isObjectLiteralExpression(arg) && kind === "component") {
|
|
23813
23845
|
const tplUrl = getStringPropertyValue(arg, "templateUrl");
|
|
23814
23846
|
if (tplUrl)
|
|
23815
23847
|
entry.templateUrls.push(tplUrl);
|
|
@@ -23822,7 +23854,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
23822
23854
|
break;
|
|
23823
23855
|
}
|
|
23824
23856
|
}
|
|
23825
|
-
|
|
23857
|
+
ts17.forEachChild(node, visit);
|
|
23826
23858
|
};
|
|
23827
23859
|
visit(sourceFile);
|
|
23828
23860
|
return out;
|
|
@@ -23866,12 +23898,12 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
23866
23898
|
} catch {
|
|
23867
23899
|
return null;
|
|
23868
23900
|
}
|
|
23869
|
-
const sf =
|
|
23901
|
+
const sf = ts17.createSourceFile(childFilePath, source, ts17.ScriptTarget.ES2022, true, ts17.ScriptKind.TS);
|
|
23870
23902
|
const childDir = dirname22(childFilePath);
|
|
23871
23903
|
for (const stmt of sf.statements) {
|
|
23872
|
-
if (!
|
|
23904
|
+
if (!ts17.isImportDeclaration(stmt))
|
|
23873
23905
|
continue;
|
|
23874
|
-
if (!
|
|
23906
|
+
if (!ts17.isStringLiteral(stmt.moduleSpecifier))
|
|
23875
23907
|
continue;
|
|
23876
23908
|
const clause = stmt.importClause;
|
|
23877
23909
|
if (!clause || clause.isTypeOnly)
|
|
@@ -23879,7 +23911,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file4) => file4.endsWith(".ts") ||
|
|
|
23879
23911
|
let matchesName = false;
|
|
23880
23912
|
if (clause.name && clause.name.text === parentName)
|
|
23881
23913
|
matchesName = true;
|
|
23882
|
-
if (!matchesName && clause.namedBindings &&
|
|
23914
|
+
if (!matchesName && clause.namedBindings && ts17.isNamedImports(clause.namedBindings)) {
|
|
23883
23915
|
for (const el of clause.namedBindings.elements) {
|
|
23884
23916
|
if (el.isTypeOnly)
|
|
23885
23917
|
continue;
|
|
@@ -28649,5 +28681,5 @@ export {
|
|
|
28649
28681
|
build
|
|
28650
28682
|
};
|
|
28651
28683
|
|
|
28652
|
-
//# debugId=
|
|
28684
|
+
//# debugId=2419EDD21F53931564756E2164756E21
|
|
28653
28685
|
//# sourceMappingURL=build.js.map
|