@use-aistack/cli 0.11.0 → 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/dist/index.js +28 -2
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -348,7 +348,7 @@ function apiEquivalentCost(modelKey, t, atMs) {
|
|
|
348
348
|
}
|
|
349
349
|
|
|
350
350
|
// src/version.ts
|
|
351
|
-
var CLI_VERSION = true ? "0.
|
|
351
|
+
var CLI_VERSION = true ? "0.12.0" : "0.0.0-dev";
|
|
352
352
|
|
|
353
353
|
// src/api.ts
|
|
354
354
|
var BASE_URL = process.env.AISTACK_URL || "https://aistack.to";
|
|
@@ -8268,6 +8268,26 @@ function styleSummaryLine(line) {
|
|
|
8268
8268
|
return line;
|
|
8269
8269
|
}
|
|
8270
8270
|
|
|
8271
|
+
// src/node-version.ts
|
|
8272
|
+
var MINIMUM_NODE_VERSION = "22.5.0";
|
|
8273
|
+
function versionParts(version) {
|
|
8274
|
+
const match = /^(?:v)?(\d+)\.(\d+)\.(\d+)/.exec(version);
|
|
8275
|
+
if (!match) return null;
|
|
8276
|
+
return [Number(match[1]), Number(match[2]), Number(match[3])];
|
|
8277
|
+
}
|
|
8278
|
+
function supportsNodeVersion(version) {
|
|
8279
|
+
const actual = versionParts(version);
|
|
8280
|
+
const minimum = versionParts(MINIMUM_NODE_VERSION);
|
|
8281
|
+
if (!actual || !minimum) return false;
|
|
8282
|
+
for (let i = 0; i < actual.length; i++) {
|
|
8283
|
+
if (actual[i] !== minimum[i]) return actual[i] > minimum[i];
|
|
8284
|
+
}
|
|
8285
|
+
return true;
|
|
8286
|
+
}
|
|
8287
|
+
function unsupportedNodeMessage(version) {
|
|
8288
|
+
return `aistack requires Node.js ${MINIMUM_NODE_VERSION} or newer. You are running ${version}. Upgrade Node.js so sync can read OpenCode's SQLite usage database.`;
|
|
8289
|
+
}
|
|
8290
|
+
|
|
8271
8291
|
// src/sync/server.ts
|
|
8272
8292
|
var SERVER_NAME = "aistack";
|
|
8273
8293
|
var SERVER_VERSION = "0.3.0";
|
|
@@ -8547,5 +8567,11 @@ program.command("sync").description("Scan, preview, and publish measured usage (
|
|
|
8547
8567
|
"with --auto on: hours between auto-syncs (default 6)"
|
|
8548
8568
|
).action((options) => syncCommand(options));
|
|
8549
8569
|
program.command("connect").description("Install the in-session sync surface (MCP server + Skill)").argument("<harness>", 'the harness to connect ("claude")').action(connectCommand);
|
|
8550
|
-
|
|
8570
|
+
if (!supportsNodeVersion(process.versions.node)) {
|
|
8571
|
+
process.stderr.write(`${unsupportedNodeMessage(process.versions.node)}
|
|
8572
|
+
`);
|
|
8573
|
+
process.exitCode = 1;
|
|
8574
|
+
} else {
|
|
8575
|
+
program.parse();
|
|
8576
|
+
}
|
|
8551
8577
|
//# sourceMappingURL=index.js.map
|