luwu-cli 0.2.17 → 0.2.18

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.
Files changed (2) hide show
  1. package/bin/luwu.js +6 -7
  2. package/package.json +7 -5
package/bin/luwu.js CHANGED
@@ -9,14 +9,12 @@ const platforms = {
9
9
  "darwin-x64": "luwu-darwin-x64",
10
10
  "linux-x64": "luwu-linux-x64",
11
11
  "linux-arm64": "luwu-linux-arm64",
12
+ "win32-x64": "luwu-win32-x64",
13
+ "win32-arm64": "luwu-win32-arm64",
12
14
  };
13
15
  const key = `${process.platform}-${process.arch}`;
14
16
  const pkg = platforms[key];
15
17
 
16
- if (process.platform === "win32") {
17
- console.error("Luwu runs inside WSL on Windows. Open your WSL (Ubuntu) terminal and run: npx luwu-cli");
18
- process.exit(1);
19
- }
20
18
  if (!pkg) {
21
19
  console.error(`Luwu has no build for ${key} yet. Supported: ${Object.keys(platforms).join(", ")}.`);
22
20
  process.exit(1);
@@ -24,11 +22,12 @@ if (!pkg) {
24
22
 
25
23
  let bin;
26
24
  try {
27
- bin = require.resolve(`${pkg}/bin/luwu`);
25
+ bin = require.resolve(`${pkg}/bin/luwu${process.platform === "win32" ? ".exe" : ""}`);
28
26
  } catch {
29
27
  console.error(
30
28
  `The Luwu binary for ${key} (${pkg}) is missing. It is installed as an optional dependency;\n` +
31
- "reinstall without --no-optional / --omit=optional, or use: curl -fsSL https://get.luwu.dev/install.sh | sh",
29
+ "reinstall without --no-optional / --omit=optional, or use the installer: curl -fsSL https://luwu.dev/install.sh | sh" +
30
+ (process.platform === "win32" ? " (Windows: irm https://luwu.dev/install.ps1 | iex)" : ""),
32
31
  );
33
32
  process.exit(1);
34
33
  }
@@ -38,5 +37,5 @@ if (r.error) {
38
37
  console.error(r.error.message);
39
38
  process.exit(1);
40
39
  }
41
- if (r.signal) process.kill(process.pid, r.signal);
40
+ if (r.signal && process.platform !== "win32") process.kill(process.pid, r.signal);
42
41
  process.exit(r.status ?? 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "luwu-cli",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "Luwu (陆吾): reach the terminals and coding agents on all your computers from your phone, tablet or another computer. Secure P2P. The command is `luwu`.",
5
5
  "homepage": "https://luwu.dev",
6
6
  "repository": {
@@ -30,9 +30,11 @@
30
30
  "node": ">=18"
31
31
  },
32
32
  "optionalDependencies": {
33
- "luwu-darwin-arm64": "0.2.17",
34
- "luwu-darwin-x64": "0.2.17",
35
- "luwu-linux-x64": "0.2.17",
36
- "luwu-linux-arm64": "0.2.17"
33
+ "luwu-darwin-arm64": "0.2.18",
34
+ "luwu-darwin-x64": "0.2.18",
35
+ "luwu-linux-x64": "0.2.18",
36
+ "luwu-linux-arm64": "0.2.18",
37
+ "luwu-win32-x64": "0.2.18",
38
+ "luwu-win32-arm64": "0.2.18"
37
39
  }
38
40
  }