@fungi.computer/spore 0.24.2 → 0.25.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 +6 -4
- package/THIRD_PARTY_NOTICES +1 -1
- package/dist/cli.js +718 -718
- package/dist/fungi.cjs +12 -3
- package/dist/private-local-service-worker.mjs +449 -449
- package/dist/whats-new.json +1 -1
- package/package.json +5 -5
package/dist/fungi.cjs
CHANGED
|
@@ -35,13 +35,20 @@ const translated =
|
|
|
35
35
|
process.platform === "darwin" &&
|
|
36
36
|
process.arch === "x64" &&
|
|
37
37
|
(hostCpus.length === 0 || hostCpus.some(({ model }) => /Apple/.test(model)));
|
|
38
|
+
// The bundled Bun runtime needs glibc 2.17; the OS sandbox's native package
|
|
39
|
+
// needs 2.35. Between them the CLI runs, in Full access only: the Local service
|
|
40
|
+
// (runtimes/local private-local-host-support.ts) applies the same 2.35 line and
|
|
41
|
+
// never uses the native package there.
|
|
42
|
+
const glibcAtLeast = (wantedMajor, wantedMinor) =>
|
|
43
|
+
major > wantedMajor || (major === wantedMajor && minor >= wantedMinor);
|
|
38
44
|
const supported =
|
|
39
45
|
runtimes[platform] !== undefined &&
|
|
40
46
|
!translated &&
|
|
41
|
-
(process.platform !== "linux" ||
|
|
47
|
+
(process.platform !== "linux" || glibcAtLeast(2, 17)) &&
|
|
42
48
|
(process.platform !== "darwin" ||
|
|
43
49
|
darwinMajor > 22 ||
|
|
44
50
|
(darwinMajor === 22 && darwinMinor >= 6));
|
|
51
|
+
const sandboxHost = process.platform !== "linux" || glibcAtLeast(2, 35);
|
|
45
52
|
if (!supported) {
|
|
46
53
|
if (process.argv[2] === "doctor") {
|
|
47
54
|
console.log(`Platform: ${process.platform} ${process.arch}`);
|
|
@@ -53,7 +60,7 @@ if (!supported) {
|
|
|
53
60
|
console.error(
|
|
54
61
|
translated
|
|
55
62
|
? "Use arm64 Node on Apple Silicon and reinstall the CLI with npm install -g @fungi.computer/spore --include=optional. The Intel Bun runtime is not supported under Rosetta."
|
|
56
|
-
: "Fungi CLI needs Linux x64/arm64 with glibc 2.35
|
|
63
|
+
: "Fungi CLI needs Linux x64/arm64 with glibc 2.17+ (2.35+ for the OS sandbox), or macOS 13.5+ on Apple Silicon or Intel.",
|
|
57
64
|
);
|
|
58
65
|
process.exit(1);
|
|
59
66
|
}
|
|
@@ -67,7 +74,9 @@ function nativeResolution() {
|
|
|
67
74
|
return { kind: "missing" };
|
|
68
75
|
}
|
|
69
76
|
}
|
|
70
|
-
|
|
77
|
+
// A host that cannot run the sandbox does not use the native package: whether
|
|
78
|
+
// or not npm installed it, Full access runs and the sandboxed modes are refused.
|
|
79
|
+
if (sandboxHost && nativeResolution().kind === "missing") {
|
|
71
80
|
console.error(
|
|
72
81
|
`Fungi's native package for ${platform} is missing or doesn't match this version. Reinstall: npm i -g @fungi.computer/spore@${sporeVersion} --include=optional`,
|
|
73
82
|
);
|