genbox 1.0.2 → 1.0.3

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.
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.destroyCommand = void 0;
7
7
  const commander_1 = require("commander");
8
8
  const chalk_1 = __importDefault(require("chalk"));
9
- const inquirer_1 = __importDefault(require("inquirer"));
9
+ const confirm_1 = __importDefault(require("@inquirer/confirm"));
10
10
  const ora_1 = __importDefault(require("ora"));
11
11
  const api_1 = require("../api");
12
12
  const genbox_selector_1 = require("../genbox-selector");
@@ -33,15 +33,10 @@ exports.destroyCommand = new commander_1.Command('destroy')
33
33
  // 2. Confirm
34
34
  let confirmed = options.yes;
35
35
  if (!confirmed) {
36
- const answer = await inquirer_1.default.prompt([
37
- {
38
- type: 'confirm',
39
- name: 'confirmed',
40
- message: `Are you sure you want to PERMANENTLY destroy '${target.name}' (${target.ipAddress || 'no IP'})?`,
41
- default: false,
42
- },
43
- ]);
44
- confirmed = answer.confirmed;
36
+ confirmed = await (0, confirm_1.default)({
37
+ message: `Are you sure you want to PERMANENTLY destroy '${target.name}' (${target.ipAddress || 'no IP'})?`,
38
+ default: false,
39
+ });
45
40
  }
46
41
  if (!confirmed) {
47
42
  console.log('Operation cancelled.');
@@ -9,7 +9,7 @@ exports.isInProjectContext = isInProjectContext;
9
9
  exports.selectGenbox = selectGenbox;
10
10
  exports.showProjectContext = showProjectContext;
11
11
  const chalk_1 = __importDefault(require("chalk"));
12
- const inquirer_1 = __importDefault(require("inquirer"));
12
+ const select_1 = __importDefault(require("@inquirer/select"));
13
13
  const api_1 = require("./api");
14
14
  const config_1 = require("./config");
15
15
  /**
@@ -112,15 +112,12 @@ async function selectGenbox(name, options = {}) {
112
112
  return {
113
113
  name: `${g.name} ${statusColor(`(${g.status})`)} ${chalk_1.default.dim(g.ipAddress || 'No IP')}`,
114
114
  value: g,
115
- short: g.name,
116
115
  };
117
116
  });
118
- const { selected } = await inquirer_1.default.prompt([{
119
- type: 'list',
120
- name: 'selected',
121
- message: options.selectMessage || 'Select a genbox:',
122
- choices,
123
- }]);
117
+ const selected = await (0, select_1.default)({
118
+ message: options.selectMessage || 'Select a genbox:',
119
+ choices,
120
+ });
124
121
  return { genbox: selected, genboxes };
125
122
  }
126
123
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -53,6 +53,8 @@
53
53
  "typescript": "^5.9.3"
54
54
  },
55
55
  "dependencies": {
56
+ "@inquirer/confirm": "^6.0.2",
57
+ "@inquirer/select": "^5.0.2",
56
58
  "chalk": "^5.6.2",
57
59
  "commander": "^14.0.2",
58
60
  "dotenv": "^17.2.3",