@rivetkit/engine-cli 2.3.30 → 3.0.0-preview.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 +2 -4
- package/index.d.ts +1 -1
- package/index.js +11 -24
- package/package.json +5 -6
package/README.md
CHANGED
|
@@ -11,11 +11,9 @@ path to the binary for the current host.
|
|
|
11
11
|
- `linux-arm64-musl` — Linux aarch64 (static)
|
|
12
12
|
- `darwin-x64` — macOS Intel
|
|
13
13
|
- `darwin-arm64` — macOS Apple Silicon
|
|
14
|
-
- `win32-x64` — Windows x64 on release versions only
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
`RIVET_ENGINE_BINARY` at a local `rivet-engine.exe`.
|
|
15
|
+
Windows binaries are not published. To use a local Windows build, point
|
|
16
|
+
`RIVET_ENGINE_BINARY` at its `rivet-engine.exe`.
|
|
19
17
|
|
|
20
18
|
## Usage
|
|
21
19
|
|
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Returns the absolute path to the rivet-engine binary for the current host.
|
|
3
3
|
*
|
|
4
4
|
* Resolution order:
|
|
5
|
-
* 1. `RIVET_ENGINE_BINARY` env var (absolute path override)
|
|
5
|
+
* 1. `RIVET_ENGINE_BINARY` or `RIVET_ENGINE_BINARY_PATH` env var (absolute path override)
|
|
6
6
|
* 2. Local `rivet-engine` binary next to this package (dev builds)
|
|
7
7
|
* 3. The platform-specific `@rivetkit/engine-cli-<platform>` npm package
|
|
8
8
|
*
|
package/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `os`/`cpu`/`libc` at install time.
|
|
8
8
|
*
|
|
9
9
|
* Priority at resolve time:
|
|
10
|
-
* 1. `RIVET_ENGINE_BINARY` env var (absolute path override
|
|
10
|
+
* 1. `RIVET_ENGINE_BINARY` or `RIVET_ENGINE_BINARY_PATH` env var (absolute path override)
|
|
11
11
|
* 2. Local `rivet-engine` binary next to this package (dev builds)
|
|
12
12
|
* 3. The platform-specific `@rivetkit/engine-cli-<platform>` npm package
|
|
13
13
|
*/
|
|
@@ -29,9 +29,6 @@ function getPlatformPackageName() {
|
|
|
29
29
|
if (arch === "x64") return "@rivetkit/engine-cli-darwin-x64";
|
|
30
30
|
if (arch === "arm64") return "@rivetkit/engine-cli-darwin-arm64";
|
|
31
31
|
break;
|
|
32
|
-
case "win32":
|
|
33
|
-
if (arch === "x64") return "@rivetkit/engine-cli-win32-x64";
|
|
34
|
-
break;
|
|
35
32
|
}
|
|
36
33
|
return null;
|
|
37
34
|
}
|
|
@@ -45,14 +42,18 @@ const BINARY_NAME =
|
|
|
45
42
|
* @returns {string}
|
|
46
43
|
*/
|
|
47
44
|
function getEnginePath() {
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
// Preserve the JavaScript override while accepting the shared Rust override.
|
|
46
|
+
const overrideName = process.env.RIVET_ENGINE_BINARY
|
|
47
|
+
? "RIVET_ENGINE_BINARY"
|
|
48
|
+
: "RIVET_ENGINE_BINARY_PATH";
|
|
49
|
+
const overridePath = process.env[overrideName];
|
|
50
|
+
if (overridePath) {
|
|
51
|
+
if (!existsSync(overridePath)) {
|
|
51
52
|
throw new Error(
|
|
52
|
-
|
|
53
|
+
`${overrideName} is set to ${overridePath} but the file does not exist`,
|
|
53
54
|
);
|
|
54
55
|
}
|
|
55
|
-
return
|
|
56
|
+
return overridePath;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
// 2) Local binary next to this package (dev flow: copy from cargo target).
|
|
@@ -67,8 +68,7 @@ function getEnginePath() {
|
|
|
67
68
|
if (process.platform === "win32" && process.arch === "x64") {
|
|
68
69
|
throw new Error(
|
|
69
70
|
"@rivetkit/engine-cli: Windows x64 is not yet supported via npm platform packages.\n" +
|
|
70
|
-
"
|
|
71
|
-
"to a local rivet-engine.exe binary.",
|
|
71
|
+
"Set RIVET_ENGINE_BINARY to a local rivet-engine.exe binary.",
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
throw new Error(
|
|
@@ -79,19 +79,6 @@ function getEnginePath() {
|
|
|
79
79
|
try {
|
|
80
80
|
pkgJsonPath = require.resolve(`${platformPkg}/package.json`);
|
|
81
81
|
} catch {
|
|
82
|
-
if (process.platform === "win32" && process.arch === "x64") {
|
|
83
|
-
const version = require("./package.json").version;
|
|
84
|
-
if (
|
|
85
|
-
typeof version === "string" &&
|
|
86
|
-
version.startsWith("0.0.0-")
|
|
87
|
-
) {
|
|
88
|
-
throw new Error(
|
|
89
|
-
"@rivetkit/engine-cli: Windows x64 binaries are only published for release versions.\n" +
|
|
90
|
-
`The current package version (${version}) is a preview build, so @rivetkit/engine-cli-win32-x64 was intentionally not published.\n` +
|
|
91
|
-
"Use a proper release, the PowerShell installer from releases.rivet.dev, or set RIVET_ENGINE_BINARY to a local rivet-engine.exe binary.",
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
82
|
throw new Error(
|
|
96
83
|
`@rivetkit/engine-cli: platform package ${platformPkg} is not installed.\n` +
|
|
97
84
|
`This usually means the platform is not supported or optionalDependencies\n` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/engine-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-preview.1",
|
|
4
4
|
"description": "Rivet Engine binary distributed as platform-specific npm packages",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "index.js",
|
|
@@ -20,10 +20,9 @@
|
|
|
20
20
|
"directory": "rivetkit-typescript/packages/engine-cli"
|
|
21
21
|
},
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@rivetkit/engine-cli-darwin-arm64": "
|
|
24
|
-
"@rivetkit/engine-cli-darwin-x64": "
|
|
25
|
-
"@rivetkit/engine-cli-linux-arm64-musl": "
|
|
26
|
-
"@rivetkit/engine-cli-linux-x64-musl": "
|
|
27
|
-
"@rivetkit/engine-cli-win32-x64": "2.3.30"
|
|
23
|
+
"@rivetkit/engine-cli-darwin-arm64": "3.0.0-preview.1",
|
|
24
|
+
"@rivetkit/engine-cli-darwin-x64": "3.0.0-preview.1",
|
|
25
|
+
"@rivetkit/engine-cli-linux-arm64-musl": "3.0.0-preview.1",
|
|
26
|
+
"@rivetkit/engine-cli-linux-x64-musl": "3.0.0-preview.1"
|
|
28
27
|
}
|
|
29
28
|
}
|