@devness/useai-cli 0.3.3 → 0.3.4

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.
Files changed (2) hide show
  1. package/dist/index.js +28 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -839,14 +839,20 @@ async function installFlow(tools, autoYes, explicit) {
839
839
  if (autoYes) {
840
840
  toInstall = unconfigured;
841
841
  } else {
842
- const selected = await checkbox({
843
- message: "Select tools to configure:",
844
- choices: unconfigured.map((t) => ({
845
- name: t.name,
846
- value: t.id,
847
- checked: true
848
- }))
849
- });
842
+ let selected;
843
+ try {
844
+ selected = await checkbox({
845
+ message: "Select tools to configure:",
846
+ choices: unconfigured.map((t) => ({
847
+ name: t.name,
848
+ value: t.id,
849
+ checked: true
850
+ }))
851
+ });
852
+ } catch {
853
+ console.log("\n");
854
+ return;
855
+ }
850
856
  toInstall = unconfigured.filter((t) => selected.includes(t.id));
851
857
  }
852
858
  if (toInstall.length === 0) {
@@ -918,14 +924,20 @@ async function removeFlow(tools, autoYes, explicit) {
918
924
  if (autoYes) {
919
925
  toRemove = configured;
920
926
  } else {
921
- const selected = await checkbox({
922
- message: "Select tools to remove UseAI from:",
923
- choices: configured.map((t) => ({
924
- name: t.name,
925
- value: t.id,
926
- checked: true
927
- }))
928
- });
927
+ let selected;
928
+ try {
929
+ selected = await checkbox({
930
+ message: "Select tools to remove UseAI from:",
931
+ choices: configured.map((t) => ({
932
+ name: t.name,
933
+ value: t.id,
934
+ checked: true
935
+ }))
936
+ });
937
+ } catch {
938
+ console.log("\n");
939
+ return;
940
+ }
929
941
  toRemove = configured.filter((t) => selected.includes(t.id));
930
942
  }
931
943
  if (toRemove.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devness/useai-cli",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "CLI tool for useai.dev — stats, sync, publish your AI development workflow",
5
5
  "author": "nabeelkausari",
6
6
  "license": "MIT",