ruimte 0.11.1 → 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 -0
- package/bin/ruimte.js +17 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -6,6 +6,7 @@ Ruimte for a machine without the app. It runs the machine that terminals, agents
|
|
|
6
6
|
npx ruimte # start the machine on 127.0.0.1:4210
|
|
7
7
|
npx ruimte pair # print a pairing link for the app on another computer
|
|
8
8
|
npx ruimte login # add this machine to your Ruimte account with a code
|
|
9
|
+
npx ruimte logout # take this machine off its account
|
|
9
10
|
npx ruimte service install # keep it running in the background for this user
|
|
10
11
|
npx ruimte service status
|
|
11
12
|
npx ruimte service uninstall
|
package/bin/ruimte.js
CHANGED
|
@@ -22,22 +22,30 @@ var packageNameOf = (target) => `@ruimte/${targetId(target)}`;
|
|
|
22
22
|
class LauncherError extends Error {
|
|
23
23
|
}
|
|
24
24
|
var WINDOWS_REFUSAL = "Ruimte does not run on Windows yet. It runs on Macs with Apple silicon and on Linux, on arm64 and x64.";
|
|
25
|
+
var INTEL_NODE_REFUSAL = "This Node is built for Intel Macs, and Ruimte runs on Macs with Apple silicon only. On a Mac with Apple silicon this Node runs under Rosetta: install the arm64 build of Node and run Ruimte with that.";
|
|
26
|
+
var MUSL_REFUSAL = "Ruimte runs on Linux with glibc, and this system uses musl (as Alpine does), so npm left its binary out. Run it on a distribution with glibc, such as Debian or Ubuntu, or in a container of one.";
|
|
25
27
|
var platformPackageOf = (host) => {
|
|
26
28
|
if (host.platform === "win32") {
|
|
27
29
|
throw new LauncherError(WINDOWS_REFUSAL);
|
|
28
30
|
}
|
|
31
|
+
if (host.platform === "darwin" && host.arch === "x64") {
|
|
32
|
+
throw new LauncherError(INTEL_NODE_REFUSAL);
|
|
33
|
+
}
|
|
29
34
|
const target = TARGETS.find((candidate) => candidate.os === host.platform && candidate.cpu === host.arch);
|
|
30
35
|
if (!target) {
|
|
31
36
|
throw new LauncherError(`Ruimte has no build for ${host.platform} on ${host.arch}. It runs on Macs with Apple silicon and on Linux, on arm64 and x64.`);
|
|
32
37
|
}
|
|
33
38
|
return packageNameOf(target);
|
|
34
39
|
};
|
|
35
|
-
var binaryPathOf = (host, resolve) => {
|
|
40
|
+
var binaryPathOf = (host, resolve, libc = () => null) => {
|
|
36
41
|
const name = platformPackageOf(host);
|
|
37
42
|
let manifest;
|
|
38
43
|
try {
|
|
39
44
|
manifest = resolve(`${name}/package.json`);
|
|
40
45
|
} catch {
|
|
46
|
+
if (host.platform === "linux" && libc() === "musl") {
|
|
47
|
+
throw new LauncherError(MUSL_REFUSAL);
|
|
48
|
+
}
|
|
41
49
|
throw new LauncherError(`The package ${name} is missing. It holds the Ruimte binary for this machine and npm installs it as an optional dependency, ` + "so an install with --omit=optional or --no-optional leaves it out. Install ruimte again without that flag.");
|
|
42
50
|
}
|
|
43
51
|
return join(dirname(manifest), "bin", "ruimte");
|
|
@@ -51,9 +59,16 @@ var exitCodeOf = (code, signalNumber) => {
|
|
|
51
59
|
|
|
52
60
|
// packages/npm/src/bin.ts
|
|
53
61
|
var require2 = createRequire(import.meta.url);
|
|
62
|
+
var libc = () => {
|
|
63
|
+
if (process.platform !== "linux") {
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
const report = process.report?.getReport();
|
|
67
|
+
return report?.header?.glibcVersionRuntime ? "glibc" : "musl";
|
|
68
|
+
};
|
|
54
69
|
var binary;
|
|
55
70
|
try {
|
|
56
|
-
binary = binaryPathOf({ platform: process.platform, arch: process.arch }, (request) => require2.resolve(request));
|
|
71
|
+
binary = binaryPathOf({ platform: process.platform, arch: process.arch }, (request) => require2.resolve(request), libc);
|
|
57
72
|
} catch (e) {
|
|
58
73
|
console.error(e instanceof LauncherError ? e.message : String(e));
|
|
59
74
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ruimte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Ruimte for a machine without the app: the machine that terminals, agents and browsers run on, reachable from the Ruimte app and station.ruimte.app.",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"author": "Bas Milius",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@ruimte/darwin-arm64": "0.
|
|
25
|
-
"@ruimte/linux-x64": "0.
|
|
26
|
-
"@ruimte/linux-arm64": "0.
|
|
24
|
+
"@ruimte/darwin-arm64": "0.12.0",
|
|
25
|
+
"@ruimte/linux-x64": "0.12.0",
|
|
26
|
+
"@ruimte/linux-arm64": "0.12.0"
|
|
27
27
|
}
|
|
28
28
|
}
|