@nomad-e/bluma-cli 2026.27.2-linux-arm64 → 2026.27.2
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 +16 -2
- package/THIRD-PARTY-NOTICES.txt +640 -59817
- package/bin/bluma.js +48 -0
- package/dist/bluma.js +20649 -0
- package/package.json +27 -8
- package/platforms.mjs +20 -0
- package/bin/bluma-core +0 -0
- package/third-party/option-ext/.cargo_vcs_info.json +0 -6
- package/third-party/option-ext/Cargo.toml +0 -22
- package/third-party/option-ext/LICENSE.txt +0 -373
- package/third-party/option-ext/README.md +0 -67
- package/third-party/option-ext/src/impl.rs +0 -20
- package/third-party/option-ext/src/lib.rs +0 -71
package/bin/bluma.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// The `bluma` command as installed from npm: finds the native engine of this machine
|
|
3
|
+
// (installed as an optional dependency, one per platform, like @openai/codex) and
|
|
4
|
+
// starts the interface over it.
|
|
5
|
+
|
|
6
|
+
import { existsSync } from "node:fs";
|
|
7
|
+
import { createRequire } from "node:module";
|
|
8
|
+
import { dirname, join } from "node:path";
|
|
9
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
10
|
+
|
|
11
|
+
import { PLATFORMS, aliasOf, coreFile } from "../platforms.mjs";
|
|
12
|
+
|
|
13
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
14
|
+
const require = createRequire(import.meta.url);
|
|
15
|
+
|
|
16
|
+
function findEngine() {
|
|
17
|
+
if (process.env.BLUMA_CORE_BIN) return process.env.BLUMA_CORE_BIN;
|
|
18
|
+
const key = `${process.platform}-${process.arch}`;
|
|
19
|
+
if (!PLATFORMS[key]) {
|
|
20
|
+
fail(
|
|
21
|
+
`BluMa has no native engine for ${key} yet.\n` +
|
|
22
|
+
`Supported: ${Object.keys(PLATFORMS).join(", ")}.`,
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
const candidates = [];
|
|
26
|
+
try {
|
|
27
|
+
candidates.push(join(dirname(require.resolve(`${aliasOf(key)}/package.json`)), "bin", coreFile(key)));
|
|
28
|
+
} catch {
|
|
29
|
+
// not installed: reported below
|
|
30
|
+
}
|
|
31
|
+
// A package staged by hand (scripts/npm/stage.mjs) keeps the engine next to it.
|
|
32
|
+
candidates.push(join(here, "..", "..", `bluma-cli-${key}`, "bin", coreFile(key)));
|
|
33
|
+
const found = candidates.find((p) => existsSync(p));
|
|
34
|
+
if (found) return found;
|
|
35
|
+
fail(
|
|
36
|
+
`The BluMa engine for ${key} is missing (${aliasOf(key)}).\n` +
|
|
37
|
+
`It is an optional dependency: reinstall without --omit=optional / --no-optional:\n` +
|
|
38
|
+
` npm install -g @nomad-e/bluma-cli@latest`,
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function fail(message) {
|
|
43
|
+
process.stderr.write(`bluma: ${message}\n`);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
process.env.BLUMA_CORE_BIN = findEngine();
|
|
48
|
+
await import(pathToFileURL(join(here, "..", "dist", "bluma.js")).href);
|