commet 1.4.1 → 1.4.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/dist/index.js +1 -36
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ var import_commander11 = require("commander");
|
|
|
30
30
|
// package.json
|
|
31
31
|
var package_default = {
|
|
32
32
|
name: "commet",
|
|
33
|
-
version: "1.4.
|
|
33
|
+
version: "1.4.2",
|
|
34
34
|
description: "Commet CLI - Manage your billing platform from the command line",
|
|
35
35
|
bin: {
|
|
36
36
|
commet: "./bin/commet"
|
|
@@ -85,7 +85,6 @@ var package_default = {
|
|
|
85
85
|
};
|
|
86
86
|
|
|
87
87
|
// src/commands/create.ts
|
|
88
|
-
var import_node_child_process = require("child_process");
|
|
89
88
|
var fs2 = __toESM(require("fs"));
|
|
90
89
|
var os2 = __toESM(require("os"));
|
|
91
90
|
var path2 = __toESM(require("path"));
|
|
@@ -426,34 +425,6 @@ function linkProject(dest, orgId, orgName, environment) {
|
|
|
426
425
|
"utf8"
|
|
427
426
|
);
|
|
428
427
|
}
|
|
429
|
-
async function askSkills() {
|
|
430
|
-
try {
|
|
431
|
-
return await (0, import_prompts.confirm)({
|
|
432
|
-
message: `Add ${commetColor("agent skills")}?`,
|
|
433
|
-
default: true,
|
|
434
|
-
theme: promptTheme
|
|
435
|
-
});
|
|
436
|
-
} catch {
|
|
437
|
-
return false;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
async function installSkills(projectRoot) {
|
|
441
|
-
const npx = process.platform === "win32" ? "npx.cmd" : "npx";
|
|
442
|
-
return new Promise((resolve3) => {
|
|
443
|
-
(0, import_node_child_process.execFile)(
|
|
444
|
-
npx,
|
|
445
|
-
["-y", "--loglevel=error", "skills", "add", "commet-labs/commet-skills"],
|
|
446
|
-
{ cwd: projectRoot },
|
|
447
|
-
(error) => {
|
|
448
|
-
if (error) {
|
|
449
|
-
console.log(import_chalk3.default.dim(" You can install them manually by running:"));
|
|
450
|
-
console.log(import_chalk3.default.dim(" npx skills add commet-labs/commet-skills"));
|
|
451
|
-
}
|
|
452
|
-
resolve3();
|
|
453
|
-
}
|
|
454
|
-
);
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
428
|
var createCommand = new import_commander.Command("create").description("Create a new Commet app from a template").argument("[name]", "Project name").option(
|
|
458
429
|
"-t, --template <template>",
|
|
459
430
|
"Template to use (fixed, seats, metered, credits, balance-ai, balance-fixed)"
|
|
@@ -583,7 +554,6 @@ var createCommand = new import_commander.Command("create").description("Create a
|
|
|
583
554
|
console.log(import_chalk3.default.yellow("\n\u26A0 Cancelled"));
|
|
584
555
|
return;
|
|
585
556
|
}
|
|
586
|
-
const shouldInstallSkills = await askSkills();
|
|
587
557
|
const downloadSpinner = (0, import_ora2.default)("Downloading template...").start();
|
|
588
558
|
try {
|
|
589
559
|
await downloadTemplate(template.dir, dest, opts.ref);
|
|
@@ -633,11 +603,6 @@ var createCommand = new import_commander.Command("create").description("Create a
|
|
|
633
603
|
keySpinner.succeed("API key created and saved to .env");
|
|
634
604
|
}
|
|
635
605
|
linkProject(dest, selectedOrg.id, selectedOrg.name, auth.environment);
|
|
636
|
-
if (shouldInstallSkills) {
|
|
637
|
-
const skillsSpinner = (0, import_ora2.default)("Installing agent skills...").start();
|
|
638
|
-
await installSkills(dest);
|
|
639
|
-
skillsSpinner.succeed("Agent skills installed");
|
|
640
|
-
}
|
|
641
606
|
console.log(import_chalk3.default.green(`
|
|
642
607
|
\u2713 Created ${projectName}`));
|
|
643
608
|
console.log(import_chalk3.default.dim(` Template: ${template.name}`));
|