@let-value/translate-extract-static 1.1.1-beta.1 → 1.1.1-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scripts/postinstall.cjs +1 -2
- package/dist/scripts/postinstall.js +2 -3
- package/dist/src/index.cjs +2 -2
- package/dist/src/index.d.cts +1474 -2
- package/dist/src/index.d.ts +1474 -2
- package/dist/src/index.js +2 -2
- package/package.json +2 -2
|
@@ -7,7 +7,6 @@ node_fs = require_chunk.__toESM(node_fs);
|
|
|
7
7
|
|
|
8
8
|
//#region scripts/postinstall.ts
|
|
9
9
|
const root = (0, node_path.resolve)(__dirname, "../..");
|
|
10
|
-
const dist = (0, node_path.resolve)(root, "dist");
|
|
11
10
|
const pkg = JSON.parse((0, node_fs.readFileSync)((0, node_path.resolve)(root, "package.json"), "utf8"));
|
|
12
11
|
const repo = "https://github.com/let-value/translate";
|
|
13
12
|
const tag = `v${pkg.version}`;
|
|
@@ -20,13 +19,13 @@ async function downloadBinary() {
|
|
|
20
19
|
headers: { "user-agent": "@let-value/translate-extract-static postinstall" }
|
|
21
20
|
});
|
|
22
21
|
if (!response.ok) return false;
|
|
22
|
+
(0, node_fs.mkdirSync)((0, node_path.dirname)(require_binary.binaryPath), { recursive: true });
|
|
23
23
|
(0, node_fs.writeFileSync)(require_binary.binaryPath, Buffer.from(await response.arrayBuffer()));
|
|
24
24
|
if (require_binary.platform !== "win32") (0, node_fs.chmodSync)(require_binary.binaryPath, 493);
|
|
25
25
|
return true;
|
|
26
26
|
} catch {}
|
|
27
27
|
}
|
|
28
28
|
async function main() {
|
|
29
|
-
(0, node_fs.mkdirSync)(dist, { recursive: true });
|
|
30
29
|
if ((0, node_fs.existsSync)(require_binary.binaryPath)) return;
|
|
31
30
|
if (await downloadBinary()) {
|
|
32
31
|
console.log(`Downloaded binary: ${require_binary.binaryName}`);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { binaryName, binaryPath, platform } from "../binary-Ceo8ROxg.js";
|
|
2
|
-
import { resolve } from "node:path";
|
|
2
|
+
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
4
|
|
|
5
5
|
//#region scripts/postinstall.ts
|
|
6
6
|
const root = resolve(import.meta.dirname, "../..");
|
|
7
|
-
const dist = resolve(root, "dist");
|
|
8
7
|
const pkg = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8"));
|
|
9
8
|
const repo = "https://github.com/let-value/translate";
|
|
10
9
|
const tag = `v${pkg.version}`;
|
|
@@ -17,13 +16,13 @@ async function downloadBinary() {
|
|
|
17
16
|
headers: { "user-agent": "@let-value/translate-extract-static postinstall" }
|
|
18
17
|
});
|
|
19
18
|
if (!response.ok) return false;
|
|
19
|
+
mkdirSync(dirname(binaryPath), { recursive: true });
|
|
20
20
|
writeFileSync(binaryPath, Buffer.from(await response.arrayBuffer()));
|
|
21
21
|
if (platform !== "win32") chmodSync(binaryPath, 493);
|
|
22
22
|
return true;
|
|
23
23
|
} catch {}
|
|
24
24
|
}
|
|
25
25
|
async function main() {
|
|
26
|
-
mkdirSync(dist, { recursive: true });
|
|
27
26
|
if (existsSync(binaryPath)) return;
|
|
28
27
|
if (await downloadBinary()) {
|
|
29
28
|
console.log(`Downloaded binary: ${binaryName}`);
|
package/dist/src/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@ const require_chunk = require('../chunk-CUT6urMc.cjs');
|
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
node_path = require_chunk.__toESM(node_path);
|
|
4
4
|
|
|
5
|
-
//#region ../extract/
|
|
5
|
+
//#region ../extract/src/static.ts
|
|
6
6
|
function core(...props) {
|
|
7
7
|
return { static: {
|
|
8
8
|
name: "core",
|
|
@@ -29,7 +29,7 @@ function cleanup(...props) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
//#endregion
|
|
32
|
-
//#region ../extract/
|
|
32
|
+
//#region ../extract/src/configuration.ts
|
|
33
33
|
const defaultPlugins = {
|
|
34
34
|
core,
|
|
35
35
|
po,
|