@nexusbloom/cli 0.2.8 → 0.2.10
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/package.json +1 -1
- package/src/index.js +11 -1
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -422,6 +422,16 @@ async function executeLocal(slug, input, jsonMode) {
|
|
|
422
422
|
result = coreLogicFn(input);
|
|
423
423
|
}
|
|
424
424
|
|
|
425
|
+
// Fire-and-forget: track the run for total runs counting and api_usage
|
|
426
|
+
const apiKey = process.env.NEXUSBLOOM_API_KEY || configGet("apiKey") || configGet("key");
|
|
427
|
+
const trackHeaders = { "Content-Type": "application/json" };
|
|
428
|
+
if (apiKey) trackHeaders["Authorization"] = `Bearer ${apiKey}`;
|
|
429
|
+
fetch(`${API_BASE}/api/track-run`, {
|
|
430
|
+
method: "POST",
|
|
431
|
+
headers: trackHeaders,
|
|
432
|
+
body: JSON.stringify({ slug, source: "cli" }),
|
|
433
|
+
}).catch(() => {});
|
|
434
|
+
|
|
425
435
|
if (jsonMode) return console.log(JSON.stringify({ success: true, data: result }, null, 2));
|
|
426
436
|
console.log(chalk.green("\n Result (local):"));
|
|
427
437
|
console.log(` ${JSON.stringify(result, null, 2)}`);
|
|
@@ -491,7 +501,7 @@ program
|
|
|
491
501
|
console.log(` ${chalk.dim(manifest.short_description || "")}`);
|
|
492
502
|
console.log(` Version: ${chalk.cyan(manifest.version || "1.0.0")}`);
|
|
493
503
|
console.log(` Runtime: ${chalk.cyan(manifest.runtime || "browser")}`);
|
|
494
|
-
console.log(` Pricing: ${chalk.
|
|
504
|
+
console.log(` Pricing: ${chalk.green("free")}`);
|
|
495
505
|
if (manifest.input_schema?.properties) {
|
|
496
506
|
console.log(chalk.bold(`\n Input Parameters:`));
|
|
497
507
|
const props = manifest.input_schema.properties;
|