@meltstudio/meltctl 2.3.0 → 2.4.0

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.
@@ -1,5 +1,5 @@
1
1
  interface CleanOptions {
2
- placeholder?: never;
2
+ yes?: boolean;
3
3
  }
4
- export declare function cleanCommand(_options?: CleanOptions): Promise<void>;
4
+ export declare function cleanCommand(options?: CleanOptions): Promise<void>;
5
5
  export {};
@@ -13,7 +13,7 @@ const MELT_COMMAND_FILES = [
13
13
  'melt-complete.md',
14
14
  'melt-debug.md',
15
15
  ];
16
- export async function cleanCommand(_options = {}) {
16
+ export async function cleanCommand(options = {}) {
17
17
  intro(chalk.blue('🧹 Melt Project - Clean'));
18
18
  const currentDir = process.cwd();
19
19
  const meltDir = path.join(currentDir, '.melt');
@@ -36,13 +36,17 @@ export async function cleanCommand(_options = {}) {
36
36
  }
37
37
  // Show what will be cleaned
38
38
  displayCleanupPlan(analysisResult);
39
- // Get confirmation
40
- const shouldProceed = await confirm({
41
- message: 'Do you want to proceed with cleaning? This action cannot be undone.',
42
- });
39
+ // Get confirmation (skip if --yes flag is provided)
40
+ let shouldProceed = options.yes || false;
43
41
  if (!shouldProceed) {
44
- outro(chalk.gray('Clean operation cancelled.'));
45
- return;
42
+ const confirmResult = await confirm({
43
+ message: 'Do you want to proceed with cleaning? This action cannot be undone.',
44
+ });
45
+ if (confirmResult !== true) {
46
+ outro(chalk.gray('Clean operation cancelled.'));
47
+ return;
48
+ }
49
+ shouldProceed = true;
46
50
  }
47
51
  // Perform the cleanup
48
52
  const s = spinner();
package/dist/index.js CHANGED
@@ -43,8 +43,9 @@ projectCommand
43
43
  projectCommand
44
44
  .command('clean')
45
45
  .description('Remove all Melt-generated files from the project')
46
- .action(() => {
47
- return cleanCommand();
46
+ .option('-y, --yes', 'skip confirmation prompt')
47
+ .action(options => {
48
+ return cleanCommand({ yes: options.yes });
48
49
  });
49
50
  // Version check command
50
51
  program
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meltstudio/meltctl",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "CLI tool for Melt development process automation - initialize and update project configurations",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",