@metaphi-ai/hum 0.1.86 → 0.2.1
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/bin/hum.js +9 -0
- package/dist/cli.mjs +29287 -24578
- package/package.json +2 -2
package/bin/hum.js
CHANGED
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
// session records is in the core.
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
6
6
|
import path from 'node:path';
|
|
7
|
+
|
|
8
|
+
// The terminal UI runs on Ink 7, which needs Node 22. Say so here, in words, before the
|
|
9
|
+
// bundle loads and fails on syntax nobody asked the person to read.
|
|
10
|
+
const NODE_FLOOR = 22;
|
|
11
|
+
if (Number(process.versions.node.split('.')[0]) < NODE_FLOOR) {
|
|
12
|
+
process.stderr.write(`hum needs Node ${NODE_FLOOR} or newer; this is Node ${process.versions.node}. Update Node, then run hum again.\n`);
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
|
|
7
16
|
const here = path.dirname(fileURLToPath(import.meta.url));
|
|
8
17
|
// a URL, not a path: on Windows `C:\…` is not something the ESM loader will import
|
|
9
18
|
await import(pathToFileURL(path.join(here, '..', 'dist', 'cli.mjs')).href);
|