@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.
|
@@ -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(
|
|
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
|
-
|
|
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
|
-
|
|
45
|
-
|
|
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
|
-
.
|
|
47
|
-
|
|
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