@let-value/translate-extract-static 1.0.31 → 1.1.1-beta.1

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/bin/cli.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  const require_chunk = require('../chunk-CUT6urMc.cjs');
3
- const require_binary = require('../binary-Do1nEoy8.cjs');
3
+ const require_binary = require('../binary-B-BK0iD4.cjs');
4
4
  let node_child_process = require("node:child_process");
5
5
  node_child_process = require_chunk.__toESM(node_child_process);
6
6
 
package/dist/bin/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { binaryPath } from "../binary-DLbeeLiM.js";
2
+ import { binaryPath } from "../binary-Ceo8ROxg.js";
3
3
  import { spawn } from "node:child_process";
4
4
 
5
5
  //#region bin/cli.ts
@@ -14,7 +14,7 @@ function getBinaryName(platform$1, arch$1, libc$1) {
14
14
  return `extract-${platform$1}-${arch$1}${libc$1 ? `-${libc$1}` : ""}${extension}`;
15
15
  }
16
16
  const binaryName = getBinaryName(platform, arch, libc);
17
- const binaryPath = (0, node_path.resolve)(root, "dist", binaryName);
17
+ const binaryPath = (0, node_path.resolve)(root, "prebuilts", binaryName);
18
18
 
19
19
  //#endregion
20
20
  Object.defineProperty(exports, 'binaryName', {
@@ -11,7 +11,7 @@ function getBinaryName(platform$1, arch$1, libc$1) {
11
11
  return `extract-${platform$1}-${arch$1}${libc$1 ? `-${libc$1}` : ""}${extension}`;
12
12
  }
13
13
  const binaryName = getBinaryName(platform, arch, libc);
14
- const binaryPath = resolve(root, "dist", binaryName);
14
+ const binaryPath = resolve(root, "prebuilts", binaryName);
15
15
 
16
16
  //#endregion
17
17
  export { binaryName, binaryPath, platform };
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('../chunk-CUT6urMc.cjs');
2
- const require_binary = require('../binary-Do1nEoy8.cjs');
2
+ const require_binary = require('../binary-B-BK0iD4.cjs');
3
3
  let node_path = require("node:path");
4
4
  node_path = require_chunk.__toESM(node_path);
5
5
  let node_fs = require("node:fs");
@@ -19,6 +19,7 @@ async function downloadBinary() {
19
19
  signal: AbortSignal.timeout(3e4),
20
20
  headers: { "user-agent": "@let-value/translate-extract-static postinstall" }
21
21
  });
22
+ if (!response.ok) return false;
22
23
  (0, node_fs.writeFileSync)(require_binary.binaryPath, Buffer.from(await response.arrayBuffer()));
23
24
  if (require_binary.platform !== "win32") (0, node_fs.chmodSync)(require_binary.binaryPath, 493);
24
25
  return true;
@@ -1,4 +1,4 @@
1
- import { binaryName, binaryPath, platform } from "../binary-DLbeeLiM.js";
1
+ import { binaryName, binaryPath, platform } from "../binary-Ceo8ROxg.js";
2
2
  import { resolve } from "node:path";
3
3
  import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
4
 
@@ -16,6 +16,7 @@ async function downloadBinary() {
16
16
  signal: AbortSignal.timeout(3e4),
17
17
  headers: { "user-agent": "@let-value/translate-extract-static postinstall" }
18
18
  });
19
+ if (!response.ok) return false;
19
20
  writeFileSync(binaryPath, Buffer.from(await response.arrayBuffer()));
20
21
  if (platform !== "win32") chmodSync(binaryPath, 493);
21
22
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@let-value/translate-extract-static",
3
- "version": "1.0.31",
3
+ "version": "1.1.1-beta.1",
4
4
  "type": "module",
5
5
  "main": "./dist/src/index.cjs",
6
6
  "module": "./dist/src/index.js",
@@ -29,7 +29,7 @@
29
29
  "test": "node --test"
30
30
  },
31
31
  "devDependencies": {
32
- "@let-value/translate-extract": "1.0.31",
32
+ "@let-value/translate-extract": "1.1.1-beta.1",
33
33
  "@types/bun": "1.3.8",
34
34
  "@types/node": "22.10.2",
35
35
  "tsdown": "0.15.2",