@seyuna/cli 0.0.2-dev.7 → 0.0.2-dev.8
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/seyuna-linux +0 -0
- package/bin/seyuna-macos +0 -0
- package/bin/seyuna-windows.exe +0 -0
- package/deno.json +1 -1
- package/node-install.js +23 -28
- package/package.json +1 -1
package/bin/seyuna-linux
CHANGED
|
Binary file
|
package/bin/seyuna-macos
ADDED
|
Binary file
|
|
Binary file
|
package/deno.json
CHANGED
package/node-install.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdir, chmod
|
|
1
|
+
import { mkdir, chmod } from "fs/promises";
|
|
2
2
|
import { createWriteStream } from "fs";
|
|
3
3
|
import { Readable } from "stream";
|
|
4
4
|
import path from "path";
|
|
@@ -6,7 +6,7 @@ import { fileURLToPath } from "url";
|
|
|
6
6
|
import process from "process";
|
|
7
7
|
|
|
8
8
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
-
const version = "0.0.2-dev.
|
|
9
|
+
const version = "0.0.2-dev.8";
|
|
10
10
|
|
|
11
11
|
async function downloadFile(url, dest) {
|
|
12
12
|
const res = await fetch(url);
|
|
@@ -28,33 +28,28 @@ async function downloadFile(url, dest) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async function main() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (platform !== "win32") {
|
|
51
|
-
await chmod(dest, 0o755);
|
|
31
|
+
const binaries = [
|
|
32
|
+
{ name: "seyuna-linux", chmod: 0o755 },
|
|
33
|
+
{ name: "seyuna-macos", chmod: 0o755 },
|
|
34
|
+
{ name: "seyuna-windows.exe", chmod: null }
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
for (const bin of binaries) {
|
|
38
|
+
const releaseUrl = `https://github.com/seyuna-corp/seyuna-cli/releases/download/v${version}/${bin.name}`;
|
|
39
|
+
const dest = path.join(__dirname, "bin", bin.name);
|
|
40
|
+
try {
|
|
41
|
+
console.log(`Downloading ${bin.name} from ${releaseUrl}...`);
|
|
42
|
+
await downloadFile(releaseUrl, dest);
|
|
43
|
+
if (bin.chmod) {
|
|
44
|
+
await chmod(dest, bin.chmod);
|
|
45
|
+
}
|
|
46
|
+
console.log(`Downloaded and prepared ${bin.name}`);
|
|
47
|
+
} catch (err) {
|
|
48
|
+
console.error(`Failed to download ${bin.name}:`, err);
|
|
49
|
+
process.exit(1);
|
|
52
50
|
}
|
|
53
|
-
console.log(`seyuna CLI v${version} installed to ${dest}`);
|
|
54
|
-
} catch (err) {
|
|
55
|
-
console.error(err);
|
|
56
|
-
process.exit(1);
|
|
57
51
|
}
|
|
52
|
+
console.log("All binaries downloaded and ready.");
|
|
58
53
|
}
|
|
59
54
|
|
|
60
|
-
main();
|
|
55
|
+
main();
|