@rivetkit/engine-cli 0.0.0-sqlite-sync-3-0-0-release.14341d0 → 0.0.0-sqlite-query-metrics-v2.f5d3605
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 +4 -2
- package/index.d.ts +1 -1
- package/index.js +24 -11
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -11,9 +11,11 @@ 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
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
Preview tags do not publish the Windows platform package. On preview builds,
|
|
17
|
+
use the PowerShell installer from `https://releases.rivet.dev` or point
|
|
18
|
+
`RIVET_ENGINE_BINARY` at a local `rivet-engine.exe`.
|
|
17
19
|
|
|
18
20
|
## Usage
|
|
19
21
|
|
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`
|
|
5
|
+
* 1. `RIVET_ENGINE_BINARY` 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`
|
|
10
|
+
* 1. `RIVET_ENGINE_BINARY` env var (absolute path override for debugging)
|
|
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,6 +29,9 @@ 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;
|
|
32
35
|
}
|
|
33
36
|
return null;
|
|
34
37
|
}
|
|
@@ -42,18 +45,14 @@ const BINARY_NAME =
|
|
|
42
45
|
* @returns {string}
|
|
43
46
|
*/
|
|
44
47
|
function getEnginePath() {
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
: "RIVET_ENGINE_BINARY_PATH";
|
|
49
|
-
const overridePath = process.env[overrideName];
|
|
50
|
-
if (overridePath) {
|
|
51
|
-
if (!existsSync(overridePath)) {
|
|
48
|
+
// 1) Env var override.
|
|
49
|
+
if (process.env.RIVET_ENGINE_BINARY) {
|
|
50
|
+
if (!existsSync(process.env.RIVET_ENGINE_BINARY)) {
|
|
52
51
|
throw new Error(
|
|
53
|
-
|
|
52
|
+
`RIVET_ENGINE_BINARY is set to ${process.env.RIVET_ENGINE_BINARY} but the file does not exist`,
|
|
54
53
|
);
|
|
55
54
|
}
|
|
56
|
-
return
|
|
55
|
+
return process.env.RIVET_ENGINE_BINARY;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
// 2) Local binary next to this package (dev flow: copy from cargo target).
|
|
@@ -68,7 +67,8 @@ function getEnginePath() {
|
|
|
68
67
|
if (process.platform === "win32" && process.arch === "x64") {
|
|
69
68
|
throw new Error(
|
|
70
69
|
"@rivetkit/engine-cli: Windows x64 is not yet supported via npm platform packages.\n" +
|
|
71
|
-
"
|
|
70
|
+
"Use the PowerShell installer from releases.rivet.dev or set RIVET_ENGINE_BINARY\n" +
|
|
71
|
+
"to a local rivet-engine.exe binary.",
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
throw new Error(
|
|
@@ -79,6 +79,19 @@ 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
|
+
}
|
|
82
95
|
throw new Error(
|
|
83
96
|
`@rivetkit/engine-cli: platform package ${platformPkg} is not installed.\n` +
|
|
84
97
|
`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": "0.0.0-sqlite-
|
|
3
|
+
"version": "0.0.0-sqlite-query-metrics-v2.f5d3605",
|
|
4
4
|
"description": "Rivet Engine binary distributed as platform-specific npm packages",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "index.js",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"directory": "rivetkit-typescript/packages/engine-cli"
|
|
21
21
|
},
|
|
22
22
|
"optionalDependencies": {
|
|
23
|
-
"@rivetkit/engine-cli-darwin-arm64": "0.0.0-sqlite-
|
|
24
|
-
"@rivetkit/engine-cli-darwin-x64": "0.0.0-sqlite-
|
|
25
|
-
"@rivetkit/engine-cli-linux-arm64-musl": "0.0.0-sqlite-
|
|
26
|
-
"@rivetkit/engine-cli-linux-x64-musl": "0.0.0-sqlite-
|
|
23
|
+
"@rivetkit/engine-cli-darwin-arm64": "0.0.0-sqlite-query-metrics-v2.f5d3605",
|
|
24
|
+
"@rivetkit/engine-cli-darwin-x64": "0.0.0-sqlite-query-metrics-v2.f5d3605",
|
|
25
|
+
"@rivetkit/engine-cli-linux-arm64-musl": "0.0.0-sqlite-query-metrics-v2.f5d3605",
|
|
26
|
+
"@rivetkit/engine-cli-linux-x64-musl": "0.0.0-sqlite-query-metrics-v2.f5d3605"
|
|
27
27
|
}
|
|
28
28
|
}
|