@inkeep/agents-cli 0.22.1 → 0.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1071 -855
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -82,7 +82,7 @@ var init_models = __esm({
82
82
  CLAUDE_OPUS_4_1_20250805: "anthropic/claude-opus-4-1-20250805",
83
83
  CLAUDE_SONNET_4_5: "anthropic/claude-sonnet-4-5",
84
84
  CLAUDE_SONNET_4_5_20250929: "anthropic/claude-sonnet-4-5-20250929",
85
- CLAUDE_SONNET_4: "anthropic/claude-sonnet-4",
85
+ CLAUDE_SONNET_4: "anthropic/claude-sonnet-4-0",
86
86
  CLAUDE_SONNET_4_20250514: "anthropic/claude-sonnet-4-20250514",
87
87
  CLAUDE_3_5_SONNET: "anthropic/claude-3-5-sonnet",
88
88
  CLAUDE_3_5_SONNET_20241022: "anthropic/claude-3-5-sonnet-20241022",
@@ -1025,9 +1025,9 @@ var init_request = __esm({
1025
1025
  routeIndex = 0;
1026
1026
  path;
1027
1027
  bodyCache = {};
1028
- constructor(request, path3 = "/", matchResult = [[]]) {
1028
+ constructor(request, path4 = "/", matchResult = [[]]) {
1029
1029
  this.raw = request;
1030
- this.path = path3;
1030
+ this.path = path4;
1031
1031
  this.#matchResult = matchResult;
1032
1032
  this.#validatedData = {};
1033
1033
  }
@@ -4988,16 +4988,16 @@ var require_util = __commonJS({
4988
4988
  }
4989
4989
  exports.urlGenerate = urlGenerate;
4990
4990
  function normalize(aPath) {
4991
- var path3 = aPath;
4991
+ var path4 = aPath;
4992
4992
  var url = urlParse(aPath);
4993
4993
  if (url) {
4994
4994
  if (!url.path) {
4995
4995
  return aPath;
4996
4996
  }
4997
- path3 = url.path;
4997
+ path4 = url.path;
4998
4998
  }
4999
- var isAbsolute = exports.isAbsolute(path3);
5000
- var parts = path3.split(/\/+/);
4999
+ var isAbsolute = exports.isAbsolute(path4);
5000
+ var parts = path4.split(/\/+/);
5001
5001
  for (var part, up = 0, i2 = parts.length - 1; i2 >= 0; i2--) {
5002
5002
  part = parts[i2];
5003
5003
  if (part === ".") {
@@ -5014,15 +5014,15 @@ var require_util = __commonJS({
5014
5014
  }
5015
5015
  }
5016
5016
  }
5017
- path3 = parts.join("/");
5018
- if (path3 === "") {
5019
- path3 = isAbsolute ? "/" : ".";
5017
+ path4 = parts.join("/");
5018
+ if (path4 === "") {
5019
+ path4 = isAbsolute ? "/" : ".";
5020
5020
  }
5021
5021
  if (url) {
5022
- url.path = path3;
5022
+ url.path = path4;
5023
5023
  return urlGenerate(url);
5024
5024
  }
5025
- return path3;
5025
+ return path4;
5026
5026
  }
5027
5027
  exports.normalize = normalize;
5028
5028
  function join13(aRoot, aPath) {
@@ -6662,7 +6662,7 @@ var require_source_map_support = __commonJS({
6662
6662
  "use strict";
6663
6663
  init_esm_shims();
6664
6664
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
6665
- var path3 = __require("path");
6665
+ var path4 = __require("path");
6666
6666
  var fs5;
6667
6667
  try {
6668
6668
  fs5 = __require("fs");
@@ -6723,18 +6723,18 @@ var require_source_map_support = __commonJS({
6723
6723
  };
6724
6724
  }
6725
6725
  var retrieveFile = handlerExec(retrieveFileHandlers);
6726
- retrieveFileHandlers.push(function(path4) {
6727
- path4 = path4.trim();
6728
- if (/^file:/.test(path4)) {
6729
- path4 = path4.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
6726
+ retrieveFileHandlers.push(function(path5) {
6727
+ path5 = path5.trim();
6728
+ if (/^file:/.test(path5)) {
6729
+ path5 = path5.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
6730
6730
  return drive ? "" : (
6731
6731
  // file:///C:/dir/file -> C:/dir/file
6732
6732
  "/"
6733
6733
  );
6734
6734
  });
6735
6735
  }
6736
- if (path4 in fileContentsCache) {
6737
- return fileContentsCache[path4];
6736
+ if (path5 in fileContentsCache) {
6737
+ return fileContentsCache[path5];
6738
6738
  }
6739
6739
  var contents = "";
6740
6740
  try {
@@ -6742,7 +6742,7 @@ var require_source_map_support = __commonJS({
6742
6742
  var xhr = new XMLHttpRequest();
6743
6743
  xhr.open(
6744
6744
  "GET",
6745
- path4,
6745
+ path5,
6746
6746
  /** async */
6747
6747
  false
6748
6748
  );
@@ -6750,24 +6750,24 @@ var require_source_map_support = __commonJS({
6750
6750
  if (xhr.readyState === 4 && xhr.status === 200) {
6751
6751
  contents = xhr.responseText;
6752
6752
  }
6753
- } else if (fs5.existsSync(path4)) {
6754
- contents = fs5.readFileSync(path4, "utf8");
6753
+ } else if (fs5.existsSync(path5)) {
6754
+ contents = fs5.readFileSync(path5, "utf8");
6755
6755
  }
6756
6756
  } catch (er) {
6757
6757
  }
6758
- return fileContentsCache[path4] = contents;
6758
+ return fileContentsCache[path5] = contents;
6759
6759
  });
6760
6760
  function supportRelativeURL(file, url) {
6761
6761
  if (!file) return url;
6762
- var dir = path3.dirname(file);
6762
+ var dir = path4.dirname(file);
6763
6763
  var match = /^\w+:\/\/[^\/]*/.exec(dir);
6764
6764
  var protocol = match ? match[0] : "";
6765
6765
  var startPath = dir.slice(protocol.length);
6766
6766
  if (protocol && /^\/\w\:/.test(startPath)) {
6767
6767
  protocol += "/";
6768
- return protocol + path3.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
6768
+ return protocol + path4.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
6769
6769
  }
6770
- return protocol + path3.resolve(dir.slice(protocol.length), url);
6770
+ return protocol + path4.resolve(dir.slice(protocol.length), url);
6771
6771
  }
6772
6772
  function retrieveSourceMapURL(source) {
6773
6773
  var fileData;
@@ -15004,17 +15004,17 @@ ${lanes.join("\n")}
15004
15004
  }
15005
15005
  function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
15006
15006
  const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
15007
- const path3 = toCanonicalFileName(name);
15008
- const existing = cache.get(path3);
15007
+ const path4 = toCanonicalFileName(name);
15008
+ const existing = cache.get(path4);
15009
15009
  if (existing) {
15010
15010
  existing.callbacks.push(callback);
15011
15011
  } else {
15012
- cache.set(path3, {
15012
+ cache.set(path4, {
15013
15013
  watcher: createWatcher(
15014
15014
  // Cant infer types correctly so lets satisfy checker
15015
15015
  (param1, param2, param3) => {
15016
15016
  var _a;
15017
- return (_a = cache.get(path3)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
15017
+ return (_a = cache.get(path4)) == null ? void 0 : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
15018
15018
  }
15019
15019
  ),
15020
15020
  callbacks: [callback]
@@ -15022,10 +15022,10 @@ ${lanes.join("\n")}
15022
15022
  }
15023
15023
  return {
15024
15024
  close: () => {
15025
- const watcher = cache.get(path3);
15025
+ const watcher = cache.get(path4);
15026
15026
  if (!watcher) return;
15027
15027
  if (!orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length) return;
15028
- cache.delete(path3);
15028
+ cache.delete(path4);
15029
15029
  closeFileWatcherOf(watcher);
15030
15030
  }
15031
15031
  };
@@ -15277,13 +15277,13 @@ ${lanes.join("\n")}
15277
15277
  (newChildWatches || (newChildWatches = [])).push(childWatcher);
15278
15278
  }
15279
15279
  }
15280
- function isIgnoredPath(path3, options) {
15281
- return some(ignoredPaths, (searchPath) => isInPath(path3, searchPath)) || isIgnoredByWatchOptions(path3, options, useCaseSensitiveFileNames2, getCurrentDirectory);
15280
+ function isIgnoredPath(path4, options) {
15281
+ return some(ignoredPaths, (searchPath) => isInPath(path4, searchPath)) || isIgnoredByWatchOptions(path4, options, useCaseSensitiveFileNames2, getCurrentDirectory);
15282
15282
  }
15283
- function isInPath(path3, searchPath) {
15284
- if (path3.includes(searchPath)) return true;
15283
+ function isInPath(path4, searchPath) {
15284
+ if (path4.includes(searchPath)) return true;
15285
15285
  if (useCaseSensitiveFileNames2) return false;
15286
- return toCanonicalFilePath(path3).includes(searchPath);
15286
+ return toCanonicalFilePath(path4).includes(searchPath);
15287
15287
  }
15288
15288
  }
15289
15289
  var FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => {
@@ -15661,8 +15661,8 @@ ${lanes.join("\n")}
15661
15661
  }
15662
15662
  function patchWriteFileEnsuringDirectory(sys2) {
15663
15663
  const originalWriteFile = sys2.writeFile;
15664
- sys2.writeFile = (path3, data, writeBom) => writeFileEnsuringDirectories(
15665
- path3,
15664
+ sys2.writeFile = (path4, data, writeBom) => writeFileEnsuringDirectories(
15665
+ path4,
15666
15666
  data,
15667
15667
  !!writeBom,
15668
15668
  (path22, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path22, data2, writeByteOrderMark),
@@ -15706,7 +15706,7 @@ ${lanes.join("\n")}
15706
15706
  // Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
15707
15707
  // (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
15708
15708
  fsSupportsRecursiveFsWatch,
15709
- getAccessibleSortedChildDirectories: (path3) => getAccessibleFileSystemEntries(path3).directories,
15709
+ getAccessibleSortedChildDirectories: (path4) => getAccessibleFileSystemEntries(path4).directories,
15710
15710
  realpath,
15711
15711
  tscWatchFile: process.env.TSC_WATCHFILE,
15712
15712
  useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,
@@ -15733,7 +15733,7 @@ ${lanes.join("\n")}
15733
15733
  watchFile: watchFile2,
15734
15734
  watchDirectory,
15735
15735
  preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
15736
- resolvePath: (path3) => _path.resolve(path3),
15736
+ resolvePath: (path4) => _path.resolve(path4),
15737
15737
  fileExists,
15738
15738
  directoryExists,
15739
15739
  getAccessibleFileSystemEntries,
@@ -15768,8 +15768,8 @@ ${lanes.join("\n")}
15768
15768
  }
15769
15769
  return process.memoryUsage().heapUsed;
15770
15770
  },
15771
- getFileSize(path3) {
15772
- const stat = statSync2(path3);
15771
+ getFileSize(path4) {
15772
+ const stat = statSync2(path4);
15773
15773
  if (stat == null ? void 0 : stat.isFile()) {
15774
15774
  return stat.size;
15775
15775
  }
@@ -15813,14 +15813,14 @@ ${lanes.join("\n")}
15813
15813
  }
15814
15814
  };
15815
15815
  return nodeSystem;
15816
- function statSync2(path3) {
15816
+ function statSync2(path4) {
15817
15817
  try {
15818
- return _fs.statSync(path3, statSyncOptions);
15818
+ return _fs.statSync(path4, statSyncOptions);
15819
15819
  } catch {
15820
15820
  return void 0;
15821
15821
  }
15822
15822
  }
15823
- function enableCPUProfiler(path3, cb) {
15823
+ function enableCPUProfiler(path4, cb) {
15824
15824
  if (activeSession) {
15825
15825
  cb();
15826
15826
  return false;
@@ -15835,7 +15835,7 @@ ${lanes.join("\n")}
15835
15835
  session.post("Profiler.enable", () => {
15836
15836
  session.post("Profiler.start", () => {
15837
15837
  activeSession = session;
15838
- profilePath = path3;
15838
+ profilePath = path4;
15839
15839
  cb();
15840
15840
  });
15841
15841
  });
@@ -15979,9 +15979,9 @@ ${lanes.join("\n")}
15979
15979
  }
15980
15980
  }
15981
15981
  }
15982
- function getAccessibleFileSystemEntries(path3) {
15982
+ function getAccessibleFileSystemEntries(path4) {
15983
15983
  try {
15984
- const entries = _fs.readdirSync(path3 || ".", { withFileTypes: true });
15984
+ const entries = _fs.readdirSync(path4 || ".", { withFileTypes: true });
15985
15985
  const files = [];
15986
15986
  const directories = [];
15987
15987
  for (const dirent of entries) {
@@ -15991,7 +15991,7 @@ ${lanes.join("\n")}
15991
15991
  }
15992
15992
  let stat;
15993
15993
  if (typeof dirent === "string" || dirent.isSymbolicLink()) {
15994
- const name = combinePaths(path3, entry);
15994
+ const name = combinePaths(path4, entry);
15995
15995
  stat = statSync2(name);
15996
15996
  if (!stat) {
15997
15997
  continue;
@@ -16012,11 +16012,11 @@ ${lanes.join("\n")}
16012
16012
  return emptyFileSystemEntries;
16013
16013
  }
16014
16014
  }
16015
- function readDirectory(path3, extensions, excludes, includes, depth) {
16016
- return matchFiles(path3, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
16015
+ function readDirectory(path4, extensions, excludes, includes, depth) {
16016
+ return matchFiles(path4, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
16017
16017
  }
16018
- function fileSystemEntryExists(path3, entryKind) {
16019
- const stat = statSync2(path3);
16018
+ function fileSystemEntryExists(path4, entryKind) {
16019
+ const stat = statSync2(path4);
16020
16020
  if (!stat) {
16021
16021
  return false;
16022
16022
  }
@@ -16029,47 +16029,47 @@ ${lanes.join("\n")}
16029
16029
  return false;
16030
16030
  }
16031
16031
  }
16032
- function fileExists(path3) {
16032
+ function fileExists(path4) {
16033
16033
  return fileSystemEntryExists(
16034
- path3,
16034
+ path4,
16035
16035
  0
16036
16036
  /* File */
16037
16037
  );
16038
16038
  }
16039
- function directoryExists(path3) {
16039
+ function directoryExists(path4) {
16040
16040
  return fileSystemEntryExists(
16041
- path3,
16041
+ path4,
16042
16042
  1
16043
16043
  /* Directory */
16044
16044
  );
16045
16045
  }
16046
- function getDirectories(path3) {
16047
- return getAccessibleFileSystemEntries(path3).directories.slice();
16046
+ function getDirectories(path4) {
16047
+ return getAccessibleFileSystemEntries(path4).directories.slice();
16048
16048
  }
16049
- function fsRealPathHandlingLongPath(path3) {
16050
- return path3.length < 260 ? _fs.realpathSync.native(path3) : _fs.realpathSync(path3);
16049
+ function fsRealPathHandlingLongPath(path4) {
16050
+ return path4.length < 260 ? _fs.realpathSync.native(path4) : _fs.realpathSync(path4);
16051
16051
  }
16052
- function realpath(path3) {
16052
+ function realpath(path4) {
16053
16053
  try {
16054
- return fsRealpath(path3);
16054
+ return fsRealpath(path4);
16055
16055
  } catch {
16056
- return path3;
16056
+ return path4;
16057
16057
  }
16058
16058
  }
16059
- function getModifiedTime3(path3) {
16059
+ function getModifiedTime3(path4) {
16060
16060
  var _a;
16061
- return (_a = statSync2(path3)) == null ? void 0 : _a.mtime;
16061
+ return (_a = statSync2(path4)) == null ? void 0 : _a.mtime;
16062
16062
  }
16063
- function setModifiedTime(path3, time) {
16063
+ function setModifiedTime(path4, time) {
16064
16064
  try {
16065
- _fs.utimesSync(path3, time, time);
16065
+ _fs.utimesSync(path4, time, time);
16066
16066
  } catch {
16067
16067
  return;
16068
16068
  }
16069
16069
  }
16070
- function deleteFile(path3) {
16070
+ function deleteFile(path4) {
16071
16071
  try {
16072
- return _fs.unlinkSync(path3);
16072
+ return _fs.unlinkSync(path4);
16073
16073
  } catch {
16074
16074
  return;
16075
16075
  }
@@ -16109,41 +16109,41 @@ ${lanes.join("\n")}
16109
16109
  function isAnyDirectorySeparator(charCode) {
16110
16110
  return charCode === 47 || charCode === 92;
16111
16111
  }
16112
- function isUrl(path3) {
16113
- return getEncodedRootLength(path3) < 0;
16112
+ function isUrl(path4) {
16113
+ return getEncodedRootLength(path4) < 0;
16114
16114
  }
16115
- function isRootedDiskPath(path3) {
16116
- return getEncodedRootLength(path3) > 0;
16115
+ function isRootedDiskPath(path4) {
16116
+ return getEncodedRootLength(path4) > 0;
16117
16117
  }
16118
- function isDiskPathRoot(path3) {
16119
- const rootLength = getEncodedRootLength(path3);
16120
- return rootLength > 0 && rootLength === path3.length;
16118
+ function isDiskPathRoot(path4) {
16119
+ const rootLength = getEncodedRootLength(path4);
16120
+ return rootLength > 0 && rootLength === path4.length;
16121
16121
  }
16122
- function pathIsAbsolute(path3) {
16123
- return getEncodedRootLength(path3) !== 0;
16122
+ function pathIsAbsolute(path4) {
16123
+ return getEncodedRootLength(path4) !== 0;
16124
16124
  }
16125
- function pathIsRelative(path3) {
16126
- return /^\.\.?(?:$|[\\/])/.test(path3);
16125
+ function pathIsRelative(path4) {
16126
+ return /^\.\.?(?:$|[\\/])/.test(path4);
16127
16127
  }
16128
- function pathIsBareSpecifier(path3) {
16129
- return !pathIsAbsolute(path3) && !pathIsRelative(path3);
16128
+ function pathIsBareSpecifier(path4) {
16129
+ return !pathIsAbsolute(path4) && !pathIsRelative(path4);
16130
16130
  }
16131
16131
  function hasExtension(fileName) {
16132
16132
  return getBaseFileName(fileName).includes(".");
16133
16133
  }
16134
- function fileExtensionIs(path3, extension) {
16135
- return path3.length > extension.length && endsWith(path3, extension);
16134
+ function fileExtensionIs(path4, extension) {
16135
+ return path4.length > extension.length && endsWith(path4, extension);
16136
16136
  }
16137
- function fileExtensionIsOneOf(path3, extensions) {
16137
+ function fileExtensionIsOneOf(path4, extensions) {
16138
16138
  for (const extension of extensions) {
16139
- if (fileExtensionIs(path3, extension)) {
16139
+ if (fileExtensionIs(path4, extension)) {
16140
16140
  return true;
16141
16141
  }
16142
16142
  }
16143
16143
  return false;
16144
16144
  }
16145
- function hasTrailingDirectorySeparator(path3) {
16146
- return path3.length > 0 && isAnyDirectorySeparator(path3.charCodeAt(path3.length - 1));
16145
+ function hasTrailingDirectorySeparator(path4) {
16146
+ return path4.length > 0 && isAnyDirectorySeparator(path4.charCodeAt(path4.length - 1));
16147
16147
  }
16148
16148
  function isVolumeCharacter(charCode) {
16149
16149
  return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90;
@@ -16157,111 +16157,111 @@ ${lanes.join("\n")}
16157
16157
  }
16158
16158
  return -1;
16159
16159
  }
16160
- function getEncodedRootLength(path3) {
16161
- if (!path3) return 0;
16162
- const ch0 = path3.charCodeAt(0);
16160
+ function getEncodedRootLength(path4) {
16161
+ if (!path4) return 0;
16162
+ const ch0 = path4.charCodeAt(0);
16163
16163
  if (ch0 === 47 || ch0 === 92) {
16164
- if (path3.charCodeAt(1) !== ch0) return 1;
16165
- const p1 = path3.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
16166
- if (p1 < 0) return path3.length;
16164
+ if (path4.charCodeAt(1) !== ch0) return 1;
16165
+ const p1 = path4.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
16166
+ if (p1 < 0) return path4.length;
16167
16167
  return p1 + 1;
16168
16168
  }
16169
- if (isVolumeCharacter(ch0) && path3.charCodeAt(1) === 58) {
16170
- const ch2 = path3.charCodeAt(2);
16169
+ if (isVolumeCharacter(ch0) && path4.charCodeAt(1) === 58) {
16170
+ const ch2 = path4.charCodeAt(2);
16171
16171
  if (ch2 === 47 || ch2 === 92) return 3;
16172
- if (path3.length === 2) return 2;
16172
+ if (path4.length === 2) return 2;
16173
16173
  }
16174
- const schemeEnd = path3.indexOf(urlSchemeSeparator);
16174
+ const schemeEnd = path4.indexOf(urlSchemeSeparator);
16175
16175
  if (schemeEnd !== -1) {
16176
16176
  const authorityStart = schemeEnd + urlSchemeSeparator.length;
16177
- const authorityEnd = path3.indexOf(directorySeparator, authorityStart);
16177
+ const authorityEnd = path4.indexOf(directorySeparator, authorityStart);
16178
16178
  if (authorityEnd !== -1) {
16179
- const scheme = path3.slice(0, schemeEnd);
16180
- const authority = path3.slice(authorityStart, authorityEnd);
16181
- if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path3.charCodeAt(authorityEnd + 1))) {
16182
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path3, authorityEnd + 2);
16179
+ const scheme = path4.slice(0, schemeEnd);
16180
+ const authority = path4.slice(authorityStart, authorityEnd);
16181
+ if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path4.charCodeAt(authorityEnd + 1))) {
16182
+ const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path4, authorityEnd + 2);
16183
16183
  if (volumeSeparatorEnd !== -1) {
16184
- if (path3.charCodeAt(volumeSeparatorEnd) === 47) {
16184
+ if (path4.charCodeAt(volumeSeparatorEnd) === 47) {
16185
16185
  return ~(volumeSeparatorEnd + 1);
16186
16186
  }
16187
- if (volumeSeparatorEnd === path3.length) {
16187
+ if (volumeSeparatorEnd === path4.length) {
16188
16188
  return ~volumeSeparatorEnd;
16189
16189
  }
16190
16190
  }
16191
16191
  }
16192
16192
  return ~(authorityEnd + 1);
16193
16193
  }
16194
- return ~path3.length;
16194
+ return ~path4.length;
16195
16195
  }
16196
16196
  return 0;
16197
16197
  }
16198
- function getRootLength(path3) {
16199
- const rootLength = getEncodedRootLength(path3);
16198
+ function getRootLength(path4) {
16199
+ const rootLength = getEncodedRootLength(path4);
16200
16200
  return rootLength < 0 ? ~rootLength : rootLength;
16201
16201
  }
16202
- function getDirectoryPath(path3) {
16203
- path3 = normalizeSlashes(path3);
16204
- const rootLength = getRootLength(path3);
16205
- if (rootLength === path3.length) return path3;
16206
- path3 = removeTrailingDirectorySeparator(path3);
16207
- return path3.slice(0, Math.max(rootLength, path3.lastIndexOf(directorySeparator)));
16208
- }
16209
- function getBaseFileName(path3, extensions, ignoreCase) {
16210
- path3 = normalizeSlashes(path3);
16211
- const rootLength = getRootLength(path3);
16212
- if (rootLength === path3.length) return "";
16213
- path3 = removeTrailingDirectorySeparator(path3);
16214
- const name = path3.slice(Math.max(getRootLength(path3), path3.lastIndexOf(directorySeparator) + 1));
16202
+ function getDirectoryPath(path4) {
16203
+ path4 = normalizeSlashes(path4);
16204
+ const rootLength = getRootLength(path4);
16205
+ if (rootLength === path4.length) return path4;
16206
+ path4 = removeTrailingDirectorySeparator(path4);
16207
+ return path4.slice(0, Math.max(rootLength, path4.lastIndexOf(directorySeparator)));
16208
+ }
16209
+ function getBaseFileName(path4, extensions, ignoreCase) {
16210
+ path4 = normalizeSlashes(path4);
16211
+ const rootLength = getRootLength(path4);
16212
+ if (rootLength === path4.length) return "";
16213
+ path4 = removeTrailingDirectorySeparator(path4);
16214
+ const name = path4.slice(Math.max(getRootLength(path4), path4.lastIndexOf(directorySeparator) + 1));
16215
16215
  const extension = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(name, extensions, ignoreCase) : void 0;
16216
16216
  return extension ? name.slice(0, name.length - extension.length) : name;
16217
16217
  }
16218
- function tryGetExtensionFromPath(path3, extension, stringEqualityComparer) {
16218
+ function tryGetExtensionFromPath(path4, extension, stringEqualityComparer) {
16219
16219
  if (!startsWith(extension, ".")) extension = "." + extension;
16220
- if (path3.length >= extension.length && path3.charCodeAt(path3.length - extension.length) === 46) {
16221
- const pathExtension = path3.slice(path3.length - extension.length);
16220
+ if (path4.length >= extension.length && path4.charCodeAt(path4.length - extension.length) === 46) {
16221
+ const pathExtension = path4.slice(path4.length - extension.length);
16222
16222
  if (stringEqualityComparer(pathExtension, extension)) {
16223
16223
  return pathExtension;
16224
16224
  }
16225
16225
  }
16226
16226
  }
16227
- function getAnyExtensionFromPathWorker(path3, extensions, stringEqualityComparer) {
16227
+ function getAnyExtensionFromPathWorker(path4, extensions, stringEqualityComparer) {
16228
16228
  if (typeof extensions === "string") {
16229
- return tryGetExtensionFromPath(path3, extensions, stringEqualityComparer) || "";
16229
+ return tryGetExtensionFromPath(path4, extensions, stringEqualityComparer) || "";
16230
16230
  }
16231
16231
  for (const extension of extensions) {
16232
- const result = tryGetExtensionFromPath(path3, extension, stringEqualityComparer);
16232
+ const result = tryGetExtensionFromPath(path4, extension, stringEqualityComparer);
16233
16233
  if (result) return result;
16234
16234
  }
16235
16235
  return "";
16236
16236
  }
16237
- function getAnyExtensionFromPath(path3, extensions, ignoreCase) {
16237
+ function getAnyExtensionFromPath(path4, extensions, ignoreCase) {
16238
16238
  if (extensions) {
16239
- return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path3), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
16239
+ return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path4), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
16240
16240
  }
16241
- const baseFileName = getBaseFileName(path3);
16241
+ const baseFileName = getBaseFileName(path4);
16242
16242
  const extensionIndex = baseFileName.lastIndexOf(".");
16243
16243
  if (extensionIndex >= 0) {
16244
16244
  return baseFileName.substring(extensionIndex);
16245
16245
  }
16246
16246
  return "";
16247
16247
  }
16248
- function pathComponents(path3, rootLength) {
16249
- const root = path3.substring(0, rootLength);
16250
- const rest = path3.substring(rootLength).split(directorySeparator);
16248
+ function pathComponents(path4, rootLength) {
16249
+ const root = path4.substring(0, rootLength);
16250
+ const rest = path4.substring(rootLength).split(directorySeparator);
16251
16251
  if (rest.length && !lastOrUndefined(rest)) rest.pop();
16252
16252
  return [root, ...rest];
16253
16253
  }
16254
- function getPathComponents(path3, currentDirectory = "") {
16255
- path3 = combinePaths(currentDirectory, path3);
16256
- return pathComponents(path3, getRootLength(path3));
16254
+ function getPathComponents(path4, currentDirectory = "") {
16255
+ path4 = combinePaths(currentDirectory, path4);
16256
+ return pathComponents(path4, getRootLength(path4));
16257
16257
  }
16258
16258
  function getPathFromPathComponents(pathComponents2, length2) {
16259
16259
  if (pathComponents2.length === 0) return "";
16260
16260
  const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]);
16261
16261
  return root + pathComponents2.slice(1, length2).join(directorySeparator);
16262
16262
  }
16263
- function normalizeSlashes(path3) {
16264
- return path3.includes("\\") ? path3.replace(backslashRegExp, directorySeparator) : path3;
16263
+ function normalizeSlashes(path4) {
16264
+ return path4.includes("\\") ? path4.replace(backslashRegExp, directorySeparator) : path4;
16265
16265
  }
16266
16266
  function reducePathComponents(components) {
16267
16267
  if (!some(components)) return [];
@@ -16282,39 +16282,39 @@ ${lanes.join("\n")}
16282
16282
  }
16283
16283
  return reduced;
16284
16284
  }
16285
- function combinePaths(path3, ...paths) {
16286
- if (path3) path3 = normalizeSlashes(path3);
16285
+ function combinePaths(path4, ...paths) {
16286
+ if (path4) path4 = normalizeSlashes(path4);
16287
16287
  for (let relativePath of paths) {
16288
16288
  if (!relativePath) continue;
16289
16289
  relativePath = normalizeSlashes(relativePath);
16290
- if (!path3 || getRootLength(relativePath) !== 0) {
16291
- path3 = relativePath;
16290
+ if (!path4 || getRootLength(relativePath) !== 0) {
16291
+ path4 = relativePath;
16292
16292
  } else {
16293
- path3 = ensureTrailingDirectorySeparator(path3) + relativePath;
16293
+ path4 = ensureTrailingDirectorySeparator(path4) + relativePath;
16294
16294
  }
16295
16295
  }
16296
- return path3;
16296
+ return path4;
16297
16297
  }
16298
- function resolvePath(path3, ...paths) {
16299
- return normalizePath(some(paths) ? combinePaths(path3, ...paths) : normalizeSlashes(path3));
16298
+ function resolvePath(path4, ...paths) {
16299
+ return normalizePath(some(paths) ? combinePaths(path4, ...paths) : normalizeSlashes(path4));
16300
16300
  }
16301
- function getNormalizedPathComponents(path3, currentDirectory) {
16302
- return reducePathComponents(getPathComponents(path3, currentDirectory));
16301
+ function getNormalizedPathComponents(path4, currentDirectory) {
16302
+ return reducePathComponents(getPathComponents(path4, currentDirectory));
16303
16303
  }
16304
- function getNormalizedAbsolutePath(path3, currentDirectory) {
16305
- let rootLength = getRootLength(path3);
16304
+ function getNormalizedAbsolutePath(path4, currentDirectory) {
16305
+ let rootLength = getRootLength(path4);
16306
16306
  if (rootLength === 0 && currentDirectory) {
16307
- path3 = combinePaths(currentDirectory, path3);
16308
- rootLength = getRootLength(path3);
16307
+ path4 = combinePaths(currentDirectory, path4);
16308
+ rootLength = getRootLength(path4);
16309
16309
  } else {
16310
- path3 = normalizeSlashes(path3);
16310
+ path4 = normalizeSlashes(path4);
16311
16311
  }
16312
- const simpleNormalized = simpleNormalizePath(path3);
16312
+ const simpleNormalized = simpleNormalizePath(path4);
16313
16313
  if (simpleNormalized !== void 0) {
16314
16314
  return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized;
16315
16315
  }
16316
- const length2 = path3.length;
16317
- const root = path3.substring(0, rootLength);
16316
+ const length2 = path4.length;
16317
+ const root = path4.substring(0, rootLength);
16318
16318
  let normalized;
16319
16319
  let index2 = rootLength;
16320
16320
  let segmentStart = index2;
@@ -16322,23 +16322,23 @@ ${lanes.join("\n")}
16322
16322
  let seenNonDotDotSegment = rootLength !== 0;
16323
16323
  while (index2 < length2) {
16324
16324
  segmentStart = index2;
16325
- let ch = path3.charCodeAt(index2);
16325
+ let ch = path4.charCodeAt(index2);
16326
16326
  while (ch === 47 && index2 + 1 < length2) {
16327
16327
  index2++;
16328
- ch = path3.charCodeAt(index2);
16328
+ ch = path4.charCodeAt(index2);
16329
16329
  }
16330
16330
  if (index2 > segmentStart) {
16331
- normalized ?? (normalized = path3.substring(0, segmentStart - 1));
16331
+ normalized ?? (normalized = path4.substring(0, segmentStart - 1));
16332
16332
  segmentStart = index2;
16333
16333
  }
16334
- let segmentEnd = path3.indexOf(directorySeparator, index2 + 1);
16334
+ let segmentEnd = path4.indexOf(directorySeparator, index2 + 1);
16335
16335
  if (segmentEnd === -1) {
16336
16336
  segmentEnd = length2;
16337
16337
  }
16338
16338
  const segmentLength = segmentEnd - segmentStart;
16339
- if (segmentLength === 1 && path3.charCodeAt(index2) === 46) {
16340
- normalized ?? (normalized = path3.substring(0, normalizedUpTo));
16341
- } else if (segmentLength === 2 && path3.charCodeAt(index2) === 46 && path3.charCodeAt(index2 + 1) === 46) {
16339
+ if (segmentLength === 1 && path4.charCodeAt(index2) === 46) {
16340
+ normalized ?? (normalized = path4.substring(0, normalizedUpTo));
16341
+ } else if (segmentLength === 2 && path4.charCodeAt(index2) === 46 && path4.charCodeAt(index2 + 1) === 46) {
16342
16342
  if (!seenNonDotDotSegment) {
16343
16343
  if (normalized !== void 0) {
16344
16344
  normalized += normalized.length === rootLength ? ".." : "/..";
@@ -16347,9 +16347,9 @@ ${lanes.join("\n")}
16347
16347
  }
16348
16348
  } else if (normalized === void 0) {
16349
16349
  if (normalizedUpTo - 2 >= 0) {
16350
- normalized = path3.substring(0, Math.max(rootLength, path3.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
16350
+ normalized = path4.substring(0, Math.max(rootLength, path4.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
16351
16351
  } else {
16352
- normalized = path3.substring(0, normalizedUpTo);
16352
+ normalized = path4.substring(0, normalizedUpTo);
16353
16353
  }
16354
16354
  } else {
16355
16355
  const lastSlash = normalized.lastIndexOf(directorySeparator);
@@ -16367,36 +16367,36 @@ ${lanes.join("\n")}
16367
16367
  normalized += directorySeparator;
16368
16368
  }
16369
16369
  seenNonDotDotSegment = true;
16370
- normalized += path3.substring(segmentStart, segmentEnd);
16370
+ normalized += path4.substring(segmentStart, segmentEnd);
16371
16371
  } else {
16372
16372
  seenNonDotDotSegment = true;
16373
16373
  normalizedUpTo = segmentEnd;
16374
16374
  }
16375
16375
  index2 = segmentEnd + 1;
16376
16376
  }
16377
- return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path3) : path3);
16377
+ return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path4) : path4);
16378
16378
  }
16379
- function normalizePath(path3) {
16380
- path3 = normalizeSlashes(path3);
16381
- let normalized = simpleNormalizePath(path3);
16379
+ function normalizePath(path4) {
16380
+ path4 = normalizeSlashes(path4);
16381
+ let normalized = simpleNormalizePath(path4);
16382
16382
  if (normalized !== void 0) {
16383
16383
  return normalized;
16384
16384
  }
16385
- normalized = getNormalizedAbsolutePath(path3, "");
16386
- return normalized && hasTrailingDirectorySeparator(path3) ? ensureTrailingDirectorySeparator(normalized) : normalized;
16385
+ normalized = getNormalizedAbsolutePath(path4, "");
16386
+ return normalized && hasTrailingDirectorySeparator(path4) ? ensureTrailingDirectorySeparator(normalized) : normalized;
16387
16387
  }
16388
- function simpleNormalizePath(path3) {
16389
- if (!relativePathSegmentRegExp.test(path3)) {
16390
- return path3;
16388
+ function simpleNormalizePath(path4) {
16389
+ if (!relativePathSegmentRegExp.test(path4)) {
16390
+ return path4;
16391
16391
  }
16392
- let simplified = path3.replace(/\/\.\//g, "/");
16392
+ let simplified = path4.replace(/\/\.\//g, "/");
16393
16393
  if (simplified.startsWith("./")) {
16394
16394
  simplified = simplified.slice(2);
16395
16395
  }
16396
- if (simplified !== path3) {
16397
- path3 = simplified;
16398
- if (!relativePathSegmentRegExp.test(path3)) {
16399
- return path3;
16396
+ if (simplified !== path4) {
16397
+ path4 = simplified;
16398
+ if (!relativePathSegmentRegExp.test(path4)) {
16399
+ return path4;
16400
16400
  }
16401
16401
  }
16402
16402
  return void 0;
@@ -16412,31 +16412,31 @@ ${lanes.join("\n")}
16412
16412
  const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath);
16413
16413
  return getCanonicalFileName(nonCanonicalizedPath);
16414
16414
  }
16415
- function removeTrailingDirectorySeparator(path3) {
16416
- if (hasTrailingDirectorySeparator(path3)) {
16417
- return path3.substr(0, path3.length - 1);
16415
+ function removeTrailingDirectorySeparator(path4) {
16416
+ if (hasTrailingDirectorySeparator(path4)) {
16417
+ return path4.substr(0, path4.length - 1);
16418
16418
  }
16419
- return path3;
16419
+ return path4;
16420
16420
  }
16421
- function ensureTrailingDirectorySeparator(path3) {
16422
- if (!hasTrailingDirectorySeparator(path3)) {
16423
- return path3 + directorySeparator;
16421
+ function ensureTrailingDirectorySeparator(path4) {
16422
+ if (!hasTrailingDirectorySeparator(path4)) {
16423
+ return path4 + directorySeparator;
16424
16424
  }
16425
- return path3;
16425
+ return path4;
16426
16426
  }
16427
- function ensurePathIsNonModuleName(path3) {
16428
- return !pathIsAbsolute(path3) && !pathIsRelative(path3) ? "./" + path3 : path3;
16427
+ function ensurePathIsNonModuleName(path4) {
16428
+ return !pathIsAbsolute(path4) && !pathIsRelative(path4) ? "./" + path4 : path4;
16429
16429
  }
16430
- function changeAnyExtension(path3, ext, extensions, ignoreCase) {
16431
- const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path3, extensions, ignoreCase) : getAnyExtensionFromPath(path3);
16432
- return pathext ? path3.slice(0, path3.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path3;
16430
+ function changeAnyExtension(path4, ext, extensions, ignoreCase) {
16431
+ const pathext = extensions !== void 0 && ignoreCase !== void 0 ? getAnyExtensionFromPath(path4, extensions, ignoreCase) : getAnyExtensionFromPath(path4);
16432
+ return pathext ? path4.slice(0, path4.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path4;
16433
16433
  }
16434
- function changeFullExtension(path3, newExtension) {
16435
- const declarationExtension = getDeclarationFileExtension(path3);
16434
+ function changeFullExtension(path4, newExtension) {
16435
+ const declarationExtension = getDeclarationFileExtension(path4);
16436
16436
  if (declarationExtension) {
16437
- return path3.slice(0, path3.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
16437
+ return path4.slice(0, path4.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
16438
16438
  }
16439
- return changeAnyExtension(path3, newExtension);
16439
+ return changeAnyExtension(path4, newExtension);
16440
16440
  }
16441
16441
  var relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/;
16442
16442
  function comparePathsWorker(a, b2, componentComparer) {
@@ -27889,8 +27889,8 @@ ${lanes.join("\n")}
27889
27889
  function getResolvedExternalModuleName(host, file, referenceFile) {
27890
27890
  return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName);
27891
27891
  }
27892
- function getCanonicalAbsolutePath(host, path3) {
27893
- return host.getCanonicalFileName(getNormalizedAbsolutePath(path3, host.getCurrentDirectory()));
27892
+ function getCanonicalAbsolutePath(host, path4) {
27893
+ return host.getCanonicalFileName(getNormalizedAbsolutePath(path4, host.getCurrentDirectory()));
27894
27894
  }
27895
27895
  function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
27896
27896
  const file = resolver.getExternalModuleFileFromDeclaration(declaration);
@@ -27933,20 +27933,20 @@ ${lanes.join("\n")}
27933
27933
  }
27934
27934
  function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
27935
27935
  const outputDir = options.declarationDir || options.outDir;
27936
- const path3 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
27937
- const declarationExtension = getDeclarationEmitExtensionForPath(path3);
27938
- return removeFileExtension(path3) + declarationExtension;
27936
+ const path4 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
27937
+ const declarationExtension = getDeclarationEmitExtensionForPath(path4);
27938
+ return removeFileExtension(path4) + declarationExtension;
27939
27939
  }
27940
- function getDeclarationEmitExtensionForPath(path3) {
27941
- return fileExtensionIsOneOf(path3, [
27940
+ function getDeclarationEmitExtensionForPath(path4) {
27941
+ return fileExtensionIsOneOf(path4, [
27942
27942
  ".mjs",
27943
27943
  ".mts"
27944
27944
  /* Mts */
27945
- ]) ? ".d.mts" : fileExtensionIsOneOf(path3, [
27945
+ ]) ? ".d.mts" : fileExtensionIsOneOf(path4, [
27946
27946
  ".cjs",
27947
27947
  ".cts"
27948
27948
  /* Cts */
27949
- ]) ? ".d.cts" : fileExtensionIsOneOf(path3, [
27949
+ ]) ? ".d.cts" : fileExtensionIsOneOf(path4, [
27950
27950
  ".json"
27951
27951
  /* Json */
27952
27952
  ]) ? `.d.json.ts` : (
@@ -27954,8 +27954,8 @@ ${lanes.join("\n")}
27954
27954
  ".d.ts"
27955
27955
  );
27956
27956
  }
27957
- function getPossibleOriginalInputExtensionForExtension(path3) {
27958
- return fileExtensionIsOneOf(path3, [
27957
+ function getPossibleOriginalInputExtensionForExtension(path4) {
27958
+ return fileExtensionIsOneOf(path4, [
27959
27959
  ".d.mts",
27960
27960
  ".mjs",
27961
27961
  ".mts"
@@ -27964,7 +27964,7 @@ ${lanes.join("\n")}
27964
27964
  ".mts",
27965
27965
  ".mjs"
27966
27966
  /* Mjs */
27967
- ] : fileExtensionIsOneOf(path3, [
27967
+ ] : fileExtensionIsOneOf(path4, [
27968
27968
  ".d.cts",
27969
27969
  ".cjs",
27970
27970
  ".cts"
@@ -27973,7 +27973,7 @@ ${lanes.join("\n")}
27973
27973
  ".cts",
27974
27974
  ".cjs"
27975
27975
  /* Cjs */
27976
- ] : fileExtensionIsOneOf(path3, [`.d.json.ts`]) ? [
27976
+ ] : fileExtensionIsOneOf(path4, [`.d.json.ts`]) ? [
27977
27977
  ".json"
27978
27978
  /* Json */
27979
27979
  ] : [
@@ -28058,12 +28058,12 @@ ${lanes.join("\n")}
28058
28058
  createDirectory(directoryPath);
28059
28059
  }
28060
28060
  }
28061
- function writeFileEnsuringDirectories(path3, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
28061
+ function writeFileEnsuringDirectories(path4, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
28062
28062
  try {
28063
- writeFile2(path3, data, writeByteOrderMark);
28063
+ writeFile2(path4, data, writeByteOrderMark);
28064
28064
  } catch {
28065
- ensureDirectoriesExist(getDirectoryPath(normalizePath(path3)), createDirectory, directoryExists);
28066
- writeFile2(path3, data, writeByteOrderMark);
28065
+ ensureDirectoriesExist(getDirectoryPath(normalizePath(path4)), createDirectory, directoryExists);
28066
+ writeFile2(path4, data, writeByteOrderMark);
28067
28067
  }
28068
28068
  }
28069
28069
  function getLineOfLocalPosition(sourceFile, pos) {
@@ -28763,20 +28763,20 @@ ${lanes.join("\n")}
28763
28763
  }
28764
28764
  return getStringFromExpandedCharCodes(expandedCharCodes);
28765
28765
  }
28766
- function readJsonOrUndefined(path3, hostOrText) {
28767
- const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path3);
28766
+ function readJsonOrUndefined(path4, hostOrText) {
28767
+ const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path4);
28768
28768
  if (!jsonText) return void 0;
28769
28769
  let result = tryParseJson(jsonText);
28770
28770
  if (result === void 0) {
28771
- const looseResult = parseConfigFileTextToJson(path3, jsonText);
28771
+ const looseResult = parseConfigFileTextToJson(path4, jsonText);
28772
28772
  if (!looseResult.error) {
28773
28773
  result = looseResult.config;
28774
28774
  }
28775
28775
  }
28776
28776
  return result;
28777
28777
  }
28778
- function readJson(path3, host) {
28779
- return readJsonOrUndefined(path3, host) || {};
28778
+ function readJson(path4, host) {
28779
+ return readJsonOrUndefined(path4, host) || {};
28780
28780
  }
28781
28781
  function tryParseJson(text2) {
28782
28782
  try {
@@ -29926,7 +29926,7 @@ ${lanes.join("\n")}
29926
29926
  getSymlinkedFiles: () => symlinkedFiles,
29927
29927
  getSymlinkedDirectories: () => symlinkedDirectories,
29928
29928
  getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath,
29929
- setSymlinkedFile: (path3, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path3, real),
29929
+ setSymlinkedFile: (path4, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map())).set(path4, real),
29930
29930
  setSymlinkedDirectory: (symlink, real) => {
29931
29931
  let symlinkPath = toPath(symlink, cwd, getCanonicalFileName);
29932
29932
  if (!containsIgnoredPath(symlinkPath)) {
@@ -29986,8 +29986,8 @@ ${lanes.join("\n")}
29986
29986
  function stripLeadingDirectorySeparator(s2) {
29987
29987
  return isAnyDirectorySeparator(s2.charCodeAt(0)) ? s2.slice(1) : void 0;
29988
29988
  }
29989
- function tryRemoveDirectoryPrefix(path3, dirPath, getCanonicalFileName) {
29990
- const withoutPrefix = tryRemovePrefix(path3, dirPath, getCanonicalFileName);
29989
+ function tryRemoveDirectoryPrefix(path4, dirPath, getCanonicalFileName) {
29990
+ const withoutPrefix = tryRemovePrefix(path4, dirPath, getCanonicalFileName);
29991
29991
  return withoutPrefix === void 0 ? void 0 : stripLeadingDirectorySeparator(withoutPrefix);
29992
29992
  }
29993
29993
  var reservedCharacterPattern = /[^\w\s/]/g;
@@ -30113,25 +30113,25 @@ ${lanes.join("\n")}
30113
30113
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
30114
30114
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
30115
30115
  }
30116
- function getFileMatcherPatterns(path3, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
30117
- path3 = normalizePath(path3);
30116
+ function getFileMatcherPatterns(path4, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
30117
+ path4 = normalizePath(path4);
30118
30118
  currentDirectory = normalizePath(currentDirectory);
30119
- const absolutePath = combinePaths(currentDirectory, path3);
30119
+ const absolutePath = combinePaths(currentDirectory, path4);
30120
30120
  return {
30121
30121
  includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
30122
30122
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
30123
30123
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
30124
30124
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
30125
- basePaths: getBasePaths(path3, includes, useCaseSensitiveFileNames2)
30125
+ basePaths: getBasePaths(path4, includes, useCaseSensitiveFileNames2)
30126
30126
  };
30127
30127
  }
30128
30128
  function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
30129
30129
  return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
30130
30130
  }
30131
- function matchFiles(path3, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
30132
- path3 = normalizePath(path3);
30131
+ function matchFiles(path4, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
30132
+ path4 = normalizePath(path4);
30133
30133
  currentDirectory = normalizePath(currentDirectory);
30134
- const patterns = getFileMatcherPatterns(path3, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
30134
+ const patterns = getFileMatcherPatterns(path4, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
30135
30135
  const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
30136
30136
  const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
30137
30137
  const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
@@ -30176,17 +30176,17 @@ ${lanes.join("\n")}
30176
30176
  }
30177
30177
  }
30178
30178
  }
30179
- function getBasePaths(path3, includes, useCaseSensitiveFileNames2) {
30180
- const basePaths = [path3];
30179
+ function getBasePaths(path4, includes, useCaseSensitiveFileNames2) {
30180
+ const basePaths = [path4];
30181
30181
  if (includes) {
30182
30182
  const includeBasePaths = [];
30183
30183
  for (const include of includes) {
30184
- const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path3, include));
30184
+ const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path4, include));
30185
30185
  includeBasePaths.push(getIncludeBasePath(absolute));
30186
30186
  }
30187
30187
  includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
30188
30188
  for (const includeBasePath of includeBasePaths) {
30189
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path3, !useCaseSensitiveFileNames2))) {
30189
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path4, !useCaseSensitiveFileNames2))) {
30190
30190
  basePaths.push(includeBasePath);
30191
30191
  }
30192
30192
  }
@@ -30450,24 +30450,24 @@ ${lanes.join("\n")}
30450
30450
  ".json"
30451
30451
  /* Json */
30452
30452
  ];
30453
- function removeFileExtension(path3) {
30453
+ function removeFileExtension(path4) {
30454
30454
  for (const ext of extensionsToRemove) {
30455
- const extensionless = tryRemoveExtension(path3, ext);
30455
+ const extensionless = tryRemoveExtension(path4, ext);
30456
30456
  if (extensionless !== void 0) {
30457
30457
  return extensionless;
30458
30458
  }
30459
30459
  }
30460
- return path3;
30460
+ return path4;
30461
30461
  }
30462
- function tryRemoveExtension(path3, extension) {
30463
- return fileExtensionIs(path3, extension) ? removeExtension(path3, extension) : void 0;
30462
+ function tryRemoveExtension(path4, extension) {
30463
+ return fileExtensionIs(path4, extension) ? removeExtension(path4, extension) : void 0;
30464
30464
  }
30465
- function removeExtension(path3, extension) {
30466
- return path3.substring(0, path3.length - extension.length);
30465
+ function removeExtension(path4, extension) {
30466
+ return path4.substring(0, path4.length - extension.length);
30467
30467
  }
30468
- function changeExtension(path3, newExtension) {
30468
+ function changeExtension(path4, newExtension) {
30469
30469
  return changeAnyExtension(
30470
- path3,
30470
+ path4,
30471
30471
  newExtension,
30472
30472
  extensionsToRemove,
30473
30473
  /*ignoreCase*/
@@ -30493,8 +30493,8 @@ ${lanes.join("\n")}
30493
30493
  let matchableStringSet;
30494
30494
  let patterns;
30495
30495
  const pathList = getOwnKeys(paths);
30496
- for (const path3 of pathList) {
30497
- const patternOrStr = tryParsePattern(path3);
30496
+ for (const path4 of pathList) {
30497
+ const patternOrStr = tryParsePattern(path4);
30498
30498
  if (patternOrStr === void 0) {
30499
30499
  continue;
30500
30500
  } else if (typeof patternOrStr === "string") {
@@ -30521,15 +30521,15 @@ ${lanes.join("\n")}
30521
30521
  function resolutionExtensionIsTSOrJson(ext) {
30522
30522
  return extensionIsTS(ext) || ext === ".json";
30523
30523
  }
30524
- function extensionFromPath(path3) {
30525
- const ext = tryGetExtensionFromPath2(path3);
30526
- return ext !== void 0 ? ext : Debug.fail(`File ${path3} has unknown extension.`);
30524
+ function extensionFromPath(path4) {
30525
+ const ext = tryGetExtensionFromPath2(path4);
30526
+ return ext !== void 0 ? ext : Debug.fail(`File ${path4} has unknown extension.`);
30527
30527
  }
30528
- function isAnySupportedFileExtension(path3) {
30529
- return tryGetExtensionFromPath2(path3) !== void 0;
30528
+ function isAnySupportedFileExtension(path4) {
30529
+ return tryGetExtensionFromPath2(path4) !== void 0;
30530
30530
  }
30531
- function tryGetExtensionFromPath2(path3) {
30532
- return find(extensionsToRemove, (e2) => fileExtensionIs(path3, e2));
30531
+ function tryGetExtensionFromPath2(path4) {
30532
+ return find(extensionsToRemove, (e2) => fileExtensionIs(path4, e2));
30533
30533
  }
30534
30534
  function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
30535
30535
  return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
@@ -30838,8 +30838,8 @@ ${lanes.join("\n")}
30838
30838
  return false;
30839
30839
  }
30840
30840
  }
30841
- function containsIgnoredPath(path3) {
30842
- return some(ignoredPaths, (p2) => path3.includes(p2));
30841
+ function containsIgnoredPath(path4) {
30842
+ return some(ignoredPaths, (p2) => path4.includes(p2));
30843
30843
  }
30844
30844
  function getContainingNodeArray(node) {
30845
30845
  if (!node.parent) return void 0;
@@ -50647,7 +50647,7 @@ ${lanes.join("\n")}
50647
50647
  const typeReferenceDirectives = context.typeReferenceDirectives;
50648
50648
  const libReferenceDirectives = context.libReferenceDirectives;
50649
50649
  forEach(toArray(entryOrList), (arg) => {
50650
- const { types, lib, path: path3, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
50650
+ const { types, lib, path: path4, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
50651
50651
  const preserve = _preserve === "true" ? true : void 0;
50652
50652
  if (arg.arguments["no-default-lib"] === "true") {
50653
50653
  context.hasNoDefaultLib = true;
@@ -50656,8 +50656,8 @@ ${lanes.join("\n")}
50656
50656
  typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
50657
50657
  } else if (lib) {
50658
50658
  libReferenceDirectives.push({ pos: lib.pos, end: lib.end, fileName: lib.value, ...preserve ? { preserve } : {} });
50659
- } else if (path3) {
50660
- referencedFiles.push({ pos: path3.pos, end: path3.end, fileName: path3.value, ...preserve ? { preserve } : {} });
50659
+ } else if (path4) {
50660
+ referencedFiles.push({ pos: path4.pos, end: path4.end, fileName: path4.value, ...preserve ? { preserve } : {} });
50661
50661
  } else {
50662
50662
  reportDiagnostic(arg.range.pos, arg.range.end - arg.range.pos, Diagnostics.Invalid_reference_directive_syntax);
50663
50663
  }
@@ -53086,9 +53086,9 @@ ${lanes.join("\n")}
53086
53086
  if (specs[0] === defaultIncludeSpec) return void 0;
53087
53087
  return specs;
53088
53088
  }
53089
- function matchesSpecs(path3, includeSpecs, excludeSpecs, host) {
53089
+ function matchesSpecs(path4, includeSpecs, excludeSpecs, host) {
53090
53090
  if (!includeSpecs) return returnTrue;
53091
- const patterns = getFileMatcherPatterns(path3, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
53091
+ const patterns = getFileMatcherPatterns(path4, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
53092
53092
  const excludeRe = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames);
53093
53093
  const includeRe = patterns.includeFilePattern && getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames);
53094
53094
  if (includeRe) {
@@ -53733,9 +53733,9 @@ ${lanes.join("\n")}
53733
53733
  const setPropertyInResultIfNotUndefined = (propertyName) => {
53734
53734
  if (ownConfig.raw[propertyName]) return;
53735
53735
  if (extendsRaw[propertyName]) {
53736
- result[propertyName] = map(extendsRaw[propertyName], (path3) => startsWithConfigDirTemplate(path3) || isRootedDiskPath(path3) ? path3 : combinePaths(
53736
+ result[propertyName] = map(extendsRaw[propertyName], (path4) => startsWithConfigDirTemplate(path4) || isRootedDiskPath(path4) ? path4 : combinePaths(
53737
53737
  relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))),
53738
- path3
53738
+ path4
53739
53739
  ));
53740
53740
  }
53741
53741
  };
@@ -53889,11 +53889,11 @@ ${lanes.join("\n")}
53889
53889
  return void 0;
53890
53890
  }
53891
53891
  function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
53892
- const path3 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
53892
+ const path4 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
53893
53893
  let value;
53894
53894
  let extendedResult;
53895
53895
  let extendedConfig;
53896
- if (extendedConfigCache && (value = extendedConfigCache.get(path3))) {
53896
+ if (extendedConfigCache && (value = extendedConfigCache.get(path4))) {
53897
53897
  ({ extendedResult, extendedConfig } = value);
53898
53898
  } else {
53899
53899
  extendedResult = readJsonConfigFile(extendedConfigPath, (path22) => host.readFile(path22));
@@ -53911,7 +53911,7 @@ ${lanes.join("\n")}
53911
53911
  );
53912
53912
  }
53913
53913
  if (extendedConfigCache) {
53914
- extendedConfigCache.set(path3, { extendedResult, extendedConfig });
53914
+ extendedConfigCache.set(path4, { extendedResult, extendedConfig });
53915
53915
  }
53916
53916
  }
53917
53917
  if (sourceFile) {
@@ -54179,24 +54179,24 @@ ${lanes.join("\n")}
54179
54179
  }
54180
54180
  const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
54181
54181
  if (match) {
54182
- const { key, path: path3, flags } = match;
54182
+ const { key, path: path4, flags } = match;
54183
54183
  const existingPath = wildCardKeyToPath.get(key);
54184
54184
  const existingFlags = existingPath !== void 0 ? wildcardDirectories[existingPath] : void 0;
54185
54185
  if (existingFlags === void 0 || existingFlags < flags) {
54186
- wildcardDirectories[existingPath !== void 0 ? existingPath : path3] = flags;
54187
- if (existingPath === void 0) wildCardKeyToPath.set(key, path3);
54186
+ wildcardDirectories[existingPath !== void 0 ? existingPath : path4] = flags;
54187
+ if (existingPath === void 0) wildCardKeyToPath.set(key, path4);
54188
54188
  if (flags === 1) {
54189
54189
  recursiveKeys.push(key);
54190
54190
  }
54191
54191
  }
54192
54192
  }
54193
54193
  }
54194
- for (const path3 in wildcardDirectories) {
54195
- if (hasProperty(wildcardDirectories, path3)) {
54194
+ for (const path4 in wildcardDirectories) {
54195
+ if (hasProperty(wildcardDirectories, path4)) {
54196
54196
  for (const recursiveKey of recursiveKeys) {
54197
- const key = toCanonicalKey(path3, useCaseSensitiveFileNames2);
54197
+ const key = toCanonicalKey(path4, useCaseSensitiveFileNames2);
54198
54198
  if (key !== recursiveKey && containsPath(recursiveKey, key, basePath, !useCaseSensitiveFileNames2)) {
54199
- delete wildcardDirectories[path3];
54199
+ delete wildcardDirectories[path4];
54200
54200
  }
54201
54201
  }
54202
54202
  }
@@ -54204,8 +54204,8 @@ ${lanes.join("\n")}
54204
54204
  }
54205
54205
  return wildcardDirectories;
54206
54206
  }
54207
- function toCanonicalKey(path3, useCaseSensitiveFileNames2) {
54208
- return useCaseSensitiveFileNames2 ? path3 : toFileNameLowerCase(path3);
54207
+ function toCanonicalKey(path4, useCaseSensitiveFileNames2) {
54208
+ return useCaseSensitiveFileNames2 ? path4 : toFileNameLowerCase(path4);
54209
54209
  }
54210
54210
  function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
54211
54211
  const match = wildcardDirectoryPattern.exec(spec);
@@ -54221,10 +54221,10 @@ ${lanes.join("\n")}
54221
54221
  };
54222
54222
  }
54223
54223
  if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
54224
- const path3 = removeTrailingDirectorySeparator(spec);
54224
+ const path4 = removeTrailingDirectorySeparator(spec);
54225
54225
  return {
54226
- key: toCanonicalKey(path3, useCaseSensitiveFileNames2),
54227
- path: path3,
54226
+ key: toCanonicalKey(path4, useCaseSensitiveFileNames2),
54227
+ path: path4,
54228
54228
  flags: 1
54229
54229
  /* Recursive */
54230
54230
  };
@@ -54463,11 +54463,11 @@ ${lanes.join("\n")}
54463
54463
  }
54464
54464
  return;
54465
54465
  }
54466
- const path3 = normalizePath(combinePaths(baseDirectory, fileName));
54466
+ const path4 = normalizePath(combinePaths(baseDirectory, fileName));
54467
54467
  if (state.traceEnabled) {
54468
- trace2(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path3);
54468
+ trace2(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path4);
54469
54469
  }
54470
- return path3;
54470
+ return path4;
54471
54471
  }
54472
54472
  function readPackageJsonTypesFields(jsonContent, baseDirectory, state) {
54473
54473
  return readPackageJsonPathField(jsonContent, "typings", baseDirectory, state) || readPackageJsonPathField(jsonContent, "types", baseDirectory, state);
@@ -54981,13 +54981,13 @@ ${lanes.join("\n")}
54981
54981
  directoryToModuleNameMap.update(options2);
54982
54982
  }
54983
54983
  function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
54984
- const path3 = toPath(directoryName, currentDirectory, getCanonicalFileName);
54985
- return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path3, () => createModeAwareCache());
54984
+ const path4 = toPath(directoryName, currentDirectory, getCanonicalFileName);
54985
+ return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path4, () => createModeAwareCache());
54986
54986
  }
54987
54987
  function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
54988
54988
  var _a, _b;
54989
- const path3 = toPath(directoryName, currentDirectory, getCanonicalFileName);
54990
- return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path3)) == null ? void 0 : _b.get(name, mode);
54989
+ const path4 = toPath(directoryName, currentDirectory, getCanonicalFileName);
54990
+ return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? void 0 : _a.get(path4)) == null ? void 0 : _b.get(name, mode);
54991
54991
  }
54992
54992
  }
54993
54993
  function createModeAwareCacheKey(specifier, mode) {
@@ -55064,14 +55064,14 @@ ${lanes.join("\n")}
55064
55064
  return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName));
55065
55065
  }
55066
55066
  function set(directory, result) {
55067
- const path3 = toPath(directory, currentDirectory, getCanonicalFileName);
55068
- if (directoryPathMap.has(path3)) {
55067
+ const path4 = toPath(directory, currentDirectory, getCanonicalFileName);
55068
+ if (directoryPathMap.has(path4)) {
55069
55069
  return;
55070
55070
  }
55071
- directoryPathMap.set(path3, result);
55071
+ directoryPathMap.set(path4, result);
55072
55072
  const resolvedFileName = getResolvedFileName(result);
55073
- const commonPrefix = resolvedFileName && getCommonPrefix(path3, resolvedFileName);
55074
- let current = path3;
55073
+ const commonPrefix = resolvedFileName && getCommonPrefix(path4, resolvedFileName);
55074
+ let current = path4;
55075
55075
  while (current !== commonPrefix) {
55076
55076
  const parent2 = getDirectoryPath(current);
55077
55077
  if (parent2 === current || directoryPathMap.has(parent2)) {
@@ -55635,16 +55635,16 @@ ${lanes.join("\n")}
55635
55635
  const combined = combinePaths(containingDirectory, moduleName);
55636
55636
  const parts = getPathComponents(combined);
55637
55637
  const lastPart = lastOrUndefined(parts);
55638
- const path3 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
55639
- return { path: path3, parts };
55638
+ const path4 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
55639
+ return { path: path4, parts };
55640
55640
  }
55641
- function realPath(path3, host, traceEnabled) {
55641
+ function realPath(path4, host, traceEnabled) {
55642
55642
  if (!host.realpath) {
55643
- return path3;
55643
+ return path4;
55644
55644
  }
55645
- const real = normalizePath(host.realpath(path3));
55645
+ const real = normalizePath(host.realpath(path4));
55646
55646
  if (traceEnabled) {
55647
- trace2(host, Diagnostics.Resolving_real_path_for_0_result_1, path3, real);
55647
+ trace2(host, Diagnostics.Resolving_real_path_for_0_result_1, path4, real);
55648
55648
  }
55649
55649
  return real;
55650
55650
  }
@@ -55689,25 +55689,25 @@ ${lanes.join("\n")}
55689
55689
  return void 0;
55690
55690
  }
55691
55691
  var nodeModulesPathPart = "/node_modules/";
55692
- function pathContainsNodeModules(path3) {
55693
- return path3.includes(nodeModulesPathPart);
55692
+ function pathContainsNodeModules(path4) {
55693
+ return path4.includes(nodeModulesPathPart);
55694
55694
  }
55695
55695
  function parseNodeModuleFromPath(resolved, isFolder) {
55696
- const path3 = normalizePath(resolved);
55697
- const idx = path3.lastIndexOf(nodeModulesPathPart);
55696
+ const path4 = normalizePath(resolved);
55697
+ const idx = path4.lastIndexOf(nodeModulesPathPart);
55698
55698
  if (idx === -1) {
55699
55699
  return void 0;
55700
55700
  }
55701
55701
  const indexAfterNodeModules = idx + nodeModulesPathPart.length;
55702
- let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path3, indexAfterNodeModules, isFolder);
55703
- if (path3.charCodeAt(indexAfterNodeModules) === 64) {
55704
- indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path3, indexAfterPackageName, isFolder);
55702
+ let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path4, indexAfterNodeModules, isFolder);
55703
+ if (path4.charCodeAt(indexAfterNodeModules) === 64) {
55704
+ indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path4, indexAfterPackageName, isFolder);
55705
55705
  }
55706
- return path3.slice(0, indexAfterPackageName);
55706
+ return path4.slice(0, indexAfterPackageName);
55707
55707
  }
55708
- function moveToNextDirectorySeparatorIfAvailable(path3, prevSeparatorIndex, isFolder) {
55709
- const nextSeparatorIndex = path3.indexOf(directorySeparator, prevSeparatorIndex + 1);
55710
- return nextSeparatorIndex === -1 ? isFolder ? path3.length : prevSeparatorIndex : nextSeparatorIndex;
55708
+ function moveToNextDirectorySeparatorIfAvailable(path4, prevSeparatorIndex, isFolder) {
55709
+ const nextSeparatorIndex = path4.indexOf(directorySeparator, prevSeparatorIndex + 1);
55710
+ return nextSeparatorIndex === -1 ? isFolder ? path4.length : prevSeparatorIndex : nextSeparatorIndex;
55711
55711
  }
55712
55712
  function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
55713
55713
  return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
@@ -55849,8 +55849,8 @@ ${lanes.join("\n")}
55849
55849
  return extensions & 4 && !isDeclarationFileName(candidate + originalExtension) && tryExtension(`.d${originalExtension}.ts`) || void 0;
55850
55850
  }
55851
55851
  function tryExtension(ext, resolvedUsingTsExtension) {
55852
- const path3 = tryFile(candidate + ext, onlyRecordFailures, state);
55853
- return path3 === void 0 ? void 0 : { path: path3, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
55852
+ const path4 = tryFile(candidate + ext, onlyRecordFailures, state);
55853
+ return path4 === void 0 ? void 0 : { path: path4, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
55854
55854
  }
55855
55855
  }
55856
55856
  function tryFile(fileName, onlyRecordFailures, state) {
@@ -56546,10 +56546,10 @@ ${lanes.join("\n")}
56546
56546
  /*value*/
56547
56547
  void 0
56548
56548
  );
56549
- function toAbsolutePath(path3) {
56549
+ function toAbsolutePath(path4) {
56550
56550
  var _a2, _b2;
56551
- if (path3 === void 0) return path3;
56552
- return getNormalizedAbsolutePath(path3, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2));
56551
+ if (path4 === void 0) return path4;
56552
+ return getNormalizedAbsolutePath(path4, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? void 0 : _b2.call(_a2));
56553
56553
  }
56554
56554
  function combineDirectoryPath(root, dir) {
56555
56555
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
@@ -56800,10 +56800,10 @@ ${lanes.join("\n")}
56800
56800
  trace2(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
56801
56801
  }
56802
56802
  const resolved = forEach(paths[matchedPatternText], (subst) => {
56803
- const path3 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
56804
- const candidate = normalizePath(combinePaths(baseDirectory, path3));
56803
+ const path4 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
56804
+ const candidate = normalizePath(combinePaths(baseDirectory, path4));
56805
56805
  if (state.traceEnabled) {
56806
- trace2(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path3);
56806
+ trace2(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path4);
56807
56807
  }
56808
56808
  const extension = tryGetExtensionFromPath2(subst);
56809
56809
  if (extension !== void 0) {
@@ -60956,10 +60956,10 @@ ${lanes.join("\n")}
60956
60956
  if (a === void 0 || b2 === void 0) return false;
60957
60957
  return comparePaths(a, b2, ignoreCase) === 0;
60958
60958
  }
60959
- function countPathComponents(path3) {
60959
+ function countPathComponents(path4) {
60960
60960
  let count16 = 0;
60961
- for (let i2 = startsWith(path3, "./") ? 2 : 0; i2 < path3.length; i2++) {
60962
- if (path3.charCodeAt(i2) === 47) count16++;
60961
+ for (let i2 = startsWith(path4, "./") ? 2 : 0; i2 < path4.length; i2++) {
60962
+ if (path4.charCodeAt(i2) === 47) count16++;
60963
60963
  }
60964
60964
  return count16;
60965
60965
  }
@@ -61076,9 +61076,9 @@ ${lanes.join("\n")}
61076
61076
  host,
61077
61077
  /*preferSymlinks*/
61078
61078
  true,
61079
- (path3, isRedirect) => {
61080
- const isInNodeModules = pathContainsNodeModules(path3);
61081
- allFileNames.set(path3, { path: info.getCanonicalFileName(path3), isRedirect, isInNodeModules });
61079
+ (path4, isRedirect) => {
61080
+ const isInNodeModules = pathContainsNodeModules(path4);
61081
+ allFileNames.set(path4, { path: info.getCanonicalFileName(path4), isRedirect, isInNodeModules });
61082
61082
  importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
61083
61083
  }
61084
61084
  );
@@ -61086,8 +61086,8 @@ ${lanes.join("\n")}
61086
61086
  for (let directory = info.canonicalSourceDirectory; allFileNames.size !== 0; ) {
61087
61087
  const directoryStart = ensureTrailingDirectorySeparator(directory);
61088
61088
  let pathsInDirectory;
61089
- allFileNames.forEach(({ path: path3, isRedirect, isInNodeModules }, fileName) => {
61090
- if (startsWith(path3, directoryStart)) {
61089
+ allFileNames.forEach(({ path: path4, isRedirect, isInNodeModules }, fileName) => {
61090
+ if (startsWith(path4, directoryStart)) {
61091
61091
  (pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName, isRedirect, isInNodeModules });
61092
61092
  allFileNames.delete(fileName);
61093
61093
  }
@@ -61390,17 +61390,17 @@ ${lanes.join("\n")}
61390
61390
  }
61391
61391
  return processEnding(shortest, allowedEndings, compilerOptions);
61392
61392
  }
61393
- function tryGetModuleNameAsNodeModule({ path: path3, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
61393
+ function tryGetModuleNameAsNodeModule({ path: path4, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
61394
61394
  if (!host.fileExists || !host.readFile) {
61395
61395
  return void 0;
61396
61396
  }
61397
- const parts = getNodeModulePathParts(path3);
61397
+ const parts = getNodeModulePathParts(path4);
61398
61398
  if (!parts) {
61399
61399
  return void 0;
61400
61400
  }
61401
61401
  const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile);
61402
61402
  const allowedEndings = preferences.getAllowedEndingsInPreferredOrder();
61403
- let moduleSpecifier = path3;
61403
+ let moduleSpecifier = path4;
61404
61404
  let isPackageRootPath = false;
61405
61405
  if (!packageNameOnly) {
61406
61406
  let packageRootIndex = parts.packageRootIndex;
@@ -61421,7 +61421,7 @@ ${lanes.join("\n")}
61421
61421
  break;
61422
61422
  }
61423
61423
  if (!moduleFileName) moduleFileName = moduleFileToTry;
61424
- packageRootIndex = path3.indexOf(directorySeparator, packageRootIndex + 1);
61424
+ packageRootIndex = path4.indexOf(directorySeparator, packageRootIndex + 1);
61425
61425
  if (packageRootIndex === -1) {
61426
61426
  moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host);
61427
61427
  break;
@@ -61441,9 +61441,9 @@ ${lanes.join("\n")}
61441
61441
  return getEmitModuleResolutionKind(options) === 1 && packageName === nodeModulesDirectoryName ? void 0 : packageName;
61442
61442
  function tryDirectoryWithPackageJson(packageRootIndex) {
61443
61443
  var _a, _b;
61444
- const packageRootPath = path3.substring(0, packageRootIndex);
61444
+ const packageRootPath = path4.substring(0, packageRootIndex);
61445
61445
  const packageJsonPath2 = combinePaths(packageRootPath, "package.json");
61446
- let moduleFileToTry = path3;
61446
+ let moduleFileToTry = path4;
61447
61447
  let maybeBlockedByTypesVersions = false;
61448
61448
  const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getPackageJsonInfo(packageJsonPath2);
61449
61449
  if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === void 0 && host.fileExists(packageJsonPath2)) {
@@ -61456,7 +61456,7 @@ ${lanes.join("\n")}
61456
61456
  const fromExports = (packageJsonContent == null ? void 0 : packageJsonContent.exports) ? tryGetModuleNameFromExports(
61457
61457
  options,
61458
61458
  host,
61459
- path3,
61459
+ path4,
61460
61460
  packageRootPath,
61461
61461
  packageName2,
61462
61462
  packageJsonContent.exports,
@@ -61466,12 +61466,12 @@ ${lanes.join("\n")}
61466
61466
  return { ...fromExports, verbatimFromExports: true };
61467
61467
  }
61468
61468
  if (packageJsonContent == null ? void 0 : packageJsonContent.exports) {
61469
- return { moduleFileToTry: path3, blockedByExports: true };
61469
+ return { moduleFileToTry: path4, blockedByExports: true };
61470
61470
  }
61471
61471
  }
61472
61472
  const versionPaths = (packageJsonContent == null ? void 0 : packageJsonContent.typesVersions) ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : void 0;
61473
61473
  if (versionPaths) {
61474
- const subModuleName = path3.slice(packageRootPath.length + 1);
61474
+ const subModuleName = path4.slice(packageRootPath.length + 1);
61475
61475
  const fromPaths = tryGetModuleNameFromPaths(
61476
61476
  subModuleName,
61477
61477
  versionPaths.paths,
@@ -61506,7 +61506,7 @@ ${lanes.join("\n")}
61506
61506
  return { moduleFileToTry };
61507
61507
  }
61508
61508
  }
61509
- function tryGetAnyFileFromPath(host, path3) {
61509
+ function tryGetAnyFileFromPath(host, path4) {
61510
61510
  if (!host.fileExists) return;
61511
61511
  const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, {
61512
61512
  extension: "json",
@@ -61515,15 +61515,15 @@ ${lanes.join("\n")}
61515
61515
  /* JSON */
61516
61516
  }]));
61517
61517
  for (const e2 of extensions) {
61518
- const fullPath = path3 + e2;
61518
+ const fullPath = path4 + e2;
61519
61519
  if (host.fileExists(fullPath)) {
61520
61520
  return fullPath;
61521
61521
  }
61522
61522
  }
61523
61523
  }
61524
- function getPathsRelativeToRootDirs(path3, rootDirs, getCanonicalFileName) {
61524
+ function getPathsRelativeToRootDirs(path4, rootDirs, getCanonicalFileName) {
61525
61525
  return mapDefined(rootDirs, (rootDir) => {
61526
- const relativePath = getRelativePathIfInSameVolume(path3, rootDir, getCanonicalFileName);
61526
+ const relativePath = getRelativePathIfInSameVolume(path4, rootDir, getCanonicalFileName);
61527
61527
  return relativePath !== void 0 && isPathRelativeToParent(relativePath) ? void 0 : relativePath;
61528
61528
  });
61529
61529
  }
@@ -61640,10 +61640,10 @@ ${lanes.join("\n")}
61640
61640
  return void 0;
61641
61641
  }
61642
61642
  }
61643
- function getRelativePathIfInSameVolume(path3, directoryPath, getCanonicalFileName) {
61643
+ function getRelativePathIfInSameVolume(path4, directoryPath, getCanonicalFileName) {
61644
61644
  const relativePath = getRelativePathToDirectoryOrUrl(
61645
61645
  directoryPath,
61646
- path3,
61646
+ path4,
61647
61647
  directoryPath,
61648
61648
  getCanonicalFileName,
61649
61649
  /*isAbsolutePathAnUrl*/
@@ -61651,8 +61651,8 @@ ${lanes.join("\n")}
61651
61651
  );
61652
61652
  return isRootedDiskPath(relativePath) ? void 0 : relativePath;
61653
61653
  }
61654
- function isPathRelativeToParent(path3) {
61655
- return startsWith(path3, "..");
61654
+ function isPathRelativeToParent(path4) {
61655
+ return startsWith(path4, "..");
61656
61656
  }
61657
61657
  function getDefaultResolutionModeForFile(file, host, compilerOptions) {
61658
61658
  return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions);
@@ -76701,10 +76701,10 @@ ${lanes.join("\n")}
76701
76701
  const text2 = identifier.escapedText;
76702
76702
  if (text2) {
76703
76703
  const parentSymbol = name.kind === 167 ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 212 ? getUnresolvedSymbolForEntityName(name.expression) : void 0;
76704
- const path3 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text2}` : text2;
76705
- let result = unresolvedSymbols.get(path3);
76704
+ const path4 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text2}` : text2;
76705
+ let result = unresolvedSymbols.get(path4);
76706
76706
  if (!result) {
76707
- unresolvedSymbols.set(path3, result = createSymbol(
76707
+ unresolvedSymbols.set(path4, result = createSymbol(
76708
76708
  524288,
76709
76709
  text2,
76710
76710
  1048576
@@ -81505,24 +81505,24 @@ ${lanes.join("\n")}
81505
81505
  }
81506
81506
  return;
81507
81507
  }
81508
- let path3 = "";
81508
+ let path4 = "";
81509
81509
  const secondaryRootErrors = [];
81510
81510
  while (stack.length) {
81511
81511
  const [msg, ...args] = stack.pop();
81512
81512
  switch (msg.code) {
81513
81513
  case Diagnostics.Types_of_property_0_are_incompatible.code: {
81514
- if (path3.indexOf("new ") === 0) {
81515
- path3 = `(${path3})`;
81514
+ if (path4.indexOf("new ") === 0) {
81515
+ path4 = `(${path4})`;
81516
81516
  }
81517
81517
  const str = "" + args[0];
81518
- if (path3.length === 0) {
81519
- path3 = `${str}`;
81518
+ if (path4.length === 0) {
81519
+ path4 = `${str}`;
81520
81520
  } else if (isIdentifierText(str, getEmitScriptTarget(compilerOptions))) {
81521
- path3 = `${path3}.${str}`;
81521
+ path4 = `${path4}.${str}`;
81522
81522
  } else if (str[0] === "[" && str[str.length - 1] === "]") {
81523
- path3 = `${path3}${str}`;
81523
+ path4 = `${path4}${str}`;
81524
81524
  } else {
81525
- path3 = `${path3}[${str}]`;
81525
+ path4 = `${path4}[${str}]`;
81526
81526
  }
81527
81527
  break;
81528
81528
  }
@@ -81530,7 +81530,7 @@ ${lanes.join("\n")}
81530
81530
  case Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code:
81531
81531
  case Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:
81532
81532
  case Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: {
81533
- if (path3.length === 0) {
81533
+ if (path4.length === 0) {
81534
81534
  let mappedMsg = msg;
81535
81535
  if (msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) {
81536
81536
  mappedMsg = Diagnostics.Call_signature_return_types_0_and_1_are_incompatible;
@@ -81541,7 +81541,7 @@ ${lanes.join("\n")}
81541
81541
  } else {
81542
81542
  const prefix = msg.code === Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "new " : "";
81543
81543
  const params = msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code || msg.code === Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code ? "" : "...";
81544
- path3 = `${prefix}${path3}(${params})`;
81544
+ path4 = `${prefix}${path4}(${params})`;
81545
81545
  }
81546
81546
  break;
81547
81547
  }
@@ -81557,10 +81557,10 @@ ${lanes.join("\n")}
81557
81557
  return Debug.fail(`Unhandled Diagnostic: ${msg.code}`);
81558
81558
  }
81559
81559
  }
81560
- if (path3) {
81560
+ if (path4) {
81561
81561
  reportError(
81562
- path3[path3.length - 1] === ")" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types,
81563
- path3
81562
+ path4[path4.length - 1] === ")" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types,
81563
+ path4
81564
81564
  );
81565
81565
  } else {
81566
81566
  secondaryRootErrors.shift();
@@ -136628,9 +136628,9 @@ ${lanes.join("\n")}
136628
136628
  function createAddOutput() {
136629
136629
  let outputs;
136630
136630
  return { addOutput, getOutputs };
136631
- function addOutput(path3) {
136632
- if (path3) {
136633
- (outputs || (outputs = [])).push(path3);
136631
+ function addOutput(path4) {
136632
+ if (path4) {
136633
+ (outputs || (outputs = [])).push(path4);
136634
136634
  }
136635
136635
  }
136636
136636
  function getOutputs() {
@@ -141856,7 +141856,7 @@ ${lanes.join("\n")}
141856
141856
  return {
141857
141857
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
141858
141858
  fileExists,
141859
- readFile: (path3, encoding) => host.readFile(path3, encoding),
141859
+ readFile: (path4, encoding) => host.readFile(path4, encoding),
141860
141860
  directoryExists: host.directoryExists && directoryExists,
141861
141861
  getDirectories,
141862
141862
  readDirectory,
@@ -141873,8 +141873,8 @@ ${lanes.join("\n")}
141873
141873
  function getCachedFileSystemEntries(rootDirPath) {
141874
141874
  return cachedReadDirectoryResult.get(ensureTrailingDirectorySeparator(rootDirPath));
141875
141875
  }
141876
- function getCachedFileSystemEntriesForBaseDir(path3) {
141877
- const entries = getCachedFileSystemEntries(getDirectoryPath(path3));
141876
+ function getCachedFileSystemEntriesForBaseDir(path4) {
141877
+ const entries = getCachedFileSystemEntries(getDirectoryPath(path4));
141878
141878
  if (!entries) {
141879
141879
  return entries;
141880
141880
  }
@@ -141929,8 +141929,8 @@ ${lanes.join("\n")}
141929
141929
  return index2 >= 0;
141930
141930
  }
141931
141931
  function writeFile2(fileName, data, writeByteOrderMark) {
141932
- const path3 = toPath3(fileName);
141933
- const result = getCachedFileSystemEntriesForBaseDir(path3);
141932
+ const path4 = toPath3(fileName);
141933
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
141934
141934
  if (result) {
141935
141935
  updateFilesOfFileSystemEntry(
141936
141936
  result,
@@ -141942,17 +141942,17 @@ ${lanes.join("\n")}
141942
141942
  return host.writeFile(fileName, data, writeByteOrderMark);
141943
141943
  }
141944
141944
  function fileExists(fileName) {
141945
- const path3 = toPath3(fileName);
141946
- const result = getCachedFileSystemEntriesForBaseDir(path3);
141945
+ const path4 = toPath3(fileName);
141946
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
141947
141947
  return result && hasEntry(result.sortedAndCanonicalizedFiles, getCanonicalFileName(getBaseNameOfFileName(fileName))) || host.fileExists(fileName);
141948
141948
  }
141949
141949
  function directoryExists(dirPath) {
141950
- const path3 = toPath3(dirPath);
141951
- return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path3)) || host.directoryExists(dirPath);
141950
+ const path4 = toPath3(dirPath);
141951
+ return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path4)) || host.directoryExists(dirPath);
141952
141952
  }
141953
141953
  function createDirectory(dirPath) {
141954
- const path3 = toPath3(dirPath);
141955
- const result = getCachedFileSystemEntriesForBaseDir(path3);
141954
+ const path4 = toPath3(dirPath);
141955
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
141956
141956
  if (result) {
141957
141957
  const baseName = getBaseNameOfFileName(dirPath);
141958
141958
  const canonicalizedBaseName = getCanonicalFileName(baseName);
@@ -141980,15 +141980,15 @@ ${lanes.join("\n")}
141980
141980
  }
141981
141981
  return host.readDirectory(rootDir, extensions, excludes, includes, depth);
141982
141982
  function getFileSystemEntries(dir) {
141983
- const path3 = toPath3(dir);
141984
- if (path3 === rootDirPath) {
141985
- return rootResult || getFileSystemEntriesFromHost(dir, path3);
141983
+ const path4 = toPath3(dir);
141984
+ if (path4 === rootDirPath) {
141985
+ return rootResult || getFileSystemEntriesFromHost(dir, path4);
141986
141986
  }
141987
- const result = tryReadDirectory2(dir, path3);
141988
- return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path3) : emptyFileSystemEntries;
141987
+ const result = tryReadDirectory2(dir, path4);
141988
+ return result !== void 0 ? result || getFileSystemEntriesFromHost(dir, path4) : emptyFileSystemEntries;
141989
141989
  }
141990
- function getFileSystemEntriesFromHost(dir, path3) {
141991
- if (rootSymLinkResult && path3 === rootDirPath) return rootSymLinkResult;
141990
+ function getFileSystemEntriesFromHost(dir, path4) {
141991
+ if (rootSymLinkResult && path4 === rootDirPath) return rootSymLinkResult;
141992
141992
  const result = {
141993
141993
  files: map(host.readDirectory(
141994
141994
  dir,
@@ -142001,7 +142001,7 @@ ${lanes.join("\n")}
142001
142001
  ), getBaseNameOfFileName) || emptyArray,
142002
142002
  directories: host.getDirectories(dir) || emptyArray
142003
142003
  };
142004
- if (path3 === rootDirPath) rootSymLinkResult = result;
142004
+ if (path4 === rootDirPath) rootSymLinkResult = result;
142005
142005
  return result;
142006
142006
  }
142007
142007
  }
@@ -142460,15 +142460,15 @@ ${lanes.join("\n")}
142460
142460
  return getDirectoryPath(normalizePath(system.getExecutingFilePath()));
142461
142461
  }
142462
142462
  const newLine = getNewLineCharacter(options);
142463
- const realpath = system.realpath && ((path3) => system.realpath(path3));
142463
+ const realpath = system.realpath && ((path4) => system.realpath(path4));
142464
142464
  const compilerHost = {
142465
142465
  getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), setParentNodes),
142466
142466
  getDefaultLibLocation,
142467
142467
  getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
142468
142468
  writeFile: createWriteFileMeasuringIO(
142469
- (path3, data, writeByteOrderMark) => system.writeFile(path3, data, writeByteOrderMark),
142470
- (path3) => (compilerHost.createDirectory || system.createDirectory)(path3),
142471
- (path3) => directoryExists(path3)
142469
+ (path4, data, writeByteOrderMark) => system.writeFile(path4, data, writeByteOrderMark),
142470
+ (path4) => (compilerHost.createDirectory || system.createDirectory)(path4),
142471
+ (path4) => directoryExists(path4)
142472
142472
  ),
142473
142473
  getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
142474
142474
  useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,
@@ -142479,9 +142479,9 @@ ${lanes.join("\n")}
142479
142479
  trace: (s2) => system.write(s2 + newLine),
142480
142480
  directoryExists: (directoryName) => system.directoryExists(directoryName),
142481
142481
  getEnvironmentVariable: (name) => system.getEnvironmentVariable ? system.getEnvironmentVariable(name) : "",
142482
- getDirectories: (path3) => system.getDirectories(path3),
142482
+ getDirectories: (path4) => system.getDirectories(path4),
142483
142483
  realpath,
142484
- readDirectory: (path3, extensions, include, exclude, depth) => system.readDirectory(path3, extensions, include, exclude, depth),
142484
+ readDirectory: (path4, extensions, include, exclude, depth) => system.readDirectory(path4, extensions, include, exclude, depth),
142485
142485
  createDirectory: (d2) => system.createDirectory(d2),
142486
142486
  createHash: maybeBind(system, system.createHash)
142487
142487
  };
@@ -142920,13 +142920,13 @@ ${lanes.join("\n")}
142920
142920
  }
142921
142921
  function getLibraryNameFromLibFileName(libFileName) {
142922
142922
  const components = libFileName.split(".");
142923
- let path3 = components[1];
142923
+ let path4 = components[1];
142924
142924
  let i2 = 2;
142925
142925
  while (components[i2] && components[i2] !== "d") {
142926
- path3 += (i2 === 2 ? "/" : "-") + components[i2];
142926
+ path4 += (i2 === 2 ? "/" : "-") + components[i2];
142927
142927
  i2++;
142928
142928
  }
142929
- return "@typescript/lib-" + path3;
142929
+ return "@typescript/lib-" + path4;
142930
142930
  }
142931
142931
  function isReferencedFile(reason) {
142932
142932
  switch (reason == null ? void 0 : reason.kind) {
@@ -144002,18 +144002,18 @@ ${lanes.join("\n")}
144002
144002
  filesByName.set(newSourceFile.path, newSourceFile);
144003
144003
  }
144004
144004
  const oldFilesByNameMap = oldProgram.getFilesByNameMap();
144005
- oldFilesByNameMap.forEach((oldFile, path3) => {
144005
+ oldFilesByNameMap.forEach((oldFile, path4) => {
144006
144006
  if (!oldFile) {
144007
- filesByName.set(path3, oldFile);
144007
+ filesByName.set(path4, oldFile);
144008
144008
  return;
144009
144009
  }
144010
- if (oldFile.path === path3) {
144010
+ if (oldFile.path === path4) {
144011
144011
  if (oldProgram.isSourceFileFromExternalLibrary(oldFile)) {
144012
144012
  sourceFilesFoundSearchingNodeModules.set(oldFile.path, true);
144013
144013
  }
144014
144014
  return;
144015
144015
  }
144016
- filesByName.set(path3, filesByName.get(oldFile.path));
144016
+ filesByName.set(path4, filesByName.get(oldFile.path));
144017
144017
  });
144018
144018
  const isConfigIdentical = oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations);
144019
144019
  programDiagnostics.reuseStateFromOldProgram(oldProgram.getProgramDiagnosticsContainer(), isConfigIdentical);
@@ -144051,9 +144051,9 @@ ${lanes.join("\n")}
144051
144051
  getModeForResolutionAtIndex: getModeForResolutionAtIndex2,
144052
144052
  readFile: (f) => host.readFile(f),
144053
144053
  fileExists: (f) => {
144054
- const path3 = toPath3(f);
144055
- if (getSourceFileByPath(path3)) return true;
144056
- if (missingFileNames.has(path3)) return false;
144054
+ const path4 = toPath3(f);
144055
+ if (getSourceFileByPath(path4)) return true;
144056
+ if (missingFileNames.has(path4)) return false;
144057
144057
  return host.fileExists(f);
144058
144058
  },
144059
144059
  realpath: maybeBind(host, host.realpath),
@@ -144193,8 +144193,8 @@ ${lanes.join("\n")}
144193
144193
  function getSourceFile(fileName) {
144194
144194
  return getSourceFileByPath(toPath3(fileName));
144195
144195
  }
144196
- function getSourceFileByPath(path3) {
144197
- return filesByName.get(path3) || void 0;
144196
+ function getSourceFileByPath(path4) {
144197
+ return filesByName.get(path4) || void 0;
144198
144198
  }
144199
144199
  function getDiagnosticsHelper(sourceFile, getDiagnostics2, cancellationToken) {
144200
144200
  if (sourceFile) {
@@ -144837,16 +144837,16 @@ ${lanes.join("\n")}
144837
144837
  addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]);
144838
144838
  }
144839
144839
  }
144840
- function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path3, resolvedPath, originalFileName, sourceFileOptions) {
144840
+ function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path4, resolvedPath, originalFileName, sourceFileOptions) {
144841
144841
  var _a2;
144842
144842
  const redirect = parseNodeFactory.createRedirectedSourceFile({ redirectTarget, unredirected });
144843
144843
  redirect.fileName = fileName;
144844
- redirect.path = path3;
144844
+ redirect.path = path4;
144845
144845
  redirect.resolvedPath = resolvedPath;
144846
144846
  redirect.originalFileName = originalFileName;
144847
144847
  redirect.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _a2.length) ? sourceFileOptions.packageJsonLocations : void 0;
144848
144848
  redirect.packageJsonScope = sourceFileOptions.packageJsonScope;
144849
- sourceFilesFoundSearchingNodeModules.set(path3, currentNodeModulesDepth > 0);
144849
+ sourceFilesFoundSearchingNodeModules.set(path4, currentNodeModulesDepth > 0);
144850
144850
  return redirect;
144851
144851
  }
144852
144852
  function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
@@ -144868,18 +144868,18 @@ ${lanes.join("\n")}
144868
144868
  }
144869
144869
  function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
144870
144870
  var _a2, _b2;
144871
- const path3 = toPath3(fileName);
144871
+ const path4 = toPath3(fileName);
144872
144872
  if (useSourceOfProjectReferenceRedirect) {
144873
- let source = getRedirectFromOutput(path3);
144873
+ let source = getRedirectFromOutput(path4);
144874
144874
  if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
144875
144875
  const realPath2 = toPath3(host.realpath(fileName));
144876
- if (realPath2 !== path3) source = getRedirectFromOutput(realPath2);
144876
+ if (realPath2 !== path4) source = getRedirectFromOutput(realPath2);
144877
144877
  }
144878
144878
  if (source == null ? void 0 : source.source) {
144879
144879
  const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
144880
144880
  if (file2) addFileToFilesByName(
144881
144881
  file2,
144882
- path3,
144882
+ path4,
144883
144883
  fileName,
144884
144884
  /*redirectedPath*/
144885
144885
  void 0
@@ -144888,8 +144888,8 @@ ${lanes.join("\n")}
144888
144888
  }
144889
144889
  }
144890
144890
  const originalFileName = fileName;
144891
- if (filesByName.has(path3)) {
144892
- const file2 = filesByName.get(path3);
144891
+ if (filesByName.has(path4)) {
144892
+ const file2 = filesByName.get(path4);
144893
144893
  const addedReason = addFileIncludeReason(
144894
144894
  file2 || void 0,
144895
144895
  reason,
@@ -144955,28 +144955,28 @@ ${lanes.join("\n")}
144955
144955
  const packageIdKey = packageIdToString(packageId);
144956
144956
  const fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
144957
144957
  if (fileFromPackageId) {
144958
- const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path3, toPath3(fileName), originalFileName, sourceFileOptions);
144958
+ const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path4, toPath3(fileName), originalFileName, sourceFileOptions);
144959
144959
  redirectTargetsMap.add(fileFromPackageId.path, fileName);
144960
- addFileToFilesByName(dupFile, path3, fileName, redirectedPath);
144960
+ addFileToFilesByName(dupFile, path4, fileName, redirectedPath);
144961
144961
  addFileIncludeReason(
144962
144962
  dupFile,
144963
144963
  reason,
144964
144964
  /*checkExisting*/
144965
144965
  false
144966
144966
  );
144967
- sourceFileToPackageName.set(path3, packageIdToPackageName(packageId));
144967
+ sourceFileToPackageName.set(path4, packageIdToPackageName(packageId));
144968
144968
  processingOtherFiles.push(dupFile);
144969
144969
  return dupFile;
144970
144970
  } else if (file) {
144971
144971
  packageIdToSourceFile.set(packageIdKey, file);
144972
- sourceFileToPackageName.set(path3, packageIdToPackageName(packageId));
144972
+ sourceFileToPackageName.set(path4, packageIdToPackageName(packageId));
144973
144973
  }
144974
144974
  }
144975
- addFileToFilesByName(file, path3, fileName, redirectedPath);
144975
+ addFileToFilesByName(file, path4, fileName, redirectedPath);
144976
144976
  if (file) {
144977
- sourceFilesFoundSearchingNodeModules.set(path3, currentNodeModulesDepth > 0);
144977
+ sourceFilesFoundSearchingNodeModules.set(path4, currentNodeModulesDepth > 0);
144978
144978
  file.fileName = fileName;
144979
- file.path = path3;
144979
+ file.path = path4;
144980
144980
  file.resolvedPath = toPath3(fileName);
144981
144981
  file.originalFileName = originalFileName;
144982
144982
  file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? void 0 : _b2.length) ? sourceFileOptions.packageJsonLocations : void 0;
@@ -144988,7 +144988,7 @@ ${lanes.join("\n")}
144988
144988
  false
144989
144989
  );
144990
144990
  if (host.useCaseSensitiveFileNames()) {
144991
- const pathLowerCase = toFileNameLowerCase(path3);
144991
+ const pathLowerCase = toFileNameLowerCase(path4);
144992
144992
  const existingFile = filesByNameIgnoreCase.get(pathLowerCase);
144993
144993
  if (existingFile) {
144994
144994
  reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason);
@@ -145021,18 +145021,18 @@ ${lanes.join("\n")}
145021
145021
  }
145022
145022
  return false;
145023
145023
  }
145024
- function addFileToFilesByName(file, path3, fileName, redirectedPath) {
145024
+ function addFileToFilesByName(file, path4, fileName, redirectedPath) {
145025
145025
  if (redirectedPath) {
145026
145026
  updateFilesByNameMap(fileName, redirectedPath, file);
145027
- updateFilesByNameMap(fileName, path3, file || false);
145027
+ updateFilesByNameMap(fileName, path4, file || false);
145028
145028
  } else {
145029
- updateFilesByNameMap(fileName, path3, file);
145029
+ updateFilesByNameMap(fileName, path4, file);
145030
145030
  }
145031
145031
  }
145032
- function updateFilesByNameMap(fileName, path3, file) {
145033
- filesByName.set(path3, file);
145034
- if (file !== void 0) missingFileNames.delete(path3);
145035
- else missingFileNames.set(path3, fileName);
145032
+ function updateFilesByNameMap(fileName, path4, file) {
145033
+ filesByName.set(path4, file);
145034
+ if (file !== void 0) missingFileNames.delete(path4);
145035
+ else missingFileNames.set(path4, fileName);
145036
145036
  }
145037
145037
  function getRedirectFromSourceFile(fileName) {
145038
145038
  return mapSourceFileToResolvedRef == null ? void 0 : mapSourceFileToResolvedRef.get(toPath3(fileName));
@@ -145040,8 +145040,8 @@ ${lanes.join("\n")}
145040
145040
  function forEachResolvedProjectReference2(cb) {
145041
145041
  return forEachResolvedProjectReference(resolvedProjectReferences, cb);
145042
145042
  }
145043
- function getRedirectFromOutput(path3) {
145044
- return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path3);
145043
+ function getRedirectFromOutput(path4) {
145044
+ return mapOutputFileToResolvedRef == null ? void 0 : mapOutputFileToResolvedRef.get(path4);
145045
145045
  }
145046
145046
  function isSourceOfProjectReferenceRedirect(fileName) {
145047
145047
  return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName);
@@ -145340,7 +145340,7 @@ ${lanes.join("\n")}
145340
145340
  }
145341
145341
  const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
145342
145342
  commandLine.fileNames.forEach((fileName) => {
145343
- const path3 = toPath3(fileName);
145343
+ const path4 = toPath3(fileName);
145344
145344
  let outputDts;
145345
145345
  if (!isDeclarationFileName(fileName) && !fileExtensionIs(
145346
145346
  fileName,
@@ -145354,7 +145354,7 @@ ${lanes.join("\n")}
145354
145354
  outputDts = outDts;
145355
145355
  }
145356
145356
  }
145357
- mapSourceFileToResolvedRef.set(path3, { resolvedRef, outputDts });
145357
+ mapSourceFileToResolvedRef.set(path4, { resolvedRef, outputDts });
145358
145358
  });
145359
145359
  }
145360
145360
  if (commandLine.projectReferences) {
@@ -146042,9 +146042,9 @@ ${lanes.join("\n")}
146042
146042
  host.compilerHost.fileExists = fileExists;
146043
146043
  let directoryExists;
146044
146044
  if (originalDirectoryExists) {
146045
- directoryExists = host.compilerHost.directoryExists = (path3) => {
146046
- if (originalDirectoryExists.call(host.compilerHost, path3)) {
146047
- handleDirectoryCouldBeSymlink(path3);
146045
+ directoryExists = host.compilerHost.directoryExists = (path4) => {
146046
+ if (originalDirectoryExists.call(host.compilerHost, path4)) {
146047
+ handleDirectoryCouldBeSymlink(path4);
146048
146048
  return true;
146049
146049
  }
146050
146050
  if (!host.getResolvedProjectReferences()) return false;
@@ -146063,14 +146063,14 @@ ${lanes.join("\n")}
146063
146063
  });
146064
146064
  }
146065
146065
  return fileOrDirectoryExistsUsingSource(
146066
- path3,
146066
+ path4,
146067
146067
  /*isFile*/
146068
146068
  false
146069
146069
  );
146070
146070
  };
146071
146071
  }
146072
146072
  if (originalGetDirectories) {
146073
- host.compilerHost.getDirectories = (path3) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path3) ? originalGetDirectories.call(host.compilerHost, path3) : [];
146073
+ host.compilerHost.getDirectories = (path4) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path4) ? originalGetDirectories.call(host.compilerHost, path4) : [];
146074
146074
  }
146075
146075
  if (originalRealpath) {
146076
146076
  host.compilerHost.realpath = (s2) => {
@@ -146737,12 +146737,12 @@ ${lanes.join("\n")}
146737
146737
  state.allFileNames = void 0;
146738
146738
  }
146739
146739
  BuilderState2.releaseCache = releaseCache2;
146740
- function getFilesAffectedBy(state, programOfThisState, path3, cancellationToken, host) {
146740
+ function getFilesAffectedBy(state, programOfThisState, path4, cancellationToken, host) {
146741
146741
  var _a;
146742
146742
  const result = getFilesAffectedByWithOldState(
146743
146743
  state,
146744
146744
  programOfThisState,
146745
- path3,
146745
+ path4,
146746
146746
  cancellationToken,
146747
146747
  host
146748
146748
  );
@@ -146750,8 +146750,8 @@ ${lanes.join("\n")}
146750
146750
  return result;
146751
146751
  }
146752
146752
  BuilderState2.getFilesAffectedBy = getFilesAffectedBy;
146753
- function getFilesAffectedByWithOldState(state, programOfThisState, path3, cancellationToken, host) {
146754
- const sourceFile = programOfThisState.getSourceFileByPath(path3);
146753
+ function getFilesAffectedByWithOldState(state, programOfThisState, path4, cancellationToken, host) {
146754
+ const sourceFile = programOfThisState.getSourceFileByPath(path4);
146755
146755
  if (!sourceFile) {
146756
146756
  return emptyArray;
146757
146757
  }
@@ -146761,9 +146761,9 @@ ${lanes.join("\n")}
146761
146761
  return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host);
146762
146762
  }
146763
146763
  BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
146764
- function updateSignatureOfFile(state, signature, path3) {
146765
- state.fileInfos.get(path3).signature = signature;
146766
- (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path3);
146764
+ function updateSignatureOfFile(state, signature, path4) {
146765
+ state.fileInfos.get(path4).signature = signature;
146766
+ (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set())).add(path4);
146767
146767
  }
146768
146768
  BuilderState2.updateSignatureOfFile = updateSignatureOfFile;
146769
146769
  function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) {
@@ -146832,10 +146832,10 @@ ${lanes.join("\n")}
146832
146832
  const seenMap = /* @__PURE__ */ new Set();
146833
146833
  const queue = [sourceFile.resolvedPath];
146834
146834
  while (queue.length) {
146835
- const path3 = queue.pop();
146836
- if (!seenMap.has(path3)) {
146837
- seenMap.add(path3);
146838
- const references = state.referencedMap.getValues(path3);
146835
+ const path4 = queue.pop();
146836
+ if (!seenMap.has(path4)) {
146837
+ seenMap.add(path4);
146838
+ const references = state.referencedMap.getValues(path4);
146839
146839
  if (references) {
146840
146840
  for (const key of references.keys()) {
146841
146841
  queue.push(key);
@@ -146843,9 +146843,9 @@ ${lanes.join("\n")}
146843
146843
  }
146844
146844
  }
146845
146845
  }
146846
- return arrayFrom(mapDefinedIterator(seenMap.keys(), (path3) => {
146846
+ return arrayFrom(mapDefinedIterator(seenMap.keys(), (path4) => {
146847
146847
  var _a;
146848
- return ((_a = programOfThisState.getSourceFileByPath(path3)) == null ? void 0 : _a.fileName) ?? path3;
146848
+ return ((_a = programOfThisState.getSourceFileByPath(path4)) == null ? void 0 : _a.fileName) ?? path4;
146849
146849
  }));
146850
146850
  }
146851
146851
  BuilderState2.getAllDependencies = getAllDependencies;
@@ -147024,7 +147024,7 @@ ${lanes.join("\n")}
147024
147024
  oldInfo.version !== info.version || // Implied formats dont match
147025
147025
  oldInfo.impliedFormat !== info.impliedFormat || // Referenced files changed
147026
147026
  !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || // Referenced file was deleted in the new program
147027
- newReferences && forEachKey(newReferences, (path3) => !state.fileInfos.has(path3) && oldState.fileInfos.has(path3))) {
147027
+ newReferences && forEachKey(newReferences, (path4) => !state.fileInfos.has(path4) && oldState.fileInfos.has(path4))) {
147028
147028
  addFileToChangeSet(sourceFilePath);
147029
147029
  } else {
147030
147030
  const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
@@ -147090,8 +147090,8 @@ ${lanes.join("\n")}
147090
147090
  }
147091
147091
  if (useOldState && state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && oldState.checkPending !== state.checkPending) state.buildInfoEmitPending = true;
147092
147092
  return state;
147093
- function addFileToChangeSet(path3) {
147094
- state.changedFilesSet.add(path3);
147093
+ function addFileToChangeSet(path4) {
147094
+ state.changedFilesSet.add(path4);
147095
147095
  if (outFilePath) {
147096
147096
  canCopySemanticDiagnostics = false;
147097
147097
  canCopyEmitDiagnostics = false;
@@ -147155,9 +147155,9 @@ ${lanes.join("\n")}
147155
147155
  result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r2) => convertToDiagnosticRelatedInformation(r2, diagnosticFilePath, newProgram, toPathInBuildInfoDirectory)) : [] : void 0;
147156
147156
  return result;
147157
147157
  });
147158
- function toPathInBuildInfoDirectory(path3) {
147158
+ function toPathInBuildInfoDirectory(path4) {
147159
147159
  buildInfoDirectory ?? (buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory())));
147160
- return toPath(path3, buildInfoDirectory, newProgram.getCanonicalFileName);
147160
+ return toPath(path4, buildInfoDirectory, newProgram.getCanonicalFileName);
147161
147161
  }
147162
147162
  }
147163
147163
  function convertToDiagnosticRelatedInformation(diagnostic, diagnosticFilePath, newProgram, toPath3) {
@@ -147232,10 +147232,10 @@ ${lanes.join("\n")}
147232
147232
  state.affectedFilesPendingEmit = void 0;
147233
147233
  state.programEmitPending = void 0;
147234
147234
  }
147235
- (_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path3) => {
147235
+ (_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.forEach((emitKind, path4) => {
147236
147236
  const pending = !isForDtsErrors ? emitKind & 7 : emitKind & (7 | 48);
147237
- if (!pending) state.affectedFilesPendingEmit.delete(path3);
147238
- else state.affectedFilesPendingEmit.set(path3, pending);
147237
+ if (!pending) state.affectedFilesPendingEmit.delete(path4);
147238
+ else state.affectedFilesPendingEmit.set(path4, pending);
147239
147239
  });
147240
147240
  if (state.programEmitPending) {
147241
147241
  const pending = !isForDtsErrors ? state.programEmitPending & 7 : state.programEmitPending & (7 | 48);
@@ -147255,11 +147255,11 @@ ${lanes.join("\n")}
147255
147255
  function getNextAffectedFilePendingEmit(state, emitOnlyDtsFiles, isForDtsErrors) {
147256
147256
  var _a;
147257
147257
  if (!((_a = state.affectedFilesPendingEmit) == null ? void 0 : _a.size)) return void 0;
147258
- return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path3) => {
147258
+ return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path4) => {
147259
147259
  var _a2;
147260
- const affectedFile = state.program.getSourceFileByPath(path3);
147260
+ const affectedFile = state.program.getSourceFileByPath(path4);
147261
147261
  if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
147262
- state.affectedFilesPendingEmit.delete(path3);
147262
+ state.affectedFilesPendingEmit.delete(path4);
147263
147263
  return void 0;
147264
147264
  }
147265
147265
  const seenKind = (_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath);
@@ -147275,11 +147275,11 @@ ${lanes.join("\n")}
147275
147275
  function getNextPendingEmitDiagnosticsFile(state, isForDtsErrors) {
147276
147276
  var _a;
147277
147277
  if (!((_a = state.emitDiagnosticsPerFile) == null ? void 0 : _a.size)) return void 0;
147278
- return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path3) => {
147278
+ return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path4) => {
147279
147279
  var _a2;
147280
- const affectedFile = state.program.getSourceFileByPath(path3);
147280
+ const affectedFile = state.program.getSourceFileByPath(path4);
147281
147281
  if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
147282
- state.emitDiagnosticsPerFile.delete(path3);
147282
+ state.emitDiagnosticsPerFile.delete(path4);
147283
147283
  return void 0;
147284
147284
  }
147285
147285
  const seenKind = ((_a2 = state.seenEmittedFiles) == null ? void 0 : _a2.get(affectedFile.resolvedPath)) || 0;
@@ -147314,10 +147314,10 @@ ${lanes.join("\n")}
147314
147314
  host
147315
147315
  );
147316
147316
  }
147317
- function handleDtsMayChangeOf(state, path3, invalidateJsFiles, cancellationToken, host) {
147318
- removeSemanticDiagnosticsOf(state, path3);
147319
- if (!state.changedFilesSet.has(path3)) {
147320
- const sourceFile = state.program.getSourceFileByPath(path3);
147317
+ function handleDtsMayChangeOf(state, path4, invalidateJsFiles, cancellationToken, host) {
147318
+ removeSemanticDiagnosticsOf(state, path4);
147319
+ if (!state.changedFilesSet.has(path4)) {
147320
+ const sourceFile = state.program.getSourceFileByPath(path4);
147321
147321
  if (sourceFile) {
147322
147322
  BuilderState.updateShapeSignature(
147323
147323
  state,
@@ -147331,13 +147331,13 @@ ${lanes.join("\n")}
147331
147331
  if (invalidateJsFiles) {
147332
147332
  addToAffectedFilesPendingEmit(
147333
147333
  state,
147334
- path3,
147334
+ path4,
147335
147335
  getBuilderFileEmit(state.compilerOptions)
147336
147336
  );
147337
147337
  } else if (getEmitDeclarations(state.compilerOptions)) {
147338
147338
  addToAffectedFilesPendingEmit(
147339
147339
  state,
147340
- path3,
147340
+ path4,
147341
147341
  state.compilerOptions.declarationMap ? 56 : 24
147342
147342
  /* Dts */
147343
147343
  );
@@ -147345,17 +147345,17 @@ ${lanes.join("\n")}
147345
147345
  }
147346
147346
  }
147347
147347
  }
147348
- function removeSemanticDiagnosticsOf(state, path3) {
147348
+ function removeSemanticDiagnosticsOf(state, path4) {
147349
147349
  if (!state.semanticDiagnosticsFromOldState) {
147350
147350
  return true;
147351
147351
  }
147352
- state.semanticDiagnosticsFromOldState.delete(path3);
147353
- state.semanticDiagnosticsPerFile.delete(path3);
147352
+ state.semanticDiagnosticsFromOldState.delete(path4);
147353
+ state.semanticDiagnosticsPerFile.delete(path4);
147354
147354
  return !state.semanticDiagnosticsFromOldState.size;
147355
147355
  }
147356
- function isChangedSignature(state, path3) {
147357
- const oldSignature = Debug.checkDefined(state.oldSignatures).get(path3) || void 0;
147358
- const newSignature = Debug.checkDefined(state.fileInfos.get(path3)).signature;
147356
+ function isChangedSignature(state, path4) {
147357
+ const oldSignature = Debug.checkDefined(state.oldSignatures).get(path4) || void 0;
147358
+ const newSignature = Debug.checkDefined(state.fileInfos.get(path4)).signature;
147359
147359
  return newSignature !== oldSignature;
147360
147360
  }
147361
147361
  function handleDtsMayChangeOfGlobalScope(state, filePath, invalidateJsFiles, cancellationToken, host) {
@@ -147462,13 +147462,13 @@ ${lanes.join("\n")}
147462
147462
  }
147463
147463
  function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) {
147464
147464
  semanticDiagnosticsPerFile ?? (semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile);
147465
- const path3 = sourceFile.resolvedPath;
147466
- const cachedDiagnostics = semanticDiagnosticsPerFile.get(path3);
147465
+ const path4 = sourceFile.resolvedPath;
147466
+ const cachedDiagnostics = semanticDiagnosticsPerFile.get(path4);
147467
147467
  if (cachedDiagnostics) {
147468
147468
  return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);
147469
147469
  }
147470
147470
  const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken);
147471
- semanticDiagnosticsPerFile.set(path3, diagnostics);
147471
+ semanticDiagnosticsPerFile.set(path4, diagnostics);
147472
147472
  state.buildInfoEmitPending = true;
147473
147473
  return filterSemanticDiagnostics(diagnostics, state.compilerOptions);
147474
147474
  }
@@ -147616,11 +147616,11 @@ ${lanes.join("\n")}
147616
147616
  if ((_b = state.affectedFilesPendingEmit) == null ? void 0 : _b.size) {
147617
147617
  const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
147618
147618
  const seenFiles = /* @__PURE__ */ new Set();
147619
- for (const path3 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
147620
- if (tryAddToSet(seenFiles, path3)) {
147621
- const file = state.program.getSourceFileByPath(path3);
147619
+ for (const path4 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
147620
+ if (tryAddToSet(seenFiles, path4)) {
147621
+ const file = state.program.getSourceFileByPath(path4);
147622
147622
  if (!file || !sourceFileMayBeEmitted(file, state.program)) continue;
147623
- const fileId = toFileId(path3), pendingEmit = state.affectedFilesPendingEmit.get(path3);
147623
+ const fileId = toFileId(path4), pendingEmit = state.affectedFilesPendingEmit.get(path4);
147624
147624
  affectedFilesPendingEmit = append(
147625
147625
  affectedFilesPendingEmit,
147626
147626
  pendingEmit === fullEmitForOptions ? fileId : (
@@ -147654,17 +147654,17 @@ ${lanes.join("\n")}
147654
147654
  version
147655
147655
  };
147656
147656
  return buildInfo;
147657
- function relativeToBuildInfoEnsuringAbsolutePath(path3) {
147658
- return relativeToBuildInfo(getNormalizedAbsolutePath(path3, currentDirectory));
147657
+ function relativeToBuildInfoEnsuringAbsolutePath(path4) {
147658
+ return relativeToBuildInfo(getNormalizedAbsolutePath(path4, currentDirectory));
147659
147659
  }
147660
- function relativeToBuildInfo(path3) {
147661
- return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path3, state.program.getCanonicalFileName));
147660
+ function relativeToBuildInfo(path4) {
147661
+ return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path4, state.program.getCanonicalFileName));
147662
147662
  }
147663
- function toFileId(path3) {
147664
- let fileId = fileNameToFileId.get(path3);
147663
+ function toFileId(path4) {
147664
+ let fileId = fileNameToFileId.get(path4);
147665
147665
  if (fileId === void 0) {
147666
- fileNames.push(relativeToBuildInfo(path3));
147667
- fileNameToFileId.set(path3, fileId = fileNames.length);
147666
+ fileNames.push(relativeToBuildInfo(path4));
147667
+ fileNameToFileId.set(path4, fileId = fileNames.length);
147668
147668
  }
147669
147669
  return fileId;
147670
147670
  }
@@ -147678,8 +147678,8 @@ ${lanes.join("\n")}
147678
147678
  }
147679
147679
  return fileIdListId;
147680
147680
  }
147681
- function tryAddRoot(path3, fileId) {
147682
- const file = state.program.getSourceFile(path3);
147681
+ function tryAddRoot(path4, fileId) {
147682
+ const file = state.program.getSourceFile(path4);
147683
147683
  if (!state.program.getFileIncludeReasons().get(file.path).some(
147684
147684
  (r2) => r2.kind === 0
147685
147685
  /* RootFile */
@@ -147696,10 +147696,10 @@ ${lanes.join("\n")}
147696
147696
  }
147697
147697
  function toResolvedRoot() {
147698
147698
  let result;
147699
- rootFileNames.forEach((path3) => {
147700
- const file = state.program.getSourceFileByPath(path3);
147701
- if (file && path3 !== file.resolvedPath) {
147702
- result = append(result, [toFileId(file.resolvedPath), toFileId(path3)]);
147699
+ rootFileNames.forEach((path4) => {
147700
+ const file = state.program.getSourceFileByPath(path4);
147701
+ if (file && path4 !== file.resolvedPath) {
147702
+ result = append(result, [toFileId(file.resolvedPath), toFileId(path4)]);
147703
147703
  }
147704
147704
  });
147705
147705
  return result;
@@ -147807,8 +147807,8 @@ ${lanes.join("\n")}
147807
147807
  function toChangeFileSet() {
147808
147808
  let changeFileSet;
147809
147809
  if (state.changedFilesSet.size) {
147810
- for (const path3 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
147811
- changeFileSet = append(changeFileSet, toFileId(path3));
147810
+ for (const path4 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
147811
+ changeFileSet = append(changeFileSet, toFileId(path4));
147812
147812
  }
147813
147813
  }
147814
147814
  return changeFileSet;
@@ -148307,8 +148307,8 @@ ${lanes.join("\n")}
148307
148307
  const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));
148308
148308
  if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
148309
148309
  buildInfo.fileInfos.forEach((fileInfo, index2) => {
148310
- const path3 = toFilePath(index2 + 1);
148311
- fileInfos.set(path3, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
148310
+ const path4 = toFilePath(index2 + 1);
148311
+ fileInfos.set(path4, isString(fileInfo) ? { version: fileInfo, signature: void 0, affectsGlobalScope: void 0, impliedFormat: void 0 } : fileInfo);
148312
148312
  });
148313
148313
  state = {
148314
148314
  fileInfos,
@@ -148327,10 +148327,10 @@ ${lanes.join("\n")}
148327
148327
  filePathsSetList = (_b = buildInfo.fileIdsList) == null ? void 0 : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
148328
148328
  const emitSignatures = ((_c = buildInfo.options) == null ? void 0 : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map() : void 0;
148329
148329
  buildInfo.fileInfos.forEach((fileInfo, index2) => {
148330
- const path3 = toFilePath(index2 + 1);
148330
+ const path4 = toFilePath(index2 + 1);
148331
148331
  const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
148332
- fileInfos.set(path3, stateFileInfo);
148333
- if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path3, stateFileInfo.signature);
148332
+ fileInfos.set(path4, stateFileInfo);
148333
+ if (emitSignatures && stateFileInfo.signature) emitSignatures.set(path4, stateFileInfo.signature);
148334
148334
  });
148335
148335
  (_d = buildInfo.emitSignatures) == null ? void 0 : _d.forEach((value) => {
148336
148336
  if (isNumber(value)) emitSignatures.delete(toFilePath(value));
@@ -148384,11 +148384,11 @@ ${lanes.join("\n")}
148384
148384
  close: noop,
148385
148385
  hasChangedEmitSignature: returnFalse
148386
148386
  };
148387
- function toPathInBuildInfoDirectory(path3) {
148388
- return toPath(path3, buildInfoDirectory, getCanonicalFileName);
148387
+ function toPathInBuildInfoDirectory(path4) {
148388
+ return toPath(path4, buildInfoDirectory, getCanonicalFileName);
148389
148389
  }
148390
- function toAbsolutePath(path3) {
148391
- return getNormalizedAbsolutePath(path3, buildInfoDirectory);
148390
+ function toAbsolutePath(path4) {
148391
+ return getNormalizedAbsolutePath(path4, buildInfoDirectory);
148392
148392
  }
148393
148393
  function toFilePath(fileId) {
148394
148394
  return filePaths[fileId - 1];
@@ -148427,30 +148427,30 @@ ${lanes.join("\n")}
148427
148427
  const roots = /* @__PURE__ */ new Map();
148428
148428
  const resolvedRoots = new Map(program2.resolvedRoot);
148429
148429
  program2.fileInfos.forEach((fileInfo, index2) => {
148430
- const path3 = toPath(program2.fileNames[index2], buildInfoDirectory, getCanonicalFileName);
148430
+ const path4 = toPath(program2.fileNames[index2], buildInfoDirectory, getCanonicalFileName);
148431
148431
  const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;
148432
- fileInfos.set(path3, version2);
148432
+ fileInfos.set(path4, version2);
148433
148433
  if (rootIndex < program2.root.length) {
148434
148434
  const current = program2.root[rootIndex];
148435
148435
  const fileId = index2 + 1;
148436
148436
  if (isArray(current)) {
148437
148437
  if (current[0] <= fileId && fileId <= current[1]) {
148438
- addRoot(fileId, path3);
148438
+ addRoot(fileId, path4);
148439
148439
  if (current[1] === fileId) rootIndex++;
148440
148440
  }
148441
148441
  } else if (current === fileId) {
148442
- addRoot(fileId, path3);
148442
+ addRoot(fileId, path4);
148443
148443
  rootIndex++;
148444
148444
  }
148445
148445
  }
148446
148446
  });
148447
148447
  return { fileInfos, roots };
148448
- function addRoot(fileId, path3) {
148448
+ function addRoot(fileId, path4) {
148449
148449
  const root = resolvedRoots.get(fileId);
148450
148450
  if (root) {
148451
- roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path3);
148451
+ roots.set(toPath(program2.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path4);
148452
148452
  } else {
148453
- roots.set(path3, void 0);
148453
+ roots.set(path4, void 0);
148454
148454
  }
148455
148455
  }
148456
148456
  }
@@ -148525,11 +148525,11 @@ ${lanes.join("\n")}
148525
148525
  newConfigFileParsingDiagnostics
148526
148526
  );
148527
148527
  }
148528
- function removeIgnoredPath(path3) {
148529
- if (endsWith(path3, "/node_modules/.staging")) {
148530
- return removeSuffix(path3, "/.staging");
148528
+ function removeIgnoredPath(path4) {
148529
+ if (endsWith(path4, "/node_modules/.staging")) {
148530
+ return removeSuffix(path4, "/.staging");
148531
148531
  }
148532
- return some(ignoredPaths, (searchPath) => path3.includes(searchPath)) ? void 0 : path3;
148532
+ return some(ignoredPaths, (searchPath) => path4.includes(searchPath)) ? void 0 : path4;
148533
148533
  }
148534
148534
  function perceivedOsRootLengthForWatching(pathComponents2, length2) {
148535
148535
  if (length2 <= 1) return 1;
@@ -148555,8 +148555,8 @@ ${lanes.join("\n")}
148555
148555
  const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2);
148556
148556
  return length2 > perceivedOsRootLength + 1;
148557
148557
  }
148558
- function canWatchDirectoryOrFilePath(path3) {
148559
- return canWatchDirectoryOrFile(getPathComponents(path3));
148558
+ function canWatchDirectoryOrFilePath(path4) {
148559
+ return canWatchDirectoryOrFile(getPathComponents(path4));
148560
148560
  }
148561
148561
  function canWatchAtTypes(atTypes) {
148562
148562
  return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes));
@@ -148850,11 +148850,11 @@ ${lanes.join("\n")}
148850
148850
  filesWithChangedSetOfUnresolvedImports = void 0;
148851
148851
  return collected;
148852
148852
  }
148853
- function isFileWithInvalidatedNonRelativeUnresolvedImports(path3) {
148853
+ function isFileWithInvalidatedNonRelativeUnresolvedImports(path4) {
148854
148854
  if (!filesWithInvalidatedNonRelativeUnresolvedImports) {
148855
148855
  return false;
148856
148856
  }
148857
- const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path3);
148857
+ const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path4);
148858
148858
  return !!value && !!value.length;
148859
148859
  }
148860
148860
  function createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidatedLibResolutions) {
@@ -148862,7 +148862,7 @@ ${lanes.join("\n")}
148862
148862
  const collected = filesWithInvalidatedResolutions;
148863
148863
  filesWithInvalidatedResolutions = void 0;
148864
148864
  return {
148865
- hasInvalidatedResolutions: (path3) => customHasInvalidatedResolutions(path3) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path3)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path3),
148865
+ hasInvalidatedResolutions: (path4) => customHasInvalidatedResolutions(path4) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? void 0 : collected.has(path4)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path4),
148866
148866
  hasInvalidatedLibResolutions: (libFileName) => {
148867
148867
  var _a;
148868
148868
  return customHasInvalidatedLibResolutions(libFileName) || !!((_a = resolvedLibraries == null ? void 0 : resolvedLibraries.get(libFileName)) == null ? void 0 : _a.isInvalidated);
@@ -148918,11 +148918,11 @@ ${lanes.join("\n")}
148918
148918
  if (expected) impliedFormatPackageJsons.set(newFile.resolvedPath, newFile.packageJsonLocations);
148919
148919
  else impliedFormatPackageJsons.delete(newFile.resolvedPath);
148920
148920
  });
148921
- impliedFormatPackageJsons.forEach((existing, path3) => {
148922
- const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(path3);
148923
- if (!newFile || newFile.resolvedPath !== path3) {
148921
+ impliedFormatPackageJsons.forEach((existing, path4) => {
148922
+ const newFile = newProgram == null ? void 0 : newProgram.getSourceFileByPath(path4);
148923
+ if (!newFile || newFile.resolvedPath !== path4) {
148924
148924
  existing.forEach((location) => fileWatchesOfAffectingLocations.get(location).files--);
148925
- impliedFormatPackageJsons.delete(path3);
148925
+ impliedFormatPackageJsons.delete(path4);
148926
148926
  }
148927
148927
  });
148928
148928
  }
@@ -148941,16 +148941,16 @@ ${lanes.join("\n")}
148941
148941
  packageDirWatchers.delete(packageDirPath);
148942
148942
  }
148943
148943
  }
148944
- function closeDirectoryWatchesOfFailedLookup(watcher, path3) {
148944
+ function closeDirectoryWatchesOfFailedLookup(watcher, path4) {
148945
148945
  if (watcher.refCount === 0) {
148946
- directoryWatchesOfFailedLookups.delete(path3);
148946
+ directoryWatchesOfFailedLookups.delete(path4);
148947
148947
  watcher.watcher.close();
148948
148948
  }
148949
148949
  }
148950
- function closeFileWatcherOfAffectingLocation(watcher, path3) {
148950
+ function closeFileWatcherOfAffectingLocation(watcher, path4) {
148951
148951
  var _a;
148952
148952
  if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? void 0 : _a.size)) {
148953
- fileWatchesOfAffectingLocations.delete(path3);
148953
+ fileWatchesOfAffectingLocations.delete(path4);
148954
148954
  watcher.watcher.close();
148955
148955
  }
148956
148956
  }
@@ -148969,10 +148969,10 @@ ${lanes.join("\n")}
148969
148969
  logChanges
148970
148970
  }) {
148971
148971
  var _a;
148972
- const path3 = resolutionHost.toPath(containingFile);
148973
- const resolutionsInFile = perFileCache.get(path3) || perFileCache.set(path3, createModeAwareCache()).get(path3);
148972
+ const path4 = resolutionHost.toPath(containingFile);
148973
+ const resolutionsInFile = perFileCache.get(path4) || perFileCache.set(path4, createModeAwareCache()).get(path4);
148974
148974
  const resolvedModules = [];
148975
- const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path3);
148975
+ const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path4);
148976
148976
  const program2 = resolutionHost.getCurrentProgram();
148977
148977
  const oldRedirect = program2 && ((_a = program2.getRedirectFromSourceFile(containingFile)) == null ? void 0 : _a.resolvedRef);
148978
148978
  const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
@@ -148990,13 +148990,13 @@ ${lanes.join("\n")}
148990
148990
  }
148991
148991
  resolutionsInFile.set(name, mode, resolution);
148992
148992
  if (resolution !== existingResolution) {
148993
- watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path3, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
148993
+ watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path4, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
148994
148994
  if (existingResolution) {
148995
- stopWatchFailedLookupLocationOfResolution(existingResolution, path3, getResolutionWithResolvedFileName);
148995
+ stopWatchFailedLookupLocationOfResolution(existingResolution, path4, getResolutionWithResolvedFileName);
148996
148996
  }
148997
148997
  }
148998
148998
  if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
148999
- filesWithChangedSetOfUnresolvedImports.push(path3);
148999
+ filesWithChangedSetOfUnresolvedImports.push(path4);
149000
149000
  logChanges = false;
149001
149001
  }
149002
149002
  } else {
@@ -149027,7 +149027,7 @@ ${lanes.join("\n")}
149027
149027
  if (resolutionsInFile.size() !== seenNamesInFile.size()) {
149028
149028
  resolutionsInFile.forEach((resolution, name, mode) => {
149029
149029
  if (!seenNamesInFile.has(name, mode)) {
149030
- stopWatchFailedLookupLocationOfResolution(resolution, path3, getResolutionWithResolvedFileName);
149030
+ stopWatchFailedLookupLocationOfResolution(resolution, path4, getResolutionWithResolvedFileName);
149031
149031
  resolutionsInFile.delete(name, mode);
149032
149032
  }
149033
149033
  });
@@ -149101,18 +149101,18 @@ ${lanes.join("\n")}
149101
149101
  if (!resolution || resolution.isInvalidated) {
149102
149102
  const existingResolution = resolution;
149103
149103
  resolution = resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache);
149104
- const path3 = resolutionHost.toPath(resolveFrom);
149104
+ const path4 = resolutionHost.toPath(resolveFrom);
149105
149105
  watchFailedLookupLocationsOfExternalModuleResolutions(
149106
149106
  libraryName,
149107
149107
  resolution,
149108
- path3,
149108
+ path4,
149109
149109
  getResolvedModuleFromResolution,
149110
149110
  /*deferWatchingNonRelativeResolution*/
149111
149111
  false
149112
149112
  );
149113
149113
  resolvedLibraries.set(libFileName, resolution);
149114
149114
  if (existingResolution) {
149115
- stopWatchFailedLookupLocationOfResolution(existingResolution, path3, getResolvedModuleFromResolution);
149115
+ stopWatchFailedLookupLocationOfResolution(existingResolution, path4, getResolvedModuleFromResolution);
149116
149116
  }
149117
149117
  } else {
149118
149118
  if (isTraceEnabled(options, host)) {
@@ -149131,8 +149131,8 @@ ${lanes.join("\n")}
149131
149131
  }
149132
149132
  function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
149133
149133
  var _a, _b;
149134
- const path3 = resolutionHost.toPath(containingFile);
149135
- const resolutionsInFile = resolvedModuleNames.get(path3);
149134
+ const path4 = resolutionHost.toPath(containingFile);
149135
+ const resolutionsInFile = resolvedModuleNames.get(path4);
149136
149136
  const resolution = resolutionsInFile == null ? void 0 : resolutionsInFile.get(
149137
149137
  moduleName,
149138
149138
  /*mode*/
@@ -149289,13 +149289,13 @@ ${lanes.join("\n")}
149289
149289
  (symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set())).add(affectingLocation);
149290
149290
  }
149291
149291
  }
149292
- function invalidateAffectingFileWatcher(path3, packageJsonMap) {
149292
+ function invalidateAffectingFileWatcher(path4, packageJsonMap) {
149293
149293
  var _a;
149294
- const watcher = fileWatchesOfAffectingLocations.get(path3);
149295
- if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path3);
149296
- if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path3);
149294
+ const watcher = fileWatchesOfAffectingLocations.get(path4);
149295
+ if (watcher == null ? void 0 : watcher.resolutions) (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set())).add(path4);
149296
+ if (watcher == null ? void 0 : watcher.files) (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set())).add(path4);
149297
149297
  (_a = watcher == null ? void 0 : watcher.symlinks) == null ? void 0 : _a.forEach((path22) => invalidateAffectingFileWatcher(path22, packageJsonMap));
149298
- packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path3));
149298
+ packageJsonMap == null ? void 0 : packageJsonMap.delete(resolutionHost.toPath(path4));
149299
149299
  }
149300
149300
  function watchFailedLookupLocationOfNonRelativeModuleResolutions() {
149301
149301
  nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution);
@@ -149534,7 +149534,7 @@ ${lanes.join("\n")}
149534
149534
  function invalidatePackageJsonMap() {
149535
149535
  const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
149536
149536
  if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {
149537
- packageJsonMap.forEach((_value, path3) => isInvalidatedFailedLookup(path3) ? packageJsonMap.delete(path3) : void 0);
149537
+ packageJsonMap.forEach((_value, path4) => isInvalidatedFailedLookup(path4) ? packageJsonMap.delete(path4) : void 0);
149538
149538
  }
149539
149539
  }
149540
149540
  function invalidateResolutionsOfFailedLookupLocations() {
@@ -150152,9 +150152,9 @@ ${lanes.join("\n")}
150152
150152
  getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
150153
150153
  getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
150154
150154
  writeFile: createWriteFileMeasuringIO(
150155
- (path3, data, writeByteOrderMark) => host.writeFile(path3, data, writeByteOrderMark),
150156
- (path3) => host.createDirectory(path3),
150157
- (path3) => host.directoryExists(path3)
150155
+ (path4, data, writeByteOrderMark) => host.writeFile(path4, data, writeByteOrderMark),
150156
+ (path4) => host.createDirectory(path4),
150157
+ (path4) => host.directoryExists(path4)
150158
150158
  ),
150159
150159
  getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
150160
150160
  useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
@@ -150225,16 +150225,16 @@ ${lanes.join("\n")}
150225
150225
  getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
150226
150226
  getDefaultLibLocation,
150227
150227
  getDefaultLibFileName: (options) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
150228
- fileExists: (path3) => system.fileExists(path3),
150229
- readFile: (path3, encoding) => system.readFile(path3, encoding),
150230
- directoryExists: (path3) => system.directoryExists(path3),
150231
- getDirectories: (path3) => system.getDirectories(path3),
150232
- readDirectory: (path3, extensions, exclude, include, depth) => system.readDirectory(path3, extensions, exclude, include, depth),
150228
+ fileExists: (path4) => system.fileExists(path4),
150229
+ readFile: (path4, encoding) => system.readFile(path4, encoding),
150230
+ directoryExists: (path4) => system.directoryExists(path4),
150231
+ getDirectories: (path4) => system.getDirectories(path4),
150232
+ readDirectory: (path4, extensions, exclude, include, depth) => system.readDirectory(path4, extensions, exclude, include, depth),
150233
150233
  realpath: maybeBind(system, system.realpath),
150234
150234
  getEnvironmentVariable: maybeBind(system, system.getEnvironmentVariable),
150235
150235
  trace: (s2) => system.write(s2 + system.newLine),
150236
- createDirectory: (path3) => system.createDirectory(path3),
150237
- writeFile: (path3, data, writeByteOrderMark) => system.writeFile(path3, data, writeByteOrderMark),
150236
+ createDirectory: (path4) => system.createDirectory(path4),
150237
+ writeFile: (path4, data, writeByteOrderMark) => system.writeFile(path4, data, writeByteOrderMark),
150238
150238
  createHash: maybeBind(system, system.createHash),
150239
150239
  createProgram: createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram,
150240
150240
  storeSignatureInfo: system.storeSignatureInfo,
@@ -150547,7 +150547,7 @@ ${lanes.join("\n")}
150547
150547
  originalWriteFile,
150548
150548
  readFileWithCache
150549
150549
  } = changeCompilerHostLikeToUseCache(compilerHost, toPath3);
150550
- if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path3) => getSourceVersion(path3, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
150550
+ if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path4) => getSourceVersion(path4, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
150551
150551
  if (hasChangedConfigFileParsingErrors) {
150552
150552
  if (reportFileChangeDetectedOnCreateProgram) {
150553
150553
  reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation);
@@ -150641,14 +150641,14 @@ ${lanes.join("\n")}
150641
150641
  return typeof hostSourceFile.version === "boolean";
150642
150642
  }
150643
150643
  function fileExists(fileName) {
150644
- const path3 = toPath3(fileName);
150645
- if (isFileMissingOnHost(sourceFilesCache.get(path3))) {
150644
+ const path4 = toPath3(fileName);
150645
+ if (isFileMissingOnHost(sourceFilesCache.get(path4))) {
150646
150646
  return false;
150647
150647
  }
150648
150648
  return directoryStructureHost.fileExists(fileName);
150649
150649
  }
150650
- function getVersionedSourceFileByPath(fileName, path3, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
150651
- const hostSourceFile = sourceFilesCache.get(path3);
150650
+ function getVersionedSourceFileByPath(fileName, path4, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
150651
+ const hostSourceFile = sourceFilesCache.get(path4);
150652
150652
  if (isFileMissingOnHost(hostSourceFile)) {
150653
150653
  return void 0;
150654
150654
  }
@@ -150660,41 +150660,41 @@ ${lanes.join("\n")}
150660
150660
  hostSourceFile.sourceFile = sourceFile;
150661
150661
  hostSourceFile.version = sourceFile.version;
150662
150662
  if (!hostSourceFile.fileWatcher) {
150663
- hostSourceFile.fileWatcher = watchFilePath(path3, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150663
+ hostSourceFile.fileWatcher = watchFilePath(path4, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150664
150664
  }
150665
150665
  } else {
150666
150666
  if (hostSourceFile.fileWatcher) {
150667
150667
  hostSourceFile.fileWatcher.close();
150668
150668
  }
150669
- sourceFilesCache.set(path3, false);
150669
+ sourceFilesCache.set(path4, false);
150670
150670
  }
150671
150671
  } else {
150672
150672
  if (sourceFile) {
150673
- const fileWatcher = watchFilePath(path3, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150674
- sourceFilesCache.set(path3, { sourceFile, version: sourceFile.version, fileWatcher });
150673
+ const fileWatcher = watchFilePath(path4, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
150674
+ sourceFilesCache.set(path4, { sourceFile, version: sourceFile.version, fileWatcher });
150675
150675
  } else {
150676
- sourceFilesCache.set(path3, false);
150676
+ sourceFilesCache.set(path4, false);
150677
150677
  }
150678
150678
  }
150679
150679
  return sourceFile;
150680
150680
  }
150681
150681
  return hostSourceFile.sourceFile;
150682
150682
  }
150683
- function nextSourceFileVersion(path3) {
150684
- const hostSourceFile = sourceFilesCache.get(path3);
150683
+ function nextSourceFileVersion(path4) {
150684
+ const hostSourceFile = sourceFilesCache.get(path4);
150685
150685
  if (hostSourceFile !== void 0) {
150686
150686
  if (isFileMissingOnHost(hostSourceFile)) {
150687
- sourceFilesCache.set(path3, { version: false });
150687
+ sourceFilesCache.set(path4, { version: false });
150688
150688
  } else {
150689
150689
  hostSourceFile.version = false;
150690
150690
  }
150691
150691
  }
150692
150692
  }
150693
- function getSourceVersion(path3, readFileWithCache) {
150694
- const hostSourceFile = sourceFilesCache.get(path3);
150693
+ function getSourceVersion(path4, readFileWithCache) {
150694
+ const hostSourceFile = sourceFilesCache.get(path4);
150695
150695
  if (!hostSourceFile) return void 0;
150696
150696
  if (hostSourceFile.version) return hostSourceFile.version;
150697
- const text2 = readFileWithCache(path3);
150697
+ const text2 = readFileWithCache(path4);
150698
150698
  return text2 !== void 0 ? getSourceFileVersionAsHashFromText(compilerHost, text2) : void 0;
150699
150699
  }
150700
150700
  function onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath) {
@@ -150873,28 +150873,28 @@ ${lanes.join("\n")}
150873
150873
  }
150874
150874
  function onReleaseParsedCommandLine(fileName) {
150875
150875
  var _a;
150876
- const path3 = toPath3(fileName);
150877
- const config = parsedConfigs == null ? void 0 : parsedConfigs.get(path3);
150876
+ const path4 = toPath3(fileName);
150877
+ const config = parsedConfigs == null ? void 0 : parsedConfigs.get(path4);
150878
150878
  if (!config) return;
150879
- parsedConfigs.delete(path3);
150879
+ parsedConfigs.delete(path4);
150880
150880
  if (config.watchedDirectories) clearMap(config.watchedDirectories, closeFileWatcherOf);
150881
150881
  (_a = config.watcher) == null ? void 0 : _a.close();
150882
- clearSharedExtendedConfigFileWatcher(path3, sharedExtendedConfigFileWatchers);
150882
+ clearSharedExtendedConfigFileWatcher(path4, sharedExtendedConfigFileWatchers);
150883
150883
  }
150884
- function watchFilePath(path3, file, callback, pollingInterval, options, watchType) {
150885
- return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path3), pollingInterval, options, watchType);
150884
+ function watchFilePath(path4, file, callback, pollingInterval, options, watchType) {
150885
+ return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path4), pollingInterval, options, watchType);
150886
150886
  }
150887
- function onSourceFileChange(fileName, eventKind, path3) {
150888
- updateCachedSystemWithFile(fileName, path3, eventKind);
150889
- if (eventKind === 2 && sourceFilesCache.has(path3)) {
150890
- resolutionCache.invalidateResolutionOfFile(path3);
150887
+ function onSourceFileChange(fileName, eventKind, path4) {
150888
+ updateCachedSystemWithFile(fileName, path4, eventKind);
150889
+ if (eventKind === 2 && sourceFilesCache.has(path4)) {
150890
+ resolutionCache.invalidateResolutionOfFile(path4);
150891
150891
  }
150892
- nextSourceFileVersion(path3);
150892
+ nextSourceFileVersion(path4);
150893
150893
  scheduleProgramUpdate();
150894
150894
  }
150895
- function updateCachedSystemWithFile(fileName, path3, eventKind) {
150895
+ function updateCachedSystemWithFile(fileName, path4, eventKind) {
150896
150896
  if (cachedDirectoryStructureHost) {
150897
- cachedDirectoryStructureHost.addOrDeleteFile(fileName, path3, eventKind);
150897
+ cachedDirectoryStructureHost.addOrDeleteFile(fileName, path4, eventKind);
150898
150898
  }
150899
150899
  }
150900
150900
  function watchMissingFilePath(missingFilePath, missingFileName) {
@@ -151115,9 +151115,9 @@ ${lanes.join("\n")}
151115
151115
  }
151116
151116
  function createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus) {
151117
151117
  const host = createProgramHost(system, createProgram2);
151118
- host.getModifiedTime = system.getModifiedTime ? (path3) => system.getModifiedTime(path3) : returnUndefined;
151119
- host.setModifiedTime = system.setModifiedTime ? (path3, date) => system.setModifiedTime(path3, date) : noop;
151120
- host.deleteFile = system.deleteFile ? (path3) => system.deleteFile(path3) : noop;
151118
+ host.getModifiedTime = system.getModifiedTime ? (path4) => system.getModifiedTime(path4) : returnUndefined;
151119
+ host.setModifiedTime = system.setModifiedTime ? (path4, date) => system.setModifiedTime(path4, date) : noop;
151120
+ host.deleteFile = system.deleteFile ? (path4) => system.deleteFile(path4) : noop;
151121
151121
  host.reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system);
151122
151122
  host.reportSolutionBuilderStatus = reportSolutionBuilderStatus || createBuilderStatusReporter(system);
151123
151123
  host.now = maybeBind(system, system.now);
@@ -151288,8 +151288,8 @@ ${lanes.join("\n")}
151288
151288
  }
151289
151289
  function toResolvedConfigFilePath(state, fileName) {
151290
151290
  const { resolvedConfigFilePaths } = state;
151291
- const path3 = resolvedConfigFilePaths.get(fileName);
151292
- if (path3 !== void 0) return path3;
151291
+ const path4 = resolvedConfigFilePaths.get(fileName);
151292
+ if (path4 !== void 0) return path4;
151293
151293
  const resolvedPath = toPath2(state, fileName);
151294
151294
  resolvedConfigFilePaths.set(fileName, resolvedPath);
151295
151295
  return resolvedPath;
@@ -151677,7 +151677,7 @@ ${lanes.join("\n")}
151677
151677
  void 0,
151678
151678
  (name, text2, writeByteOrderMark, onError, sourceFiles, data) => {
151679
151679
  var _a2;
151680
- const path3 = toPath2(state, name);
151680
+ const path4 = toPath2(state, name);
151681
151681
  emittedOutputs.set(toPath2(state, name), name);
151682
151682
  if (data == null ? void 0 : data.buildInfo) {
151683
151683
  now || (now = getCurrentTime(state.host));
@@ -151707,7 +151707,7 @@ ${lanes.join("\n")}
151707
151707
  );
151708
151708
  if (data == null ? void 0 : data.differsOnlyInMap) state.host.setModifiedTime(name, modifiedTime);
151709
151709
  else if (!isIncremental && state.watch) {
151710
- (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path3, now || (now = getCurrentTime(state.host)));
151710
+ (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path4, now || (now = getCurrentTime(state.host)));
151711
151711
  }
151712
151712
  },
151713
151713
  cancellationToken,
@@ -151891,8 +151891,8 @@ ${lanes.join("\n")}
151891
151891
  return !!value.watcher;
151892
151892
  }
151893
151893
  function getModifiedTime2(state, fileName) {
151894
- const path3 = toPath2(state, fileName);
151895
- const existing = state.filesWatched.get(path3);
151894
+ const path4 = toPath2(state, fileName);
151895
+ const existing = state.filesWatched.get(path4);
151896
151896
  if (state.watch && !!existing) {
151897
151897
  if (!isFileWatcherWithModifiedTime(existing)) return existing;
151898
151898
  if (existing.modifiedTime) return existing.modifiedTime;
@@ -151900,20 +151900,20 @@ ${lanes.join("\n")}
151900
151900
  const result = getModifiedTime(state.host, fileName);
151901
151901
  if (state.watch) {
151902
151902
  if (existing) existing.modifiedTime = result;
151903
- else state.filesWatched.set(path3, result);
151903
+ else state.filesWatched.set(path4, result);
151904
151904
  }
151905
151905
  return result;
151906
151906
  }
151907
151907
  function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
151908
- const path3 = toPath2(state, file);
151909
- const existing = state.filesWatched.get(path3);
151908
+ const path4 = toPath2(state, file);
151909
+ const existing = state.filesWatched.get(path4);
151910
151910
  if (existing && isFileWatcherWithModifiedTime(existing)) {
151911
151911
  existing.callbacks.push(callback);
151912
151912
  } else {
151913
151913
  const watcher = state.watchFile(
151914
151914
  file,
151915
151915
  (fileName, eventKind, modifiedTime) => {
151916
- const existing2 = Debug.checkDefined(state.filesWatched.get(path3));
151916
+ const existing2 = Debug.checkDefined(state.filesWatched.get(path4));
151917
151917
  Debug.assert(isFileWatcherWithModifiedTime(existing2));
151918
151918
  existing2.modifiedTime = modifiedTime;
151919
151919
  existing2.callbacks.forEach((cb) => cb(fileName, eventKind, modifiedTime));
@@ -151923,14 +151923,14 @@ ${lanes.join("\n")}
151923
151923
  watchType,
151924
151924
  project
151925
151925
  );
151926
- state.filesWatched.set(path3, { callbacks: [callback], watcher, modifiedTime: existing });
151926
+ state.filesWatched.set(path4, { callbacks: [callback], watcher, modifiedTime: existing });
151927
151927
  }
151928
151928
  return {
151929
151929
  close: () => {
151930
- const existing2 = Debug.checkDefined(state.filesWatched.get(path3));
151930
+ const existing2 = Debug.checkDefined(state.filesWatched.get(path4));
151931
151931
  Debug.assert(isFileWatcherWithModifiedTime(existing2));
151932
151932
  if (existing2.callbacks.length === 1) {
151933
- state.filesWatched.delete(path3);
151933
+ state.filesWatched.delete(path4);
151934
151934
  closeFileWatcherOf(existing2);
151935
151935
  } else {
151936
151936
  unorderedRemoveItem(existing2.callbacks, callback);
@@ -151945,19 +151945,19 @@ ${lanes.join("\n")}
151945
151945
  return result;
151946
151946
  }
151947
151947
  function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
151948
- const path3 = toPath2(state, buildInfoPath);
151948
+ const path4 = toPath2(state, buildInfoPath);
151949
151949
  const existing = state.buildInfoCache.get(resolvedConfigPath);
151950
- return (existing == null ? void 0 : existing.path) === path3 ? existing : void 0;
151950
+ return (existing == null ? void 0 : existing.path) === path4 ? existing : void 0;
151951
151951
  }
151952
151952
  function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
151953
- const path3 = toPath2(state, buildInfoPath);
151953
+ const path4 = toPath2(state, buildInfoPath);
151954
151954
  const existing = state.buildInfoCache.get(resolvedConfigPath);
151955
- if (existing !== void 0 && existing.path === path3) {
151955
+ if (existing !== void 0 && existing.path === path4) {
151956
151956
  return existing.buildInfo || void 0;
151957
151957
  }
151958
151958
  const value = state.readFileWithCache(buildInfoPath);
151959
151959
  const buildInfo = value ? getBuildInfo(buildInfoPath, value) : void 0;
151960
- state.buildInfoCache.set(resolvedConfigPath, { path: path3, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
151960
+ state.buildInfoCache.set(resolvedConfigPath, { path: path4, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
151961
151961
  return buildInfo;
151962
151962
  }
151963
151963
  function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
@@ -152138,11 +152138,11 @@ ${lanes.join("\n")}
152138
152138
  const outputTimeStampMap = getOutputTimeStampMap(state, resolvedPath);
152139
152139
  for (const output of outputs) {
152140
152140
  if (output === buildInfoPath) continue;
152141
- const path3 = toPath2(state, output);
152142
- let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path3);
152141
+ const path4 = toPath2(state, output);
152142
+ let outputTime = outputTimeStampMap == null ? void 0 : outputTimeStampMap.get(path4);
152143
152143
  if (!outputTime) {
152144
152144
  outputTime = getModifiedTime(state.host, output);
152145
- outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path3, outputTime);
152145
+ outputTimeStampMap == null ? void 0 : outputTimeStampMap.set(path4, outputTime);
152146
152146
  }
152147
152147
  if (outputTime === missingFileModifiedTime) {
152148
152148
  return {
@@ -152196,7 +152196,7 @@ ${lanes.join("\n")}
152196
152196
  const packageJsonLookups = state.lastCachedPackageJsonLookups.get(resolvedPath);
152197
152197
  const dependentPackageFileStatus = packageJsonLookups && forEachKey(
152198
152198
  packageJsonLookups,
152199
- (path3) => checkConfigFileUpToDateStatus(state, path3, oldestOutputFileTime, oldestOutputFileName)
152199
+ (path4) => checkConfigFileUpToDateStatus(state, path4, oldestOutputFileTime, oldestOutputFileName)
152200
152200
  );
152201
152201
  if (dependentPackageFileStatus) return dependentPackageFileStatus;
152202
152202
  return {
@@ -152246,8 +152246,8 @@ ${lanes.join("\n")}
152246
152246
  if (!skipOutputs || outputs.length !== skipOutputs.size) {
152247
152247
  let reportVerbose = !!state.options.verbose;
152248
152248
  for (const file of outputs) {
152249
- const path3 = toPath2(state, file);
152250
- if (skipOutputs == null ? void 0 : skipOutputs.has(path3)) continue;
152249
+ const path4 = toPath2(state, file);
152250
+ if (skipOutputs == null ? void 0 : skipOutputs.has(path4)) continue;
152251
152251
  if (reportVerbose) {
152252
152252
  reportVerbose = false;
152253
152253
  reportStatus(state, verboseMessage, proj.options.configFilePath);
@@ -152255,8 +152255,8 @@ ${lanes.join("\n")}
152255
152255
  host.setModifiedTime(file, now || (now = getCurrentTime(state.host)));
152256
152256
  if (file === buildInfoPath) getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
152257
152257
  else if (outputTimeStampMap) {
152258
- outputTimeStampMap.set(path3, now);
152259
- modifiedOutputs.add(path3);
152258
+ outputTimeStampMap.set(path4, now);
152259
+ modifiedOutputs.add(path4);
152260
152260
  }
152261
152261
  }
152262
152262
  }
@@ -152684,8 +152684,8 @@ ${lanes.join("\n")}
152684
152684
  close: () => stopWatching(state)
152685
152685
  };
152686
152686
  }
152687
- function relName(state, path3) {
152688
- return convertToRelativePath(path3, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
152687
+ function relName(state, path4) {
152688
+ return convertToRelativePath(path4, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
152689
152689
  }
152690
152690
  function reportStatus(state, message, ...args) {
152691
152691
  state.host.reportSolutionBuilderStatus(createCompilerDiagnostic(message, ...args));
@@ -152904,13 +152904,13 @@ ${lanes.join("\n")}
152904
152904
  } else if (file.isDeclarationFile) {
152905
152905
  return "Definitions";
152906
152906
  }
152907
- const path3 = file.path;
152908
- if (fileExtensionIsOneOf(path3, supportedTSExtensionsFlat)) {
152907
+ const path4 = file.path;
152908
+ if (fileExtensionIsOneOf(path4, supportedTSExtensionsFlat)) {
152909
152909
  return "TypeScript";
152910
- } else if (fileExtensionIsOneOf(path3, supportedJSExtensionsFlat)) {
152910
+ } else if (fileExtensionIsOneOf(path4, supportedJSExtensionsFlat)) {
152911
152911
  return "JavaScript";
152912
152912
  } else if (fileExtensionIs(
152913
- path3,
152913
+ path4,
152914
152914
  ".json"
152915
152915
  /* Json */
152916
152916
  )) {
@@ -153522,7 +153522,7 @@ ${lanes.join("\n")}
153522
153522
  );
153523
153523
  }
153524
153524
  }
153525
- const commandLine = parseCommandLine(commandLineArgs, (path3) => system.readFile(path3));
153525
+ const commandLine = parseCommandLine(commandLineArgs, (path4) => system.readFile(path4));
153526
153526
  if (commandLine.options.generateCpuProfile && system.enableCPUProfiler) {
153527
153527
  system.enableCPUProfiler(commandLine.options.generateCpuProfile, () => executeCommandLineWorker(
153528
153528
  system,
@@ -155398,12 +155398,12 @@ ${lanes.join("\n")}
155398
155398
  return nodeCoreModules.has(moduleName) ? "node" : moduleName;
155399
155399
  }
155400
155400
  function loadSafeList(host, safeListPath) {
155401
- const result = readConfigFile(safeListPath, (path3) => host.readFile(path3));
155401
+ const result = readConfigFile(safeListPath, (path4) => host.readFile(path4));
155402
155402
  return new Map(Object.entries(result.config));
155403
155403
  }
155404
155404
  function loadTypesMap(host, typesMapPath) {
155405
155405
  var _a;
155406
- const result = readConfigFile(typesMapPath, (path3) => host.readFile(path3));
155406
+ const result = readConfigFile(typesMapPath, (path4) => host.readFile(path4));
155407
155407
  if ((_a = result.config) == null ? void 0 : _a.simpleMap) {
155408
155408
  return new Map(Object.entries(result.config.simpleMap));
155409
155409
  }
@@ -155415,9 +155415,9 @@ ${lanes.join("\n")}
155415
155415
  }
155416
155416
  const inferredTypings = /* @__PURE__ */ new Map();
155417
155417
  fileNames = mapDefined(fileNames, (fileName) => {
155418
- const path3 = normalizePath(fileName);
155419
- if (hasJSFileExtension(path3)) {
155420
- return path3;
155418
+ const path4 = normalizePath(fileName);
155419
+ if (hasJSFileExtension(path4)) {
155420
+ return path4;
155421
155421
  }
155422
155422
  });
155423
155423
  const filesToWatch = [];
@@ -155479,7 +155479,7 @@ ${lanes.join("\n")}
155479
155479
  let manifestTypingNames;
155480
155480
  if (host.fileExists(manifestPath)) {
155481
155481
  filesToWatch2.push(manifestPath);
155482
- manifest = readConfigFile(manifestPath, (path3) => host.readFile(path3)).config;
155482
+ manifest = readConfigFile(manifestPath, (path4) => host.readFile(path4)).config;
155483
155483
  manifestTypingNames = flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], getOwnKeys);
155484
155484
  addInferredTypings(manifestTypingNames, `Typing names in '${manifestPath}' dependencies`);
155485
155485
  }
@@ -155513,7 +155513,7 @@ ${lanes.join("\n")}
155513
155513
  if (log) log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`);
155514
155514
  for (const manifestPath2 of dependencyManifestNames) {
155515
155515
  const normalizedFileName = normalizePath(manifestPath2);
155516
- const result2 = readConfigFile(normalizedFileName, (path3) => host.readFile(path3));
155516
+ const result2 = readConfigFile(normalizedFileName, (path4) => host.readFile(path4));
155517
155517
  const manifest2 = result2.config;
155518
155518
  if (!manifest2.name) {
155519
155519
  continue;
@@ -158293,14 +158293,14 @@ ${lanes.join("\n")}
158293
158293
  function tryGetDirectories(host, directoryName) {
158294
158294
  return tryIOAndConsumeErrors(host, host.getDirectories, directoryName) || [];
158295
158295
  }
158296
- function tryReadDirectory(host, path3, extensions, exclude, include) {
158297
- return tryIOAndConsumeErrors(host, host.readDirectory, path3, extensions, exclude, include) || emptyArray;
158296
+ function tryReadDirectory(host, path4, extensions, exclude, include) {
158297
+ return tryIOAndConsumeErrors(host, host.readDirectory, path4, extensions, exclude, include) || emptyArray;
158298
158298
  }
158299
- function tryFileExists(host, path3) {
158300
- return tryIOAndConsumeErrors(host, host.fileExists, path3);
158299
+ function tryFileExists(host, path4) {
158300
+ return tryIOAndConsumeErrors(host, host.fileExists, path4);
158301
158301
  }
158302
- function tryDirectoryExists(host, path3) {
158303
- return tryAndIgnoreErrors(() => directoryProbablyExists(path3, host)) || false;
158302
+ function tryDirectoryExists(host, path4) {
158303
+ return tryAndIgnoreErrors(() => directoryProbablyExists(path4, host)) || false;
158304
158304
  }
158305
158305
  function tryAndIgnoreErrors(cb) {
158306
158306
  try {
@@ -159142,13 +159142,13 @@ ${lanes.join("\n")}
159142
159142
  function getIsExcluded(excludePatterns, host) {
159143
159143
  var _a;
159144
159144
  const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
159145
- return ({ fileName, path: path3 }) => {
159145
+ return ({ fileName, path: path4 }) => {
159146
159146
  if (excludePatterns.some((p2) => p2.test(fileName))) return true;
159147
159147
  if ((realpathsWithSymlinks == null ? void 0 : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {
159148
159148
  let dir = getDirectoryPath(fileName);
159149
159149
  return forEachAncestorDirectoryStoppingAtGlobalCache(
159150
159150
  host,
159151
- getDirectoryPath(path3),
159151
+ getDirectoryPath(path4),
159152
159152
  (dirPath) => {
159153
159153
  const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));
159154
159154
  if (symlinks) {
@@ -160804,14 +160804,14 @@ ${lanes.join("\n")}
160804
160804
  return settingsOrHost;
160805
160805
  }
160806
160806
  function acquireDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160807
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
160807
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
160808
160808
  const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
160809
- return acquireDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160809
+ return acquireDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160810
160810
  }
160811
- function acquireDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160811
+ function acquireDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160812
160812
  return acquireOrUpdateDocument(
160813
160813
  fileName,
160814
- path3,
160814
+ path4,
160815
160815
  compilationSettings,
160816
160816
  key,
160817
160817
  scriptSnapshot,
@@ -160823,14 +160823,14 @@ ${lanes.join("\n")}
160823
160823
  );
160824
160824
  }
160825
160825
  function updateDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160826
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
160826
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
160827
160827
  const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
160828
- return updateDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160828
+ return updateDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
160829
160829
  }
160830
- function updateDocumentWithKey(fileName, path3, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160830
+ function updateDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
160831
160831
  return acquireOrUpdateDocument(
160832
160832
  fileName,
160833
- path3,
160833
+ path4,
160834
160834
  getCompilationSettings(compilationSettings),
160835
160835
  key,
160836
160836
  scriptSnapshot,
@@ -160846,7 +160846,7 @@ ${lanes.join("\n")}
160846
160846
  Debug.assert(scriptKind === void 0 || !entry || entry.sourceFile.scriptKind === scriptKind, `Script kind should match provided ScriptKind:${scriptKind} and sourceFile.scriptKind: ${entry == null ? void 0 : entry.sourceFile.scriptKind}, !entry: ${!entry}`);
160847
160847
  return entry;
160848
160848
  }
160849
- function acquireOrUpdateDocument(fileName, path3, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) {
160849
+ function acquireOrUpdateDocument(fileName, path4, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) {
160850
160850
  var _a, _b, _c, _d;
160851
160851
  scriptKind = ensureScriptKind(fileName, scriptKind);
160852
160852
  const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
@@ -160854,7 +160854,7 @@ ${lanes.join("\n")}
160854
160854
  const scriptTarget = scriptKind === 6 ? 100 : getEmitScriptTarget(compilationSettings);
160855
160855
  const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
160856
160856
  languageVersion: scriptTarget,
160857
- impliedNodeFormat: host && getImpliedNodeFormatForFile(path3, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings),
160857
+ impliedNodeFormat: host && getImpliedNodeFormatForFile(path4, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? void 0 : _a.call(host)) == null ? void 0 : _b.getModuleResolutionCache) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d.getPackageJsonInfoCache(), host, compilationSettings),
160858
160858
  setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
160859
160859
  jsDocParsingMode
160860
160860
  };
@@ -160867,15 +160867,15 @@ ${lanes.join("\n")}
160867
160867
  if (buckets.size > oldBucketCount) {
160868
160868
  tracing.instant(tracing.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: keyWithMode });
160869
160869
  }
160870
- const otherBucketKey = !isDeclarationFileName(path3) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path3) && bucketKey);
160870
+ const otherBucketKey = !isDeclarationFileName(path4) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path4) && bucketKey);
160871
160871
  if (otherBucketKey) {
160872
- tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path3, key1: otherBucketKey, key2: keyWithMode });
160872
+ tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path4, key1: otherBucketKey, key2: keyWithMode });
160873
160873
  }
160874
160874
  }
160875
- const bucketEntry = bucket.get(path3);
160875
+ const bucketEntry = bucket.get(path4);
160876
160876
  let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
160877
160877
  if (!entry && externalCache) {
160878
- const sourceFile = externalCache.getDocument(keyWithMode, path3);
160878
+ const sourceFile = externalCache.getDocument(keyWithMode, path4);
160879
160879
  if (sourceFile && sourceFile.scriptKind === scriptKind && sourceFile.text === getSnapshotText(scriptSnapshot)) {
160880
160880
  Debug.assert(acquiring);
160881
160881
  entry = {
@@ -160896,7 +160896,7 @@ ${lanes.join("\n")}
160896
160896
  scriptKind
160897
160897
  );
160898
160898
  if (externalCache) {
160899
- externalCache.setDocument(keyWithMode, path3, sourceFile);
160899
+ externalCache.setDocument(keyWithMode, path4, sourceFile);
160900
160900
  }
160901
160901
  entry = {
160902
160902
  sourceFile,
@@ -160907,7 +160907,7 @@ ${lanes.join("\n")}
160907
160907
  if (entry.sourceFile.version !== version2) {
160908
160908
  entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version2, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot));
160909
160909
  if (externalCache) {
160910
- externalCache.setDocument(keyWithMode, path3, entry.sourceFile);
160910
+ externalCache.setDocument(keyWithMode, path4, entry.sourceFile);
160911
160911
  }
160912
160912
  }
160913
160913
  if (acquiring) {
@@ -160918,35 +160918,35 @@ ${lanes.join("\n")}
160918
160918
  return entry.sourceFile;
160919
160919
  function setBucketEntry() {
160920
160920
  if (!bucketEntry) {
160921
- bucket.set(path3, entry);
160921
+ bucket.set(path4, entry);
160922
160922
  } else if (isDocumentRegistryEntry(bucketEntry)) {
160923
160923
  const scriptKindMap = /* @__PURE__ */ new Map();
160924
160924
  scriptKindMap.set(bucketEntry.sourceFile.scriptKind, bucketEntry);
160925
160925
  scriptKindMap.set(scriptKind, entry);
160926
- bucket.set(path3, scriptKindMap);
160926
+ bucket.set(path4, scriptKindMap);
160927
160927
  } else {
160928
160928
  bucketEntry.set(scriptKind, entry);
160929
160929
  }
160930
160930
  }
160931
160931
  }
160932
160932
  function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {
160933
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
160933
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
160934
160934
  const key = getKeyForCompilationSettings(compilationSettings);
160935
- return releaseDocumentWithKey(path3, key, scriptKind, impliedNodeFormat);
160935
+ return releaseDocumentWithKey(path4, key, scriptKind, impliedNodeFormat);
160936
160936
  }
160937
- function releaseDocumentWithKey(path3, key, scriptKind, impliedNodeFormat) {
160937
+ function releaseDocumentWithKey(path4, key, scriptKind, impliedNodeFormat) {
160938
160938
  const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key, impliedNodeFormat)));
160939
- const bucketEntry = bucket.get(path3);
160939
+ const bucketEntry = bucket.get(path4);
160940
160940
  const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);
160941
160941
  entry.languageServiceRefCount--;
160942
160942
  Debug.assert(entry.languageServiceRefCount >= 0);
160943
160943
  if (entry.languageServiceRefCount === 0) {
160944
160944
  if (isDocumentRegistryEntry(bucketEntry)) {
160945
- bucket.delete(path3);
160945
+ bucket.delete(path4);
160946
160946
  } else {
160947
160947
  bucketEntry.delete(scriptKind);
160948
160948
  if (bucketEntry.size === 1) {
160949
- bucket.set(path3, firstDefinedIterator(bucketEntry.values(), identity));
160949
+ bucket.set(path4, firstDefinedIterator(bucketEntry.values(), identity));
160950
160950
  }
160951
160951
  }
160952
160952
  }
@@ -160982,10 +160982,10 @@ ${lanes.join("\n")}
160982
160982
  }
160983
160983
  function getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) {
160984
160984
  const canonicalOldPath = getCanonicalFileName(oldFileOrDirPath);
160985
- return (path3) => {
160986
- const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path3, pos: 0 });
160987
- const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path3);
160988
- return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path3, getCanonicalFileName) : updatedPath;
160985
+ return (path4) => {
160986
+ const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path4, pos: 0 });
160987
+ const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path4);
160988
+ return originalPath ? updatedPath === void 0 ? void 0 : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path4, getCanonicalFileName) : updatedPath;
160989
160989
  };
160990
160990
  function getUpdatedPath(pathToUpdate) {
160991
160991
  if (getCanonicalFileName(pathToUpdate) === canonicalOldPath) return newFileOrDirPath;
@@ -161061,10 +161061,10 @@ ${lanes.join("\n")}
161061
161061
  }
161062
161062
  return false;
161063
161063
  }
161064
- function relativePath(path3) {
161064
+ function relativePath(path4) {
161065
161065
  return getRelativePathFromDirectory(
161066
161066
  configDir,
161067
- path3,
161067
+ path4,
161068
161068
  /*ignoreCase*/
161069
161069
  !useCaseSensitiveFileNames2
161070
161070
  );
@@ -161872,8 +161872,8 @@ ${lanes.join("\n")}
161872
161872
  return toPath(fileName, currentDirectory, getCanonicalFileName);
161873
161873
  }
161874
161874
  function getDocumentPositionMapper2(generatedFileName, sourceFileName) {
161875
- const path3 = toPath3(generatedFileName);
161876
- const value = documentPositionMappers.get(path3);
161875
+ const path4 = toPath3(generatedFileName);
161876
+ const value = documentPositionMappers.get(path4);
161877
161877
  if (value) return value;
161878
161878
  let mapper;
161879
161879
  if (host.getDocumentPositionMapper) {
@@ -161887,7 +161887,7 @@ ${lanes.join("\n")}
161887
161887
  (f) => !host.fileExists || host.fileExists(f) ? host.readFile(f) : void 0
161888
161888
  );
161889
161889
  }
161890
- documentPositionMappers.set(path3, mapper || identitySourceMapConsumer);
161890
+ documentPositionMappers.set(path4, mapper || identitySourceMapConsumer);
161891
161891
  return mapper || identitySourceMapConsumer;
161892
161892
  }
161893
161893
  function tryGetSourcePosition(info) {
@@ -161915,21 +161915,21 @@ ${lanes.join("\n")}
161915
161915
  function getSourceFile(fileName) {
161916
161916
  const program2 = host.getProgram();
161917
161917
  if (!program2) return void 0;
161918
- const path3 = toPath3(fileName);
161919
- const file = program2.getSourceFileByPath(path3);
161920
- return file && file.resolvedPath === path3 ? file : void 0;
161918
+ const path4 = toPath3(fileName);
161919
+ const file = program2.getSourceFileByPath(path4);
161920
+ return file && file.resolvedPath === path4 ? file : void 0;
161921
161921
  }
161922
161922
  function getOrCreateSourceFileLike(fileName) {
161923
- const path3 = toPath3(fileName);
161924
- const fileFromCache = sourceFileLike.get(path3);
161923
+ const path4 = toPath3(fileName);
161924
+ const fileFromCache = sourceFileLike.get(path4);
161925
161925
  if (fileFromCache !== void 0) return fileFromCache ? fileFromCache : void 0;
161926
161926
  if (!host.readFile || host.fileExists && !host.fileExists(fileName)) {
161927
- sourceFileLike.set(path3, false);
161927
+ sourceFileLike.set(path4, false);
161928
161928
  return void 0;
161929
161929
  }
161930
161930
  const text2 = host.readFile(fileName);
161931
161931
  const file = text2 ? createSourceFileLike(text2) : false;
161932
- sourceFileLike.set(path3, file);
161932
+ sourceFileLike.set(path4, file);
161933
161933
  return file ? file : void 0;
161934
161934
  }
161935
161935
  function getSourceFileLike(fileName) {
@@ -170015,12 +170015,12 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170015
170015
  directoryExists: (directoryName) => {
170016
170016
  return directoryProbablyExists(directoryName, host);
170017
170017
  },
170018
- getDirectories: (path3) => {
170019
- return host.getDirectories ? host.getDirectories(path3) : [];
170018
+ getDirectories: (path4) => {
170019
+ return host.getDirectories ? host.getDirectories(path4) : [];
170020
170020
  },
170021
- readDirectory: (path3, extensions, exclude, include, depth) => {
170021
+ readDirectory: (path4, extensions, exclude, include, depth) => {
170022
170022
  Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
170023
- return host.readDirectory(path3, extensions, exclude, include, depth);
170023
+ return host.readDirectory(path4, extensions, exclude, include, depth);
170024
170024
  },
170025
170025
  onReleaseOldSourceFile,
170026
170026
  onReleaseParsedCommandLine,
@@ -170083,11 +170083,11 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170083
170083
  program2.getTypeChecker();
170084
170084
  return;
170085
170085
  function getParsedCommandLine(fileName) {
170086
- const path3 = toPath(fileName, currentDirectory, getCanonicalFileName);
170087
- const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path3);
170086
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
170087
+ const existing = parsedCommandLines == null ? void 0 : parsedCommandLines.get(path4);
170088
170088
  if (existing !== void 0) return existing || void 0;
170089
170089
  const result = host.getParsedCommandLine ? host.getParsedCommandLine(fileName) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName);
170090
- (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path3, result || false);
170090
+ (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map())).set(path4, result || false);
170091
170091
  return result;
170092
170092
  }
170093
170093
  function getParsedCommandLineOfConfigFileUsingSourceFile(configFileName) {
@@ -170129,7 +170129,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170129
170129
  function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
170130
170130
  return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile);
170131
170131
  }
170132
- function getOrCreateSourceFileByPath(fileName, path3, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
170132
+ function getOrCreateSourceFileByPath(fileName, path4, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
170133
170133
  Debug.assert(compilerHost, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
170134
170134
  const scriptSnapshot = host.getScriptSnapshot(fileName);
170135
170135
  if (!scriptSnapshot) {
@@ -170138,17 +170138,17 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170138
170138
  const scriptKind = getScriptKind(fileName, host);
170139
170139
  const scriptVersion = host.getScriptVersion(fileName);
170140
170140
  if (!shouldCreateNewSourceFile) {
170141
- const oldSourceFile = program2 && program2.getSourceFileByPath(path3);
170141
+ const oldSourceFile = program2 && program2.getSourceFileByPath(path4);
170142
170142
  if (oldSourceFile) {
170143
170143
  if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds.has(oldSourceFile.resolvedPath)) {
170144
- return documentRegistry.updateDocumentWithKey(fileName, path3, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170144
+ return documentRegistry.updateDocumentWithKey(fileName, path4, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170145
170145
  } else {
170146
170146
  documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program2.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat);
170147
170147
  releasedScriptKinds.add(oldSourceFile.resolvedPath);
170148
170148
  }
170149
170149
  }
170150
170150
  }
170151
- return documentRegistry.acquireDocumentWithKey(fileName, path3, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170151
+ return documentRegistry.acquireDocumentWithKey(fileName, path4, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
170152
170152
  }
170153
170153
  }
170154
170154
  function getProgram() {
@@ -170754,7 +170754,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
170754
170754
  return isArray(action) ? Promise.all(action.map((a) => applySingleCodeActionCommand(a))) : applySingleCodeActionCommand(action);
170755
170755
  }
170756
170756
  function applySingleCodeActionCommand(action) {
170757
- const getPath2 = (path3) => toPath(path3, currentDirectory, getCanonicalFileName);
170757
+ const getPath2 = (path4) => toPath(path4, currentDirectory, getCanonicalFileName);
170758
170758
  Debug.assertEqual(action.type, "install package");
170759
170759
  return host.installPackage ? host.installPackage({ fileName: getPath2(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
170760
170760
  }
@@ -171098,8 +171098,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
171098
171098
  function isLetterOrDigit(char) {
171099
171099
  return char >= 97 && char <= 122 || char >= 65 && char <= 90 || char >= 48 && char <= 57;
171100
171100
  }
171101
- function isNodeModulesFile(path3) {
171102
- return path3.includes("/node_modules/");
171101
+ function isNodeModulesFile(path4) {
171102
+ return path4.includes("/node_modules/");
171103
171103
  }
171104
171104
  }
171105
171105
  function getRenameInfo2(fileName, position, preferences) {
@@ -184733,11 +184733,11 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
184733
184733
  }
184734
184734
  });
184735
184735
  }
184736
- function generateJSDocParamTagsForDestructuring(path3, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
184736
+ function generateJSDocParamTagsForDestructuring(path4, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
184737
184737
  if (!isJs) {
184738
184738
  return [
184739
184739
  getJSDocParamAnnotation(
184740
- path3,
184740
+ path4,
184741
184741
  initializer,
184742
184742
  dotDotDotToken,
184743
184743
  isJs,
@@ -184751,7 +184751,7 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
184751
184751
  )
184752
184752
  ];
184753
184753
  }
184754
- return patternWorker(path3, pattern, initializer, dotDotDotToken, { tabstop: 1 });
184754
+ return patternWorker(path4, pattern, initializer, dotDotDotToken, { tabstop: 1 });
184755
184755
  function patternWorker(path22, pattern2, initializer2, dotDotDotToken2, counter) {
184756
184756
  if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) {
184757
184757
  const oldTabstop = counter.tabstop;
@@ -189374,21 +189374,21 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189374
189374
  function getFragmentDirectory(fragment) {
189375
189375
  return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : void 0;
189376
189376
  }
189377
- function getCompletionsForPathMapping(path3, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program2, host, moduleSpecifierResolutionHost) {
189378
- const parsedPath = tryParsePattern(path3);
189377
+ function getCompletionsForPathMapping(path4, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program2, host, moduleSpecifierResolutionHost) {
189378
+ const parsedPath = tryParsePattern(path4);
189379
189379
  if (!parsedPath) {
189380
189380
  return emptyArray;
189381
189381
  }
189382
189382
  if (typeof parsedPath === "string") {
189383
189383
  return justPathMappingName(
189384
- path3,
189384
+ path4,
189385
189385
  "script"
189386
189386
  /* scriptElement */
189387
189387
  );
189388
189388
  }
189389
189389
  const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);
189390
189390
  if (remainingFragment === void 0) {
189391
- const starIsFullPathComponent = endsWith(path3, "/*");
189391
+ const starIsFullPathComponent = endsWith(path4, "/*");
189392
189392
  return starIsFullPathComponent ? justPathMappingName(
189393
189393
  parsedPath.prefix,
189394
189394
  "directory"
@@ -189474,9 +189474,9 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189474
189474
  function getDirectoryMatches(directoryName) {
189475
189475
  return mapDefined(tryGetDirectories(host, directoryName), (dir) => dir === "node_modules" ? void 0 : directoryResult(dir));
189476
189476
  }
189477
- function trimPrefixAndSuffix(path3, prefix) {
189477
+ function trimPrefixAndSuffix(path4, prefix) {
189478
189478
  return firstDefined(matchingSuffixes, (suffix) => {
189479
- const inner = withoutStartAndEnd(normalizePath(path3), prefix, suffix);
189479
+ const inner = withoutStartAndEnd(normalizePath(path4), prefix, suffix);
189480
189480
  return inner === void 0 ? void 0 : removeLeadingDirectorySeparator(inner);
189481
189481
  });
189482
189482
  }
@@ -189484,8 +189484,8 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189484
189484
  function withoutStartAndEnd(s2, start, end) {
189485
189485
  return startsWith(s2, start) && endsWith(s2, end) ? s2.slice(start.length, s2.length - end.length) : void 0;
189486
189486
  }
189487
- function removeLeadingDirectorySeparator(path3) {
189488
- return path3[0] === directorySeparator ? path3.slice(1) : path3;
189487
+ function removeLeadingDirectorySeparator(path4) {
189488
+ return path4[0] === directorySeparator ? path4.slice(1) : path4;
189489
189489
  }
189490
189490
  function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
189491
189491
  const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
@@ -189600,10 +189600,10 @@ ${newComment.split("\n").map((c2) => ` * ${c2}`).join("\n")}
189600
189600
  /* ESNext */
189601
189601
  ) ? void 0 : createTextSpan(textStart + offset, length2);
189602
189602
  }
189603
- function isPathRelativeToScript(path3) {
189604
- if (path3 && path3.length >= 2 && path3.charCodeAt(0) === 46) {
189605
- const slashIndex = path3.length >= 3 && path3.charCodeAt(1) === 46 ? 2 : 1;
189606
- const slashCharCode = path3.charCodeAt(slashIndex);
189603
+ function isPathRelativeToScript(path4) {
189604
+ if (path4 && path4.length >= 2 && path4.charCodeAt(0) === 46) {
189605
+ const slashIndex = path4.length >= 3 && path4.charCodeAt(1) === 46 ? 2 : 1;
189606
+ const slashCharCode = path4.charCodeAt(slashIndex);
189607
189607
  return slashCharCode === 47 || slashCharCode === 92;
189608
189608
  }
189609
189609
  return false;
@@ -205574,17 +205574,17 @@ ${options.prefix}` : "\n" : options.prefix
205574
205574
  function createNormalizedPathMap() {
205575
205575
  const map2 = /* @__PURE__ */ new Map();
205576
205576
  return {
205577
- get(path3) {
205578
- return map2.get(path3);
205577
+ get(path4) {
205578
+ return map2.get(path4);
205579
205579
  },
205580
- set(path3, value) {
205581
- map2.set(path3, value);
205580
+ set(path4, value) {
205581
+ map2.set(path4, value);
205582
205582
  },
205583
- contains(path3) {
205584
- return map2.has(path3);
205583
+ contains(path4) {
205584
+ return map2.has(path4);
205585
205585
  },
205586
- remove(path3) {
205587
- map2.delete(path3);
205586
+ remove(path4) {
205587
+ map2.delete(path4);
205588
205588
  }
205589
205589
  };
205590
205590
  }
@@ -206097,12 +206097,12 @@ ${options.prefix}` : "\n" : options.prefix
206097
206097
  return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
206098
206098
  }
206099
206099
  var ScriptInfo = class {
206100
- constructor(host, fileName, scriptKind, hasMixedContent, path3, initialVersion) {
206100
+ constructor(host, fileName, scriptKind, hasMixedContent, path4, initialVersion) {
206101
206101
  this.host = host;
206102
206102
  this.fileName = fileName;
206103
206103
  this.scriptKind = scriptKind;
206104
206104
  this.hasMixedContent = hasMixedContent;
206105
- this.path = path3;
206105
+ this.path = path4;
206106
206106
  this.containingProjects = [];
206107
206107
  this.isDynamic = isDynamicFileName(fileName);
206108
206108
  this.textStorage = new TextStorage(host, this, initialVersion);
@@ -206737,8 +206737,8 @@ ${options.prefix}` : "\n" : options.prefix
206737
206737
  useCaseSensitiveFileNames() {
206738
206738
  return this.projectService.host.useCaseSensitiveFileNames;
206739
206739
  }
206740
- readDirectory(path3, extensions, exclude, include, depth) {
206741
- return this.directoryStructureHost.readDirectory(path3, extensions, exclude, include, depth);
206740
+ readDirectory(path4, extensions, exclude, include, depth) {
206741
+ return this.directoryStructureHost.readDirectory(path4, extensions, exclude, include, depth);
206742
206742
  }
206743
206743
  readFile(fileName) {
206744
206744
  return this.projectService.host.readFile(fileName);
@@ -206747,8 +206747,8 @@ ${options.prefix}` : "\n" : options.prefix
206747
206747
  return this.projectService.host.writeFile(fileName, content);
206748
206748
  }
206749
206749
  fileExists(file) {
206750
- const path3 = this.toPath(file);
206751
- return !!this.projectService.getScriptInfoForPath(path3) || !this.isWatchedMissingFile(path3) && this.directoryStructureHost.fileExists(file);
206750
+ const path4 = this.toPath(file);
206751
+ return !!this.projectService.getScriptInfoForPath(path4) || !this.isWatchedMissingFile(path4) && this.directoryStructureHost.fileExists(file);
206752
206752
  }
206753
206753
  /** @internal */
206754
206754
  resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
@@ -206773,11 +206773,11 @@ ${options.prefix}` : "\n" : options.prefix
206773
206773
  resolveLibrary(libraryName, resolveFrom, options, libFileName) {
206774
206774
  return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName);
206775
206775
  }
206776
- directoryExists(path3) {
206777
- return this.directoryStructureHost.directoryExists(path3);
206776
+ directoryExists(path4) {
206777
+ return this.directoryStructureHost.directoryExists(path4);
206778
206778
  }
206779
- getDirectories(path3) {
206780
- return this.directoryStructureHost.getDirectories(path3);
206779
+ getDirectories(path4) {
206780
+ return this.directoryStructureHost.getDirectories(path4);
206781
206781
  }
206782
206782
  /** @internal */
206783
206783
  getCachedDirectoryStructureHost() {
@@ -207040,16 +207040,16 @@ ${options.prefix}` : "\n" : options.prefix
207040
207040
  }
207041
207041
  }));
207042
207042
  }
207043
- getSourceFile(path3) {
207043
+ getSourceFile(path4) {
207044
207044
  if (!this.program) {
207045
207045
  return void 0;
207046
207046
  }
207047
- return this.program.getSourceFileByPath(path3);
207047
+ return this.program.getSourceFileByPath(path4);
207048
207048
  }
207049
207049
  /** @internal */
207050
- getSourceFileOrConfigFile(path3) {
207050
+ getSourceFileOrConfigFile(path4) {
207051
207051
  const options = this.program.getCompilerOptions();
207052
- return path3 === options.configFilePath ? options.configFile : this.getSourceFile(path3);
207052
+ return path4 === options.configFilePath ? options.configFile : this.getSourceFile(path4);
207053
207053
  }
207054
207054
  close() {
207055
207055
  var _a;
@@ -207226,8 +207226,8 @@ ${options.prefix}` : "\n" : options.prefix
207226
207226
  }
207227
207227
  // add a root file that doesnt exist on host
207228
207228
  addMissingFileRoot(fileName) {
207229
- const path3 = this.projectService.toPath(fileName);
207230
- this.rootFilesMap.set(path3, { fileName });
207229
+ const path4 = this.projectService.toPath(fileName);
207230
+ this.rootFilesMap.set(path4, { fileName });
207231
207231
  this.markAsDirty();
207232
207232
  }
207233
207233
  removeFile(info, fileExists, detachFromProject) {
@@ -207393,22 +207393,22 @@ ${options.prefix}` : "\n" : options.prefix
207393
207393
  const toRemove = new Map(this.typingWatchers);
207394
207394
  if (!this.typingWatchers) this.typingWatchers = /* @__PURE__ */ new Map();
207395
207395
  this.typingWatchers.isInvoked = false;
207396
- const createProjectWatcher = (path3, typingsWatcherType) => {
207397
- const canonicalPath = this.toPath(path3);
207396
+ const createProjectWatcher = (path4, typingsWatcherType) => {
207397
+ const canonicalPath = this.toPath(path4);
207398
207398
  toRemove.delete(canonicalPath);
207399
207399
  if (!this.typingWatchers.has(canonicalPath)) {
207400
207400
  const watchType = typingsWatcherType === "FileWatcher" ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory;
207401
207401
  this.typingWatchers.set(
207402
207402
  canonicalPath,
207403
207403
  canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === "FileWatcher" ? this.projectService.watchFactory.watchFile(
207404
- path3,
207404
+ path4,
207405
207405
  () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`),
207406
207406
  2e3,
207407
207407
  this.projectService.getWatchOptions(this),
207408
207408
  watchType,
207409
207409
  this
207410
207410
  ) : this.projectService.watchFactory.watchDirectory(
207411
- path3,
207411
+ path4,
207412
207412
  (f) => {
207413
207413
  if (this.typingWatchers.isInvoked) return this.writeLog(`TypingWatchers already invoked`);
207414
207414
  if (!fileExtensionIs(
@@ -207423,7 +207423,7 @@ ${options.prefix}` : "\n" : options.prefix
207423
207423
  this.projectService.getWatchOptions(this),
207424
207424
  watchType,
207425
207425
  this
207426
- ) : (this.writeLog(`Skipping watcher creation at ${path3}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher)
207426
+ ) : (this.writeLog(`Skipping watcher creation at ${path4}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher)
207427
207427
  );
207428
207428
  }
207429
207429
  };
@@ -207468,9 +207468,9 @@ ${options.prefix}` : "\n" : options.prefix
207468
207468
  /* DirectoryWatcher */
207469
207469
  );
207470
207470
  }
207471
- toRemove.forEach((watch, path3) => {
207471
+ toRemove.forEach((watch, path4) => {
207472
207472
  watch.close();
207473
- this.typingWatchers.delete(path3);
207473
+ this.typingWatchers.delete(path4);
207474
207474
  });
207475
207475
  }
207476
207476
  /** @internal */
@@ -207504,9 +207504,9 @@ ${options.prefix}` : "\n" : options.prefix
207504
207504
  let hasNewProgram = false;
207505
207505
  if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2)) {
207506
207506
  hasNewProgram = true;
207507
- this.rootFilesMap.forEach((value, path3) => {
207507
+ this.rootFilesMap.forEach((value, path4) => {
207508
207508
  var _a2;
207509
- const file = this.program.getSourceFileByPath(path3);
207509
+ const file = this.program.getSourceFileByPath(path4);
207510
207510
  const info = value.info;
207511
207511
  if (!file || ((_a2 = value.info) == null ? void 0 : _a2.path) === file.resolvedPath) return;
207512
207512
  value.info = this.projectService.getScriptInfo(file.fileName);
@@ -207662,8 +207662,8 @@ ${options.prefix}` : "\n" : options.prefix
207662
207662
  );
207663
207663
  return fileWatcher;
207664
207664
  }
207665
- isWatchedMissingFile(path3) {
207666
- return !!this.missingFilesMap && this.missingFilesMap.has(path3);
207665
+ isWatchedMissingFile(path4) {
207666
+ return !!this.missingFilesMap && this.missingFilesMap.has(path4);
207667
207667
  }
207668
207668
  /** @internal */
207669
207669
  addGeneratedFileWatch(generatedFile, sourceFile) {
@@ -207672,17 +207672,17 @@ ${options.prefix}` : "\n" : options.prefix
207672
207672
  this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile);
207673
207673
  }
207674
207674
  } else {
207675
- const path3 = this.toPath(sourceFile);
207675
+ const path4 = this.toPath(sourceFile);
207676
207676
  if (this.generatedFilesMap) {
207677
207677
  if (isGeneratedFileWatcher(this.generatedFilesMap)) {
207678
207678
  Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);
207679
207679
  return;
207680
207680
  }
207681
- if (this.generatedFilesMap.has(path3)) return;
207681
+ if (this.generatedFilesMap.has(path4)) return;
207682
207682
  } else {
207683
207683
  this.generatedFilesMap = /* @__PURE__ */ new Map();
207684
207684
  }
207685
- this.generatedFilesMap.set(path3, this.createGeneratedFileWatcher(generatedFile));
207685
+ this.generatedFilesMap.set(path4, this.createGeneratedFileWatcher(generatedFile));
207686
207686
  }
207687
207687
  }
207688
207688
  createGeneratedFileWatcher(generatedFile) {
@@ -208082,7 +208082,7 @@ ${options.prefix}` : "\n" : options.prefix
208082
208082
  isDefaultProjectForOpenFiles() {
208083
208083
  return !!forEachEntry(
208084
208084
  this.projectService.openFiles,
208085
- (_projectRootPath, path3) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path3)) === this
208085
+ (_projectRootPath, path4) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path4)) === this
208086
208086
  );
208087
208087
  }
208088
208088
  /** @internal */
@@ -209256,33 +209256,33 @@ ${options.prefix}` : "\n" : options.prefix
209256
209256
  getCurrentDirectory: () => service.host.getCurrentDirectory(),
209257
209257
  useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames
209258
209258
  };
209259
- function watchFile2(path3, callback) {
209259
+ function watchFile2(path4, callback) {
209260
209260
  return getOrCreateFileWatcher(
209261
209261
  watchedFiles,
209262
- path3,
209262
+ path4,
209263
209263
  callback,
209264
- (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path3 } })
209264
+ (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path4 } })
209265
209265
  );
209266
209266
  }
209267
- function watchDirectory(path3, callback, recursive) {
209267
+ function watchDirectory(path4, callback, recursive) {
209268
209268
  return getOrCreateFileWatcher(
209269
209269
  recursive ? watchedDirectoriesRecursive : watchedDirectories,
209270
- path3,
209270
+ path4,
209271
209271
  callback,
209272
209272
  (id) => ({
209273
209273
  eventName: CreateDirectoryWatcherEvent,
209274
209274
  data: {
209275
209275
  id,
209276
- path: path3,
209276
+ path: path4,
209277
209277
  recursive: !!recursive,
209278
209278
  // Special case node_modules as we watch it for changes to closed script infos as well
209279
- ignoreUpdate: !path3.endsWith("/node_modules") ? true : void 0
209279
+ ignoreUpdate: !path4.endsWith("/node_modules") ? true : void 0
209280
209280
  }
209281
209281
  })
209282
209282
  );
209283
209283
  }
209284
- function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path3, callback, event) {
209285
- const key = service.toPath(path3);
209284
+ function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path4, callback, event) {
209285
+ const key = service.toPath(path4);
209286
209286
  let id = pathToId.get(key);
209287
209287
  if (!id) pathToId.set(key, id = ids++);
209288
209288
  let callbacks = idToCallbacks.get(id);
@@ -209451,13 +209451,13 @@ ${options.prefix}` : "\n" : options.prefix
209451
209451
  return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
209452
209452
  }
209453
209453
  /** @internal */
209454
- setDocument(key, path3, sourceFile) {
209455
- const info = Debug.checkDefined(this.getScriptInfoForPath(path3));
209454
+ setDocument(key, path4, sourceFile) {
209455
+ const info = Debug.checkDefined(this.getScriptInfoForPath(path4));
209456
209456
  info.cacheSourceFile = { key, sourceFile };
209457
209457
  }
209458
209458
  /** @internal */
209459
- getDocument(key, path3) {
209460
- const info = this.getScriptInfoForPath(path3);
209459
+ getDocument(key, path4) {
209460
+ const info = this.getScriptInfoForPath(path4);
209461
209461
  return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : void 0;
209462
209462
  }
209463
209463
  /** @internal */
@@ -209579,7 +209579,7 @@ ${options.prefix}` : "\n" : options.prefix
209579
209579
  const event = {
209580
209580
  eventName: ProjectsUpdatedInBackgroundEvent,
209581
209581
  data: {
209582
- openFiles: arrayFrom(this.openFiles.keys(), (path3) => this.getScriptInfoForPath(path3).fileName)
209582
+ openFiles: arrayFrom(this.openFiles.keys(), (path4) => this.getScriptInfoForPath(path4).fileName)
209583
209583
  }
209584
209584
  };
209585
209585
  this.eventHandler(event);
@@ -209801,11 +209801,11 @@ ${options.prefix}` : "\n" : options.prefix
209801
209801
  }
209802
209802
  delayUpdateSourceInfoProjects(sourceInfos) {
209803
209803
  if (sourceInfos) {
209804
- sourceInfos.forEach((_value, path3) => this.delayUpdateProjectsOfScriptInfoPath(path3));
209804
+ sourceInfos.forEach((_value, path4) => this.delayUpdateProjectsOfScriptInfoPath(path4));
209805
209805
  }
209806
209806
  }
209807
- delayUpdateProjectsOfScriptInfoPath(path3) {
209808
- const info = this.getScriptInfoForPath(path3);
209807
+ delayUpdateProjectsOfScriptInfoPath(path4) {
209808
+ const info = this.getScriptInfoForPath(path4);
209809
209809
  if (info) {
209810
209810
  this.delayUpdateProjectGraphs(
209811
209811
  info.containingProjects,
@@ -209899,8 +209899,8 @@ ${options.prefix}` : "\n" : options.prefix
209899
209899
  const project = this.getConfiguredProjectByCanonicalConfigFilePath(projectCanonicalPath);
209900
209900
  if (!project) return;
209901
209901
  if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) {
209902
- const path3 = this.toPath(configFileName);
209903
- if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path3)) {
209902
+ const path4 = this.toPath(configFileName);
209903
+ if (find((_a = project.getCurrentProgram()) == null ? void 0 : _a.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path4)) {
209904
209904
  project.markAutoImportProviderAsDirty();
209905
209905
  }
209906
209906
  }
@@ -209955,10 +209955,10 @@ ${options.prefix}` : "\n" : options.prefix
209955
209955
  });
209956
209956
  return;
209957
209957
  }
209958
- const path3 = this.toPath(canonicalConfigFilePath);
209959
- project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path3);
209958
+ const path4 = this.toPath(canonicalConfigFilePath);
209959
+ project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path4);
209960
209960
  this.delayUpdateProjectGraph(project);
209961
- if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path3)) {
209961
+ if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? void 0 : _c.getResolvedProjectReferences(), (ref) => (ref == null ? void 0 : ref.sourceFile.path) === path4)) {
209962
209962
  project.markAutoImportProviderAsDirty();
209963
209963
  }
209964
209964
  }
@@ -209983,20 +209983,20 @@ ${options.prefix}` : "\n" : options.prefix
209983
209983
  canonicalConfigFilePath,
209984
209984
  "Change in config file detected"
209985
209985
  );
209986
- this.openFiles.forEach((_projectRootPath, path3) => {
209986
+ this.openFiles.forEach((_projectRootPath, path4) => {
209987
209987
  var _a, _b;
209988
- const configFileForOpenFile = this.configFileForOpenFiles.get(path3);
209989
- if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path3))) return;
209990
- this.configFileForOpenFiles.delete(path3);
209991
- const info = this.getScriptInfoForPath(path3);
209988
+ const configFileForOpenFile = this.configFileForOpenFiles.get(path4);
209989
+ if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? void 0 : _a.has(path4))) return;
209990
+ this.configFileForOpenFiles.delete(path4);
209991
+ const info = this.getScriptInfoForPath(path4);
209992
209992
  const newConfigFileNameForInfo = this.getConfigFileNameForFile(
209993
209993
  info,
209994
209994
  /*findFromCacheOnly*/
209995
209995
  false
209996
209996
  );
209997
209997
  if (!newConfigFileNameForInfo) return;
209998
- if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path3))) {
209999
- (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path3, configFileForOpenFile);
209998
+ if (!((_b = this.pendingOpenFileProjectUpdates) == null ? void 0 : _b.has(path4))) {
209999
+ (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map())).set(path4, configFileForOpenFile);
210000
210000
  }
210001
210001
  });
210002
210002
  this.delayEnsureProjectForOpenFiles();
@@ -210091,8 +210091,8 @@ ${options.prefix}` : "\n" : options.prefix
210091
210091
  return project;
210092
210092
  }
210093
210093
  assignOrphanScriptInfosToInferredProject() {
210094
- this.openFiles.forEach((projectRootPath, path3) => {
210095
- const info = this.getScriptInfoForPath(path3);
210094
+ this.openFiles.forEach((projectRootPath, path4) => {
210095
+ const info = this.getScriptInfoForPath(path4);
210096
210096
  if (info.isOrphan()) {
210097
210097
  this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
210098
210098
  }
@@ -210404,8 +210404,8 @@ ${options.prefix}` : "\n" : options.prefix
210404
210404
  this.configuredProjects.forEach(printProjectWithoutFileNames);
210405
210405
  this.inferredProjects.forEach(printProjectWithoutFileNames);
210406
210406
  this.logger.info("Open files: ");
210407
- this.openFiles.forEach((projectRootPath, path3) => {
210408
- const info = this.getScriptInfoForPath(path3);
210407
+ this.openFiles.forEach((projectRootPath, path4) => {
210408
+ const info = this.getScriptInfoForPath(path4);
210409
210409
  this.logger.info(` FileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`);
210410
210410
  this.logger.info(` Projects: ${info.containingProjects.map((p2) => p2.getProjectName())}`);
210411
210411
  });
@@ -210731,12 +210731,12 @@ ${options.prefix}` : "\n" : options.prefix
210731
210731
  const newRootFile = propertyReader.getFileName(f);
210732
210732
  const fileName = toNormalizedPath(newRootFile);
210733
210733
  const isDynamic = isDynamicFileName(fileName);
210734
- let path3;
210734
+ let path4;
210735
210735
  if (!isDynamic && !project.fileExists(newRootFile)) {
210736
- path3 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
210737
- const existingValue = projectRootFilesMap.get(path3);
210736
+ path4 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
210737
+ const existingValue = projectRootFilesMap.get(path4);
210738
210738
  if (existingValue) {
210739
- if (((_a = existingValue.info) == null ? void 0 : _a.path) === path3) {
210739
+ if (((_a = existingValue.info) == null ? void 0 : _a.path) === path4) {
210740
210740
  project.removeFile(
210741
210741
  existingValue.info,
210742
210742
  /*fileExists*/
@@ -210748,7 +210748,7 @@ ${options.prefix}` : "\n" : options.prefix
210748
210748
  }
210749
210749
  existingValue.fileName = fileName;
210750
210750
  } else {
210751
- projectRootFilesMap.set(path3, { fileName });
210751
+ projectRootFilesMap.set(path4, { fileName });
210752
210752
  }
210753
210753
  } else {
210754
210754
  const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions);
@@ -210762,8 +210762,8 @@ ${options.prefix}` : "\n" : options.prefix
210762
210762
  /*deferredDeleteOk*/
210763
210763
  false
210764
210764
  ));
210765
- path3 = scriptInfo.path;
210766
- const existingValue = projectRootFilesMap.get(path3);
210765
+ path4 = scriptInfo.path;
210766
+ const existingValue = projectRootFilesMap.get(path4);
210767
210767
  if (!existingValue || existingValue.info !== scriptInfo) {
210768
210768
  project.addRoot(scriptInfo, fileName);
210769
210769
  if (scriptInfo.isScriptOpen()) {
@@ -210773,11 +210773,11 @@ ${options.prefix}` : "\n" : options.prefix
210773
210773
  existingValue.fileName = fileName;
210774
210774
  }
210775
210775
  }
210776
- newRootScriptInfoMap.set(path3, true);
210776
+ newRootScriptInfoMap.set(path4, true);
210777
210777
  }
210778
210778
  if (projectRootFilesMap.size > newRootScriptInfoMap.size) {
210779
- projectRootFilesMap.forEach((value, path3) => {
210780
- if (!newRootScriptInfoMap.has(path3)) {
210779
+ projectRootFilesMap.forEach((value, path4) => {
210780
+ if (!newRootScriptInfoMap.has(path4)) {
210781
210781
  if (value.info) {
210782
210782
  project.removeFile(
210783
210783
  value.info,
@@ -210786,7 +210786,7 @@ ${options.prefix}` : "\n" : options.prefix
210786
210786
  true
210787
210787
  );
210788
210788
  } else {
210789
- projectRootFilesMap.delete(path3);
210789
+ projectRootFilesMap.delete(path4);
210790
210790
  }
210791
210791
  }
210792
210792
  });
@@ -211023,8 +211023,8 @@ ${options.prefix}` : "\n" : options.prefix
211023
211023
  }
211024
211024
  /** @internal */
211025
211025
  getScriptInfoOrConfig(uncheckedFileName) {
211026
- const path3 = toNormalizedPath(uncheckedFileName);
211027
- const info = this.getScriptInfoForNormalizedPath(path3);
211026
+ const path4 = toNormalizedPath(uncheckedFileName);
211027
+ const info = this.getScriptInfoForNormalizedPath(path4);
211028
211028
  if (info) return info;
211029
211029
  const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName));
211030
211030
  return configProject && configProject.getCompilerOptions().configFile;
@@ -211036,7 +211036,7 @@ ${options.prefix}` : "\n" : options.prefix
211036
211036
  this.filenameToScriptInfo.entries(),
211037
211037
  (entry) => entry[1].deferredDelete ? void 0 : entry
211038
211038
  ),
211039
- ([path3, scriptInfo]) => ({ path: path3, fileName: scriptInfo.fileName })
211039
+ ([path4, scriptInfo]) => ({ path: path4, fileName: scriptInfo.fileName })
211040
211040
  );
211041
211041
  this.logger.msg(
211042
211042
  `Could not find file ${JSON.stringify(fileName)}.
@@ -211068,7 +211068,7 @@ All files are: ${JSON.stringify(names)}`,
211068
211068
  if (!projects2) {
211069
211069
  projects2 = createMultiMap();
211070
211070
  projects2.add(toAddInfo.path, project);
211071
- } else if (!forEachEntry(projects2, (projs, path3) => path3 === toAddInfo.path ? false : contains(projs, project))) {
211071
+ } else if (!forEachEntry(projects2, (projs, path4) => path4 === toAddInfo.path ? false : contains(projs, project))) {
211072
211072
  projects2.add(toAddInfo.path, project);
211073
211073
  }
211074
211074
  }
@@ -211230,8 +211230,8 @@ All files are: ${JSON.stringify(names)}`,
211230
211230
  }
211231
211231
  getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn, deferredDeleteOk) {
211232
211232
  Debug.assert(fileContent === void 0 || openedByClient, "ScriptInfo needs to be opened by client to be able to set its user defined content");
211233
- const path3 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
211234
- let info = this.filenameToScriptInfo.get(path3);
211233
+ const path4 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
211234
+ let info = this.filenameToScriptInfo.get(path4);
211235
211235
  if (!info) {
211236
211236
  const isDynamic = isDynamicFileName(fileName);
211237
211237
  Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}
@@ -211243,7 +211243,7 @@ Dynamic files must always be opened with service's current directory or service
211243
211243
  if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
211244
211244
  return;
211245
211245
  }
211246
- info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path3, this.filenameToScriptInfoVersion.get(path3));
211246
+ info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path4, this.filenameToScriptInfoVersion.get(path4));
211247
211247
  this.filenameToScriptInfo.set(info.path, info);
211248
211248
  this.filenameToScriptInfoVersion.delete(info.path);
211249
211249
  if (!openedByClient) {
@@ -211390,9 +211390,9 @@ Dynamic files must always be opened with service's current directory or service
211390
211390
  getSourceFileLike(fileName, projectNameOrProject, declarationInfo) {
211391
211391
  const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject);
211392
211392
  if (project) {
211393
- const path3 = project.toPath(fileName);
211394
- const sourceFile = project.getSourceFile(path3);
211395
- if (sourceFile && sourceFile.resolvedPath === path3) return sourceFile;
211393
+ const path4 = project.toPath(fileName);
211394
+ const sourceFile = project.getSourceFile(path4);
211395
+ if (sourceFile && sourceFile.resolvedPath === path4) return sourceFile;
211396
211396
  }
211397
211397
  const info = this.getOrCreateScriptInfoNotOpenedByClient(
211398
211398
  fileName,
@@ -211558,8 +211558,8 @@ Dynamic files must always be opened with service's current directory or service
211558
211558
  }
211559
211559
  });
211560
211560
  });
211561
- this.openFiles.forEach((_projectRootPath, path3) => {
211562
- const info = this.getScriptInfoForPath(path3);
211561
+ this.openFiles.forEach((_projectRootPath, path4) => {
211562
+ const info = this.getScriptInfoForPath(path4);
211563
211563
  if (find(info.containingProjects, isExternalProject)) return;
211564
211564
  this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
211565
211565
  info,
@@ -211612,14 +211612,14 @@ Dynamic files must always be opened with service's current directory or service
211612
211612
  const pendingOpenFileProjectUpdates = this.pendingOpenFileProjectUpdates;
211613
211613
  this.pendingOpenFileProjectUpdates = void 0;
211614
211614
  pendingOpenFileProjectUpdates == null ? void 0 : pendingOpenFileProjectUpdates.forEach(
211615
- (_config, path3) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
211616
- this.getScriptInfoForPath(path3),
211615
+ (_config, path4) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
211616
+ this.getScriptInfoForPath(path4),
211617
211617
  5
211618
211618
  /* Create */
211619
211619
  )
211620
211620
  );
211621
- this.openFiles.forEach((projectRootPath, path3) => {
211622
- const info = this.getScriptInfoForPath(path3);
211621
+ this.openFiles.forEach((projectRootPath, path4) => {
211622
+ const info = this.getScriptInfoForPath(path4);
211623
211623
  if (info.isOrphan()) {
211624
211624
  this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
211625
211625
  } else {
@@ -212130,9 +212130,9 @@ Dynamic files must always be opened with service's current directory or service
212130
212130
  }
212131
212131
  });
212132
212132
  if (!toRemoveConfiguredProjects.size) return toRemoveConfiguredProjects;
212133
- forEachEntry(this.openFiles, (_projectRootPath, path3) => {
212134
- if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path3)) return;
212135
- const info = this.getScriptInfoForPath(path3);
212133
+ forEachEntry(this.openFiles, (_projectRootPath, path4) => {
212134
+ if (openFilesWithRetainedConfiguredProject == null ? void 0 : openFilesWithRetainedConfiguredProject.has(path4)) return;
212135
+ const info = this.getScriptInfoForPath(path4);
212136
212136
  if (find(info.containingProjects, isExternalProject)) return;
212137
212137
  const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(
212138
212138
  info,
@@ -212181,8 +212181,8 @@ Dynamic files must always be opened with service's current directory or service
212181
212181
  sourceInfos = info.sourceMapFilePath.sourceInfos;
212182
212182
  }
212183
212183
  if (!sourceInfos) return;
212184
- if (!forEachKey(sourceInfos, (path3) => {
212185
- const info2 = this.getScriptInfoForPath(path3);
212184
+ if (!forEachKey(sourceInfos, (path4) => {
212185
+ const info2 = this.getScriptInfoForPath(path4);
212186
212186
  return !!info2 && (info2.isScriptOpen() || !info2.isOrphan());
212187
212187
  })) {
212188
212188
  return;
@@ -212206,7 +212206,7 @@ Dynamic files must always be opened with service's current directory or service
212206
212206
  sourceInfos = info.sourceMapFilePath.sourceInfos;
212207
212207
  }
212208
212208
  if (sourceInfos) {
212209
- sourceInfos.forEach((_value, path3) => toRemoveScriptInfos.delete(path3));
212209
+ sourceInfos.forEach((_value, path4) => toRemoveScriptInfos.delete(path4));
212210
212210
  }
212211
212211
  }
212212
212212
  });
@@ -212689,9 +212689,9 @@ Dynamic files must always be opened with service's current directory or service
212689
212689
  }
212690
212690
  );
212691
212691
  }
212692
- watchPackageJsonFile(file, path3, project) {
212692
+ watchPackageJsonFile(file, path4, project) {
212693
212693
  Debug.assert(project !== void 0);
212694
- let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path3);
212694
+ let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map())).get(path4);
212695
212695
  if (!result) {
212696
212696
  let watcher = this.watchFactory.watchFile(
212697
212697
  file,
@@ -212699,11 +212699,11 @@ Dynamic files must always be opened with service's current directory or service
212699
212699
  switch (eventKind) {
212700
212700
  case 0:
212701
212701
  case 1:
212702
- this.packageJsonCache.addOrUpdate(fileName, path3);
212702
+ this.packageJsonCache.addOrUpdate(fileName, path4);
212703
212703
  this.onPackageJsonChange(result);
212704
212704
  break;
212705
212705
  case 2:
212706
- this.packageJsonCache.delete(path3);
212706
+ this.packageJsonCache.delete(path4);
212707
212707
  this.onPackageJsonChange(result);
212708
212708
  result.projects.clear();
212709
212709
  result.close();
@@ -212720,11 +212720,11 @@ Dynamic files must always be opened with service's current directory or service
212720
212720
  if (result.projects.size || !watcher) return;
212721
212721
  watcher.close();
212722
212722
  watcher = void 0;
212723
- (_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(path3);
212724
- this.packageJsonCache.invalidate(path3);
212723
+ (_a = this.packageJsonFilesMap) == null ? void 0 : _a.delete(path4);
212724
+ this.packageJsonCache.invalidate(path4);
212725
212725
  }
212726
212726
  };
212727
- this.packageJsonFilesMap.set(path3, result);
212727
+ this.packageJsonFilesMap.set(path4, result);
212728
212728
  }
212729
212729
  result.projects.add(project);
212730
212730
  (project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set())).add(result);
@@ -212914,14 +212914,14 @@ Dynamic files must always be opened with service's current directory or service
212914
212914
  );
212915
212915
  }
212916
212916
  };
212917
- function addOrUpdate(fileName, path3) {
212917
+ function addOrUpdate(fileName, path4) {
212918
212918
  const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host));
212919
- packageJsons.set(path3, packageJsonInfo);
212920
- directoriesWithoutPackageJson.delete(getDirectoryPath(path3));
212919
+ packageJsons.set(path4, packageJsonInfo);
212920
+ directoriesWithoutPackageJson.delete(getDirectoryPath(path4));
212921
212921
  }
212922
- function invalidate(path3) {
212923
- packageJsons.delete(path3);
212924
- directoriesWithoutPackageJson.delete(getDirectoryPath(path3));
212922
+ function invalidate(path4) {
212923
+ packageJsons.delete(path4);
212924
+ directoriesWithoutPackageJson.delete(getDirectoryPath(path4));
212925
212925
  }
212926
212926
  function directoryHasPackageJson(directory) {
212927
212927
  return packageJsons.has(combinePaths(directory, "package.json")) ? -1 : directoriesWithoutPackageJson.has(directory) ? 0 : 3;
@@ -213118,8 +213118,8 @@ ${json}${newLine}`;
213118
213118
  function combineProjectOutput(defaultValue, getValue, projects2, action) {
213119
213119
  const outputs = flatMapToMutable(isArray(projects2) ? projects2 : projects2.projects, (project) => action(project, defaultValue));
213120
213120
  if (!isArray(projects2) && projects2.symLinkedProjects) {
213121
- projects2.symLinkedProjects.forEach((projects22, path3) => {
213122
- const value = getValue(path3);
213121
+ projects2.symLinkedProjects.forEach((projects22, path4) => {
213122
+ const value = getValue(path4);
213123
213123
  outputs.push(...flatMap(projects22, (project) => action(project, value)));
213124
213124
  });
213125
213125
  }
@@ -213265,9 +213265,9 @@ ${json}${newLine}`;
213265
213265
  });
213266
213266
  return results.filter((o2) => o2.references.length !== 0);
213267
213267
  }
213268
- function forEachProjectInProjects(projects2, path3, cb) {
213268
+ function forEachProjectInProjects(projects2, path4, cb) {
213269
213269
  for (const project of isArray(projects2) ? projects2 : projects2.projects) {
213270
- cb(project, path3);
213270
+ cb(project, path4);
213271
213271
  }
213272
213272
  if (!isArray(projects2) && projects2.symLinkedProjects) {
213273
213273
  projects2.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => {
@@ -213281,8 +213281,8 @@ ${json}${newLine}`;
213281
213281
  const resultsMap = /* @__PURE__ */ new Map();
213282
213282
  const queue = createQueue();
213283
213283
  queue.enqueue({ project: defaultProject, location: initialLocation });
213284
- forEachProjectInProjects(projects2, initialLocation.fileName, (project, path3) => {
213285
- const location = { fileName: path3, pos: initialLocation.pos };
213284
+ forEachProjectInProjects(projects2, initialLocation.fileName, (project, path4) => {
213285
+ const location = { fileName: path4, pos: initialLocation.pos };
213286
213286
  queue.enqueue({ project, location });
213287
213287
  });
213288
213288
  const projectService = defaultProject.projectService;
@@ -215124,8 +215124,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
215124
215124
  nodeModulesPathParts.packageRootIndex
215125
215125
  );
215126
215126
  const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart));
215127
- const path3 = project.toPath(fileName);
215128
- if (entrypoints && some(entrypoints, (e2) => project.toPath(e2) === path3)) {
215127
+ const path4 = project.toPath(fileName);
215128
+ if (entrypoints && some(entrypoints, (e2) => project.toPath(e2) === path4)) {
215129
215129
  return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? void 0 : _b.resolvedFileName;
215130
215130
  } else {
215131
215131
  const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1);
@@ -215905,7 +215905,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
215905
215905
  }
215906
215906
  return combineProjectOutput(
215907
215907
  info,
215908
- (path3) => this.projectService.getScriptInfoForPath(path3),
215908
+ (path4) => this.projectService.getScriptInfoForPath(path4),
215909
215909
  projects2,
215910
215910
  (project, info2) => {
215911
215911
  if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) {
@@ -215932,7 +215932,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
215932
215932
  return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false;
215933
215933
  }
215934
215934
  const scriptInfo = project.getScriptInfo(file);
215935
- const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path3, data, writeByteOrderMark) => this.host.writeFile(path3, data, writeByteOrderMark));
215935
+ const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path4, data, writeByteOrderMark) => this.host.writeFile(path4, data, writeByteOrderMark));
215936
215936
  return args.richResponse ? {
215937
215937
  emitSkipped,
215938
215938
  diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d2) => formatDiagnosticToProtocol(
@@ -219913,8 +219913,8 @@ var require_uri_all = __commonJS({
219913
219913
  wsComponents.secure = void 0;
219914
219914
  }
219915
219915
  if (wsComponents.resourceName) {
219916
- var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path3 = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
219917
- wsComponents.path = path3 && path3 !== "/" ? path3 : void 0;
219916
+ var _wsComponents$resourc = wsComponents.resourceName.split("?"), _wsComponents$resourc2 = slicedToArray(_wsComponents$resourc, 2), path4 = _wsComponents$resourc2[0], query = _wsComponents$resourc2[1];
219917
+ wsComponents.path = path4 && path4 !== "/" ? path4 : void 0;
219918
219918
  wsComponents.query = query;
219919
219919
  wsComponents.resourceName = void 0;
219920
219920
  }
@@ -220290,12 +220290,12 @@ var require_util2 = __commonJS({
220290
220290
  return "'" + escapeQuotes(str) + "'";
220291
220291
  }
220292
220292
  function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
220293
- var path3 = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'";
220294
- return joinPaths(currentPath, path3);
220293
+ var path4 = jsonPointers ? "'/' + " + expr + (isNumber ? "" : ".replace(/~/g, '~0').replace(/\\//g, '~1')") : isNumber ? "'[' + " + expr + " + ']'" : "'[\\'' + " + expr + " + '\\']'";
220294
+ return joinPaths(currentPath, path4);
220295
220295
  }
220296
220296
  function getPath2(currentPath, prop, jsonPointers) {
220297
- var path3 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop));
220298
- return joinPaths(currentPath, path3);
220297
+ var path4 = jsonPointers ? toQuotedString("/" + escapeJsonPointer(prop)) : toQuotedString(getProperty(prop));
220298
+ return joinPaths(currentPath, path4);
220299
220299
  }
220300
220300
  var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
220301
220301
  var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
@@ -230057,8 +230057,8 @@ var require_utils = __commonJS({
230057
230057
  }
230058
230058
  return ind;
230059
230059
  }
230060
- function removeDotSegments(path3) {
230061
- let input = path3;
230060
+ function removeDotSegments(path4) {
230061
+ let input = path4;
230062
230062
  const output = [];
230063
230063
  let nextSlash = -1;
230064
230064
  let len = 0;
@@ -230258,8 +230258,8 @@ var require_schemes = __commonJS({
230258
230258
  wsComponent.secure = void 0;
230259
230259
  }
230260
230260
  if (wsComponent.resourceName) {
230261
- const [path3, query] = wsComponent.resourceName.split("?");
230262
- wsComponent.path = path3 && path3 !== "/" ? path3 : void 0;
230261
+ const [path4, query] = wsComponent.resourceName.split("?");
230262
+ wsComponent.path = path4 && path4 !== "/" ? path4 : void 0;
230263
230263
  wsComponent.query = query;
230264
230264
  wsComponent.resourceName = void 0;
230265
230265
  }
@@ -234475,17 +234475,17 @@ function generateMultiPlaceholderString(value, jsonPath, tracker) {
234475
234475
  }
234476
234476
  return value;
234477
234477
  }
234478
- function isJsonSchemaPath(path3) {
234479
- if (path3.endsWith("contextConfig.headersSchema") || path3.endsWith("responseSchema")) {
234478
+ function isJsonSchemaPath(path4) {
234479
+ if (path4.endsWith("contextConfig.headersSchema") || path4.endsWith("responseSchema")) {
234480
234480
  return true;
234481
234481
  }
234482
- if (path3.includes("artifactComponents") && path3.endsWith("props")) {
234482
+ if (path4.includes("artifactComponents") && path4.endsWith("props")) {
234483
234483
  return true;
234484
234484
  }
234485
- if (path3.includes("dataComponents") && path3.endsWith("props")) {
234485
+ if (path4.includes("dataComponents") && path4.endsWith("props")) {
234486
234486
  return true;
234487
234487
  }
234488
- if (path3.includes("statusComponents") && path3.endsWith("detailsSchema")) {
234488
+ if (path4.includes("statusComponents") && path4.endsWith("detailsSchema")) {
234489
234489
  return true;
234490
234490
  }
234491
234491
  return false;
@@ -234494,16 +234494,16 @@ function updateTracker(tracker, placeholder, value) {
234494
234494
  tracker.placeholderToValue.set(placeholder, value);
234495
234495
  tracker.valueToPlaceholder.set(value, placeholder);
234496
234496
  }
234497
- function processObject(obj, tracker, path3 = "") {
234497
+ function processObject(obj, tracker, path4 = "") {
234498
234498
  if (typeof obj === "string") {
234499
234499
  if (containsTemplateLiterals(obj)) {
234500
- return generateMultiPlaceholderString(obj, path3, tracker);
234500
+ return generateMultiPlaceholderString(obj, path4, tracker);
234501
234501
  } else {
234502
234502
  const existingPlaceholder = tracker.valueToPlaceholder.get(obj);
234503
234503
  if (existingPlaceholder) {
234504
234504
  return existingPlaceholder;
234505
234505
  }
234506
- const placeholder = generatePlaceholder(path3);
234506
+ const placeholder = generatePlaceholder(path4);
234507
234507
  if (shouldReplaceString(obj, placeholder)) {
234508
234508
  const existingValue = tracker.placeholderToValue.get(placeholder);
234509
234509
  if (existingValue && existingValue !== obj) {
@@ -234517,7 +234517,7 @@ function processObject(obj, tracker, path3 = "") {
234517
234517
  }
234518
234518
  return obj;
234519
234519
  }
234520
- if (isJsonSchemaPath(path3)) {
234520
+ if (isJsonSchemaPath(path4)) {
234521
234521
  try {
234522
234522
  const zodSchema = jsonSchemaToZod(obj);
234523
234523
  return zodSchema;
@@ -234526,12 +234526,12 @@ function processObject(obj, tracker, path3 = "") {
234526
234526
  }
234527
234527
  }
234528
234528
  if (Array.isArray(obj)) {
234529
- return obj.map((item, index2) => processObject(item, tracker, `${path3}[${index2}]`));
234529
+ return obj.map((item, index2) => processObject(item, tracker, `${path4}[${index2}]`));
234530
234530
  }
234531
234531
  if (obj && typeof obj === "object") {
234532
234532
  const result = {};
234533
234533
  for (const [key, value] of Object.entries(obj)) {
234534
- const currentPath = path3 ? `${path3}.${key}` : key;
234534
+ const currentPath = path4 ? `${path4}.${key}` : key;
234535
234535
  result[key] = processObject(value, tracker, currentPath);
234536
234536
  }
234537
234537
  return result;
@@ -237799,24 +237799,183 @@ import { Command } from "commander";
237799
237799
 
237800
237800
  // src/commands/add.ts
237801
237801
  init_esm_shims();
237802
+ init_src();
237802
237803
  import chalk from "chalk";
237803
237804
  import fs3 from "fs-extra";
237804
237805
  import ora from "ora";
237805
237806
 
237806
237807
  // src/utils/templates.ts
237807
237808
  init_esm_shims();
237809
+ import path3 from "path";
237808
237810
  import degit from "degit";
237809
237811
  import fs2 from "fs-extra";
237810
- async function cloneTemplate(templatePath, targetPath) {
237812
+ async function cloneTemplate(templatePath, targetPath, replacements) {
237811
237813
  await fs2.mkdir(targetPath, { recursive: true });
237812
237814
  const templatePathSuffix = templatePath.replace("https://github.com/", "");
237813
237815
  const emitter = degit(templatePathSuffix);
237814
237816
  try {
237815
237817
  await emitter.clone(targetPath);
237818
+ if (replacements && replacements.length > 0) {
237819
+ await replaceContentInFiles(targetPath, replacements);
237820
+ }
237816
237821
  } catch (_error) {
237817
237822
  process.exit(1);
237818
237823
  }
237819
237824
  }
237825
+ async function replaceContentInFiles(targetPath, replacements) {
237826
+ for (const replacement of replacements) {
237827
+ const filePath = path3.join(targetPath, replacement.filePath);
237828
+ if (!await fs2.pathExists(filePath)) {
237829
+ console.warn(`Warning: File ${filePath} not found, skipping replacements`);
237830
+ continue;
237831
+ }
237832
+ const content = await fs2.readFile(filePath, "utf-8");
237833
+ const updatedContent = await replaceObjectProperties(content, replacement.replacements);
237834
+ await fs2.writeFile(filePath, updatedContent, "utf-8");
237835
+ }
237836
+ }
237837
+ async function replaceObjectProperties(content, replacements) {
237838
+ let updatedContent = content;
237839
+ for (const [propertyPath, replacement] of Object.entries(replacements)) {
237840
+ updatedContent = replaceObjectProperty(updatedContent, propertyPath, replacement);
237841
+ }
237842
+ return updatedContent;
237843
+ }
237844
+ function replaceObjectProperty(content, propertyPath, replacement) {
237845
+ const singleLineMatch = content.match(
237846
+ new RegExp(`^(.+{[^{}]*${propertyPath}\\s*:\\s*{[^{}]*}[^{}]*}.*)$`, "m")
237847
+ );
237848
+ if (singleLineMatch) {
237849
+ const singleLinePattern = new RegExp(`((^|\\s|{)${propertyPath}\\s*:\\s*)({[^}]*})`);
237850
+ return content.replace(
237851
+ singleLinePattern,
237852
+ `$1${JSON.stringify(replacement).replace(/"/g, "'").replace(/:/g, ": ").replace(/,/g, ", ")}`
237853
+ );
237854
+ }
237855
+ const replacementStr = JSON.stringify(replacement, null, 2).replace(/"/g, "'");
237856
+ const lines = content.split("\n");
237857
+ const result = [];
237858
+ let inTargetProperty = false;
237859
+ let braceCount = 0;
237860
+ let targetPropertyIndent = "";
237861
+ let foundProperty = false;
237862
+ for (let i2 = 0; i2 < lines.length; i2++) {
237863
+ const line = lines[i2];
237864
+ const trimmedLine = line.trim();
237865
+ if (inTargetProperty) {
237866
+ for (const char of line) {
237867
+ if (char === "{") braceCount++;
237868
+ if (char === "}") braceCount--;
237869
+ }
237870
+ if (braceCount <= 0) {
237871
+ const hasTrailingComma = line.includes(",") || i2 + 1 < lines.length && lines[i2 + 1].trim().startsWith("}") === false && lines[i2 + 1].trim() !== "";
237872
+ const indentedReplacement = replacementStr.split("\n").map((replacementLine, index2) => {
237873
+ if (index2 === 0) {
237874
+ return `${targetPropertyIndent}${propertyPath}: ${replacementLine}`;
237875
+ }
237876
+ return `${targetPropertyIndent}${replacementLine}`;
237877
+ }).join("\n");
237878
+ result.push(`${indentedReplacement}${hasTrailingComma ? "," : ""}`);
237879
+ inTargetProperty = false;
237880
+ foundProperty = true;
237881
+ continue;
237882
+ }
237883
+ continue;
237884
+ }
237885
+ const propertyPattern = new RegExp(`(^|\\s+)${propertyPath}\\s*:`);
237886
+ if (trimmedLine.startsWith(`${propertyPath}:`) || propertyPattern.test(line)) {
237887
+ inTargetProperty = true;
237888
+ braceCount = 0;
237889
+ if (line.includes(" = { ")) {
237890
+ targetPropertyIndent = `${line.match(/^\s*/)?.[0] || ""} `;
237891
+ } else {
237892
+ const propertyMatch = line.match(new RegExp(`(.*?)(^|\\s+)${propertyPath}\\s*:`));
237893
+ targetPropertyIndent = propertyMatch ? propertyMatch[1] : line.match(/^\s*/)?.[0] || "";
237894
+ }
237895
+ for (const char of line) {
237896
+ if (char === "{") braceCount++;
237897
+ if (char === "}") braceCount--;
237898
+ }
237899
+ if (braceCount <= 0) {
237900
+ const hasTrailingComma = line.includes(",");
237901
+ const indentedReplacement = replacementStr.split("\n").map((replacementLine, index2) => {
237902
+ if (index2 === 0) {
237903
+ return `${targetPropertyIndent}${propertyPath}: ${replacementLine}`;
237904
+ }
237905
+ return `${targetPropertyIndent}${replacementLine}`;
237906
+ }).join("\n");
237907
+ result.push(`${indentedReplacement}${hasTrailingComma ? "," : ""}`);
237908
+ inTargetProperty = false;
237909
+ foundProperty = true;
237910
+ continue;
237911
+ }
237912
+ continue;
237913
+ }
237914
+ result.push(line);
237915
+ }
237916
+ if (!foundProperty) {
237917
+ return injectPropertyIntoObject(result.join("\n"), propertyPath, replacement);
237918
+ }
237919
+ return result.join("\n");
237920
+ }
237921
+ function injectPropertyIntoObject(content, propertyPath, replacement) {
237922
+ const replacementStr = JSON.stringify(replacement, null, 2).replace(/"/g, "'");
237923
+ const lines = content.split("\n");
237924
+ const result = [];
237925
+ let foundObjectStart = false;
237926
+ let objectDepth = 0;
237927
+ let insertionPoint = -1;
237928
+ let baseIndent = "";
237929
+ for (let i2 = 0; i2 < lines.length; i2++) {
237930
+ const line = lines[i2];
237931
+ const trimmedLine = line.trim();
237932
+ if (!foundObjectStart && (trimmedLine.includes("({") || trimmedLine.endsWith(" = {") || line.includes(" = { "))) {
237933
+ foundObjectStart = true;
237934
+ baseIndent = line.match(/^\s*/)?.[0] || "";
237935
+ objectDepth = 0;
237936
+ for (const char of line) {
237937
+ if (char === "{") objectDepth++;
237938
+ if (char === "}") objectDepth--;
237939
+ }
237940
+ } else if (foundObjectStart) {
237941
+ for (const char of line) {
237942
+ if (char === "{") objectDepth++;
237943
+ if (char === "}") objectDepth--;
237944
+ }
237945
+ if (objectDepth === 0 && trimmedLine.startsWith("}")) {
237946
+ insertionPoint = i2;
237947
+ break;
237948
+ }
237949
+ }
237950
+ }
237951
+ if (insertionPoint !== -1) {
237952
+ const propertyIndent = `${baseIndent} `;
237953
+ let needsCommaPrefix = false;
237954
+ if (insertionPoint > 0) {
237955
+ const prevLine = lines[insertionPoint - 1].trim();
237956
+ needsCommaPrefix = prevLine !== "" && !prevLine.endsWith(",") && !prevLine.startsWith("}");
237957
+ }
237958
+ const indentedReplacement = replacementStr.split("\n").map((replacementLine, index2) => {
237959
+ if (index2 === 0) {
237960
+ return `${propertyIndent}${propertyPath}: ${replacementLine}`;
237961
+ }
237962
+ return `${propertyIndent}${replacementLine}`;
237963
+ }).join("\n");
237964
+ for (let i2 = 0; i2 < lines.length; i2++) {
237965
+ if (i2 === insertionPoint) {
237966
+ result.push(indentedReplacement);
237967
+ }
237968
+ if (i2 === insertionPoint - 1 && needsCommaPrefix) {
237969
+ result.push(`${lines[i2]},`);
237970
+ } else {
237971
+ result.push(lines[i2]);
237972
+ }
237973
+ }
237974
+ return result.join("\n");
237975
+ }
237976
+ console.warn(`Could not inject property "${propertyPath}" - no suitable object found in content`);
237977
+ return content;
237978
+ }
237820
237979
  async function getAvailableTemplates() {
237821
237980
  const response = await fetch(
237822
237981
  "https://api.github.com/repos/inkeep/agents-cookbook/contents/template-projects"
@@ -237826,6 +237985,39 @@ async function getAvailableTemplates() {
237826
237985
  }
237827
237986
 
237828
237987
  // src/commands/add.ts
237988
+ var defaultGoogleModelConfigurations = {
237989
+ base: {
237990
+ model: GOOGLE_MODELS.GEMINI_2_5_FLASH
237991
+ },
237992
+ structuredOutput: {
237993
+ model: GOOGLE_MODELS.GEMINI_2_5_FLASH_LITE
237994
+ },
237995
+ summarizer: {
237996
+ model: GOOGLE_MODELS.GEMINI_2_5_FLASH_LITE
237997
+ }
237998
+ };
237999
+ var defaultOpenaiModelConfigurations = {
238000
+ base: {
238001
+ model: OPENAI_MODELS.GPT_4_1_20250414
238002
+ },
238003
+ structuredOutput: {
238004
+ model: OPENAI_MODELS.GPT_4_1_MINI_20250414
238005
+ },
238006
+ summarizer: {
238007
+ model: OPENAI_MODELS.GPT_4_1_NANO_20250414
238008
+ }
238009
+ };
238010
+ var defaultAnthropicModelConfigurations = {
238011
+ base: {
238012
+ model: ANTHROPIC_MODELS.CLAUDE_SONNET_4_5_20250929
238013
+ },
238014
+ structuredOutput: {
238015
+ model: ANTHROPIC_MODELS.CLAUDE_SONNET_4_5_20250929
238016
+ },
238017
+ summarizer: {
238018
+ model: ANTHROPIC_MODELS.CLAUDE_SONNET_4_5_20250929
238019
+ }
238020
+ };
237829
238021
  async function addCommand(options) {
237830
238022
  const templates = await getAvailableTemplates();
237831
238023
  if (!options.template) {
@@ -237839,6 +238031,30 @@ async function addCommand(options) {
237839
238031
  console.error(`\u274C Template "${options.template}" not found`);
237840
238032
  process.exit(1);
237841
238033
  }
238034
+ const anthropicKey = process.env.ANTHROPIC_API_KEY;
238035
+ const openAiKey = process.env.OPENAI_API_KEY;
238036
+ const googleKey = process.env.GOOGLE_API_KEY;
238037
+ let defaultModelSettings = {};
238038
+ if (anthropicKey) {
238039
+ defaultModelSettings = defaultAnthropicModelConfigurations;
238040
+ } else if (openAiKey) {
238041
+ defaultModelSettings = defaultOpenaiModelConfigurations;
238042
+ } else if (googleKey) {
238043
+ defaultModelSettings = defaultGoogleModelConfigurations;
238044
+ }
238045
+ const contentReplacements = [
238046
+ {
238047
+ filePath: "index.ts",
238048
+ replacements: {
238049
+ models: defaultModelSettings
238050
+ }
238051
+ }
238052
+ ];
238053
+ if (Object.keys(defaultModelSettings).length === 0) {
238054
+ console.error(
238055
+ "\u274C No AI provider key found in environment variables. Please set one of: ANTHROPIC_API_KEY, OPENAI_API_KEY, or GOOGLE_GENERATIVE_AI_API_KEY"
238056
+ );
238057
+ }
237842
238058
  const baseDir = options.targetPath || process.cwd();
237843
238059
  const templateDir = `${baseDir}/${options.template}`;
237844
238060
  if (await fs3.pathExists(templateDir)) {
@@ -237857,7 +238073,7 @@ async function addCommand(options) {
237857
238073
  }
237858
238074
  const spinner = ora("Adding template...").start();
237859
238075
  const fullTemplatePath = `https://github.com/inkeep/agents-cookbook/template-projects/${options.template}`;
237860
- await cloneTemplate(fullTemplatePath, templateDir);
238076
+ await cloneTemplate(fullTemplatePath, templateDir, contentReplacements);
237861
238077
  spinner.succeed(`Template "${options.template}" added to ${templateDir}`);
237862
238078
  return;
237863
238079
  }
@@ -238201,8 +238417,8 @@ This project can be deployed to any platform that supports Next.js:
238201
238417
  }
238202
238418
  }
238203
238419
  async function devCommand(options) {
238204
- const { port, host, build, outputDir, path: path3, export: exportFlag } = options;
238205
- if (path3) {
238420
+ const { port, host, build, outputDir, path: path4, export: exportFlag } = options;
238421
+ if (path4) {
238206
238422
  const rt = resolveWebRuntime(true);
238207
238423
  console.log(rt);
238208
238424
  return;
@@ -239323,8 +239539,8 @@ program.name("inkeep").description("CLI tool for Inkeep Agent Framework").versio
239323
239539
  program.command("add [template]").description("Add a new template to the project").option("--target-path <path>", "Target path to add the template to").option("--config <path>", "Path to configuration file").action(async (template, options) => {
239324
239540
  await addCommand({ template, ...options });
239325
239541
  });
239326
- program.command("init [path]").description("Initialize a new Inkeep configuration file").option("--no-interactive", "Skip interactive path selection").option("--config <path>", "Path to use as template for new configuration").action(async (path3, options) => {
239327
- await initCommand({ path: path3, ...options });
239542
+ program.command("init [path]").description("Initialize a new Inkeep configuration file").option("--no-interactive", "Skip interactive path selection").option("--config <path>", "Path to use as template for new configuration").action(async (path4, options) => {
239543
+ await initCommand({ path: path4, ...options });
239328
239544
  });
239329
239545
  var configCommand = program.command("config").description("Manage Inkeep configuration");
239330
239546
  configCommand.command("get [key]").description("Get configuration value(s)").option("--config <path>", "Path to configuration file").option("--config-file-path <path>", "Path to configuration file (deprecated, use --config)").action(async (key, options) => {