@degausai/wonda 0.0.1 → 0.7.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/bin/wonda +27 -0
- package/install.js +4 -4
- package/package.json +7 -7
package/bin/wonda
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// Windows compatibility shim.
|
|
5
|
+
// On Unix, the postinstall script overwrites this file with the native binary.
|
|
6
|
+
// On Windows, the native binary lives at bin/wonda.exe and npm's bin linking
|
|
7
|
+
// points here (bin/wonda), so we delegate to the .exe.
|
|
8
|
+
|
|
9
|
+
const { spawnSync } = require("child_process");
|
|
10
|
+
const { join } = require("path");
|
|
11
|
+
|
|
12
|
+
const exe = join(__dirname, "wonda.exe");
|
|
13
|
+
const result = spawnSync(exe, process.argv.slice(2), { stdio: "inherit" });
|
|
14
|
+
|
|
15
|
+
if (result.error) {
|
|
16
|
+
if (result.error.code === "ENOENT") {
|
|
17
|
+
console.error(
|
|
18
|
+
"wonda: binary not found. The postinstall script may not have run.\n" +
|
|
19
|
+
"Try reinstalling: npm install @degausai/wonda",
|
|
20
|
+
);
|
|
21
|
+
} else {
|
|
22
|
+
console.error("wonda:", result.error.message);
|
|
23
|
+
}
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
process.exit(result.status ?? 1);
|
package/install.js
CHANGED
|
@@ -16,7 +16,7 @@ const pkg = PLATFORMS[platformKey];
|
|
|
16
16
|
if (!pkg) {
|
|
17
17
|
console.error(
|
|
18
18
|
`Unsupported platform: ${process.platform}-${process.arch}. ` +
|
|
19
|
-
`Supported: ${Object.keys(PLATFORMS).join(", ")}
|
|
19
|
+
`Supported: ${Object.keys(PLATFORMS).join(", ")}`,
|
|
20
20
|
);
|
|
21
21
|
process.exit(1);
|
|
22
22
|
}
|
|
@@ -24,12 +24,12 @@ if (!pkg) {
|
|
|
24
24
|
let binPath;
|
|
25
25
|
try {
|
|
26
26
|
binPath = require.resolve(
|
|
27
|
-
`${pkg}/${process.platform === "win32" ? "wonda.exe" : "wonda"}
|
|
27
|
+
`${pkg}/${process.platform === "win32" ? "wonda.exe" : "wonda"}`,
|
|
28
28
|
);
|
|
29
29
|
} catch {
|
|
30
30
|
console.error(
|
|
31
31
|
`Could not find the binary for ${platformKey}. ` +
|
|
32
|
-
`The optional dependency ${pkg} may not have been installed
|
|
32
|
+
`The optional dependency ${pkg} may not have been installed.`,
|
|
33
33
|
);
|
|
34
34
|
process.exit(1);
|
|
35
35
|
}
|
|
@@ -37,7 +37,7 @@ try {
|
|
|
37
37
|
const destDir = join(__dirname, "bin");
|
|
38
38
|
const destPath = join(
|
|
39
39
|
destDir,
|
|
40
|
-
process.platform === "win32" ? "wonda.exe" : "wonda"
|
|
40
|
+
process.platform === "win32" ? "wonda.exe" : "wonda",
|
|
41
41
|
);
|
|
42
42
|
|
|
43
43
|
mkdirSync(destDir, { recursive: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@degausai/wonda",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "AI-powered content generation CLI",
|
|
5
5
|
"homepage": "https://wonda.sh",
|
|
6
6
|
"repository": {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"postinstall": "node install.js"
|
|
16
16
|
},
|
|
17
17
|
"optionalDependencies": {
|
|
18
|
-
"@degausai/wonda-darwin-arm64": "0.0
|
|
19
|
-
"@degausai/wonda-darwin-x64": "0.0
|
|
20
|
-
"@degausai/wonda-linux-x64": "0.0
|
|
21
|
-
"@degausai/wonda-linux-arm64": "0.0
|
|
22
|
-
"@degausai/wonda-win32-x64": "0.0
|
|
23
|
-
"@degausai/wonda-win32-arm64": "0.0
|
|
18
|
+
"@degausai/wonda-darwin-arm64": "0.7.0",
|
|
19
|
+
"@degausai/wonda-darwin-x64": "0.7.0",
|
|
20
|
+
"@degausai/wonda-linux-x64": "0.7.0",
|
|
21
|
+
"@degausai/wonda-linux-arm64": "0.7.0",
|
|
22
|
+
"@degausai/wonda-win32-x64": "0.7.0",
|
|
23
|
+
"@degausai/wonda-win32-arm64": "0.7.0"
|
|
24
24
|
}
|
|
25
25
|
}
|