@nearhost/cli 0.10.0 → 0.12.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/README.md +1 -1
- package/bin/nearhost.js +16 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ Coding agents can add the project they work in, on this machine or on a server N
|
|
|
67
67
|
npx skills add nearhost/nearhost -g
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Then ask the agent to add the project, with `/nearhost add` in Claude Code. Nearhost opens the add form already filled in, and nothing changes until you save it. [Read more](https://nearhost.dev/docs/
|
|
70
|
+
Then ask the agent to add the project, with `/nearhost add` in Claude Code. Nearhost opens the add form already filled in, and nothing changes until you save it. [Read more](https://nearhost.dev/docs/coding-agents/).
|
|
71
71
|
|
|
72
72
|
## Commands
|
|
73
73
|
|
package/bin/nearhost.js
CHANGED
|
@@ -7,16 +7,27 @@
|
|
|
7
7
|
const { spawn } = require('node:child_process');
|
|
8
8
|
|
|
9
9
|
const pkg = `@nearhost/cli-${process.platform}-${process.arch}`;
|
|
10
|
+
const exe = process.platform === 'win32' ? 'nearhost.exe' : 'nearhost';
|
|
11
|
+
|
|
12
|
+
// The builds this release has are the platform packages npm/build.mjs put in
|
|
13
|
+
// our own optionalDependencies, so a release without a Windows build says so.
|
|
14
|
+
const builds = Object.keys(require('../package.json').optionalDependencies ?? {}).map((n) =>
|
|
15
|
+
n.replace('@nearhost/cli-', '').replace('-', ' on '),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const supported = builds.includes(`${process.platform} on ${process.arch}`);
|
|
10
19
|
|
|
11
20
|
let bin;
|
|
12
21
|
try {
|
|
13
|
-
bin = require.resolve(`${pkg}/bin
|
|
22
|
+
if (supported) bin = require.resolve(`${pkg}/bin/${exe}`);
|
|
14
23
|
} catch {
|
|
15
|
-
|
|
24
|
+
// Reported below.
|
|
25
|
+
}
|
|
26
|
+
if (!bin) {
|
|
16
27
|
console.error(
|
|
17
28
|
supported
|
|
18
29
|
? `nearhost: ${pkg} is not installed. It is an optional dependency of @nearhost/cli; reinstall without --no-optional or --omit=optional.`
|
|
19
|
-
: `nearhost:
|
|
30
|
+
: `nearhost: this release has no build for ${process.platform} on ${process.arch}. It has builds for ${builds.join(', ')}.`,
|
|
20
31
|
);
|
|
21
32
|
process.exit(1);
|
|
22
33
|
}
|
|
@@ -30,6 +41,8 @@ const child = spawn(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
|
30
41
|
process.on('SIGINT', () => {});
|
|
31
42
|
process.on('SIGHUP', () => {});
|
|
32
43
|
process.on('SIGTERM', () => child.kill('SIGTERM'));
|
|
44
|
+
// On Windows, Ctrl-Break reaches nearhost.exe directly, as Ctrl-C does.
|
|
45
|
+
if (process.platform === 'win32') process.on('SIGBREAK', () => {});
|
|
33
46
|
|
|
34
47
|
child.on('error', (err) => {
|
|
35
48
|
console.error(`nearhost: could not run ${bin}: ${err.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nearhost/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Open dev servers on your other machines at trusted HTTPS addresses of their own (https://<name>.test by default) over your own SSH. A terminal app for macOS and Linux.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dev server",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"node": ">=18"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"@nearhost/cli-darwin-x64": "0.
|
|
48
|
-
"@nearhost/cli-darwin-arm64": "0.
|
|
49
|
-
"@nearhost/cli-linux-x64": "0.
|
|
50
|
-
"@nearhost/cli-linux-arm64": "0.
|
|
47
|
+
"@nearhost/cli-darwin-x64": "0.12.0",
|
|
48
|
+
"@nearhost/cli-darwin-arm64": "0.12.0",
|
|
49
|
+
"@nearhost/cli-linux-x64": "0.12.0",
|
|
50
|
+
"@nearhost/cli-linux-arm64": "0.12.0"
|
|
51
51
|
}
|
|
52
52
|
}
|