wp-typia 0.22.3 → 0.22.4

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.
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  WORKSPACE_TEMPLATE_PACKAGE
4
- } from "./cli-pd5pqgre.js";
4
+ } from "./cli-btbpt84c.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require,
@@ -149,16 +149,16 @@ var require_util = __commonJS((exports) => {
149
149
  }
150
150
  exports.urlGenerate = urlGenerate;
151
151
  function normalize(aPath) {
152
- var path2 = aPath;
152
+ var path4 = aPath;
153
153
  var url = urlParse(aPath);
154
154
  if (url) {
155
155
  if (!url.path) {
156
156
  return aPath;
157
157
  }
158
- path2 = url.path;
158
+ path4 = url.path;
159
159
  }
160
- var isAbsolute = exports.isAbsolute(path2);
161
- var parts = path2.split(/\/+/);
160
+ var isAbsolute = exports.isAbsolute(path4);
161
+ var parts = path4.split(/\/+/);
162
162
  for (var part, up = 0, i = parts.length - 1;i >= 0; i--) {
163
163
  part = parts[i];
164
164
  if (part === ".") {
@@ -175,15 +175,15 @@ var require_util = __commonJS((exports) => {
175
175
  }
176
176
  }
177
177
  }
178
- path2 = parts.join("/");
179
- if (path2 === "") {
180
- path2 = isAbsolute ? "/" : ".";
178
+ path4 = parts.join("/");
179
+ if (path4 === "") {
180
+ path4 = isAbsolute ? "/" : ".";
181
181
  }
182
182
  if (url) {
183
- url.path = path2;
183
+ url.path = path4;
184
184
  return urlGenerate(url);
185
185
  }
186
- return path2;
186
+ return path4;
187
187
  }
188
188
  exports.normalize = normalize;
189
189
  function join(aRoot, aPath) {
@@ -1733,12 +1733,12 @@ var require_buffer_from = __commonJS((exports, module) => {
1733
1733
  // ../../node_modules/.bun/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js
1734
1734
  var require_source_map_support = __commonJS((exports, module) => {
1735
1735
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
1736
- var path2 = __require("path");
1737
- var fs2;
1736
+ var path4 = __require("path");
1737
+ var fs3;
1738
1738
  try {
1739
- fs2 = __require("fs");
1740
- if (!fs2.existsSync || !fs2.readFileSync) {
1741
- fs2 = null;
1739
+ fs3 = __require("fs");
1740
+ if (!fs3.existsSync || !fs3.readFileSync) {
1741
+ fs3 = null;
1742
1742
  }
1743
1743
  } catch (err) {}
1744
1744
  var bufferFrom = require_buffer_from();
@@ -1793,43 +1793,43 @@ var require_source_map_support = __commonJS((exports, module) => {
1793
1793
  };
1794
1794
  }
1795
1795
  var retrieveFile = handlerExec(retrieveFileHandlers);
1796
- retrieveFileHandlers.push(function(path3) {
1797
- path3 = path3.trim();
1798
- if (/^file:/.test(path3)) {
1799
- path3 = path3.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
1796
+ retrieveFileHandlers.push(function(path5) {
1797
+ path5 = path5.trim();
1798
+ if (/^file:/.test(path5)) {
1799
+ path5 = path5.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
1800
1800
  return drive ? "" : "/";
1801
1801
  });
1802
1802
  }
1803
- if (path3 in fileContentsCache) {
1804
- return fileContentsCache[path3];
1803
+ if (path5 in fileContentsCache) {
1804
+ return fileContentsCache[path5];
1805
1805
  }
1806
1806
  var contents = "";
1807
1807
  try {
1808
- if (!fs2) {
1808
+ if (!fs3) {
1809
1809
  var xhr = new XMLHttpRequest;
1810
- xhr.open("GET", path3, false);
1810
+ xhr.open("GET", path5, false);
1811
1811
  xhr.send(null);
1812
1812
  if (xhr.readyState === 4 && xhr.status === 200) {
1813
1813
  contents = xhr.responseText;
1814
1814
  }
1815
- } else if (fs2.existsSync(path3)) {
1816
- contents = fs2.readFileSync(path3, "utf8");
1815
+ } else if (fs3.existsSync(path5)) {
1816
+ contents = fs3.readFileSync(path5, "utf8");
1817
1817
  }
1818
1818
  } catch (er) {}
1819
- return fileContentsCache[path3] = contents;
1819
+ return fileContentsCache[path5] = contents;
1820
1820
  });
1821
1821
  function supportRelativeURL(file, url) {
1822
1822
  if (!file)
1823
1823
  return url;
1824
- var dir = path2.dirname(file);
1824
+ var dir = path4.dirname(file);
1825
1825
  var match = /^\w+:\/\/[^\/]*/.exec(dir);
1826
1826
  var protocol = match ? match[0] : "";
1827
1827
  var startPath = dir.slice(protocol.length);
1828
1828
  if (protocol && /^\/\w\:/.test(startPath)) {
1829
1829
  protocol += "/";
1830
- return protocol + path2.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
1830
+ return protocol + path4.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
1831
1831
  }
1832
- return protocol + path2.resolve(dir.slice(protocol.length), url);
1832
+ return protocol + path4.resolve(dir.slice(protocol.length), url);
1833
1833
  }
1834
1834
  function retrieveSourceMapURL(source) {
1835
1835
  var fileData;
@@ -2077,9 +2077,9 @@ var require_source_map_support = __commonJS((exports, module) => {
2077
2077
  var line = +match[2];
2078
2078
  var column = +match[3];
2079
2079
  var contents = fileContentsCache[source];
2080
- if (!contents && fs2 && fs2.existsSync(source)) {
2080
+ if (!contents && fs3 && fs3.existsSync(source)) {
2081
2081
  try {
2082
- contents = fs2.readFileSync(source, "utf8");
2082
+ contents = fs3.readFileSync(source, "utf8");
2083
2083
  } catch (er) {
2084
2084
  contents = "";
2085
2085
  }
@@ -5875,10 +5875,10 @@ var require_typescript = __commonJS((exports, module) => {
5875
5875
  function and(f, g) {
5876
5876
  return (arg) => f(arg) && g(arg);
5877
5877
  }
5878
- function or(...fs2) {
5878
+ function or(...fs3) {
5879
5879
  return (...args) => {
5880
5880
  let lastResult;
5881
- for (const f of fs2) {
5881
+ for (const f of fs3) {
5882
5882
  lastResult = f(...args);
5883
5883
  if (lastResult) {
5884
5884
  return lastResult;
@@ -7332,7 +7332,7 @@ ${lanes.join(`
7332
7332
  var tracing;
7333
7333
  var tracingEnabled;
7334
7334
  ((tracingEnabled2) => {
7335
- let fs2;
7335
+ let fs3;
7336
7336
  let traceCount = 0;
7337
7337
  let traceFd = 0;
7338
7338
  let mode;
@@ -7341,9 +7341,9 @@ ${lanes.join(`
7341
7341
  const legend = [];
7342
7342
  function startTracing2(tracingMode, traceDir, configFilePath) {
7343
7343
  Debug.assert(!tracing, "Tracing already started");
7344
- if (fs2 === undefined) {
7344
+ if (fs3 === undefined) {
7345
7345
  try {
7346
- fs2 = __require("fs");
7346
+ fs3 = __require("fs");
7347
7347
  } catch (e) {
7348
7348
  throw new Error(`tracing requires having fs
7349
7349
  (original error: ${e.message || e})`);
@@ -7354,8 +7354,8 @@ ${lanes.join(`
7354
7354
  if (legendPath === undefined) {
7355
7355
  legendPath = combinePaths(traceDir, "legend.json");
7356
7356
  }
7357
- if (!fs2.existsSync(traceDir)) {
7358
- fs2.mkdirSync(traceDir, { recursive: true });
7357
+ if (!fs3.existsSync(traceDir)) {
7358
+ fs3.mkdirSync(traceDir, { recursive: true });
7359
7359
  }
7360
7360
  const countPart = mode === "build" ? `.${process.pid}-${++traceCount}` : mode === "server" ? `.${process.pid}` : ``;
7361
7361
  const tracePath = combinePaths(traceDir, `trace${countPart}.json`);
@@ -7365,10 +7365,10 @@ ${lanes.join(`
7365
7365
  tracePath,
7366
7366
  typesPath
7367
7367
  });
7368
- traceFd = fs2.openSync(tracePath, "w");
7368
+ traceFd = fs3.openSync(tracePath, "w");
7369
7369
  tracing = tracingEnabled2;
7370
7370
  const meta = { cat: "__metadata", ph: "M", ts: 1000 * timestamp(), pid: 1, tid: 1 };
7371
- fs2.writeSync(traceFd, `[
7371
+ fs3.writeSync(traceFd, `[
7372
7372
  ` + [{ name: "process_name", args: { name: "tsc" }, ...meta }, { name: "thread_name", args: { name: "Main" }, ...meta }, { name: "TracingStartedInBrowser", ...meta, cat: "disabled-by-default-devtools.timeline" }].map((v) => JSON.stringify(v)).join(`,
7373
7373
  `));
7374
7374
  }
@@ -7376,10 +7376,10 @@ ${lanes.join(`
7376
7376
  function stopTracing() {
7377
7377
  Debug.assert(tracing, "Tracing is not in progress");
7378
7378
  Debug.assert(!!typeCatalog.length === (mode !== "server"));
7379
- fs2.writeSync(traceFd, `
7379
+ fs3.writeSync(traceFd, `
7380
7380
  ]
7381
7381
  `);
7382
- fs2.closeSync(traceFd);
7382
+ fs3.closeSync(traceFd);
7383
7383
  tracing = undefined;
7384
7384
  if (typeCatalog.length) {
7385
7385
  dumpTypes(typeCatalog);
@@ -7444,13 +7444,13 @@ ${lanes.join(`
7444
7444
  if (mode === "server" && phase === "checkTypes")
7445
7445
  return;
7446
7446
  mark("beginTracing");
7447
- fs2.writeSync(traceFd, `,
7447
+ fs3.writeSync(traceFd, `,
7448
7448
  {"pid":1,"tid":1,"ph":"${eventType}","cat":"${phase}","ts":${time},"name":"${name}"`);
7449
7449
  if (extras)
7450
- fs2.writeSync(traceFd, `,${extras}`);
7450
+ fs3.writeSync(traceFd, `,${extras}`);
7451
7451
  if (args)
7452
- fs2.writeSync(traceFd, `,"args":${JSON.stringify(args)}`);
7453
- fs2.writeSync(traceFd, `}`);
7452
+ fs3.writeSync(traceFd, `,"args":${JSON.stringify(args)}`);
7453
+ fs3.writeSync(traceFd, `}`);
7454
7454
  mark("endTracing");
7455
7455
  measure("Tracing", "beginTracing", "endTracing");
7456
7456
  }
@@ -7472,9 +7472,9 @@ ${lanes.join(`
7472
7472
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
7473
7473
  mark("beginDumpTypes");
7474
7474
  const typesPath = legend[legend.length - 1].typesPath;
7475
- const typesFd = fs2.openSync(typesPath, "w");
7475
+ const typesFd = fs3.openSync(typesPath, "w");
7476
7476
  const recursionIdentityMap = /* @__PURE__ */ new Map;
7477
- fs2.writeSync(typesFd, "[");
7477
+ fs3.writeSync(typesFd, "[");
7478
7478
  const numTypes = types.length;
7479
7479
  for (let i = 0;i < numTypes; i++) {
7480
7480
  const type = types[i];
@@ -7570,15 +7570,15 @@ ${lanes.join(`
7570
7570
  flags: Debug.formatTypeFlags(type.flags).split("|"),
7571
7571
  display
7572
7572
  };
7573
- fs2.writeSync(typesFd, JSON.stringify(descriptor));
7573
+ fs3.writeSync(typesFd, JSON.stringify(descriptor));
7574
7574
  if (i < numTypes - 1) {
7575
- fs2.writeSync(typesFd, `,
7575
+ fs3.writeSync(typesFd, `,
7576
7576
  `);
7577
7577
  }
7578
7578
  }
7579
- fs2.writeSync(typesFd, `]
7579
+ fs3.writeSync(typesFd, `]
7580
7580
  `);
7581
- fs2.closeSync(typesFd);
7581
+ fs3.closeSync(typesFd);
7582
7582
  mark("endDumpTypes");
7583
7583
  measure("Dump types", "beginDumpTypes", "endDumpTypes");
7584
7584
  }
@@ -7586,7 +7586,7 @@ ${lanes.join(`
7586
7586
  if (!legendPath) {
7587
7587
  return;
7588
7588
  }
7589
- fs2.writeFileSync(legendPath, JSON.stringify(legend));
7589
+ fs3.writeFileSync(legendPath, JSON.stringify(legend));
7590
7590
  }
7591
7591
  tracingEnabled2.dumpLegend = dumpLegend;
7592
7592
  })(tracingEnabled || (tracingEnabled = {}));
@@ -9671,27 +9671,27 @@ ${lanes.join(`
9671
9671
  }
9672
9672
  function createSingleWatcherPerName(cache, useCaseSensitiveFileNames2, name, callback, createWatcher) {
9673
9673
  const toCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames2);
9674
- const path2 = toCanonicalFileName(name);
9675
- const existing = cache.get(path2);
9674
+ const path4 = toCanonicalFileName(name);
9675
+ const existing = cache.get(path4);
9676
9676
  if (existing) {
9677
9677
  existing.callbacks.push(callback);
9678
9678
  } else {
9679
- cache.set(path2, {
9679
+ cache.set(path4, {
9680
9680
  watcher: createWatcher((param1, param2, param3) => {
9681
9681
  var _a;
9682
- return (_a = cache.get(path2)) == null ? undefined : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
9682
+ return (_a = cache.get(path4)) == null ? undefined : _a.callbacks.slice().forEach((cb) => cb(param1, param2, param3));
9683
9683
  }),
9684
9684
  callbacks: [callback]
9685
9685
  });
9686
9686
  }
9687
9687
  return {
9688
9688
  close: () => {
9689
- const watcher = cache.get(path2);
9689
+ const watcher = cache.get(path4);
9690
9690
  if (!watcher)
9691
9691
  return;
9692
9692
  if (!orderedRemoveItem(watcher.callbacks, callback) || watcher.callbacks.length)
9693
9693
  return;
9694
- cache.delete(path2);
9694
+ cache.delete(path4);
9695
9695
  closeFileWatcherOf(watcher);
9696
9696
  }
9697
9697
  };
@@ -9926,15 +9926,15 @@ ${lanes.join(`
9926
9926
  (newChildWatches || (newChildWatches = [])).push(childWatcher);
9927
9927
  }
9928
9928
  }
9929
- function isIgnoredPath(path2, options) {
9930
- return some(ignoredPaths, (searchPath) => isInPath(path2, searchPath)) || isIgnoredByWatchOptions(path2, options, useCaseSensitiveFileNames2, getCurrentDirectory);
9929
+ function isIgnoredPath(path4, options) {
9930
+ return some(ignoredPaths, (searchPath) => isInPath(path4, searchPath)) || isIgnoredByWatchOptions(path4, options, useCaseSensitiveFileNames2, getCurrentDirectory);
9931
9931
  }
9932
- function isInPath(path2, searchPath) {
9933
- if (path2.includes(searchPath))
9932
+ function isInPath(path4, searchPath) {
9933
+ if (path4.includes(searchPath))
9934
9934
  return true;
9935
9935
  if (useCaseSensitiveFileNames2)
9936
9936
  return false;
9937
- return toCanonicalFilePath(path2).includes(searchPath);
9937
+ return toCanonicalFilePath(path4).includes(searchPath);
9938
9938
  }
9939
9939
  }
9940
9940
  var FileSystemEntryKind = /* @__PURE__ */ ((FileSystemEntryKind2) => {
@@ -10203,7 +10203,7 @@ ${lanes.join(`
10203
10203
  }
10204
10204
  function patchWriteFileEnsuringDirectory(sys2) {
10205
10205
  const originalWriteFile = sys2.writeFile;
10206
- sys2.writeFile = (path2, data, writeBom) => writeFileEnsuringDirectories(path2, data, !!writeBom, (path22, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path22, data2, writeByteOrderMark), (path22) => sys2.createDirectory(path22), (path22) => sys2.directoryExists(path22));
10206
+ sys2.writeFile = (path4, data, writeBom) => writeFileEnsuringDirectories(path4, data, !!writeBom, (path22, data2, writeByteOrderMark) => originalWriteFile.call(sys2, path22, data2, writeByteOrderMark), (path22) => sys2.createDirectory(path22), (path22) => sys2.directoryExists(path22));
10207
10207
  }
10208
10208
  var sys = (() => {
10209
10209
  const byteOrderMarkIndicator = "\uFEFF";
@@ -10239,7 +10239,7 @@ ${lanes.join(`
10239
10239
  getCurrentDirectory,
10240
10240
  fileSystemEntryExists,
10241
10241
  fsSupportsRecursiveFsWatch,
10242
- getAccessibleSortedChildDirectories: (path2) => getAccessibleFileSystemEntries(path2).directories,
10242
+ getAccessibleSortedChildDirectories: (path4) => getAccessibleFileSystemEntries(path4).directories,
10243
10243
  realpath,
10244
10244
  tscWatchFile: process.env.TSC_WATCHFILE,
10245
10245
  useNonPollingWatchers: !!process.env.TSC_NONPOLLING_WATCHER,
@@ -10266,7 +10266,7 @@ ${lanes.join(`
10266
10266
  watchFile: watchFile2,
10267
10267
  watchDirectory,
10268
10268
  preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
10269
- resolvePath: (path2) => _path.resolve(path2),
10269
+ resolvePath: (path4) => _path.resolve(path4),
10270
10270
  fileExists,
10271
10271
  directoryExists,
10272
10272
  getAccessibleFileSystemEntries,
@@ -10301,8 +10301,8 @@ ${lanes.join(`
10301
10301
  }
10302
10302
  return process.memoryUsage().heapUsed;
10303
10303
  },
10304
- getFileSize(path2) {
10305
- const stat = statSync(path2);
10304
+ getFileSize(path4) {
10305
+ const stat = statSync(path4);
10306
10306
  if (stat == null ? undefined : stat.isFile()) {
10307
10307
  return stat.size;
10308
10308
  }
@@ -10345,14 +10345,14 @@ ${lanes.join(`
10345
10345
  }
10346
10346
  };
10347
10347
  return nodeSystem;
10348
- function statSync(path2) {
10348
+ function statSync(path4) {
10349
10349
  try {
10350
- return _fs.statSync(path2, statSyncOptions);
10350
+ return _fs.statSync(path4, statSyncOptions);
10351
10351
  } catch {
10352
10352
  return;
10353
10353
  }
10354
10354
  }
10355
- function enableCPUProfiler(path2, cb) {
10355
+ function enableCPUProfiler(path4, cb) {
10356
10356
  if (activeSession) {
10357
10357
  cb();
10358
10358
  return false;
@@ -10367,7 +10367,7 @@ ${lanes.join(`
10367
10367
  session.post("Profiler.enable", () => {
10368
10368
  session.post("Profiler.start", () => {
10369
10369
  activeSession = session;
10370
- profilePath = path2;
10370
+ profilePath = path4;
10371
10371
  cb();
10372
10372
  });
10373
10373
  });
@@ -10493,9 +10493,9 @@ ${lanes.join(`
10493
10493
  }
10494
10494
  }
10495
10495
  }
10496
- function getAccessibleFileSystemEntries(path2) {
10496
+ function getAccessibleFileSystemEntries(path4) {
10497
10497
  try {
10498
- const entries = _fs.readdirSync(path2 || ".", { withFileTypes: true });
10498
+ const entries = _fs.readdirSync(path4 || ".", { withFileTypes: true });
10499
10499
  const files = [];
10500
10500
  const directories = [];
10501
10501
  for (const dirent of entries) {
@@ -10505,7 +10505,7 @@ ${lanes.join(`
10505
10505
  }
10506
10506
  let stat;
10507
10507
  if (typeof dirent === "string" || dirent.isSymbolicLink()) {
10508
- const name = combinePaths(path2, entry);
10508
+ const name = combinePaths(path4, entry);
10509
10509
  stat = statSync(name);
10510
10510
  if (!stat) {
10511
10511
  continue;
@@ -10526,11 +10526,11 @@ ${lanes.join(`
10526
10526
  return emptyFileSystemEntries;
10527
10527
  }
10528
10528
  }
10529
- function readDirectory(path2, extensions, excludes, includes, depth) {
10530
- return matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
10529
+ function readDirectory(path4, extensions, excludes, includes, depth) {
10530
+ return matchFiles(path4, extensions, excludes, includes, useCaseSensitiveFileNames2, process.cwd(), depth, getAccessibleFileSystemEntries, realpath);
10531
10531
  }
10532
- function fileSystemEntryExists(path2, entryKind) {
10533
- const stat = statSync(path2);
10532
+ function fileSystemEntryExists(path4, entryKind) {
10533
+ const stat = statSync(path4);
10534
10534
  if (!stat) {
10535
10535
  return false;
10536
10536
  }
@@ -10543,39 +10543,39 @@ ${lanes.join(`
10543
10543
  return false;
10544
10544
  }
10545
10545
  }
10546
- function fileExists(path2) {
10547
- return fileSystemEntryExists(path2, 0);
10546
+ function fileExists(path4) {
10547
+ return fileSystemEntryExists(path4, 0);
10548
10548
  }
10549
- function directoryExists(path2) {
10550
- return fileSystemEntryExists(path2, 1);
10549
+ function directoryExists(path4) {
10550
+ return fileSystemEntryExists(path4, 1);
10551
10551
  }
10552
- function getDirectories(path2) {
10553
- return getAccessibleFileSystemEntries(path2).directories.slice();
10552
+ function getDirectories(path4) {
10553
+ return getAccessibleFileSystemEntries(path4).directories.slice();
10554
10554
  }
10555
- function fsRealPathHandlingLongPath(path2) {
10556
- return path2.length < 260 ? _fs.realpathSync.native(path2) : _fs.realpathSync(path2);
10555
+ function fsRealPathHandlingLongPath(path4) {
10556
+ return path4.length < 260 ? _fs.realpathSync.native(path4) : _fs.realpathSync(path4);
10557
10557
  }
10558
- function realpath(path2) {
10558
+ function realpath(path4) {
10559
10559
  try {
10560
- return fsRealpath(path2);
10560
+ return fsRealpath(path4);
10561
10561
  } catch {
10562
- return path2;
10562
+ return path4;
10563
10563
  }
10564
10564
  }
10565
- function getModifiedTime3(path2) {
10565
+ function getModifiedTime3(path4) {
10566
10566
  var _a;
10567
- return (_a = statSync(path2)) == null ? undefined : _a.mtime;
10567
+ return (_a = statSync(path4)) == null ? undefined : _a.mtime;
10568
10568
  }
10569
- function setModifiedTime(path2, time) {
10569
+ function setModifiedTime(path4, time) {
10570
10570
  try {
10571
- _fs.utimesSync(path2, time, time);
10571
+ _fs.utimesSync(path4, time, time);
10572
10572
  } catch {
10573
10573
  return;
10574
10574
  }
10575
10575
  }
10576
- function deleteFile(path2) {
10576
+ function deleteFile(path4) {
10577
10577
  try {
10578
- return _fs.unlinkSync(path2);
10578
+ return _fs.unlinkSync(path4);
10579
10579
  } catch {
10580
10580
  return;
10581
10581
  }
@@ -10612,41 +10612,41 @@ ${lanes.join(`
10612
10612
  function isAnyDirectorySeparator(charCode) {
10613
10613
  return charCode === 47 || charCode === 92;
10614
10614
  }
10615
- function isUrl(path2) {
10616
- return getEncodedRootLength(path2) < 0;
10615
+ function isUrl(path4) {
10616
+ return getEncodedRootLength(path4) < 0;
10617
10617
  }
10618
- function isRootedDiskPath(path2) {
10619
- return getEncodedRootLength(path2) > 0;
10618
+ function isRootedDiskPath(path4) {
10619
+ return getEncodedRootLength(path4) > 0;
10620
10620
  }
10621
- function isDiskPathRoot(path2) {
10622
- const rootLength = getEncodedRootLength(path2);
10623
- return rootLength > 0 && rootLength === path2.length;
10621
+ function isDiskPathRoot(path4) {
10622
+ const rootLength = getEncodedRootLength(path4);
10623
+ return rootLength > 0 && rootLength === path4.length;
10624
10624
  }
10625
- function pathIsAbsolute(path2) {
10626
- return getEncodedRootLength(path2) !== 0;
10625
+ function pathIsAbsolute(path4) {
10626
+ return getEncodedRootLength(path4) !== 0;
10627
10627
  }
10628
- function pathIsRelative(path2) {
10629
- return /^\.\.?(?:$|[\\/])/.test(path2);
10628
+ function pathIsRelative(path4) {
10629
+ return /^\.\.?(?:$|[\\/])/.test(path4);
10630
10630
  }
10631
- function pathIsBareSpecifier(path2) {
10632
- return !pathIsAbsolute(path2) && !pathIsRelative(path2);
10631
+ function pathIsBareSpecifier(path4) {
10632
+ return !pathIsAbsolute(path4) && !pathIsRelative(path4);
10633
10633
  }
10634
10634
  function hasExtension(fileName) {
10635
10635
  return getBaseFileName(fileName).includes(".");
10636
10636
  }
10637
- function fileExtensionIs(path2, extension) {
10638
- return path2.length > extension.length && endsWith(path2, extension);
10637
+ function fileExtensionIs(path4, extension) {
10638
+ return path4.length > extension.length && endsWith(path4, extension);
10639
10639
  }
10640
- function fileExtensionIsOneOf(path2, extensions) {
10640
+ function fileExtensionIsOneOf(path4, extensions) {
10641
10641
  for (const extension of extensions) {
10642
- if (fileExtensionIs(path2, extension)) {
10642
+ if (fileExtensionIs(path4, extension)) {
10643
10643
  return true;
10644
10644
  }
10645
10645
  }
10646
10646
  return false;
10647
10647
  }
10648
- function hasTrailingDirectorySeparator(path2) {
10649
- return path2.length > 0 && isAnyDirectorySeparator(path2.charCodeAt(path2.length - 1));
10648
+ function hasTrailingDirectorySeparator(path4) {
10649
+ return path4.length > 0 && isAnyDirectorySeparator(path4.charCodeAt(path4.length - 1));
10650
10650
  }
10651
10651
  function isVolumeCharacter(charCode) {
10652
10652
  return charCode >= 97 && charCode <= 122 || charCode >= 65 && charCode <= 90;
@@ -10662,113 +10662,113 @@ ${lanes.join(`
10662
10662
  }
10663
10663
  return -1;
10664
10664
  }
10665
- function getEncodedRootLength(path2) {
10666
- if (!path2)
10665
+ function getEncodedRootLength(path4) {
10666
+ if (!path4)
10667
10667
  return 0;
10668
- const ch0 = path2.charCodeAt(0);
10668
+ const ch0 = path4.charCodeAt(0);
10669
10669
  if (ch0 === 47 || ch0 === 92) {
10670
- if (path2.charCodeAt(1) !== ch0)
10670
+ if (path4.charCodeAt(1) !== ch0)
10671
10671
  return 1;
10672
- const p1 = path2.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
10672
+ const p1 = path4.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
10673
10673
  if (p1 < 0)
10674
- return path2.length;
10674
+ return path4.length;
10675
10675
  return p1 + 1;
10676
10676
  }
10677
- if (isVolumeCharacter(ch0) && path2.charCodeAt(1) === 58) {
10678
- const ch2 = path2.charCodeAt(2);
10677
+ if (isVolumeCharacter(ch0) && path4.charCodeAt(1) === 58) {
10678
+ const ch2 = path4.charCodeAt(2);
10679
10679
  if (ch2 === 47 || ch2 === 92)
10680
10680
  return 3;
10681
- if (path2.length === 2)
10681
+ if (path4.length === 2)
10682
10682
  return 2;
10683
10683
  }
10684
- const schemeEnd = path2.indexOf(urlSchemeSeparator);
10684
+ const schemeEnd = path4.indexOf(urlSchemeSeparator);
10685
10685
  if (schemeEnd !== -1) {
10686
10686
  const authorityStart = schemeEnd + urlSchemeSeparator.length;
10687
- const authorityEnd = path2.indexOf(directorySeparator, authorityStart);
10687
+ const authorityEnd = path4.indexOf(directorySeparator, authorityStart);
10688
10688
  if (authorityEnd !== -1) {
10689
- const scheme = path2.slice(0, schemeEnd);
10690
- const authority = path2.slice(authorityStart, authorityEnd);
10691
- if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path2.charCodeAt(authorityEnd + 1))) {
10692
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path2, authorityEnd + 2);
10689
+ const scheme = path4.slice(0, schemeEnd);
10690
+ const authority = path4.slice(authorityStart, authorityEnd);
10691
+ if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path4.charCodeAt(authorityEnd + 1))) {
10692
+ const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path4, authorityEnd + 2);
10693
10693
  if (volumeSeparatorEnd !== -1) {
10694
- if (path2.charCodeAt(volumeSeparatorEnd) === 47) {
10694
+ if (path4.charCodeAt(volumeSeparatorEnd) === 47) {
10695
10695
  return ~(volumeSeparatorEnd + 1);
10696
10696
  }
10697
- if (volumeSeparatorEnd === path2.length) {
10697
+ if (volumeSeparatorEnd === path4.length) {
10698
10698
  return ~volumeSeparatorEnd;
10699
10699
  }
10700
10700
  }
10701
10701
  }
10702
10702
  return ~(authorityEnd + 1);
10703
10703
  }
10704
- return ~path2.length;
10704
+ return ~path4.length;
10705
10705
  }
10706
10706
  return 0;
10707
10707
  }
10708
- function getRootLength(path2) {
10709
- const rootLength = getEncodedRootLength(path2);
10708
+ function getRootLength(path4) {
10709
+ const rootLength = getEncodedRootLength(path4);
10710
10710
  return rootLength < 0 ? ~rootLength : rootLength;
10711
10711
  }
10712
- function getDirectoryPath(path2) {
10713
- path2 = normalizeSlashes(path2);
10714
- const rootLength = getRootLength(path2);
10715
- if (rootLength === path2.length)
10716
- return path2;
10717
- path2 = removeTrailingDirectorySeparator(path2);
10718
- return path2.slice(0, Math.max(rootLength, path2.lastIndexOf(directorySeparator)));
10719
- }
10720
- function getBaseFileName(path2, extensions, ignoreCase) {
10721
- path2 = normalizeSlashes(path2);
10722
- const rootLength = getRootLength(path2);
10723
- if (rootLength === path2.length)
10712
+ function getDirectoryPath(path4) {
10713
+ path4 = normalizeSlashes(path4);
10714
+ const rootLength = getRootLength(path4);
10715
+ if (rootLength === path4.length)
10716
+ return path4;
10717
+ path4 = removeTrailingDirectorySeparator(path4);
10718
+ return path4.slice(0, Math.max(rootLength, path4.lastIndexOf(directorySeparator)));
10719
+ }
10720
+ function getBaseFileName(path4, extensions, ignoreCase) {
10721
+ path4 = normalizeSlashes(path4);
10722
+ const rootLength = getRootLength(path4);
10723
+ if (rootLength === path4.length)
10724
10724
  return "";
10725
- path2 = removeTrailingDirectorySeparator(path2);
10726
- const name = path2.slice(Math.max(getRootLength(path2), path2.lastIndexOf(directorySeparator) + 1));
10725
+ path4 = removeTrailingDirectorySeparator(path4);
10726
+ const name = path4.slice(Math.max(getRootLength(path4), path4.lastIndexOf(directorySeparator) + 1));
10727
10727
  const extension = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(name, extensions, ignoreCase) : undefined;
10728
10728
  return extension ? name.slice(0, name.length - extension.length) : name;
10729
10729
  }
10730
- function tryGetExtensionFromPath(path2, extension, stringEqualityComparer) {
10730
+ function tryGetExtensionFromPath(path4, extension, stringEqualityComparer) {
10731
10731
  if (!startsWith(extension, "."))
10732
10732
  extension = "." + extension;
10733
- if (path2.length >= extension.length && path2.charCodeAt(path2.length - extension.length) === 46) {
10734
- const pathExtension = path2.slice(path2.length - extension.length);
10733
+ if (path4.length >= extension.length && path4.charCodeAt(path4.length - extension.length) === 46) {
10734
+ const pathExtension = path4.slice(path4.length - extension.length);
10735
10735
  if (stringEqualityComparer(pathExtension, extension)) {
10736
10736
  return pathExtension;
10737
10737
  }
10738
10738
  }
10739
10739
  }
10740
- function getAnyExtensionFromPathWorker(path2, extensions, stringEqualityComparer) {
10740
+ function getAnyExtensionFromPathWorker(path4, extensions, stringEqualityComparer) {
10741
10741
  if (typeof extensions === "string") {
10742
- return tryGetExtensionFromPath(path2, extensions, stringEqualityComparer) || "";
10742
+ return tryGetExtensionFromPath(path4, extensions, stringEqualityComparer) || "";
10743
10743
  }
10744
10744
  for (const extension of extensions) {
10745
- const result = tryGetExtensionFromPath(path2, extension, stringEqualityComparer);
10745
+ const result = tryGetExtensionFromPath(path4, extension, stringEqualityComparer);
10746
10746
  if (result)
10747
10747
  return result;
10748
10748
  }
10749
10749
  return "";
10750
10750
  }
10751
- function getAnyExtensionFromPath(path2, extensions, ignoreCase) {
10751
+ function getAnyExtensionFromPath(path4, extensions, ignoreCase) {
10752
10752
  if (extensions) {
10753
- return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path2), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
10753
+ return getAnyExtensionFromPathWorker(removeTrailingDirectorySeparator(path4), extensions, ignoreCase ? equateStringsCaseInsensitive : equateStringsCaseSensitive);
10754
10754
  }
10755
- const baseFileName = getBaseFileName(path2);
10755
+ const baseFileName = getBaseFileName(path4);
10756
10756
  const extensionIndex = baseFileName.lastIndexOf(".");
10757
10757
  if (extensionIndex >= 0) {
10758
10758
  return baseFileName.substring(extensionIndex);
10759
10759
  }
10760
10760
  return "";
10761
10761
  }
10762
- function pathComponents(path2, rootLength) {
10763
- const root = path2.substring(0, rootLength);
10764
- const rest = path2.substring(rootLength).split(directorySeparator);
10762
+ function pathComponents(path4, rootLength) {
10763
+ const root = path4.substring(0, rootLength);
10764
+ const rest = path4.substring(rootLength).split(directorySeparator);
10765
10765
  if (rest.length && !lastOrUndefined(rest))
10766
10766
  rest.pop();
10767
10767
  return [root, ...rest];
10768
10768
  }
10769
- function getPathComponents(path2, currentDirectory = "") {
10770
- path2 = combinePaths(currentDirectory, path2);
10771
- return pathComponents(path2, getRootLength(path2));
10769
+ function getPathComponents(path4, currentDirectory = "") {
10770
+ path4 = combinePaths(currentDirectory, path4);
10771
+ return pathComponents(path4, getRootLength(path4));
10772
10772
  }
10773
10773
  function getPathFromPathComponents(pathComponents2, length2) {
10774
10774
  if (pathComponents2.length === 0)
@@ -10776,8 +10776,8 @@ ${lanes.join(`
10776
10776
  const root = pathComponents2[0] && ensureTrailingDirectorySeparator(pathComponents2[0]);
10777
10777
  return root + pathComponents2.slice(1, length2).join(directorySeparator);
10778
10778
  }
10779
- function normalizeSlashes(path2) {
10780
- return path2.includes("\\") ? path2.replace(backslashRegExp, directorySeparator) : path2;
10779
+ function normalizeSlashes(path4) {
10780
+ return path4.includes("\\") ? path4.replace(backslashRegExp, directorySeparator) : path4;
10781
10781
  }
10782
10782
  function reducePathComponents(components) {
10783
10783
  if (!some(components))
@@ -10802,41 +10802,41 @@ ${lanes.join(`
10802
10802
  }
10803
10803
  return reduced;
10804
10804
  }
10805
- function combinePaths(path2, ...paths) {
10806
- if (path2)
10807
- path2 = normalizeSlashes(path2);
10805
+ function combinePaths(path4, ...paths) {
10806
+ if (path4)
10807
+ path4 = normalizeSlashes(path4);
10808
10808
  for (let relativePath of paths) {
10809
10809
  if (!relativePath)
10810
10810
  continue;
10811
10811
  relativePath = normalizeSlashes(relativePath);
10812
- if (!path2 || getRootLength(relativePath) !== 0) {
10813
- path2 = relativePath;
10812
+ if (!path4 || getRootLength(relativePath) !== 0) {
10813
+ path4 = relativePath;
10814
10814
  } else {
10815
- path2 = ensureTrailingDirectorySeparator(path2) + relativePath;
10815
+ path4 = ensureTrailingDirectorySeparator(path4) + relativePath;
10816
10816
  }
10817
10817
  }
10818
- return path2;
10818
+ return path4;
10819
10819
  }
10820
- function resolvePath(path2, ...paths) {
10821
- return normalizePath(some(paths) ? combinePaths(path2, ...paths) : normalizeSlashes(path2));
10820
+ function resolvePath(path4, ...paths) {
10821
+ return normalizePath(some(paths) ? combinePaths(path4, ...paths) : normalizeSlashes(path4));
10822
10822
  }
10823
- function getNormalizedPathComponents(path2, currentDirectory) {
10824
- return reducePathComponents(getPathComponents(path2, currentDirectory));
10823
+ function getNormalizedPathComponents(path4, currentDirectory) {
10824
+ return reducePathComponents(getPathComponents(path4, currentDirectory));
10825
10825
  }
10826
- function getNormalizedAbsolutePath(path2, currentDirectory) {
10827
- let rootLength = getRootLength(path2);
10826
+ function getNormalizedAbsolutePath(path4, currentDirectory) {
10827
+ let rootLength = getRootLength(path4);
10828
10828
  if (rootLength === 0 && currentDirectory) {
10829
- path2 = combinePaths(currentDirectory, path2);
10830
- rootLength = getRootLength(path2);
10829
+ path4 = combinePaths(currentDirectory, path4);
10830
+ rootLength = getRootLength(path4);
10831
10831
  } else {
10832
- path2 = normalizeSlashes(path2);
10832
+ path4 = normalizeSlashes(path4);
10833
10833
  }
10834
- const simpleNormalized = simpleNormalizePath(path2);
10834
+ const simpleNormalized = simpleNormalizePath(path4);
10835
10835
  if (simpleNormalized !== undefined) {
10836
10836
  return simpleNormalized.length > rootLength ? removeTrailingDirectorySeparator(simpleNormalized) : simpleNormalized;
10837
10837
  }
10838
- const length2 = path2.length;
10839
- const root = path2.substring(0, rootLength);
10838
+ const length2 = path4.length;
10839
+ const root = path4.substring(0, rootLength);
10840
10840
  let normalized;
10841
10841
  let index = rootLength;
10842
10842
  let segmentStart = index;
@@ -10844,23 +10844,23 @@ ${lanes.join(`
10844
10844
  let seenNonDotDotSegment = rootLength !== 0;
10845
10845
  while (index < length2) {
10846
10846
  segmentStart = index;
10847
- let ch = path2.charCodeAt(index);
10847
+ let ch = path4.charCodeAt(index);
10848
10848
  while (ch === 47 && index + 1 < length2) {
10849
10849
  index++;
10850
- ch = path2.charCodeAt(index);
10850
+ ch = path4.charCodeAt(index);
10851
10851
  }
10852
10852
  if (index > segmentStart) {
10853
- normalized ?? (normalized = path2.substring(0, segmentStart - 1));
10853
+ normalized ?? (normalized = path4.substring(0, segmentStart - 1));
10854
10854
  segmentStart = index;
10855
10855
  }
10856
- let segmentEnd = path2.indexOf(directorySeparator, index + 1);
10856
+ let segmentEnd = path4.indexOf(directorySeparator, index + 1);
10857
10857
  if (segmentEnd === -1) {
10858
10858
  segmentEnd = length2;
10859
10859
  }
10860
10860
  const segmentLength = segmentEnd - segmentStart;
10861
- if (segmentLength === 1 && path2.charCodeAt(index) === 46) {
10862
- normalized ?? (normalized = path2.substring(0, normalizedUpTo));
10863
- } else if (segmentLength === 2 && path2.charCodeAt(index) === 46 && path2.charCodeAt(index + 1) === 46) {
10861
+ if (segmentLength === 1 && path4.charCodeAt(index) === 46) {
10862
+ normalized ?? (normalized = path4.substring(0, normalizedUpTo));
10863
+ } else if (segmentLength === 2 && path4.charCodeAt(index) === 46 && path4.charCodeAt(index + 1) === 46) {
10864
10864
  if (!seenNonDotDotSegment) {
10865
10865
  if (normalized !== undefined) {
10866
10866
  normalized += normalized.length === rootLength ? ".." : "/..";
@@ -10869,9 +10869,9 @@ ${lanes.join(`
10869
10869
  }
10870
10870
  } else if (normalized === undefined) {
10871
10871
  if (normalizedUpTo - 2 >= 0) {
10872
- normalized = path2.substring(0, Math.max(rootLength, path2.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
10872
+ normalized = path4.substring(0, Math.max(rootLength, path4.lastIndexOf(directorySeparator, normalizedUpTo - 2)));
10873
10873
  } else {
10874
- normalized = path2.substring(0, normalizedUpTo);
10874
+ normalized = path4.substring(0, normalizedUpTo);
10875
10875
  }
10876
10876
  } else {
10877
10877
  const lastSlash = normalized.lastIndexOf(directorySeparator);
@@ -10889,36 +10889,36 @@ ${lanes.join(`
10889
10889
  normalized += directorySeparator;
10890
10890
  }
10891
10891
  seenNonDotDotSegment = true;
10892
- normalized += path2.substring(segmentStart, segmentEnd);
10892
+ normalized += path4.substring(segmentStart, segmentEnd);
10893
10893
  } else {
10894
10894
  seenNonDotDotSegment = true;
10895
10895
  normalizedUpTo = segmentEnd;
10896
10896
  }
10897
10897
  index = segmentEnd + 1;
10898
10898
  }
10899
- return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path2) : path2);
10899
+ return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path4) : path4);
10900
10900
  }
10901
- function normalizePath(path2) {
10902
- path2 = normalizeSlashes(path2);
10903
- let normalized = simpleNormalizePath(path2);
10901
+ function normalizePath(path4) {
10902
+ path4 = normalizeSlashes(path4);
10903
+ let normalized = simpleNormalizePath(path4);
10904
10904
  if (normalized !== undefined) {
10905
10905
  return normalized;
10906
10906
  }
10907
- normalized = getNormalizedAbsolutePath(path2, "");
10908
- return normalized && hasTrailingDirectorySeparator(path2) ? ensureTrailingDirectorySeparator(normalized) : normalized;
10907
+ normalized = getNormalizedAbsolutePath(path4, "");
10908
+ return normalized && hasTrailingDirectorySeparator(path4) ? ensureTrailingDirectorySeparator(normalized) : normalized;
10909
10909
  }
10910
- function simpleNormalizePath(path2) {
10911
- if (!relativePathSegmentRegExp.test(path2)) {
10912
- return path2;
10910
+ function simpleNormalizePath(path4) {
10911
+ if (!relativePathSegmentRegExp.test(path4)) {
10912
+ return path4;
10913
10913
  }
10914
- let simplified = path2.replace(/\/\.\//g, "/");
10914
+ let simplified = path4.replace(/\/\.\//g, "/");
10915
10915
  if (simplified.startsWith("./")) {
10916
10916
  simplified = simplified.slice(2);
10917
10917
  }
10918
- if (simplified !== path2) {
10919
- path2 = simplified;
10920
- if (!relativePathSegmentRegExp.test(path2)) {
10921
- return path2;
10918
+ if (simplified !== path4) {
10919
+ path4 = simplified;
10920
+ if (!relativePathSegmentRegExp.test(path4)) {
10921
+ return path4;
10922
10922
  }
10923
10923
  }
10924
10924
  return;
@@ -10935,31 +10935,31 @@ ${lanes.join(`
10935
10935
  const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath(fileName) : getNormalizedAbsolutePath(fileName, basePath);
10936
10936
  return getCanonicalFileName(nonCanonicalizedPath);
10937
10937
  }
10938
- function removeTrailingDirectorySeparator(path2) {
10939
- if (hasTrailingDirectorySeparator(path2)) {
10940
- return path2.substr(0, path2.length - 1);
10938
+ function removeTrailingDirectorySeparator(path4) {
10939
+ if (hasTrailingDirectorySeparator(path4)) {
10940
+ return path4.substr(0, path4.length - 1);
10941
10941
  }
10942
- return path2;
10942
+ return path4;
10943
10943
  }
10944
- function ensureTrailingDirectorySeparator(path2) {
10945
- if (!hasTrailingDirectorySeparator(path2)) {
10946
- return path2 + directorySeparator;
10944
+ function ensureTrailingDirectorySeparator(path4) {
10945
+ if (!hasTrailingDirectorySeparator(path4)) {
10946
+ return path4 + directorySeparator;
10947
10947
  }
10948
- return path2;
10948
+ return path4;
10949
10949
  }
10950
- function ensurePathIsNonModuleName(path2) {
10951
- return !pathIsAbsolute(path2) && !pathIsRelative(path2) ? "./" + path2 : path2;
10950
+ function ensurePathIsNonModuleName(path4) {
10951
+ return !pathIsAbsolute(path4) && !pathIsRelative(path4) ? "./" + path4 : path4;
10952
10952
  }
10953
- function changeAnyExtension(path2, ext, extensions, ignoreCase) {
10954
- const pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path2, extensions, ignoreCase) : getAnyExtensionFromPath(path2);
10955
- return pathext ? path2.slice(0, path2.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path2;
10953
+ function changeAnyExtension(path4, ext, extensions, ignoreCase) {
10954
+ const pathext = extensions !== undefined && ignoreCase !== undefined ? getAnyExtensionFromPath(path4, extensions, ignoreCase) : getAnyExtensionFromPath(path4);
10955
+ return pathext ? path4.slice(0, path4.length - pathext.length) + (startsWith(ext, ".") ? ext : "." + ext) : path4;
10956
10956
  }
10957
- function changeFullExtension(path2, newExtension) {
10958
- const declarationExtension = getDeclarationFileExtension(path2);
10957
+ function changeFullExtension(path4, newExtension) {
10958
+ const declarationExtension = getDeclarationFileExtension(path4);
10959
10959
  if (declarationExtension) {
10960
- return path2.slice(0, path2.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
10960
+ return path4.slice(0, path4.length - declarationExtension.length) + (startsWith(newExtension, ".") ? newExtension : "." + newExtension);
10961
10961
  }
10962
- return changeAnyExtension(path2, newExtension);
10962
+ return changeAnyExtension(path4, newExtension);
10963
10963
  }
10964
10964
  var relativePathSegmentRegExp = /\/\/|(?:^|\/)\.\.?(?:$|\/)/;
10965
10965
  function comparePathsWorker(a, b, componentComparer) {
@@ -21674,8 +21674,8 @@ ${lanes.join(`
21674
21674
  function getResolvedExternalModuleName(host, file, referenceFile) {
21675
21675
  return file.moduleName || getExternalModuleNameFromPath(host, file.fileName, referenceFile && referenceFile.fileName);
21676
21676
  }
21677
- function getCanonicalAbsolutePath(host, path2) {
21678
- return host.getCanonicalFileName(getNormalizedAbsolutePath(path2, host.getCurrentDirectory()));
21677
+ function getCanonicalAbsolutePath(host, path4) {
21678
+ return host.getCanonicalFileName(getNormalizedAbsolutePath(path4, host.getCurrentDirectory()));
21679
21679
  }
21680
21680
  function getExternalModuleNameFromDeclaration(host, resolver, declaration) {
21681
21681
  const file = resolver.getExternalModuleFileFromDeclaration(declaration);
@@ -21711,15 +21711,15 @@ ${lanes.join(`
21711
21711
  }
21712
21712
  function getDeclarationEmitOutputFilePathWorker(fileName, options, host) {
21713
21713
  const outputDir = options.declarationDir || options.outDir;
21714
- const path2 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
21715
- const declarationExtension = getDeclarationEmitExtensionForPath(path2);
21716
- return removeFileExtension(path2) + declarationExtension;
21714
+ const path4 = outputDir ? getSourceFilePathInNewDirWorker(fileName, outputDir, host.getCurrentDirectory(), host.getCommonSourceDirectory(), (f) => host.getCanonicalFileName(f)) : fileName;
21715
+ const declarationExtension = getDeclarationEmitExtensionForPath(path4);
21716
+ return removeFileExtension(path4) + declarationExtension;
21717
21717
  }
21718
- function getDeclarationEmitExtensionForPath(path2) {
21719
- return fileExtensionIsOneOf(path2, [".mjs", ".mts"]) ? ".d.mts" : fileExtensionIsOneOf(path2, [".cjs", ".cts"]) ? ".d.cts" : fileExtensionIsOneOf(path2, [".json"]) ? `.d.json.ts` : ".d.ts";
21718
+ function getDeclarationEmitExtensionForPath(path4) {
21719
+ return fileExtensionIsOneOf(path4, [".mjs", ".mts"]) ? ".d.mts" : fileExtensionIsOneOf(path4, [".cjs", ".cts"]) ? ".d.cts" : fileExtensionIsOneOf(path4, [".json"]) ? `.d.json.ts` : ".d.ts";
21720
21720
  }
21721
- function getPossibleOriginalInputExtensionForExtension(path2) {
21722
- return fileExtensionIsOneOf(path2, [".d.mts", ".mjs", ".mts"]) ? [".mts", ".mjs"] : fileExtensionIsOneOf(path2, [".d.cts", ".cjs", ".cts"]) ? [".cts", ".cjs"] : fileExtensionIsOneOf(path2, [`.d.json.ts`]) ? [".json"] : [".tsx", ".ts", ".jsx", ".js"];
21721
+ function getPossibleOriginalInputExtensionForExtension(path4) {
21722
+ return fileExtensionIsOneOf(path4, [".d.mts", ".mjs", ".mts"]) ? [".mts", ".mjs"] : fileExtensionIsOneOf(path4, [".d.cts", ".cjs", ".cts"]) ? [".cts", ".cjs"] : fileExtensionIsOneOf(path4, [`.d.json.ts`]) ? [".json"] : [".tsx", ".ts", ".jsx", ".js"];
21723
21723
  }
21724
21724
  function getPossibleOriginalInputPathWithoutChangingExt(filePath, ignoreCase, outputDir, getCommonSourceDirectory2) {
21725
21725
  return outputDir ? resolvePath(getCommonSourceDirectory2(), getRelativePathFromDirectory(outputDir, filePath, ignoreCase)) : filePath;
@@ -21790,12 +21790,12 @@ ${lanes.join(`
21790
21790
  createDirectory(directoryPath);
21791
21791
  }
21792
21792
  }
21793
- function writeFileEnsuringDirectories(path2, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
21793
+ function writeFileEnsuringDirectories(path4, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
21794
21794
  try {
21795
- writeFile2(path2, data, writeByteOrderMark);
21795
+ writeFile2(path4, data, writeByteOrderMark);
21796
21796
  } catch {
21797
- ensureDirectoriesExist(getDirectoryPath(normalizePath(path2)), createDirectory, directoryExists);
21798
- writeFile2(path2, data, writeByteOrderMark);
21797
+ ensureDirectoriesExist(getDirectoryPath(normalizePath(path4)), createDirectory, directoryExists);
21798
+ writeFile2(path4, data, writeByteOrderMark);
21799
21799
  }
21800
21800
  }
21801
21801
  function getLineOfLocalPosition(sourceFile, pos) {
@@ -22438,21 +22438,21 @@ ${lanes.join(`
22438
22438
  }
22439
22439
  return getStringFromExpandedCharCodes(expandedCharCodes);
22440
22440
  }
22441
- function readJsonOrUndefined(path2, hostOrText) {
22442
- const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path2);
22441
+ function readJsonOrUndefined(path4, hostOrText) {
22442
+ const jsonText = isString(hostOrText) ? hostOrText : hostOrText.readFile(path4);
22443
22443
  if (!jsonText)
22444
22444
  return;
22445
22445
  let result = tryParseJson(jsonText);
22446
22446
  if (result === undefined) {
22447
- const looseResult = parseConfigFileTextToJson(path2, jsonText);
22447
+ const looseResult = parseConfigFileTextToJson(path4, jsonText);
22448
22448
  if (!looseResult.error) {
22449
22449
  result = looseResult.config;
22450
22450
  }
22451
22451
  }
22452
22452
  return result;
22453
22453
  }
22454
- function readJson(path2, host) {
22455
- return readJsonOrUndefined(path2, host) || {};
22454
+ function readJson(path4, host) {
22455
+ return readJsonOrUndefined(path4, host) || {};
22456
22456
  }
22457
22457
  function tryParseJson(text) {
22458
22458
  try {
@@ -23547,7 +23547,7 @@ ${lanes.join(`
23547
23547
  getSymlinkedFiles: () => symlinkedFiles,
23548
23548
  getSymlinkedDirectories: () => symlinkedDirectories,
23549
23549
  getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath,
23550
- setSymlinkedFile: (path2, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map)).set(path2, real),
23550
+ setSymlinkedFile: (path4, real) => (symlinkedFiles || (symlinkedFiles = /* @__PURE__ */ new Map)).set(path4, real),
23551
23551
  setSymlinkedDirectory: (symlink, real) => {
23552
23552
  let symlinkPath = toPath(symlink, cwd, getCanonicalFileName);
23553
23553
  if (!containsIgnoredPath(symlinkPath)) {
@@ -23605,8 +23605,8 @@ ${lanes.join(`
23605
23605
  function stripLeadingDirectorySeparator(s) {
23606
23606
  return isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined;
23607
23607
  }
23608
- function tryRemoveDirectoryPrefix(path2, dirPath, getCanonicalFileName) {
23609
- const withoutPrefix = tryRemovePrefix(path2, dirPath, getCanonicalFileName);
23608
+ function tryRemoveDirectoryPrefix(path4, dirPath, getCanonicalFileName) {
23609
+ const withoutPrefix = tryRemovePrefix(path4, dirPath, getCanonicalFileName);
23610
23610
  return withoutPrefix === undefined ? undefined : stripLeadingDirectorySeparator(withoutPrefix);
23611
23611
  }
23612
23612
  var reservedCharacterPattern = /[^\w\s/]/g;
@@ -23714,25 +23714,25 @@ ${lanes.join(`
23714
23714
  function replaceWildcardCharacter(match, singleAsteriskRegexFragment) {
23715
23715
  return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
23716
23716
  }
23717
- function getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
23718
- path2 = normalizePath(path2);
23717
+ function getFileMatcherPatterns(path4, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
23718
+ path4 = normalizePath(path4);
23719
23719
  currentDirectory = normalizePath(currentDirectory);
23720
- const absolutePath = combinePaths(currentDirectory, path2);
23720
+ const absolutePath = combinePaths(currentDirectory, path4);
23721
23721
  return {
23722
23722
  includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
23723
23723
  includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
23724
23724
  includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
23725
23725
  excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
23726
- basePaths: getBasePaths(path2, includes, useCaseSensitiveFileNames2)
23726
+ basePaths: getBasePaths(path4, includes, useCaseSensitiveFileNames2)
23727
23727
  };
23728
23728
  }
23729
23729
  function getRegexFromPattern(pattern, useCaseSensitiveFileNames2) {
23730
23730
  return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
23731
23731
  }
23732
- function matchFiles(path2, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
23733
- path2 = normalizePath(path2);
23732
+ function matchFiles(path4, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
23733
+ path4 = normalizePath(path4);
23734
23734
  currentDirectory = normalizePath(currentDirectory);
23735
- const patterns = getFileMatcherPatterns(path2, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
23735
+ const patterns = getFileMatcherPatterns(path4, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
23736
23736
  const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
23737
23737
  const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
23738
23738
  const excludeRegex = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, useCaseSensitiveFileNames2);
@@ -23780,17 +23780,17 @@ ${lanes.join(`
23780
23780
  }
23781
23781
  }
23782
23782
  }
23783
- function getBasePaths(path2, includes, useCaseSensitiveFileNames2) {
23784
- const basePaths = [path2];
23783
+ function getBasePaths(path4, includes, useCaseSensitiveFileNames2) {
23784
+ const basePaths = [path4];
23785
23785
  if (includes) {
23786
23786
  const includeBasePaths = [];
23787
23787
  for (const include of includes) {
23788
- const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path2, include));
23788
+ const absolute = isRootedDiskPath(include) ? include : normalizePath(combinePaths(path4, include));
23789
23789
  includeBasePaths.push(getIncludeBasePath(absolute));
23790
23790
  }
23791
23791
  includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
23792
23792
  for (const includeBasePath of includeBasePaths) {
23793
- if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path2, !useCaseSensitiveFileNames2))) {
23793
+ if (every(basePaths, (basePath) => !containsPath(basePath, includeBasePath, path4, !useCaseSensitiveFileNames2))) {
23794
23794
  basePaths.push(includeBasePath);
23795
23795
  }
23796
23796
  }
@@ -23956,27 +23956,27 @@ ${lanes.join(`
23956
23956
  const match = str.match(/\//g);
23957
23957
  return match ? match.length : 0;
23958
23958
  }
23959
- function compareNumberOfDirectorySeparators(path1, path2) {
23960
- return compareValues(numberOfDirectorySeparators(path1), numberOfDirectorySeparators(path2));
23959
+ function compareNumberOfDirectorySeparators(path1, path22) {
23960
+ return compareValues(numberOfDirectorySeparators(path1), numberOfDirectorySeparators(path22));
23961
23961
  }
23962
23962
  var extensionsToRemove = [".d.ts", ".d.mts", ".d.cts", ".mjs", ".mts", ".cjs", ".cts", ".ts", ".js", ".tsx", ".jsx", ".json"];
23963
- function removeFileExtension(path2) {
23963
+ function removeFileExtension(path4) {
23964
23964
  for (const ext of extensionsToRemove) {
23965
- const extensionless = tryRemoveExtension(path2, ext);
23965
+ const extensionless = tryRemoveExtension(path4, ext);
23966
23966
  if (extensionless !== undefined) {
23967
23967
  return extensionless;
23968
23968
  }
23969
23969
  }
23970
- return path2;
23970
+ return path4;
23971
23971
  }
23972
- function tryRemoveExtension(path2, extension) {
23973
- return fileExtensionIs(path2, extension) ? removeExtension(path2, extension) : undefined;
23972
+ function tryRemoveExtension(path4, extension) {
23973
+ return fileExtensionIs(path4, extension) ? removeExtension(path4, extension) : undefined;
23974
23974
  }
23975
- function removeExtension(path2, extension) {
23976
- return path2.substring(0, path2.length - extension.length);
23975
+ function removeExtension(path4, extension) {
23976
+ return path4.substring(0, path4.length - extension.length);
23977
23977
  }
23978
- function changeExtension(path2, newExtension) {
23979
- return changeAnyExtension(path2, newExtension, extensionsToRemove, false);
23978
+ function changeExtension(path4, newExtension) {
23979
+ return changeAnyExtension(path4, newExtension, extensionsToRemove, false);
23980
23980
  }
23981
23981
  function tryParsePattern(pattern) {
23982
23982
  const indexOfStar = pattern.indexOf("*");
@@ -23997,8 +23997,8 @@ ${lanes.join(`
23997
23997
  let matchableStringSet;
23998
23998
  let patterns;
23999
23999
  const pathList = getOwnKeys(paths);
24000
- for (const path2 of pathList) {
24001
- const patternOrStr = tryParsePattern(path2);
24000
+ for (const path4 of pathList) {
24001
+ const patternOrStr = tryParsePattern(path4);
24002
24002
  if (patternOrStr === undefined) {
24003
24003
  continue;
24004
24004
  } else if (typeof patternOrStr === "string") {
@@ -24022,15 +24022,15 @@ ${lanes.join(`
24022
24022
  function resolutionExtensionIsTSOrJson(ext) {
24023
24023
  return extensionIsTS(ext) || ext === ".json";
24024
24024
  }
24025
- function extensionFromPath(path2) {
24026
- const ext = tryGetExtensionFromPath2(path2);
24027
- return ext !== undefined ? ext : Debug.fail(`File ${path2} has unknown extension.`);
24025
+ function extensionFromPath(path4) {
24026
+ const ext = tryGetExtensionFromPath2(path4);
24027
+ return ext !== undefined ? ext : Debug.fail(`File ${path4} has unknown extension.`);
24028
24028
  }
24029
- function isAnySupportedFileExtension(path2) {
24030
- return tryGetExtensionFromPath2(path2) !== undefined;
24029
+ function isAnySupportedFileExtension(path4) {
24030
+ return tryGetExtensionFromPath2(path4) !== undefined;
24031
24031
  }
24032
- function tryGetExtensionFromPath2(path2) {
24033
- return find(extensionsToRemove, (e) => fileExtensionIs(path2, e));
24032
+ function tryGetExtensionFromPath2(path4) {
24033
+ return find(extensionsToRemove, (e) => fileExtensionIs(path4, e));
24034
24034
  }
24035
24035
  function isCheckJsEnabledForFile(sourceFile, compilerOptions) {
24036
24036
  return sourceFile.checkJsDirective ? sourceFile.checkJsDirective.enabled : compilerOptions.checkJs;
@@ -24324,8 +24324,8 @@ ${lanes.join(`
24324
24324
  return false;
24325
24325
  }
24326
24326
  }
24327
- function containsIgnoredPath(path2) {
24328
- return some(ignoredPaths, (p) => path2.includes(p));
24327
+ function containsIgnoredPath(path4) {
24328
+ return some(ignoredPaths, (p) => path4.includes(p));
24329
24329
  }
24330
24330
  function getContainingNodeArray(node) {
24331
24331
  if (!node.parent)
@@ -39621,7 +39621,7 @@ ${lanes.join(`
39621
39621
  const typeReferenceDirectives = context.typeReferenceDirectives;
39622
39622
  const libReferenceDirectives = context.libReferenceDirectives;
39623
39623
  forEach(toArray(entryOrList), (arg) => {
39624
- const { types, lib, path: path2, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
39624
+ const { types, lib, path: path4, ["resolution-mode"]: res, preserve: _preserve } = arg.arguments;
39625
39625
  const preserve = _preserve === "true" ? true : undefined;
39626
39626
  if (arg.arguments["no-default-lib"] === "true") {
39627
39627
  context.hasNoDefaultLib = true;
@@ -39630,8 +39630,8 @@ ${lanes.join(`
39630
39630
  typeReferenceDirectives.push({ pos: types.pos, end: types.end, fileName: types.value, ...parsed ? { resolutionMode: parsed } : {}, ...preserve ? { preserve } : {} });
39631
39631
  } else if (lib) {
39632
39632
  libReferenceDirectives.push({ pos: lib.pos, end: lib.end, fileName: lib.value, ...preserve ? { preserve } : {} });
39633
- } else if (path2) {
39634
- referencedFiles.push({ pos: path2.pos, end: path2.end, fileName: path2.value, ...preserve ? { preserve } : {} });
39633
+ } else if (path4) {
39634
+ referencedFiles.push({ pos: path4.pos, end: path4.end, fileName: path4.value, ...preserve ? { preserve } : {} });
39635
39635
  } else {
39636
39636
  reportDiagnostic(arg.range.pos, arg.range.end - arg.range.pos, Diagnostics.Invalid_reference_directive_syntax);
39637
39637
  }
@@ -41929,10 +41929,10 @@ ${lanes.join(`
41929
41929
  return;
41930
41930
  return specs;
41931
41931
  }
41932
- function matchesSpecs(path2, includeSpecs, excludeSpecs, host) {
41932
+ function matchesSpecs(path4, includeSpecs, excludeSpecs, host) {
41933
41933
  if (!includeSpecs)
41934
41934
  return returnTrue;
41935
- const patterns = getFileMatcherPatterns(path2, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
41935
+ const patterns = getFileMatcherPatterns(path4, excludeSpecs, includeSpecs, host.useCaseSensitiveFileNames, host.getCurrentDirectory());
41936
41936
  const excludeRe = patterns.excludePattern && getRegexFromPattern(patterns.excludePattern, host.useCaseSensitiveFileNames);
41937
41937
  const includeRe = patterns.includeFilePattern && getRegexFromPattern(patterns.includeFilePattern, host.useCaseSensitiveFileNames);
41938
41938
  if (includeRe) {
@@ -42434,7 +42434,7 @@ ${lanes.join(`
42434
42434
  if (ownConfig.raw[propertyName])
42435
42435
  return;
42436
42436
  if (extendsRaw[propertyName]) {
42437
- result[propertyName] = map(extendsRaw[propertyName], (path2) => startsWithConfigDirTemplate(path2) || isRootedDiskPath(path2) ? path2 : combinePaths(relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))), path2));
42437
+ result[propertyName] = map(extendsRaw[propertyName], (path4) => startsWithConfigDirTemplate(path4) || isRootedDiskPath(path4) ? path4 : combinePaths(relativeDifference || (relativeDifference = convertToRelativePath(getDirectoryPath(extendedConfigPath), basePath, createGetCanonicalFileName(host.useCaseSensitiveFileNames))), path4));
42438
42438
  }
42439
42439
  };
42440
42440
  setPropertyInResultIfNotUndefined("include");
@@ -42561,11 +42561,11 @@ ${lanes.join(`
42561
42561
  return;
42562
42562
  }
42563
42563
  function getExtendedConfig(sourceFile, extendedConfigPath, host, resolutionStack, errors, extendedConfigCache, result) {
42564
- const path2 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
42564
+ const path4 = host.useCaseSensitiveFileNames ? extendedConfigPath : toFileNameLowerCase(extendedConfigPath);
42565
42565
  let value;
42566
42566
  let extendedResult;
42567
42567
  let extendedConfig;
42568
- if (extendedConfigCache && (value = extendedConfigCache.get(path2))) {
42568
+ if (extendedConfigCache && (value = extendedConfigCache.get(path4))) {
42569
42569
  ({ extendedResult, extendedConfig } = value);
42570
42570
  } else {
42571
42571
  extendedResult = readJsonConfigFile(extendedConfigPath, (path22) => host.readFile(path22));
@@ -42573,7 +42573,7 @@ ${lanes.join(`
42573
42573
  extendedConfig = parseConfig(undefined, extendedResult, host, getDirectoryPath(extendedConfigPath), getBaseFileName(extendedConfigPath), resolutionStack, errors, extendedConfigCache);
42574
42574
  }
42575
42575
  if (extendedConfigCache) {
42576
- extendedConfigCache.set(path2, { extendedResult, extendedConfig });
42576
+ extendedConfigCache.set(path4, { extendedResult, extendedConfig });
42577
42577
  }
42578
42578
  }
42579
42579
  if (sourceFile) {
@@ -42821,25 +42821,25 @@ ${lanes.join(`
42821
42821
  }
42822
42822
  const match = getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2);
42823
42823
  if (match) {
42824
- const { key, path: path2, flags } = match;
42824
+ const { key, path: path4, flags } = match;
42825
42825
  const existingPath = wildCardKeyToPath.get(key);
42826
42826
  const existingFlags = existingPath !== undefined ? wildcardDirectories[existingPath] : undefined;
42827
42827
  if (existingFlags === undefined || existingFlags < flags) {
42828
- wildcardDirectories[existingPath !== undefined ? existingPath : path2] = flags;
42828
+ wildcardDirectories[existingPath !== undefined ? existingPath : path4] = flags;
42829
42829
  if (existingPath === undefined)
42830
- wildCardKeyToPath.set(key, path2);
42830
+ wildCardKeyToPath.set(key, path4);
42831
42831
  if (flags === 1) {
42832
42832
  recursiveKeys.push(key);
42833
42833
  }
42834
42834
  }
42835
42835
  }
42836
42836
  }
42837
- for (const path2 in wildcardDirectories) {
42838
- if (hasProperty(wildcardDirectories, path2)) {
42837
+ for (const path4 in wildcardDirectories) {
42838
+ if (hasProperty(wildcardDirectories, path4)) {
42839
42839
  for (const recursiveKey of recursiveKeys) {
42840
- const key = toCanonicalKey(path2, useCaseSensitiveFileNames2);
42840
+ const key = toCanonicalKey(path4, useCaseSensitiveFileNames2);
42841
42841
  if (key !== recursiveKey && containsPath(recursiveKey, key, basePath, !useCaseSensitiveFileNames2)) {
42842
- delete wildcardDirectories[path2];
42842
+ delete wildcardDirectories[path4];
42843
42843
  }
42844
42844
  }
42845
42845
  }
@@ -42847,8 +42847,8 @@ ${lanes.join(`
42847
42847
  }
42848
42848
  return wildcardDirectories;
42849
42849
  }
42850
- function toCanonicalKey(path2, useCaseSensitiveFileNames2) {
42851
- return useCaseSensitiveFileNames2 ? path2 : toFileNameLowerCase(path2);
42850
+ function toCanonicalKey(path4, useCaseSensitiveFileNames2) {
42851
+ return useCaseSensitiveFileNames2 ? path4 : toFileNameLowerCase(path4);
42852
42852
  }
42853
42853
  function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames2) {
42854
42854
  const match = wildcardDirectoryPattern.exec(spec);
@@ -42863,10 +42863,10 @@ ${lanes.join(`
42863
42863
  };
42864
42864
  }
42865
42865
  if (isImplicitGlob(spec.substring(spec.lastIndexOf(directorySeparator) + 1))) {
42866
- const path2 = removeTrailingDirectorySeparator(spec);
42866
+ const path4 = removeTrailingDirectorySeparator(spec);
42867
42867
  return {
42868
- key: toCanonicalKey(path2, useCaseSensitiveFileNames2),
42869
- path: path2,
42868
+ key: toCanonicalKey(path4, useCaseSensitiveFileNames2),
42869
+ path: path4,
42870
42870
  flags: 1
42871
42871
  };
42872
42872
  }
@@ -43088,11 +43088,11 @@ ${lanes.join(`
43088
43088
  }
43089
43089
  return;
43090
43090
  }
43091
- const path2 = normalizePath(combinePaths(baseDirectory, fileName));
43091
+ const path4 = normalizePath(combinePaths(baseDirectory, fileName));
43092
43092
  if (state.traceEnabled) {
43093
- trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path2);
43093
+ trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path4);
43094
43094
  }
43095
- return path2;
43095
+ return path4;
43096
43096
  }
43097
43097
  function readPackageJsonTypesFields(jsonContent, baseDirectory, state) {
43098
43098
  return readPackageJsonPathField(jsonContent, "typings", baseDirectory, state) || readPackageJsonPathField(jsonContent, "types", baseDirectory, state);
@@ -43178,9 +43178,9 @@ ${lanes.join(`
43178
43178
  return typeRoots;
43179
43179
  }
43180
43180
  var nodeModulesAtTypes = combinePaths("node_modules", "@types");
43181
- function arePathsEqual(path1, path2, host) {
43181
+ function arePathsEqual(path1, path22, host) {
43182
43182
  const useCaseSensitiveFileNames2 = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
43183
- return comparePaths(path1, path2, !useCaseSensitiveFileNames2) === 0;
43183
+ return comparePaths(path1, path22, !useCaseSensitiveFileNames2) === 0;
43184
43184
  }
43185
43185
  function getOriginalAndResolvedFileName(fileName, host, traceEnabled) {
43186
43186
  const resolvedFileName = realPath(fileName, host, traceEnabled);
@@ -43576,13 +43576,13 @@ ${lanes.join(`
43576
43576
  directoryToModuleNameMap.update(options2);
43577
43577
  }
43578
43578
  function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
43579
- const path2 = toPath(directoryName, currentDirectory, getCanonicalFileName);
43580
- return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path2, () => createModeAwareCache());
43579
+ const path4 = toPath(directoryName, currentDirectory, getCanonicalFileName);
43580
+ return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path4, () => createModeAwareCache());
43581
43581
  }
43582
43582
  function getFromDirectoryCache(name, mode, directoryName, redirectedReference) {
43583
43583
  var _a, _b;
43584
- const path2 = toPath(directoryName, currentDirectory, getCanonicalFileName);
43585
- return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? undefined : _a.get(path2)) == null ? undefined : _b.get(name, mode);
43584
+ const path4 = toPath(directoryName, currentDirectory, getCanonicalFileName);
43585
+ return (_b = (_a = directoryToModuleNameMap.getMapOfCacheRedirects(redirectedReference)) == null ? undefined : _a.get(path4)) == null ? undefined : _b.get(name, mode);
43586
43586
  }
43587
43587
  }
43588
43588
  function createModeAwareCacheKey(specifier, mode) {
@@ -43659,14 +43659,14 @@ ${lanes.join(`
43659
43659
  return directoryPathMap.get(toPath(directory, currentDirectory, getCanonicalFileName));
43660
43660
  }
43661
43661
  function set(directory, result) {
43662
- const path2 = toPath(directory, currentDirectory, getCanonicalFileName);
43663
- if (directoryPathMap.has(path2)) {
43662
+ const path4 = toPath(directory, currentDirectory, getCanonicalFileName);
43663
+ if (directoryPathMap.has(path4)) {
43664
43664
  return;
43665
43665
  }
43666
- directoryPathMap.set(path2, result);
43666
+ directoryPathMap.set(path4, result);
43667
43667
  const resolvedFileName = getResolvedFileName(result);
43668
- const commonPrefix = resolvedFileName && getCommonPrefix(path2, resolvedFileName);
43669
- let current = path2;
43668
+ const commonPrefix = resolvedFileName && getCommonPrefix(path4, resolvedFileName);
43669
+ let current = path4;
43670
43670
  while (current !== commonPrefix) {
43671
43671
  const parent2 = getDirectoryPath(current);
43672
43672
  if (parent2 === current || directoryPathMap.has(parent2)) {
@@ -44080,16 +44080,16 @@ ${lanes.join(`
44080
44080
  const combined = combinePaths(containingDirectory, moduleName);
44081
44081
  const parts = getPathComponents(combined);
44082
44082
  const lastPart = lastOrUndefined(parts);
44083
- const path2 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
44084
- return { path: path2, parts };
44083
+ const path4 = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath(combined)) : normalizePath(combined);
44084
+ return { path: path4, parts };
44085
44085
  }
44086
- function realPath(path2, host, traceEnabled) {
44086
+ function realPath(path4, host, traceEnabled) {
44087
44087
  if (!host.realpath) {
44088
- return path2;
44088
+ return path4;
44089
44089
  }
44090
- const real = normalizePath(host.realpath(path2));
44090
+ const real = normalizePath(host.realpath(path4));
44091
44091
  if (traceEnabled) {
44092
- trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path2, real);
44092
+ trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path4, real);
44093
44093
  }
44094
44094
  return real;
44095
44095
  }
@@ -44129,25 +44129,25 @@ ${lanes.join(`
44129
44129
  return;
44130
44130
  }
44131
44131
  var nodeModulesPathPart = "/node_modules/";
44132
- function pathContainsNodeModules(path2) {
44133
- return path2.includes(nodeModulesPathPart);
44132
+ function pathContainsNodeModules(path4) {
44133
+ return path4.includes(nodeModulesPathPart);
44134
44134
  }
44135
44135
  function parseNodeModuleFromPath(resolved, isFolder) {
44136
- const path2 = normalizePath(resolved);
44137
- const idx = path2.lastIndexOf(nodeModulesPathPart);
44136
+ const path4 = normalizePath(resolved);
44137
+ const idx = path4.lastIndexOf(nodeModulesPathPart);
44138
44138
  if (idx === -1) {
44139
44139
  return;
44140
44140
  }
44141
44141
  const indexAfterNodeModules = idx + nodeModulesPathPart.length;
44142
- let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path2, indexAfterNodeModules, isFolder);
44143
- if (path2.charCodeAt(indexAfterNodeModules) === 64) {
44144
- indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path2, indexAfterPackageName, isFolder);
44142
+ let indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path4, indexAfterNodeModules, isFolder);
44143
+ if (path4.charCodeAt(indexAfterNodeModules) === 64) {
44144
+ indexAfterPackageName = moveToNextDirectorySeparatorIfAvailable(path4, indexAfterPackageName, isFolder);
44145
44145
  }
44146
- return path2.slice(0, indexAfterPackageName);
44146
+ return path4.slice(0, indexAfterPackageName);
44147
44147
  }
44148
- function moveToNextDirectorySeparatorIfAvailable(path2, prevSeparatorIndex, isFolder) {
44149
- const nextSeparatorIndex = path2.indexOf(directorySeparator, prevSeparatorIndex + 1);
44150
- return nextSeparatorIndex === -1 ? isFolder ? path2.length : prevSeparatorIndex : nextSeparatorIndex;
44148
+ function moveToNextDirectorySeparatorIfAvailable(path4, prevSeparatorIndex, isFolder) {
44149
+ const nextSeparatorIndex = path4.indexOf(directorySeparator, prevSeparatorIndex + 1);
44150
+ return nextSeparatorIndex === -1 ? isFolder ? path4.length : prevSeparatorIndex : nextSeparatorIndex;
44151
44151
  }
44152
44152
  function loadModuleFromFileNoPackageId(extensions, candidate, onlyRecordFailures, state) {
44153
44153
  return noPackageId(loadModuleFromFile(extensions, candidate, onlyRecordFailures, state));
@@ -44221,8 +44221,8 @@ ${lanes.join(`
44221
44221
  return extensions & 4 && !isDeclarationFileName(candidate + originalExtension) && tryExtension(`.d${originalExtension}.ts`) || undefined;
44222
44222
  }
44223
44223
  function tryExtension(ext, resolvedUsingTsExtension) {
44224
- const path2 = tryFile(candidate + ext, onlyRecordFailures, state);
44225
- return path2 === undefined ? undefined : { path: path2, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
44224
+ const path4 = tryFile(candidate + ext, onlyRecordFailures, state);
44225
+ return path4 === undefined ? undefined : { path: path4, ext, resolvedUsingTsExtension: !state.candidateIsFromPackageJsonField && resolvedUsingTsExtension };
44226
44226
  }
44227
44227
  }
44228
44228
  function tryFile(fileName, onlyRecordFailures, state) {
@@ -44747,11 +44747,11 @@ ${lanes.join(`
44747
44747
  trace(state.host, Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
44748
44748
  }
44749
44749
  return toSearchResult(undefined);
44750
- function toAbsolutePath(path2) {
44750
+ function toAbsolutePath(path4) {
44751
44751
  var _a2, _b2;
44752
- if (path2 === undefined)
44753
- return path2;
44754
- return getNormalizedAbsolutePath(path2, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? undefined : _b2.call(_a2));
44752
+ if (path4 === undefined)
44753
+ return path4;
44754
+ return getNormalizedAbsolutePath(path4, (_b2 = (_a2 = state.host).getCurrentDirectory) == null ? undefined : _b2.call(_a2));
44755
44755
  }
44756
44756
  function combineDirectoryPath(root, dir) {
44757
44757
  return ensureTrailingDirectorySeparator(combinePaths(root, dir));
@@ -44951,10 +44951,10 @@ ${lanes.join(`
44951
44951
  trace(state.host, Diagnostics.Module_name_0_matched_pattern_1, moduleName, matchedPatternText);
44952
44952
  }
44953
44953
  const resolved = forEach(paths[matchedPatternText], (subst) => {
44954
- const path2 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
44955
- const candidate = normalizePath(combinePaths(baseDirectory, path2));
44954
+ const path4 = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
44955
+ const candidate = normalizePath(combinePaths(baseDirectory, path4));
44956
44956
  if (state.traceEnabled) {
44957
- trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path2);
44957
+ trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path4);
44958
44958
  }
44959
44959
  const extension = tryGetExtensionFromPath2(subst);
44960
44960
  if (extension !== undefined) {
@@ -48306,10 +48306,10 @@ ${lanes.join(`
48306
48306
  return false;
48307
48307
  return comparePaths(a, b, ignoreCase) === 0;
48308
48308
  }
48309
- function countPathComponents(path2) {
48309
+ function countPathComponents(path4) {
48310
48310
  let count = 0;
48311
- for (let i = startsWith(path2, "./") ? 2 : 0;i < path2.length; i++) {
48312
- if (path2.charCodeAt(i) === 47)
48311
+ for (let i = startsWith(path4, "./") ? 2 : 0;i < path4.length; i++) {
48312
+ if (path4.charCodeAt(i) === 47)
48313
48313
  count++;
48314
48314
  }
48315
48315
  return count;
@@ -48408,17 +48408,17 @@ ${lanes.join(`
48408
48408
  }
48409
48409
  const allFileNames = /* @__PURE__ */ new Map;
48410
48410
  let importedFileFromNodeModules = false;
48411
- forEachFileNameOfModule(info.importingSourceFileName, importedFileName, host, true, (path2, isRedirect) => {
48412
- const isInNodeModules = pathContainsNodeModules(path2);
48413
- allFileNames.set(path2, { path: info.getCanonicalFileName(path2), isRedirect, isInNodeModules });
48411
+ forEachFileNameOfModule(info.importingSourceFileName, importedFileName, host, true, (path4, isRedirect) => {
48412
+ const isInNodeModules = pathContainsNodeModules(path4);
48413
+ allFileNames.set(path4, { path: info.getCanonicalFileName(path4), isRedirect, isInNodeModules });
48414
48414
  importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
48415
48415
  });
48416
48416
  const sortedPaths = [];
48417
48417
  for (let directory = info.canonicalSourceDirectory;allFileNames.size !== 0; ) {
48418
48418
  const directoryStart = ensureTrailingDirectorySeparator(directory);
48419
48419
  let pathsInDirectory;
48420
- allFileNames.forEach(({ path: path2, isRedirect, isInNodeModules }, fileName) => {
48421
- if (startsWith(path2, directoryStart)) {
48420
+ allFileNames.forEach(({ path: path4, isRedirect, isInNodeModules }, fileName) => {
48421
+ if (startsWith(path4, directoryStart)) {
48422
48422
  (pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName, isRedirect, isInNodeModules });
48423
48423
  allFileNames.delete(fileName);
48424
48424
  }
@@ -48641,17 +48641,17 @@ ${lanes.join(`
48641
48641
  }
48642
48642
  return processEnding(shortest, allowedEndings, compilerOptions);
48643
48643
  }
48644
- function tryGetModuleNameAsNodeModule({ path: path2, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
48644
+ function tryGetModuleNameAsNodeModule({ path: path4, isRedirect }, { getCanonicalFileName, canonicalSourceDirectory }, importingSourceFile, host, options, userPreferences, packageNameOnly, overrideMode) {
48645
48645
  if (!host.fileExists || !host.readFile) {
48646
48646
  return;
48647
48647
  }
48648
- const parts = getNodeModulePathParts(path2);
48648
+ const parts = getNodeModulePathParts(path4);
48649
48649
  if (!parts) {
48650
48650
  return;
48651
48651
  }
48652
48652
  const preferences = getModuleSpecifierPreferences(userPreferences, host, options, importingSourceFile);
48653
48653
  const allowedEndings = preferences.getAllowedEndingsInPreferredOrder();
48654
- let moduleSpecifier = path2;
48654
+ let moduleSpecifier = path4;
48655
48655
  let isPackageRootPath = false;
48656
48656
  if (!packageNameOnly) {
48657
48657
  let packageRootIndex = parts.packageRootIndex;
@@ -48673,7 +48673,7 @@ ${lanes.join(`
48673
48673
  }
48674
48674
  if (!moduleFileName)
48675
48675
  moduleFileName = moduleFileToTry;
48676
- packageRootIndex = path2.indexOf(directorySeparator, packageRootIndex + 1);
48676
+ packageRootIndex = path4.indexOf(directorySeparator, packageRootIndex + 1);
48677
48677
  if (packageRootIndex === -1) {
48678
48678
  moduleSpecifier = processEnding(moduleFileName, allowedEndings, options, host);
48679
48679
  break;
@@ -48693,9 +48693,9 @@ ${lanes.join(`
48693
48693
  return getEmitModuleResolutionKind(options) === 1 && packageName === nodeModulesDirectoryName ? undefined : packageName;
48694
48694
  function tryDirectoryWithPackageJson(packageRootIndex) {
48695
48695
  var _a, _b;
48696
- const packageRootPath = path2.substring(0, packageRootIndex);
48696
+ const packageRootPath = path4.substring(0, packageRootIndex);
48697
48697
  const packageJsonPath = combinePaths(packageRootPath, "package.json");
48698
- let moduleFileToTry = path2;
48698
+ let moduleFileToTry = path4;
48699
48699
  let maybeBlockedByTypesVersions = false;
48700
48700
  const cachedPackageJson = (_b = (_a = host.getPackageJsonInfoCache) == null ? undefined : _a.call(host)) == null ? undefined : _b.getPackageJsonInfo(packageJsonPath);
48701
48701
  if (isPackageJsonInfo(cachedPackageJson) || cachedPackageJson === undefined && host.fileExists(packageJsonPath)) {
@@ -48705,17 +48705,17 @@ ${lanes.join(`
48705
48705
  const nodeModulesDirectoryName2 = packageRootPath.substring(parts.topLevelPackageNameIndex + 1);
48706
48706
  const packageName2 = getPackageNameFromTypesPackageName(nodeModulesDirectoryName2);
48707
48707
  const conditions = getConditions(options, importMode);
48708
- const fromExports = (packageJsonContent == null ? undefined : packageJsonContent.exports) ? tryGetModuleNameFromExports(options, host, path2, packageRootPath, packageName2, packageJsonContent.exports, conditions) : undefined;
48708
+ const fromExports = (packageJsonContent == null ? undefined : packageJsonContent.exports) ? tryGetModuleNameFromExports(options, host, path4, packageRootPath, packageName2, packageJsonContent.exports, conditions) : undefined;
48709
48709
  if (fromExports) {
48710
48710
  return { ...fromExports, verbatimFromExports: true };
48711
48711
  }
48712
48712
  if (packageJsonContent == null ? undefined : packageJsonContent.exports) {
48713
- return { moduleFileToTry: path2, blockedByExports: true };
48713
+ return { moduleFileToTry: path4, blockedByExports: true };
48714
48714
  }
48715
48715
  }
48716
48716
  const versionPaths = (packageJsonContent == null ? undefined : packageJsonContent.typesVersions) ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : undefined;
48717
48717
  if (versionPaths) {
48718
- const subModuleName = path2.slice(packageRootPath.length + 1);
48718
+ const subModuleName = path4.slice(packageRootPath.length + 1);
48719
48719
  const fromPaths = tryGetModuleNameFromPaths(subModuleName, versionPaths.paths, allowedEndings, packageRootPath, getCanonicalFileName, host, options);
48720
48720
  if (fromPaths === undefined) {
48721
48721
  maybeBlockedByTypesVersions = true;
@@ -48742,20 +48742,20 @@ ${lanes.join(`
48742
48742
  return { moduleFileToTry };
48743
48743
  }
48744
48744
  }
48745
- function tryGetAnyFileFromPath(host, path2) {
48745
+ function tryGetAnyFileFromPath(host, path4) {
48746
48746
  if (!host.fileExists)
48747
48747
  return;
48748
48748
  const extensions = flatten(getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 }]));
48749
48749
  for (const e of extensions) {
48750
- const fullPath = path2 + e;
48750
+ const fullPath = path4 + e;
48751
48751
  if (host.fileExists(fullPath)) {
48752
48752
  return fullPath;
48753
48753
  }
48754
48754
  }
48755
48755
  }
48756
- function getPathsRelativeToRootDirs(path2, rootDirs, getCanonicalFileName) {
48756
+ function getPathsRelativeToRootDirs(path4, rootDirs, getCanonicalFileName) {
48757
48757
  return mapDefined(rootDirs, (rootDir) => {
48758
- const relativePath = getRelativePathIfInSameVolume(path2, rootDir, getCanonicalFileName);
48758
+ const relativePath = getRelativePathIfInSameVolume(path4, rootDir, getCanonicalFileName);
48759
48759
  return relativePath !== undefined && isPathRelativeToParent(relativePath) ? undefined : relativePath;
48760
48760
  });
48761
48761
  }
@@ -48832,12 +48832,12 @@ ${lanes.join(`
48832
48832
  return;
48833
48833
  }
48834
48834
  }
48835
- function getRelativePathIfInSameVolume(path2, directoryPath, getCanonicalFileName) {
48836
- const relativePath = getRelativePathToDirectoryOrUrl(directoryPath, path2, directoryPath, getCanonicalFileName, false);
48835
+ function getRelativePathIfInSameVolume(path4, directoryPath, getCanonicalFileName) {
48836
+ const relativePath = getRelativePathToDirectoryOrUrl(directoryPath, path4, directoryPath, getCanonicalFileName, false);
48837
48837
  return isRootedDiskPath(relativePath) ? undefined : relativePath;
48838
48838
  }
48839
- function isPathRelativeToParent(path2) {
48840
- return startsWith(path2, "..");
48839
+ function isPathRelativeToParent(path4) {
48840
+ return startsWith(path4, "..");
48841
48841
  }
48842
48842
  function getDefaultResolutionModeForFile(file, host, compilerOptions) {
48843
48843
  return isFullSourceFile(file) ? host.getDefaultResolutionModeForFile(file) : getDefaultResolutionModeForFileWorker(file, compilerOptions);
@@ -60268,10 +60268,10 @@ ${lanes.join(`
60268
60268
  const text = identifier.escapedText;
60269
60269
  if (text) {
60270
60270
  const parentSymbol = name.kind === 167 ? getUnresolvedSymbolForEntityName(name.left) : name.kind === 212 ? getUnresolvedSymbolForEntityName(name.expression) : undefined;
60271
- const path2 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text;
60272
- let result = unresolvedSymbols.get(path2);
60271
+ const path4 = parentSymbol ? `${getSymbolPath(parentSymbol)}.${text}` : text;
60272
+ let result = unresolvedSymbols.get(path4);
60273
60273
  if (!result) {
60274
- unresolvedSymbols.set(path2, result = createSymbol(524288, text, 1048576));
60274
+ unresolvedSymbols.set(path4, result = createSymbol(524288, text, 1048576));
60275
60275
  result.parent = parentSymbol;
60276
60276
  result.links.declaredType = unresolvedType;
60277
60277
  }
@@ -64239,24 +64239,24 @@ ${lanes.join(`
64239
64239
  }
64240
64240
  return;
64241
64241
  }
64242
- let path2 = "";
64242
+ let path4 = "";
64243
64243
  const secondaryRootErrors = [];
64244
64244
  while (stack.length) {
64245
64245
  const [msg, ...args] = stack.pop();
64246
64246
  switch (msg.code) {
64247
64247
  case Diagnostics.Types_of_property_0_are_incompatible.code: {
64248
- if (path2.indexOf("new ") === 0) {
64249
- path2 = `(${path2})`;
64248
+ if (path4.indexOf("new ") === 0) {
64249
+ path4 = `(${path4})`;
64250
64250
  }
64251
64251
  const str = "" + args[0];
64252
- if (path2.length === 0) {
64253
- path2 = `${str}`;
64252
+ if (path4.length === 0) {
64253
+ path4 = `${str}`;
64254
64254
  } else if (isIdentifierText(str, getEmitScriptTarget(compilerOptions))) {
64255
- path2 = `${path2}.${str}`;
64255
+ path4 = `${path4}.${str}`;
64256
64256
  } else if (str[0] === "[" && str[str.length - 1] === "]") {
64257
- path2 = `${path2}${str}`;
64257
+ path4 = `${path4}${str}`;
64258
64258
  } else {
64259
- path2 = `${path2}[${str}]`;
64259
+ path4 = `${path4}[${str}]`;
64260
64260
  }
64261
64261
  break;
64262
64262
  }
@@ -64264,7 +64264,7 @@ ${lanes.join(`
64264
64264
  case Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible.code:
64265
64265
  case Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code:
64266
64266
  case Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code: {
64267
- if (path2.length === 0) {
64267
+ if (path4.length === 0) {
64268
64268
  let mappedMsg = msg;
64269
64269
  if (msg.code === Diagnostics.Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code) {
64270
64270
  mappedMsg = Diagnostics.Call_signature_return_types_0_and_1_are_incompatible;
@@ -64275,7 +64275,7 @@ ${lanes.join(`
64275
64275
  } else {
64276
64276
  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 " : "";
64277
64277
  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 ? "" : "...";
64278
- path2 = `${prefix}${path2}(${params})`;
64278
+ path4 = `${prefix}${path4}(${params})`;
64279
64279
  }
64280
64280
  break;
64281
64281
  }
@@ -64291,8 +64291,8 @@ ${lanes.join(`
64291
64291
  return Debug.fail(`Unhandled Diagnostic: ${msg.code}`);
64292
64292
  }
64293
64293
  }
64294
- if (path2) {
64295
- reportError(path2[path2.length - 1] === ")" ? Diagnostics.The_types_returned_by_0_are_incompatible_between_these_types : Diagnostics.The_types_of_0_are_incompatible_between_these_types, path2);
64294
+ if (path4) {
64295
+ reportError(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, path4);
64296
64296
  } else {
64297
64297
  secondaryRootErrors.shift();
64298
64298
  }
@@ -104230,9 +104230,9 @@ ${lanes.join(`
104230
104230
  function createAddOutput() {
104231
104231
  let outputs;
104232
104232
  return { addOutput, getOutputs };
104233
- function addOutput(path2) {
104234
- if (path2) {
104235
- (outputs || (outputs = [])).push(path2);
104233
+ function addOutput(path4) {
104234
+ if (path4) {
104235
+ (outputs || (outputs = [])).push(path4);
104236
104236
  }
104237
104237
  }
104238
104238
  function getOutputs() {
@@ -108572,7 +108572,7 @@ ${lanes.join(`
108572
108572
  return {
108573
108573
  useCaseSensitiveFileNames: useCaseSensitiveFileNames2,
108574
108574
  fileExists,
108575
- readFile: (path2, encoding) => host.readFile(path2, encoding),
108575
+ readFile: (path4, encoding) => host.readFile(path4, encoding),
108576
108576
  directoryExists: host.directoryExists && directoryExists,
108577
108577
  getDirectories,
108578
108578
  readDirectory,
@@ -108589,8 +108589,8 @@ ${lanes.join(`
108589
108589
  function getCachedFileSystemEntries(rootDirPath) {
108590
108590
  return cachedReadDirectoryResult.get(ensureTrailingDirectorySeparator(rootDirPath));
108591
108591
  }
108592
- function getCachedFileSystemEntriesForBaseDir(path2) {
108593
- const entries = getCachedFileSystemEntries(getDirectoryPath(path2));
108592
+ function getCachedFileSystemEntriesForBaseDir(path4) {
108593
+ const entries = getCachedFileSystemEntries(getDirectoryPath(path4));
108594
108594
  if (!entries) {
108595
108595
  return entries;
108596
108596
  }
@@ -108637,25 +108637,25 @@ ${lanes.join(`
108637
108637
  return index >= 0;
108638
108638
  }
108639
108639
  function writeFile2(fileName, data, writeByteOrderMark) {
108640
- const path2 = toPath3(fileName);
108641
- const result = getCachedFileSystemEntriesForBaseDir(path2);
108640
+ const path4 = toPath3(fileName);
108641
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
108642
108642
  if (result) {
108643
108643
  updateFilesOfFileSystemEntry(result, getBaseNameOfFileName(fileName), true);
108644
108644
  }
108645
108645
  return host.writeFile(fileName, data, writeByteOrderMark);
108646
108646
  }
108647
108647
  function fileExists(fileName) {
108648
- const path2 = toPath3(fileName);
108649
- const result = getCachedFileSystemEntriesForBaseDir(path2);
108648
+ const path4 = toPath3(fileName);
108649
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
108650
108650
  return result && hasEntry(result.sortedAndCanonicalizedFiles, getCanonicalFileName(getBaseNameOfFileName(fileName))) || host.fileExists(fileName);
108651
108651
  }
108652
108652
  function directoryExists(dirPath) {
108653
- const path2 = toPath3(dirPath);
108654
- return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path2)) || host.directoryExists(dirPath);
108653
+ const path4 = toPath3(dirPath);
108654
+ return cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(path4)) || host.directoryExists(dirPath);
108655
108655
  }
108656
108656
  function createDirectory(dirPath) {
108657
- const path2 = toPath3(dirPath);
108658
- const result = getCachedFileSystemEntriesForBaseDir(path2);
108657
+ const path4 = toPath3(dirPath);
108658
+ const result = getCachedFileSystemEntriesForBaseDir(path4);
108659
108659
  if (result) {
108660
108660
  const baseName = getBaseNameOfFileName(dirPath);
108661
108661
  const canonicalizedBaseName = getCanonicalFileName(baseName);
@@ -108683,21 +108683,21 @@ ${lanes.join(`
108683
108683
  }
108684
108684
  return host.readDirectory(rootDir, extensions, excludes, includes, depth);
108685
108685
  function getFileSystemEntries(dir) {
108686
- const path2 = toPath3(dir);
108687
- if (path2 === rootDirPath) {
108688
- return rootResult || getFileSystemEntriesFromHost(dir, path2);
108686
+ const path4 = toPath3(dir);
108687
+ if (path4 === rootDirPath) {
108688
+ return rootResult || getFileSystemEntriesFromHost(dir, path4);
108689
108689
  }
108690
- const result = tryReadDirectory2(dir, path2);
108691
- return result !== undefined ? result || getFileSystemEntriesFromHost(dir, path2) : emptyFileSystemEntries;
108690
+ const result = tryReadDirectory2(dir, path4);
108691
+ return result !== undefined ? result || getFileSystemEntriesFromHost(dir, path4) : emptyFileSystemEntries;
108692
108692
  }
108693
- function getFileSystemEntriesFromHost(dir, path2) {
108694
- if (rootSymLinkResult && path2 === rootDirPath)
108693
+ function getFileSystemEntriesFromHost(dir, path4) {
108694
+ if (rootSymLinkResult && path4 === rootDirPath)
108695
108695
  return rootSymLinkResult;
108696
108696
  const result = {
108697
108697
  files: map(host.readDirectory(dir, undefined, undefined, ["*.*"]), getBaseNameOfFileName) || emptyArray,
108698
108698
  directories: host.getDirectories(dir) || emptyArray
108699
108699
  };
108700
- if (path2 === rootDirPath)
108700
+ if (path4 === rootDirPath)
108701
108701
  rootSymLinkResult = result;
108702
108702
  return result;
108703
108703
  }
@@ -109107,12 +109107,12 @@ ${lanes.join(`
109107
109107
  return getDirectoryPath(normalizePath(system.getExecutingFilePath()));
109108
109108
  }
109109
109109
  const newLine = getNewLineCharacter(options);
109110
- const realpath = system.realpath && ((path2) => system.realpath(path2));
109110
+ const realpath = system.realpath && ((path4) => system.realpath(path4));
109111
109111
  const compilerHost = {
109112
109112
  getSourceFile: createGetSourceFile((fileName) => compilerHost.readFile(fileName), setParentNodes),
109113
109113
  getDefaultLibLocation,
109114
109114
  getDefaultLibFileName: (options2) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options2)),
109115
- writeFile: createWriteFileMeasuringIO((path2, data, writeByteOrderMark) => system.writeFile(path2, data, writeByteOrderMark), (path2) => (compilerHost.createDirectory || system.createDirectory)(path2), (path2) => directoryExists(path2)),
109115
+ writeFile: createWriteFileMeasuringIO((path4, data, writeByteOrderMark) => system.writeFile(path4, data, writeByteOrderMark), (path4) => (compilerHost.createDirectory || system.createDirectory)(path4), (path4) => directoryExists(path4)),
109116
109116
  getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
109117
109117
  useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,
109118
109118
  getCanonicalFileName,
@@ -109122,9 +109122,9 @@ ${lanes.join(`
109122
109122
  trace: (s) => system.write(s + newLine),
109123
109123
  directoryExists: (directoryName) => system.directoryExists(directoryName),
109124
109124
  getEnvironmentVariable: (name) => system.getEnvironmentVariable ? system.getEnvironmentVariable(name) : "",
109125
- getDirectories: (path2) => system.getDirectories(path2),
109125
+ getDirectories: (path4) => system.getDirectories(path4),
109126
109126
  realpath,
109127
- readDirectory: (path2, extensions, include, exclude, depth) => system.readDirectory(path2, extensions, include, exclude, depth),
109127
+ readDirectory: (path4, extensions, include, exclude, depth) => system.readDirectory(path4, extensions, include, exclude, depth),
109128
109128
  createDirectory: (d) => system.createDirectory(d),
109129
109129
  createHash: maybeBind(system, system.createHash)
109130
109130
  };
@@ -109522,13 +109522,13 @@ ${lanes.join(`
109522
109522
  }
109523
109523
  function getLibraryNameFromLibFileName(libFileName) {
109524
109524
  const components = libFileName.split(".");
109525
- let path2 = components[1];
109525
+ let path4 = components[1];
109526
109526
  let i = 2;
109527
109527
  while (components[i] && components[i] !== "d") {
109528
- path2 += (i === 2 ? "/" : "-") + components[i];
109528
+ path4 += (i === 2 ? "/" : "-") + components[i];
109529
109529
  i++;
109530
109530
  }
109531
- return "@typescript/lib-" + path2;
109531
+ return "@typescript/lib-" + path4;
109532
109532
  }
109533
109533
  function isReferencedFile(reason) {
109534
109534
  switch (reason == null ? undefined : reason.kind) {
@@ -110435,18 +110435,18 @@ ${lanes.join(`
110435
110435
  filesByName.set(newSourceFile.path, newSourceFile);
110436
110436
  }
110437
110437
  const oldFilesByNameMap = oldProgram.getFilesByNameMap();
110438
- oldFilesByNameMap.forEach((oldFile, path2) => {
110438
+ oldFilesByNameMap.forEach((oldFile, path4) => {
110439
110439
  if (!oldFile) {
110440
- filesByName.set(path2, oldFile);
110440
+ filesByName.set(path4, oldFile);
110441
110441
  return;
110442
110442
  }
110443
- if (oldFile.path === path2) {
110443
+ if (oldFile.path === path4) {
110444
110444
  if (oldProgram.isSourceFileFromExternalLibrary(oldFile)) {
110445
110445
  sourceFilesFoundSearchingNodeModules.set(oldFile.path, true);
110446
110446
  }
110447
110447
  return;
110448
110448
  }
110449
- filesByName.set(path2, filesByName.get(oldFile.path));
110449
+ filesByName.set(path4, filesByName.get(oldFile.path));
110450
110450
  });
110451
110451
  const isConfigIdentical = oldOptions.configFile && oldOptions.configFile === options.configFile || !oldOptions.configFile && !options.configFile && !optionsHaveChanges(oldOptions, options, optionDeclarations);
110452
110452
  programDiagnostics.reuseStateFromOldProgram(oldProgram.getProgramDiagnosticsContainer(), isConfigIdentical);
@@ -110484,10 +110484,10 @@ ${lanes.join(`
110484
110484
  getModeForResolutionAtIndex: getModeForResolutionAtIndex2,
110485
110485
  readFile: (f) => host.readFile(f),
110486
110486
  fileExists: (f) => {
110487
- const path2 = toPath3(f);
110488
- if (getSourceFileByPath(path2))
110487
+ const path4 = toPath3(f);
110488
+ if (getSourceFileByPath(path4))
110489
110489
  return true;
110490
- if (missingFileNames.has(path2))
110490
+ if (missingFileNames.has(path4))
110491
110491
  return false;
110492
110492
  return host.fileExists(f);
110493
110493
  },
@@ -110578,8 +110578,8 @@ ${lanes.join(`
110578
110578
  function getSourceFile(fileName) {
110579
110579
  return getSourceFileByPath(toPath3(fileName));
110580
110580
  }
110581
- function getSourceFileByPath(path2) {
110582
- return filesByName.get(path2) || undefined;
110581
+ function getSourceFileByPath(path4) {
110582
+ return filesByName.get(path4) || undefined;
110583
110583
  }
110584
110584
  function getDiagnosticsHelper(sourceFile, getDiagnostics2, cancellationToken) {
110585
110585
  if (sourceFile) {
@@ -111108,16 +111108,16 @@ ${lanes.join(`
111108
111108
  addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName, existingFile.fileName]);
111109
111109
  }
111110
111110
  }
111111
- function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path2, resolvedPath, originalFileName, sourceFileOptions) {
111111
+ function createRedirectedSourceFile(redirectTarget, unredirected, fileName, path4, resolvedPath, originalFileName, sourceFileOptions) {
111112
111112
  var _a2;
111113
111113
  const redirect = parseNodeFactory.createRedirectedSourceFile({ redirectTarget, unredirected });
111114
111114
  redirect.fileName = fileName;
111115
- redirect.path = path2;
111115
+ redirect.path = path4;
111116
111116
  redirect.resolvedPath = resolvedPath;
111117
111117
  redirect.originalFileName = originalFileName;
111118
111118
  redirect.packageJsonLocations = ((_a2 = sourceFileOptions.packageJsonLocations) == null ? undefined : _a2.length) ? sourceFileOptions.packageJsonLocations : undefined;
111119
111119
  redirect.packageJsonScope = sourceFileOptions.packageJsonScope;
111120
- sourceFilesFoundSearchingNodeModules.set(path2, currentNodeModulesDepth > 0);
111120
+ sourceFilesFoundSearchingNodeModules.set(path4, currentNodeModulesDepth > 0);
111121
111121
  return redirect;
111122
111122
  }
111123
111123
  function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
@@ -111139,24 +111139,24 @@ ${lanes.join(`
111139
111139
  }
111140
111140
  function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
111141
111141
  var _a2, _b2;
111142
- const path2 = toPath3(fileName);
111142
+ const path4 = toPath3(fileName);
111143
111143
  if (useSourceOfProjectReferenceRedirect) {
111144
- let source = getRedirectFromOutput(path2);
111144
+ let source = getRedirectFromOutput(path4);
111145
111145
  if (!source && host.realpath && options.preserveSymlinks && isDeclarationFileName(fileName) && fileName.includes(nodeModulesPathPart)) {
111146
111146
  const realPath2 = toPath3(host.realpath(fileName));
111147
- if (realPath2 !== path2)
111147
+ if (realPath2 !== path4)
111148
111148
  source = getRedirectFromOutput(realPath2);
111149
111149
  }
111150
111150
  if (source == null ? undefined : source.source) {
111151
111151
  const file2 = findSourceFile(source.source, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
111152
111152
  if (file2)
111153
- addFileToFilesByName(file2, path2, fileName, undefined);
111153
+ addFileToFilesByName(file2, path4, fileName, undefined);
111154
111154
  return file2;
111155
111155
  }
111156
111156
  }
111157
111157
  const originalFileName = fileName;
111158
- if (filesByName.has(path2)) {
111159
- const file2 = filesByName.get(path2);
111158
+ if (filesByName.has(path4)) {
111159
+ const file2 = filesByName.get(path4);
111160
111160
  const addedReason = addFileIncludeReason(file2 || undefined, reason, true);
111161
111161
  if (file2 && addedReason && !(options.forceConsistentCasingInFileNames === false)) {
111162
111162
  const checkedName = file2.fileName;
@@ -111206,30 +111206,30 @@ ${lanes.join(`
111206
111206
  const packageIdKey = packageIdToString(packageId);
111207
111207
  const fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
111208
111208
  if (fileFromPackageId) {
111209
- const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path2, toPath3(fileName), originalFileName, sourceFileOptions);
111209
+ const dupFile = createRedirectedSourceFile(fileFromPackageId, file, fileName, path4, toPath3(fileName), originalFileName, sourceFileOptions);
111210
111210
  redirectTargetsMap.add(fileFromPackageId.path, fileName);
111211
- addFileToFilesByName(dupFile, path2, fileName, redirectedPath);
111211
+ addFileToFilesByName(dupFile, path4, fileName, redirectedPath);
111212
111212
  addFileIncludeReason(dupFile, reason, false);
111213
- sourceFileToPackageName.set(path2, packageIdToPackageName(packageId));
111213
+ sourceFileToPackageName.set(path4, packageIdToPackageName(packageId));
111214
111214
  processingOtherFiles.push(dupFile);
111215
111215
  return dupFile;
111216
111216
  } else if (file) {
111217
111217
  packageIdToSourceFile.set(packageIdKey, file);
111218
- sourceFileToPackageName.set(path2, packageIdToPackageName(packageId));
111218
+ sourceFileToPackageName.set(path4, packageIdToPackageName(packageId));
111219
111219
  }
111220
111220
  }
111221
- addFileToFilesByName(file, path2, fileName, redirectedPath);
111221
+ addFileToFilesByName(file, path4, fileName, redirectedPath);
111222
111222
  if (file) {
111223
- sourceFilesFoundSearchingNodeModules.set(path2, currentNodeModulesDepth > 0);
111223
+ sourceFilesFoundSearchingNodeModules.set(path4, currentNodeModulesDepth > 0);
111224
111224
  file.fileName = fileName;
111225
- file.path = path2;
111225
+ file.path = path4;
111226
111226
  file.resolvedPath = toPath3(fileName);
111227
111227
  file.originalFileName = originalFileName;
111228
111228
  file.packageJsonLocations = ((_b2 = sourceFileOptions.packageJsonLocations) == null ? undefined : _b2.length) ? sourceFileOptions.packageJsonLocations : undefined;
111229
111229
  file.packageJsonScope = sourceFileOptions.packageJsonScope;
111230
111230
  addFileIncludeReason(file, reason, false);
111231
111231
  if (host.useCaseSensitiveFileNames()) {
111232
- const pathLowerCase = toFileNameLowerCase(path2);
111232
+ const pathLowerCase = toFileNameLowerCase(path4);
111233
111233
  const existingFile = filesByNameIgnoreCase.get(pathLowerCase);
111234
111234
  if (existingFile) {
111235
111235
  reportFileNamesDifferOnlyInCasingError(fileName, existingFile, reason);
@@ -111262,20 +111262,20 @@ ${lanes.join(`
111262
111262
  }
111263
111263
  return false;
111264
111264
  }
111265
- function addFileToFilesByName(file, path2, fileName, redirectedPath) {
111265
+ function addFileToFilesByName(file, path4, fileName, redirectedPath) {
111266
111266
  if (redirectedPath) {
111267
111267
  updateFilesByNameMap(fileName, redirectedPath, file);
111268
- updateFilesByNameMap(fileName, path2, file || false);
111268
+ updateFilesByNameMap(fileName, path4, file || false);
111269
111269
  } else {
111270
- updateFilesByNameMap(fileName, path2, file);
111270
+ updateFilesByNameMap(fileName, path4, file);
111271
111271
  }
111272
111272
  }
111273
- function updateFilesByNameMap(fileName, path2, file) {
111274
- filesByName.set(path2, file);
111273
+ function updateFilesByNameMap(fileName, path4, file) {
111274
+ filesByName.set(path4, file);
111275
111275
  if (file !== undefined)
111276
- missingFileNames.delete(path2);
111276
+ missingFileNames.delete(path4);
111277
111277
  else
111278
- missingFileNames.set(path2, fileName);
111278
+ missingFileNames.set(path4, fileName);
111279
111279
  }
111280
111280
  function getRedirectFromSourceFile(fileName) {
111281
111281
  return mapSourceFileToResolvedRef == null ? undefined : mapSourceFileToResolvedRef.get(toPath3(fileName));
@@ -111283,8 +111283,8 @@ ${lanes.join(`
111283
111283
  function forEachResolvedProjectReference2(cb) {
111284
111284
  return forEachResolvedProjectReference(resolvedProjectReferences, cb);
111285
111285
  }
111286
- function getRedirectFromOutput(path2) {
111287
- return mapOutputFileToResolvedRef == null ? undefined : mapOutputFileToResolvedRef.get(path2);
111286
+ function getRedirectFromOutput(path4) {
111287
+ return mapOutputFileToResolvedRef == null ? undefined : mapOutputFileToResolvedRef.get(path4);
111288
111288
  }
111289
111289
  function isSourceOfProjectReferenceRedirect(fileName) {
111290
111290
  return useSourceOfProjectReferenceRedirect && !!getRedirectFromSourceFile(fileName);
@@ -111505,7 +111505,7 @@ ${lanes.join(`
111505
111505
  }
111506
111506
  const getCommonSourceDirectory3 = memoize(() => getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()));
111507
111507
  commandLine.fileNames.forEach((fileName) => {
111508
- const path2 = toPath3(fileName);
111508
+ const path4 = toPath3(fileName);
111509
111509
  let outputDts;
111510
111510
  if (!isDeclarationFileName(fileName) && !fileExtensionIs(fileName, ".json")) {
111511
111511
  if (!commandLine.options.outFile) {
@@ -111515,7 +111515,7 @@ ${lanes.join(`
111515
111515
  outputDts = outDts;
111516
111516
  }
111517
111517
  }
111518
- mapSourceFileToResolvedRef.set(path2, { resolvedRef, outputDts });
111518
+ mapSourceFileToResolvedRef.set(path4, { resolvedRef, outputDts });
111519
111519
  });
111520
111520
  }
111521
111521
  if (commandLine.projectReferences) {
@@ -112089,9 +112089,9 @@ ${lanes.join(`
112089
112089
  host.compilerHost.fileExists = fileExists;
112090
112090
  let directoryExists;
112091
112091
  if (originalDirectoryExists) {
112092
- directoryExists = host.compilerHost.directoryExists = (path2) => {
112093
- if (originalDirectoryExists.call(host.compilerHost, path2)) {
112094
- handleDirectoryCouldBeSymlink(path2);
112092
+ directoryExists = host.compilerHost.directoryExists = (path4) => {
112093
+ if (originalDirectoryExists.call(host.compilerHost, path4)) {
112094
+ handleDirectoryCouldBeSymlink(path4);
112095
112095
  return true;
112096
112096
  }
112097
112097
  if (!host.getResolvedProjectReferences())
@@ -112110,11 +112110,11 @@ ${lanes.join(`
112110
112110
  }
112111
112111
  });
112112
112112
  }
112113
- return fileOrDirectoryExistsUsingSource(path2, false);
112113
+ return fileOrDirectoryExistsUsingSource(path4, false);
112114
112114
  };
112115
112115
  }
112116
112116
  if (originalGetDirectories) {
112117
- host.compilerHost.getDirectories = (path2) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path2) ? originalGetDirectories.call(host.compilerHost, path2) : [];
112117
+ host.compilerHost.getDirectories = (path4) => !host.getResolvedProjectReferences() || originalDirectoryExists && originalDirectoryExists.call(host.compilerHost, path4) ? originalGetDirectories.call(host.compilerHost, path4) : [];
112118
112118
  }
112119
112119
  if (originalRealpath) {
112120
112120
  host.compilerHost.realpath = (s) => {
@@ -112738,15 +112738,15 @@ ${lanes.join(`
112738
112738
  state.allFileNames = undefined;
112739
112739
  }
112740
112740
  BuilderState2.releaseCache = releaseCache2;
112741
- function getFilesAffectedBy(state, programOfThisState, path2, cancellationToken, host) {
112741
+ function getFilesAffectedBy(state, programOfThisState, path4, cancellationToken, host) {
112742
112742
  var _a;
112743
- const result = getFilesAffectedByWithOldState(state, programOfThisState, path2, cancellationToken, host);
112743
+ const result = getFilesAffectedByWithOldState(state, programOfThisState, path4, cancellationToken, host);
112744
112744
  (_a = state.oldSignatures) == null || _a.clear();
112745
112745
  return result;
112746
112746
  }
112747
112747
  BuilderState2.getFilesAffectedBy = getFilesAffectedBy;
112748
- function getFilesAffectedByWithOldState(state, programOfThisState, path2, cancellationToken, host) {
112749
- const sourceFile = programOfThisState.getSourceFileByPath(path2);
112748
+ function getFilesAffectedByWithOldState(state, programOfThisState, path4, cancellationToken, host) {
112749
+ const sourceFile = programOfThisState.getSourceFileByPath(path4);
112750
112750
  if (!sourceFile) {
112751
112751
  return emptyArray;
112752
112752
  }
@@ -112756,9 +112756,9 @@ ${lanes.join(`
112756
112756
  return (state.referencedMap ? getFilesAffectedByUpdatedShapeWhenModuleEmit : getFilesAffectedByUpdatedShapeWhenNonModuleEmit)(state, programOfThisState, sourceFile, cancellationToken, host);
112757
112757
  }
112758
112758
  BuilderState2.getFilesAffectedByWithOldState = getFilesAffectedByWithOldState;
112759
- function updateSignatureOfFile(state, signature, path2) {
112760
- state.fileInfos.get(path2).signature = signature;
112761
- (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set)).add(path2);
112759
+ function updateSignatureOfFile(state, signature, path4) {
112760
+ state.fileInfos.get(path4).signature = signature;
112761
+ (state.hasCalledUpdateShapeSignature || (state.hasCalledUpdateShapeSignature = /* @__PURE__ */ new Set)).add(path4);
112762
112762
  }
112763
112763
  BuilderState2.updateSignatureOfFile = updateSignatureOfFile;
112764
112764
  function computeDtsSignature(programOfThisState, sourceFile, cancellationToken, host, onNewSignature) {
@@ -112804,10 +112804,10 @@ ${lanes.join(`
112804
112804
  const seenMap = /* @__PURE__ */ new Set;
112805
112805
  const queue = [sourceFile.resolvedPath];
112806
112806
  while (queue.length) {
112807
- const path2 = queue.pop();
112808
- if (!seenMap.has(path2)) {
112809
- seenMap.add(path2);
112810
- const references = state.referencedMap.getValues(path2);
112807
+ const path4 = queue.pop();
112808
+ if (!seenMap.has(path4)) {
112809
+ seenMap.add(path4);
112810
+ const references = state.referencedMap.getValues(path4);
112811
112811
  if (references) {
112812
112812
  for (const key of references.keys()) {
112813
112813
  queue.push(key);
@@ -112815,9 +112815,9 @@ ${lanes.join(`
112815
112815
  }
112816
112816
  }
112817
112817
  }
112818
- return arrayFrom(mapDefinedIterator(seenMap.keys(), (path2) => {
112818
+ return arrayFrom(mapDefinedIterator(seenMap.keys(), (path4) => {
112819
112819
  var _a;
112820
- return ((_a = programOfThisState.getSourceFileByPath(path2)) == null ? undefined : _a.fileName) ?? path2;
112820
+ return ((_a = programOfThisState.getSourceFileByPath(path4)) == null ? undefined : _a.fileName) ?? path4;
112821
112821
  }));
112822
112822
  }
112823
112823
  BuilderState2.getAllDependencies = getAllDependencies;
@@ -112997,7 +112997,7 @@ ${lanes.join(`
112997
112997
  var _a2;
112998
112998
  let oldInfo;
112999
112999
  let newReferences;
113000
- if (!useOldState || !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || oldInfo.version !== info.version || oldInfo.impliedFormat !== info.impliedFormat || !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || newReferences && forEachKey(newReferences, (path2) => !state.fileInfos.has(path2) && oldState.fileInfos.has(path2))) {
113000
+ if (!useOldState || !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || oldInfo.version !== info.version || oldInfo.impliedFormat !== info.impliedFormat || !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) || newReferences && forEachKey(newReferences, (path4) => !state.fileInfos.has(path4) && oldState.fileInfos.has(path4))) {
113001
113001
  addFileToChangeSet(sourceFilePath);
113002
113002
  } else {
113003
113003
  const sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
@@ -113053,8 +113053,8 @@ ${lanes.join(`
113053
113053
  if (useOldState && state.semanticDiagnosticsPerFile.size !== state.fileInfos.size && oldState.checkPending !== state.checkPending)
113054
113054
  state.buildInfoEmitPending = true;
113055
113055
  return state;
113056
- function addFileToChangeSet(path2) {
113057
- state.changedFilesSet.add(path2);
113056
+ function addFileToChangeSet(path4) {
113057
+ state.changedFilesSet.add(path4);
113058
113058
  if (outFilePath) {
113059
113059
  canCopySemanticDiagnostics = false;
113060
113060
  canCopyEmitDiagnostics = false;
@@ -113115,9 +113115,9 @@ ${lanes.join(`
113115
113115
  result.relatedInformation = relatedInformation ? relatedInformation.length ? relatedInformation.map((r) => convertToDiagnosticRelatedInformation(r, diagnosticFilePath, newProgram, toPathInBuildInfoDirectory)) : [] : undefined;
113116
113116
  return result;
113117
113117
  });
113118
- function toPathInBuildInfoDirectory(path2) {
113118
+ function toPathInBuildInfoDirectory(path4) {
113119
113119
  buildInfoDirectory ?? (buildInfoDirectory = getDirectoryPath(getNormalizedAbsolutePath(getTsBuildInfoEmitOutputFilePath(newProgram.getCompilerOptions()), newProgram.getCurrentDirectory())));
113120
- return toPath(path2, buildInfoDirectory, newProgram.getCanonicalFileName);
113120
+ return toPath(path4, buildInfoDirectory, newProgram.getCanonicalFileName);
113121
113121
  }
113122
113122
  }
113123
113123
  function convertToDiagnosticRelatedInformation(diagnostic, diagnosticFilePath, newProgram, toPath3) {
@@ -113180,12 +113180,12 @@ ${lanes.join(`
113180
113180
  state.affectedFilesPendingEmit = undefined;
113181
113181
  state.programEmitPending = undefined;
113182
113182
  }
113183
- (_b = state.affectedFilesPendingEmit) == null || _b.forEach((emitKind, path2) => {
113183
+ (_b = state.affectedFilesPendingEmit) == null || _b.forEach((emitKind, path4) => {
113184
113184
  const pending = !isForDtsErrors ? emitKind & 7 : emitKind & (7 | 48);
113185
113185
  if (!pending)
113186
- state.affectedFilesPendingEmit.delete(path2);
113186
+ state.affectedFilesPendingEmit.delete(path4);
113187
113187
  else
113188
- state.affectedFilesPendingEmit.set(path2, pending);
113188
+ state.affectedFilesPendingEmit.set(path4, pending);
113189
113189
  });
113190
113190
  if (state.programEmitPending) {
113191
113191
  const pending = !isForDtsErrors ? state.programEmitPending & 7 : state.programEmitPending & (7 | 48);
@@ -113210,11 +113210,11 @@ ${lanes.join(`
113210
113210
  var _a;
113211
113211
  if (!((_a = state.affectedFilesPendingEmit) == null ? undefined : _a.size))
113212
113212
  return;
113213
- return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path2) => {
113213
+ return forEachEntry(state.affectedFilesPendingEmit, (emitKind, path4) => {
113214
113214
  var _a2;
113215
- const affectedFile = state.program.getSourceFileByPath(path2);
113215
+ const affectedFile = state.program.getSourceFileByPath(path4);
113216
113216
  if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
113217
- state.affectedFilesPendingEmit.delete(path2);
113217
+ state.affectedFilesPendingEmit.delete(path4);
113218
113218
  return;
113219
113219
  }
113220
113220
  const seenKind = (_a2 = state.seenEmittedFiles) == null ? undefined : _a2.get(affectedFile.resolvedPath);
@@ -113227,11 +113227,11 @@ ${lanes.join(`
113227
113227
  var _a;
113228
113228
  if (!((_a = state.emitDiagnosticsPerFile) == null ? undefined : _a.size))
113229
113229
  return;
113230
- return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path2) => {
113230
+ return forEachEntry(state.emitDiagnosticsPerFile, (diagnostics, path4) => {
113231
113231
  var _a2;
113232
- const affectedFile = state.program.getSourceFileByPath(path2);
113232
+ const affectedFile = state.program.getSourceFileByPath(path4);
113233
113233
  if (!affectedFile || !sourceFileMayBeEmitted(affectedFile, state.program)) {
113234
- state.emitDiagnosticsPerFile.delete(path2);
113234
+ state.emitDiagnosticsPerFile.delete(path4);
113235
113235
  return;
113236
113236
  }
113237
113237
  const seenKind = ((_a2 = state.seenEmittedFiles) == null ? undefined : _a2.get(affectedFile.resolvedPath)) || 0;
@@ -113257,31 +113257,31 @@ ${lanes.join(`
113257
113257
  return;
113258
113258
  handleDtsMayChangeOfReferencingExportOfAffectedFile(state, affectedFile, cancellationToken, host);
113259
113259
  }
113260
- function handleDtsMayChangeOf(state, path2, invalidateJsFiles, cancellationToken, host) {
113261
- removeSemanticDiagnosticsOf(state, path2);
113262
- if (!state.changedFilesSet.has(path2)) {
113263
- const sourceFile = state.program.getSourceFileByPath(path2);
113260
+ function handleDtsMayChangeOf(state, path4, invalidateJsFiles, cancellationToken, host) {
113261
+ removeSemanticDiagnosticsOf(state, path4);
113262
+ if (!state.changedFilesSet.has(path4)) {
113263
+ const sourceFile = state.program.getSourceFileByPath(path4);
113264
113264
  if (sourceFile) {
113265
113265
  BuilderState.updateShapeSignature(state, state.program, sourceFile, cancellationToken, host, true);
113266
113266
  if (invalidateJsFiles) {
113267
- addToAffectedFilesPendingEmit(state, path2, getBuilderFileEmit(state.compilerOptions));
113267
+ addToAffectedFilesPendingEmit(state, path4, getBuilderFileEmit(state.compilerOptions));
113268
113268
  } else if (getEmitDeclarations(state.compilerOptions)) {
113269
- addToAffectedFilesPendingEmit(state, path2, state.compilerOptions.declarationMap ? 56 : 24);
113269
+ addToAffectedFilesPendingEmit(state, path4, state.compilerOptions.declarationMap ? 56 : 24);
113270
113270
  }
113271
113271
  }
113272
113272
  }
113273
113273
  }
113274
- function removeSemanticDiagnosticsOf(state, path2) {
113274
+ function removeSemanticDiagnosticsOf(state, path4) {
113275
113275
  if (!state.semanticDiagnosticsFromOldState) {
113276
113276
  return true;
113277
113277
  }
113278
- state.semanticDiagnosticsFromOldState.delete(path2);
113279
- state.semanticDiagnosticsPerFile.delete(path2);
113278
+ state.semanticDiagnosticsFromOldState.delete(path4);
113279
+ state.semanticDiagnosticsPerFile.delete(path4);
113280
113280
  return !state.semanticDiagnosticsFromOldState.size;
113281
113281
  }
113282
- function isChangedSignature(state, path2) {
113283
- const oldSignature = Debug.checkDefined(state.oldSignatures).get(path2) || undefined;
113284
- const newSignature = Debug.checkDefined(state.fileInfos.get(path2)).signature;
113282
+ function isChangedSignature(state, path4) {
113283
+ const oldSignature = Debug.checkDefined(state.oldSignatures).get(path4) || undefined;
113284
+ const newSignature = Debug.checkDefined(state.fileInfos.get(path4)).signature;
113285
113285
  return newSignature !== oldSignature;
113286
113286
  }
113287
113287
  function handleDtsMayChangeOfGlobalScope(state, filePath, invalidateJsFiles, cancellationToken, host) {
@@ -113349,13 +113349,13 @@ ${lanes.join(`
113349
113349
  }
113350
113350
  function getBinderAndCheckerDiagnosticsOfFile(state, sourceFile, cancellationToken, semanticDiagnosticsPerFile) {
113351
113351
  semanticDiagnosticsPerFile ?? (semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile);
113352
- const path2 = sourceFile.resolvedPath;
113353
- const cachedDiagnostics = semanticDiagnosticsPerFile.get(path2);
113352
+ const path4 = sourceFile.resolvedPath;
113353
+ const cachedDiagnostics = semanticDiagnosticsPerFile.get(path4);
113354
113354
  if (cachedDiagnostics) {
113355
113355
  return filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);
113356
113356
  }
113357
113357
  const diagnostics = state.program.getBindAndCheckDiagnostics(sourceFile, cancellationToken);
113358
- semanticDiagnosticsPerFile.set(path2, diagnostics);
113358
+ semanticDiagnosticsPerFile.set(path4, diagnostics);
113359
113359
  state.buildInfoEmitPending = true;
113360
113360
  return filterSemanticDiagnostics(diagnostics, state.compilerOptions);
113361
113361
  }
@@ -113469,12 +113469,12 @@ ${lanes.join(`
113469
113469
  if ((_b = state.affectedFilesPendingEmit) == null ? undefined : _b.size) {
113470
113470
  const fullEmitForOptions = getBuilderFileEmit(state.compilerOptions);
113471
113471
  const seenFiles = /* @__PURE__ */ new Set;
113472
- for (const path2 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
113473
- if (tryAddToSet(seenFiles, path2)) {
113474
- const file = state.program.getSourceFileByPath(path2);
113472
+ for (const path4 of arrayFrom(state.affectedFilesPendingEmit.keys()).sort(compareStringsCaseSensitive)) {
113473
+ if (tryAddToSet(seenFiles, path4)) {
113474
+ const file = state.program.getSourceFileByPath(path4);
113475
113475
  if (!file || !sourceFileMayBeEmitted(file, state.program))
113476
113476
  continue;
113477
- const fileId = toFileId(path2), pendingEmit = state.affectedFilesPendingEmit.get(path2);
113477
+ const fileId = toFileId(path4), pendingEmit = state.affectedFilesPendingEmit.get(path4);
113478
113478
  affectedFilesPendingEmit = append(affectedFilesPendingEmit, pendingEmit === fullEmitForOptions ? fileId : pendingEmit === 24 ? [fileId] : [fileId, pendingEmit]);
113479
113479
  }
113480
113480
  }
@@ -113498,17 +113498,17 @@ ${lanes.join(`
113498
113498
  version
113499
113499
  };
113500
113500
  return buildInfo;
113501
- function relativeToBuildInfoEnsuringAbsolutePath(path2) {
113502
- return relativeToBuildInfo(getNormalizedAbsolutePath(path2, currentDirectory));
113501
+ function relativeToBuildInfoEnsuringAbsolutePath(path4) {
113502
+ return relativeToBuildInfo(getNormalizedAbsolutePath(path4, currentDirectory));
113503
113503
  }
113504
- function relativeToBuildInfo(path2) {
113505
- return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path2, state.program.getCanonicalFileName));
113504
+ function relativeToBuildInfo(path4) {
113505
+ return ensurePathIsNonModuleName(getRelativePathFromDirectory(buildInfoDirectory, path4, state.program.getCanonicalFileName));
113506
113506
  }
113507
- function toFileId(path2) {
113508
- let fileId = fileNameToFileId.get(path2);
113507
+ function toFileId(path4) {
113508
+ let fileId = fileNameToFileId.get(path4);
113509
113509
  if (fileId === undefined) {
113510
- fileNames.push(relativeToBuildInfo(path2));
113511
- fileNameToFileId.set(path2, fileId = fileNames.length);
113510
+ fileNames.push(relativeToBuildInfo(path4));
113511
+ fileNameToFileId.set(path4, fileId = fileNames.length);
113512
113512
  }
113513
113513
  return fileId;
113514
113514
  }
@@ -113522,8 +113522,8 @@ ${lanes.join(`
113522
113522
  }
113523
113523
  return fileIdListId;
113524
113524
  }
113525
- function tryAddRoot(path2, fileId) {
113526
- const file = state.program.getSourceFile(path2);
113525
+ function tryAddRoot(path4, fileId) {
113526
+ const file = state.program.getSourceFile(path4);
113527
113527
  if (!state.program.getFileIncludeReasons().get(file.path).some((r) => r.kind === 0))
113528
113528
  return;
113529
113529
  if (!root.length)
@@ -113542,10 +113542,10 @@ ${lanes.join(`
113542
113542
  }
113543
113543
  function toResolvedRoot() {
113544
113544
  let result;
113545
- rootFileNames.forEach((path2) => {
113546
- const file = state.program.getSourceFileByPath(path2);
113547
- if (file && path2 !== file.resolvedPath) {
113548
- result = append(result, [toFileId(file.resolvedPath), toFileId(path2)]);
113545
+ rootFileNames.forEach((path4) => {
113546
+ const file = state.program.getSourceFileByPath(path4);
113547
+ if (file && path4 !== file.resolvedPath) {
113548
+ result = append(result, [toFileId(file.resolvedPath), toFileId(path4)]);
113549
113549
  }
113550
113550
  });
113551
113551
  return result;
@@ -113654,8 +113654,8 @@ ${lanes.join(`
113654
113654
  function toChangeFileSet() {
113655
113655
  let changeFileSet;
113656
113656
  if (state.changedFilesSet.size) {
113657
- for (const path2 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
113658
- changeFileSet = append(changeFileSet, toFileId(path2));
113657
+ for (const path4 of arrayFrom(state.changedFilesSet.keys()).sort(compareStringsCaseSensitive)) {
113658
+ changeFileSet = append(changeFileSet, toFileId(path4));
113659
113659
  }
113660
113660
  }
113661
113661
  return changeFileSet;
@@ -114075,8 +114075,8 @@ ${lanes.join(`
114075
114075
  const changedFilesSet = new Set(map(buildInfo.changeFileSet, toFilePath));
114076
114076
  if (isIncrementalBundleEmitBuildInfo(buildInfo)) {
114077
114077
  buildInfo.fileInfos.forEach((fileInfo, index) => {
114078
- const path2 = toFilePath(index + 1);
114079
- fileInfos.set(path2, isString(fileInfo) ? { version: fileInfo, signature: undefined, affectsGlobalScope: undefined, impliedFormat: undefined } : fileInfo);
114078
+ const path4 = toFilePath(index + 1);
114079
+ fileInfos.set(path4, isString(fileInfo) ? { version: fileInfo, signature: undefined, affectsGlobalScope: undefined, impliedFormat: undefined } : fileInfo);
114080
114080
  });
114081
114081
  state = {
114082
114082
  fileInfos,
@@ -114095,11 +114095,11 @@ ${lanes.join(`
114095
114095
  filePathsSetList = (_b = buildInfo.fileIdsList) == null ? undefined : _b.map((fileIds) => new Set(fileIds.map(toFilePath)));
114096
114096
  const emitSignatures = ((_c = buildInfo.options) == null ? undefined : _c.composite) && !buildInfo.options.outFile ? /* @__PURE__ */ new Map : undefined;
114097
114097
  buildInfo.fileInfos.forEach((fileInfo, index) => {
114098
- const path2 = toFilePath(index + 1);
114098
+ const path4 = toFilePath(index + 1);
114099
114099
  const stateFileInfo = toBuilderStateFileInfoForMultiEmit(fileInfo);
114100
- fileInfos.set(path2, stateFileInfo);
114100
+ fileInfos.set(path4, stateFileInfo);
114101
114101
  if (emitSignatures && stateFileInfo.signature)
114102
- emitSignatures.set(path2, stateFileInfo.signature);
114102
+ emitSignatures.set(path4, stateFileInfo.signature);
114103
114103
  });
114104
114104
  (_d = buildInfo.emitSignatures) == null || _d.forEach((value) => {
114105
114105
  if (isNumber(value))
@@ -114148,11 +114148,11 @@ ${lanes.join(`
114148
114148
  close: noop,
114149
114149
  hasChangedEmitSignature: returnFalse
114150
114150
  };
114151
- function toPathInBuildInfoDirectory(path2) {
114152
- return toPath(path2, buildInfoDirectory, getCanonicalFileName);
114151
+ function toPathInBuildInfoDirectory(path4) {
114152
+ return toPath(path4, buildInfoDirectory, getCanonicalFileName);
114153
114153
  }
114154
- function toAbsolutePath(path2) {
114155
- return getNormalizedAbsolutePath(path2, buildInfoDirectory);
114154
+ function toAbsolutePath(path4) {
114155
+ return getNormalizedAbsolutePath(path4, buildInfoDirectory);
114156
114156
  }
114157
114157
  function toFilePath(fileId) {
114158
114158
  return filePaths[fileId - 1];
@@ -114189,31 +114189,31 @@ ${lanes.join(`
114189
114189
  const roots = /* @__PURE__ */ new Map;
114190
114190
  const resolvedRoots = new Map(program.resolvedRoot);
114191
114191
  program.fileInfos.forEach((fileInfo, index) => {
114192
- const path2 = toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
114192
+ const path4 = toPath(program.fileNames[index], buildInfoDirectory, getCanonicalFileName);
114193
114193
  const version2 = isString(fileInfo) ? fileInfo : fileInfo.version;
114194
- fileInfos.set(path2, version2);
114194
+ fileInfos.set(path4, version2);
114195
114195
  if (rootIndex < program.root.length) {
114196
114196
  const current = program.root[rootIndex];
114197
114197
  const fileId = index + 1;
114198
114198
  if (isArray(current)) {
114199
114199
  if (current[0] <= fileId && fileId <= current[1]) {
114200
- addRoot(fileId, path2);
114200
+ addRoot(fileId, path4);
114201
114201
  if (current[1] === fileId)
114202
114202
  rootIndex++;
114203
114203
  }
114204
114204
  } else if (current === fileId) {
114205
- addRoot(fileId, path2);
114205
+ addRoot(fileId, path4);
114206
114206
  rootIndex++;
114207
114207
  }
114208
114208
  }
114209
114209
  });
114210
114210
  return { fileInfos, roots };
114211
- function addRoot(fileId, path2) {
114211
+ function addRoot(fileId, path4) {
114212
114212
  const root = resolvedRoots.get(fileId);
114213
114213
  if (root) {
114214
- roots.set(toPath(program.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path2);
114214
+ roots.set(toPath(program.fileNames[root - 1], buildInfoDirectory, getCanonicalFileName), path4);
114215
114215
  } else {
114216
- roots.set(path2, undefined);
114216
+ roots.set(path4, undefined);
114217
114217
  }
114218
114218
  }
114219
114219
  }
@@ -114259,11 +114259,11 @@ ${lanes.join(`
114259
114259
  const { newProgram, configFileParsingDiagnostics: newConfigFileParsingDiagnostics } = getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences);
114260
114260
  return createRedirectedBuilderProgram({ program: newProgram, compilerOptions: newProgram.getCompilerOptions() }, newConfigFileParsingDiagnostics);
114261
114261
  }
114262
- function removeIgnoredPath(path2) {
114263
- if (endsWith(path2, "/node_modules/.staging")) {
114264
- return removeSuffix(path2, "/.staging");
114262
+ function removeIgnoredPath(path4) {
114263
+ if (endsWith(path4, "/node_modules/.staging")) {
114264
+ return removeSuffix(path4, "/.staging");
114265
114265
  }
114266
- return some(ignoredPaths, (searchPath) => path2.includes(searchPath)) ? undefined : path2;
114266
+ return some(ignoredPaths, (searchPath) => path4.includes(searchPath)) ? undefined : path4;
114267
114267
  }
114268
114268
  function perceivedOsRootLengthForWatching(pathComponents2, length2) {
114269
114269
  if (length2 <= 1)
@@ -114292,8 +114292,8 @@ ${lanes.join(`
114292
114292
  const perceivedOsRootLength = perceivedOsRootLengthForWatching(pathComponents2, length2);
114293
114293
  return length2 > perceivedOsRootLength + 1;
114294
114294
  }
114295
- function canWatchDirectoryOrFilePath(path2) {
114296
- return canWatchDirectoryOrFile(getPathComponents(path2));
114295
+ function canWatchDirectoryOrFilePath(path4) {
114296
+ return canWatchDirectoryOrFile(getPathComponents(path4));
114297
114297
  }
114298
114298
  function canWatchAtTypes(atTypes) {
114299
114299
  return canWatchAffectedPackageJsonOrNodeModulesOfAtTypes(getDirectoryPath(atTypes));
@@ -114525,11 +114525,11 @@ ${lanes.join(`
114525
114525
  filesWithChangedSetOfUnresolvedImports = undefined;
114526
114526
  return collected;
114527
114527
  }
114528
- function isFileWithInvalidatedNonRelativeUnresolvedImports(path2) {
114528
+ function isFileWithInvalidatedNonRelativeUnresolvedImports(path4) {
114529
114529
  if (!filesWithInvalidatedNonRelativeUnresolvedImports) {
114530
114530
  return false;
114531
114531
  }
114532
- const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path2);
114532
+ const value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path4);
114533
114533
  return !!value && !!value.length;
114534
114534
  }
114535
114535
  function createHasInvalidatedResolutions(customHasInvalidatedResolutions, customHasInvalidatedLibResolutions) {
@@ -114537,7 +114537,7 @@ ${lanes.join(`
114537
114537
  const collected = filesWithInvalidatedResolutions;
114538
114538
  filesWithInvalidatedResolutions = undefined;
114539
114539
  return {
114540
- hasInvalidatedResolutions: (path2) => customHasInvalidatedResolutions(path2) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? undefined : collected.has(path2)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path2),
114540
+ hasInvalidatedResolutions: (path4) => customHasInvalidatedResolutions(path4) || allModuleAndTypeResolutionsAreInvalidated || !!(collected == null ? undefined : collected.has(path4)) || isFileWithInvalidatedNonRelativeUnresolvedImports(path4),
114541
114541
  hasInvalidatedLibResolutions: (libFileName) => {
114542
114542
  var _a;
114543
114543
  return customHasInvalidatedLibResolutions(libFileName) || !!((_a = resolvedLibraries == null ? undefined : resolvedLibraries.get(libFileName)) == null ? undefined : _a.isInvalidated);
@@ -114587,11 +114587,11 @@ ${lanes.join(`
114587
114587
  else
114588
114588
  impliedFormatPackageJsons.delete(newFile.resolvedPath);
114589
114589
  });
114590
- impliedFormatPackageJsons.forEach((existing, path2) => {
114591
- const newFile = newProgram == null ? undefined : newProgram.getSourceFileByPath(path2);
114592
- if (!newFile || newFile.resolvedPath !== path2) {
114590
+ impliedFormatPackageJsons.forEach((existing, path4) => {
114591
+ const newFile = newProgram == null ? undefined : newProgram.getSourceFileByPath(path4);
114592
+ if (!newFile || newFile.resolvedPath !== path4) {
114593
114593
  existing.forEach((location) => fileWatchesOfAffectingLocations.get(location).files--);
114594
- impliedFormatPackageJsons.delete(path2);
114594
+ impliedFormatPackageJsons.delete(path4);
114595
114595
  }
114596
114596
  });
114597
114597
  }
@@ -114610,16 +114610,16 @@ ${lanes.join(`
114610
114610
  packageDirWatchers.delete(packageDirPath);
114611
114611
  }
114612
114612
  }
114613
- function closeDirectoryWatchesOfFailedLookup(watcher, path2) {
114613
+ function closeDirectoryWatchesOfFailedLookup(watcher, path4) {
114614
114614
  if (watcher.refCount === 0) {
114615
- directoryWatchesOfFailedLookups.delete(path2);
114615
+ directoryWatchesOfFailedLookups.delete(path4);
114616
114616
  watcher.watcher.close();
114617
114617
  }
114618
114618
  }
114619
- function closeFileWatcherOfAffectingLocation(watcher, path2) {
114619
+ function closeFileWatcherOfAffectingLocation(watcher, path4) {
114620
114620
  var _a;
114621
114621
  if (watcher.files === 0 && watcher.resolutions === 0 && !((_a = watcher.symlinks) == null ? undefined : _a.size)) {
114622
- fileWatchesOfAffectingLocations.delete(path2);
114622
+ fileWatchesOfAffectingLocations.delete(path4);
114623
114623
  watcher.watcher.close();
114624
114624
  }
114625
114625
  }
@@ -114638,10 +114638,10 @@ ${lanes.join(`
114638
114638
  logChanges
114639
114639
  }) {
114640
114640
  var _a;
114641
- const path2 = resolutionHost.toPath(containingFile);
114642
- const resolutionsInFile = perFileCache.get(path2) || perFileCache.set(path2, createModeAwareCache()).get(path2);
114641
+ const path4 = resolutionHost.toPath(containingFile);
114642
+ const resolutionsInFile = perFileCache.get(path4) || perFileCache.set(path4, createModeAwareCache()).get(path4);
114643
114643
  const resolvedModules = [];
114644
- const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path2);
114644
+ const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path4);
114645
114645
  const program = resolutionHost.getCurrentProgram();
114646
114646
  const oldRedirect = program && ((_a = program.getRedirectFromSourceFile(containingFile)) == null ? undefined : _a.resolvedRef);
114647
114647
  const unmatchedRedirects = oldRedirect ? !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path : !!redirectedReference;
@@ -114658,13 +114658,13 @@ ${lanes.join(`
114658
114658
  }
114659
114659
  resolutionsInFile.set(name, mode, resolution);
114660
114660
  if (resolution !== existingResolution) {
114661
- watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path2, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
114661
+ watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path4, getResolutionWithResolvedFileName, deferWatchingNonRelativeResolution);
114662
114662
  if (existingResolution) {
114663
- stopWatchFailedLookupLocationOfResolution(existingResolution, path2, getResolutionWithResolvedFileName);
114663
+ stopWatchFailedLookupLocationOfResolution(existingResolution, path4, getResolutionWithResolvedFileName);
114664
114664
  }
114665
114665
  }
114666
114666
  if (logChanges && filesWithChangedSetOfUnresolvedImports && !resolutionIsEqualTo(existingResolution, resolution)) {
114667
- filesWithChangedSetOfUnresolvedImports.push(path2);
114667
+ filesWithChangedSetOfUnresolvedImports.push(path4);
114668
114668
  logChanges = false;
114669
114669
  }
114670
114670
  } else {
@@ -114682,7 +114682,7 @@ ${lanes.join(`
114682
114682
  if (resolutionsInFile.size() !== seenNamesInFile.size()) {
114683
114683
  resolutionsInFile.forEach((resolution, name, mode) => {
114684
114684
  if (!seenNamesInFile.has(name, mode)) {
114685
- stopWatchFailedLookupLocationOfResolution(resolution, path2, getResolutionWithResolvedFileName);
114685
+ stopWatchFailedLookupLocationOfResolution(resolution, path4, getResolutionWithResolvedFileName);
114686
114686
  resolutionsInFile.delete(name, mode);
114687
114687
  }
114688
114688
  });
@@ -114743,11 +114743,11 @@ ${lanes.join(`
114743
114743
  if (!resolution || resolution.isInvalidated) {
114744
114744
  const existingResolution = resolution;
114745
114745
  resolution = resolveLibrary(libraryName, resolveFrom, options, host, libraryResolutionCache);
114746
- const path2 = resolutionHost.toPath(resolveFrom);
114747
- watchFailedLookupLocationsOfExternalModuleResolutions(libraryName, resolution, path2, getResolvedModuleFromResolution, false);
114746
+ const path4 = resolutionHost.toPath(resolveFrom);
114747
+ watchFailedLookupLocationsOfExternalModuleResolutions(libraryName, resolution, path4, getResolvedModuleFromResolution, false);
114748
114748
  resolvedLibraries.set(libFileName, resolution);
114749
114749
  if (existingResolution) {
114750
- stopWatchFailedLookupLocationOfResolution(existingResolution, path2, getResolvedModuleFromResolution);
114750
+ stopWatchFailedLookupLocationOfResolution(existingResolution, path4, getResolvedModuleFromResolution);
114751
114751
  }
114752
114752
  } else {
114753
114753
  if (isTraceEnabled(options, host)) {
@@ -114759,8 +114759,8 @@ ${lanes.join(`
114759
114759
  }
114760
114760
  function resolveSingleModuleNameWithoutWatching(moduleName, containingFile) {
114761
114761
  var _a, _b;
114762
- const path2 = resolutionHost.toPath(containingFile);
114763
- const resolutionsInFile = resolvedModuleNames.get(path2);
114762
+ const path4 = resolutionHost.toPath(containingFile);
114763
+ const resolutionsInFile = resolvedModuleNames.get(path4);
114764
114764
  const resolution = resolutionsInFile == null ? undefined : resolutionsInFile.get(moduleName, undefined);
114765
114765
  if (resolution && !resolution.isInvalidated)
114766
114766
  return resolution;
@@ -114896,15 +114896,15 @@ ${lanes.join(`
114896
114896
  (symlinkWatcher.symlinks ?? (symlinkWatcher.symlinks = /* @__PURE__ */ new Set)).add(affectingLocation);
114897
114897
  }
114898
114898
  }
114899
- function invalidateAffectingFileWatcher(path2, packageJsonMap) {
114899
+ function invalidateAffectingFileWatcher(path4, packageJsonMap) {
114900
114900
  var _a;
114901
- const watcher = fileWatchesOfAffectingLocations.get(path2);
114901
+ const watcher = fileWatchesOfAffectingLocations.get(path4);
114902
114902
  if (watcher == null ? undefined : watcher.resolutions)
114903
- (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set)).add(path2);
114903
+ (affectingPathChecks ?? (affectingPathChecks = /* @__PURE__ */ new Set)).add(path4);
114904
114904
  if (watcher == null ? undefined : watcher.files)
114905
- (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set)).add(path2);
114905
+ (affectingPathChecksForFile ?? (affectingPathChecksForFile = /* @__PURE__ */ new Set)).add(path4);
114906
114906
  (_a = watcher == null ? undefined : watcher.symlinks) == null || _a.forEach((path22) => invalidateAffectingFileWatcher(path22, packageJsonMap));
114907
- packageJsonMap == null || packageJsonMap.delete(resolutionHost.toPath(path2));
114907
+ packageJsonMap == null || packageJsonMap.delete(resolutionHost.toPath(path4));
114908
114908
  }
114909
114909
  function watchFailedLookupLocationOfNonRelativeModuleResolutions() {
114910
114910
  nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfResolution);
@@ -115124,7 +115124,7 @@ ${lanes.join(`
115124
115124
  function invalidatePackageJsonMap() {
115125
115125
  const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
115126
115126
  if (packageJsonMap && (failedLookupChecks || startsWithPathChecks || isInDirectoryChecks)) {
115127
- packageJsonMap.forEach((_value, path2) => isInvalidatedFailedLookup(path2) ? packageJsonMap.delete(path2) : undefined);
115127
+ packageJsonMap.forEach((_value, path4) => isInvalidatedFailedLookup(path4) ? packageJsonMap.delete(path4) : undefined);
115128
115128
  }
115129
115129
  }
115130
115130
  function invalidateResolutionsOfFailedLookupLocations() {
@@ -115596,7 +115596,7 @@ ${lanes.join(`
115596
115596
  getSourceFile: createGetSourceFile((fileName, encoding) => !encoding ? compilerHost.readFile(fileName) : host.readFile(fileName, encoding), undefined),
115597
115597
  getDefaultLibLocation: maybeBind(host, host.getDefaultLibLocation),
115598
115598
  getDefaultLibFileName: (options) => host.getDefaultLibFileName(options),
115599
- writeFile: createWriteFileMeasuringIO((path2, data, writeByteOrderMark) => host.writeFile(path2, data, writeByteOrderMark), (path2) => host.createDirectory(path2), (path2) => host.directoryExists(path2)),
115599
+ writeFile: createWriteFileMeasuringIO((path4, data, writeByteOrderMark) => host.writeFile(path4, data, writeByteOrderMark), (path4) => host.createDirectory(path4), (path4) => host.directoryExists(path4)),
115600
115600
  getCurrentDirectory: memoize(() => host.getCurrentDirectory()),
115601
115601
  useCaseSensitiveFileNames: () => useCaseSensitiveFileNames2,
115602
115602
  getCanonicalFileName: createGetCanonicalFileName(useCaseSensitiveFileNames2),
@@ -115665,16 +115665,16 @@ ${lanes.join(`
115665
115665
  getCurrentDirectory: memoize(() => system.getCurrentDirectory()),
115666
115666
  getDefaultLibLocation,
115667
115667
  getDefaultLibFileName: (options) => combinePaths(getDefaultLibLocation(), getDefaultLibFileName(options)),
115668
- fileExists: (path2) => system.fileExists(path2),
115669
- readFile: (path2, encoding) => system.readFile(path2, encoding),
115670
- directoryExists: (path2) => system.directoryExists(path2),
115671
- getDirectories: (path2) => system.getDirectories(path2),
115672
- readDirectory: (path2, extensions, exclude, include, depth) => system.readDirectory(path2, extensions, exclude, include, depth),
115668
+ fileExists: (path4) => system.fileExists(path4),
115669
+ readFile: (path4, encoding) => system.readFile(path4, encoding),
115670
+ directoryExists: (path4) => system.directoryExists(path4),
115671
+ getDirectories: (path4) => system.getDirectories(path4),
115672
+ readDirectory: (path4, extensions, exclude, include, depth) => system.readDirectory(path4, extensions, exclude, include, depth),
115673
115673
  realpath: maybeBind(system, system.realpath),
115674
115674
  getEnvironmentVariable: maybeBind(system, system.getEnvironmentVariable),
115675
115675
  trace: (s) => system.write(s + system.newLine),
115676
- createDirectory: (path2) => system.createDirectory(path2),
115677
- writeFile: (path2, data, writeByteOrderMark) => system.writeFile(path2, data, writeByteOrderMark),
115676
+ createDirectory: (path4) => system.createDirectory(path4),
115677
+ writeFile: (path4, data, writeByteOrderMark) => system.writeFile(path4, data, writeByteOrderMark),
115678
115678
  createHash: maybeBind(system, system.createHash),
115679
115679
  createProgram: createProgram2 || createEmitAndSemanticDiagnosticsBuilderProgram,
115680
115680
  storeSignatureInfo: system.storeSignatureInfo,
@@ -115964,7 +115964,7 @@ ${lanes.join(`
115964
115964
  originalWriteFile,
115965
115965
  readFileWithCache
115966
115966
  } = changeCompilerHostLikeToUseCache(compilerHost, toPath3);
115967
- if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path2) => getSourceVersion(path2, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
115967
+ if (isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, (path4) => getSourceVersion(path4, readFileWithCache), (fileName) => compilerHost.fileExists(fileName), hasInvalidatedResolutions, hasInvalidatedLibResolutions, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
115968
115968
  if (hasChangedConfigFileParsingErrors) {
115969
115969
  if (reportFileChangeDetectedOnCreateProgram) {
115970
115970
  reportWatchDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation);
@@ -116048,14 +116048,14 @@ ${lanes.join(`
116048
116048
  return typeof hostSourceFile.version === "boolean";
116049
116049
  }
116050
116050
  function fileExists(fileName) {
116051
- const path2 = toPath3(fileName);
116052
- if (isFileMissingOnHost(sourceFilesCache.get(path2))) {
116051
+ const path4 = toPath3(fileName);
116052
+ if (isFileMissingOnHost(sourceFilesCache.get(path4))) {
116053
116053
  return false;
116054
116054
  }
116055
116055
  return directoryStructureHost.fileExists(fileName);
116056
116056
  }
116057
- function getVersionedSourceFileByPath(fileName, path2, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
116058
- const hostSourceFile = sourceFilesCache.get(path2);
116057
+ function getVersionedSourceFileByPath(fileName, path4, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
116058
+ const hostSourceFile = sourceFilesCache.get(path4);
116059
116059
  if (isFileMissingOnHost(hostSourceFile)) {
116060
116060
  return;
116061
116061
  }
@@ -116067,43 +116067,43 @@ ${lanes.join(`
116067
116067
  hostSourceFile.sourceFile = sourceFile;
116068
116068
  hostSourceFile.version = sourceFile.version;
116069
116069
  if (!hostSourceFile.fileWatcher) {
116070
- hostSourceFile.fileWatcher = watchFilePath(path2, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
116070
+ hostSourceFile.fileWatcher = watchFilePath(path4, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
116071
116071
  }
116072
116072
  } else {
116073
116073
  if (hostSourceFile.fileWatcher) {
116074
116074
  hostSourceFile.fileWatcher.close();
116075
116075
  }
116076
- sourceFilesCache.set(path2, false);
116076
+ sourceFilesCache.set(path4, false);
116077
116077
  }
116078
116078
  } else {
116079
116079
  if (sourceFile) {
116080
- const fileWatcher = watchFilePath(path2, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
116081
- sourceFilesCache.set(path2, { sourceFile, version: sourceFile.version, fileWatcher });
116080
+ const fileWatcher = watchFilePath(path4, fileName, onSourceFileChange, 250, watchOptions, WatchType.SourceFile);
116081
+ sourceFilesCache.set(path4, { sourceFile, version: sourceFile.version, fileWatcher });
116082
116082
  } else {
116083
- sourceFilesCache.set(path2, false);
116083
+ sourceFilesCache.set(path4, false);
116084
116084
  }
116085
116085
  }
116086
116086
  return sourceFile;
116087
116087
  }
116088
116088
  return hostSourceFile.sourceFile;
116089
116089
  }
116090
- function nextSourceFileVersion(path2) {
116091
- const hostSourceFile = sourceFilesCache.get(path2);
116090
+ function nextSourceFileVersion(path4) {
116091
+ const hostSourceFile = sourceFilesCache.get(path4);
116092
116092
  if (hostSourceFile !== undefined) {
116093
116093
  if (isFileMissingOnHost(hostSourceFile)) {
116094
- sourceFilesCache.set(path2, { version: false });
116094
+ sourceFilesCache.set(path4, { version: false });
116095
116095
  } else {
116096
116096
  hostSourceFile.version = false;
116097
116097
  }
116098
116098
  }
116099
116099
  }
116100
- function getSourceVersion(path2, readFileWithCache) {
116101
- const hostSourceFile = sourceFilesCache.get(path2);
116100
+ function getSourceVersion(path4, readFileWithCache) {
116101
+ const hostSourceFile = sourceFilesCache.get(path4);
116102
116102
  if (!hostSourceFile)
116103
116103
  return;
116104
116104
  if (hostSourceFile.version)
116105
116105
  return hostSourceFile.version;
116106
- const text = readFileWithCache(path2);
116106
+ const text = readFileWithCache(path4);
116107
116107
  return text !== undefined ? getSourceFileVersionAsHashFromText(compilerHost, text) : undefined;
116108
116108
  }
116109
116109
  function onReleaseOldSourceFile(oldSourceFile, _oldOptions, hasSourceFileByPath) {
@@ -116257,30 +116257,30 @@ ${lanes.join(`
116257
116257
  }
116258
116258
  function onReleaseParsedCommandLine(fileName) {
116259
116259
  var _a;
116260
- const path2 = toPath3(fileName);
116261
- const config = parsedConfigs == null ? undefined : parsedConfigs.get(path2);
116260
+ const path4 = toPath3(fileName);
116261
+ const config = parsedConfigs == null ? undefined : parsedConfigs.get(path4);
116262
116262
  if (!config)
116263
116263
  return;
116264
- parsedConfigs.delete(path2);
116264
+ parsedConfigs.delete(path4);
116265
116265
  if (config.watchedDirectories)
116266
116266
  clearMap(config.watchedDirectories, closeFileWatcherOf);
116267
116267
  (_a = config.watcher) == null || _a.close();
116268
- clearSharedExtendedConfigFileWatcher(path2, sharedExtendedConfigFileWatchers);
116268
+ clearSharedExtendedConfigFileWatcher(path4, sharedExtendedConfigFileWatchers);
116269
116269
  }
116270
- function watchFilePath(path2, file, callback, pollingInterval, options, watchType) {
116271
- return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path2), pollingInterval, options, watchType);
116270
+ function watchFilePath(path4, file, callback, pollingInterval, options, watchType) {
116271
+ return watchFile2(file, (fileName, eventKind) => callback(fileName, eventKind, path4), pollingInterval, options, watchType);
116272
116272
  }
116273
- function onSourceFileChange(fileName, eventKind, path2) {
116274
- updateCachedSystemWithFile(fileName, path2, eventKind);
116275
- if (eventKind === 2 && sourceFilesCache.has(path2)) {
116276
- resolutionCache.invalidateResolutionOfFile(path2);
116273
+ function onSourceFileChange(fileName, eventKind, path4) {
116274
+ updateCachedSystemWithFile(fileName, path4, eventKind);
116275
+ if (eventKind === 2 && sourceFilesCache.has(path4)) {
116276
+ resolutionCache.invalidateResolutionOfFile(path4);
116277
116277
  }
116278
- nextSourceFileVersion(path2);
116278
+ nextSourceFileVersion(path4);
116279
116279
  scheduleProgramUpdate();
116280
116280
  }
116281
- function updateCachedSystemWithFile(fileName, path2, eventKind) {
116281
+ function updateCachedSystemWithFile(fileName, path4, eventKind) {
116282
116282
  if (cachedDirectoryStructureHost) {
116283
- cachedDirectoryStructureHost.addOrDeleteFile(fileName, path2, eventKind);
116283
+ cachedDirectoryStructureHost.addOrDeleteFile(fileName, path4, eventKind);
116284
116284
  }
116285
116285
  }
116286
116286
  function watchMissingFilePath(missingFilePath, missingFileName) {
@@ -116450,9 +116450,9 @@ ${lanes.join(`
116450
116450
  }
116451
116451
  function createSolutionBuilderHostBase(system, createProgram2, reportDiagnostic, reportSolutionBuilderStatus) {
116452
116452
  const host = createProgramHost(system, createProgram2);
116453
- host.getModifiedTime = system.getModifiedTime ? (path2) => system.getModifiedTime(path2) : returnUndefined;
116454
- host.setModifiedTime = system.setModifiedTime ? (path2, date) => system.setModifiedTime(path2, date) : noop;
116455
- host.deleteFile = system.deleteFile ? (path2) => system.deleteFile(path2) : noop;
116453
+ host.getModifiedTime = system.getModifiedTime ? (path4) => system.getModifiedTime(path4) : returnUndefined;
116454
+ host.setModifiedTime = system.setModifiedTime ? (path4, date) => system.setModifiedTime(path4, date) : noop;
116455
+ host.deleteFile = system.deleteFile ? (path4) => system.deleteFile(path4) : noop;
116456
116456
  host.reportDiagnostic = reportDiagnostic || createDiagnosticReporter(system);
116457
116457
  host.reportSolutionBuilderStatus = reportSolutionBuilderStatus || createBuilderStatusReporter(system);
116458
116458
  host.now = maybeBind(system, system.now);
@@ -116565,9 +116565,9 @@ ${lanes.join(`
116565
116565
  }
116566
116566
  function toResolvedConfigFilePath(state, fileName) {
116567
116567
  const { resolvedConfigFilePaths } = state;
116568
- const path2 = resolvedConfigFilePaths.get(fileName);
116569
- if (path2 !== undefined)
116570
- return path2;
116568
+ const path4 = resolvedConfigFilePaths.get(fileName);
116569
+ if (path4 !== undefined)
116570
+ return path4;
116571
116571
  const resolvedPath = toPath2(state, fileName);
116572
116572
  resolvedConfigFilePaths.set(fileName, resolvedPath);
116573
116573
  return resolvedPath;
@@ -116879,7 +116879,7 @@ ${lanes.join(`
116879
116879
  let now;
116880
116880
  const { emitResult, diagnostics } = emitFilesAndReportErrors(program, (d) => host.reportDiagnostic(d), state.write, undefined, (name, text, writeByteOrderMark, onError, sourceFiles, data) => {
116881
116881
  var _a2;
116882
- const path2 = toPath2(state, name);
116882
+ const path4 = toPath2(state, name);
116883
116883
  emittedOutputs.set(toPath2(state, name), name);
116884
116884
  if (data == null ? undefined : data.buildInfo) {
116885
116885
  now || (now = getCurrentTime(state.host));
@@ -116904,7 +116904,7 @@ ${lanes.join(`
116904
116904
  if (data == null ? undefined : data.differsOnlyInMap)
116905
116905
  state.host.setModifiedTime(name, modifiedTime);
116906
116906
  else if (!isIncremental && state.watch) {
116907
- (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path2, now || (now = getCurrentTime(state.host)));
116907
+ (outputTimeStampMap || (outputTimeStampMap = getOutputTimeStampMap(state, projectPath))).set(path4, now || (now = getCurrentTime(state.host)));
116908
116908
  }
116909
116909
  }, cancellationToken, undefined, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? undefined : _b.call(_a, project)));
116910
116910
  if ((!options.noEmitOnError || !diagnostics.length) && (emittedOutputs.size || status.type !== 8)) {
@@ -117063,8 +117063,8 @@ ${lanes.join(`
117063
117063
  return !!value.watcher;
117064
117064
  }
117065
117065
  function getModifiedTime2(state, fileName) {
117066
- const path2 = toPath2(state, fileName);
117067
- const existing = state.filesWatched.get(path2);
117066
+ const path4 = toPath2(state, fileName);
117067
+ const existing = state.filesWatched.get(path4);
117068
117068
  if (state.watch && !!existing) {
117069
117069
  if (!isFileWatcherWithModifiedTime(existing))
117070
117070
  return existing;
@@ -117076,30 +117076,30 @@ ${lanes.join(`
117076
117076
  if (existing)
117077
117077
  existing.modifiedTime = result;
117078
117078
  else
117079
- state.filesWatched.set(path2, result);
117079
+ state.filesWatched.set(path4, result);
117080
117080
  }
117081
117081
  return result;
117082
117082
  }
117083
117083
  function watchFile(state, file, callback, pollingInterval, options, watchType, project) {
117084
- const path2 = toPath2(state, file);
117085
- const existing = state.filesWatched.get(path2);
117084
+ const path4 = toPath2(state, file);
117085
+ const existing = state.filesWatched.get(path4);
117086
117086
  if (existing && isFileWatcherWithModifiedTime(existing)) {
117087
117087
  existing.callbacks.push(callback);
117088
117088
  } else {
117089
117089
  const watcher = state.watchFile(file, (fileName, eventKind, modifiedTime) => {
117090
- const existing2 = Debug.checkDefined(state.filesWatched.get(path2));
117090
+ const existing2 = Debug.checkDefined(state.filesWatched.get(path4));
117091
117091
  Debug.assert(isFileWatcherWithModifiedTime(existing2));
117092
117092
  existing2.modifiedTime = modifiedTime;
117093
117093
  existing2.callbacks.forEach((cb) => cb(fileName, eventKind, modifiedTime));
117094
117094
  }, pollingInterval, options, watchType, project);
117095
- state.filesWatched.set(path2, { callbacks: [callback], watcher, modifiedTime: existing });
117095
+ state.filesWatched.set(path4, { callbacks: [callback], watcher, modifiedTime: existing });
117096
117096
  }
117097
117097
  return {
117098
117098
  close: () => {
117099
- const existing2 = Debug.checkDefined(state.filesWatched.get(path2));
117099
+ const existing2 = Debug.checkDefined(state.filesWatched.get(path4));
117100
117100
  Debug.assert(isFileWatcherWithModifiedTime(existing2));
117101
117101
  if (existing2.callbacks.length === 1) {
117102
- state.filesWatched.delete(path2);
117102
+ state.filesWatched.delete(path4);
117103
117103
  closeFileWatcherOf(existing2);
117104
117104
  } else {
117105
117105
  unorderedRemoveItem(existing2.callbacks, callback);
@@ -117116,19 +117116,19 @@ ${lanes.join(`
117116
117116
  return result;
117117
117117
  }
117118
117118
  function getBuildInfoCacheEntry(state, buildInfoPath, resolvedConfigPath) {
117119
- const path2 = toPath2(state, buildInfoPath);
117119
+ const path4 = toPath2(state, buildInfoPath);
117120
117120
  const existing = state.buildInfoCache.get(resolvedConfigPath);
117121
- return (existing == null ? undefined : existing.path) === path2 ? existing : undefined;
117121
+ return (existing == null ? undefined : existing.path) === path4 ? existing : undefined;
117122
117122
  }
117123
117123
  function getBuildInfo3(state, buildInfoPath, resolvedConfigPath, modifiedTime) {
117124
- const path2 = toPath2(state, buildInfoPath);
117124
+ const path4 = toPath2(state, buildInfoPath);
117125
117125
  const existing = state.buildInfoCache.get(resolvedConfigPath);
117126
- if (existing !== undefined && existing.path === path2) {
117126
+ if (existing !== undefined && existing.path === path4) {
117127
117127
  return existing.buildInfo || undefined;
117128
117128
  }
117129
117129
  const value = state.readFileWithCache(buildInfoPath);
117130
117130
  const buildInfo = value ? getBuildInfo(buildInfoPath, value) : undefined;
117131
- state.buildInfoCache.set(resolvedConfigPath, { path: path2, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
117131
+ state.buildInfoCache.set(resolvedConfigPath, { path: path4, buildInfo: buildInfo || false, modifiedTime: modifiedTime || missingFileModifiedTime });
117132
117132
  return buildInfo;
117133
117133
  }
117134
117134
  function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
@@ -117292,11 +117292,11 @@ ${lanes.join(`
117292
117292
  for (const output of outputs) {
117293
117293
  if (output === buildInfoPath)
117294
117294
  continue;
117295
- const path2 = toPath2(state, output);
117296
- let outputTime = outputTimeStampMap == null ? undefined : outputTimeStampMap.get(path2);
117295
+ const path4 = toPath2(state, output);
117296
+ let outputTime = outputTimeStampMap == null ? undefined : outputTimeStampMap.get(path4);
117297
117297
  if (!outputTime) {
117298
117298
  outputTime = getModifiedTime(state.host, output);
117299
- outputTimeStampMap == null || outputTimeStampMap.set(path2, outputTime);
117299
+ outputTimeStampMap == null || outputTimeStampMap.set(path4, outputTime);
117300
117300
  }
117301
117301
  if (outputTime === missingFileModifiedTime) {
117302
117302
  return {
@@ -117350,7 +117350,7 @@ ${lanes.join(`
117350
117350
  if (extendedConfigStatus)
117351
117351
  return extendedConfigStatus;
117352
117352
  const packageJsonLookups = state.lastCachedPackageJsonLookups.get(resolvedPath);
117353
- const dependentPackageFileStatus = packageJsonLookups && forEachKey(packageJsonLookups, (path2) => checkConfigFileUpToDateStatus(state, path2, oldestOutputFileTime, oldestOutputFileName));
117353
+ const dependentPackageFileStatus = packageJsonLookups && forEachKey(packageJsonLookups, (path4) => checkConfigFileUpToDateStatus(state, path4, oldestOutputFileTime, oldestOutputFileName));
117354
117354
  if (dependentPackageFileStatus)
117355
117355
  return dependentPackageFileStatus;
117356
117356
  return {
@@ -117402,8 +117402,8 @@ ${lanes.join(`
117402
117402
  if (!skipOutputs || outputs.length !== skipOutputs.size) {
117403
117403
  let reportVerbose = !!state.options.verbose;
117404
117404
  for (const file of outputs) {
117405
- const path2 = toPath2(state, file);
117406
- if (skipOutputs == null ? undefined : skipOutputs.has(path2))
117405
+ const path4 = toPath2(state, file);
117406
+ if (skipOutputs == null ? undefined : skipOutputs.has(path4))
117407
117407
  continue;
117408
117408
  if (reportVerbose) {
117409
117409
  reportVerbose = false;
@@ -117413,8 +117413,8 @@ ${lanes.join(`
117413
117413
  if (file === buildInfoPath)
117414
117414
  getBuildInfoCacheEntry(state, buildInfoPath, projectPath).modifiedTime = now;
117415
117415
  else if (outputTimeStampMap) {
117416
- outputTimeStampMap.set(path2, now);
117417
- modifiedOutputs.add(path2);
117416
+ outputTimeStampMap.set(path4, now);
117417
+ modifiedOutputs.add(path4);
117418
117418
  }
117419
117419
  }
117420
117420
  }
@@ -117728,8 +117728,8 @@ ${lanes.join(`
117728
117728
  close: () => stopWatching(state)
117729
117729
  };
117730
117730
  }
117731
- function relName(state, path2) {
117732
- return convertToRelativePath(path2, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
117731
+ function relName(state, path4) {
117732
+ return convertToRelativePath(path4, state.compilerHost.getCurrentDirectory(), state.compilerHost.getCanonicalFileName);
117733
117733
  }
117734
117734
  function reportStatus(state, message, ...args) {
117735
117735
  state.host.reportSolutionBuilderStatus(createCompilerDiagnostic(message, ...args));
@@ -117870,12 +117870,12 @@ ${lanes.join(`
117870
117870
  } else if (file.isDeclarationFile) {
117871
117871
  return "Definitions";
117872
117872
  }
117873
- const path2 = file.path;
117874
- if (fileExtensionIsOneOf(path2, supportedTSExtensionsFlat)) {
117873
+ const path4 = file.path;
117874
+ if (fileExtensionIsOneOf(path4, supportedTSExtensionsFlat)) {
117875
117875
  return "TypeScript";
117876
- } else if (fileExtensionIsOneOf(path2, supportedJSExtensionsFlat)) {
117876
+ } else if (fileExtensionIsOneOf(path4, supportedJSExtensionsFlat)) {
117877
117877
  return "JavaScript";
117878
- } else if (fileExtensionIs(path2, ".json")) {
117878
+ } else if (fileExtensionIs(path4, ".json")) {
117879
117879
  return "JSON";
117880
117880
  } else {
117881
117881
  return "Other";
@@ -118308,7 +118308,7 @@ ${lanes.join(`
118308
118308
  return performBuild(system, cb, buildOptions, watchOptions, projects, errors);
118309
118309
  }
118310
118310
  }
118311
- const commandLine = parseCommandLine(commandLineArgs, (path2) => system.readFile(path2));
118311
+ const commandLine = parseCommandLine(commandLineArgs, (path4) => system.readFile(path4));
118312
118312
  if (commandLine.options.generateCpuProfile && system.enableCPUProfiler) {
118313
118313
  system.enableCPUProfiler(commandLine.options.generateCpuProfile, () => executeCommandLineWorker(system, cb, commandLine));
118314
118314
  } else {
@@ -119637,12 +119637,12 @@ ${lanes.join(`
119637
119637
  return nodeCoreModules.has(moduleName) ? "node" : moduleName;
119638
119638
  }
119639
119639
  function loadSafeList(host, safeListPath) {
119640
- const result = readConfigFile(safeListPath, (path2) => host.readFile(path2));
119640
+ const result = readConfigFile(safeListPath, (path4) => host.readFile(path4));
119641
119641
  return new Map(Object.entries(result.config));
119642
119642
  }
119643
119643
  function loadTypesMap(host, typesMapPath) {
119644
119644
  var _a;
119645
- const result = readConfigFile(typesMapPath, (path2) => host.readFile(path2));
119645
+ const result = readConfigFile(typesMapPath, (path4) => host.readFile(path4));
119646
119646
  if ((_a = result.config) == null ? undefined : _a.simpleMap) {
119647
119647
  return new Map(Object.entries(result.config.simpleMap));
119648
119648
  }
@@ -119654,9 +119654,9 @@ ${lanes.join(`
119654
119654
  }
119655
119655
  const inferredTypings = /* @__PURE__ */ new Map;
119656
119656
  fileNames = mapDefined(fileNames, (fileName) => {
119657
- const path2 = normalizePath(fileName);
119658
- if (hasJSFileExtension(path2)) {
119659
- return path2;
119657
+ const path4 = normalizePath(fileName);
119658
+ if (hasJSFileExtension(path4)) {
119659
+ return path4;
119660
119660
  }
119661
119661
  });
119662
119662
  const filesToWatch = [];
@@ -119718,7 +119718,7 @@ ${lanes.join(`
119718
119718
  let manifestTypingNames;
119719
119719
  if (host.fileExists(manifestPath)) {
119720
119720
  filesToWatch2.push(manifestPath);
119721
- manifest = readConfigFile(manifestPath, (path2) => host.readFile(path2)).config;
119721
+ manifest = readConfigFile(manifestPath, (path4) => host.readFile(path4)).config;
119722
119722
  manifestTypingNames = flatMap([manifest.dependencies, manifest.devDependencies, manifest.optionalDependencies, manifest.peerDependencies], getOwnKeys);
119723
119723
  addInferredTypings(manifestTypingNames, `Typing names in '${manifestPath}' dependencies`);
119724
119724
  }
@@ -119740,7 +119740,7 @@ ${lanes.join(`
119740
119740
  log(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`);
119741
119741
  for (const manifestPath2 of dependencyManifestNames) {
119742
119742
  const normalizedFileName = normalizePath(manifestPath2);
119743
- const result2 = readConfigFile(normalizedFileName, (path2) => host.readFile(path2));
119743
+ const result2 = readConfigFile(normalizedFileName, (path4) => host.readFile(path4));
119744
119744
  const manifest2 = result2.config;
119745
119745
  if (!manifest2.name) {
119746
119746
  continue;
@@ -122277,14 +122277,14 @@ ${lanes.join(`
122277
122277
  function tryGetDirectories(host, directoryName) {
122278
122278
  return tryIOAndConsumeErrors(host, host.getDirectories, directoryName) || [];
122279
122279
  }
122280
- function tryReadDirectory(host, path2, extensions, exclude, include) {
122281
- return tryIOAndConsumeErrors(host, host.readDirectory, path2, extensions, exclude, include) || emptyArray;
122280
+ function tryReadDirectory(host, path4, extensions, exclude, include) {
122281
+ return tryIOAndConsumeErrors(host, host.readDirectory, path4, extensions, exclude, include) || emptyArray;
122282
122282
  }
122283
- function tryFileExists(host, path2) {
122284
- return tryIOAndConsumeErrors(host, host.fileExists, path2);
122283
+ function tryFileExists(host, path4) {
122284
+ return tryIOAndConsumeErrors(host, host.fileExists, path4);
122285
122285
  }
122286
- function tryDirectoryExists(host, path2) {
122287
- return tryAndIgnoreErrors(() => directoryProbablyExists(path2, host)) || false;
122286
+ function tryDirectoryExists(host, path4) {
122287
+ return tryAndIgnoreErrors(() => directoryProbablyExists(path4, host)) || false;
122288
122288
  }
122289
122289
  function tryAndIgnoreErrors(cb) {
122290
122290
  try {
@@ -123060,12 +123060,12 @@ ${lanes.join(`
123060
123060
  function getIsExcluded(excludePatterns, host) {
123061
123061
  var _a;
123062
123062
  const realpathsWithSymlinks = (_a = host.getSymlinkCache) == null ? undefined : _a.call(host).getSymlinkedDirectoriesByRealpath();
123063
- return ({ fileName, path: path2 }) => {
123063
+ return ({ fileName, path: path4 }) => {
123064
123064
  if (excludePatterns.some((p) => p.test(fileName)))
123065
123065
  return true;
123066
123066
  if ((realpathsWithSymlinks == null ? undefined : realpathsWithSymlinks.size) && pathContainsNodeModules(fileName)) {
123067
123067
  let dir = getDirectoryPath(fileName);
123068
- return forEachAncestorDirectoryStoppingAtGlobalCache(host, getDirectoryPath(path2), (dirPath) => {
123068
+ return forEachAncestorDirectoryStoppingAtGlobalCache(host, getDirectoryPath(path4), (dirPath) => {
123069
123069
  const symlinks = realpathsWithSymlinks.get(ensureTrailingDirectorySeparator(dirPath));
123070
123070
  if (symlinks) {
123071
123071
  return symlinks.some((s) => excludePatterns.some((p) => p.test(fileName.replace(dir, s))));
@@ -124465,27 +124465,27 @@ ${lanes.join(`
124465
124465
  return settingsOrHost;
124466
124466
  }
124467
124467
  function acquireDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
124468
- const path2 = toPath(fileName, currentDirectory, getCanonicalFileName);
124468
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
124469
124469
  const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
124470
- return acquireDocumentWithKey(fileName, path2, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
124470
+ return acquireDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
124471
124471
  }
124472
- function acquireDocumentWithKey(fileName, path2, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
124473
- return acquireOrUpdateDocument(fileName, path2, compilationSettings, key, scriptSnapshot, version2, true, scriptKind, languageVersionOrOptions);
124472
+ function acquireDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
124473
+ return acquireOrUpdateDocument(fileName, path4, compilationSettings, key, scriptSnapshot, version2, true, scriptKind, languageVersionOrOptions);
124474
124474
  }
124475
124475
  function updateDocument(fileName, compilationSettings, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
124476
- const path2 = toPath(fileName, currentDirectory, getCanonicalFileName);
124476
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
124477
124477
  const key = getKeyForCompilationSettings(getCompilationSettings(compilationSettings));
124478
- return updateDocumentWithKey(fileName, path2, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
124478
+ return updateDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions);
124479
124479
  }
124480
- function updateDocumentWithKey(fileName, path2, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
124481
- return acquireOrUpdateDocument(fileName, path2, getCompilationSettings(compilationSettings), key, scriptSnapshot, version2, false, scriptKind, languageVersionOrOptions);
124480
+ function updateDocumentWithKey(fileName, path4, compilationSettings, key, scriptSnapshot, version2, scriptKind, languageVersionOrOptions) {
124481
+ return acquireOrUpdateDocument(fileName, path4, getCompilationSettings(compilationSettings), key, scriptSnapshot, version2, false, scriptKind, languageVersionOrOptions);
124482
124482
  }
124483
124483
  function getDocumentRegistryEntry(bucketEntry, scriptKind) {
124484
124484
  const entry = isDocumentRegistryEntry(bucketEntry) ? bucketEntry : bucketEntry.get(Debug.checkDefined(scriptKind, "If there are more than one scriptKind's for same document the scriptKind should be provided"));
124485
124485
  Debug.assert(scriptKind === undefined || !entry || entry.sourceFile.scriptKind === scriptKind, `Script kind should match provided ScriptKind:${scriptKind} and sourceFile.scriptKind: ${entry == null ? undefined : entry.sourceFile.scriptKind}, !entry: ${!entry}`);
124486
124486
  return entry;
124487
124487
  }
124488
- function acquireOrUpdateDocument(fileName, path2, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) {
124488
+ function acquireOrUpdateDocument(fileName, path4, compilationSettingsOrHost, key, scriptSnapshot, version2, acquiring, scriptKind, languageVersionOrOptions) {
124489
124489
  var _a, _b, _c, _d;
124490
124490
  scriptKind = ensureScriptKind(fileName, scriptKind);
124491
124491
  const compilationSettings = getCompilationSettings(compilationSettingsOrHost);
@@ -124493,7 +124493,7 @@ ${lanes.join(`
124493
124493
  const scriptTarget = scriptKind === 6 ? 100 : getEmitScriptTarget(compilationSettings);
124494
124494
  const sourceFileOptions = typeof languageVersionOrOptions === "object" ? languageVersionOrOptions : {
124495
124495
  languageVersion: scriptTarget,
124496
- impliedNodeFormat: host && getImpliedNodeFormatForFile(path2, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? undefined : _a.call(host)) == null ? undefined : _b.getModuleResolutionCache) == null ? undefined : _c.call(_b)) == null ? undefined : _d.getPackageJsonInfoCache(), host, compilationSettings),
124496
+ impliedNodeFormat: host && getImpliedNodeFormatForFile(path4, (_d = (_c = (_b = (_a = host.getCompilerHost) == null ? undefined : _a.call(host)) == null ? undefined : _b.getModuleResolutionCache) == null ? undefined : _c.call(_b)) == null ? undefined : _d.getPackageJsonInfoCache(), host, compilationSettings),
124497
124497
  setExternalModuleIndicator: getSetExternalModuleIndicator(compilationSettings),
124498
124498
  jsDocParsingMode
124499
124499
  };
@@ -124506,15 +124506,15 @@ ${lanes.join(`
124506
124506
  if (buckets.size > oldBucketCount) {
124507
124507
  tracing.instant(tracing.Phase.Session, "createdDocumentRegistryBucket", { configFilePath: compilationSettings.configFilePath, key: keyWithMode });
124508
124508
  }
124509
- const otherBucketKey = !isDeclarationFileName(path2) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path2) && bucketKey);
124509
+ const otherBucketKey = !isDeclarationFileName(path4) && forEachEntry(buckets, (bucket2, bucketKey) => bucketKey !== keyWithMode && bucket2.has(path4) && bucketKey);
124510
124510
  if (otherBucketKey) {
124511
- tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path2, key1: otherBucketKey, key2: keyWithMode });
124511
+ tracing.instant(tracing.Phase.Session, "documentRegistryBucketOverlap", { path: path4, key1: otherBucketKey, key2: keyWithMode });
124512
124512
  }
124513
124513
  }
124514
- const bucketEntry = bucket.get(path2);
124514
+ const bucketEntry = bucket.get(path4);
124515
124515
  let entry = bucketEntry && getDocumentRegistryEntry(bucketEntry, scriptKind);
124516
124516
  if (!entry && externalCache) {
124517
- const sourceFile = externalCache.getDocument(keyWithMode, path2);
124517
+ const sourceFile = externalCache.getDocument(keyWithMode, path4);
124518
124518
  if (sourceFile && sourceFile.scriptKind === scriptKind && sourceFile.text === getSnapshotText(scriptSnapshot)) {
124519
124519
  Debug.assert(acquiring);
124520
124520
  entry = {
@@ -124527,7 +124527,7 @@ ${lanes.join(`
124527
124527
  if (!entry) {
124528
124528
  const sourceFile = createLanguageServiceSourceFile(fileName, scriptSnapshot, sourceFileOptions, version2, false, scriptKind);
124529
124529
  if (externalCache) {
124530
- externalCache.setDocument(keyWithMode, path2, sourceFile);
124530
+ externalCache.setDocument(keyWithMode, path4, sourceFile);
124531
124531
  }
124532
124532
  entry = {
124533
124533
  sourceFile,
@@ -124538,7 +124538,7 @@ ${lanes.join(`
124538
124538
  if (entry.sourceFile.version !== version2) {
124539
124539
  entry.sourceFile = updateLanguageServiceSourceFile(entry.sourceFile, scriptSnapshot, version2, scriptSnapshot.getChangeRange(entry.sourceFile.scriptSnapshot));
124540
124540
  if (externalCache) {
124541
- externalCache.setDocument(keyWithMode, path2, entry.sourceFile);
124541
+ externalCache.setDocument(keyWithMode, path4, entry.sourceFile);
124542
124542
  }
124543
124543
  }
124544
124544
  if (acquiring) {
@@ -124549,35 +124549,35 @@ ${lanes.join(`
124549
124549
  return entry.sourceFile;
124550
124550
  function setBucketEntry() {
124551
124551
  if (!bucketEntry) {
124552
- bucket.set(path2, entry);
124552
+ bucket.set(path4, entry);
124553
124553
  } else if (isDocumentRegistryEntry(bucketEntry)) {
124554
124554
  const scriptKindMap = /* @__PURE__ */ new Map;
124555
124555
  scriptKindMap.set(bucketEntry.sourceFile.scriptKind, bucketEntry);
124556
124556
  scriptKindMap.set(scriptKind, entry);
124557
- bucket.set(path2, scriptKindMap);
124557
+ bucket.set(path4, scriptKindMap);
124558
124558
  } else {
124559
124559
  bucketEntry.set(scriptKind, entry);
124560
124560
  }
124561
124561
  }
124562
124562
  }
124563
124563
  function releaseDocument(fileName, compilationSettings, scriptKind, impliedNodeFormat) {
124564
- const path2 = toPath(fileName, currentDirectory, getCanonicalFileName);
124564
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
124565
124565
  const key = getKeyForCompilationSettings(compilationSettings);
124566
- return releaseDocumentWithKey(path2, key, scriptKind, impliedNodeFormat);
124566
+ return releaseDocumentWithKey(path4, key, scriptKind, impliedNodeFormat);
124567
124567
  }
124568
- function releaseDocumentWithKey(path2, key, scriptKind, impliedNodeFormat) {
124568
+ function releaseDocumentWithKey(path4, key, scriptKind, impliedNodeFormat) {
124569
124569
  const bucket = Debug.checkDefined(buckets.get(getDocumentRegistryBucketKeyWithMode(key, impliedNodeFormat)));
124570
- const bucketEntry = bucket.get(path2);
124570
+ const bucketEntry = bucket.get(path4);
124571
124571
  const entry = getDocumentRegistryEntry(bucketEntry, scriptKind);
124572
124572
  entry.languageServiceRefCount--;
124573
124573
  Debug.assert(entry.languageServiceRefCount >= 0);
124574
124574
  if (entry.languageServiceRefCount === 0) {
124575
124575
  if (isDocumentRegistryEntry(bucketEntry)) {
124576
- bucket.delete(path2);
124576
+ bucket.delete(path4);
124577
124577
  } else {
124578
124578
  bucketEntry.delete(scriptKind);
124579
124579
  if (bucketEntry.size === 1) {
124580
- bucket.set(path2, firstDefinedIterator(bucketEntry.values(), identity));
124580
+ bucket.set(path4, firstDefinedIterator(bucketEntry.values(), identity));
124581
124581
  }
124582
124582
  }
124583
124583
  }
@@ -124613,10 +124613,10 @@ ${lanes.join(`
124613
124613
  }
124614
124614
  function getPathUpdater(oldFileOrDirPath, newFileOrDirPath, getCanonicalFileName, sourceMapper) {
124615
124615
  const canonicalOldPath = getCanonicalFileName(oldFileOrDirPath);
124616
- return (path2) => {
124617
- const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path2, pos: 0 });
124618
- const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path2);
124619
- return originalPath ? updatedPath === undefined ? undefined : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path2, getCanonicalFileName) : updatedPath;
124616
+ return (path4) => {
124617
+ const originalPath = sourceMapper && sourceMapper.tryGetSourcePosition({ fileName: path4, pos: 0 });
124618
+ const updatedPath = getUpdatedPath(originalPath ? originalPath.fileName : path4);
124619
+ return originalPath ? updatedPath === undefined ? undefined : makeCorrespondingRelativeChange(originalPath.fileName, updatedPath, path4, getCanonicalFileName) : updatedPath;
124620
124620
  };
124621
124621
  function getUpdatedPath(pathToUpdate) {
124622
124622
  if (getCanonicalFileName(pathToUpdate) === canonicalOldPath)
@@ -124692,8 +124692,8 @@ ${lanes.join(`
124692
124692
  }
124693
124693
  return false;
124694
124694
  }
124695
- function relativePath(path2) {
124696
- return getRelativePathFromDirectory(configDir, path2, !useCaseSensitiveFileNames2);
124695
+ function relativePath(path4) {
124696
+ return getRelativePathFromDirectory(configDir, path4, !useCaseSensitiveFileNames2);
124697
124697
  }
124698
124698
  }
124699
124699
  function updateImports(program, changeTracker, oldToNew, newToOld, host, getCanonicalFileName) {
@@ -125426,8 +125426,8 @@ ${lanes.join(`
125426
125426
  return toPath(fileName, currentDirectory, getCanonicalFileName);
125427
125427
  }
125428
125428
  function getDocumentPositionMapper2(generatedFileName, sourceFileName) {
125429
- const path2 = toPath3(generatedFileName);
125430
- const value = documentPositionMappers.get(path2);
125429
+ const path4 = toPath3(generatedFileName);
125430
+ const value = documentPositionMappers.get(path4);
125431
125431
  if (value)
125432
125432
  return value;
125433
125433
  let mapper;
@@ -125437,7 +125437,7 @@ ${lanes.join(`
125437
125437
  const file = getSourceFileLike(generatedFileName);
125438
125438
  mapper = file && getDocumentPositionMapper({ getSourceFileLike, getCanonicalFileName, log: (s) => host.log(s) }, generatedFileName, getLineInfo(file.text, getLineStarts(file)), (f) => !host.fileExists || host.fileExists(f) ? host.readFile(f) : undefined);
125439
125439
  }
125440
- documentPositionMappers.set(path2, mapper || identitySourceMapConsumer);
125440
+ documentPositionMappers.set(path4, mapper || identitySourceMapConsumer);
125441
125441
  return mapper || identitySourceMapConsumer;
125442
125442
  }
125443
125443
  function tryGetSourcePosition(info) {
@@ -125471,22 +125471,22 @@ ${lanes.join(`
125471
125471
  const program = host.getProgram();
125472
125472
  if (!program)
125473
125473
  return;
125474
- const path2 = toPath3(fileName);
125475
- const file = program.getSourceFileByPath(path2);
125476
- return file && file.resolvedPath === path2 ? file : undefined;
125474
+ const path4 = toPath3(fileName);
125475
+ const file = program.getSourceFileByPath(path4);
125476
+ return file && file.resolvedPath === path4 ? file : undefined;
125477
125477
  }
125478
125478
  function getOrCreateSourceFileLike(fileName) {
125479
- const path2 = toPath3(fileName);
125480
- const fileFromCache = sourceFileLike.get(path2);
125479
+ const path4 = toPath3(fileName);
125480
+ const fileFromCache = sourceFileLike.get(path4);
125481
125481
  if (fileFromCache !== undefined)
125482
125482
  return fileFromCache ? fileFromCache : undefined;
125483
125483
  if (!host.readFile || host.fileExists && !host.fileExists(fileName)) {
125484
- sourceFileLike.set(path2, false);
125484
+ sourceFileLike.set(path4, false);
125485
125485
  return;
125486
125486
  }
125487
125487
  const text = host.readFile(fileName);
125488
125488
  const file = text ? createSourceFileLike(text) : false;
125489
- sourceFileLike.set(path2, file);
125489
+ sourceFileLike.set(path4, file);
125490
125490
  return file ? file : undefined;
125491
125491
  }
125492
125492
  function getSourceFileLike(fileName) {
@@ -132363,12 +132363,12 @@ ${newComment.split(`
132363
132363
  directoryExists: (directoryName) => {
132364
132364
  return directoryProbablyExists(directoryName, host);
132365
132365
  },
132366
- getDirectories: (path2) => {
132367
- return host.getDirectories ? host.getDirectories(path2) : [];
132366
+ getDirectories: (path4) => {
132367
+ return host.getDirectories ? host.getDirectories(path4) : [];
132368
132368
  },
132369
- readDirectory: (path2, extensions, exclude, include, depth) => {
132369
+ readDirectory: (path4, extensions, exclude, include, depth) => {
132370
132370
  Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
132371
- return host.readDirectory(path2, extensions, exclude, include, depth);
132371
+ return host.readDirectory(path4, extensions, exclude, include, depth);
132372
132372
  },
132373
132373
  onReleaseOldSourceFile,
132374
132374
  onReleaseParsedCommandLine,
@@ -132427,12 +132427,12 @@ ${newComment.split(`
132427
132427
  program.getTypeChecker();
132428
132428
  return;
132429
132429
  function getParsedCommandLine(fileName) {
132430
- const path2 = toPath(fileName, currentDirectory, getCanonicalFileName);
132431
- const existing = parsedCommandLines == null ? undefined : parsedCommandLines.get(path2);
132430
+ const path4 = toPath(fileName, currentDirectory, getCanonicalFileName);
132431
+ const existing = parsedCommandLines == null ? undefined : parsedCommandLines.get(path4);
132432
132432
  if (existing !== undefined)
132433
132433
  return existing || undefined;
132434
132434
  const result = host.getParsedCommandLine ? host.getParsedCommandLine(fileName) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName);
132435
- (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map)).set(path2, result || false);
132435
+ (parsedCommandLines || (parsedCommandLines = /* @__PURE__ */ new Map)).set(path4, result || false);
132436
132436
  return result;
132437
132437
  }
132438
132438
  function getParsedCommandLineOfConfigFileUsingSourceFile(configFileName) {
@@ -132464,7 +132464,7 @@ ${newComment.split(`
132464
132464
  function getOrCreateSourceFile(fileName, languageVersionOrOptions, onError, shouldCreateNewSourceFile) {
132465
132465
  return getOrCreateSourceFileByPath(fileName, toPath(fileName, currentDirectory, getCanonicalFileName), languageVersionOrOptions, onError, shouldCreateNewSourceFile);
132466
132466
  }
132467
- function getOrCreateSourceFileByPath(fileName, path2, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
132467
+ function getOrCreateSourceFileByPath(fileName, path4, languageVersionOrOptions, _onError, shouldCreateNewSourceFile) {
132468
132468
  Debug.assert(compilerHost, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
132469
132469
  const scriptSnapshot = host.getScriptSnapshot(fileName);
132470
132470
  if (!scriptSnapshot) {
@@ -132473,17 +132473,17 @@ ${newComment.split(`
132473
132473
  const scriptKind = getScriptKind(fileName, host);
132474
132474
  const scriptVersion = host.getScriptVersion(fileName);
132475
132475
  if (!shouldCreateNewSourceFile) {
132476
- const oldSourceFile = program && program.getSourceFileByPath(path2);
132476
+ const oldSourceFile = program && program.getSourceFileByPath(path4);
132477
132477
  if (oldSourceFile) {
132478
132478
  if (scriptKind === oldSourceFile.scriptKind || releasedScriptKinds.has(oldSourceFile.resolvedPath)) {
132479
- return documentRegistry.updateDocumentWithKey(fileName, path2, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
132479
+ return documentRegistry.updateDocumentWithKey(fileName, path4, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
132480
132480
  } else {
132481
132481
  documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program.getCompilerOptions()), oldSourceFile.scriptKind, oldSourceFile.impliedNodeFormat);
132482
132482
  releasedScriptKinds.add(oldSourceFile.resolvedPath);
132483
132483
  }
132484
132484
  }
132485
132485
  }
132486
- return documentRegistry.acquireDocumentWithKey(fileName, path2, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
132486
+ return documentRegistry.acquireDocumentWithKey(fileName, path4, host, documentRegistryBucketKey, scriptSnapshot, scriptVersion, scriptKind, languageVersionOrOptions);
132487
132487
  }
132488
132488
  }
132489
132489
  function getProgram() {
@@ -133017,7 +133017,7 @@ ${newComment.split(`
133017
133017
  return isArray(action) ? Promise.all(action.map((a) => applySingleCodeActionCommand(a))) : applySingleCodeActionCommand(action);
133018
133018
  }
133019
133019
  function applySingleCodeActionCommand(action) {
133020
- const getPath = (path2) => toPath(path2, currentDirectory, getCanonicalFileName);
133020
+ const getPath = (path4) => toPath(path4, currentDirectory, getCanonicalFileName);
133021
133021
  Debug.assertEqual(action.type, "install package");
133022
133022
  return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
133023
133023
  }
@@ -133350,8 +133350,8 @@ ${newComment.split(`
133350
133350
  function isLetterOrDigit(char) {
133351
133351
  return char >= 97 && char <= 122 || char >= 65 && char <= 90 || char >= 48 && char <= 57;
133352
133352
  }
133353
- function isNodeModulesFile(path2) {
133354
- return path2.includes("/node_modules/");
133353
+ function isNodeModulesFile(path4) {
133354
+ return path4.includes("/node_modules/");
133355
133355
  }
133356
133356
  }
133357
133357
  function getRenameInfo2(fileName, position, preferences) {
@@ -144063,13 +144063,13 @@ ${newComment.split(`
144063
144063
  }
144064
144064
  });
144065
144065
  }
144066
- function generateJSDocParamTagsForDestructuring(path2, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
144066
+ function generateJSDocParamTagsForDestructuring(path4, pattern, initializer, dotDotDotToken, isJs, isSnippet, checker, options, preferences) {
144067
144067
  if (!isJs) {
144068
144068
  return [
144069
- getJSDocParamAnnotation(path2, initializer, dotDotDotToken, isJs, false, isSnippet, checker, options, preferences, { tabstop: 1 })
144069
+ getJSDocParamAnnotation(path4, initializer, dotDotDotToken, isJs, false, isSnippet, checker, options, preferences, { tabstop: 1 })
144070
144070
  ];
144071
144071
  }
144072
- return patternWorker(path2, pattern, initializer, dotDotDotToken, { tabstop: 1 });
144072
+ return patternWorker(path4, pattern, initializer, dotDotDotToken, { tabstop: 1 });
144073
144073
  function patternWorker(path22, pattern2, initializer2, dotDotDotToken2, counter) {
144074
144074
  if (isObjectBindingPattern(pattern2) && !dotDotDotToken2) {
144075
144075
  const oldTabstop = counter.tabstop;
@@ -147878,17 +147878,17 @@ ${newComment.split(`
147878
147878
  function getFragmentDirectory(fragment) {
147879
147879
  return containsSlash(fragment) ? hasTrailingDirectorySeparator(fragment) ? fragment : getDirectoryPath(fragment) : undefined;
147880
147880
  }
147881
- function getCompletionsForPathMapping(path2, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost) {
147882
- const parsedPath = tryParsePattern(path2);
147881
+ function getCompletionsForPathMapping(path4, patterns, fragment, packageDirectory, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost) {
147882
+ const parsedPath = tryParsePattern(path4);
147883
147883
  if (!parsedPath) {
147884
147884
  return emptyArray;
147885
147885
  }
147886
147886
  if (typeof parsedPath === "string") {
147887
- return justPathMappingName(path2, "script");
147887
+ return justPathMappingName(path4, "script");
147888
147888
  }
147889
147889
  const remainingFragment = tryRemovePrefix(fragment, parsedPath.prefix);
147890
147890
  if (remainingFragment === undefined) {
147891
- const starIsFullPathComponent = endsWith(path2, "/*");
147891
+ const starIsFullPathComponent = endsWith(path4, "/*");
147892
147892
  return starIsFullPathComponent ? justPathMappingName(parsedPath.prefix, "directory") : flatMap(patterns, (pattern) => {
147893
147893
  var _a;
147894
147894
  return (_a = getModulesForPathsPattern("", packageDirectory, pattern, extensionOptions, isExports, isImports, program, host, moduleSpecifierResolutionHost)) == null ? undefined : _a.map(({ name, ...rest }) => ({ name: parsedPath.prefix + name + parsedPath.suffix, ...rest }));
@@ -147963,9 +147963,9 @@ ${newComment.split(`
147963
147963
  function getDirectoryMatches(directoryName) {
147964
147964
  return mapDefined(tryGetDirectories(host, directoryName), (dir) => dir === "node_modules" ? undefined : directoryResult(dir));
147965
147965
  }
147966
- function trimPrefixAndSuffix(path2, prefix) {
147966
+ function trimPrefixAndSuffix(path4, prefix) {
147967
147967
  return firstDefined(matchingSuffixes, (suffix) => {
147968
- const inner = withoutStartAndEnd(normalizePath(path2), prefix, suffix);
147968
+ const inner = withoutStartAndEnd(normalizePath(path4), prefix, suffix);
147969
147969
  return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner);
147970
147970
  });
147971
147971
  }
@@ -147973,8 +147973,8 @@ ${newComment.split(`
147973
147973
  function withoutStartAndEnd(s, start, end) {
147974
147974
  return startsWith(s, start) && endsWith(s, end) ? s.slice(start.length, s.length - end.length) : undefined;
147975
147975
  }
147976
- function removeLeadingDirectorySeparator(path2) {
147977
- return path2[0] === directorySeparator ? path2.slice(1) : path2;
147976
+ function removeLeadingDirectorySeparator(path4) {
147977
+ return path4[0] === directorySeparator ? path4.slice(1) : path4;
147978
147978
  }
147979
147979
  function getAmbientModuleCompletions(fragment, fragmentDirectory, checker) {
147980
147980
  const ambientModules = checker.getAmbientModules().map((sym) => stripQuotes(sym.name));
@@ -148062,10 +148062,10 @@ ${newComment.split(`
148062
148062
  const length2 = text.length - offset;
148063
148063
  return length2 === 0 || isIdentifierText(text.substr(offset, length2), 99) ? undefined : createTextSpan(textStart + offset, length2);
148064
148064
  }
148065
- function isPathRelativeToScript(path2) {
148066
- if (path2 && path2.length >= 2 && path2.charCodeAt(0) === 46) {
148067
- const slashIndex = path2.length >= 3 && path2.charCodeAt(1) === 46 ? 2 : 1;
148068
- const slashCharCode = path2.charCodeAt(slashIndex);
148065
+ function isPathRelativeToScript(path4) {
148066
+ if (path4 && path4.length >= 2 && path4.charCodeAt(0) === 46) {
148067
+ const slashIndex = path4.length >= 3 && path4.charCodeAt(1) === 46 ? 2 : 1;
148068
+ const slashCharCode = path4.charCodeAt(slashIndex);
148069
148069
  return slashCharCode === 47 || slashCharCode === 92;
148070
148070
  }
148071
148071
  return false;
@@ -161113,17 +161113,17 @@ ${options.prefix}` : `
161113
161113
  function createNormalizedPathMap() {
161114
161114
  const map2 = /* @__PURE__ */ new Map;
161115
161115
  return {
161116
- get(path2) {
161117
- return map2.get(path2);
161116
+ get(path4) {
161117
+ return map2.get(path4);
161118
161118
  },
161119
- set(path2, value) {
161120
- map2.set(path2, value);
161119
+ set(path4, value) {
161120
+ map2.set(path4, value);
161121
161121
  },
161122
- contains(path2) {
161123
- return map2.has(path2);
161122
+ contains(path4) {
161123
+ return map2.has(path4);
161124
161124
  },
161125
- remove(path2) {
161126
- map2.delete(path2);
161125
+ remove(path4) {
161126
+ map2.delete(path4);
161127
161127
  }
161128
161128
  };
161129
161129
  }
@@ -161599,12 +161599,12 @@ ${options.prefix}` : `
161599
161599
  return fileName[0] === "^" || (fileName.includes("walkThroughSnippet:/") || fileName.includes("untitled:/")) && getBaseFileName(fileName)[0] === "^" || fileName.includes(":^") && !fileName.includes(directorySeparator);
161600
161600
  }
161601
161601
  var ScriptInfo = class {
161602
- constructor(host, fileName, scriptKind, hasMixedContent, path2, initialVersion) {
161602
+ constructor(host, fileName, scriptKind, hasMixedContent, path4, initialVersion) {
161603
161603
  this.host = host;
161604
161604
  this.fileName = fileName;
161605
161605
  this.scriptKind = scriptKind;
161606
161606
  this.hasMixedContent = hasMixedContent;
161607
- this.path = path2;
161607
+ this.path = path4;
161608
161608
  this.containingProjects = [];
161609
161609
  this.isDynamic = isDynamicFileName(fileName);
161610
161610
  this.textStorage = new TextStorage(host, this, initialVersion);
@@ -162172,8 +162172,8 @@ ${options.prefix}` : `
162172
162172
  useCaseSensitiveFileNames() {
162173
162173
  return this.projectService.host.useCaseSensitiveFileNames;
162174
162174
  }
162175
- readDirectory(path2, extensions, exclude, include, depth) {
162176
- return this.directoryStructureHost.readDirectory(path2, extensions, exclude, include, depth);
162175
+ readDirectory(path4, extensions, exclude, include, depth) {
162176
+ return this.directoryStructureHost.readDirectory(path4, extensions, exclude, include, depth);
162177
162177
  }
162178
162178
  readFile(fileName) {
162179
162179
  return this.projectService.host.readFile(fileName);
@@ -162182,8 +162182,8 @@ ${options.prefix}` : `
162182
162182
  return this.projectService.host.writeFile(fileName, content);
162183
162183
  }
162184
162184
  fileExists(file) {
162185
- const path2 = this.toPath(file);
162186
- return !!this.projectService.getScriptInfoForPath(path2) || !this.isWatchedMissingFile(path2) && this.directoryStructureHost.fileExists(file);
162185
+ const path4 = this.toPath(file);
162186
+ return !!this.projectService.getScriptInfoForPath(path4) || !this.isWatchedMissingFile(path4) && this.directoryStructureHost.fileExists(file);
162187
162187
  }
162188
162188
  resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) {
162189
162189
  return this.resolutionCache.resolveModuleNameLiterals(moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames);
@@ -162197,11 +162197,11 @@ ${options.prefix}` : `
162197
162197
  resolveLibrary(libraryName, resolveFrom, options, libFileName) {
162198
162198
  return this.resolutionCache.resolveLibrary(libraryName, resolveFrom, options, libFileName);
162199
162199
  }
162200
- directoryExists(path2) {
162201
- return this.directoryStructureHost.directoryExists(path2);
162200
+ directoryExists(path4) {
162201
+ return this.directoryStructureHost.directoryExists(path4);
162202
162202
  }
162203
- getDirectories(path2) {
162204
- return this.directoryStructureHost.getDirectories(path2);
162203
+ getDirectories(path4) {
162204
+ return this.directoryStructureHost.getDirectories(path4);
162205
162205
  }
162206
162206
  getCachedDirectoryStructureHost() {
162207
162207
  return;
@@ -162378,15 +162378,15 @@ ${options.prefix}` : `
162378
162378
  }
162379
162379
  }));
162380
162380
  }
162381
- getSourceFile(path2) {
162381
+ getSourceFile(path4) {
162382
162382
  if (!this.program) {
162383
162383
  return;
162384
162384
  }
162385
- return this.program.getSourceFileByPath(path2);
162385
+ return this.program.getSourceFileByPath(path4);
162386
162386
  }
162387
- getSourceFileOrConfigFile(path2) {
162387
+ getSourceFileOrConfigFile(path4) {
162388
162388
  const options = this.program.getCompilerOptions();
162389
- return path2 === options.configFilePath ? options.configFile : this.getSourceFile(path2);
162389
+ return path4 === options.configFilePath ? options.configFile : this.getSourceFile(path4);
162390
162390
  }
162391
162391
  close() {
162392
162392
  var _a;
@@ -162561,8 +162561,8 @@ ${options.prefix}` : `
162561
162561
  this.markAsDirty();
162562
162562
  }
162563
162563
  addMissingFileRoot(fileName) {
162564
- const path2 = this.projectService.toPath(fileName);
162565
- this.rootFilesMap.set(path2, { fileName });
162564
+ const path4 = this.projectService.toPath(fileName);
162565
+ this.rootFilesMap.set(path4, { fileName });
162566
162566
  this.markAsDirty();
162567
162567
  }
162568
162568
  removeFile(info, fileExists, detachFromProject) {
@@ -162708,12 +162708,12 @@ ${options.prefix}` : `
162708
162708
  if (!this.typingWatchers)
162709
162709
  this.typingWatchers = /* @__PURE__ */ new Map;
162710
162710
  this.typingWatchers.isInvoked = false;
162711
- const createProjectWatcher = (path2, typingsWatcherType) => {
162712
- const canonicalPath = this.toPath(path2);
162711
+ const createProjectWatcher = (path4, typingsWatcherType) => {
162712
+ const canonicalPath = this.toPath(path4);
162713
162713
  toRemove.delete(canonicalPath);
162714
162714
  if (!this.typingWatchers.has(canonicalPath)) {
162715
162715
  const watchType = typingsWatcherType === "FileWatcher" ? WatchType.TypingInstallerLocationFile : WatchType.TypingInstallerLocationDirectory;
162716
- this.typingWatchers.set(canonicalPath, canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === "FileWatcher" ? this.projectService.watchFactory.watchFile(path2, () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`), 2000, this.projectService.getWatchOptions(this), watchType, this) : this.projectService.watchFactory.watchDirectory(path2, (f) => {
162716
+ this.typingWatchers.set(canonicalPath, canWatchDirectoryOrFilePath(canonicalPath) ? typingsWatcherType === "FileWatcher" ? this.projectService.watchFactory.watchFile(path4, () => !this.typingWatchers.isInvoked ? this.onTypingInstallerWatchInvoke() : this.writeLog(`TypingWatchers already invoked`), 2000, this.projectService.getWatchOptions(this), watchType, this) : this.projectService.watchFactory.watchDirectory(path4, (f) => {
162717
162717
  if (this.typingWatchers.isInvoked)
162718
162718
  return this.writeLog(`TypingWatchers already invoked`);
162719
162719
  if (!fileExtensionIs(f, ".json"))
@@ -162721,7 +162721,7 @@ ${options.prefix}` : `
162721
162721
  if (comparePaths(f, combinePaths(this.projectService.typingsInstaller.globalTypingsCacheLocation, "package.json"), !this.useCaseSensitiveFileNames()))
162722
162722
  return this.writeLog(`Ignoring package.json change at global typings location`);
162723
162723
  this.onTypingInstallerWatchInvoke();
162724
- }, 1, this.projectService.getWatchOptions(this), watchType, this) : (this.writeLog(`Skipping watcher creation at ${path2}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher));
162724
+ }, 1, this.projectService.getWatchOptions(this), watchType, this) : (this.writeLog(`Skipping watcher creation at ${path4}:: ${getDetailWatchInfo(watchType, this)}`), noopFileWatcher));
162725
162725
  }
162726
162726
  };
162727
162727
  for (const file of files) {
@@ -162745,9 +162745,9 @@ ${options.prefix}` : `
162745
162745
  }
162746
162746
  createProjectWatcher(file, "DirectoryWatcher");
162747
162747
  }
162748
- toRemove.forEach((watch, path2) => {
162748
+ toRemove.forEach((watch, path4) => {
162749
162749
  watch.close();
162750
- this.typingWatchers.delete(path2);
162750
+ this.typingWatchers.delete(path4);
162751
162751
  });
162752
162752
  }
162753
162753
  getCurrentProgram() {
@@ -162781,9 +162781,9 @@ ${options.prefix}` : `
162781
162781
  let hasNewProgram = false;
162782
162782
  if (this.program && (!oldProgram || this.program !== oldProgram && this.program.structureIsReused !== 2)) {
162783
162783
  hasNewProgram = true;
162784
- this.rootFilesMap.forEach((value, path2) => {
162784
+ this.rootFilesMap.forEach((value, path4) => {
162785
162785
  var _a2;
162786
- const file = this.program.getSourceFileByPath(path2);
162786
+ const file = this.program.getSourceFileByPath(path4);
162787
162787
  const info = value.info;
162788
162788
  if (!file || ((_a2 = value.info) == null ? undefined : _a2.path) === file.resolvedPath)
162789
162789
  return;
@@ -162894,8 +162894,8 @@ ${options.prefix}` : `
162894
162894
  }, 500, this.projectService.getWatchOptions(this), WatchType.MissingFile, this);
162895
162895
  return fileWatcher;
162896
162896
  }
162897
- isWatchedMissingFile(path2) {
162898
- return !!this.missingFilesMap && this.missingFilesMap.has(path2);
162897
+ isWatchedMissingFile(path4) {
162898
+ return !!this.missingFilesMap && this.missingFilesMap.has(path4);
162899
162899
  }
162900
162900
  addGeneratedFileWatch(generatedFile, sourceFile) {
162901
162901
  if (this.compilerOptions.outFile) {
@@ -162903,18 +162903,18 @@ ${options.prefix}` : `
162903
162903
  this.generatedFilesMap = this.createGeneratedFileWatcher(generatedFile);
162904
162904
  }
162905
162905
  } else {
162906
- const path2 = this.toPath(sourceFile);
162906
+ const path4 = this.toPath(sourceFile);
162907
162907
  if (this.generatedFilesMap) {
162908
162908
  if (isGeneratedFileWatcher(this.generatedFilesMap)) {
162909
162909
  Debug.fail(`${this.projectName} Expected to not have --out watcher for generated file with options: ${JSON.stringify(this.compilerOptions)}`);
162910
162910
  return;
162911
162911
  }
162912
- if (this.generatedFilesMap.has(path2))
162912
+ if (this.generatedFilesMap.has(path4))
162913
162913
  return;
162914
162914
  } else {
162915
162915
  this.generatedFilesMap = /* @__PURE__ */ new Map;
162916
162916
  }
162917
- this.generatedFilesMap.set(path2, this.createGeneratedFileWatcher(generatedFile));
162917
+ this.generatedFilesMap.set(path4, this.createGeneratedFileWatcher(generatedFile));
162918
162918
  }
162919
162919
  }
162920
162920
  createGeneratedFileWatcher(generatedFile) {
@@ -163249,7 +163249,7 @@ ${options.prefix}` : `
163249
163249
  }
163250
163250
  }
163251
163251
  isDefaultProjectForOpenFiles() {
163252
- return !!forEachEntry(this.projectService.openFiles, (_projectRootPath, path2) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path2)) === this);
163252
+ return !!forEachEntry(this.projectService.openFiles, (_projectRootPath, path4) => this.projectService.tryGetDefaultProjectForFile(this.projectService.getScriptInfoForPath(path4)) === this);
163253
163253
  }
163254
163254
  watchNodeModulesForPackageJsonChanges(directoryPath) {
163255
163255
  return this.projectService.watchPackageJsonsInNodeModules(directoryPath, this);
@@ -164165,22 +164165,22 @@ ${options.prefix}` : `
164165
164165
  getCurrentDirectory: () => service.host.getCurrentDirectory(),
164166
164166
  useCaseSensitiveFileNames: service.host.useCaseSensitiveFileNames
164167
164167
  };
164168
- function watchFile2(path2, callback) {
164169
- return getOrCreateFileWatcher(watchedFiles, path2, callback, (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path2 } }));
164168
+ function watchFile2(path4, callback) {
164169
+ return getOrCreateFileWatcher(watchedFiles, path4, callback, (id) => ({ eventName: CreateFileWatcherEvent, data: { id, path: path4 } }));
164170
164170
  }
164171
- function watchDirectory(path2, callback, recursive) {
164172
- return getOrCreateFileWatcher(recursive ? watchedDirectoriesRecursive : watchedDirectories, path2, callback, (id) => ({
164171
+ function watchDirectory(path4, callback, recursive) {
164172
+ return getOrCreateFileWatcher(recursive ? watchedDirectoriesRecursive : watchedDirectories, path4, callback, (id) => ({
164173
164173
  eventName: CreateDirectoryWatcherEvent,
164174
164174
  data: {
164175
164175
  id,
164176
- path: path2,
164176
+ path: path4,
164177
164177
  recursive: !!recursive,
164178
- ignoreUpdate: !path2.endsWith("/node_modules") ? true : undefined
164178
+ ignoreUpdate: !path4.endsWith("/node_modules") ? true : undefined
164179
164179
  }
164180
164180
  }));
164181
164181
  }
164182
- function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path2, callback, event) {
164183
- const key = service.toPath(path2);
164182
+ function getOrCreateFileWatcher({ pathToId, idToCallbacks }, path4, callback, event) {
164183
+ const key = service.toPath(path4);
164184
164184
  let id = pathToId.get(key);
164185
164185
  if (!id)
164186
164186
  pathToId.set(key, id = ids++);
@@ -164324,12 +164324,12 @@ ${options.prefix}` : `
164324
164324
  getNormalizedAbsolutePath(fileName) {
164325
164325
  return getNormalizedAbsolutePath(fileName, this.host.getCurrentDirectory());
164326
164326
  }
164327
- setDocument(key, path2, sourceFile) {
164328
- const info = Debug.checkDefined(this.getScriptInfoForPath(path2));
164327
+ setDocument(key, path4, sourceFile) {
164328
+ const info = Debug.checkDefined(this.getScriptInfoForPath(path4));
164329
164329
  info.cacheSourceFile = { key, sourceFile };
164330
164330
  }
164331
- getDocument(key, path2) {
164332
- const info = this.getScriptInfoForPath(path2);
164331
+ getDocument(key, path4) {
164332
+ const info = this.getScriptInfoForPath(path4);
164333
164333
  return info && info.cacheSourceFile && info.cacheSourceFile.key === key ? info.cacheSourceFile.sourceFile : undefined;
164334
164334
  }
164335
164335
  ensureInferredProjectsUpToDate_TestOnly() {
@@ -164428,7 +164428,7 @@ ${options.prefix}` : `
164428
164428
  const event = {
164429
164429
  eventName: ProjectsUpdatedInBackgroundEvent,
164430
164430
  data: {
164431
- openFiles: arrayFrom(this.openFiles.keys(), (path2) => this.getScriptInfoForPath(path2).fileName)
164431
+ openFiles: arrayFrom(this.openFiles.keys(), (path4) => this.getScriptInfoForPath(path4).fileName)
164432
164432
  }
164433
164433
  };
164434
164434
  this.eventHandler(event);
@@ -164621,11 +164621,11 @@ ${options.prefix}` : `
164621
164621
  }
164622
164622
  delayUpdateSourceInfoProjects(sourceInfos) {
164623
164623
  if (sourceInfos) {
164624
- sourceInfos.forEach((_value, path2) => this.delayUpdateProjectsOfScriptInfoPath(path2));
164624
+ sourceInfos.forEach((_value, path4) => this.delayUpdateProjectsOfScriptInfoPath(path4));
164625
164625
  }
164626
164626
  }
164627
- delayUpdateProjectsOfScriptInfoPath(path2) {
164628
- const info = this.getScriptInfoForPath(path2);
164627
+ delayUpdateProjectsOfScriptInfoPath(path4) {
164628
+ const info = this.getScriptInfoForPath(path4);
164629
164629
  if (info) {
164630
164630
  this.delayUpdateProjectGraphs(info.containingProjects, true);
164631
164631
  }
@@ -164699,8 +164699,8 @@ ${options.prefix}` : `
164699
164699
  if (!project)
164700
164700
  return;
164701
164701
  if (configuredProjectForConfig !== project && this.getHostPreferences().includeCompletionsForModuleExports) {
164702
- const path2 = this.toPath(configFileName);
164703
- if (find((_a = project.getCurrentProgram()) == null ? undefined : _a.getResolvedProjectReferences(), (ref) => (ref == null ? undefined : ref.sourceFile.path) === path2)) {
164702
+ const path4 = this.toPath(configFileName);
164703
+ if (find((_a = project.getCurrentProgram()) == null ? undefined : _a.getResolvedProjectReferences(), (ref) => (ref == null ? undefined : ref.sourceFile.path) === path4)) {
164704
164704
  project.markAutoImportProviderAsDirty();
164705
164705
  }
164706
164706
  }
@@ -164752,10 +164752,10 @@ ${options.prefix}` : `
164752
164752
  });
164753
164753
  return;
164754
164754
  }
164755
- const path2 = this.toPath(canonicalConfigFilePath);
164756
- project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path2);
164755
+ const path4 = this.toPath(canonicalConfigFilePath);
164756
+ project.resolutionCache.removeResolutionsFromProjectReferenceRedirects(path4);
164757
164757
  this.delayUpdateProjectGraph(project);
164758
- if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? undefined : _c.getResolvedProjectReferences(), (ref) => (ref == null ? undefined : ref.sourceFile.path) === path2)) {
164758
+ if (this.getHostPreferences().includeCompletionsForModuleExports && find((_c = project.getCurrentProgram()) == null ? undefined : _c.getResolvedProjectReferences(), (ref) => (ref == null ? undefined : ref.sourceFile.path) === path4)) {
164759
164759
  project.markAutoImportProviderAsDirty();
164760
164760
  }
164761
164761
  }
@@ -164778,18 +164778,18 @@ ${options.prefix}` : `
164778
164778
  }
164779
164779
  }
164780
164780
  this.delayUpdateProjectsFromParsedConfigOnConfigFileChange(canonicalConfigFilePath, "Change in config file detected");
164781
- this.openFiles.forEach((_projectRootPath, path2) => {
164781
+ this.openFiles.forEach((_projectRootPath, path4) => {
164782
164782
  var _a, _b;
164783
- const configFileForOpenFile = this.configFileForOpenFiles.get(path2);
164784
- if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? undefined : _a.has(path2)))
164783
+ const configFileForOpenFile = this.configFileForOpenFiles.get(path4);
164784
+ if (!((_a = configFileExistenceInfo.openFilesImpactedByConfigFile) == null ? undefined : _a.has(path4)))
164785
164785
  return;
164786
- this.configFileForOpenFiles.delete(path2);
164787
- const info = this.getScriptInfoForPath(path2);
164786
+ this.configFileForOpenFiles.delete(path4);
164787
+ const info = this.getScriptInfoForPath(path4);
164788
164788
  const newConfigFileNameForInfo = this.getConfigFileNameForFile(info, false);
164789
164789
  if (!newConfigFileNameForInfo)
164790
164790
  return;
164791
- if (!((_b = this.pendingOpenFileProjectUpdates) == null ? undefined : _b.has(path2))) {
164792
- (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map)).set(path2, configFileForOpenFile);
164791
+ if (!((_b = this.pendingOpenFileProjectUpdates) == null ? undefined : _b.has(path4))) {
164792
+ (this.pendingOpenFileProjectUpdates ?? (this.pendingOpenFileProjectUpdates = /* @__PURE__ */ new Map)).set(path4, configFileForOpenFile);
164793
164793
  }
164794
164794
  });
164795
164795
  this.delayEnsureProjectForOpenFiles();
@@ -164844,8 +164844,8 @@ ${options.prefix}` : `
164844
164844
  return project;
164845
164845
  }
164846
164846
  assignOrphanScriptInfosToInferredProject() {
164847
- this.openFiles.forEach((projectRootPath, path2) => {
164848
- const info = this.getScriptInfoForPath(path2);
164847
+ this.openFiles.forEach((projectRootPath, path4) => {
164848
+ const info = this.getScriptInfoForPath(path4);
164849
164849
  if (info.isOrphan()) {
164850
164850
  this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
164851
164851
  }
@@ -165104,8 +165104,8 @@ ${options.prefix}` : `
165104
165104
  this.configuredProjects.forEach(printProjectWithoutFileNames);
165105
165105
  this.inferredProjects.forEach(printProjectWithoutFileNames);
165106
165106
  this.logger.info("Open files: ");
165107
- this.openFiles.forEach((projectRootPath, path2) => {
165108
- const info = this.getScriptInfoForPath(path2);
165107
+ this.openFiles.forEach((projectRootPath, path4) => {
165108
+ const info = this.getScriptInfoForPath(path4);
165109
165109
  this.logger.info(` FileName: ${info.fileName} ProjectRootPath: ${projectRootPath}`);
165110
165110
  this.logger.info(` Projects: ${info.containingProjects.map((p) => p.getProjectName())}`);
165111
165111
  });
@@ -165354,25 +165354,25 @@ ${options.prefix}` : `
165354
165354
  const newRootFile = propertyReader.getFileName(f);
165355
165355
  const fileName = toNormalizedPath(newRootFile);
165356
165356
  const isDynamic = isDynamicFileName(fileName);
165357
- let path2;
165357
+ let path4;
165358
165358
  if (!isDynamic && !project.fileExists(newRootFile)) {
165359
- path2 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
165360
- const existingValue = projectRootFilesMap.get(path2);
165359
+ path4 = normalizedPathToPath(fileName, this.currentDirectory, this.toCanonicalFileName);
165360
+ const existingValue = projectRootFilesMap.get(path4);
165361
165361
  if (existingValue) {
165362
- if (((_a = existingValue.info) == null ? undefined : _a.path) === path2) {
165362
+ if (((_a = existingValue.info) == null ? undefined : _a.path) === path4) {
165363
165363
  project.removeFile(existingValue.info, false, true);
165364
165364
  existingValue.info = undefined;
165365
165365
  }
165366
165366
  existingValue.fileName = fileName;
165367
165367
  } else {
165368
- projectRootFilesMap.set(path2, { fileName });
165368
+ projectRootFilesMap.set(path4, { fileName });
165369
165369
  }
165370
165370
  } else {
165371
165371
  const scriptKind = propertyReader.getScriptKind(f, this.hostConfiguration.extraFileExtensions);
165372
165372
  const hasMixedContent = propertyReader.hasMixedContent(f, this.hostConfiguration.extraFileExtensions);
165373
165373
  const scriptInfo = Debug.checkDefined(this.getOrCreateScriptInfoNotOpenedByClientForNormalizedPath(fileName, project.currentDirectory, scriptKind, hasMixedContent, project.directoryStructureHost, false));
165374
- path2 = scriptInfo.path;
165375
- const existingValue = projectRootFilesMap.get(path2);
165374
+ path4 = scriptInfo.path;
165375
+ const existingValue = projectRootFilesMap.get(path4);
165376
165376
  if (!existingValue || existingValue.info !== scriptInfo) {
165377
165377
  project.addRoot(scriptInfo, fileName);
165378
165378
  if (scriptInfo.isScriptOpen()) {
@@ -165382,15 +165382,15 @@ ${options.prefix}` : `
165382
165382
  existingValue.fileName = fileName;
165383
165383
  }
165384
165384
  }
165385
- newRootScriptInfoMap.set(path2, true);
165385
+ newRootScriptInfoMap.set(path4, true);
165386
165386
  }
165387
165387
  if (projectRootFilesMap.size > newRootScriptInfoMap.size) {
165388
- projectRootFilesMap.forEach((value, path2) => {
165389
- if (!newRootScriptInfoMap.has(path2)) {
165388
+ projectRootFilesMap.forEach((value, path4) => {
165389
+ if (!newRootScriptInfoMap.has(path4)) {
165390
165390
  if (value.info) {
165391
165391
  project.removeFile(value.info, project.fileExists(value.info.fileName), true);
165392
165392
  } else {
165393
- projectRootFilesMap.delete(path2);
165393
+ projectRootFilesMap.delete(path4);
165394
165394
  }
165395
165395
  }
165396
165396
  });
@@ -165548,15 +165548,15 @@ ${options.prefix}` : `
165548
165548
  return this.getScriptInfoForNormalizedPath(toNormalizedPath(uncheckedFileName));
165549
165549
  }
165550
165550
  getScriptInfoOrConfig(uncheckedFileName) {
165551
- const path2 = toNormalizedPath(uncheckedFileName);
165552
- const info = this.getScriptInfoForNormalizedPath(path2);
165551
+ const path4 = toNormalizedPath(uncheckedFileName);
165552
+ const info = this.getScriptInfoForNormalizedPath(path4);
165553
165553
  if (info)
165554
165554
  return info;
165555
165555
  const configProject = this.configuredProjects.get(this.toPath(uncheckedFileName));
165556
165556
  return configProject && configProject.getCompilerOptions().configFile;
165557
165557
  }
165558
165558
  logErrorForScriptInfoNotFound(fileName) {
165559
- const names = arrayFrom(mapDefinedIterator(this.filenameToScriptInfo.entries(), (entry) => entry[1].deferredDelete ? undefined : entry), ([path2, scriptInfo]) => ({ path: path2, fileName: scriptInfo.fileName }));
165559
+ const names = arrayFrom(mapDefinedIterator(this.filenameToScriptInfo.entries(), (entry) => entry[1].deferredDelete ? undefined : entry), ([path4, scriptInfo]) => ({ path: path4, fileName: scriptInfo.fileName }));
165560
165560
  this.logger.msg(`Could not find file ${JSON.stringify(fileName)}.
165561
165561
  All files are: ${JSON.stringify(names)}`, "Err");
165562
165562
  }
@@ -165577,7 +165577,7 @@ All files are: ${JSON.stringify(names)}`, "Err");
165577
165577
  if (!projects) {
165578
165578
  projects = createMultiMap();
165579
165579
  projects.add(toAddInfo.path, project);
165580
- } else if (!forEachEntry(projects, (projs, path2) => path2 === toAddInfo.path ? false : contains(projs, project))) {
165580
+ } else if (!forEachEntry(projects, (projs, path4) => path4 === toAddInfo.path ? false : contains(projs, project))) {
165581
165581
  projects.add(toAddInfo.path, project);
165582
165582
  }
165583
165583
  }
@@ -165706,8 +165706,8 @@ All files are: ${JSON.stringify(names)}`, "Err");
165706
165706
  }
165707
165707
  getOrCreateScriptInfoWorker(fileName, currentDirectory, openedByClient, fileContent, scriptKind, hasMixedContent, hostToQueryFileExistsOn, deferredDeleteOk) {
165708
165708
  Debug.assert(fileContent === undefined || openedByClient, "ScriptInfo needs to be opened by client to be able to set its user defined content");
165709
- const path2 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
165710
- let info = this.filenameToScriptInfo.get(path2);
165709
+ const path4 = normalizedPathToPath(fileName, currentDirectory, this.toCanonicalFileName);
165710
+ let info = this.filenameToScriptInfo.get(path4);
165711
165711
  if (!info) {
165712
165712
  const isDynamic = isDynamicFileName(fileName);
165713
165713
  Debug.assert(isRootedDiskPath(fileName) || isDynamic || openedByClient, "", () => `${JSON.stringify({ fileName, currentDirectory, hostCurrentDirectory: this.currentDirectory, openKeys: arrayFrom(this.openFilesWithNonRootedDiskPath.keys()) })}
@@ -165719,7 +165719,7 @@ Dynamic files must always be opened with service's current directory or service
165719
165719
  if (!openedByClient && !isDynamic && !(hostToQueryFileExistsOn || this.host).fileExists(fileName)) {
165720
165720
  return;
165721
165721
  }
165722
- info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path2, this.filenameToScriptInfoVersion.get(path2));
165722
+ info = new ScriptInfo(this.host, fileName, scriptKind, hasMixedContent, path4, this.filenameToScriptInfoVersion.get(path4));
165723
165723
  this.filenameToScriptInfo.set(info.path, info);
165724
165724
  this.filenameToScriptInfoVersion.delete(info.path);
165725
165725
  if (!openedByClient) {
@@ -165828,9 +165828,9 @@ Dynamic files must always be opened with service's current directory or service
165828
165828
  getSourceFileLike(fileName, projectNameOrProject, declarationInfo) {
165829
165829
  const project = projectNameOrProject.projectName ? projectNameOrProject : this.findProject(projectNameOrProject);
165830
165830
  if (project) {
165831
- const path2 = project.toPath(fileName);
165832
- const sourceFile = project.getSourceFile(path2);
165833
- if (sourceFile && sourceFile.resolvedPath === path2)
165831
+ const path4 = project.toPath(fileName);
165832
+ const sourceFile = project.getSourceFile(path4);
165833
+ if (sourceFile && sourceFile.resolvedPath === path4)
165834
165834
  return sourceFile;
165835
165835
  }
165836
165836
  const info = this.getOrCreateScriptInfoNotOpenedByClient(fileName, (project || this).currentDirectory, project ? project.directoryStructureHost : this.host, false);
@@ -165973,8 +165973,8 @@ Dynamic files must always be opened with service's current directory or service
165973
165973
  }
165974
165974
  });
165975
165975
  });
165976
- this.openFiles.forEach((_projectRootPath, path2) => {
165977
- const info = this.getScriptInfoForPath(path2);
165976
+ this.openFiles.forEach((_projectRootPath, path4) => {
165977
+ const info = this.getScriptInfoForPath(path4);
165978
165978
  if (find(info.containingProjects, isExternalProject))
165979
165979
  return;
165980
165980
  this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, 7, reloadedConfiguredProjects, delayReloadedConfiguredProjects);
@@ -165998,9 +165998,9 @@ Dynamic files must always be opened with service's current directory or service
165998
165998
  this.printProjects();
165999
165999
  const pendingOpenFileProjectUpdates = this.pendingOpenFileProjectUpdates;
166000
166000
  this.pendingOpenFileProjectUpdates = undefined;
166001
- pendingOpenFileProjectUpdates == null || pendingOpenFileProjectUpdates.forEach((_config, path2) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(path2), 5));
166002
- this.openFiles.forEach((projectRootPath, path2) => {
166003
- const info = this.getScriptInfoForPath(path2);
166001
+ pendingOpenFileProjectUpdates == null || pendingOpenFileProjectUpdates.forEach((_config, path4) => this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(this.getScriptInfoForPath(path4), 5));
166002
+ this.openFiles.forEach((projectRootPath, path4) => {
166003
+ const info = this.getScriptInfoForPath(path4);
166004
166004
  if (info.isOrphan()) {
166005
166005
  this.assignOrphanScriptInfoToInferredProject(info, projectRootPath);
166006
166006
  } else {
@@ -166346,10 +166346,10 @@ Dynamic files must always be opened with service's current directory or service
166346
166346
  });
166347
166347
  if (!toRemoveConfiguredProjects.size)
166348
166348
  return toRemoveConfiguredProjects;
166349
- forEachEntry(this.openFiles, (_projectRootPath, path2) => {
166350
- if (openFilesWithRetainedConfiguredProject == null ? undefined : openFilesWithRetainedConfiguredProject.has(path2))
166349
+ forEachEntry(this.openFiles, (_projectRootPath, path4) => {
166350
+ if (openFilesWithRetainedConfiguredProject == null ? undefined : openFilesWithRetainedConfiguredProject.has(path4))
166351
166351
  return;
166352
- const info = this.getScriptInfoForPath(path2);
166352
+ const info = this.getScriptInfoForPath(path4);
166353
166353
  if (find(info.containingProjects, isExternalProject))
166354
166354
  return;
166355
166355
  const result = this.tryFindDefaultConfiguredProjectAndLoadAncestorsForOpenScriptInfo(info, 1);
@@ -166402,8 +166402,8 @@ Dynamic files must always be opened with service's current directory or service
166402
166402
  }
166403
166403
  if (!sourceInfos)
166404
166404
  return;
166405
- if (!forEachKey(sourceInfos, (path2) => {
166406
- const info2 = this.getScriptInfoForPath(path2);
166405
+ if (!forEachKey(sourceInfos, (path4) => {
166406
+ const info2 = this.getScriptInfoForPath(path4);
166407
166407
  return !!info2 && (info2.isScriptOpen() || !info2.isOrphan());
166408
166408
  })) {
166409
166409
  return;
@@ -166427,7 +166427,7 @@ Dynamic files must always be opened with service's current directory or service
166427
166427
  sourceInfos = info.sourceMapFilePath.sourceInfos;
166428
166428
  }
166429
166429
  if (sourceInfos) {
166430
- sourceInfos.forEach((_value, path2) => toRemoveScriptInfos.delete(path2));
166430
+ sourceInfos.forEach((_value, path4) => toRemoveScriptInfos.delete(path4));
166431
166431
  }
166432
166432
  }
166433
166433
  });
@@ -166829,19 +166829,19 @@ Dynamic files must always be opened with service's current directory or service
166829
166829
  }
166830
166830
  });
166831
166831
  }
166832
- watchPackageJsonFile(file, path2, project) {
166832
+ watchPackageJsonFile(file, path4, project) {
166833
166833
  Debug.assert(project !== undefined);
166834
- let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map)).get(path2);
166834
+ let result = (this.packageJsonFilesMap ?? (this.packageJsonFilesMap = /* @__PURE__ */ new Map)).get(path4);
166835
166835
  if (!result) {
166836
166836
  let watcher = this.watchFactory.watchFile(file, (fileName, eventKind) => {
166837
166837
  switch (eventKind) {
166838
166838
  case 0:
166839
166839
  case 1:
166840
- this.packageJsonCache.addOrUpdate(fileName, path2);
166840
+ this.packageJsonCache.addOrUpdate(fileName, path4);
166841
166841
  this.onPackageJsonChange(result);
166842
166842
  break;
166843
166843
  case 2:
166844
- this.packageJsonCache.delete(path2);
166844
+ this.packageJsonCache.delete(path4);
166845
166845
  this.onPackageJsonChange(result);
166846
166846
  result.projects.clear();
166847
166847
  result.close();
@@ -166855,11 +166855,11 @@ Dynamic files must always be opened with service's current directory or service
166855
166855
  return;
166856
166856
  watcher.close();
166857
166857
  watcher = undefined;
166858
- (_a = this.packageJsonFilesMap) == null || _a.delete(path2);
166859
- this.packageJsonCache.invalidate(path2);
166858
+ (_a = this.packageJsonFilesMap) == null || _a.delete(path4);
166859
+ this.packageJsonCache.invalidate(path4);
166860
166860
  }
166861
166861
  };
166862
- this.packageJsonFilesMap.set(path2, result);
166862
+ this.packageJsonFilesMap.set(path4, result);
166863
166863
  }
166864
166864
  result.projects.add(project);
166865
166865
  (project.packageJsonWatches ?? (project.packageJsonWatches = /* @__PURE__ */ new Set)).add(result);
@@ -167007,14 +167007,14 @@ Dynamic files must always be opened with service's current directory or service
167007
167007
  });
167008
167008
  }
167009
167009
  };
167010
- function addOrUpdate(fileName, path2) {
167010
+ function addOrUpdate(fileName, path4) {
167011
167011
  const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host));
167012
- packageJsons.set(path2, packageJsonInfo);
167013
- directoriesWithoutPackageJson.delete(getDirectoryPath(path2));
167012
+ packageJsons.set(path4, packageJsonInfo);
167013
+ directoriesWithoutPackageJson.delete(getDirectoryPath(path4));
167014
167014
  }
167015
- function invalidate(path2) {
167016
- packageJsons.delete(path2);
167017
- directoriesWithoutPackageJson.delete(getDirectoryPath(path2));
167015
+ function invalidate(path4) {
167016
+ packageJsons.delete(path4);
167017
+ directoriesWithoutPackageJson.delete(getDirectoryPath(path4));
167018
167018
  }
167019
167019
  function directoryHasPackageJson(directory) {
167020
167020
  return packageJsons.has(combinePaths(directory, "package.json")) ? -1 : directoriesWithoutPackageJson.has(directory) ? 0 : 3;
@@ -167206,8 +167206,8 @@ ${json}${newLine}`;
167206
167206
  function combineProjectOutput(defaultValue, getValue, projects, action) {
167207
167207
  const outputs = flatMapToMutable(isArray(projects) ? projects : projects.projects, (project) => action(project, defaultValue));
167208
167208
  if (!isArray(projects) && projects.symLinkedProjects) {
167209
- projects.symLinkedProjects.forEach((projects2, path2) => {
167210
- const value = getValue(path2);
167209
+ projects.symLinkedProjects.forEach((projects2, path4) => {
167210
+ const value = getValue(path4);
167211
167211
  outputs.push(...flatMap(projects2, (project) => action(project, value)));
167212
167212
  });
167213
167213
  }
@@ -167322,9 +167322,9 @@ ${json}${newLine}`;
167322
167322
  });
167323
167323
  return results.filter((o) => o.references.length !== 0);
167324
167324
  }
167325
- function forEachProjectInProjects(projects, path2, cb) {
167325
+ function forEachProjectInProjects(projects, path4, cb) {
167326
167326
  for (const project of isArray(projects) ? projects : projects.projects) {
167327
- cb(project, path2);
167327
+ cb(project, path4);
167328
167328
  }
167329
167329
  if (!isArray(projects) && projects.symLinkedProjects) {
167330
167330
  projects.symLinkedProjects.forEach((symlinkedProjects, symlinkedPath) => {
@@ -167338,8 +167338,8 @@ ${json}${newLine}`;
167338
167338
  const resultsMap = /* @__PURE__ */ new Map;
167339
167339
  const queue = createQueue();
167340
167340
  queue.enqueue({ project: defaultProject, location: initialLocation });
167341
- forEachProjectInProjects(projects, initialLocation.fileName, (project, path2) => {
167342
- const location = { fileName: path2, pos: initialLocation.pos };
167341
+ forEachProjectInProjects(projects, initialLocation.fileName, (project, path4) => {
167342
+ const location = { fileName: path4, pos: initialLocation.pos };
167343
167343
  queue.enqueue({ project, location });
167344
167344
  });
167345
167345
  const projectService = defaultProject.projectService;
@@ -168490,8 +168490,8 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
168490
168490
  const entrypoints = getEntrypointsFromPackageJsonInfo(packageJson, { moduleResolution: 2 }, project, project.getModuleResolutionCache());
168491
168491
  const packageNamePathPart = fileName.substring(nodeModulesPathParts.topLevelPackageNameIndex + 1, nodeModulesPathParts.packageRootIndex);
168492
168492
  const packageName = getPackageNameFromTypesPackageName(unmangleScopedPackageName(packageNamePathPart));
168493
- const path2 = project.toPath(fileName);
168494
- if (entrypoints && some(entrypoints, (e) => project.toPath(e) === path2)) {
168493
+ const path4 = project.toPath(fileName);
168494
+ if (entrypoints && some(entrypoints, (e) => project.toPath(e) === path4)) {
168495
168495
  return (_b = auxiliaryProject.resolutionCache.resolveSingleModuleNameWithoutWatching(packageName, resolveFromFile).resolvedModule) == null ? undefined : _b.resolvedFileName;
168496
168496
  } else {
168497
168497
  const pathToFileInPackage = fileName.substring(nodeModulesPathParts.packageRootIndex + 1);
@@ -169156,7 +169156,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
169156
169156
  if (!info) {
169157
169157
  return emptyArray2;
169158
169158
  }
169159
- return combineProjectOutput(info, (path2) => this.projectService.getScriptInfoForPath(path2), projects, (project, info2) => {
169159
+ return combineProjectOutput(info, (path4) => this.projectService.getScriptInfoForPath(path4), projects, (project, info2) => {
169160
169160
  if (!project.compileOnSaveEnabled || !project.languageServiceEnabled || project.isOrphan()) {
169161
169161
  return;
169162
169162
  }
@@ -169180,7 +169180,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
169180
169180
  return args.richResponse ? { emitSkipped: true, diagnostics: [] } : false;
169181
169181
  }
169182
169182
  const scriptInfo = project.getScriptInfo(file);
169183
- const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path2, data, writeByteOrderMark) => this.host.writeFile(path2, data, writeByteOrderMark));
169183
+ const { emitSkipped, diagnostics } = project.emitFile(scriptInfo, (path4, data, writeByteOrderMark) => this.host.writeFile(path4, data, writeByteOrderMark));
169184
169184
  return args.richResponse ? {
169185
169185
  emitSkipped,
169186
169186
  diagnostics: args.includeLinePosition ? this.convertToDiagnosticsWithLinePositionFromDiagnosticFile(diagnostics) : diagnostics.map((d) => formatDiagnosticToProtocol(d, true))
@@ -170935,96 +170935,7 @@ function toTitleCase(input) {
170935
170935
  return toKebabCase(input).split("-").filter(Boolean).map(capitalizeSegment).join(" ");
170936
170936
  }
170937
170937
 
170938
- // ../wp-typia-project-tools/src/runtime/cli-add-shared.ts
170939
- import fs from "fs";
170940
- import { promises as fsp } from "fs";
170941
- import path from "path";
170942
- import { parseScaffoldBlockMetadata } from "@wp-typia/block-runtime/blocks";
170943
-
170944
- // ../wp-typia-project-tools/src/runtime/hooked-blocks.ts
170945
- var HOOKED_BLOCK_POSITION_IDS = ["before", "after", "firstChild", "lastChild"];
170946
- var HOOKED_BLOCK_POSITION_SET = new Set(HOOKED_BLOCK_POSITION_IDS);
170947
- var HOOKED_BLOCK_ANCHOR_PATTERN = /^[a-z0-9-]+\/[a-z0-9-]+$/;
170948
-
170949
- // ../wp-typia-project-tools/src/runtime/scaffold-identifiers.ts
170950
- var BLOCK_SLUG_PATTERN = /^[a-z][a-z0-9-]*$/;
170951
- var PHP_PREFIX_PATTERN = /^[a-z_][a-z0-9_]*$/;
170952
- var PHP_PREFIX_MAX_LENGTH = 50;
170953
- function validateBlockSlug(input) {
170954
- return BLOCK_SLUG_PATTERN.test(input) || "Use lowercase letters, numbers, and hyphens only";
170955
- }
170956
- function validateNamespace(input) {
170957
- return BLOCK_SLUG_PATTERN.test(toKebabCase(input)) ? true : "Use lowercase letters, numbers, and hyphens only";
170958
- }
170959
- function validateTextDomain(input) {
170960
- return BLOCK_SLUG_PATTERN.test(toKebabCase(input)) ? true : "Use lowercase letters, numbers, and hyphens only";
170961
- }
170962
- function validatePhpPrefix(input) {
170963
- const normalizedPrefix = toSnakeCase(input);
170964
- if (normalizedPrefix.length > PHP_PREFIX_MAX_LENGTH) {
170965
- return `Use ${PHP_PREFIX_MAX_LENGTH} characters or fewer to keep generated database identifiers within MySQL limits`;
170966
- }
170967
- return PHP_PREFIX_PATTERN.test(normalizedPrefix) ? true : "Use letters, numbers, and underscores only, starting with a letter";
170968
- }
170969
- function assertValidIdentifier(label, value, validate) {
170970
- const result = validate(value);
170971
- if (result !== true) {
170972
- throw new Error(typeof result === "string" ? `${label}: ${result}` : `${label} is invalid`);
170973
- }
170974
- return value;
170975
- }
170976
- function normalizeBlockSlug(input) {
170977
- return toKebabCase(input);
170978
- }
170979
- function resolveNonEmptyNormalizedBlockSlug(options) {
170980
- const normalizedSlug = normalizeBlockSlug(options.input);
170981
- if (normalizedSlug.length > 0) {
170982
- return normalizedSlug;
170983
- }
170984
- if (options.input.trim().length === 0) {
170985
- throw new Error(`${options.label} is required. Use \`${options.usage}\`.`);
170986
- }
170987
- throw new Error(`${options.label} "${options.input.trim()}" normalizes to an empty slug. Use letters or numbers so wp-typia can generate a block slug.`);
170988
- }
170989
- function resolveValidatedBlockSlug(value) {
170990
- return assertValidIdentifier("Block slug", normalizeBlockSlug(value), validateBlockSlug);
170991
- }
170992
- function resolveValidatedNamespace(value) {
170993
- return assertValidIdentifier("Namespace", toKebabCase(value), validateNamespace);
170994
- }
170995
- function resolveValidatedTextDomain(value) {
170996
- return assertValidIdentifier("Text domain", toKebabCase(value), validateTextDomain);
170997
- }
170998
- function resolveValidatedPhpPrefix(value) {
170999
- return assertValidIdentifier("PHP prefix", toSnakeCase(value), validatePhpPrefix);
171000
- }
171001
- function buildBlockCssClassName(namespace, slug) {
171002
- const normalizedSlug = resolveValidatedBlockSlug(slug);
171003
- const normalizedNamespace = typeof namespace === "string" && namespace.trim().length > 0 ? resolveValidatedNamespace(namespace) : "";
171004
- if (normalizedNamespace === normalizedSlug) {
171005
- return `wp-block-${normalizedSlug}-block`;
171006
- }
171007
- return normalizedNamespace.length > 0 ? `wp-block-${normalizedNamespace}-${normalizedSlug}` : `wp-block-${normalizedSlug}`;
171008
- }
171009
- function buildFrontendCssClassName(blockCssClassName) {
171010
- return `${blockCssClassName}-frontend`;
171011
- }
171012
- function resolveScaffoldIdentifiers({
171013
- namespace,
171014
- phpPrefix,
171015
- slug,
171016
- textDomain
171017
- }) {
171018
- const normalizedSlug = resolveValidatedBlockSlug(slug);
171019
- return {
171020
- namespace: resolveValidatedNamespace(namespace),
171021
- phpPrefix: resolveValidatedPhpPrefix(phpPrefix ?? normalizedSlug),
171022
- slug: normalizedSlug,
171023
- textDomain: resolveValidatedTextDomain(textDomain ?? normalizedSlug)
171024
- };
171025
- }
171026
-
171027
- // ../wp-typia-project-tools/src/runtime/cli-add-shared.ts
170938
+ // ../wp-typia-project-tools/src/runtime/cli-add-types.ts
171028
170939
  var ADD_KIND_IDS = [
171029
170940
  "admin-view",
171030
170941
  "block",
@@ -171066,6 +170977,13 @@ var ADD_BLOCK_TEMPLATE_IDS = [
171066
170977
  "persistence",
171067
170978
  "compound"
171068
170979
  ];
170980
+
170981
+ // ../wp-typia-project-tools/src/runtime/hooked-blocks.ts
170982
+ var HOOKED_BLOCK_POSITION_IDS = ["before", "after", "firstChild", "lastChild"];
170983
+ var HOOKED_BLOCK_POSITION_SET = new Set(HOOKED_BLOCK_POSITION_IDS);
170984
+ var HOOKED_BLOCK_ANCHOR_PATTERN = /^[a-z0-9-]+\/[a-z0-9-]+$/;
170985
+
170986
+ // ../wp-typia-project-tools/src/runtime/cli-add-validation.ts
171069
170987
  var WORKSPACE_GENERATED_SLUG_PATTERN = /^[a-z][a-z0-9-]*$/;
171070
170988
  var REST_RESOURCE_NAMESPACE_PATTERN = /^[a-z][a-z0-9-]*(?:\/[a-z0-9-]+)+$/u;
171071
170989
  function assertValidGeneratedSlug(label, slug, usage) {
@@ -171098,7 +171016,7 @@ function assertValidRestResourceMethods(methods) {
171098
171016
  throw new Error(`REST resource methods must be a comma-separated list of: ${REST_RESOURCE_METHOD_IDS.join(", ")}.`);
171099
171017
  }
171100
171018
  if (normalizedMethods.length === 0) {
171101
- throw new Error("REST resource methods must include at least one of: list, read, create, update, delete.");
171019
+ throw new Error(`REST resource methods must include at least one of: ${REST_RESOURCE_METHOD_IDS.join(", ")}.`);
171102
171020
  }
171103
171021
  return normalizedMethods;
171104
171022
  }
@@ -171108,10 +171026,6 @@ function assertValidHookedBlockPosition(position) {
171108
171026
  }
171109
171027
  throw new Error(`Hook position must be one of: ${HOOKED_BLOCK_POSITION_IDS.join(", ")}.`);
171110
171028
  }
171111
- function getWorkspaceBootstrapPath(workspace) {
171112
- const workspaceBaseName = workspace.packageName.split("/").pop() ?? workspace.packageName;
171113
- return path.join(workspace.projectDir, `${workspaceBaseName}.php`);
171114
- }
171115
171029
  function buildWorkspacePhpPrefix(workspacePhpPrefix, slug) {
171116
171030
  return toSnakeCase(`${workspacePhpPrefix}_${slug}`);
171117
171031
  }
@@ -171121,6 +171035,31 @@ function isAddBlockTemplateId(value) {
171121
171035
  function quoteTsString(value) {
171122
171036
  return JSON.stringify(value);
171123
171037
  }
171038
+ function assertValidHookAnchor(anchorBlockName) {
171039
+ const trimmed = anchorBlockName.trim();
171040
+ if (!trimmed) {
171041
+ throw new Error("`wp-typia add hooked-block` requires --anchor <anchor-block-name>.");
171042
+ }
171043
+ if (!HOOKED_BLOCK_ANCHOR_PATTERN.test(trimmed)) {
171044
+ throw new Error("`wp-typia add hooked-block` requires --anchor <anchor-block-name> to use the full `namespace/slug` block name format.");
171045
+ }
171046
+ return trimmed;
171047
+ }
171048
+ function assertValidEditorPluginSlot(slot = "sidebar") {
171049
+ const alias = resolveEditorPluginSlotAlias(slot);
171050
+ if (alias) {
171051
+ return alias;
171052
+ }
171053
+ throw new Error(`Editor plugin slot must be one of: ${EDITOR_PLUGIN_SLOT_IDS.join(", ")}. Legacy aliases: PluginSidebar, PluginDocumentSettingPanel.`);
171054
+ }
171055
+
171056
+ // ../wp-typia-project-tools/src/runtime/cli-add-filesystem.ts
171057
+ import { promises as fsp } from "fs";
171058
+ import path from "path";
171059
+ function getWorkspaceBootstrapPath(workspace) {
171060
+ const workspaceBaseName = workspace.packageName.split("/").pop() ?? workspace.packageName;
171061
+ return path.join(workspace.projectDir, `${workspaceBaseName}.php`);
171062
+ }
171124
171063
  async function patchFile(filePath, transform) {
171125
171064
  const currentSource = await fsp.readFile(filePath, "utf8");
171126
171065
  const nextSource = transform(currentSource);
@@ -171129,10 +171068,14 @@ async function patchFile(filePath, transform) {
171129
171068
  }
171130
171069
  }
171131
171070
  async function readOptionalFile(filePath) {
171132
- if (!fs.existsSync(filePath)) {
171133
- return null;
171071
+ try {
171072
+ return await fsp.readFile(filePath, "utf8");
171073
+ } catch (error) {
171074
+ if (isFileNotFoundError(error)) {
171075
+ return null;
171076
+ }
171077
+ throw error;
171134
171078
  }
171135
- return fsp.readFile(filePath, "utf8");
171136
171079
  }
171137
171080
  async function restoreOptionalFile(filePath, source) {
171138
171081
  if (source === null) {
@@ -171160,40 +171103,145 @@ async function rollbackWorkspaceMutation(snapshot) {
171160
171103
  await restoreOptionalFile(filePath, source);
171161
171104
  }
171162
171105
  }
171163
- function resolveWorkspaceBlock(inventory, blockSlug) {
171164
- const block = inventory.blocks.find((entry) => entry.slug === blockSlug);
171165
- if (!block) {
171166
- throw new Error(`Unknown workspace block "${blockSlug}". Choose one of: ${inventory.blocks.map((entry) => entry.slug).join(", ")}`);
171106
+ function isFileNotFoundError(error) {
171107
+ return typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT";
171108
+ }
171109
+
171110
+ // ../wp-typia-project-tools/src/runtime/cli-add-help.ts
171111
+ function formatAddHelpText() {
171112
+ return `Usage:
171113
+ wp-typia add admin-view <name> [--source <rest-resource:slug|core-data:kind/name>] [--dry-run]
171114
+ wp-typia add block <name> [--template <${ADD_BLOCK_TEMPLATE_IDS.join("|")}>] [--external-layer-source <./path|github:owner/repo/path[#ref]|npm-package>] [--external-layer-id <layer-id>] [--inner-blocks-preset <freeform|ordered|horizontal|locked-structure>] [--alternate-render-targets <email,mjml,plain-text>] [--data-storage <post-meta|custom-table>] [--persistence-policy <authenticated|public>] [--dry-run]
171115
+ wp-typia add variation <name> --block <block-slug> [--dry-run]
171116
+ wp-typia add style <name> --block <block-slug> [--dry-run]
171117
+ wp-typia add transform <name> --from <namespace/block> --to <block-slug|namespace/block-slug> [--dry-run]
171118
+ wp-typia add pattern <name> [--dry-run]
171119
+ wp-typia add binding-source <name> [--block <block-slug|namespace/block-slug> --attribute <attribute>] [--dry-run]
171120
+ wp-typia add rest-resource <name> [--namespace <vendor/v1>] [--methods <${REST_RESOURCE_METHOD_IDS.join(",")}>] [--dry-run]
171121
+ wp-typia add ability <name> [--dry-run]
171122
+ wp-typia add ai-feature <name> [--namespace <vendor/v1>] [--dry-run]
171123
+ wp-typia add hooked-block <block-slug> --anchor <anchor-block-name> --position <${HOOKED_BLOCK_POSITION_IDS.join("|")}> [--dry-run]
171124
+ wp-typia add editor-plugin <name> [--slot <${EDITOR_PLUGIN_SLOT_IDS.join("|")}>] [--dry-run]
171125
+
171126
+ Notes:
171127
+ \`wp-typia add\` runs only inside official ${WORKSPACE_TEMPLATE_PACKAGE} workspaces scaffolded via \`wp-typia create <project-dir> --template workspace\`.
171128
+ Pass \`--dry-run\` to preview the workspace files that would change without writing them.
171129
+ Interactive add flows let you choose a template when \`--template\` is omitted; non-interactive runs default to \`basic\`.
171130
+ \`add admin-view\` scaffolds an opt-in DataViews-powered WordPress admin screen under \`src/admin-views/\`.
171131
+ Pass \`--source rest-resource:<slug>\` to reuse a list-capable REST resource.
171132
+ Pass \`--source core-data:postType/post\` or \`--source core-data:taxonomy/category\` to bind a WordPress-owned entity collection.
171133
+ Public installs currently gate this workflow until \`@wp-typia/dataviews\` is published to npm.
171134
+ \`query-loop\` is a create-time scaffold family. Use \`wp-typia create <project-dir> --template query-loop\` instead of \`wp-typia add block\`.
171135
+ \`add variation\` targets an existing block slug from \`scripts/block-config.ts\`.
171136
+ \`add style\` registers a Block Styles option for an existing generated block.
171137
+ \`add transform\` adds a block-to-block transform into an existing generated block.
171138
+ \`add pattern\` scaffolds a namespaced PHP pattern shell under \`src/patterns/\`.
171139
+ \`add binding-source\` scaffolds shared PHP and editor registration under \`src/bindings/\`; pass \`--block\` and \`--attribute\` together to declare an end-to-end bindable attribute on an existing generated block.
171140
+ \`add rest-resource\` scaffolds plugin-level TypeScript REST contracts under \`src/rest/\` and PHP route glue under \`inc/rest/\`.
171141
+ \`add ability\` scaffolds typed workflow abilities under \`src/abilities/\` and server registration under \`inc/abilities/\`.
171142
+ \`add ai-feature\` scaffolds server-owned AI feature endpoints under \`src/ai-features/\` and PHP route glue under \`inc/ai-features/\`.
171143
+ \`add hooked-block\` patches an existing workspace block's \`block.json\` \`blockHooks\` metadata.
171144
+ \`add editor-plugin\` scaffolds a document-level editor extension under \`src/editor-plugins/\`; legacy aliases \`PluginSidebar\` and \`PluginDocumentSettingPanel\` resolve to \`sidebar\` and \`document-setting-panel\`.`;
171145
+ }
171146
+
171147
+ // ../wp-typia-project-tools/src/runtime/scaffold-identifiers.ts
171148
+ var BLOCK_SLUG_PATTERN = /^[a-z][a-z0-9-]*$/;
171149
+ var PHP_PREFIX_PATTERN = /^[a-z_][a-z0-9_]*$/;
171150
+ var PHP_PREFIX_MAX_LENGTH = 50;
171151
+ function validateBlockSlug(input) {
171152
+ return BLOCK_SLUG_PATTERN.test(input) || "Use lowercase letters, numbers, and hyphens only";
171153
+ }
171154
+ function validateNamespace(input) {
171155
+ return BLOCK_SLUG_PATTERN.test(toKebabCase(input)) ? true : "Use lowercase letters, numbers, and hyphens only";
171156
+ }
171157
+ function validateTextDomain(input) {
171158
+ return BLOCK_SLUG_PATTERN.test(toKebabCase(input)) ? true : "Use lowercase letters, numbers, and hyphens only";
171159
+ }
171160
+ function validatePhpPrefix(input) {
171161
+ const normalizedPrefix = toSnakeCase(input);
171162
+ if (normalizedPrefix.length > PHP_PREFIX_MAX_LENGTH) {
171163
+ return `Use ${PHP_PREFIX_MAX_LENGTH} characters or fewer to keep generated database identifiers within MySQL limits`;
171167
171164
  }
171168
- return block;
171165
+ return PHP_PREFIX_PATTERN.test(normalizedPrefix) ? true : "Use letters, numbers, and underscores only, starting with a letter";
171169
171166
  }
171170
- function assertValidHookAnchor(anchorBlockName) {
171171
- const trimmed = anchorBlockName.trim();
171172
- if (!trimmed) {
171173
- throw new Error("`wp-typia add hooked-block` requires --anchor <anchor-block-name>.");
171167
+ function assertValidIdentifier(label, value, validate) {
171168
+ const result = validate(value);
171169
+ if (result !== true) {
171170
+ throw new Error(typeof result === "string" ? `${label}: ${result}` : `${label} is invalid`);
171174
171171
  }
171175
- if (!HOOKED_BLOCK_ANCHOR_PATTERN.test(trimmed)) {
171176
- throw new Error("`wp-typia add hooked-block` requires --anchor <anchor-block-name> to use the full `namespace/slug` block name format.");
171172
+ return value;
171173
+ }
171174
+ function normalizeBlockSlug(input) {
171175
+ return toKebabCase(input);
171176
+ }
171177
+ function resolveNonEmptyNormalizedBlockSlug(options) {
171178
+ const normalizedSlug = normalizeBlockSlug(options.input);
171179
+ if (normalizedSlug.length > 0) {
171180
+ return normalizedSlug;
171177
171181
  }
171178
- return trimmed;
171182
+ if (options.input.trim().length === 0) {
171183
+ throw new Error(`${options.label} is required. Use \`${options.usage}\`.`);
171184
+ }
171185
+ throw new Error(`${options.label} "${options.input.trim()}" normalizes to an empty slug. Use letters or numbers so wp-typia can generate a block slug.`);
171179
171186
  }
171180
- function assertValidEditorPluginSlot(slot = "sidebar") {
171181
- const alias = resolveEditorPluginSlotAlias(slot);
171182
- if (alias) {
171183
- return alias;
171187
+ function resolveValidatedBlockSlug(value) {
171188
+ return assertValidIdentifier("Block slug", normalizeBlockSlug(value), validateBlockSlug);
171189
+ }
171190
+ function resolveValidatedNamespace(value) {
171191
+ return assertValidIdentifier("Namespace", toKebabCase(value), validateNamespace);
171192
+ }
171193
+ function resolveValidatedTextDomain(value) {
171194
+ return assertValidIdentifier("Text domain", toKebabCase(value), validateTextDomain);
171195
+ }
171196
+ function resolveValidatedPhpPrefix(value) {
171197
+ return assertValidIdentifier("PHP prefix", toSnakeCase(value), validatePhpPrefix);
171198
+ }
171199
+ function buildBlockCssClassName(namespace, slug) {
171200
+ const normalizedSlug = resolveValidatedBlockSlug(slug);
171201
+ const normalizedNamespace = typeof namespace === "string" && namespace.trim().length > 0 ? resolveValidatedNamespace(namespace) : "";
171202
+ if (normalizedNamespace === normalizedSlug) {
171203
+ return `wp-block-${normalizedSlug}-block`;
171184
171204
  }
171185
- throw new Error(`Editor plugin slot must be one of: ${EDITOR_PLUGIN_SLOT_IDS.join(", ")}. Legacy aliases: PluginSidebar, PluginDocumentSettingPanel.`);
171205
+ return normalizedNamespace.length > 0 ? `wp-block-${normalizedNamespace}-${normalizedSlug}` : `wp-block-${normalizedSlug}`;
171206
+ }
171207
+ function buildFrontendCssClassName(blockCssClassName) {
171208
+ return `${blockCssClassName}-frontend`;
171209
+ }
171210
+ function resolveScaffoldIdentifiers({
171211
+ namespace,
171212
+ phpPrefix,
171213
+ slug,
171214
+ textDomain
171215
+ }) {
171216
+ const normalizedSlug = resolveValidatedBlockSlug(slug);
171217
+ return {
171218
+ namespace: resolveValidatedNamespace(namespace),
171219
+ phpPrefix: resolveValidatedPhpPrefix(phpPrefix ?? normalizedSlug),
171220
+ slug: normalizedSlug,
171221
+ textDomain: resolveValidatedTextDomain(textDomain ?? normalizedSlug)
171222
+ };
171223
+ }
171224
+ // ../wp-typia-project-tools/src/runtime/cli-add-block-json.ts
171225
+ import fs from "fs";
171226
+ import path2 from "path";
171227
+ import { parseScaffoldBlockMetadata } from "@wp-typia/block-runtime/blocks";
171228
+ function resolveWorkspaceBlock(inventory, blockSlug) {
171229
+ const block = inventory.blocks.find((entry) => entry.slug === blockSlug);
171230
+ if (!block) {
171231
+ throw new Error(`Unknown workspace block "${blockSlug}". Choose one of: ${inventory.blocks.map((entry) => entry.slug).join(", ")}`);
171232
+ }
171233
+ return block;
171186
171234
  }
171187
171235
  function readWorkspaceBlockJson(projectDir, blockSlug) {
171188
- const blockJsonPath = path.join(projectDir, "src", "blocks", blockSlug, "block.json");
171236
+ const blockJsonPath = path2.join(projectDir, "src", "blocks", blockSlug, "block.json");
171189
171237
  if (!fs.existsSync(blockJsonPath)) {
171190
- throw new Error(`Missing ${path.relative(projectDir, blockJsonPath)} for workspace block "${blockSlug}".`);
171238
+ throw new Error(`Missing ${path2.relative(projectDir, blockJsonPath)} for workspace block "${blockSlug}".`);
171191
171239
  }
171192
171240
  let blockJson;
171193
171241
  try {
171194
171242
  blockJson = parseScaffoldBlockMetadata(JSON.parse(fs.readFileSync(blockJsonPath, "utf8")));
171195
171243
  } catch (error) {
171196
- throw new Error(error instanceof Error ? `Failed to parse ${path.relative(projectDir, blockJsonPath)}: ${error.message}` : `Failed to parse ${path.relative(projectDir, blockJsonPath)}.`);
171244
+ throw new Error(error instanceof Error ? `Failed to parse ${path2.relative(projectDir, blockJsonPath)}: ${error.message}` : `Failed to parse ${path2.relative(projectDir, blockJsonPath)}.`);
171197
171245
  }
171198
171246
  return {
171199
171247
  blockJson,
@@ -171212,11 +171260,14 @@ function getMutableBlockHooks(blockJson, blockJsonRelativePath) {
171212
171260
  }
171213
171261
  return blockHooks;
171214
171262
  }
171263
+ // ../wp-typia-project-tools/src/runtime/cli-add-collision.ts
171264
+ import fs2 from "fs";
171265
+ import path3 from "path";
171215
171266
  function assertScaffoldDoesNotExist(options) {
171216
171267
  for (const collision of options.filesystemCollisions) {
171217
- const targetPath = path.join(options.projectDir, collision.relativePath);
171218
- if (fs.existsSync(targetPath)) {
171219
- throw new Error(`${collision.label} already exists at ${path.relative(options.projectDir, targetPath)}. Choose a different name.`);
171268
+ const targetPath = path3.join(options.projectDir, collision.relativePath);
171269
+ if (fs2.existsSync(targetPath)) {
171270
+ throw new Error(`${collision.label} already exists at ${path3.relative(options.projectDir, targetPath)}. Choose a different name.`);
171220
171271
  }
171221
171272
  }
171222
171273
  if (options.inventoryCollision && options.inventoryCollision.entries.some(options.inventoryCollision.exists)) {
@@ -171228,7 +171279,7 @@ function assertVariationDoesNotExist(projectDir, blockSlug, variationSlug, inven
171228
171279
  filesystemCollisions: [
171229
171280
  {
171230
171281
  label: "A variation",
171231
- relativePath: path.join("src", "blocks", blockSlug, "variations", `${variationSlug}.ts`)
171282
+ relativePath: path3.join("src", "blocks", blockSlug, "variations", `${variationSlug}.ts`)
171232
171283
  }
171233
171284
  ],
171234
171285
  inventoryCollision: {
@@ -171244,7 +171295,7 @@ function assertBlockStyleDoesNotExist(projectDir, blockSlug, styleSlug, inventor
171244
171295
  filesystemCollisions: [
171245
171296
  {
171246
171297
  label: "A block style",
171247
- relativePath: path.join("src", "blocks", blockSlug, "styles", `${styleSlug}.ts`)
171298
+ relativePath: path3.join("src", "blocks", blockSlug, "styles", `${styleSlug}.ts`)
171248
171299
  }
171249
171300
  ],
171250
171301
  inventoryCollision: {
@@ -171260,7 +171311,7 @@ function assertBlockTransformDoesNotExist(projectDir, blockSlug, transformSlug,
171260
171311
  filesystemCollisions: [
171261
171312
  {
171262
171313
  label: "A block transform",
171263
- relativePath: path.join("src", "blocks", blockSlug, "transforms", `${transformSlug}.ts`)
171314
+ relativePath: path3.join("src", "blocks", blockSlug, "transforms", `${transformSlug}.ts`)
171264
171315
  }
171265
171316
  ],
171266
171317
  inventoryCollision: {
@@ -171276,7 +171327,7 @@ function assertPatternDoesNotExist(projectDir, patternSlug, inventory) {
171276
171327
  filesystemCollisions: [
171277
171328
  {
171278
171329
  label: "A pattern",
171279
- relativePath: path.join("src", "patterns", `${patternSlug}.php`)
171330
+ relativePath: path3.join("src", "patterns", `${patternSlug}.php`)
171280
171331
  }
171281
171332
  ],
171282
171333
  inventoryCollision: {
@@ -171292,7 +171343,7 @@ function assertBindingSourceDoesNotExist(projectDir, bindingSourceSlug, inventor
171292
171343
  filesystemCollisions: [
171293
171344
  {
171294
171345
  label: "A binding source",
171295
- relativePath: path.join("src", "bindings", bindingSourceSlug)
171346
+ relativePath: path3.join("src", "bindings", bindingSourceSlug)
171296
171347
  }
171297
171348
  ],
171298
171349
  inventoryCollision: {
@@ -171308,11 +171359,11 @@ function assertRestResourceDoesNotExist(projectDir, restResourceSlug, inventory)
171308
171359
  filesystemCollisions: [
171309
171360
  {
171310
171361
  label: "A REST resource",
171311
- relativePath: path.join("src", "rest", restResourceSlug)
171362
+ relativePath: path3.join("src", "rest", restResourceSlug)
171312
171363
  },
171313
171364
  {
171314
171365
  label: "A REST resource bootstrap",
171315
- relativePath: path.join("inc", "rest", `${restResourceSlug}.php`)
171366
+ relativePath: path3.join("inc", "rest", `${restResourceSlug}.php`)
171316
171367
  }
171317
171368
  ],
171318
171369
  inventoryCollision: {
@@ -171328,11 +171379,11 @@ function assertAdminViewDoesNotExist(projectDir, adminViewSlug, inventory) {
171328
171379
  filesystemCollisions: [
171329
171380
  {
171330
171381
  label: "An admin view",
171331
- relativePath: path.join("src", "admin-views", adminViewSlug)
171382
+ relativePath: path3.join("src", "admin-views", adminViewSlug)
171332
171383
  },
171333
171384
  {
171334
171385
  label: "An admin view bootstrap",
171335
- relativePath: path.join("inc", "admin-views", `${adminViewSlug}.php`)
171386
+ relativePath: path3.join("inc", "admin-views", `${adminViewSlug}.php`)
171336
171387
  }
171337
171388
  ],
171338
171389
  inventoryCollision: {
@@ -171348,11 +171399,11 @@ function assertAbilityDoesNotExist(projectDir, abilitySlug, inventory) {
171348
171399
  filesystemCollisions: [
171349
171400
  {
171350
171401
  label: "An ability scaffold",
171351
- relativePath: path.join("src", "abilities", abilitySlug)
171402
+ relativePath: path3.join("src", "abilities", abilitySlug)
171352
171403
  },
171353
171404
  {
171354
171405
  label: "An ability bootstrap",
171355
- relativePath: path.join("inc", "abilities", `${abilitySlug}.php`)
171406
+ relativePath: path3.join("inc", "abilities", `${abilitySlug}.php`)
171356
171407
  }
171357
171408
  ],
171358
171409
  inventoryCollision: {
@@ -171368,11 +171419,11 @@ function assertAiFeatureDoesNotExist(projectDir, aiFeatureSlug, inventory) {
171368
171419
  filesystemCollisions: [
171369
171420
  {
171370
171421
  label: "An AI feature",
171371
- relativePath: path.join("src", "ai-features", aiFeatureSlug)
171422
+ relativePath: path3.join("src", "ai-features", aiFeatureSlug)
171372
171423
  },
171373
171424
  {
171374
171425
  label: "An AI feature bootstrap",
171375
- relativePath: path.join("inc", "ai-features", `${aiFeatureSlug}.php`)
171426
+ relativePath: path3.join("inc", "ai-features", `${aiFeatureSlug}.php`)
171376
171427
  }
171377
171428
  ],
171378
171429
  inventoryCollision: {
@@ -171388,7 +171439,7 @@ function assertEditorPluginDoesNotExist(projectDir, editorPluginSlug, inventory)
171388
171439
  filesystemCollisions: [
171389
171440
  {
171390
171441
  label: "An editor plugin",
171391
- relativePath: path.join("src", "editor-plugins", editorPluginSlug)
171442
+ relativePath: path3.join("src", "editor-plugins", editorPluginSlug)
171392
171443
  }
171393
171444
  ],
171394
171445
  inventoryCollision: {
@@ -171399,46 +171450,10 @@ function assertEditorPluginDoesNotExist(projectDir, editorPluginSlug, inventory)
171399
171450
  projectDir
171400
171451
  });
171401
171452
  }
171402
- function formatAddHelpText() {
171403
- return `Usage:
171404
- wp-typia add admin-view <name> [--source <rest-resource:slug|core-data:kind/name>] [--dry-run]
171405
- wp-typia add block <name> [--template <${ADD_BLOCK_TEMPLATE_IDS.join("|")}>] [--external-layer-source <./path|github:owner/repo/path[#ref]|npm-package>] [--external-layer-id <layer-id>] [--inner-blocks-preset <freeform|ordered|horizontal|locked-structure>] [--alternate-render-targets <email,mjml,plain-text>] [--data-storage <post-meta|custom-table>] [--persistence-policy <authenticated|public>] [--dry-run]
171406
- wp-typia add variation <name> --block <block-slug> [--dry-run]
171407
- wp-typia add style <name> --block <block-slug> [--dry-run]
171408
- wp-typia add transform <name> --from <namespace/block> --to <block-slug|namespace/block-slug> [--dry-run]
171409
- wp-typia add pattern <name> [--dry-run]
171410
- wp-typia add binding-source <name> [--block <block-slug|namespace/block-slug> --attribute <attribute>] [--dry-run]
171411
- wp-typia add rest-resource <name> [--namespace <vendor/v1>] [--methods <list,read,create,update,delete>] [--dry-run]
171412
- wp-typia add ability <name> [--dry-run]
171413
- wp-typia add ai-feature <name> [--namespace <vendor/v1>] [--dry-run]
171414
- wp-typia add hooked-block <block-slug> --anchor <anchor-block-name> --position <${HOOKED_BLOCK_POSITION_IDS.join("|")}> [--dry-run]
171415
- wp-typia add editor-plugin <name> [--slot <${EDITOR_PLUGIN_SLOT_IDS.join("|")}>] [--dry-run]
171416
-
171417
- Notes:
171418
- \`wp-typia add\` runs only inside official ${WORKSPACE_TEMPLATE_PACKAGE} workspaces scaffolded via \`wp-typia create <project-dir> --template workspace\`.
171419
- Pass \`--dry-run\` to preview the workspace files that would change without writing them.
171420
- Interactive add flows let you choose a template when \`--template\` is omitted; non-interactive runs default to \`basic\`.
171421
- \`add admin-view\` scaffolds an opt-in DataViews-powered WordPress admin screen under \`src/admin-views/\`.
171422
- Pass \`--source rest-resource:<slug>\` to reuse a list-capable REST resource.
171423
- Pass \`--source core-data:postType/post\` or \`--source core-data:taxonomy/category\` to bind a WordPress-owned entity collection.
171424
- Public installs currently gate this workflow until \`@wp-typia/dataviews\` is published to npm.
171425
- \`query-loop\` is a create-time scaffold family. Use \`wp-typia create <project-dir> --template query-loop\` instead of \`wp-typia add block\`.
171426
- \`add variation\` targets an existing block slug from \`scripts/block-config.ts\`.
171427
- \`add style\` registers a Block Styles option for an existing generated block.
171428
- \`add transform\` adds a block-to-block transform into an existing generated block.
171429
- \`add pattern\` scaffolds a namespaced PHP pattern shell under \`src/patterns/\`.
171430
- \`add binding-source\` scaffolds shared PHP and editor registration under \`src/bindings/\`; pass \`--block\` and \`--attribute\` together to declare an end-to-end bindable attribute on an existing generated block.
171431
- \`add rest-resource\` scaffolds plugin-level TypeScript REST contracts under \`src/rest/\` and PHP route glue under \`inc/rest/\`.
171432
- \`add ability\` scaffolds typed workflow abilities under \`src/abilities/\` and server registration under \`inc/abilities/\`.
171433
- \`add ai-feature\` scaffolds server-owned AI feature endpoints under \`src/ai-features/\` and PHP route glue under \`inc/ai-features/\`.
171434
- \`add hooked-block\` patches an existing workspace block's \`block.json\` \`blockHooks\` metadata.
171435
- \`add editor-plugin\` scaffolds a document-level editor extension under \`src/editor-plugins/\`; legacy aliases \`PluginSidebar\` and \`PluginDocumentSettingPanel\` resolve to \`sidebar\` and \`document-setting-panel\`.`;
171436
- }
171437
-
171438
171453
  // ../wp-typia-project-tools/src/runtime/workspace-inventory.ts
171439
171454
  var import_typescript = __toESM(require_typescript(), 1);
171440
- import fs2 from "fs";
171441
- import path2 from "path";
171455
+ import fs3 from "fs";
171456
+ import path4 from "path";
171442
171457
  import { readFile, writeFile } from "fs/promises";
171443
171458
 
171444
171459
  // ../wp-typia-project-tools/src/runtime/php-utils.ts
@@ -171698,6 +171713,108 @@ export const EDITOR_PLUGINS: WorkspaceEditorPluginConfig[] = [
171698
171713
  // wp-typia add editor-plugin entries
171699
171714
  ];
171700
171715
  `;
171716
+ var INVENTORY_SECTIONS = [
171717
+ {
171718
+ interface: {
171719
+ name: "WorkspaceVariationConfig",
171720
+ section: VARIATIONS_INTERFACE_SECTION
171721
+ },
171722
+ value: {
171723
+ name: "VARIATIONS",
171724
+ section: VARIATIONS_CONST_SECTION
171725
+ }
171726
+ },
171727
+ {
171728
+ interface: {
171729
+ name: "WorkspaceBlockStyleConfig",
171730
+ section: BLOCK_STYLES_INTERFACE_SECTION
171731
+ },
171732
+ value: {
171733
+ name: "BLOCK_STYLES",
171734
+ section: BLOCK_STYLES_CONST_SECTION
171735
+ }
171736
+ },
171737
+ {
171738
+ interface: {
171739
+ name: "WorkspaceBlockTransformConfig",
171740
+ section: BLOCK_TRANSFORMS_INTERFACE_SECTION
171741
+ },
171742
+ value: {
171743
+ name: "BLOCK_TRANSFORMS",
171744
+ section: BLOCK_TRANSFORMS_CONST_SECTION
171745
+ }
171746
+ },
171747
+ {
171748
+ interface: {
171749
+ name: "WorkspacePatternConfig",
171750
+ section: PATTERNS_INTERFACE_SECTION
171751
+ },
171752
+ value: {
171753
+ name: "PATTERNS",
171754
+ section: PATTERNS_CONST_SECTION
171755
+ }
171756
+ },
171757
+ {
171758
+ interface: {
171759
+ name: "WorkspaceBindingSourceConfig",
171760
+ section: BINDING_SOURCES_INTERFACE_SECTION
171761
+ },
171762
+ value: {
171763
+ name: "BINDING_SOURCES",
171764
+ section: BINDING_SOURCES_CONST_SECTION
171765
+ }
171766
+ },
171767
+ {
171768
+ interface: {
171769
+ name: "WorkspaceRestResourceConfig",
171770
+ section: REST_RESOURCES_INTERFACE_SECTION
171771
+ },
171772
+ value: {
171773
+ name: "REST_RESOURCES",
171774
+ section: REST_RESOURCES_CONST_SECTION
171775
+ }
171776
+ },
171777
+ {
171778
+ interface: {
171779
+ name: "WorkspaceAbilityConfig",
171780
+ section: ABILITIES_INTERFACE_SECTION
171781
+ },
171782
+ value: {
171783
+ name: "ABILITIES",
171784
+ section: ABILITIES_CONST_SECTION
171785
+ }
171786
+ },
171787
+ {
171788
+ interface: {
171789
+ name: "WorkspaceAiFeatureConfig",
171790
+ section: AI_FEATURES_INTERFACE_SECTION
171791
+ },
171792
+ value: {
171793
+ name: "AI_FEATURES",
171794
+ section: AI_FEATURES_CONST_SECTION
171795
+ }
171796
+ },
171797
+ {
171798
+ interface: {
171799
+ name: "WorkspaceAdminViewConfig",
171800
+ section: ADMIN_VIEWS_INTERFACE_SECTION
171801
+ },
171802
+ value: {
171803
+ name: "ADMIN_VIEWS",
171804
+ section: ADMIN_VIEWS_CONST_SECTION
171805
+ }
171806
+ },
171807
+ {
171808
+ interface: {
171809
+ name: "WorkspaceEditorPluginConfig",
171810
+ section: EDITOR_PLUGINS_INTERFACE_SECTION
171811
+ },
171812
+ value: {
171813
+ name: "EDITOR_PLUGINS",
171814
+ section: EDITOR_PLUGINS_CONST_SECTION
171815
+ }
171816
+ }
171817
+ ];
171701
171818
  function getPropertyNameText(name) {
171702
171819
  if (import_typescript.default.isIdentifier(name) || import_typescript.default.isStringLiteral(name)) {
171703
171820
  return name.text;
@@ -172013,10 +172130,10 @@ function parseWorkspaceInventorySource(source) {
172013
172130
  };
172014
172131
  }
172015
172132
  function readWorkspaceInventory(projectDir) {
172016
- const blockConfigPath = path2.join(projectDir, "scripts", "block-config.ts");
172133
+ const blockConfigPath = path4.join(projectDir, "scripts", "block-config.ts");
172017
172134
  let source;
172018
172135
  try {
172019
- source = fs2.readFileSync(blockConfigPath, "utf8");
172136
+ source = fs3.readFileSync(blockConfigPath, "utf8");
172020
172137
  } catch (error) {
172021
172138
  if (typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT") {
172022
172139
  throw new Error(`Workspace inventory file is missing at ${blockConfigPath}. Expected scripts/block-config.ts to exist.`);
@@ -172037,69 +172154,23 @@ function getWorkspaceBlockSelectOptions(projectDir) {
172037
172154
  }
172038
172155
  function ensureWorkspaceInventorySections(source) {
172039
172156
  let nextSource = source.trimEnd();
172040
- if (!/export\s+interface\s+WorkspaceVariationConfig\b/u.test(nextSource)) {
172041
- nextSource += VARIATIONS_INTERFACE_SECTION;
172042
- }
172043
- if (!/export\s+const\s+VARIATIONS\b/u.test(nextSource)) {
172044
- nextSource += VARIATIONS_CONST_SECTION;
172045
- }
172046
- if (!/export\s+interface\s+WorkspaceBlockStyleConfig\b/u.test(nextSource)) {
172047
- nextSource += BLOCK_STYLES_INTERFACE_SECTION;
172048
- }
172049
- if (!/export\s+const\s+BLOCK_STYLES\b/u.test(nextSource)) {
172050
- nextSource += BLOCK_STYLES_CONST_SECTION;
172051
- }
172052
- if (!/export\s+interface\s+WorkspaceBlockTransformConfig\b/u.test(nextSource)) {
172053
- nextSource += BLOCK_TRANSFORMS_INTERFACE_SECTION;
172054
- }
172055
- if (!/export\s+const\s+BLOCK_TRANSFORMS\b/u.test(nextSource)) {
172056
- nextSource += BLOCK_TRANSFORMS_CONST_SECTION;
172057
- }
172058
- if (!/export\s+interface\s+WorkspacePatternConfig\b/u.test(nextSource)) {
172059
- nextSource += PATTERNS_INTERFACE_SECTION;
172060
- }
172061
- if (!/export\s+const\s+PATTERNS\b/u.test(nextSource)) {
172062
- nextSource += PATTERNS_CONST_SECTION;
172063
- }
172064
- if (!/export\s+interface\s+WorkspaceBindingSourceConfig\b/u.test(nextSource)) {
172065
- nextSource += BINDING_SOURCES_INTERFACE_SECTION;
172066
- }
172067
- if (!/export\s+const\s+BINDING_SOURCES\b/u.test(nextSource)) {
172068
- nextSource += BINDING_SOURCES_CONST_SECTION;
172069
- }
172070
- if (!/export\s+interface\s+WorkspaceRestResourceConfig\b/u.test(nextSource)) {
172071
- nextSource += REST_RESOURCES_INTERFACE_SECTION;
172072
- }
172073
- if (!/export\s+const\s+REST_RESOURCES\b/u.test(nextSource)) {
172074
- nextSource += REST_RESOURCES_CONST_SECTION;
172075
- }
172076
- if (!/export\s+interface\s+WorkspaceAbilityConfig\b/u.test(nextSource)) {
172077
- nextSource += ABILITIES_INTERFACE_SECTION;
172078
- }
172079
- if (!/export\s+const\s+ABILITIES\b/u.test(nextSource)) {
172080
- nextSource += ABILITIES_CONST_SECTION;
172081
- }
172082
- if (!/export\s+interface\s+WorkspaceAiFeatureConfig\b/u.test(nextSource)) {
172083
- nextSource += AI_FEATURES_INTERFACE_SECTION;
172084
- }
172085
- if (!/export\s+const\s+AI_FEATURES\b/u.test(nextSource)) {
172086
- nextSource += AI_FEATURES_CONST_SECTION;
172087
- }
172088
- if (!/export\s+interface\s+WorkspaceAdminViewConfig\b/u.test(nextSource)) {
172089
- nextSource += ADMIN_VIEWS_INTERFACE_SECTION;
172090
- }
172091
- if (!/export\s+const\s+ADMIN_VIEWS\b/u.test(nextSource)) {
172092
- nextSource += ADMIN_VIEWS_CONST_SECTION;
172093
- }
172094
- if (!/export\s+interface\s+WorkspaceEditorPluginConfig\b/u.test(nextSource)) {
172095
- nextSource += EDITOR_PLUGINS_INTERFACE_SECTION;
172096
- }
172097
- if (!/export\s+const\s+EDITOR_PLUGINS\b/u.test(nextSource)) {
172098
- nextSource += EDITOR_PLUGINS_CONST_SECTION;
172157
+ for (const section of INVENTORY_SECTIONS) {
172158
+ if (section.interface && !hasExportedInterface(nextSource, section.interface.name)) {
172159
+ nextSource += section.interface.section;
172160
+ }
172161
+ if (section.value && !hasExportedConst(nextSource, section.value.name)) {
172162
+ nextSource += section.value.section;
172163
+ }
172099
172164
  }
172100
172165
  return `${nextSource}
172101
172166
  `;
172102
172167
  }
172168
+ function hasExportedInterface(source, interfaceName) {
172169
+ return new RegExp(`export\\s+interface\\s+${escapeRegex(interfaceName)}\\b`, "u").test(source);
172170
+ }
172171
+ function hasExportedConst(source, constName) {
172172
+ return new RegExp(`export\\s+const\\s+${escapeRegex(constName)}\\b`, "u").test(source);
172173
+ }
172103
172174
  function appendEntriesAtMarker(source, marker, entries) {
172104
172175
  if (entries.length === 0) {
172105
172176
  return source;
@@ -172196,7 +172267,7 @@ function updateWorkspaceInventorySource(source, {
172196
172267
  return nextSource;
172197
172268
  }
172198
172269
  async function appendWorkspaceInventoryEntries(projectDir, options) {
172199
- const blockConfigPath = path2.join(projectDir, "scripts", "block-config.ts");
172270
+ const blockConfigPath = path4.join(projectDir, "scripts", "block-config.ts");
172200
172271
  const source = await readFile(blockConfigPath, "utf8");
172201
172272
  const nextSource = updateWorkspaceInventorySource(source, options);
172202
172273
  if (nextSource !== source) {
@@ -172204,6 +172275,6 @@ async function appendWorkspaceInventoryEntries(projectDir, options) {
172204
172275
  }
172205
172276
  }
172206
172277
 
172207
- export { HOOKED_BLOCK_POSITION_SET, HOOKED_BLOCK_ANCHOR_PATTERN, toKebabCase, toSnakeCase, toPascalCase, toCamelCase, toSegmentPascalCase, toTitleCase, validateBlockSlug, validateNamespace, normalizeBlockSlug, resolveNonEmptyNormalizedBlockSlug, buildBlockCssClassName, buildFrontendCssClassName, resolveScaffoldIdentifiers, ADD_KIND_IDS, REST_RESOURCE_METHOD_IDS, EDITOR_PLUGIN_SLOT_IDS, resolveEditorPluginSlotAlias, ADD_BLOCK_TEMPLATE_IDS, REST_RESOURCE_NAMESPACE_PATTERN, assertValidGeneratedSlug, resolveRestResourceNamespace, assertValidRestResourceMethods, assertValidHookedBlockPosition, getWorkspaceBootstrapPath, buildWorkspacePhpPrefix, isAddBlockTemplateId, quoteTsString, patchFile, readOptionalFile, snapshotWorkspaceFiles, rollbackWorkspaceMutation, resolveWorkspaceBlock, assertValidHookAnchor, assertValidEditorPluginSlot, readWorkspaceBlockJson, getMutableBlockHooks, assertVariationDoesNotExist, assertBlockStyleDoesNotExist, assertBlockTransformDoesNotExist, assertPatternDoesNotExist, assertBindingSourceDoesNotExist, assertRestResourceDoesNotExist, assertAdminViewDoesNotExist, assertAbilityDoesNotExist, assertAiFeatureDoesNotExist, assertEditorPluginDoesNotExist, formatAddHelpText, require_typescript, escapeRegex, quotePhpString, hasPhpFunctionDefinition, findPhpFunctionRange, replacePhpFunctionDefinition, readWorkspaceInventory, getWorkspaceBlockSelectOptions, updateWorkspaceInventorySource, appendWorkspaceInventoryEntries };
172278
+ export { toKebabCase, toSnakeCase, toPascalCase, toCamelCase, toSegmentPascalCase, toTitleCase, validateBlockSlug, validateNamespace, normalizeBlockSlug, resolveNonEmptyNormalizedBlockSlug, buildBlockCssClassName, buildFrontendCssClassName, resolveScaffoldIdentifiers, ADD_KIND_IDS, REST_RESOURCE_METHOD_IDS, EDITOR_PLUGIN_SLOT_IDS, resolveEditorPluginSlotAlias, ADD_BLOCK_TEMPLATE_IDS, HOOKED_BLOCK_POSITION_SET, HOOKED_BLOCK_ANCHOR_PATTERN, REST_RESOURCE_NAMESPACE_PATTERN, assertValidGeneratedSlug, resolveRestResourceNamespace, assertValidRestResourceMethods, assertValidHookedBlockPosition, buildWorkspacePhpPrefix, isAddBlockTemplateId, quoteTsString, assertValidHookAnchor, assertValidEditorPluginSlot, getWorkspaceBootstrapPath, patchFile, readOptionalFile, snapshotWorkspaceFiles, rollbackWorkspaceMutation, resolveWorkspaceBlock, readWorkspaceBlockJson, getMutableBlockHooks, assertVariationDoesNotExist, assertBlockStyleDoesNotExist, assertBlockTransformDoesNotExist, assertPatternDoesNotExist, assertBindingSourceDoesNotExist, assertRestResourceDoesNotExist, assertAdminViewDoesNotExist, assertAbilityDoesNotExist, assertAiFeatureDoesNotExist, assertEditorPluginDoesNotExist, formatAddHelpText, require_typescript, escapeRegex, quotePhpString, hasPhpFunctionDefinition, findPhpFunctionRange, replacePhpFunctionDefinition, readWorkspaceInventory, getWorkspaceBlockSelectOptions, updateWorkspaceInventorySource, appendWorkspaceInventoryEntries };
172208
172279
 
172209
- //# debugId=C51F6016D6101EE964756E2164756E21
172280
+ //# debugId=42C4B300381ECACF64756E2164756E21