@siranjeevan/releaseflow 1.1.4 → 1.1.5
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.
- package/index.js +60 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -30,8 +30,68 @@ async function checkForUpdates() {
|
|
|
30
30
|
} catch (e) {}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
async function runInteractiveDashboard() {
|
|
34
|
+
console.log('\n\x1b[36m==================================================');
|
|
35
|
+
console.log(' ____ _____ _ _____ _ ____ _____ ');
|
|
36
|
+
console.log(' | _ \\| ____| | | ____| / \\ / ___|| ____|');
|
|
37
|
+
console.log(' | |_) | _| | | | _| / _ \\ \\___ \\| _| ');
|
|
38
|
+
console.log(' | _ <| |___| |___| |___ / ___ \\ ___) | |___ ');
|
|
39
|
+
console.log(' |_| \\_\\_____|_____|_____/_/ \\_\\____/|_____|');
|
|
40
|
+
console.log(' ');
|
|
41
|
+
console.log(' 🚀 RELEASEFLOW CLI v1.1.5');
|
|
42
|
+
console.log('==================================================\x1b[0m\n');
|
|
43
|
+
|
|
44
|
+
const { action } = await inquirer.prompt([{
|
|
45
|
+
type: 'list',
|
|
46
|
+
name: 'action',
|
|
47
|
+
message: 'What would you like to do?',
|
|
48
|
+
pageSize: 10,
|
|
49
|
+
choices: [
|
|
50
|
+
{ name: '📦 Release New Update (Build & Upload)', value: 'release' },
|
|
51
|
+
{ name: '⏪ Rollback to Old Version', value: 'rollback' },
|
|
52
|
+
{ name: '🔧 Configure Project Credentials', value: 'config' },
|
|
53
|
+
{ name: '🔍 Show Current Configuration', value: 'config_show' },
|
|
54
|
+
{ name: '📄 Show Flutter Integration Guide', value: 'prompt' },
|
|
55
|
+
{ name: '📚 Open User Manual', value: 'manual' },
|
|
56
|
+
new inquirer.Separator(),
|
|
57
|
+
{ name: '🚪 Exit', value: 'exit' }
|
|
58
|
+
]
|
|
59
|
+
}]);
|
|
60
|
+
|
|
61
|
+
switch (action) {
|
|
62
|
+
case 'release':
|
|
63
|
+
await runFullReleaseFlow();
|
|
64
|
+
break;
|
|
65
|
+
case 'rollback':
|
|
66
|
+
await runRollbackFlow();
|
|
67
|
+
break;
|
|
68
|
+
case 'config':
|
|
69
|
+
await runConfigureFlow();
|
|
70
|
+
break;
|
|
71
|
+
case 'config_show':
|
|
72
|
+
runShowConfig();
|
|
73
|
+
break;
|
|
74
|
+
case 'prompt':
|
|
75
|
+
runPromptFlow();
|
|
76
|
+
break;
|
|
77
|
+
case 'manual':
|
|
78
|
+
runManualFlow();
|
|
79
|
+
break;
|
|
80
|
+
case 'exit':
|
|
81
|
+
process.exit(0);
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
33
86
|
async function main() {
|
|
34
87
|
await checkForUpdates();
|
|
88
|
+
|
|
89
|
+
const argv = yargs(hideBin(process.argv)).argv;
|
|
90
|
+
if (argv._.length === 0) {
|
|
91
|
+
await runInteractiveDashboard();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
35
95
|
yargs(hideBin(process.argv))
|
|
36
96
|
.command('release', 'Build, Detect and Upload in ONE command!', {}, async () => {
|
|
37
97
|
console.log('\x1b[36m%s\x1b[0m', '\n--- ReleaseFlow All-in-One Generator ---');
|