@storm-software/workspace-tools 1.13.15 → 1.13.16

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/index.js CHANGED
@@ -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: joinPathFragments3 } = (0, nx_1.requireNx)();
4209
+ var { detectPackageManager, getPackageManagerCommand, joinPathFragments: joinPathFragments4 } = (0, nx_1.requireNx)();
4210
4210
  function installPackagesTask(tree, alwaysRun = false, cwd = "", packageManager = detectPackageManager(cwd)) {
4211
- if (!tree.listChanges().find((f) => f.path === joinPathFragments3(cwd, "package.json")) && !alwaysRun) {
4211
+ if (!tree.listChanges().find((f) => f.path === joinPathFragments4(cwd, "package.json")) && !alwaysRun) {
4212
4212
  return;
4213
4213
  }
4214
- const packageJsonValue = tree.read(joinPathFragments3(cwd, "package.json"), "utf-8");
4214
+ const packageJsonValue = tree.read(joinPathFragments4(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: ts2, workspaceRoot, config, compilerOptions } = await setupTypeScript(options2);
20298
- const host = ts2.createWatchCompilerHost(config.fileNames, compilerOptions, ts2.sys, ts2.createEmitAndSemanticDiagnosticsBuilderProgram);
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(ts2, workspaceRoot, diagnostic), errorCount);
20302
+ callback(diagnostic, getFormattedDiagnostic(ts3, workspaceRoot, diagnostic), errorCount);
20303
20303
  };
20304
- const watchProgram = ts2.createWatchProgram(host);
20304
+ const watchProgram = ts3.createWatchProgram(host);
20305
20305
  const program = watchProgram.getProgram().getProgram();
20306
- const diagnostics = ts2.getPreEmitDiagnostics(program);
20306
+ const diagnostics = ts3.getPreEmitDiagnostics(program);
20307
20307
  return {
20308
20308
  close: watchProgram.close.bind(watchProgram),
20309
- preEmitErrors: diagnostics.filter((d) => d.category === ts2.DiagnosticCategory.Error).map((d) => getFormattedDiagnostic(ts2, workspaceRoot, d)),
20310
- preEmitWarnings: diagnostics.filter((d) => d.category === ts2.DiagnosticCategory.Warning).map((d) => getFormattedDiagnostic(ts2, workspaceRoot, d))
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: ts2, workspaceRoot, cacheDir, config, compilerOptions } = await setupTypeScript(options2);
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 = ts2.createIncrementalProgram({
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 = ts2.createProgram(config.fileNames, compilerOptions);
20329
+ program = ts3.createProgram(config.fileNames, compilerOptions);
20330
20330
  }
20331
20331
  const result = program.emit();
20332
- const allDiagnostics = ts2.getPreEmitDiagnostics(program).concat(result.diagnostics);
20333
- return getTypeCheckResult(ts2, allDiagnostics, workspaceRoot, config.fileNames.length, program.getSourceFiles().length, incremental);
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 ts2 = await Promise.resolve().then(() => require("typescript"));
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: ts2, workspaceRoot, cacheDir, config, compilerOptions };
20352
+ return { ts: ts3, workspaceRoot, cacheDir, config, compilerOptions };
20353
20353
  }
20354
- function getTypeCheckResult(ts2, allDiagnostics, workspaceRoot, inputFilesCount, totalFilesCount, incremental = false) {
20355
- const errors = allDiagnostics.filter((d) => d.category === ts2.DiagnosticCategory.Error).map((d) => getFormattedDiagnostic(ts2, workspaceRoot, d));
20356
- const warnings = allDiagnostics.filter((d) => d.category === ts2.DiagnosticCategory.Warning).map((d) => getFormattedDiagnostic(ts2, workspaceRoot, d));
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(ts2, workspaceRoot, diagnostic) {
20365
+ function getFormattedDiagnostic(ts3, workspaceRoot, diagnostic) {
20366
20366
  let message = "";
20367
- const reason = ts2.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
20367
+ const reason = ts3.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
20368
20368
  const category = diagnostic.category;
20369
20369
  switch (category) {
20370
- case ts2.DiagnosticCategory.Warning: {
20370
+ case ts3.DiagnosticCategory.Warning: {
20371
20371
  message += `${chalk.yellow.bold("warning")} ${chalk.gray(`TS${diagnostic.code}`)}: `;
20372
20372
  break;
20373
20373
  }
20374
- case ts2.DiagnosticCategory.Error: {
20374
+ case ts3.DiagnosticCategory.Error: {
20375
20375
  message += `${chalk.red.bold("error")} ${chalk.gray(`TS${diagnostic.code}`)}: `;
20376
20376
  break;
20377
20377
  }
20378
- case ts2.DiagnosticCategory.Suggestion:
20379
- case ts2.DiagnosticCategory.Message:
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;
@@ -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: joinPathFragments3, normalizePath, logger, readJson: readJson2, stripIndents, workspaceRoot } = (0, nx_1.requireNx)();
34934
+ var { joinPathFragments: joinPathFragments4, normalizePath, logger, readJson: readJson2, 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 = joinPathFragments3(relativeCwd, directory);
35010
+ asProvidedProjectDirectory = joinPathFragments4(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 = joinPathFragments3(relativeCwd, asProvidedProjectName);
35017
+ asProvidedProjectDirectory = joinPathFragments4(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 = joinPathFragments3(layoutDirectory, derivedProjectDirectory);
35050
+ derivedProjectDirectory = joinPathFragments4(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 ts2 = require("typescript");
35470
+ var ts3 = require("typescript");
35471
35471
  function removeOverridesFromLintConfig(content) {
35472
- const source = ts2.createSourceFile("", content, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
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 ts2.forEachChild(source, function analyze(node) {
35493
- if (ts2.isExpressionStatement(node) && ts2.isBinaryExpression(node.expression) && node.expression.left.getText() === "module.exports" && ts2.isArrayLiteralExpression(node.expression.right)) {
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 ts2.isObjectLiteralExpression(node) && node.properties.some((p) => p.name.getText() === "files") || // detect ...compat.config(...).map(...)
35500
- ts2.isSpreadElement(node) && ts2.isCallExpression(node.expression) && ts2.isPropertyAccessExpression(node.expression.expression) && ts2.isArrowFunction(node.expression.arguments[0]) && ts2.isParenthesizedExpression(node.expression.arguments[0].body);
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 = ts2.createSourceFile("", content, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
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 (ts2.isObjectLiteralExpression(node)) {
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 = ts2.createSourceFile("", content, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
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 (ts2.isObjectLiteralExpression(node)) {
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 = ts2.createPrinter({ newLine: ts2.NewLineKind.LineFeed });
35574
- const source = ts2.createSourceFile("", content, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
35575
- const foundBindingVars = ts2.forEachChild(source, function analyze(node) {
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 (ts2.isVariableStatement(node) && ts2.isVariableDeclaration(node.declarationList.declarations[0]) && ts2.isObjectBindingPattern(node.declarationList.declarations[0].name) && ts2.isCallExpression(node.declarationList.declarations[0].initializer) && node.declarationList.declarations[0].initializer.expression.getText() === "require" && ts2.isStringLiteral(node.declarationList.declarations[0].initializer.arguments[0]) && node.declarationList.declarations[0].initializer.arguments[0].text === imp) {
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 = ts2.factory.createNodeArray(newVariables.map((v) => ts2.factory.createBindingElement(void 0, void 0, v)));
35591
- const insert2 = printer.printList(ts2.ListFormat.ObjectBindingPatternElements, nodes, source);
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 = ts2.forEachChild(source, function analyze(node) {
35601
+ const hasSameIdentifierVar = ts3.forEachChild(source, function analyze(node) {
35602
35602
  if (Array.isArray(variable)) {
35603
35603
  return;
35604
35604
  }
35605
- if (ts2.isVariableStatement(node) && ts2.isVariableDeclaration(node.declarationList.declarations[0]) && ts2.isIdentifier(node.declarationList.declarations[0].name) && node.declarationList.declarations[0].name.getText() === variable && ts2.isCallExpression(node.declarationList.declarations[0].initializer) && node.declarationList.declarations[0].initializer.expression.getText() === "require" && ts2.isStringLiteral(node.declarationList.declarations[0].initializer.arguments[0]) && node.declarationList.declarations[0].initializer.arguments[0].text === imp) {
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 : ts2.factory.createObjectBindingPattern(variable.map((v) => ts2.factory.createBindingElement(void 0, void 0, v))), imp);
35613
- const insert = printer.printNode(ts2.EmitHint.Unspecified, requireStatement, source);
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 = ts2.createPrinter({ newLine: ts2.NewLineKind.LineFeed });
35628
- const source = ts2.createSourceFile("", content, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
35629
- const exportsArray = ts2.forEachChild(source, function analyze(node) {
35630
- if (ts2.isExpressionStatement(node) && ts2.isBinaryExpression(node.expression) && node.expression.left.getText() === "module.exports" && ts2.isArrayLiteralExpression(node.expression.right)) {
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(ts2.EmitHint.Expression, config, source);
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 = ts2.createSourceFile("", content, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
35659
+ const source = ts3.createSourceFile("", content, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.JS);
35660
35660
  const changes = [];
35661
- ts2.forEachChild(source, function analyze(node) {
35662
- if (ts2.isVariableStatement(node) && ts2.isVariableDeclaration(node.declarationList.declarations[0]) && ts2.isCallExpression(node.declarationList.declarations[0].initializer) && node.declarationList.declarations[0].initializer.arguments.length && ts2.isStringLiteral(node.declarationList.declarations[0].initializer.arguments[0]) && node.declarationList.declarations[0].initializer.arguments[0].text === pluginImport) {
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
- ts2.forEachChild(source, function analyze(node) {
35671
- if (ts2.isExpressionStatement(node) && ts2.isBinaryExpression(node.expression) && node.expression.left.getText() === "module.exports" && ts2.isArrayLiteralExpression(node.expression.right)) {
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 (ts2.isObjectLiteralExpression(element)) {
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 (ts2.isArrayLiteralExpression(pluginsElem.initializer)) {
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 (ts2.isObjectLiteralExpression(pluginsElem.initializer)) {
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 = ts2.createSourceFile("", content, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
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 (ts2.isSpreadElement(node) && ts2.isCallExpression(node.expression) && ts2.isArrowFunction(node.expression.arguments[0]) && ts2.isParenthesizedExpression(node.expression.arguments[0].body) && ts2.isPropertyAccessExpression(node.expression.expression) && ts2.isCallExpression(node.expression.expression.expression)) {
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 = ts2.factory.createObjectLiteralExpression([
35774
- ts2.factory.createPropertyAssignment("plugins", ts2.factory.createObjectLiteralExpression(plugins.map(({ name, varName }) => {
35775
- return ts2.factory.createPropertyAssignment(ts2.factory.createStringLiteral(name), ts2.factory.createIdentifier(varName));
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(ts2.factory.createObjectBindingPattern([
35812
- ts2.factory.createBindingElement(void 0, void 0, "FlatCompat")
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 ts2.factory.createNodeArray([
35818
+ return ts3.factory.createNodeArray([
35819
35819
  // add plugin imports
35820
35820
  ...importsList,
35821
- ts2.createSourceFile("", isFlatCompatNeeded ? DEFAULT_FLAT_CONFIG : "", ts2.ScriptTarget.Latest, false, ts2.ScriptKind.JS),
35821
+ ts3.createSourceFile("", isFlatCompatNeeded ? DEFAULT_FLAT_CONFIG : "", ts3.ScriptTarget.Latest, false, ts3.ScriptKind.JS),
35822
35822
  // creates:
35823
35823
  // module.exports = [ ... ];
35824
- ts2.factory.createExpressionStatement(ts2.factory.createBinaryExpression(ts2.factory.createPropertyAccessExpression(ts2.factory.createIdentifier("module"), ts2.factory.createIdentifier("exports")), ts2.factory.createToken(ts2.SyntaxKind.EqualsToken), ts2.factory.createArrayLiteralExpression(exportElements, true)))
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 ts2.factory.createSpreadElement(ts2.factory.createIdentifier(name));
35829
+ return ts3.factory.createSpreadElement(ts3.factory.createIdentifier(name));
35830
35830
  }
35831
35831
  exports.generateSpreadElement = generateSpreadElement;
35832
35832
  function generatePluginExtendsElement(plugins) {
35833
- return ts2.factory.createSpreadElement(ts2.factory.createCallExpression(ts2.factory.createPropertyAccessExpression(ts2.factory.createIdentifier("compat"), ts2.factory.createIdentifier("extends")), void 0, plugins.map((plugin) => ts2.factory.createStringLiteral(plugin))));
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 = ts2.createPrinter({ newLine: ts2.NewLineKind.LineFeed });
35838
- const resultFile = ts2.createSourceFile((0, devkit_1.joinPathFragments)(root, fileName), "", ts2.ScriptTarget.Latest, true, ts2.ScriptKind.JS);
35839
- return printer.printList(ts2.ListFormat.MultiLine, nodes, resultFile);
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 ts2.factory.createVariableStatement(void 0, ts2.factory.createVariableDeclarationList([
35844
- ts2.factory.createVariableDeclaration(variableName, void 0, void 0, ts2.factory.createCallExpression(ts2.factory.createIdentifier("require"), void 0, [ts2.factory.createStringLiteral(imp)]))
35845
- ], ts2.NodeFlags.Const));
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
- ts2.factory.createSpreadAssignment(ts2.factory.createIdentifier("config"))
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 ts2.factory.createSpreadElement(ts2.factory.createCallExpression(ts2.factory.createPropertyAccessExpression(ts2.factory.createCallExpression(ts2.factory.createPropertyAccessExpression(ts2.factory.createIdentifier("compat"), ts2.factory.createIdentifier("config")), void 0, [generateAst(rest)]), ts2.factory.createIdentifier("map")), void 0, [
35861
- ts2.factory.createArrowFunction(void 0, void 0, [
35862
- ts2.factory.createParameterDeclaration(void 0, void 0, "config")
35863
- ], void 0, ts2.factory.createToken(ts2.SyntaxKind.EqualsGreaterThanToken), ts2.factory.createParenthesizedExpression(ts2.factory.createObjectLiteralExpression(objectLiteralElements, true)))
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(ts2.factory.createPropertyAssignment(key, generateAst(value)));
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 ts2.factory.createArrayLiteralExpression(
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 ts2.factory.createNull();
35910
+ return ts3.factory.createNull();
35911
35911
  }
35912
35912
  if (typeof input === "object") {
35913
- return ts2.factory.createObjectLiteralExpression(
35914
- Object.entries(input).filter(([_, value]) => value !== void 0).map(([key, value]) => ts2.factory.createPropertyAssignment(isValidKey(key) ? key : ts2.factory.createStringLiteral(key), generateAst(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 ts2.factory.createStringLiteral(input);
35920
+ return ts3.factory.createStringLiteral(input);
35921
35921
  }
35922
35922
  if (typeof input === "number") {
35923
- return ts2.factory.createNumericLiteral(input);
35923
+ return ts3.factory.createNumericLiteral(input);
35924
35924
  }
35925
35925
  if (typeof input === "boolean") {
35926
- return input ? ts2.factory.createTrue() : ts2.factory.createFalse();
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, tscOptions2, postCompilationCallback) {
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)(tscOptions2, async (d) => {
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)(tscOptions2);
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 ts2 = require("typescript");
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" + ts2.formatDiagnosticsWithColorAndContext(diagnostics, host) + host.getNewLine();
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 += `${ts2.flattenDiagnosticMessageText(diagnostic.messageText, ts2.sys.newLine)}${ts2.sys.newLine + ts2.sys.newLine}`;
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 ts2 = require("typescript");
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: () => ts2.sys.getCurrentDirectory(),
37989
- getNewLine: () => ts2.sys.newLine,
37990
- getCanonicalFileName: (filename) => ts2.sys.useCaseSensitiveFileNames ? filename : filename.toLowerCase()
37988
+ getCurrentDirectory: () => ts3.sys.getCurrentDirectory(),
37989
+ getNewLine: () => ts3.sys.newLine,
37990
+ getCanonicalFileName: (filename) => ts3.sys.useCaseSensitiveFileNames ? filename : filename.toLowerCase()
37991
37991
  };
37992
- const solutionBuilderHost = ts2.createSolutionBuilderHost(
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 = ts2.createSolutionBuilder(solutionBuilderHost, rootNames, {});
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 === ts2.InvalidatedProjectKind.UpdateBundle) {
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 === ts2.InvalidatedProjectKind.UpdateOutputFileStamps) {
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 === ts2.ExitStatus.Success;
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 === ts2.ExitStatus.Success;
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 === ts2.ExitStatus.Success,
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 = ts2.createSolutionBuilderWithWatchHost(
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 = ts2.createSolutionBuilderWithWatch(solutionHost, rootNames, {});
38083
+ const solutionBuilder = ts3.createSolutionBuilderWithWatch(solutionHost, rootNames, {});
38084
38084
  const build = () => {
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 === ts2.InvalidatedProjectKind.UpdateBundle) {
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 === ts2.InvalidatedProjectKind.UpdateOutputFileStamps) {
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 === ts2.ExitStatus.Success;
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 === ts2.ExitStatus.Success;
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
- ...ts2.sys,
38127
+ ...ts3.sys,
38128
38128
  readFile(path2, encoding) {
38129
38129
  if (context[path2]) {
38130
38130
  return context[path2].tsConfig.content;
38131
38131
  }
38132
- return ts2.sys.readFile(path2, encoding);
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 ts2 = require("typescript");
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 === ts2.ModuleKind.ES2015 || tsConfig.options.module === ts2.ModuleKind.ES2020 || tsConfig.options.module === ts2.ModuleKind.ES2022 || tsConfig.options.module === ts2.ModuleKind.ESNext) {
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-EPAEWGCP.js
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-EPAEWGCP.js"(exports) {
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-GQ77QZBO.js
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-GQ77QZBO.js"(exports) {
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-UIX4URMV.js
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-UIX4URMV.js"(exports) {
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-7G76EW2R.js
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/chunk-7G76EW2R.js"(exports) {
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) {
@@ -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(sys, rootFiles, ts2, compilerOptions, customTransformers) {
92945
+ function createVirtualTypeScriptEnvironment(sys2, rootFiles, ts3, compilerOptions, customTransformers) {
92946
92946
  if (compilerOptions === void 0) {
92947
92947
  compilerOptions = {};
92948
92948
  }
92949
- var mergedCompilerOpts = _extends({}, defaultCompilerOptions(ts2), compilerOptions);
92950
- var _createVirtualLanguag = createVirtualLanguageServiceHost(sys, rootFiles, mergedCompilerOpts, ts2, customTransformers), languageServiceHost = _createVirtualLanguag.languageServiceHost, _updateFile = _createVirtualLanguag.updateFile;
92951
- var languageService = ts2.createLanguageService(languageServiceHost);
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(sys, compilerOptions, ts2);
92955
- throw new Error(ts2.formatDiagnostics(diagnostics, compilerHost.compilerHost));
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(ts2.createSourceFile(fileName, content, mergedCompilerOpts.target, false));
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 : ts2.createTextSpan(0, prevFullContents.length);
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 = ts2.updateSourceFile(prevSourceFile, newText, {
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, ts2) {
92986
- var target = compilerOptions.target || ts2.ScriptTarget.ES5;
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 = ts2.ScriptTarget[target];
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, ts2, lzstring, fetcher, storer) {
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, ts2);
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(ts2) {
93134
- return _extends({}, ts2.getDefaultCompilerOptions(), {
93135
- jsx: ts2.JsxEmit.React,
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: ts2.ModuleKind.ESNext,
93138
+ module: ts3.ModuleKind.ESNext,
93139
93139
  suppressOutputPathCheck: true,
93140
93140
  skipLibCheck: true,
93141
93141
  skipDefaultLibCheck: true,
93142
- moduleResolution: ts2.ModuleResolutionKind.NodeJs
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, ts2, tsLibDirectory) {
93194
+ function createFSBackedSystem(files, _projectRoot, ts3, tsLibDirectory) {
93195
93195
  var root = _projectRoot + "/vfs";
93196
93196
  var path2 = requirePath();
93197
- var nodeSys = ts2.sys;
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(sys, compilerOptions, ts2) {
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({}, sys, {
93275
+ compilerHost: _extends({}, sys2, {
93276
93276
  getCanonicalFileName: function getCanonicalFileName(fileName) {
93277
93277
  return fileName;
93278
93278
  },
93279
93279
  getDefaultLibFileName: function getDefaultLibFileName() {
93280
- return "/" + ts2.getDefaultLibFileName(compilerOptions);
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 sys.newLine;
93287
+ return sys2.newLine;
93288
93288
  },
93289
93289
  getSourceFile: function getSourceFile(fileName) {
93290
- return sourceFiles.get(fileName) || save(ts2.createSourceFile(fileName, sys.readFile(fileName), compilerOptions.target || defaultCompilerOptions(ts2).target, false));
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 sys.useCaseSensitiveFileNames;
93293
+ return sys2.useCaseSensitiveFileNames;
93294
93294
  }
93295
93295
  }),
93296
93296
  updateFile: function updateFile(sourceFile) {
93297
93297
  var alreadyExists = sourceFiles.has(sourceFile.fileName);
93298
- sys.writeFile(sourceFile.fileName, sourceFile.text);
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(sys, rootFiles, compilerOptions, ts2, customTransformers) {
93306
- var fileNames = [].concat(rootFiles);
93307
- var _createVirtualCompile = createVirtualCompilerHost(sys, compilerOptions, ts2), compilerHost = _createVirtualCompile.compilerHost, _updateFile2 = _createVirtualCompile.updateFile;
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 fileNames.slice();
93329
+ return fileNames2.slice();
93330
93330
  },
93331
93331
  getScriptSnapshot: function getScriptSnapshot(fileName) {
93332
- var contents = sys.readFile(fileName);
93332
+ var contents = sys2.readFile(fileName);
93333
93333
  if (contents) {
93334
- return ts2.ScriptSnapshot.fromString(contents);
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: sys.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 (!fileNames.includes(sourceFile.fileName)) {
93349
- fileNames.push(sourceFile.fileName);
93348
+ if (!fileNames2.includes(sourceFile.fileName)) {
93349
+ fileNames2.push(sourceFile.fileName);
93350
93350
  }
93351
93351
  _updateFile2(sourceFile);
93352
93352
  }
@@ -96264,9 +96264,9 @@ var require_chokidar = __commonJS({
96264
96264
  }
96265
96265
  });
96266
96266
 
96267
- // node_modules/.pnpm/tsup@8.0.0_patch_hash=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/index.js
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=73u54ejdk7ltp664vib6oxuiuu_@microsoft+api-extractor@7.38.3_@swc+core@1._pxjyxn5f3fufsl4odtbgbj3qqe/node_modules/tsup/dist/index.js"(exports) {
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
- let parsedTsconfig = _typescript2.default.parseJsonConfigFileContent(
98593
- tscOptions?.tsConfig ? tscOptions.tsConfig : {
98594
- ...rawTsconfig.data,
98595
- compilerOptions: {
98596
- ...rawTsconfig.data.compilerOptions,
98597
- ...compilerOptions,
98598
- // Enable declaration emit and disable javascript emit
98599
- outDir: options2.outDir,
98600
- allowJs: true,
98601
- noEmit: false,
98602
- declaration: true,
98603
- declarationMap: true,
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) {
@@ -105480,6 +105401,7 @@ var import_project_graph = require("nx/src/project-graph/project-graph");
105480
105401
  var import_fileutils = require("nx/src/utils/fileutils");
105481
105402
  var import_prettier = require("prettier");
105482
105403
  var import_tsup2 = __toESM(require_dist6());
105404
+ var ts2 = __toESM(require("typescript"));
105483
105405
 
105484
105406
  // packages/workspace-tools/src/utils/get-workspace-root.ts
105485
105407
  var import_find_workspace_root = require("nx/src/utils/find-workspace-root.js");