@storm-software/workspace-tools 1.13.15 → 1.13.17
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/CHANGELOG.md +14 -0
- package/index.js +182 -260
- package/meta.json +1 -1
- package/package.json +1 -1
- package/src/executors/tsup/executor.js +249 -290
- package/src/executors/tsup/get-config.js +53 -121
|
@@ -1178,10 +1178,10 @@ var require_ejs = __commonJS({
|
|
|
1178
1178
|
exports.localsName = _DEFAULT_LOCALS_NAME;
|
|
1179
1179
|
exports.promiseImpl = new Function("return this;")().Promise;
|
|
1180
1180
|
exports.resolveInclude = function(name, filename, isDir) {
|
|
1181
|
-
var
|
|
1181
|
+
var dirname2 = path2.dirname;
|
|
1182
1182
|
var extname = path2.extname;
|
|
1183
1183
|
var resolve = path2.resolve;
|
|
1184
|
-
var includePath = resolve(isDir ? filename :
|
|
1184
|
+
var includePath = resolve(isDir ? filename : dirname2(filename), name);
|
|
1185
1185
|
var ext2 = extname(name);
|
|
1186
1186
|
if (!ext2) {
|
|
1187
1187
|
includePath += ".ejs";
|
|
@@ -4206,12 +4206,12 @@ var require_install_packages_task = __commonJS({
|
|
|
4206
4206
|
var child_process_1 = require("child_process");
|
|
4207
4207
|
var path_1 = require("path");
|
|
4208
4208
|
var nx_1 = require_nx();
|
|
4209
|
-
var { detectPackageManager, getPackageManagerCommand, joinPathFragments } = (0, nx_1.requireNx)();
|
|
4209
|
+
var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments2 } = (0, nx_1.requireNx)();
|
|
4210
4210
|
function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = detectPackageManager(cwd)) {
|
|
4211
|
-
if (!tree.listChanges().find((f) => f.path ===
|
|
4211
|
+
if (!tree.listChanges().find((f) => f.path === joinPathFragments2(cwd, "package.json")) && !alwaysRun) {
|
|
4212
4212
|
return;
|
|
4213
4213
|
}
|
|
4214
|
-
const packageJsonValue = tree.read(
|
|
4214
|
+
const packageJsonValue = tree.read(joinPathFragments2(cwd, "package.json"), "utf-8");
|
|
4215
4215
|
let storedPackageJsonValue = global["__packageJsonInstallCache__"];
|
|
4216
4216
|
if (storedPackageJsonValue != packageJsonValue || alwaysRun) {
|
|
4217
4217
|
global["__packageJsonInstallCache__"] = packageJsonValue;
|
|
@@ -20294,30 +20294,30 @@ var require_run_type_check = __commonJS({
|
|
|
20294
20294
|
var highlight_1 = require_highlight();
|
|
20295
20295
|
var ts_config_1 = require_ts_config();
|
|
20296
20296
|
async function runTypeCheckWatch(options2, callback) {
|
|
20297
|
-
const { ts:
|
|
20298
|
-
const host =
|
|
20297
|
+
const { ts: ts3, workspaceRoot, config, compilerOptions } = await setupTypeScript(options2);
|
|
20298
|
+
const host = ts3.createWatchCompilerHost(config.fileNames, compilerOptions, ts3.sys, ts3.createEmitAndSemanticDiagnosticsBuilderProgram);
|
|
20299
20299
|
const originalOnWatchStatusChange = host.onWatchStatusChange;
|
|
20300
20300
|
host.onWatchStatusChange = (diagnostic, newLine, opts, errorCount) => {
|
|
20301
20301
|
originalOnWatchStatusChange?.(diagnostic, newLine, opts, errorCount);
|
|
20302
|
-
callback(diagnostic, getFormattedDiagnostic(
|
|
20302
|
+
callback(diagnostic, getFormattedDiagnostic(ts3, workspaceRoot, diagnostic), errorCount);
|
|
20303
20303
|
};
|
|
20304
|
-
const watchProgram =
|
|
20304
|
+
const watchProgram = ts3.createWatchProgram(host);
|
|
20305
20305
|
const program = watchProgram.getProgram().getProgram();
|
|
20306
|
-
const diagnostics =
|
|
20306
|
+
const diagnostics = ts3.getPreEmitDiagnostics(program);
|
|
20307
20307
|
return {
|
|
20308
20308
|
close: watchProgram.close.bind(watchProgram),
|
|
20309
|
-
preEmitErrors: diagnostics.filter((d) => d.category ===
|
|
20310
|
-
preEmitWarnings: diagnostics.filter((d) => d.category ===
|
|
20309
|
+
preEmitErrors: diagnostics.filter((d) => d.category === ts3.DiagnosticCategory.Error).map((d) => getFormattedDiagnostic(ts3, workspaceRoot, d)),
|
|
20310
|
+
preEmitWarnings: diagnostics.filter((d) => d.category === ts3.DiagnosticCategory.Warning).map((d) => getFormattedDiagnostic(ts3, workspaceRoot, d))
|
|
20311
20311
|
};
|
|
20312
20312
|
}
|
|
20313
20313
|
exports.runTypeCheckWatch = runTypeCheckWatch;
|
|
20314
20314
|
async function runTypeCheck(options2) {
|
|
20315
|
-
const { ts:
|
|
20315
|
+
const { ts: ts3, workspaceRoot, cacheDir, config, compilerOptions } = await setupTypeScript(options2);
|
|
20316
20316
|
let program;
|
|
20317
20317
|
let incremental = false;
|
|
20318
20318
|
if (compilerOptions.incremental && cacheDir) {
|
|
20319
20319
|
incremental = true;
|
|
20320
|
-
program =
|
|
20320
|
+
program = ts3.createIncrementalProgram({
|
|
20321
20321
|
rootNames: config.fileNames,
|
|
20322
20322
|
options: {
|
|
20323
20323
|
...compilerOptions,
|
|
@@ -20326,15 +20326,15 @@ var require_run_type_check = __commonJS({
|
|
|
20326
20326
|
}
|
|
20327
20327
|
});
|
|
20328
20328
|
} else {
|
|
20329
|
-
program =
|
|
20329
|
+
program = ts3.createProgram(config.fileNames, compilerOptions);
|
|
20330
20330
|
}
|
|
20331
20331
|
const result = program.emit();
|
|
20332
|
-
const allDiagnostics =
|
|
20333
|
-
return getTypeCheckResult(
|
|
20332
|
+
const allDiagnostics = ts3.getPreEmitDiagnostics(program).concat(result.diagnostics);
|
|
20333
|
+
return getTypeCheckResult(ts3, allDiagnostics, workspaceRoot, config.fileNames.length, program.getSourceFiles().length, incremental);
|
|
20334
20334
|
}
|
|
20335
20335
|
exports.runTypeCheck = runTypeCheck;
|
|
20336
20336
|
async function setupTypeScript(options2) {
|
|
20337
|
-
const
|
|
20337
|
+
const ts3 = await Promise.resolve().then(() => require("typescript"));
|
|
20338
20338
|
const { workspaceRoot, tsConfigPath, cacheDir, incremental, rootDir } = options2;
|
|
20339
20339
|
const config = (0, ts_config_1.readTsConfig)(tsConfigPath);
|
|
20340
20340
|
if (config.errors.length) {
|
|
@@ -20349,11 +20349,11 @@ var require_run_type_check = __commonJS({
|
|
|
20349
20349
|
incremental,
|
|
20350
20350
|
rootDir: rootDir || config.options.rootDir
|
|
20351
20351
|
};
|
|
20352
|
-
return { ts:
|
|
20352
|
+
return { ts: ts3, workspaceRoot, cacheDir, config, compilerOptions };
|
|
20353
20353
|
}
|
|
20354
|
-
function getTypeCheckResult(
|
|
20355
|
-
const errors = allDiagnostics.filter((d) => d.category ===
|
|
20356
|
-
const warnings = allDiagnostics.filter((d) => d.category ===
|
|
20354
|
+
function getTypeCheckResult(ts3, allDiagnostics, workspaceRoot, inputFilesCount, totalFilesCount, incremental = false) {
|
|
20355
|
+
const errors = allDiagnostics.filter((d) => d.category === ts3.DiagnosticCategory.Error).map((d) => getFormattedDiagnostic(ts3, workspaceRoot, d));
|
|
20356
|
+
const warnings = allDiagnostics.filter((d) => d.category === ts3.DiagnosticCategory.Warning).map((d) => getFormattedDiagnostic(ts3, workspaceRoot, d));
|
|
20357
20357
|
return {
|
|
20358
20358
|
warnings,
|
|
20359
20359
|
errors,
|
|
@@ -20362,21 +20362,21 @@ var require_run_type_check = __commonJS({
|
|
|
20362
20362
|
incremental
|
|
20363
20363
|
};
|
|
20364
20364
|
}
|
|
20365
|
-
function getFormattedDiagnostic(
|
|
20365
|
+
function getFormattedDiagnostic(ts3, workspaceRoot, diagnostic) {
|
|
20366
20366
|
let message = "";
|
|
20367
|
-
const reason =
|
|
20367
|
+
const reason = ts3.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
20368
20368
|
const category = diagnostic.category;
|
|
20369
20369
|
switch (category) {
|
|
20370
|
-
case
|
|
20370
|
+
case ts3.DiagnosticCategory.Warning: {
|
|
20371
20371
|
message += `${chalk.yellow.bold("warning")} ${chalk.gray(`TS${diagnostic.code}`)}: `;
|
|
20372
20372
|
break;
|
|
20373
20373
|
}
|
|
20374
|
-
case
|
|
20374
|
+
case ts3.DiagnosticCategory.Error: {
|
|
20375
20375
|
message += `${chalk.red.bold("error")} ${chalk.gray(`TS${diagnostic.code}`)}: `;
|
|
20376
20376
|
break;
|
|
20377
20377
|
}
|
|
20378
|
-
case
|
|
20379
|
-
case
|
|
20378
|
+
case ts3.DiagnosticCategory.Suggestion:
|
|
20379
|
+
case ts3.DiagnosticCategory.Message:
|
|
20380
20380
|
default: {
|
|
20381
20381
|
message += `${chalk.cyan.bold(category === 2 ? "suggestion" : "info")}: `;
|
|
20382
20382
|
break;
|
|
@@ -20769,7 +20769,7 @@ var require_compilation = __commonJS({
|
|
|
20769
20769
|
var tsModule;
|
|
20770
20770
|
function compileTypeScript(options2) {
|
|
20771
20771
|
const normalizedOptions = normalizeOptions2(options2);
|
|
20772
|
-
const tsConfig =
|
|
20772
|
+
const tsConfig = getNormalizedTsConfig2(normalizedOptions);
|
|
20773
20773
|
if (normalizedOptions.deleteOutputPath) {
|
|
20774
20774
|
(0, fs_1.rmSync)(normalizedOptions.outputPath, { recursive: true, force: true });
|
|
20775
20775
|
}
|
|
@@ -20781,7 +20781,7 @@ var require_compilation = __commonJS({
|
|
|
20781
20781
|
tsModule = (0, typescript_1.ensureTypescript)();
|
|
20782
20782
|
}
|
|
20783
20783
|
const normalizedOptions = normalizeOptions2(options2);
|
|
20784
|
-
const tsConfig =
|
|
20784
|
+
const tsConfig = getNormalizedTsConfig2(normalizedOptions);
|
|
20785
20785
|
if (normalizedOptions.deleteOutputPath) {
|
|
20786
20786
|
(0, fs_1.rmSync)(normalizedOptions.outputPath, { recursive: true, force: true });
|
|
20787
20787
|
}
|
|
@@ -20829,7 +20829,7 @@ var require_compilation = __commonJS({
|
|
|
20829
20829
|
}
|
|
20830
20830
|
return mergedCustomTransformers;
|
|
20831
20831
|
}
|
|
20832
|
-
function
|
|
20832
|
+
function getNormalizedTsConfig2(options2) {
|
|
20833
20833
|
const tsConfig = (0, ts_config_1.readTsConfig)(options2.tsConfig);
|
|
20834
20834
|
tsConfig.options.outDir = options2.outputPath;
|
|
20835
20835
|
tsConfig.options.noEmitOnError = true;
|
|
@@ -34931,7 +34931,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
34931
34931
|
var nx_1 = require_nx();
|
|
34932
34932
|
var get_workspace_layout_1 = require_get_workspace_layout();
|
|
34933
34933
|
var names_1 = require_names();
|
|
34934
|
-
var { joinPathFragments, normalizePath, logger, readJson, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
|
|
34934
|
+
var { joinPathFragments: joinPathFragments2, normalizePath, logger, readJson, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
|
|
34935
34935
|
var deprecationWarning = stripIndents`
|
|
34936
34936
|
In Nx 18, generating projects will no longer derive the name and root.
|
|
34937
34937
|
Please provide the exact project name and root in the future.`;
|
|
@@ -35007,14 +35007,14 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
35007
35007
|
if (directory === relativeCwd || directory.startsWith(`${relativeCwd}/`)) {
|
|
35008
35008
|
asProvidedProjectDirectory = directory;
|
|
35009
35009
|
} else {
|
|
35010
|
-
asProvidedProjectDirectory =
|
|
35010
|
+
asProvidedProjectDirectory = joinPathFragments2(relativeCwd, directory);
|
|
35011
35011
|
}
|
|
35012
35012
|
} else if (options2.rootProject) {
|
|
35013
35013
|
asProvidedProjectDirectory = ".";
|
|
35014
35014
|
} else {
|
|
35015
35015
|
asProvidedProjectDirectory = relativeCwd;
|
|
35016
35016
|
if (!relativeCwd.endsWith(asProvidedProjectName) && !relativeCwd.endsWith(options2.name)) {
|
|
35017
|
-
asProvidedProjectDirectory =
|
|
35017
|
+
asProvidedProjectDirectory = joinPathFragments2(relativeCwd, asProvidedProjectName);
|
|
35018
35018
|
}
|
|
35019
35019
|
}
|
|
35020
35020
|
if (asProvidedProjectName.startsWith("@")) {
|
|
@@ -35047,7 +35047,7 @@ var require_project_name_and_root_utils = __commonJS({
|
|
|
35047
35047
|
const derivedSimpleProjectName = name;
|
|
35048
35048
|
let derivedProjectDirectory = derivedProjectDirectoryWithoutLayout;
|
|
35049
35049
|
if (derivedProjectDirectoryWithoutLayout !== ".") {
|
|
35050
|
-
derivedProjectDirectory =
|
|
35050
|
+
derivedProjectDirectory = joinPathFragments2(layoutDirectory, derivedProjectDirectory);
|
|
35051
35051
|
}
|
|
35052
35052
|
let derivedImportPath;
|
|
35053
35053
|
if (options2.projectType === "library") {
|
|
@@ -35467,9 +35467,9 @@ var require_ast_utils2 = __commonJS({
|
|
|
35467
35467
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35468
35468
|
exports.generateAst = exports.mapFilePath = exports.mapFilePaths = exports.generateFlatOverride = exports.generateRequire = exports.stringifyNodeList = exports.generatePluginExtendsElement = exports.generateSpreadElement = exports.createNodeList = exports.addCompatToFlatConfig = exports.addPluginsToExportsBlock = exports.removeCompatExtends = exports.removePlugin = exports.addBlockToFlatConfigExport = exports.addImportToFlatConfig = exports.replaceOverride = exports.hasOverride = exports.removeOverridesFromLintConfig = void 0;
|
|
35469
35469
|
var devkit_1 = require_devkit();
|
|
35470
|
-
var
|
|
35470
|
+
var ts3 = require("typescript");
|
|
35471
35471
|
function removeOverridesFromLintConfig(content) {
|
|
35472
|
-
const source =
|
|
35472
|
+
const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35473
35473
|
const exportsArray = findAllBlocks(source);
|
|
35474
35474
|
if (!exportsArray) {
|
|
35475
35475
|
return content;
|
|
@@ -35489,18 +35489,18 @@ var require_ast_utils2 = __commonJS({
|
|
|
35489
35489
|
}
|
|
35490
35490
|
exports.removeOverridesFromLintConfig = removeOverridesFromLintConfig;
|
|
35491
35491
|
function findAllBlocks(source) {
|
|
35492
|
-
return
|
|
35493
|
-
if (
|
|
35492
|
+
return ts3.forEachChild(source, function analyze(node) {
|
|
35493
|
+
if (ts3.isExpressionStatement(node) && ts3.isBinaryExpression(node.expression) && node.expression.left.getText() === "module.exports" && ts3.isArrayLiteralExpression(node.expression.right)) {
|
|
35494
35494
|
return node.expression.right.elements;
|
|
35495
35495
|
}
|
|
35496
35496
|
});
|
|
35497
35497
|
}
|
|
35498
35498
|
function isOverride(node) {
|
|
35499
|
-
return
|
|
35500
|
-
|
|
35499
|
+
return ts3.isObjectLiteralExpression(node) && node.properties.some((p) => p.name.getText() === "files") || // detect ...compat.config(...).map(...)
|
|
35500
|
+
ts3.isSpreadElement(node) && ts3.isCallExpression(node.expression) && ts3.isPropertyAccessExpression(node.expression.expression) && ts3.isArrowFunction(node.expression.arguments[0]) && ts3.isParenthesizedExpression(node.expression.arguments[0].body);
|
|
35501
35501
|
}
|
|
35502
35502
|
function hasOverride(content, lookup) {
|
|
35503
|
-
const source =
|
|
35503
|
+
const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35504
35504
|
const exportsArray = findAllBlocks(source);
|
|
35505
35505
|
if (!exportsArray) {
|
|
35506
35506
|
return false;
|
|
@@ -35508,7 +35508,7 @@ var require_ast_utils2 = __commonJS({
|
|
|
35508
35508
|
for (const node of exportsArray) {
|
|
35509
35509
|
if (isOverride(node)) {
|
|
35510
35510
|
let objSource;
|
|
35511
|
-
if (
|
|
35511
|
+
if (ts3.isObjectLiteralExpression(node)) {
|
|
35512
35512
|
objSource = node.getFullText();
|
|
35513
35513
|
} else {
|
|
35514
35514
|
const fullNodeText = node["expression"].arguments[0].body.expression.getFullText();
|
|
@@ -35528,7 +35528,7 @@ var require_ast_utils2 = __commonJS({
|
|
|
35528
35528
|
return JSON.parse(text.replace(/'/g, '"').replace(/\s([a-zA-Z0-9_]+)\s*:/g, ' "$1": '));
|
|
35529
35529
|
}
|
|
35530
35530
|
function replaceOverride(content, root, lookup, update) {
|
|
35531
|
-
const source =
|
|
35531
|
+
const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35532
35532
|
const exportsArray = findAllBlocks(source);
|
|
35533
35533
|
if (!exportsArray) {
|
|
35534
35534
|
return content;
|
|
@@ -35538,7 +35538,7 @@ var require_ast_utils2 = __commonJS({
|
|
|
35538
35538
|
if (isOverride(node)) {
|
|
35539
35539
|
let objSource;
|
|
35540
35540
|
let start, end;
|
|
35541
|
-
if (
|
|
35541
|
+
if (ts3.isObjectLiteralExpression(node)) {
|
|
35542
35542
|
objSource = node.getFullText();
|
|
35543
35543
|
start = node.properties.pos + 1;
|
|
35544
35544
|
end = node.properties.end;
|
|
@@ -35570,13 +35570,13 @@ var require_ast_utils2 = __commonJS({
|
|
|
35570
35570
|
}
|
|
35571
35571
|
exports.replaceOverride = replaceOverride;
|
|
35572
35572
|
function addImportToFlatConfig(content, variable, imp) {
|
|
35573
|
-
const printer =
|
|
35574
|
-
const source =
|
|
35575
|
-
const foundBindingVars =
|
|
35573
|
+
const printer = ts3.createPrinter({ newLine: ts3.NewLineKind.LineFeed });
|
|
35574
|
+
const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35575
|
+
const foundBindingVars = ts3.forEachChild(source, function analyze(node) {
|
|
35576
35576
|
if (!Array.isArray(variable)) {
|
|
35577
35577
|
return;
|
|
35578
35578
|
}
|
|
35579
|
-
if (
|
|
35579
|
+
if (ts3.isVariableStatement(node) && ts3.isVariableDeclaration(node.declarationList.declarations[0]) && ts3.isObjectBindingPattern(node.declarationList.declarations[0].name) && ts3.isCallExpression(node.declarationList.declarations[0].initializer) && node.declarationList.declarations[0].initializer.expression.getText() === "require" && ts3.isStringLiteral(node.declarationList.declarations[0].initializer.arguments[0]) && node.declarationList.declarations[0].initializer.arguments[0].text === imp) {
|
|
35580
35580
|
return node.declarationList.declarations[0].name.elements;
|
|
35581
35581
|
}
|
|
35582
35582
|
});
|
|
@@ -35587,8 +35587,8 @@ var require_ast_utils2 = __commonJS({
|
|
|
35587
35587
|
}
|
|
35588
35588
|
const isMultiLine = foundBindingVars.hasTrailingComma;
|
|
35589
35589
|
const pos = foundBindingVars.end;
|
|
35590
|
-
const nodes =
|
|
35591
|
-
const insert2 = printer.printList(
|
|
35590
|
+
const nodes = ts3.factory.createNodeArray(newVariables.map((v) => ts3.factory.createBindingElement(void 0, void 0, v)));
|
|
35591
|
+
const insert2 = printer.printList(ts3.ListFormat.ObjectBindingPatternElements, nodes, source);
|
|
35592
35592
|
return (0, devkit_1.applyChangesToString)(content, [
|
|
35593
35593
|
{
|
|
35594
35594
|
type: devkit_1.ChangeType.Insert,
|
|
@@ -35598,19 +35598,19 @@ ${insert2}` : `,${insert2}`
|
|
|
35598
35598
|
}
|
|
35599
35599
|
]);
|
|
35600
35600
|
}
|
|
35601
|
-
const hasSameIdentifierVar =
|
|
35601
|
+
const hasSameIdentifierVar = ts3.forEachChild(source, function analyze(node) {
|
|
35602
35602
|
if (Array.isArray(variable)) {
|
|
35603
35603
|
return;
|
|
35604
35604
|
}
|
|
35605
|
-
if (
|
|
35605
|
+
if (ts3.isVariableStatement(node) && ts3.isVariableDeclaration(node.declarationList.declarations[0]) && ts3.isIdentifier(node.declarationList.declarations[0].name) && node.declarationList.declarations[0].name.getText() === variable && ts3.isCallExpression(node.declarationList.declarations[0].initializer) && node.declarationList.declarations[0].initializer.expression.getText() === "require" && ts3.isStringLiteral(node.declarationList.declarations[0].initializer.arguments[0]) && node.declarationList.declarations[0].initializer.arguments[0].text === imp) {
|
|
35606
35606
|
return true;
|
|
35607
35607
|
}
|
|
35608
35608
|
});
|
|
35609
35609
|
if (hasSameIdentifierVar) {
|
|
35610
35610
|
return content;
|
|
35611
35611
|
}
|
|
35612
|
-
const requireStatement = generateRequire(typeof variable === "string" ? variable :
|
|
35613
|
-
const insert = printer.printNode(
|
|
35612
|
+
const requireStatement = generateRequire(typeof variable === "string" ? variable : ts3.factory.createObjectBindingPattern(variable.map((v) => ts3.factory.createBindingElement(void 0, void 0, v))), imp);
|
|
35613
|
+
const insert = printer.printNode(ts3.EmitHint.Unspecified, requireStatement, source);
|
|
35614
35614
|
return (0, devkit_1.applyChangesToString)(content, [
|
|
35615
35615
|
{
|
|
35616
35616
|
type: devkit_1.ChangeType.Insert,
|
|
@@ -35624,14 +35624,14 @@ ${insert2}` : `,${insert2}`
|
|
|
35624
35624
|
function addBlockToFlatConfigExport(content, config, options2 = {
|
|
35625
35625
|
insertAtTheEnd: true
|
|
35626
35626
|
}) {
|
|
35627
|
-
const printer =
|
|
35628
|
-
const source =
|
|
35629
|
-
const exportsArray =
|
|
35630
|
-
if (
|
|
35627
|
+
const printer = ts3.createPrinter({ newLine: ts3.NewLineKind.LineFeed });
|
|
35628
|
+
const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35629
|
+
const exportsArray = ts3.forEachChild(source, function analyze(node) {
|
|
35630
|
+
if (ts3.isExpressionStatement(node) && ts3.isBinaryExpression(node.expression) && node.expression.left.getText() === "module.exports" && ts3.isArrayLiteralExpression(node.expression.right)) {
|
|
35631
35631
|
return node.expression.right.elements;
|
|
35632
35632
|
}
|
|
35633
35633
|
});
|
|
35634
|
-
const insert = printer.printNode(
|
|
35634
|
+
const insert = printer.printNode(ts3.EmitHint.Expression, config, source);
|
|
35635
35635
|
if (options2.insertAtTheEnd) {
|
|
35636
35636
|
const index = exportsArray.length > 0 ? exportsArray.at(exportsArray.length - 1).end : exportsArray.pos;
|
|
35637
35637
|
return (0, devkit_1.applyChangesToString)(content, [
|
|
@@ -35656,10 +35656,10 @@ ${insert},`
|
|
|
35656
35656
|
}
|
|
35657
35657
|
exports.addBlockToFlatConfigExport = addBlockToFlatConfigExport;
|
|
35658
35658
|
function removePlugin(content, pluginName, pluginImport) {
|
|
35659
|
-
const source =
|
|
35659
|
+
const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35660
35660
|
const changes = [];
|
|
35661
|
-
|
|
35662
|
-
if (
|
|
35661
|
+
ts3.forEachChild(source, function analyze(node) {
|
|
35662
|
+
if (ts3.isVariableStatement(node) && ts3.isVariableDeclaration(node.declarationList.declarations[0]) && ts3.isCallExpression(node.declarationList.declarations[0].initializer) && node.declarationList.declarations[0].initializer.arguments.length && ts3.isStringLiteral(node.declarationList.declarations[0].initializer.arguments[0]) && node.declarationList.declarations[0].initializer.arguments[0].text === pluginImport) {
|
|
35663
35663
|
changes.push({
|
|
35664
35664
|
type: devkit_1.ChangeType.Delete,
|
|
35665
35665
|
start: node.pos,
|
|
@@ -35667,16 +35667,16 @@ ${insert},`
|
|
|
35667
35667
|
});
|
|
35668
35668
|
}
|
|
35669
35669
|
});
|
|
35670
|
-
|
|
35671
|
-
if (
|
|
35670
|
+
ts3.forEachChild(source, function analyze(node) {
|
|
35671
|
+
if (ts3.isExpressionStatement(node) && ts3.isBinaryExpression(node.expression) && node.expression.left.getText() === "module.exports" && ts3.isArrayLiteralExpression(node.expression.right)) {
|
|
35672
35672
|
const blockElements = node.expression.right.elements;
|
|
35673
35673
|
blockElements.forEach((element) => {
|
|
35674
|
-
if (
|
|
35674
|
+
if (ts3.isObjectLiteralExpression(element)) {
|
|
35675
35675
|
const pluginsElem = element.properties.find((prop) => prop.name?.getText() === "plugins");
|
|
35676
35676
|
if (!pluginsElem) {
|
|
35677
35677
|
return;
|
|
35678
35678
|
}
|
|
35679
|
-
if (
|
|
35679
|
+
if (ts3.isArrayLiteralExpression(pluginsElem.initializer)) {
|
|
35680
35680
|
const pluginsArray = pluginsElem.initializer;
|
|
35681
35681
|
const plugins = parseTextToJson(pluginsElem.initializer.getText().replace(STRIP_SPREAD_ELEMENTS, ""));
|
|
35682
35682
|
if (plugins.length > 1) {
|
|
@@ -35708,7 +35708,7 @@ ${insert},`
|
|
|
35708
35708
|
});
|
|
35709
35709
|
}
|
|
35710
35710
|
}
|
|
35711
|
-
} else if (
|
|
35711
|
+
} else if (ts3.isObjectLiteralExpression(pluginsElem.initializer)) {
|
|
35712
35712
|
const pluginsObj = pluginsElem.initializer;
|
|
35713
35713
|
if (pluginsElem.initializer.properties.length > 1) {
|
|
35714
35714
|
const plugin = pluginsObj.properties.find((prop) => prop.name?.["text"] === pluginName);
|
|
@@ -35745,10 +35745,10 @@ ${insert},`
|
|
|
35745
35745
|
}
|
|
35746
35746
|
exports.removePlugin = removePlugin;
|
|
35747
35747
|
function removeCompatExtends(content, compatExtends) {
|
|
35748
|
-
const source =
|
|
35748
|
+
const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35749
35749
|
const changes = [];
|
|
35750
35750
|
findAllBlocks(source).forEach((node) => {
|
|
35751
|
-
if (
|
|
35751
|
+
if (ts3.isSpreadElement(node) && ts3.isCallExpression(node.expression) && ts3.isArrowFunction(node.expression.arguments[0]) && ts3.isParenthesizedExpression(node.expression.arguments[0].body) && ts3.isPropertyAccessExpression(node.expression.expression) && ts3.isCallExpression(node.expression.expression.expression)) {
|
|
35752
35752
|
const callExp = node.expression.expression.expression;
|
|
35753
35753
|
if ((callExp.expression.getText() === "compat.config" && callExp.arguments[0].getText().includes("extends") || callExp.expression.getText() === "compat.extends") && compatExtends.some((ext2) => callExp.arguments[0].getText().includes(ext2))) {
|
|
35754
35754
|
changes.push({
|
|
@@ -35770,9 +35770,9 @@ ${insert},`
|
|
|
35770
35770
|
}
|
|
35771
35771
|
exports.removeCompatExtends = removeCompatExtends;
|
|
35772
35772
|
function addPluginsToExportsBlock(content, plugins) {
|
|
35773
|
-
const pluginsBlock =
|
|
35774
|
-
|
|
35775
|
-
return
|
|
35773
|
+
const pluginsBlock = ts3.factory.createObjectLiteralExpression([
|
|
35774
|
+
ts3.factory.createPropertyAssignment("plugins", ts3.factory.createObjectLiteralExpression(plugins.map(({ name, varName }) => {
|
|
35775
|
+
return ts3.factory.createPropertyAssignment(ts3.factory.createStringLiteral(name), ts3.factory.createIdentifier(varName));
|
|
35776
35776
|
})))
|
|
35777
35777
|
], false);
|
|
35778
35778
|
return addBlockToFlatConfigExport(content, pluginsBlock, {
|
|
@@ -35808,41 +35808,41 @@ const compat = new FlatCompat({
|
|
|
35808
35808
|
const importsList = [];
|
|
35809
35809
|
if (isFlatCompatNeeded) {
|
|
35810
35810
|
importsMap.set("@eslint/js", "js");
|
|
35811
|
-
importsList.push(generateRequire(
|
|
35812
|
-
|
|
35811
|
+
importsList.push(generateRequire(ts3.factory.createObjectBindingPattern([
|
|
35812
|
+
ts3.factory.createBindingElement(void 0, void 0, "FlatCompat")
|
|
35813
35813
|
]), "@eslint/eslintrc"));
|
|
35814
35814
|
}
|
|
35815
35815
|
Array.from(importsMap.entries()).forEach(([imp, varName]) => {
|
|
35816
35816
|
importsList.push(generateRequire(varName, imp));
|
|
35817
35817
|
});
|
|
35818
|
-
return
|
|
35818
|
+
return ts3.factory.createNodeArray([
|
|
35819
35819
|
// add plugin imports
|
|
35820
35820
|
...importsList,
|
|
35821
|
-
|
|
35821
|
+
ts3.createSourceFile("", isFlatCompatNeeded ? DEFAULT_FLAT_CONFIG : "", ts3.ScriptTarget.Latest, false, ts3.ScriptKind.JS),
|
|
35822
35822
|
// creates:
|
|
35823
35823
|
// module.exports = [ ... ];
|
|
35824
|
-
|
|
35824
|
+
ts3.factory.createExpressionStatement(ts3.factory.createBinaryExpression(ts3.factory.createPropertyAccessExpression(ts3.factory.createIdentifier("module"), ts3.factory.createIdentifier("exports")), ts3.factory.createToken(ts3.SyntaxKind.EqualsToken), ts3.factory.createArrayLiteralExpression(exportElements, true)))
|
|
35825
35825
|
]);
|
|
35826
35826
|
}
|
|
35827
35827
|
exports.createNodeList = createNodeList;
|
|
35828
35828
|
function generateSpreadElement(name) {
|
|
35829
|
-
return
|
|
35829
|
+
return ts3.factory.createSpreadElement(ts3.factory.createIdentifier(name));
|
|
35830
35830
|
}
|
|
35831
35831
|
exports.generateSpreadElement = generateSpreadElement;
|
|
35832
35832
|
function generatePluginExtendsElement(plugins) {
|
|
35833
|
-
return
|
|
35833
|
+
return ts3.factory.createSpreadElement(ts3.factory.createCallExpression(ts3.factory.createPropertyAccessExpression(ts3.factory.createIdentifier("compat"), ts3.factory.createIdentifier("extends")), void 0, plugins.map((plugin) => ts3.factory.createStringLiteral(plugin))));
|
|
35834
35834
|
}
|
|
35835
35835
|
exports.generatePluginExtendsElement = generatePluginExtendsElement;
|
|
35836
35836
|
function stringifyNodeList(nodes, root, fileName) {
|
|
35837
|
-
const printer =
|
|
35838
|
-
const resultFile =
|
|
35839
|
-
return printer.printList(
|
|
35837
|
+
const printer = ts3.createPrinter({ newLine: ts3.NewLineKind.LineFeed });
|
|
35838
|
+
const resultFile = ts3.createSourceFile((0, devkit_1.joinPathFragments)(root, fileName), "", ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
|
|
35839
|
+
return printer.printList(ts3.ListFormat.MultiLine, nodes, resultFile);
|
|
35840
35840
|
}
|
|
35841
35841
|
exports.stringifyNodeList = stringifyNodeList;
|
|
35842
35842
|
function generateRequire(variableName, imp) {
|
|
35843
|
-
return
|
|
35844
|
-
|
|
35845
|
-
],
|
|
35843
|
+
return ts3.factory.createVariableStatement(void 0, ts3.factory.createVariableDeclarationList([
|
|
35844
|
+
ts3.factory.createVariableDeclaration(variableName, void 0, void 0, ts3.factory.createCallExpression(ts3.factory.createIdentifier("require"), void 0, [ts3.factory.createStringLiteral(imp)]))
|
|
35845
|
+
], ts3.NodeFlags.Const));
|
|
35846
35846
|
}
|
|
35847
35847
|
exports.generateRequire = generateRequire;
|
|
35848
35848
|
function generateFlatOverride(override, root) {
|
|
@@ -35852,15 +35852,15 @@ const compat = new FlatCompat({
|
|
|
35852
35852
|
}
|
|
35853
35853
|
const { files, excludedFiles, rules, ...rest } = override;
|
|
35854
35854
|
const objectLiteralElements = [
|
|
35855
|
-
|
|
35855
|
+
ts3.factory.createSpreadAssignment(ts3.factory.createIdentifier("config"))
|
|
35856
35856
|
];
|
|
35857
35857
|
addTSObjectProperty(objectLiteralElements, "files", files);
|
|
35858
35858
|
addTSObjectProperty(objectLiteralElements, "excludedFiles", excludedFiles);
|
|
35859
35859
|
addTSObjectProperty(objectLiteralElements, "rules", rules);
|
|
35860
|
-
return
|
|
35861
|
-
|
|
35862
|
-
|
|
35863
|
-
], void 0,
|
|
35860
|
+
return ts3.factory.createSpreadElement(ts3.factory.createCallExpression(ts3.factory.createPropertyAccessExpression(ts3.factory.createCallExpression(ts3.factory.createPropertyAccessExpression(ts3.factory.createIdentifier("compat"), ts3.factory.createIdentifier("config")), void 0, [generateAst(rest)]), ts3.factory.createIdentifier("map")), void 0, [
|
|
35861
|
+
ts3.factory.createArrowFunction(void 0, void 0, [
|
|
35862
|
+
ts3.factory.createParameterDeclaration(void 0, void 0, "config")
|
|
35863
|
+
], void 0, ts3.factory.createToken(ts3.SyntaxKind.EqualsGreaterThanToken), ts3.factory.createParenthesizedExpression(ts3.factory.createObjectLiteralExpression(objectLiteralElements, true)))
|
|
35864
35864
|
]));
|
|
35865
35865
|
}
|
|
35866
35866
|
exports.generateFlatOverride = generateFlatOverride;
|
|
@@ -35895,35 +35895,35 @@ const compat = new FlatCompat({
|
|
|
35895
35895
|
exports.mapFilePath = mapFilePath;
|
|
35896
35896
|
function addTSObjectProperty(elements, key, value) {
|
|
35897
35897
|
if (value) {
|
|
35898
|
-
elements.push(
|
|
35898
|
+
elements.push(ts3.factory.createPropertyAssignment(key, generateAst(value)));
|
|
35899
35899
|
}
|
|
35900
35900
|
}
|
|
35901
35901
|
function generateAst(input) {
|
|
35902
35902
|
if (Array.isArray(input)) {
|
|
35903
|
-
return
|
|
35903
|
+
return ts3.factory.createArrayLiteralExpression(
|
|
35904
35904
|
input.map((item) => generateAst(item)),
|
|
35905
35905
|
input.length > 1
|
|
35906
35906
|
// multiline only if more than one item
|
|
35907
35907
|
);
|
|
35908
35908
|
}
|
|
35909
35909
|
if (input === null) {
|
|
35910
|
-
return
|
|
35910
|
+
return ts3.factory.createNull();
|
|
35911
35911
|
}
|
|
35912
35912
|
if (typeof input === "object") {
|
|
35913
|
-
return
|
|
35914
|
-
Object.entries(input).filter(([_, value]) => value !== void 0).map(([key, value]) =>
|
|
35913
|
+
return ts3.factory.createObjectLiteralExpression(
|
|
35914
|
+
Object.entries(input).filter(([_, value]) => value !== void 0).map(([key, value]) => ts3.factory.createPropertyAssignment(isValidKey(key) ? key : ts3.factory.createStringLiteral(key), generateAst(value))),
|
|
35915
35915
|
Object.keys(input).length > 1
|
|
35916
35916
|
// multiline only if more than one property
|
|
35917
35917
|
);
|
|
35918
35918
|
}
|
|
35919
35919
|
if (typeof input === "string") {
|
|
35920
|
-
return
|
|
35920
|
+
return ts3.factory.createStringLiteral(input);
|
|
35921
35921
|
}
|
|
35922
35922
|
if (typeof input === "number") {
|
|
35923
|
-
return
|
|
35923
|
+
return ts3.factory.createNumericLiteral(input);
|
|
35924
35924
|
}
|
|
35925
35925
|
if (typeof input === "boolean") {
|
|
35926
|
-
return input ?
|
|
35926
|
+
return input ? ts3.factory.createTrue() : ts3.factory.createFalse();
|
|
35927
35927
|
}
|
|
35928
35928
|
throw new Error(`Unknown type: ${typeof input} `);
|
|
35929
35929
|
}
|
|
@@ -37730,7 +37730,7 @@ var require_compile_typescript_files = __commonJS({
|
|
|
37730
37730
|
function getErrorCountFromMessage(messageText) {
|
|
37731
37731
|
return Number.parseInt(ERROR_COUNT_REGEX.exec(messageText)[1]);
|
|
37732
37732
|
}
|
|
37733
|
-
function compileTypeScriptFiles(normalizedOptions,
|
|
37733
|
+
function compileTypeScriptFiles(normalizedOptions, tscOptions, postCompilationCallback) {
|
|
37734
37734
|
const getResult = (success) => ({
|
|
37735
37735
|
success,
|
|
37736
37736
|
outfile: normalizedOptions.mainOutputPath
|
|
@@ -37739,7 +37739,7 @@ var require_compile_typescript_files = __commonJS({
|
|
|
37739
37739
|
return {
|
|
37740
37740
|
iterator: (0, async_iterable_1.createAsyncIterable)(async ({ next, done }) => {
|
|
37741
37741
|
if (normalizedOptions.watch) {
|
|
37742
|
-
const host = (0, compilation_1.compileTypeScriptWatcher)(
|
|
37742
|
+
const host = (0, compilation_1.compileTypeScriptWatcher)(tscOptions, async (d) => {
|
|
37743
37743
|
if (d.code === TYPESCRIPT_FOUND_N_ERRORS_WATCHING_FOR_FILE_CHANGES) {
|
|
37744
37744
|
await postCompilationCallback();
|
|
37745
37745
|
next(getResult(getErrorCountFromMessage(d.messageText) === 0));
|
|
@@ -37750,7 +37750,7 @@ var require_compile_typescript_files = __commonJS({
|
|
|
37750
37750
|
done();
|
|
37751
37751
|
};
|
|
37752
37752
|
} else {
|
|
37753
|
-
const { success } = (0, compilation_1.compileTypeScript)(
|
|
37753
|
+
const { success } = (0, compilation_1.compileTypeScript)(tscOptions);
|
|
37754
37754
|
await postCompilationCallback();
|
|
37755
37755
|
next(getResult(success));
|
|
37756
37756
|
done();
|
|
@@ -37913,18 +37913,18 @@ var require_typescript_diagnostic_reporters = __commonJS({
|
|
|
37913
37913
|
"use strict";
|
|
37914
37914
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37915
37915
|
exports.formatSolutionBuilderStatusReport = exports.formatDiagnosticReport = void 0;
|
|
37916
|
-
var
|
|
37916
|
+
var ts3 = require("typescript");
|
|
37917
37917
|
function formatDiagnosticReport(diagnostic, host) {
|
|
37918
37918
|
const diagnostics = new Array(1);
|
|
37919
37919
|
diagnostics[0] = diagnostic;
|
|
37920
|
-
const formattedDiagnostic = "\n" +
|
|
37920
|
+
const formattedDiagnostic = "\n" + ts3.formatDiagnosticsWithColorAndContext(diagnostics, host) + host.getNewLine();
|
|
37921
37921
|
diagnostics[0] = void 0;
|
|
37922
37922
|
return formattedDiagnostic;
|
|
37923
37923
|
}
|
|
37924
37924
|
exports.formatDiagnosticReport = formatDiagnosticReport;
|
|
37925
37925
|
function formatSolutionBuilderStatusReport(diagnostic) {
|
|
37926
37926
|
let formattedDiagnostic = `[${formatColorAndReset(getLocaleTimeString(), ForegroundColorEscapeSequences.Grey)}] `;
|
|
37927
|
-
formattedDiagnostic += `${
|
|
37927
|
+
formattedDiagnostic += `${ts3.flattenDiagnosticMessageText(diagnostic.messageText, ts3.sys.newLine)}${ts3.sys.newLine + ts3.sys.newLine}`;
|
|
37928
37928
|
return formattedDiagnostic;
|
|
37929
37929
|
}
|
|
37930
37930
|
exports.formatSolutionBuilderStatusReport = formatSolutionBuilderStatusReport;
|
|
@@ -37953,7 +37953,7 @@ var require_typescript_compilation = __commonJS({
|
|
|
37953
37953
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37954
37954
|
exports.compileTypescriptSolution = void 0;
|
|
37955
37955
|
var async_iterable_1 = require_async_iterable();
|
|
37956
|
-
var
|
|
37956
|
+
var ts3 = require("typescript");
|
|
37957
37957
|
var get_custom_transformers_factory_1 = require_get_custom_transformers_factory();
|
|
37958
37958
|
var typescript_diagnostic_reporters_1 = require_typescript_diagnostic_reporters();
|
|
37959
37959
|
var TYPESCRIPT_CANNOT_READ_FILE = 5083;
|
|
@@ -37985,11 +37985,11 @@ var require_typescript_compilation = __commonJS({
|
|
|
37985
37985
|
function* compileTS(context, logger, hooks, reporters) {
|
|
37986
37986
|
let project;
|
|
37987
37987
|
const formatDiagnosticsHost = {
|
|
37988
|
-
getCurrentDirectory: () =>
|
|
37989
|
-
getNewLine: () =>
|
|
37990
|
-
getCanonicalFileName: (filename) =>
|
|
37988
|
+
getCurrentDirectory: () => ts3.sys.getCurrentDirectory(),
|
|
37989
|
+
getNewLine: () => ts3.sys.newLine,
|
|
37990
|
+
getCanonicalFileName: (filename) => ts3.sys.useCaseSensitiveFileNames ? filename : filename.toLowerCase()
|
|
37991
37991
|
};
|
|
37992
|
-
const solutionBuilderHost =
|
|
37992
|
+
const solutionBuilderHost = ts3.createSolutionBuilderHost(
|
|
37993
37993
|
getSystem(context),
|
|
37994
37994
|
/*createProgram*/
|
|
37995
37995
|
void 0,
|
|
@@ -38008,7 +38008,7 @@ var require_typescript_compilation = __commonJS({
|
|
|
38008
38008
|
}
|
|
38009
38009
|
);
|
|
38010
38010
|
const rootNames = Object.keys(context);
|
|
38011
|
-
const solutionBuilder =
|
|
38011
|
+
const solutionBuilder = ts3.createSolutionBuilder(solutionBuilderHost, rootNames, {});
|
|
38012
38012
|
while (true) {
|
|
38013
38013
|
project = solutionBuilder.getNextInvalidatedProject();
|
|
38014
38014
|
if (!project) {
|
|
@@ -38016,17 +38016,17 @@ var require_typescript_compilation = __commonJS({
|
|
|
38016
38016
|
}
|
|
38017
38017
|
const projectContext = context[project.project];
|
|
38018
38018
|
const projectName = projectContext?.project;
|
|
38019
|
-
if (project.kind ===
|
|
38019
|
+
if (project.kind === ts3.InvalidatedProjectKind.UpdateBundle) {
|
|
38020
38020
|
logger.warn(`The project ${projectName} is using the deprecated "prepend" Typescript compiler option. This option is not supported by the batch executor and it's ignored.
|
|
38021
38021
|
`, project.project);
|
|
38022
38022
|
continue;
|
|
38023
38023
|
}
|
|
38024
38024
|
hooks?.beforeProjectCompilationCallback?.(project.project);
|
|
38025
|
-
if (project.kind ===
|
|
38025
|
+
if (project.kind === ts3.InvalidatedProjectKind.UpdateOutputFileStamps) {
|
|
38026
38026
|
logger.info(`Updating output timestamps of project "${projectName}"...
|
|
38027
38027
|
`, project.project);
|
|
38028
38028
|
const status2 = project.done();
|
|
38029
|
-
const success2 = status2 ===
|
|
38029
|
+
const success2 = status2 === ts3.ExitStatus.Success;
|
|
38030
38030
|
if (success2) {
|
|
38031
38031
|
logger.info(`Done updating output timestamps of project "${projectName}"...
|
|
38032
38032
|
`, project.project);
|
|
@@ -38038,21 +38038,21 @@ var require_typescript_compilation = __commonJS({
|
|
|
38038
38038
|
logger.info(`Compiling TypeScript files for project "${projectName}"...
|
|
38039
38039
|
`, project.project);
|
|
38040
38040
|
const status = project.done(void 0, void 0, (0, get_custom_transformers_factory_1.getCustomTrasformersFactory)(projectContext.transformers)(project.getProgram()));
|
|
38041
|
-
const success = status ===
|
|
38041
|
+
const success = status === ts3.ExitStatus.Success;
|
|
38042
38042
|
if (success) {
|
|
38043
38043
|
logger.info(`Done compiling TypeScript files for project "${projectName}".
|
|
38044
38044
|
`, project.project);
|
|
38045
38045
|
}
|
|
38046
38046
|
hooks?.afterProjectCompilationCallback?.(project.project, success);
|
|
38047
38047
|
yield {
|
|
38048
|
-
success: status ===
|
|
38048
|
+
success: status === ts3.ExitStatus.Success,
|
|
38049
38049
|
tsConfig: project.project
|
|
38050
38050
|
};
|
|
38051
38051
|
}
|
|
38052
38052
|
}
|
|
38053
38053
|
function compileTSWithWatch(context, logger, hooks, reporters) {
|
|
38054
38054
|
let project;
|
|
38055
|
-
const solutionHost =
|
|
38055
|
+
const solutionHost = ts3.createSolutionBuilderWithWatchHost(
|
|
38056
38056
|
getSystem(context),
|
|
38057
38057
|
/*createProgram*/
|
|
38058
38058
|
void 0
|
|
@@ -38080,7 +38080,7 @@ var require_typescript_compilation = __commonJS({
|
|
|
38080
38080
|
reporters?.watchStatusReporter?.(project?.project, diagnostic, newLine, options2, errorCount);
|
|
38081
38081
|
};
|
|
38082
38082
|
const rootNames = Object.keys(context);
|
|
38083
|
-
const solutionBuilder =
|
|
38083
|
+
const solutionBuilder = ts3.createSolutionBuilderWithWatch(solutionHost, rootNames, {});
|
|
38084
38084
|
const build2 = () => {
|
|
38085
38085
|
while (true) {
|
|
38086
38086
|
project = solutionBuilder.getNextInvalidatedProject();
|
|
@@ -38089,18 +38089,18 @@ var require_typescript_compilation = __commonJS({
|
|
|
38089
38089
|
}
|
|
38090
38090
|
const projectContext = context[project.project];
|
|
38091
38091
|
const projectName = projectContext.project;
|
|
38092
|
-
if (project.kind ===
|
|
38092
|
+
if (project.kind === ts3.InvalidatedProjectKind.UpdateBundle) {
|
|
38093
38093
|
logger.warn(`The project ${projectName} is using the deprecated "prepend" Typescript compiler option. This option is not supported by the batch executor and it's ignored.`);
|
|
38094
38094
|
continue;
|
|
38095
38095
|
}
|
|
38096
38096
|
hooks?.beforeProjectCompilationCallback(project.project);
|
|
38097
|
-
if (project.kind ===
|
|
38097
|
+
if (project.kind === ts3.InvalidatedProjectKind.UpdateOutputFileStamps) {
|
|
38098
38098
|
if (projectName) {
|
|
38099
38099
|
logger.info(`Updating output timestamps of project "${projectName}"...
|
|
38100
38100
|
`, project.project);
|
|
38101
38101
|
}
|
|
38102
38102
|
const status2 = project.done();
|
|
38103
|
-
const success2 = status2 ===
|
|
38103
|
+
const success2 = status2 === ts3.ExitStatus.Success;
|
|
38104
38104
|
if (projectName && success2) {
|
|
38105
38105
|
logger.info(`Done updating output timestamps of project "${projectName}"...
|
|
38106
38106
|
`, project.project);
|
|
@@ -38111,7 +38111,7 @@ var require_typescript_compilation = __commonJS({
|
|
|
38111
38111
|
logger.info(`Compiling TypeScript files for project "${projectName}"...
|
|
38112
38112
|
`, project.project);
|
|
38113
38113
|
const status = project.done(void 0, void 0, (0, get_custom_transformers_factory_1.getCustomTrasformersFactory)(projectContext.transformers)(project.getProgram()));
|
|
38114
|
-
const success = status ===
|
|
38114
|
+
const success = status === ts3.ExitStatus.Success;
|
|
38115
38115
|
if (success) {
|
|
38116
38116
|
logger.info(`Done compiling TypeScript files for project "${projectName}".
|
|
38117
38117
|
`, project.project);
|
|
@@ -38124,12 +38124,12 @@ var require_typescript_compilation = __commonJS({
|
|
|
38124
38124
|
}
|
|
38125
38125
|
function getSystem(context) {
|
|
38126
38126
|
return {
|
|
38127
|
-
...
|
|
38127
|
+
...ts3.sys,
|
|
38128
38128
|
readFile(path2, encoding) {
|
|
38129
38129
|
if (context[path2]) {
|
|
38130
38130
|
return context[path2].tsConfig.content;
|
|
38131
38131
|
}
|
|
38132
|
-
return
|
|
38132
|
+
return ts3.sys.readFile(path2, encoding);
|
|
38133
38133
|
}
|
|
38134
38134
|
};
|
|
38135
38135
|
}
|
|
@@ -38155,7 +38155,7 @@ var require_tsc_impl = __commonJS({
|
|
|
38155
38155
|
"use strict";
|
|
38156
38156
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38157
38157
|
exports.tscExecutor = exports.createTypeScriptCompilationOptions = exports.determineModuleFormatFromTsConfig = void 0;
|
|
38158
|
-
var
|
|
38158
|
+
var ts3 = require("typescript");
|
|
38159
38159
|
var copy_assets_handler_1 = require_copy_assets_handler();
|
|
38160
38160
|
var check_dependencies_1 = require_check_dependencies();
|
|
38161
38161
|
var compiler_helper_dependency_1 = require_compiler_helper_dependency();
|
|
@@ -38168,7 +38168,7 @@ var require_tsc_impl = __commonJS({
|
|
|
38168
38168
|
var create_entry_points_1 = require_create_entry_points();
|
|
38169
38169
|
function determineModuleFormatFromTsConfig(absolutePathToTsConfig) {
|
|
38170
38170
|
const tsConfig = (0, ts_config_1.readTsConfig)(absolutePathToTsConfig);
|
|
38171
|
-
if (tsConfig.options.module ===
|
|
38171
|
+
if (tsConfig.options.module === ts3.ModuleKind.ES2015 || tsConfig.options.module === ts3.ModuleKind.ES2020 || tsConfig.options.module === ts3.ModuleKind.ES2022 || tsConfig.options.module === ts3.ModuleKind.ESNext) {
|
|
38172
38172
|
return "esm";
|
|
38173
38173
|
} else {
|
|
38174
38174
|
return "cjs";
|
|
@@ -38399,9 +38399,9 @@ var require_brace_expansion2 = __commonJS({
|
|
|
38399
38399
|
}
|
|
38400
38400
|
});
|
|
38401
38401
|
|
|
38402
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
38402
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-EPAEWGCP.js
|
|
38403
38403
|
var require_chunk_EPAEWGCP = __commonJS({
|
|
38404
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
38404
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
|
|
38405
38405
|
"use strict";
|
|
38406
38406
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38407
38407
|
var version = "8.0.0";
|
|
@@ -40048,9 +40048,9 @@ var require_resolve_from = __commonJS({
|
|
|
40048
40048
|
}
|
|
40049
40049
|
});
|
|
40050
40050
|
|
|
40051
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40051
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-GQ77QZBO.js
|
|
40052
40052
|
var require_chunk_GQ77QZBO = __commonJS({
|
|
40053
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40053
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
|
|
40054
40054
|
"use strict";
|
|
40055
40055
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40056
40056
|
function _interopRequireDefault(obj) {
|
|
@@ -40328,9 +40328,9 @@ var require_chunk_GQ77QZBO = __commonJS({
|
|
|
40328
40328
|
}
|
|
40329
40329
|
});
|
|
40330
40330
|
|
|
40331
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40331
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-UIX4URMV.js
|
|
40332
40332
|
var require_chunk_UIX4URMV = __commonJS({
|
|
40333
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
40333
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
|
|
40334
40334
|
"use strict";
|
|
40335
40335
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40336
40336
|
function _interopRequireWildcard(obj) {
|
|
@@ -41264,9 +41264,9 @@ var require_dist2 = __commonJS({
|
|
|
41264
41264
|
}
|
|
41265
41265
|
});
|
|
41266
41266
|
|
|
41267
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
41267
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-7G76EW2R.js
|
|
41268
41268
|
var require_chunk_7G76EW2R = __commonJS({
|
|
41269
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
41269
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
|
|
41270
41270
|
"use strict";
|
|
41271
41271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41272
41272
|
function _interopRequireDefault(obj) {
|
|
@@ -90793,9 +90793,9 @@ var require_shared = __commonJS({
|
|
|
90793
90793
|
if (this.fsw.closed) {
|
|
90794
90794
|
return;
|
|
90795
90795
|
}
|
|
90796
|
-
const
|
|
90796
|
+
const dirname2 = sysPath$2.dirname(file);
|
|
90797
90797
|
const basename = sysPath$2.basename(file);
|
|
90798
|
-
const parent = this.fsw._getWatchedDir(
|
|
90798
|
+
const parent = this.fsw._getWatchedDir(dirname2);
|
|
90799
90799
|
let prevStats = stats;
|
|
90800
90800
|
if (parent.has(basename))
|
|
90801
90801
|
return;
|
|
@@ -90820,7 +90820,7 @@ var require_shared = __commonJS({
|
|
|
90820
90820
|
prevStats = newStats2;
|
|
90821
90821
|
}
|
|
90822
90822
|
} catch (error) {
|
|
90823
|
-
this.fsw._remove(
|
|
90823
|
+
this.fsw._remove(dirname2, basename);
|
|
90824
90824
|
}
|
|
90825
90825
|
} else if (parent.has(basename)) {
|
|
90826
90826
|
const at = newStats.atimeMs;
|
|
@@ -92942,29 +92942,29 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
92942
92942
|
var debugLog = shouldDebug ? console.log : function(_message) {
|
|
92943
92943
|
return "";
|
|
92944
92944
|
};
|
|
92945
|
-
function createVirtualTypeScriptEnvironment(
|
|
92945
|
+
function createVirtualTypeScriptEnvironment(sys2, rootFiles, ts3, compilerOptions, customTransformers) {
|
|
92946
92946
|
if (compilerOptions === void 0) {
|
|
92947
92947
|
compilerOptions = {};
|
|
92948
92948
|
}
|
|
92949
|
-
var mergedCompilerOpts = _extends({}, defaultCompilerOptions(
|
|
92950
|
-
var _createVirtualLanguag = createVirtualLanguageServiceHost(
|
|
92951
|
-
var languageService =
|
|
92949
|
+
var mergedCompilerOpts = _extends({}, defaultCompilerOptions(ts3), compilerOptions);
|
|
92950
|
+
var _createVirtualLanguag = createVirtualLanguageServiceHost(sys2, rootFiles, mergedCompilerOpts, ts3, customTransformers), languageServiceHost = _createVirtualLanguag.languageServiceHost, _updateFile = _createVirtualLanguag.updateFile;
|
|
92951
|
+
var languageService = ts3.createLanguageService(languageServiceHost);
|
|
92952
92952
|
var diagnostics = languageService.getCompilerOptionsDiagnostics();
|
|
92953
92953
|
if (diagnostics.length) {
|
|
92954
|
-
var compilerHost = createVirtualCompilerHost(
|
|
92955
|
-
throw new Error(
|
|
92954
|
+
var compilerHost = createVirtualCompilerHost(sys2, compilerOptions, ts3);
|
|
92955
|
+
throw new Error(ts3.formatDiagnostics(diagnostics, compilerHost.compilerHost));
|
|
92956
92956
|
}
|
|
92957
92957
|
return {
|
|
92958
92958
|
// @ts-ignore
|
|
92959
92959
|
name: "vfs",
|
|
92960
|
-
sys,
|
|
92960
|
+
sys: sys2,
|
|
92961
92961
|
languageService,
|
|
92962
92962
|
getSourceFile: function getSourceFile(fileName) {
|
|
92963
92963
|
var _languageService$getP;
|
|
92964
92964
|
return (_languageService$getP = languageService.getProgram()) == null ? void 0 : _languageService$getP.getSourceFile(fileName);
|
|
92965
92965
|
},
|
|
92966
92966
|
createFile: function createFile(fileName, content) {
|
|
92967
|
-
_updateFile(
|
|
92967
|
+
_updateFile(ts3.createSourceFile(fileName, content, mergedCompilerOpts.target, false));
|
|
92968
92968
|
},
|
|
92969
92969
|
updateFile: function updateFile(fileName, content, optPrevTextSpan) {
|
|
92970
92970
|
var prevSourceFile = languageService.getProgram().getSourceFile(fileName);
|
|
@@ -92972,9 +92972,9 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
92972
92972
|
throw new Error("Did not find a source file for " + fileName);
|
|
92973
92973
|
}
|
|
92974
92974
|
var prevFullContents = prevSourceFile.text;
|
|
92975
|
-
var prevTextSpan = optPrevTextSpan != null ? optPrevTextSpan :
|
|
92975
|
+
var prevTextSpan = optPrevTextSpan != null ? optPrevTextSpan : ts3.createTextSpan(0, prevFullContents.length);
|
|
92976
92976
|
var newText = prevFullContents.slice(0, prevTextSpan.start) + content + prevFullContents.slice(prevTextSpan.start + prevTextSpan.length);
|
|
92977
|
-
var newSourceFile =
|
|
92977
|
+
var newSourceFile = ts3.updateSourceFile(prevSourceFile, newText, {
|
|
92978
92978
|
span: prevTextSpan,
|
|
92979
92979
|
newLength: content.length
|
|
92980
92980
|
});
|
|
@@ -92982,11 +92982,11 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
92982
92982
|
}
|
|
92983
92983
|
};
|
|
92984
92984
|
}
|
|
92985
|
-
var knownLibFilesForCompilerOptions = function knownLibFilesForCompilerOptions2(compilerOptions,
|
|
92986
|
-
var target = compilerOptions.target ||
|
|
92985
|
+
var knownLibFilesForCompilerOptions = function knownLibFilesForCompilerOptions2(compilerOptions, ts3) {
|
|
92986
|
+
var target = compilerOptions.target || ts3.ScriptTarget.ES5;
|
|
92987
92987
|
var lib = compilerOptions.lib || [];
|
|
92988
92988
|
var files = ["lib.d.ts", "lib.decorators.d.ts", "lib.decorators.legacy.d.ts", "lib.dom.d.ts", "lib.dom.iterable.d.ts", "lib.webworker.d.ts", "lib.webworker.importscripts.d.ts", "lib.webworker.iterable.d.ts", "lib.scripthost.d.ts", "lib.es5.d.ts", "lib.es6.d.ts", "lib.es2015.collection.d.ts", "lib.es2015.core.d.ts", "lib.es2015.d.ts", "lib.es2015.generator.d.ts", "lib.es2015.iterable.d.ts", "lib.es2015.promise.d.ts", "lib.es2015.proxy.d.ts", "lib.es2015.reflect.d.ts", "lib.es2015.symbol.d.ts", "lib.es2015.symbol.wellknown.d.ts", "lib.es2016.array.include.d.ts", "lib.es2016.d.ts", "lib.es2016.full.d.ts", "lib.es2017.d.ts", "lib.es2017.date.d.ts", "lib.es2017.full.d.ts", "lib.es2017.intl.d.ts", "lib.es2017.object.d.ts", "lib.es2017.sharedmemory.d.ts", "lib.es2017.string.d.ts", "lib.es2017.typedarrays.d.ts", "lib.es2018.asyncgenerator.d.ts", "lib.es2018.asynciterable.d.ts", "lib.es2018.d.ts", "lib.es2018.full.d.ts", "lib.es2018.intl.d.ts", "lib.es2018.promise.d.ts", "lib.es2018.regexp.d.ts", "lib.es2019.array.d.ts", "lib.es2019.d.ts", "lib.es2019.full.d.ts", "lib.es2019.intl.d.ts", "lib.es2019.object.d.ts", "lib.es2019.string.d.ts", "lib.es2019.symbol.d.ts", "lib.es2020.bigint.d.ts", "lib.es2020.d.ts", "lib.es2020.date.d.ts", "lib.es2020.full.d.ts", "lib.es2020.intl.d.ts", "lib.es2020.number.d.ts", "lib.es2020.promise.d.ts", "lib.es2020.sharedmemory.d.ts", "lib.es2020.string.d.ts", "lib.es2020.symbol.wellknown.d.ts", "lib.es2021.d.ts", "lib.es2021.full.d.ts", "lib.es2021.intl.d.ts", "lib.es2021.promise.d.ts", "lib.es2021.string.d.ts", "lib.es2021.weakref.d.ts", "lib.es2022.array.d.ts", "lib.es2022.d.ts", "lib.es2022.error.d.ts", "lib.es2022.full.d.ts", "lib.es2022.intl.d.ts", "lib.es2022.object.d.ts", "lib.es2022.regexp.d.ts", "lib.es2022.sharedmemory.d.ts", "lib.es2022.string.d.ts", "lib.es2023.array.d.ts", "lib.es2023.collection.d.ts", "lib.es2023.d.ts", "lib.es2023.full.d.ts", "lib.esnext.array.d.ts", "lib.esnext.asynciterable.d.ts", "lib.esnext.bigint.d.ts", "lib.esnext.d.ts", "lib.esnext.decorators.d.ts", "lib.esnext.disposable.d.ts", "lib.esnext.full.d.ts", "lib.esnext.intl.d.ts", "lib.esnext.promise.d.ts", "lib.esnext.string.d.ts", "lib.esnext.symbol.d.ts", "lib.esnext.weakref.d.ts"];
|
|
92989
|
-
var targetToCut =
|
|
92989
|
+
var targetToCut = ts3.ScriptTarget[target];
|
|
92990
92990
|
var matches = files.filter(function(f) {
|
|
92991
92991
|
return f.startsWith("lib." + targetToCut.toLowerCase());
|
|
92992
92992
|
});
|
|
@@ -93056,10 +93056,10 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
93056
93056
|
var addFilesForTypesIntoFolder = function addFilesForTypesIntoFolder2(map) {
|
|
93057
93057
|
return addAllFilesFromFolder(map, "node_modules/@types");
|
|
93058
93058
|
};
|
|
93059
|
-
var createDefaultMapFromCDN = function createDefaultMapFromCDN2(options2, version, cache,
|
|
93059
|
+
var createDefaultMapFromCDN = function createDefaultMapFromCDN2(options2, version, cache, ts3, lzstring, fetcher, storer) {
|
|
93060
93060
|
var fetchlike = fetcher || fetch;
|
|
93061
93061
|
var fsMap2 = /* @__PURE__ */ new Map();
|
|
93062
|
-
var files = knownLibFilesForCompilerOptions(options2,
|
|
93062
|
+
var files = knownLibFilesForCompilerOptions(options2, ts3);
|
|
93063
93063
|
var prefix = "https://typescript.azureedge.net/cdn/" + version + "/typescript/lib/";
|
|
93064
93064
|
function zip(str) {
|
|
93065
93065
|
return lzstring ? lzstring.compressToUTF16(str) : str;
|
|
@@ -93130,16 +93130,16 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
93130
93130
|
return res;
|
|
93131
93131
|
};
|
|
93132
93132
|
}
|
|
93133
|
-
var defaultCompilerOptions = function defaultCompilerOptions2(
|
|
93134
|
-
return _extends({},
|
|
93135
|
-
jsx:
|
|
93133
|
+
var defaultCompilerOptions = function defaultCompilerOptions2(ts3) {
|
|
93134
|
+
return _extends({}, ts3.getDefaultCompilerOptions(), {
|
|
93135
|
+
jsx: ts3.JsxEmit.React,
|
|
93136
93136
|
strict: true,
|
|
93137
93137
|
esModuleInterop: true,
|
|
93138
|
-
module:
|
|
93138
|
+
module: ts3.ModuleKind.ESNext,
|
|
93139
93139
|
suppressOutputPathCheck: true,
|
|
93140
93140
|
skipLibCheck: true,
|
|
93141
93141
|
skipDefaultLibCheck: true,
|
|
93142
|
-
moduleResolution:
|
|
93142
|
+
moduleResolution: ts3.ModuleResolutionKind.NodeJs
|
|
93143
93143
|
});
|
|
93144
93144
|
};
|
|
93145
93145
|
var libize = function libize2(path2) {
|
|
@@ -93191,10 +93191,10 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
93191
93191
|
}
|
|
93192
93192
|
};
|
|
93193
93193
|
}
|
|
93194
|
-
function createFSBackedSystem(files, _projectRoot,
|
|
93194
|
+
function createFSBackedSystem(files, _projectRoot, ts3, tsLibDirectory) {
|
|
93195
93195
|
var root = _projectRoot + "/vfs";
|
|
93196
93196
|
var path2 = requirePath();
|
|
93197
|
-
var nodeSys =
|
|
93197
|
+
var nodeSys = ts3.sys;
|
|
93198
93198
|
var tsLib = tsLibDirectory != null ? tsLibDirectory : path2.dirname(require.resolve("typescript"));
|
|
93199
93199
|
return {
|
|
93200
93200
|
// @ts-ignore
|
|
@@ -93265,46 +93265,46 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
93265
93265
|
}
|
|
93266
93266
|
};
|
|
93267
93267
|
}
|
|
93268
|
-
function createVirtualCompilerHost(
|
|
93268
|
+
function createVirtualCompilerHost(sys2, compilerOptions, ts3) {
|
|
93269
93269
|
var sourceFiles = /* @__PURE__ */ new Map();
|
|
93270
93270
|
var save = function save2(sourceFile) {
|
|
93271
93271
|
sourceFiles.set(sourceFile.fileName, sourceFile);
|
|
93272
93272
|
return sourceFile;
|
|
93273
93273
|
};
|
|
93274
93274
|
var vHost = {
|
|
93275
|
-
compilerHost: _extends({},
|
|
93275
|
+
compilerHost: _extends({}, sys2, {
|
|
93276
93276
|
getCanonicalFileName: function getCanonicalFileName(fileName) {
|
|
93277
93277
|
return fileName;
|
|
93278
93278
|
},
|
|
93279
93279
|
getDefaultLibFileName: function getDefaultLibFileName() {
|
|
93280
|
-
return "/" +
|
|
93280
|
+
return "/" + ts3.getDefaultLibFileName(compilerOptions);
|
|
93281
93281
|
},
|
|
93282
93282
|
// getDefaultLibLocation: () => '/',
|
|
93283
93283
|
getDirectories: function getDirectories() {
|
|
93284
93284
|
return [];
|
|
93285
93285
|
},
|
|
93286
93286
|
getNewLine: function getNewLine() {
|
|
93287
|
-
return
|
|
93287
|
+
return sys2.newLine;
|
|
93288
93288
|
},
|
|
93289
93289
|
getSourceFile: function getSourceFile(fileName) {
|
|
93290
|
-
return sourceFiles.get(fileName) || save(
|
|
93290
|
+
return sourceFiles.get(fileName) || save(ts3.createSourceFile(fileName, sys2.readFile(fileName), compilerOptions.target || defaultCompilerOptions(ts3).target, false));
|
|
93291
93291
|
},
|
|
93292
93292
|
useCaseSensitiveFileNames: function useCaseSensitiveFileNames() {
|
|
93293
|
-
return
|
|
93293
|
+
return sys2.useCaseSensitiveFileNames;
|
|
93294
93294
|
}
|
|
93295
93295
|
}),
|
|
93296
93296
|
updateFile: function updateFile(sourceFile) {
|
|
93297
93297
|
var alreadyExists = sourceFiles.has(sourceFile.fileName);
|
|
93298
|
-
|
|
93298
|
+
sys2.writeFile(sourceFile.fileName, sourceFile.text);
|
|
93299
93299
|
sourceFiles.set(sourceFile.fileName, sourceFile);
|
|
93300
93300
|
return alreadyExists;
|
|
93301
93301
|
}
|
|
93302
93302
|
};
|
|
93303
93303
|
return vHost;
|
|
93304
93304
|
}
|
|
93305
|
-
function createVirtualLanguageServiceHost(
|
|
93306
|
-
var
|
|
93307
|
-
var _createVirtualCompile = createVirtualCompilerHost(
|
|
93305
|
+
function createVirtualLanguageServiceHost(sys2, rootFiles, compilerOptions, ts3, customTransformers) {
|
|
93306
|
+
var fileNames2 = [].concat(rootFiles);
|
|
93307
|
+
var _createVirtualCompile = createVirtualCompilerHost(sys2, compilerOptions, ts3), compilerHost = _createVirtualCompile.compilerHost, _updateFile2 = _createVirtualCompile.updateFile;
|
|
93308
93308
|
var fileVersions = /* @__PURE__ */ new Map();
|
|
93309
93309
|
var projectVersion = 0;
|
|
93310
93310
|
var languageServiceHost = _extends({}, compilerHost, {
|
|
@@ -93326,27 +93326,27 @@ var require_vfs_cjs_development = __commonJS({
|
|
|
93326
93326
|
// is used in bisecting for changes, it needs to guard against being busted in that
|
|
93327
93327
|
// couple-week period, so we defensively make a slice here.
|
|
93328
93328
|
getScriptFileNames: function getScriptFileNames() {
|
|
93329
|
-
return
|
|
93329
|
+
return fileNames2.slice();
|
|
93330
93330
|
},
|
|
93331
93331
|
getScriptSnapshot: function getScriptSnapshot(fileName) {
|
|
93332
|
-
var contents =
|
|
93332
|
+
var contents = sys2.readFile(fileName);
|
|
93333
93333
|
if (contents) {
|
|
93334
|
-
return
|
|
93334
|
+
return ts3.ScriptSnapshot.fromString(contents);
|
|
93335
93335
|
}
|
|
93336
93336
|
return;
|
|
93337
93337
|
},
|
|
93338
93338
|
getScriptVersion: function getScriptVersion(fileName) {
|
|
93339
93339
|
return fileVersions.get(fileName) || "0";
|
|
93340
93340
|
},
|
|
93341
|
-
writeFile:
|
|
93341
|
+
writeFile: sys2.writeFile
|
|
93342
93342
|
});
|
|
93343
93343
|
var lsHost = {
|
|
93344
93344
|
languageServiceHost,
|
|
93345
93345
|
updateFile: function updateFile(sourceFile) {
|
|
93346
93346
|
projectVersion++;
|
|
93347
93347
|
fileVersions.set(sourceFile.fileName, projectVersion.toString());
|
|
93348
|
-
if (!
|
|
93349
|
-
|
|
93348
|
+
if (!fileNames2.includes(sourceFile.fileName)) {
|
|
93349
|
+
fileNames2.push(sourceFile.fileName);
|
|
93350
93350
|
}
|
|
93351
93351
|
_updateFile2(sourceFile);
|
|
93352
93352
|
}
|
|
@@ -94781,9 +94781,9 @@ var require_nodefs_handler = __commonJS({
|
|
|
94781
94781
|
if (this.fsw.closed) {
|
|
94782
94782
|
return;
|
|
94783
94783
|
}
|
|
94784
|
-
const
|
|
94784
|
+
const dirname2 = sysPath.dirname(file);
|
|
94785
94785
|
const basename = sysPath.basename(file);
|
|
94786
|
-
const parent = this.fsw._getWatchedDir(
|
|
94786
|
+
const parent = this.fsw._getWatchedDir(dirname2);
|
|
94787
94787
|
let prevStats = stats;
|
|
94788
94788
|
if (parent.has(basename))
|
|
94789
94789
|
return;
|
|
@@ -94808,7 +94808,7 @@ var require_nodefs_handler = __commonJS({
|
|
|
94808
94808
|
prevStats = newStats2;
|
|
94809
94809
|
}
|
|
94810
94810
|
} catch (error) {
|
|
94811
|
-
this.fsw._remove(
|
|
94811
|
+
this.fsw._remove(dirname2, basename);
|
|
94812
94812
|
}
|
|
94813
94813
|
} else if (parent.has(basename)) {
|
|
94814
94814
|
const at = newStats.atimeMs;
|
|
@@ -96264,9 +96264,9 @@ var require_chokidar = __commonJS({
|
|
|
96264
96264
|
}
|
|
96265
96265
|
});
|
|
96266
96266
|
|
|
96267
|
-
// node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
96267
|
+
// node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/index.js
|
|
96268
96268
|
var require_dist6 = __commonJS({
|
|
96269
|
-
"node_modules/.pnpm/tsup@8.0.0_patch_hash=
|
|
96269
|
+
"node_modules/.pnpm/tsup@8.0.0_patch_hash=v3i5izuihlhi3k74xpov7onvhm_@microsoft+api-extractor@7.38.3_@swc+core@1._3j6ypyhhwgwauhbu54hri2onty/node_modules/tsup/dist/index.js"(exports) {
|
|
96270
96270
|
"use strict";
|
|
96271
96271
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
96272
96272
|
function _interopRequireDefault(obj) {
|
|
@@ -98552,21 +98552,6 @@ var require_dist6 = __commonJS({
|
|
|
98552
98552
|
}
|
|
98553
98553
|
return fileMapping;
|
|
98554
98554
|
}
|
|
98555
|
-
var getFile = (name, logger3) => {
|
|
98556
|
-
logger3.info("tsc", `Reading file content for: ${name}`);
|
|
98557
|
-
return _fs2.default.promises.readFile(name, "utf8");
|
|
98558
|
-
};
|
|
98559
|
-
var addFile = async (name, map, options2, logger3) => {
|
|
98560
|
-
let relativeName = name.replaceAll("/", "\\").replace(options2.workspaceRoot, "").replaceAll("\\", "/");
|
|
98561
|
-
if (relativeName.startsWith("/")) {
|
|
98562
|
-
relativeName = relativeName.substring(1);
|
|
98563
|
-
}
|
|
98564
|
-
if (map && !map.has(relativeName)) {
|
|
98565
|
-
logger3.info("tsc", `Adding file to FS Map: ${relativeName}`);
|
|
98566
|
-
const file = await getFile(name, logger3);
|
|
98567
|
-
map.set(relativeName, file);
|
|
98568
|
-
}
|
|
98569
|
-
};
|
|
98570
98555
|
async function emit(options2, compilerOptions, tsconfig) {
|
|
98571
98556
|
logger.info("tsc", `Trying to find ${tsconfig || "tsconfig.json"}`);
|
|
98572
98557
|
let rawTsconfig = _bundlerequire.loadTsConfig.call(
|
|
@@ -98589,82 +98574,18 @@ var require_dist6 = __commonJS({
|
|
|
98589
98574
|
logger.info("tsc", "Raw tsconfig.json: ");
|
|
98590
98575
|
logger.info("tsc", rawTsconfig);
|
|
98591
98576
|
logger.info("tsc", "Parsing tsconfig.json");
|
|
98592
|
-
|
|
98593
|
-
|
|
98594
|
-
|
|
98595
|
-
|
|
98596
|
-
|
|
98597
|
-
|
|
98598
|
-
|
|
98599
|
-
|
|
98600
|
-
|
|
98601
|
-
|
|
98602
|
-
|
|
98603
|
-
|
|
98604
|
-
declarationDir,
|
|
98605
|
-
emitDeclarationOnly: true
|
|
98606
|
-
},
|
|
98607
|
-
files: [
|
|
98608
|
-
...rawTsconfig.data.files ?? [],
|
|
98609
|
-
...rawTsconfig.files ?? []
|
|
98610
|
-
],
|
|
98611
|
-
include: [
|
|
98612
|
-
...rawTsconfig.data.include?.map?.((include) => _path.join(
|
|
98613
|
-
options2.projectRoot,
|
|
98614
|
-
include
|
|
98615
|
-
)) ?? []
|
|
98616
|
-
],
|
|
98617
|
-
exclude: [
|
|
98618
|
-
...rawTsconfig.data.exclude?.map?.((exclude) => _path.join(
|
|
98619
|
-
options2.projectRoot,
|
|
98620
|
-
exclude
|
|
98621
|
-
)) ?? []
|
|
98622
|
-
]
|
|
98623
|
-
},
|
|
98624
|
-
_typescript2.default.sys,
|
|
98625
|
-
options2.workspaceRoot ? options2.workspaceRoot : tsconfig ? _path.dirname.call(void 0, tsconfig) : options2.projectRoot
|
|
98626
|
-
);
|
|
98627
|
-
logger.info("tsc", parsedTsconfig);
|
|
98628
|
-
const fsMap2 = await _tsvfs2.createDefaultMapFromNodeModules(
|
|
98629
|
-
parsedTsconfig.options,
|
|
98630
|
-
_typescript2.default,
|
|
98631
|
-
options2.workspaceRoot
|
|
98632
|
-
);
|
|
98633
|
-
logger.info("tsc", "Created FS Map");
|
|
98634
|
-
await Promise.all(parsedTsconfig.fileNames.map((fileName) => addFile(fileName, fsMap2, options2, logger)));
|
|
98635
|
-
logger.info("tsc", "Added files to FS Map");
|
|
98636
|
-
const system = _tsvfs2.createFSBackedSystem(
|
|
98637
|
-
fsMap2,
|
|
98638
|
-
options2.workspaceRoot,
|
|
98639
|
-
_typescript2.default
|
|
98640
|
-
);
|
|
98641
|
-
logger.info("tsc", "Created virtual file system");
|
|
98642
|
-
const host = _tsvfs2.createVirtualCompilerHost(
|
|
98643
|
-
system,
|
|
98644
|
-
parsedTsconfig.options,
|
|
98645
|
-
_typescript2.default
|
|
98646
|
-
);
|
|
98647
|
-
logger.info("tsc", "Created virtual compiler host");
|
|
98648
|
-
const fileNames = [...fsMap2.keys()];
|
|
98649
|
-
logger.info("tsc", `Found the following file names: ${fileNames.join(" \n")}`);
|
|
98650
|
-
const program = _typescript2.default.createProgram(
|
|
98651
|
-
fileNames,
|
|
98652
|
-
parsedTsconfig.options,
|
|
98653
|
-
host.compilerHost
|
|
98654
|
-
);
|
|
98655
|
-
logger.info("tsc", "Created program");
|
|
98656
|
-
logger.info("tsc", "Emitting DTS files with the following options: ");
|
|
98657
|
-
logger.info("tsc", parsedTsconfig.options);
|
|
98658
|
-
let fileMapping;
|
|
98659
|
-
try {
|
|
98660
|
-
logger.info("tsc", "Emitting DTS files");
|
|
98661
|
-
fileMapping = emitDtsFiles(program, host.compilerHost, options2);
|
|
98662
|
-
logger.info("tsc", "Emit DTS files complete");
|
|
98663
|
-
logger.info("tsc", fileMapping);
|
|
98664
|
-
} catch (e) {
|
|
98665
|
-
logger.error("tsc", "An error occured while emitting DTS files");
|
|
98666
|
-
logger.error("tsc", e);
|
|
98667
|
-
}
|
|
98577
|
+
compilerOptions.declarationDir = declarationDir;
|
|
98578
|
+
logger.info("tsc", "Using the following compiler Options: ");
|
|
98579
|
+
logger.info("tsc", compilerOptions);
|
|
98580
|
+
const host = _typescript2.default.createCompilerHost(compilerOptions.options);
|
|
98581
|
+
const program = _typescript2.default.createProgram({
|
|
98582
|
+
rootNames: tsconfig.fileNames,
|
|
98583
|
+
options: tsconfig.options,
|
|
98584
|
+
host
|
|
98585
|
+
});
|
|
98586
|
+
const fileMapping = emitDtsFiles(program, host, options2);
|
|
98587
|
+
logger.info("tsc", `Emitted the following file names:
|
|
98588
|
+
${fileNames.join(" \n")}`);
|
|
98668
98589
|
return getExports(options2, program, fileMapping);
|
|
98669
98590
|
}
|
|
98670
98591
|
async function runTypeScriptCompiler(options2) {
|
|
@@ -105464,6 +105385,7 @@ var import_fileutils = require("nx/src/utils/fileutils");
|
|
|
105464
105385
|
var import_path3 = require("path");
|
|
105465
105386
|
var import_prettier = require("prettier");
|
|
105466
105387
|
var import_tsup2 = __toESM(require_dist6());
|
|
105388
|
+
var ts2 = __toESM(require("typescript"));
|
|
105467
105389
|
|
|
105468
105390
|
// packages/workspace-tools/src/utils/get-workspace-root.ts
|
|
105469
105391
|
var import_find_workspace_root = require("nx/src/utils/find-workspace-root.js");
|
|
@@ -105658,8 +105580,9 @@ function modernConfig({
|
|
|
105658
105580
|
define: define2,
|
|
105659
105581
|
env: env2,
|
|
105660
105582
|
tsCdnStorage,
|
|
105661
|
-
|
|
105583
|
+
dtsTsConfig
|
|
105662
105584
|
}) {
|
|
105585
|
+
let outputPath = (0, import_path2.join)(outDir, "dist", "modern");
|
|
105663
105586
|
return {
|
|
105664
105587
|
name: "modern",
|
|
105665
105588
|
entry,
|
|
@@ -105676,7 +105599,7 @@ function modernConfig({
|
|
|
105676
105599
|
tsconfig,
|
|
105677
105600
|
projectRoot,
|
|
105678
105601
|
workspaceRoot,
|
|
105679
|
-
outDir:
|
|
105602
|
+
outDir: outputPath,
|
|
105680
105603
|
silent: !verbose,
|
|
105681
105604
|
metafile: true,
|
|
105682
105605
|
shims: true,
|
|
@@ -105690,7 +105613,11 @@ function modernConfig({
|
|
|
105690
105613
|
experimentalDts: {
|
|
105691
105614
|
entry,
|
|
105692
105615
|
compilerOptions: {
|
|
105693
|
-
|
|
105616
|
+
...dtsTsConfig,
|
|
105617
|
+
options: {
|
|
105618
|
+
...dtsTsConfig.options,
|
|
105619
|
+
outDir: outputPath
|
|
105620
|
+
}
|
|
105694
105621
|
}
|
|
105695
105622
|
},
|
|
105696
105623
|
apiReport,
|
|
@@ -105699,8 +105626,7 @@ function modernConfig({
|
|
|
105699
105626
|
sourcemap: debug,
|
|
105700
105627
|
clean: false,
|
|
105701
105628
|
tsCdnStorage,
|
|
105702
|
-
outExtension
|
|
105703
|
-
tscOptions: tscOptions2
|
|
105629
|
+
outExtension
|
|
105704
105630
|
};
|
|
105705
105631
|
}
|
|
105706
105632
|
function legacyConfig({
|
|
@@ -105717,8 +105643,9 @@ function legacyConfig({
|
|
|
105717
105643
|
define: define2,
|
|
105718
105644
|
env: env2,
|
|
105719
105645
|
tsCdnStorage,
|
|
105720
|
-
|
|
105646
|
+
dtsTsConfig
|
|
105721
105647
|
}) {
|
|
105648
|
+
let outputPath = (0, import_path2.join)(outDir, "dist", "legacy");
|
|
105722
105649
|
return {
|
|
105723
105650
|
name: "legacy",
|
|
105724
105651
|
entry,
|
|
@@ -105727,7 +105654,7 @@ function legacyConfig({
|
|
|
105727
105654
|
tsconfig,
|
|
105728
105655
|
projectRoot,
|
|
105729
105656
|
workspaceRoot,
|
|
105730
|
-
outDir:
|
|
105657
|
+
outDir: outputPath,
|
|
105731
105658
|
silent: !verbose,
|
|
105732
105659
|
metafile: true,
|
|
105733
105660
|
shims: true,
|
|
@@ -105741,7 +105668,11 @@ function legacyConfig({
|
|
|
105741
105668
|
experimentalDts: {
|
|
105742
105669
|
entry,
|
|
105743
105670
|
compilerOptions: {
|
|
105744
|
-
|
|
105671
|
+
...dtsTsConfig,
|
|
105672
|
+
options: {
|
|
105673
|
+
...dtsTsConfig.options,
|
|
105674
|
+
outDir: outputPath
|
|
105675
|
+
}
|
|
105745
105676
|
}
|
|
105746
105677
|
},
|
|
105747
105678
|
apiReport: false,
|
|
@@ -105750,8 +105681,7 @@ function legacyConfig({
|
|
|
105750
105681
|
sourcemap: debug,
|
|
105751
105682
|
clean: false,
|
|
105752
105683
|
tsCdnStorage,
|
|
105753
|
-
outExtension
|
|
105754
|
-
tscOptions: tscOptions2
|
|
105684
|
+
outExtension
|
|
105755
105685
|
};
|
|
105756
105686
|
}
|
|
105757
105687
|
function workerConfig({
|
|
@@ -105770,7 +105700,7 @@ function workerConfig({
|
|
|
105770
105700
|
define: define2,
|
|
105771
105701
|
env: env2,
|
|
105772
105702
|
tsCdnStorage,
|
|
105773
|
-
|
|
105703
|
+
dtsTsConfig
|
|
105774
105704
|
}) {
|
|
105775
105705
|
return {
|
|
105776
105706
|
name: "worker",
|
|
@@ -105795,7 +105725,11 @@ function workerConfig({
|
|
|
105795
105725
|
experimentalDts: {
|
|
105796
105726
|
entry,
|
|
105797
105727
|
compilerOptions: {
|
|
105798
|
-
|
|
105728
|
+
...dtsTsConfig,
|
|
105729
|
+
options: {
|
|
105730
|
+
...dtsTsConfig.options,
|
|
105731
|
+
outDir: (0, import_path2.join)(outDir, "dist")
|
|
105732
|
+
}
|
|
105799
105733
|
}
|
|
105800
105734
|
},
|
|
105801
105735
|
apiReport,
|
|
@@ -105804,8 +105738,7 @@ function workerConfig({
|
|
|
105804
105738
|
sourcemap: debug,
|
|
105805
105739
|
clean: false,
|
|
105806
105740
|
tsCdnStorage,
|
|
105807
|
-
outExtension
|
|
105808
|
-
tscOptions: tscOptions2
|
|
105741
|
+
outExtension
|
|
105809
105742
|
};
|
|
105810
105743
|
}
|
|
105811
105744
|
function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
@@ -105823,7 +105756,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
105823
105756
|
define: define2,
|
|
105824
105757
|
env: env2,
|
|
105825
105758
|
verbose,
|
|
105826
|
-
|
|
105759
|
+
dtsTsConfig,
|
|
105827
105760
|
...rest
|
|
105828
105761
|
}) {
|
|
105829
105762
|
const entry = globSync(
|
|
@@ -105867,7 +105800,7 @@ function getConfig(workspaceRoot, projectRoot, sourceRoot, {
|
|
|
105867
105800
|
workspaceRoot
|
|
105868
105801
|
}),
|
|
105869
105802
|
options: options2,
|
|
105870
|
-
|
|
105803
|
+
dtsTsConfig
|
|
105871
105804
|
};
|
|
105872
105805
|
if (platform === "worker") {
|
|
105873
105806
|
return (0, import_tsup.defineConfig)(workerConfig(params));
|
|
@@ -106117,11 +106050,11 @@ ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
|
|
|
106117
106050
|
sourceRoot,
|
|
106118
106051
|
workspaceRoot
|
|
106119
106052
|
);
|
|
106120
|
-
const
|
|
106053
|
+
const tscOptions = (0, import_tsc.createTypeScriptCompilationOptions)(normalize2, context);
|
|
106121
106054
|
const inlineProjectGraph = (0, import_inline.handleInliningBuild)(
|
|
106122
106055
|
context,
|
|
106123
106056
|
normalize2,
|
|
106124
|
-
|
|
106057
|
+
tscOptions.tsConfig
|
|
106125
106058
|
);
|
|
106126
106059
|
const eventEmitter = new import_node_events.EventEmitter({ captureRejections: true });
|
|
106127
106060
|
eventEmitter.on("message", (event) => {
|
|
@@ -106130,7 +106063,7 @@ ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
|
|
|
106130
106063
|
});
|
|
106131
106064
|
const config = getConfig(context.root, projectRoot, sourceRoot, {
|
|
106132
106065
|
...options2,
|
|
106133
|
-
|
|
106066
|
+
dtsTsConfig: getNormalizedTsConfig(context.root, outputPath, tscOptions),
|
|
106134
106067
|
banner: options2.banner ? { js: `// ${options2.banner}
|
|
106135
106068
|
|
|
106136
106069
|
`, css: `/* ${options2.banner} */
|
|
@@ -106154,6 +106087,32 @@ ${(0, import_fs2.readFileSync)(file, "utf-8")}`,
|
|
|
106154
106087
|
};
|
|
106155
106088
|
}
|
|
106156
106089
|
}
|
|
106090
|
+
function getNormalizedTsConfig(workspaceRoot, outputPath, options2) {
|
|
106091
|
+
const tsConfig = ts2.parseJsonConfigFileContent(
|
|
106092
|
+
{
|
|
106093
|
+
...ts2.readConfigFile(options2.tsConfig, ts2.sys.readFile).config,
|
|
106094
|
+
outDir: outputPath,
|
|
106095
|
+
allowJs: true,
|
|
106096
|
+
noEmit: false,
|
|
106097
|
+
declaration: true,
|
|
106098
|
+
declarationMap: true,
|
|
106099
|
+
emitDeclarationOnly: true,
|
|
106100
|
+
declarationDir: (0, import_path3.join)(workspaceRoot, "tmp", ".tsup", "declaration")
|
|
106101
|
+
},
|
|
106102
|
+
ts2.sys,
|
|
106103
|
+
(0, import_path3.dirname)(options2.tsConfig)
|
|
106104
|
+
);
|
|
106105
|
+
tsConfig.options.outDir = options2.outputPath;
|
|
106106
|
+
tsConfig.options.noEmitOnError = true;
|
|
106107
|
+
tsConfig.options.rootDir = options2.rootDir;
|
|
106108
|
+
if (tsConfig.options.incremental && !tsConfig.options.tsBuildInfoFile) {
|
|
106109
|
+
tsConfig.options.tsBuildInfoFile = (0, import_devkit.joinPathFragments)(
|
|
106110
|
+
options2.outputPath,
|
|
106111
|
+
"tsconfig.tsbuildinfo"
|
|
106112
|
+
);
|
|
106113
|
+
}
|
|
106114
|
+
return tsConfig;
|
|
106115
|
+
}
|
|
106157
106116
|
var build = async (options2) => {
|
|
106158
106117
|
Array.isArray(options2) ? options2.length > 0 ? options2[0].silent : false : options2.silent && console.log("\u2699\uFE0F Tsup build config: \n", options2, "\n");
|
|
106159
106118
|
if (Array.isArray(options2)) {
|