@insforge/cli 0.1.17 → 0.1.18

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 CHANGED
@@ -694,34 +694,6 @@ ${missing.join("\n")}
694
694
  `;
695
695
  appendFileSync(gitignorePath, block);
696
696
  }
697
- async function isCliInstalledGlobally() {
698
- try {
699
- const { stdout } = await execAsync("npm ls -g @insforge/cli --json", { timeout: 1e4 });
700
- const parsed = JSON.parse(stdout);
701
- return !!parsed?.dependencies?.["@insforge/cli"];
702
- } catch {
703
- return false;
704
- }
705
- }
706
- async function promptCliInstall(json) {
707
- if (json) return;
708
- try {
709
- if (await isCliInstalledGlobally()) return;
710
- const shouldInstall = await clack5.confirm({
711
- message: "Would you like to install the InsForge CLI globally? (so you can run `insforge` directly)"
712
- });
713
- if (clack5.isCancel(shouldInstall) || !shouldInstall) {
714
- clack5.log.info("You can install it later with: npm install -g @insforge/cli");
715
- return;
716
- }
717
- const s = clack5.spinner();
718
- s.start("Installing @insforge/cli globally...");
719
- await execAsync("npm install -g @insforge/cli", { timeout: 6e4 });
720
- s.stop("InsForge CLI installed globally");
721
- } catch {
722
- clack5.log.warn("Failed to install CLI globally. You can run manually: npm install -g @insforge/cli");
723
- }
724
- }
725
697
  async function installSkills(json) {
726
698
  try {
727
699
  if (!json) clack5.log.info("Installing InsForge agent skills...");
@@ -846,7 +818,6 @@ function registerProjectLinkCommand(program2) {
846
818
  } else {
847
819
  outputSuccess(`Linked to project "${project.name}" (${project.appkey}.${project.region})`);
848
820
  }
849
- await promptCliInstall(json);
850
821
  await installSkills(json);
851
822
  await reportCliUsage("cli.link", true, 6);
852
823
  } catch (err) {
@@ -1649,10 +1620,10 @@ function registerStorageDeleteBucketCommand(storageCmd2) {
1649
1620
  try {
1650
1621
  await requireAuth();
1651
1622
  if (!yes && !json) {
1652
- const confirm8 = await clack7.confirm({
1623
+ const confirm7 = await clack7.confirm({
1653
1624
  message: `Delete bucket "${name}" and all its objects? This cannot be undone.`
1654
1625
  });
1655
- if (!confirm8 || clack7.isCancel(confirm8)) {
1626
+ if (!confirm7 || clack7.isCancel(confirm7)) {
1656
1627
  process.exit(0);
1657
1628
  }
1658
1629
  }
@@ -1998,7 +1969,6 @@ function registerCreateCommand(program2) {
1998
1969
  if (hasTemplate) {
1999
1970
  await downloadTemplate(template, projectConfig, projectName, json, apiUrl);
2000
1971
  }
2001
- await promptCliInstall(json);
2002
1972
  await installSkills(json);
2003
1973
  await reportCliUsage("cli.create", true, 6);
2004
1974
  if (hasTemplate) {
@@ -2501,10 +2471,10 @@ function registerSecretsDeleteCommand(secretsCmd2) {
2501
2471
  try {
2502
2472
  await requireAuth();
2503
2473
  if (!yes && !json) {
2504
- const confirm8 = await clack11.confirm({
2474
+ const confirm7 = await clack11.confirm({
2505
2475
  message: `Delete secret "${key}"? This cannot be undone.`
2506
2476
  });
2507
- if (!confirm8 || clack11.isCancel(confirm8)) {
2477
+ if (!confirm7 || clack11.isCancel(confirm7)) {
2508
2478
  process.exit(0);
2509
2479
  }
2510
2480
  }
@@ -2687,10 +2657,10 @@ function registerSchedulesDeleteCommand(schedulesCmd2) {
2687
2657
  try {
2688
2658
  await requireAuth();
2689
2659
  if (!yes && !json) {
2690
- const confirm8 = await clack12.confirm({
2660
+ const confirm7 = await clack12.confirm({
2691
2661
  message: `Delete schedule "${id}"? This cannot be undone.`
2692
2662
  });
2693
- if (!confirm8 || clack12.isCancel(confirm8)) {
2663
+ if (!confirm7 || clack12.isCancel(confirm7)) {
2694
2664
  process.exit(0);
2695
2665
  }
2696
2666
  }