@ttsc/vscode 0.31.4 → 0.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/extension.js CHANGED
@@ -11274,11 +11274,11 @@ var require_commonjs3 = __commonJS({
11274
11274
  return (f) => f.length === len && f !== "." && f !== "..";
11275
11275
  };
11276
11276
  var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
11277
- var path8 = {
11277
+ var path9 = {
11278
11278
  win32: { sep: "\\" },
11279
11279
  posix: { sep: "/" }
11280
11280
  };
11281
- exports2.sep = defaultPlatform === "win32" ? path8.win32.sep : path8.posix.sep;
11281
+ exports2.sep = defaultPlatform === "win32" ? path9.win32.sep : path9.posix.sep;
11282
11282
  exports2.minimatch.sep = exports2.sep;
11283
11283
  exports2.GLOBSTAR = Symbol("globstar **");
11284
11284
  exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR;
@@ -14113,13 +14113,13 @@ var require_configuration = __commonJS({
14113
14113
  });
14114
14114
  }
14115
14115
  extractSettingsInformation(keys) {
14116
- function ensurePath(config, path8) {
14116
+ function ensurePath(config, path9) {
14117
14117
  let current2 = config;
14118
- for (let i = 0; i < path8.length - 1; i++) {
14119
- let obj = current2[path8[i]];
14118
+ for (let i = 0; i < path9.length - 1; i++) {
14119
+ let obj = current2[path9[i]];
14120
14120
  if (!obj) {
14121
14121
  obj = /* @__PURE__ */ Object.create(null);
14122
- current2[path8[i]] = obj;
14122
+ current2[path9[i]] = obj;
14123
14123
  }
14124
14124
  current2 = obj;
14125
14125
  }
@@ -14137,8 +14137,8 @@ var require_configuration = __commonJS({
14137
14137
  config = vscode_1.workspace.getConfiguration(void 0, resource).get(key);
14138
14138
  }
14139
14139
  if (config) {
14140
- const path8 = keys[i].split(".");
14141
- ensurePath(result, path8)[path8[path8.length - 1]] = toJSONObject(config);
14140
+ const path9 = keys[i].split(".");
14141
+ ensurePath(result, path9)[path9[path9.length - 1]] = toJSONObject(config);
14142
14142
  }
14143
14143
  }
14144
14144
  return result;
@@ -18113,13 +18113,13 @@ var require_fileOperations = __commonJS({
18113
18113
  async filter(event2, prop) {
18114
18114
  const fileMatches = await Promise.all(event2.files.map(async (item) => {
18115
18115
  const uri = prop(item);
18116
- const path8 = uri.fsPath.replace(/\\/g, "/");
18116
+ const path9 = uri.fsPath.replace(/\\/g, "/");
18117
18117
  for (const filters of this._filters.values()) {
18118
18118
  for (const filter of filters) {
18119
18119
  if (filter.scheme !== void 0 && filter.scheme !== uri.scheme) {
18120
18120
  continue;
18121
18121
  }
18122
- if (filter.matcher.match(path8)) {
18122
+ if (filter.matcher.match(path9)) {
18123
18123
  if (filter.kind === void 0) {
18124
18124
  return true;
18125
18125
  }
@@ -18133,7 +18133,7 @@ var require_fileOperations = __commonJS({
18133
18133
  }
18134
18134
  } else if (filter.kind === proto.FileOperationPatternKind.folder) {
18135
18135
  const fileType = await _FileOperationFeature.getFileType(uri);
18136
- if (fileType === code.FileType.Directory && filter.matcher.match(`${path8}/`)) {
18136
+ if (fileType === code.FileType.Directory && filter.matcher.match(`${path9}/`)) {
18137
18137
  return true;
18138
18138
  }
18139
18139
  }
@@ -20781,9 +20781,9 @@ var require_main = __commonJS({
20781
20781
  exports2.createMessageConnection = createMessageConnection;
20782
20782
  var ril_1 = __importDefault(require_ril());
20783
20783
  ril_1.default.install();
20784
- var path8 = __importStar(require("path"));
20784
+ var path9 = __importStar(require("path"));
20785
20785
  var os = __importStar(require("os"));
20786
- var fs4 = __importStar(require("fs"));
20786
+ var fs5 = __importStar(require("fs"));
20787
20787
  var crypto_1 = require("crypto");
20788
20788
  var net_1 = require("net");
20789
20789
  var api_1 = require_api();
@@ -20924,7 +20924,7 @@ var require_main = __commonJS({
20924
20924
  }
20925
20925
  let randomLength = 32;
20926
20926
  const fixedLength = "/lsp-.sock".length;
20927
- const tmpDir = fs4.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir());
20927
+ const tmpDir = fs5.realpathSync(XDG_RUNTIME_DIR ?? os.tmpdir());
20928
20928
  const limit = safeIpcPathLengths.get(process.platform);
20929
20929
  if (limit !== void 0) {
20930
20930
  randomLength = Math.min(limit - tmpDir.length - fixedLength, randomLength);
@@ -20933,7 +20933,7 @@ var require_main = __commonJS({
20933
20933
  throw new Error(`Unable to generate a random pipe name with ${randomLength} characters.`);
20934
20934
  }
20935
20935
  const randomSuffix = (0, crypto_1.randomBytes)(Math.floor(randomLength / 2)).toString("hex");
20936
- return path8.join(tmpDir, `lsp-${randomSuffix}.sock`);
20936
+ return path9.join(tmpDir, `lsp-${randomSuffix}.sock`);
20937
20937
  }
20938
20938
  function createClientPipeTransport(pipeName, encoding = "utf-8") {
20939
20939
  let connectResolve;
@@ -22293,8 +22293,8 @@ var require_main3 = __commonJS({
22293
22293
  Object.defineProperty(exports2, "__esModule", { value: true });
22294
22294
  exports2.SettingMonitor = exports2.LanguageClient = exports2.TransportKind = void 0;
22295
22295
  var cp = __importStar(require("child_process"));
22296
- var fs4 = __importStar(require("fs"));
22297
- var path8 = __importStar(require("path"));
22296
+ var fs5 = __importStar(require("fs"));
22297
+ var path9 = __importStar(require("path"));
22298
22298
  var readline = __importStar(require("readline"));
22299
22299
  var vscode_1 = require("vscode");
22300
22300
  var Is2 = __importStar(require_is());
@@ -22739,19 +22739,19 @@ var require_main3 = __commonJS({
22739
22739
  });
22740
22740
  }
22741
22741
  _getRuntimePath(runtime, serverWorkingDirectory) {
22742
- if (path8.isAbsolute(runtime)) {
22742
+ if (path9.isAbsolute(runtime)) {
22743
22743
  return runtime;
22744
22744
  }
22745
22745
  const mainRootPath = this._mainGetRootPath();
22746
22746
  if (mainRootPath !== void 0) {
22747
- const result = path8.join(mainRootPath, runtime);
22748
- if (fs4.existsSync(result)) {
22747
+ const result = path9.join(mainRootPath, runtime);
22748
+ if (fs5.existsSync(result)) {
22749
22749
  return result;
22750
22750
  }
22751
22751
  }
22752
22752
  if (serverWorkingDirectory !== void 0) {
22753
- const result = path8.join(serverWorkingDirectory, runtime);
22754
- if (fs4.existsSync(result)) {
22753
+ const result = path9.join(serverWorkingDirectory, runtime);
22754
+ if (fs5.existsSync(result)) {
22755
22755
  return result;
22756
22756
  }
22757
22757
  }
@@ -22775,7 +22775,7 @@ var require_main3 = __commonJS({
22775
22775
  }
22776
22776
  if (cwd) {
22777
22777
  return new Promise((s) => {
22778
- fs4.lstat(cwd, (err, stats) => {
22778
+ fs5.lstat(cwd, (err, stats) => {
22779
22779
  s(!err && stats.isDirectory() ? cwd : void 0);
22780
22780
  });
22781
22781
  });
@@ -22836,7 +22836,7 @@ __export(extension_exports, {
22836
22836
  deactivate: () => deactivate
22837
22837
  });
22838
22838
  module.exports = __toCommonJS(extension_exports);
22839
- var path7 = __toESM(require("node:path"));
22839
+ var path8 = __toESM(require("node:path"));
22840
22840
  var import_vscode = require("vscode");
22841
22841
  var import_node = __toESM(require_main3());
22842
22842
 
@@ -22962,14 +22962,14 @@ function resolveWithDirectoryMemo(key, memo, resolve2) {
22962
22962
 
22963
22963
  // src/serverResolution.ts
22964
22964
  var import_node_crypto2 = require("node:crypto");
22965
- var import_node_fs3 = __toESM(require("node:fs"));
22965
+ var import_node_fs4 = __toESM(require("node:fs"));
22966
22966
  var import_node_module = require("node:module");
22967
- var import_node_path6 = __toESM(require("node:path"));
22967
+ var import_node_path7 = __toESM(require("node:path"));
22968
22968
 
22969
- // ../ttsc/src/internal/pathIdentity/createFilesystemPathIdentityContext.ts
22969
+ // ../ttsc/src/internal/pathIdentity/createCaseSensitivityObservations.ts
22970
22970
  var import_node_child_process = __toESM(require("node:child_process"));
22971
22971
  var import_node_fs2 = __toESM(require("node:fs"));
22972
- var import_node_path4 = __toESM(require("node:path"));
22972
+ var import_node_path3 = __toESM(require("node:path"));
22973
22973
 
22974
22974
  // ../ttsc/src/internal/E2ETrace.ts
22975
22975
  var import_node_crypto = __toESM(require("node:crypto"));
@@ -23409,20 +23409,10 @@ function parseWindowsDirectoryCaseSensitivity(directoryOutput, volumeOutput, vol
23409
23409
  return !directoryOutput.subarray(directoryOutput.length - disabledSuffix.length).equals(disabledSuffix);
23410
23410
  }
23411
23411
 
23412
- // ../ttsc/src/internal/pathIdentity/isFilesystemPathIdentityWithin.ts
23413
- var import_node_path2 = __toESM(require("node:path"));
23414
- function isFilesystemPathIdentityWithin(root2, candidate, platform = process.platform) {
23415
- if (candidate === root2) return true;
23416
- const separator = platform === "win32" ? import_node_path2.default.win32.sep : import_node_path2.default.posix.sep;
23417
- return candidate.startsWith(
23418
- root2.endsWith(separator) ? root2 : `${root2}${separator}`
23419
- );
23420
- }
23421
-
23422
23412
  // ../ttsc/src/internal/pathIdentity/resolveFilesystemPath.ts
23423
- var import_node_path3 = __toESM(require("node:path"));
23413
+ var import_node_path2 = __toESM(require("node:path"));
23424
23414
  function resolveFilesystemPath(location, platform = process.platform) {
23425
- const pathApi = platform === "win32" ? import_node_path3.default.win32 : import_node_path3.default.posix;
23415
+ const pathApi = platform === "win32" ? import_node_path2.default.win32 : import_node_path2.default.posix;
23426
23416
  if (platform !== "win32") {
23427
23417
  return pathApi.resolve(location);
23428
23418
  }
@@ -23436,28 +23426,176 @@ function resolveFilesystemPath(location, platform = process.platform) {
23436
23426
  return pathApi.resolve(normalized);
23437
23427
  }
23438
23428
 
23429
+ // ../ttsc/src/internal/pathIdentity/createCaseSensitivityObservations.ts
23430
+ function createCaseSensitivityObservations(operations = {}) {
23431
+ const platform = operations.platform ?? process.platform;
23432
+ const probes = {
23433
+ lstat: operations.lstat ?? import_node_fs2.default.lstatSync,
23434
+ readdir: operations.readdir ?? import_node_fs2.default.readdirSync,
23435
+ realpath: operations.realpath ?? physicalRealpath
23436
+ };
23437
+ const answers = /* @__PURE__ */ new Map();
23438
+ return (directory) => {
23439
+ const key = resolveFilesystemPath(directory, platform);
23440
+ if (answers.has(key)) return answers.get(key);
23441
+ let answer;
23442
+ try {
23443
+ answer = filesystemDirectoryIsCaseSensitive(key, platform, probes);
23444
+ } catch {
23445
+ answer = void 0;
23446
+ }
23447
+ answers.set(key, answer);
23448
+ return answer;
23449
+ };
23450
+ }
23451
+ function physicalRealpath(location) {
23452
+ return import_node_fs2.default.realpathSync.native?.(location) ?? import_node_fs2.default.realpathSync(location);
23453
+ }
23454
+ function filesystemDirectoryIsCaseSensitive(directory, platform, operations) {
23455
+ const pathApi = platform === "win32" ? import_node_path3.default.win32 : import_node_path3.default.posix;
23456
+ let entries;
23457
+ try {
23458
+ entries = operations.readdir(directory);
23459
+ } catch {
23460
+ return void 0;
23461
+ }
23462
+ const foldedNames = /* @__PURE__ */ new Map();
23463
+ for (const name of entries) {
23464
+ const folded = foldAsciiCase(name);
23465
+ const previous = foldedNames.get(folded);
23466
+ if (previous !== void 0 && previous !== name) return true;
23467
+ foldedNames.set(folded, name);
23468
+ }
23469
+ for (const name of entries) {
23470
+ const alternate = alternateCase(name);
23471
+ if (alternate === name) continue;
23472
+ try {
23473
+ operations.lstat(pathApi.join(directory, alternate));
23474
+ } catch (error) {
23475
+ if (isMissingFilesystemEntry(error)) {
23476
+ try {
23477
+ operations.lstat(pathApi.join(directory, name));
23478
+ return true;
23479
+ } catch (originalError) {
23480
+ if (isMissingFilesystemEntry(originalError) === false)
23481
+ throw originalError;
23482
+ }
23483
+ continue;
23484
+ }
23485
+ throw error;
23486
+ }
23487
+ try {
23488
+ const actual = resolveFilesystemPath(
23489
+ operations.realpath(pathApi.join(directory, name)),
23490
+ platform
23491
+ );
23492
+ const alias = resolveFilesystemPath(
23493
+ operations.realpath(pathApi.join(directory, alternate)),
23494
+ platform
23495
+ );
23496
+ return actual !== alias;
23497
+ } catch (error) {
23498
+ if (isMissingFilesystemEntry(error) === false) throw error;
23499
+ }
23500
+ }
23501
+ if (platform === "darwin") {
23502
+ let current2 = resolveFilesystemPath(directory, platform);
23503
+ while (true) {
23504
+ const parent = pathApi.dirname(current2);
23505
+ if (parent === current2) break;
23506
+ if (operations.lstat(current2).dev !== operations.lstat(parent).dev)
23507
+ return void 0;
23508
+ const name = pathApi.basename(current2);
23509
+ const alternate = alternateCase(name);
23510
+ if (alternate !== name) {
23511
+ try {
23512
+ const actual = resolveFilesystemPath(
23513
+ operations.realpath(current2),
23514
+ platform
23515
+ );
23516
+ const alias = resolveFilesystemPath(
23517
+ operations.realpath(pathApi.join(parent, alternate)),
23518
+ platform
23519
+ );
23520
+ return actual !== alias;
23521
+ } catch (error) {
23522
+ if (isMissingFilesystemEntry(error) === false) throw error;
23523
+ }
23524
+ }
23525
+ current2 = parent;
23526
+ }
23527
+ return void 0;
23528
+ }
23529
+ if (platform !== "win32") return void 0;
23530
+ const queried = queryWindowsDirectoryCaseSensitivity(directory);
23531
+ if (queried !== void 0) return queried;
23532
+ return void 0;
23533
+ }
23534
+ function queryWindowsDirectoryCaseSensitivity(directory) {
23535
+ const result = queryWindowsDirectoryCaseSensitivityBytes(directory);
23536
+ if (result === void 0) return void 0;
23537
+ const volumeRoot = import_node_path3.default.win32.parse(directory).root;
23538
+ const direct = parseWindowsDirectoryCaseSensitivity(
23539
+ result,
23540
+ void 0,
23541
+ volumeRoot
23542
+ );
23543
+ if (direct !== void 0) return direct;
23544
+ const volume = queryWindowsDirectoryCaseSensitivityBytes(volumeRoot);
23545
+ return parseWindowsDirectoryCaseSensitivity(result, volume, volumeRoot);
23546
+ }
23547
+ function queryWindowsDirectoryCaseSensitivityBytes(directory) {
23548
+ const args = ["file", "queryCaseSensitiveInfo", directory];
23549
+ const result = E2ETrace.synchronous(
23550
+ "fsutil.exe",
23551
+ args,
23552
+ {},
23553
+ "path-case-probe",
23554
+ () => OwnedSynchronousProcess.launch("fsutil.exe", args, {
23555
+ windowsHide: true
23556
+ }) ?? import_node_child_process.default.spawnSync("fsutil.exe", args, { windowsHide: true })
23557
+ );
23558
+ return result.error === void 0 && result.status === 0 && Buffer.isBuffer(result.stdout) ? result.stdout : void 0;
23559
+ }
23560
+ function alternateCase(value) {
23561
+ return value.replace(
23562
+ /[A-Za-z]/g,
23563
+ (character) => character === character.toLowerCase() ? character.toUpperCase() : character.toLowerCase()
23564
+ );
23565
+ }
23566
+ function foldAsciiCase(value) {
23567
+ return value.replace(/[A-Z]/g, (character) => character.toLowerCase());
23568
+ }
23569
+ function isMissingFilesystemEntry(error) {
23570
+ return error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR");
23571
+ }
23572
+
23573
+ // ../ttsc/src/internal/pathIdentity/createFilesystemPathIdentityContext.ts
23574
+ var import_node_fs3 = __toESM(require("node:fs"));
23575
+ var import_node_path5 = __toESM(require("node:path"));
23576
+
23577
+ // ../ttsc/src/internal/pathIdentity/isFilesystemPathIdentityWithin.ts
23578
+ var import_node_path4 = __toESM(require("node:path"));
23579
+ function isFilesystemPathIdentityWithin(root2, candidate, platform = process.platform) {
23580
+ if (candidate === root2) return true;
23581
+ const separator = platform === "win32" ? import_node_path4.default.win32.sep : import_node_path4.default.posix.sep;
23582
+ return candidate.startsWith(
23583
+ root2.endsWith(separator) ? root2 : `${root2}${separator}`
23584
+ );
23585
+ }
23586
+
23439
23587
  // ../ttsc/src/internal/pathIdentity/createFilesystemPathIdentityContext.ts
23440
23588
  function createFilesystemPathIdentityContext(operations = {}) {
23441
23589
  const identities = /* @__PURE__ */ new Map();
23442
23590
  const realpaths = /* @__PURE__ */ new Map();
23443
23591
  const sensitivities = /* @__PURE__ */ new Map();
23444
23592
  const platform = operations.platform ?? process.platform;
23445
- const pathApi = platform === "win32" ? import_node_path4.default.win32 : import_node_path4.default.posix;
23593
+ const pathApi = platform === "win32" ? import_node_path5.default.win32 : import_node_path5.default.posix;
23446
23594
  const throwOnRealpathError = operations.throwOnRealpathError ?? true;
23447
- const realpath = operations.realpath ?? physicalRealpath;
23448
- const lstat = operations.lstat ?? import_node_fs2.default.lstatSync;
23449
- const readdir = operations.readdir ?? import_node_fs2.default.readdirSync;
23450
- const caseSensitive = operations.caseSensitive ?? ((directory) => {
23451
- try {
23452
- return filesystemDirectoryIsCaseSensitive(directory, platform, {
23453
- lstat,
23454
- readdir,
23455
- realpath
23456
- });
23457
- } catch {
23458
- return void 0;
23459
- }
23460
- });
23595
+ const realpath = operations.realpath ?? physicalRealpath2;
23596
+ const lstat = operations.lstat ?? import_node_fs3.default.lstatSync;
23597
+ const readdir = operations.readdir ?? import_node_fs3.default.readdirSync;
23598
+ const caseSensitive = operations.caseSensitive ?? createCaseSensitivityObservations({ lstat, platform, readdir, realpath });
23461
23599
  const resolve2 = (location) => {
23462
23600
  const normalized = resolveFilesystemPath(location, platform);
23463
23601
  const cached = identities.get(normalized);
@@ -23475,7 +23613,7 @@ function createFilesystemPathIdentityContext(operations = {}) {
23475
23613
  if (physical !== void 0) {
23476
23614
  missing.reverse();
23477
23615
  const sensitive = missing.length === 0 ? true : cachedCaseSensitivity(sensitivities, caseSensitive, physical);
23478
- const suffix = sensitive === false ? missing.map(foldAsciiCase) : missing;
23616
+ const suffix = sensitive === false ? missing.map(foldAsciiCase2) : missing;
23479
23617
  const canonical = pathApi.resolve(physical, ...suffix);
23480
23618
  const identity = {
23481
23619
  key: filesystemPathIdentityKey(canonical, platform),
@@ -23496,7 +23634,7 @@ function createFilesystemPathIdentityContext(operations = {}) {
23496
23634
  );
23497
23635
  const identity = {
23498
23636
  key: filesystemPathIdentityKey(
23499
- sensitive === false ? foldAsciiCase(normalized) : normalized,
23637
+ sensitive === false ? foldAsciiCase2(normalized) : normalized,
23500
23638
  platform
23501
23639
  ),
23502
23640
  path: normalized
@@ -23539,7 +23677,7 @@ function createFilesystemPathIdentityContext(operations = {}) {
23539
23677
  const actual = child.segments[index];
23540
23678
  if (expected !== actual) {
23541
23679
  if (/^[\x00-\x7f]*$/.test(expected) && /^[\x00-\x7f]*$/.test(actual)) {
23542
- if (directoryCaseSensitive(directory) === true || foldAsciiCase(expected) !== foldAsciiCase(actual))
23680
+ if (directoryCaseSensitive(directory) === true || foldAsciiCase2(expected) !== foldAsciiCase2(actual))
23543
23681
  return false;
23544
23682
  }
23545
23683
  }
@@ -23558,7 +23696,7 @@ function createFilesystemPathIdentityContext(operations = {}) {
23558
23696
  const lexical = lexicalParts(location);
23559
23697
  let parent = lexical.root;
23560
23698
  const segments = lexical.segments.map((segment) => {
23561
- const key = directoryCaseSensitive(parent) === false ? foldAsciiCase(segment) : segment;
23699
+ const key = directoryCaseSensitive(parent) === false ? foldAsciiCase2(segment) : segment;
23562
23700
  parent = pathApi.join(parent, segment);
23563
23701
  return key;
23564
23702
  });
@@ -23580,7 +23718,7 @@ function cachedRealpath(cache, realpath, location, platform, throwOnRealpathErro
23580
23718
  cache.set(location, { found: true, path: physical });
23581
23719
  return physical;
23582
23720
  } catch (error) {
23583
- if (throwOnRealpathError && isMissingFilesystemEntry(error) === false) {
23721
+ if (throwOnRealpathError && isMissingFilesystemEntry2(error) === false) {
23584
23722
  throw error;
23585
23723
  }
23586
23724
  cache.set(location, { found: false });
@@ -23593,135 +23731,23 @@ function cachedCaseSensitivity(cache, caseSensitive, directory) {
23593
23731
  cache.set(directory, sensitive);
23594
23732
  return sensitive;
23595
23733
  }
23596
- function physicalRealpath(location) {
23597
- return import_node_fs2.default.realpathSync.native?.(location) ?? import_node_fs2.default.realpathSync(location);
23598
- }
23599
- function filesystemDirectoryIsCaseSensitive(directory, platform, operations) {
23600
- const pathApi = platform === "win32" ? import_node_path4.default.win32 : import_node_path4.default.posix;
23601
- let entries;
23602
- try {
23603
- entries = operations.readdir(directory);
23604
- } catch {
23605
- return void 0;
23606
- }
23607
- const foldedNames = /* @__PURE__ */ new Map();
23608
- for (const name of entries) {
23609
- const folded = foldAsciiCase(name);
23610
- const previous = foldedNames.get(folded);
23611
- if (previous !== void 0 && previous !== name) return true;
23612
- foldedNames.set(folded, name);
23613
- }
23614
- for (const name of entries) {
23615
- const alternate = alternateCase(name);
23616
- if (alternate === name) continue;
23617
- try {
23618
- operations.lstat(pathApi.join(directory, alternate));
23619
- } catch (error) {
23620
- if (isMissingFilesystemEntry(error)) {
23621
- try {
23622
- operations.lstat(pathApi.join(directory, name));
23623
- return true;
23624
- } catch (originalError) {
23625
- if (isMissingFilesystemEntry(originalError) === false)
23626
- throw originalError;
23627
- }
23628
- continue;
23629
- }
23630
- throw error;
23631
- }
23632
- try {
23633
- const actual = resolveFilesystemPath(
23634
- operations.realpath(pathApi.join(directory, name)),
23635
- platform
23636
- );
23637
- const alias = resolveFilesystemPath(
23638
- operations.realpath(pathApi.join(directory, alternate)),
23639
- platform
23640
- );
23641
- return actual !== alias;
23642
- } catch (error) {
23643
- if (isMissingFilesystemEntry(error) === false) throw error;
23644
- }
23645
- }
23646
- if (platform === "darwin") {
23647
- let current2 = resolveFilesystemPath(directory, platform);
23648
- while (true) {
23649
- const parent = pathApi.dirname(current2);
23650
- if (parent === current2) break;
23651
- if (operations.lstat(current2).dev !== operations.lstat(parent).dev)
23652
- return void 0;
23653
- const name = pathApi.basename(current2);
23654
- const alternate = alternateCase(name);
23655
- if (alternate !== name) {
23656
- try {
23657
- const actual = resolveFilesystemPath(
23658
- operations.realpath(current2),
23659
- platform
23660
- );
23661
- const alias = resolveFilesystemPath(
23662
- operations.realpath(pathApi.join(parent, alternate)),
23663
- platform
23664
- );
23665
- return actual !== alias;
23666
- } catch (error) {
23667
- if (isMissingFilesystemEntry(error) === false) throw error;
23668
- }
23669
- }
23670
- current2 = parent;
23671
- }
23672
- return void 0;
23673
- }
23674
- if (platform !== "win32") return void 0;
23675
- const queried = queryWindowsDirectoryCaseSensitivity(directory);
23676
- if (queried !== void 0) return queried;
23677
- return void 0;
23678
- }
23679
- function queryWindowsDirectoryCaseSensitivity(directory) {
23680
- const result = queryWindowsDirectoryCaseSensitivityBytes(directory);
23681
- if (result === void 0) return void 0;
23682
- const volumeRoot = import_node_path4.default.win32.parse(directory).root;
23683
- const direct = parseWindowsDirectoryCaseSensitivity(
23684
- result,
23685
- void 0,
23686
- volumeRoot
23687
- );
23688
- if (direct !== void 0) return direct;
23689
- const volume = queryWindowsDirectoryCaseSensitivityBytes(volumeRoot);
23690
- return parseWindowsDirectoryCaseSensitivity(result, volume, volumeRoot);
23691
- }
23692
- function queryWindowsDirectoryCaseSensitivityBytes(directory) {
23693
- const args = ["file", "queryCaseSensitiveInfo", directory];
23694
- const result = E2ETrace.synchronous(
23695
- "fsutil.exe",
23696
- args,
23697
- {},
23698
- "path-case-probe",
23699
- () => OwnedSynchronousProcess.launch("fsutil.exe", args, {
23700
- windowsHide: true
23701
- }) ?? import_node_child_process.default.spawnSync("fsutil.exe", args, { windowsHide: true })
23702
- );
23703
- return result.error === void 0 && result.status === 0 && Buffer.isBuffer(result.stdout) ? result.stdout : void 0;
23734
+ function physicalRealpath2(location) {
23735
+ return import_node_fs3.default.realpathSync.native?.(location) ?? import_node_fs3.default.realpathSync(location);
23704
23736
  }
23705
23737
  function filesystemPathIdentityKey(location, platform) {
23706
23738
  if (platform !== "win32") return location;
23707
- const root2 = import_node_path4.default.win32.parse(location).root;
23739
+ const root2 = import_node_path5.default.win32.parse(location).root;
23708
23740
  return `${root2.toLowerCase()}${location.slice(root2.length)}`;
23709
23741
  }
23710
- function alternateCase(value) {
23711
- return value.replace(
23712
- /[A-Za-z]/g,
23713
- (character) => character === character.toLowerCase() ? character.toUpperCase() : character.toLowerCase()
23714
- );
23715
- }
23716
- function foldAsciiCase(value) {
23742
+ function foldAsciiCase2(value) {
23717
23743
  return value.replace(/[A-Z]/g, (character) => character.toLowerCase());
23718
23744
  }
23719
- function isMissingFilesystemEntry(error) {
23745
+ function isMissingFilesystemEntry2(error) {
23720
23746
  return error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR");
23721
23747
  }
23722
23748
 
23723
23749
  // src/clientRootPlanning.ts
23724
- var import_node_path5 = __toESM(require("node:path"));
23750
+ var import_node_path6 = __toESM(require("node:path"));
23725
23751
  function filterCandidatesByPhysicalRoots(candidates, identities, platform) {
23726
23752
  const sorted = candidates.map((candidate) => ({
23727
23753
  candidate,
@@ -23771,7 +23797,7 @@ function planRootsByPhysicalIdentity(roots, preferredRoot, identities, platform)
23771
23797
  return selected;
23772
23798
  }
23773
23799
  function pathDepth(value, platform) {
23774
- const pathApi = platform === "win32" ? import_node_path5.default.win32 : import_node_path5.default.posix;
23800
+ const pathApi = platform === "win32" ? import_node_path6.default.win32 : import_node_path6.default.posix;
23775
23801
  return pathApi.resolve(value).split(pathApi.sep).filter(Boolean).length;
23776
23802
  }
23777
23803
 
@@ -23788,21 +23814,21 @@ var WRAPPED_COMMAND_IDS = ["ttsc.lint.fixAll", "ttsc.format.document"];
23788
23814
  function resolveTtscServerLauncher(resolveFrom) {
23789
23815
  try {
23790
23816
  const requireFromBase = (0, import_node_module.createRequire)(
23791
- import_node_path6.default.join(resolveFrom, "__ttsc_vscode_resolve__.cjs")
23817
+ import_node_path7.default.join(resolveFrom, "__ttsc_vscode_resolve__.cjs")
23792
23818
  );
23793
23819
  const packageJson = requireFromBase.resolve("ttsc/package.json");
23794
- const packageRoot = import_node_path6.default.dirname(packageJson);
23795
- const manifest = JSON.parse(import_node_fs3.default.readFileSync(packageJson, "utf8"));
23796
- const bin = typeof manifest.bin?.ttscserver === "string" ? manifest.bin.ttscserver : import_node_path6.default.join("lib", "launcher", "ttscserver.js");
23797
- const launcher = import_node_path6.default.resolve(packageRoot, bin);
23798
- return import_node_fs3.default.existsSync(launcher) ? launcher : void 0;
23820
+ const packageRoot = import_node_path7.default.dirname(packageJson);
23821
+ const manifest = JSON.parse(import_node_fs4.default.readFileSync(packageJson, "utf8"));
23822
+ const bin = typeof manifest.bin?.ttscserver === "string" ? manifest.bin.ttscserver : import_node_path7.default.join("lib", "launcher", "ttscserver.js");
23823
+ const launcher = import_node_path7.default.resolve(packageRoot, bin);
23824
+ return import_node_fs4.default.existsSync(launcher) ? launcher : void 0;
23799
23825
  } catch {
23800
23826
  return void 0;
23801
23827
  }
23802
23828
  }
23803
23829
  function findProjectConfig(start, stopAt) {
23804
- let dir = import_node_path6.default.resolve(start);
23805
- const boundary = stopAt ? import_node_path6.default.resolve(stopAt) : void 0;
23830
+ let dir = import_node_path7.default.resolve(start);
23831
+ const boundary = stopAt ? import_node_path7.default.resolve(stopAt) : void 0;
23806
23832
  const identities = boundary ? createServerRootPathIdentityContext() : void 0;
23807
23833
  for (; ; ) {
23808
23834
  if (boundary && !identities.isWithin(boundary, dir)) {
@@ -23815,7 +23841,7 @@ function findProjectConfig(start, stopAt) {
23815
23841
  if (boundary && identities.resolve(dir).key === identities.resolve(boundary).key) {
23816
23842
  return void 0;
23817
23843
  }
23818
- const parent = import_node_path6.default.dirname(dir);
23844
+ const parent = import_node_path7.default.dirname(dir);
23819
23845
  if (parent === dir) {
23820
23846
  return void 0;
23821
23847
  }
@@ -23832,10 +23858,10 @@ function createResolutionCandidates(input) {
23832
23858
  candidates.push(candidate);
23833
23859
  };
23834
23860
  if (input.activeFile) {
23835
- const resolveFrom = import_node_path6.default.dirname(input.activeFile);
23861
+ const resolveFrom = import_node_path7.default.dirname(input.activeFile);
23836
23862
  const tsconfig = findProjectConfig(resolveFrom, input.activeWorkspaceRoot);
23837
23863
  push({
23838
- cwd: tsconfig ? import_node_path6.default.dirname(tsconfig) : input.activeWorkspaceRoot ?? resolveFrom,
23864
+ cwd: tsconfig ? import_node_path7.default.dirname(tsconfig) : input.activeWorkspaceRoot ?? resolveFrom,
23839
23865
  resolveFrom,
23840
23866
  tsconfig
23841
23867
  });
@@ -23843,7 +23869,7 @@ function createResolutionCandidates(input) {
23843
23869
  for (const root2 of input.workspaceRoots ?? []) {
23844
23870
  const tsconfig = findProjectConfig(root2, root2);
23845
23871
  push({
23846
- cwd: tsconfig ? import_node_path6.default.dirname(tsconfig) : root2,
23872
+ cwd: tsconfig ? import_node_path7.default.dirname(tsconfig) : root2,
23847
23873
  resolveFrom: root2,
23848
23874
  tsconfig
23849
23875
  });
@@ -23965,11 +23991,11 @@ function rootKey(root2, platform = process.platform, identities = createServerRo
23965
23991
  }
23966
23992
  function projectConfigIn(dir) {
23967
23993
  try {
23968
- const matches = import_node_fs3.default.readdirSync(dir).filter((name) => PROJECT_CONFIG_PATTERN.test(name)).sort(compareProjectConfigNames);
23994
+ const matches = import_node_fs4.default.readdirSync(dir).filter((name) => PROJECT_CONFIG_PATTERN.test(name)).sort(compareProjectConfigNames);
23969
23995
  for (const name of matches) {
23970
- const candidate = import_node_path6.default.join(dir, name);
23996
+ const candidate = import_node_path7.default.join(dir, name);
23971
23997
  try {
23972
- if (import_node_fs3.default.statSync(candidate).isFile()) {
23998
+ if (import_node_fs4.default.statSync(candidate).isFile()) {
23973
23999
  return candidate;
23974
24000
  }
23975
24001
  } catch {
@@ -23990,10 +24016,10 @@ function compareProjectConfigNames(left, right) {
23990
24016
  return priority(left) - priority(right) || left.localeCompare(right);
23991
24017
  }
23992
24018
  function isJavaScriptLauncher(launcher) {
23993
- return [".js", ".cjs", ".mjs"].includes(import_node_path6.default.extname(launcher));
24019
+ return [".js", ".cjs", ".mjs"].includes(import_node_path7.default.extname(launcher));
23994
24020
  }
23995
24021
  function isWindowsCommandLauncher(launcher) {
23996
- return [".cmd", ".bat"].includes(import_node_path6.default.extname(launcher).toLowerCase());
24022
+ return [".cmd", ".bat"].includes(import_node_path7.default.extname(launcher).toLowerCase());
23997
24023
  }
23998
24024
  function createWindowsCommandShim(args) {
23999
24025
  const prefix = "TTSC_VSCODE_COMMAND_SHIM_ARG_";
@@ -24014,23 +24040,23 @@ function quoteWindowsArg(arg) {
24014
24040
  function resolveTsgoBinary(base) {
24015
24041
  try {
24016
24042
  const requireFromBase = (0, import_node_module.createRequire)(
24017
- import_node_path6.default.join(base, "__ttsc_vscode_resolve__.cjs")
24043
+ import_node_path7.default.join(base, "__ttsc_vscode_resolve__.cjs")
24018
24044
  );
24019
24045
  const packageJson = requireFromBase.resolve("typescript/package.json");
24020
- const packageRoot = import_node_path6.default.dirname(packageJson);
24046
+ const packageRoot = import_node_path7.default.dirname(packageJson);
24021
24047
  const requireFromTsgo = (0, import_node_module.createRequire)(
24022
- import_node_path6.default.join(packageRoot, "__ttsc_vscode_resolve__.cjs")
24048
+ import_node_path7.default.join(packageRoot, "__ttsc_vscode_resolve__.cjs")
24023
24049
  );
24024
24050
  const platformPackage = `@typescript/typescript-${process.platform}-${process.arch}`;
24025
24051
  const platformPackageJson = requireFromTsgo.resolve(
24026
24052
  `${platformPackage}/package.json`
24027
24053
  );
24028
- const binary = import_node_path6.default.join(
24029
- import_node_path6.default.dirname(platformPackageJson),
24054
+ const binary = import_node_path7.default.join(
24055
+ import_node_path7.default.dirname(platformPackageJson),
24030
24056
  "lib",
24031
24057
  process.platform === "win32" ? "tsc.exe" : "tsc"
24032
24058
  );
24033
- return import_node_fs3.default.existsSync(binary) ? binary : void 0;
24059
+ return import_node_fs4.default.existsSync(binary) ? binary : void 0;
24034
24060
  } catch {
24035
24061
  return void 0;
24036
24062
  }
@@ -24100,7 +24126,7 @@ function createServerLaunchSpecs(candidates) {
24100
24126
  cwd: candidate.cwd,
24101
24127
  id: key,
24102
24128
  launcher,
24103
- name: `ttsc (${path7.basename(candidate.cwd)})`,
24129
+ name: `ttsc (${path8.basename(candidate.cwd)})`,
24104
24130
  workspaceFolder: workspaceFolderFor(candidate.cwd, specs.length)
24105
24131
  });
24106
24132
  }
@@ -24110,7 +24136,7 @@ function resolveConfiguredServerPath(configuredPath, cwd) {
24110
24136
  if (!configuredPath) {
24111
24137
  return void 0;
24112
24138
  }
24113
- if (path7.isAbsolute(configuredPath)) {
24139
+ if (path8.isAbsolute(configuredPath)) {
24114
24140
  return configuredPath;
24115
24141
  }
24116
24142
  const key = `${rootKey(cwd)}\0${configuredPath}`;
@@ -24126,7 +24152,7 @@ function resolveServerLaunchSpecForUri(uri, memo = /* @__PURE__ */ new Map()) {
24126
24152
  if (uri.scheme !== "file") return void 0;
24127
24153
  const folder = import_vscode.workspace.getWorkspaceFolder(uri);
24128
24154
  const activeWorkspaceRoot = folder?.uri.scheme === "file" ? folder.uri.fsPath : void 0;
24129
- const memoKey = `${path7.dirname(uri.fsPath)}\0${activeWorkspaceRoot ?? ""}`;
24155
+ const memoKey = `${path8.dirname(uri.fsPath)}\0${activeWorkspaceRoot ?? ""}`;
24130
24156
  return resolveWithDirectoryMemo(
24131
24157
  memoKey,
24132
24158
  memo,
@@ -24143,14 +24169,14 @@ function createServerOptions(launcher, candidate) {
24143
24169
  }
24144
24170
  function workspaceFolderFor(root2, index) {
24145
24171
  const folder = import_vscode.workspace.workspaceFolders?.find(
24146
- (candidate) => candidate.uri.scheme === "file" && path7.resolve(candidate.uri.fsPath) === path7.resolve(root2)
24172
+ (candidate) => candidate.uri.scheme === "file" && path8.resolve(candidate.uri.fsPath) === path8.resolve(root2)
24147
24173
  );
24148
24174
  if (folder) {
24149
24175
  return folder;
24150
24176
  }
24151
24177
  return {
24152
24178
  index,
24153
- name: path7.basename(root2),
24179
+ name: path8.basename(root2),
24154
24180
  uri: import_vscode.Uri.file(root2)
24155
24181
  };
24156
24182
  }
@@ -24329,7 +24355,7 @@ function resolveCommandTarget(uriArg) {
24329
24355
  return uriArg;
24330
24356
  }
24331
24357
  if (typeof uriArg === "string") {
24332
- return path7.isAbsolute(uriArg) ? import_vscode.Uri.file(uriArg) : import_vscode.Uri.parse(uriArg);
24358
+ return path8.isAbsolute(uriArg) ? import_vscode.Uri.file(uriArg) : import_vscode.Uri.parse(uriArg);
24333
24359
  }
24334
24360
  return import_vscode.window.activeTextEditor?.document.uri;
24335
24361
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ttsc/vscode",
3
3
  "displayName": "ttsc",
4
4
  "description": "TypeScript-Go and ttsc plugin diagnostics, completions, lint actions, and formatting for VS Code.",
5
- "version": "0.31.4",
5
+ "version": "0.32.0",
6
6
  "publisher": "samchon",
7
7
  "icon": "images/icon.png",
8
8
  "license": "MIT",
@@ -98,7 +98,7 @@
98
98
  }
99
99
  },
100
100
  "devDependencies": {
101
- "@wrtnlabs/evidence": "^0.3.1",
101
+ "@wrtnlabs/evidence": "^0.5.0",
102
102
  "@types/node": "^25.3.0",
103
103
  "@types/vscode": "^1.94.0",
104
104
  "@vscode/vsce": "^3.9.2",
@@ -106,7 +106,7 @@
106
106
  "rimraf": "^6.1.2",
107
107
  "typescript": "^7.0.2",
108
108
  "vscode-languageclient": "^10.1.0",
109
- "ttsc": "0.31.4"
109
+ "ttsc": "0.32.0"
110
110
  },
111
111
  "scripts": {
112
112
  "build": "tsc --noEmit && rimraf lib dist && node build/build.cjs",