@raegent/earshot 0.4.1 → 0.4.2

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/dist/main.js CHANGED
@@ -18459,7 +18459,7 @@ class ShadowGit {
18459
18459
  }
18460
18460
 
18461
18461
  // packages/core/src/version.ts
18462
- var VERSION = "0.4.1";
18462
+ var VERSION = "0.4.2";
18463
18463
 
18464
18464
  // packages/core/src/session/repair.ts
18465
18465
  var REPAIR_TEXT = "No result was recorded for this call: earshot exited before the tool finished. " + "The call may or may not have run, so treat its effect as unknown and check " + "the current state rather than assuming either outcome.";
@@ -23405,7 +23405,6 @@ import { existsSync as existsSync2, realpathSync } from "node:fs";
23405
23405
  import { chmod, readdir as readdir8, rename as rename2, rm as rm2, writeFile as writeFile10 } from "node:fs/promises";
23406
23406
  import { basename as basename2, dirname as dirname9, join as join19 } from "node:path";
23407
23407
  import { createInterface } from "node:readline/promises";
23408
- import { fileURLToPath } from "node:url";
23409
23408
  var PACKAGE = "@raegent/earshot";
23410
23409
  var REPO = "rishabhguptajs/earshot";
23411
23410
  var REGISTRY = `https://registry.npmjs.org/${PACKAGE.replace("/", "%2f")}/latest`;
@@ -23418,9 +23417,13 @@ var ASSETS = {
23418
23417
  "linux-arm64": "earshot-linux-arm64",
23419
23418
  "win32-x64": "earshot-windows-x64.exe"
23420
23419
  };
23421
- function modulePath(moduleUrl) {
23420
+ function modulePath(moduleUrl, platform7) {
23422
23421
  try {
23423
- return fileURLToPath(moduleUrl);
23422
+ const parsed = new URL(moduleUrl);
23423
+ let path = decodeURIComponent(parsed.pathname);
23424
+ if (platform7 === "win32" && /^\/[a-z]:\//i.test(path))
23425
+ path = path.slice(1);
23426
+ return path;
23424
23427
  } catch {
23425
23428
  return moduleUrl;
23426
23429
  }
@@ -23440,7 +23443,7 @@ function managerOf(dir) {
23440
23443
  function detectInstall(options) {
23441
23444
  const { execPath, moduleUrl, bunVersion, platform: platform7, arch } = options;
23442
23445
  const realpath = options.realpath ?? ((path) => path);
23443
- const file = modulePath(moduleUrl);
23446
+ const file = modulePath(moduleUrl, platform7);
23444
23447
  const portableFile = file.replaceAll("\\", "/");
23445
23448
  if (BUNFS_MARKERS.some((marker3) => file.includes(marker3)) && bunVersion !== undefined) {
23446
23449
  const asset = ASSETS[`${platform7}-${arch}`];
@@ -23843,5 +23846,5 @@ async function main(argv = process.argv.slice(2)) {
23843
23846
  var code = await main();
23844
23847
  process.exitCode = code;
23845
23848
 
23846
- //# debugId=B770EDB836524DE564756E2164756E21
23849
+ //# debugId=E975B3DDC741EB7E64756E2164756E21
23847
23850
  //# sourceMappingURL=main.js.map