@seyuna/cli 0.0.2-dev.5 → 0.0.2-dev.7

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 CHANGED
Binary file
package/bin/seyuna-linux CHANGED
Binary file
package/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seyuna/cli",
3
- "version": "0.0.2-dev.5",
3
+ "version": "0.0.2-dev.7",
4
4
  "description": "Seyuna CLI",
5
5
  "bin": {
6
6
  "seyuna": "./deno-wrapper.ts"
package/node-install.js CHANGED
@@ -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.5";
9
+ const version = "0.0.2-dev.7";
10
10
 
11
11
  async function downloadFile(url, dest) {
12
12
  const res = await fetch(url);
@@ -43,12 +43,7 @@ async function main() {
43
43
  }
44
44
 
45
45
  const releaseUrl = `https://github.com/seyuna-corp/seyuna-cli/releases/download/v${version}/${target}`;
46
- const binaryName = platform === "windows"
47
- ? "seyuna-windows.exe"
48
- : platform === "darwin"
49
- ? "seyuna-macos"
50
- : "seyuna-linux";
51
- const dest = path.join(__dirname, "bin", binaryName);
46
+ const dest = path.join(__dirname, "bin", target);
52
47
 
53
48
  try {
54
49
  await downloadFile(releaseUrl, dest);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seyuna/cli",
3
- "version": "0.0.2-dev.5",
3
+ "version": "0.0.2-dev.7",
4
4
  "bin": {
5
5
  "seyuna": "./bin/seyuna"
6
6
  },
package/deno-wrapper.ts DELETED
@@ -1,41 +0,0 @@
1
- import { join } from "https://deno.land/std/path/mod.ts";
2
-
3
- function getWritableDir(): string {
4
- return join(Deno.cwd(), ".seyuna");
5
- }
6
-
7
- const platform = Deno.build.os;
8
- const binaryName = platform === "windows"
9
- ? "seyuna-windows.exe"
10
- : platform === "darwin"
11
- ? "seyuna-macos"
12
- : "seyuna-linux";
13
-
14
- const version = "0.0.2-dev.5";
15
- const url = `https://github.com/seyuna-corp/seyuna-cli/releases/download/v${version}/${binaryName}`;
16
-
17
- const binDir = getWritableDir();
18
- await Deno.mkdir(binDir, { recursive: true });
19
- const binaryPath = join(binDir, binaryName);
20
-
21
- // Download if missing
22
- try {
23
- await Deno.stat(binaryPath);
24
- } catch {
25
- console.log(`Downloading ${binaryName} from ${url}`);
26
- const res = await fetch(url);
27
- if (!res.ok) throw new Error(`Download failed: ${res.status}`);
28
- const file = await Deno.open(binaryPath, { create: true, write: true });
29
- await res.body?.pipeTo(file.writable);
30
- await Deno.chmod(binaryPath, 0o755); // Required for UNIX
31
- }
32
-
33
- // Execute
34
- const command = new Deno.Command(binaryPath, {
35
- args: Deno.args,
36
- stdin: "inherit",
37
- stdout: "inherit",
38
- stderr: "inherit",
39
- });
40
- const { code } = await command.output();
41
- Deno.exit(code);