@rivetkit/engine-cli 2.2.1-pr.4600.252b48e → 2.2.1-pr.4600.43afc5b

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.
Files changed (2) hide show
  1. package/index.js +6 -28
  2. package/package.json +5 -5
package/index.js CHANGED
@@ -11,41 +11,19 @@
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
  */
14
- const { existsSync, readFileSync } = require("node:fs");
14
+ const { existsSync } = require("node:fs");
15
15
  const { dirname, join } = require("node:path");
16
16
 
17
- /** Detect if we're on Linux musl or glibc. */
18
- function isMusl() {
19
- if (!process.report || typeof process.report.getReport !== "function") {
20
- try {
21
- const lddPath = require("node:child_process")
22
- .execSync("which ldd")
23
- .toString()
24
- .trim();
25
- return readFileSync(lddPath, "utf8").includes("musl");
26
- } catch {
27
- return true;
28
- }
29
- }
30
- const { glibcVersionRuntime } = process.report.getReport().header;
31
- return !glibcVersionRuntime;
32
- }
33
-
34
17
  /** Returns the name of the platform-specific npm package for the current host. */
35
18
  function getPlatformPackageName() {
36
19
  const { platform, arch } = process;
37
20
  switch (platform) {
38
21
  case "linux":
39
- if (arch === "x64") {
40
- return isMusl()
41
- ? "@rivetkit/engine-cli-linux-x64-musl"
42
- : "@rivetkit/engine-cli-linux-x64-gnu";
43
- }
44
- if (arch === "arm64") {
45
- return isMusl()
46
- ? "@rivetkit/engine-cli-linux-arm64-musl"
47
- : "@rivetkit/engine-cli-linux-arm64-gnu";
48
- }
22
+ // Engine is statically linked against musl, so the single musl
23
+ // build runs on both Alpine/musl and glibc hosts. We only publish
24
+ // the musl variant and every linux host maps to it.
25
+ if (arch === "x64") return "@rivetkit/engine-cli-linux-x64-musl";
26
+ if (arch === "arm64") return "@rivetkit/engine-cli-linux-arm64-musl";
49
27
  break;
50
28
  case "darwin":
51
29
  if (arch === "x64") return "@rivetkit/engine-cli-darwin-x64";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/engine-cli",
3
- "version": "2.2.1-pr.4600.252b48e",
3
+ "version": "2.2.1-pr.4600.43afc5b",
4
4
  "description": "Rivet Engine binary distributed as platform-specific npm packages",
5
5
  "license": "Apache-2.0",
6
6
  "main": "index.js",
@@ -15,9 +15,9 @@
15
15
  "README.md"
16
16
  ],
17
17
  "optionalDependencies": {
18
- "@rivetkit/engine-cli-darwin-arm64": "2.2.1-pr.4600.252b48e",
19
- "@rivetkit/engine-cli-darwin-x64": "2.2.1-pr.4600.252b48e",
20
- "@rivetkit/engine-cli-linux-arm64-musl": "2.2.1-pr.4600.252b48e",
21
- "@rivetkit/engine-cli-linux-x64-musl": "2.2.1-pr.4600.252b48e"
18
+ "@rivetkit/engine-cli-darwin-arm64": "2.2.1-pr.4600.43afc5b",
19
+ "@rivetkit/engine-cli-darwin-x64": "2.2.1-pr.4600.43afc5b",
20
+ "@rivetkit/engine-cli-linux-arm64-musl": "2.2.1-pr.4600.43afc5b",
21
+ "@rivetkit/engine-cli-linux-x64-musl": "2.2.1-pr.4600.43afc5b"
22
22
  }
23
23
  }