@neuvertex/nv 0.0.0-stage → 0.3.1
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 +15 -2
- package/bin/nv.js +42 -0
- package/package.json +26 -4
package/README.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nv — the NeuVertex command line
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
```sh
|
|
4
|
+
npm i -g @neuvertex/nv
|
|
5
|
+
nv auth init # sign in in the browser; sets up your local harness and your workspace
|
|
6
|
+
nv auth status
|
|
7
|
+
nv service status # the local harness nv keeps running for you
|
|
8
|
+
nv remote status # your workspace on the platform
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
A private deployment: `nv auth init --endpoint https://<customer>.neuvertex.ai`.
|
|
12
|
+
Scripts and CI: `nv auth init --api-key-stdin < key.txt`.
|
|
13
|
+
|
|
14
|
+
Supported: macOS (Apple silicon and Intel), Linux x64 and arm64 (any
|
|
15
|
+
distribution), Windows x64. nv keeps its settings in `~/.neuvertex`
|
|
16
|
+
(`%USERPROFILE%\.neuvertex` on Windows) and tokens in the OS keychain.
|
package/bin/nv.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// nv: the NeuVertex command line.
|
|
3
|
+
//
|
|
4
|
+
// This package carries no binary. npm installs exactly one of its optional
|
|
5
|
+
// dependencies, the one whose `os` and `cpu` match this machine
|
|
6
|
+
// (@neuvertex/nv-<platform>-<arch>), and this shim runs the `nv` inside it
|
|
7
|
+
// with the same arguments, stdio and exit status.
|
|
8
|
+
//
|
|
9
|
+
// NV_BINARY names another nv to run instead (development).
|
|
10
|
+
"use strict";
|
|
11
|
+
|
|
12
|
+
const { spawnSync } = require("child_process");
|
|
13
|
+
const path = require("path");
|
|
14
|
+
|
|
15
|
+
function binary() {
|
|
16
|
+
if (process.env.NV_BINARY) return process.env.NV_BINARY;
|
|
17
|
+
const pkg = `@neuvertex/nv-${process.platform}-${process.arch}`;
|
|
18
|
+
const exe = process.platform === "win32" ? "nv.exe" : "nv";
|
|
19
|
+
try {
|
|
20
|
+
return require.resolve(`${pkg}/bin/${exe}`);
|
|
21
|
+
} catch (_) {
|
|
22
|
+
const supported = ["darwin-arm64", "darwin-x64", "linux-x64", "linux-arm64", "win32-x64"];
|
|
23
|
+
console.error(
|
|
24
|
+
`nv: there is no build for ${process.platform}-${process.arch} (supported: ${supported.join(", ")}).\n` +
|
|
25
|
+
` If this is one of those, reinstall without --no-optional / --omit=optional:\n` +
|
|
26
|
+
` npm i -g @neuvertex/nv`
|
|
27
|
+
);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const bin = binary();
|
|
33
|
+
const r = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
34
|
+
if (r.error) {
|
|
35
|
+
console.error(`nv: could not run ${path.basename(bin)}: ${r.error.message}`);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
if (r.signal) {
|
|
39
|
+
// Re-raise the child's signal so a parent shell sees the same outcome.
|
|
40
|
+
process.kill(process.pid, r.signal);
|
|
41
|
+
}
|
|
42
|
+
process.exit(r.status === null ? 1 : r.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neuvertex/nv",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"description": "nv: the NeuVertex command line. Sign in, run a local harness, install NeuApps and Edge Appliances.",
|
|
4
|
+
"version": "0.3.1",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"homepage": "https://neuvertex.ai",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://dev.azure.com/neuvertex-ai/NV-Harness"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"nv": "bin/nv.js"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"bin/nv.js",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=18"
|
|
20
|
+
},
|
|
21
|
+
"optionalDependencies": {
|
|
22
|
+
"@neuvertex/nv-darwin-arm64": "0.3.1",
|
|
23
|
+
"@neuvertex/nv-darwin-x64": "0.3.1",
|
|
24
|
+
"@neuvertex/nv-linux-arm64": "0.3.1",
|
|
25
|
+
"@neuvertex/nv-linux-x64": "0.3.1",
|
|
26
|
+
"@neuvertex/nv-win32-x64": "0.3.1"
|
|
27
|
+
}
|
|
28
|
+
}
|