@nexusbloom/cli 0.2.9 → 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 +6 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -422,10 +422,13 @@ 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
|
|
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}`;
|
|
426
429
|
fetch(`${API_BASE}/api/track-run`, {
|
|
427
430
|
method: "POST",
|
|
428
|
-
headers:
|
|
431
|
+
headers: trackHeaders,
|
|
429
432
|
body: JSON.stringify({ slug, source: "cli" }),
|
|
430
433
|
}).catch(() => {});
|
|
431
434
|
|
|
@@ -498,7 +501,7 @@ program
|
|
|
498
501
|
console.log(` ${chalk.dim(manifest.short_description || "")}`);
|
|
499
502
|
console.log(` Version: ${chalk.cyan(manifest.version || "1.0.0")}`);
|
|
500
503
|
console.log(` Runtime: ${chalk.cyan(manifest.runtime || "browser")}`);
|
|
501
|
-
console.log(` Pricing: ${chalk.
|
|
504
|
+
console.log(` Pricing: ${chalk.green("free")}`);
|
|
502
505
|
if (manifest.input_schema?.properties) {
|
|
503
506
|
console.log(chalk.bold(`\n Input Parameters:`));
|
|
504
507
|
const props = manifest.input_schema.properties;
|