genbox 1.0.104 → 1.0.105

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.
@@ -36,10 +36,10 @@ exports.extendCommand = new commander_1.Command('extend')
36
36
  }
37
37
  // Determine hours - from option or prompt
38
38
  let hours;
39
- if (options.hours) {
39
+ if (options.hours !== undefined) {
40
40
  hours = parseInt(options.hours, 10);
41
- if (isNaN(hours) || hours < 1) {
42
- console.error(chalk_1.default.red('Error: Hours must be a positive number'));
41
+ if (isNaN(hours) || hours < 0) {
42
+ console.error(chalk_1.default.red('Error: Hours must be 0 or a positive number'));
43
43
  return;
44
44
  }
45
45
  }
@@ -52,7 +52,8 @@ exports.extendCommand = new commander_1.Command('extend')
52
52
  { name: '2 hours', value: 2 },
53
53
  { name: '4 hours', value: 4 },
54
54
  { name: '8 hours', value: 8 },
55
- { name: 'Custom...', value: 0 },
55
+ { name: 'Custom...', value: -2 },
56
+ { name: 'Clear extension', value: 0 },
56
57
  { name: 'Remove auto expiry', value: -1 },
57
58
  ],
58
59
  });
@@ -61,13 +62,13 @@ exports.extendCommand = new commander_1.Command('extend')
61
62
  hours = 1;
62
63
  options.autoDestroy = false; // This will set disableAutoDestroy = true
63
64
  }
64
- else if (choice === 0) {
65
+ else if (choice === -2) {
65
66
  const customHours = await (0, input_1.default)({
66
- message: 'Enter number of hours:',
67
+ message: 'Enter number of hours (0 to clear):',
67
68
  validate: (val) => {
68
69
  const num = parseInt(val, 10);
69
- if (isNaN(num) || num < 1)
70
- return 'Please enter a positive number';
70
+ if (isNaN(num) || num < 0)
71
+ return 'Please enter 0 or a positive number';
71
72
  if (num > 24)
72
73
  return 'Maximum 24 hours';
73
74
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genbox",
3
- "version": "1.0.104",
3
+ "version": "1.0.105",
4
4
  "description": "Genbox CLI - AI-Powered Development Environments",
5
5
  "main": "dist/index.js",
6
6
  "bin": {