vetgo-cli 0.3.31-fork.4 → 0.3.31-fork.6

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/README.md CHANGED
@@ -8,4 +8,4 @@ berth agent install # the laptop agent, started when you log in
8
8
  berth add ssh USER@HOST # make a server a box
9
9
  ```
10
10
 
11
- This package gives the `berth` command on macOS and Linux (arm64 and x64). The desktop app for Windows is on the [releases page](https://github.com/tinhthanh/shipyard/releases).
11
+ This package gives the `berth` command on macOS, Linux and Windows (arm64 and x64). On Windows, run `berth stop` before updating it: Windows can't replace a program while the agent runs from it. The desktop app for Windows is on the [releases page](https://github.com/tinhthanh/shipyard/releases).
package/bin/berth.js CHANGED
@@ -6,13 +6,15 @@ const { spawnSync } = require("node:child_process");
6
6
  const fs = require("node:fs");
7
7
 
8
8
  const arch = { arm64: "arm64", x64: "amd64" }[process.arch];
9
- const pkg = `vetgo-cli-${process.platform}-${arch}`;
9
+ const os = process.platform === "win32" ? "windows" : process.platform;
10
+ const pkg = `vetgo-cli-${os}-${arch}`;
11
+ const exe = process.platform === "win32" ? "berth.exe" : "berth";
10
12
  let bin;
11
13
  try {
12
- bin = require.resolve(`${pkg}/bin/berth`);
14
+ bin = require.resolve(`${pkg}/bin/${exe}`);
13
15
  } catch {
14
16
  console.error(`vetgo-cli: no berth for ${process.platform}/${process.arch} (${pkg} isn't installed).`);
15
- console.error("It runs on macOS and Linux, arm64 and x64. If yours is one, reinstall without --no-optional / --omit=optional.");
17
+ console.error("It runs on macOS, Linux and Windows, arm64 and x64. If yours is one, reinstall without --no-optional / --omit=optional.");
16
18
  process.exit(1);
17
19
  }
18
20
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vetgo-cli",
3
- "version": "0.3.31-fork.4",
3
+ "version": "0.3.31-fork.6",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/tinhthanh/shipyard",
6
6
  "repository": {
@@ -29,9 +29,11 @@
29
29
  "node": ">=18"
30
30
  },
31
31
  "optionalDependencies": {
32
- "vetgo-cli-darwin-arm64": "0.3.31-fork.4",
33
- "vetgo-cli-darwin-amd64": "0.3.31-fork.4",
34
- "vetgo-cli-linux-arm64": "0.3.31-fork.4",
35
- "vetgo-cli-linux-amd64": "0.3.31-fork.4"
32
+ "vetgo-cli-darwin-arm64": "0.3.31-fork.6",
33
+ "vetgo-cli-darwin-amd64": "0.3.31-fork.6",
34
+ "vetgo-cli-linux-arm64": "0.3.31-fork.6",
35
+ "vetgo-cli-linux-amd64": "0.3.31-fork.6",
36
+ "vetgo-cli-windows-amd64": "0.3.31-fork.6",
37
+ "vetgo-cli-windows-arm64": "0.3.31-fork.6"
36
38
  }
37
39
  }