maiass 5.7.32 → 5.7.34
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/maiass.mjs +60 -49
- package/package.json +1 -1
package/maiass.mjs
CHANGED
|
@@ -107,55 +107,66 @@ if (args.includes('--help') || args.includes('-h') || command === 'help') {
|
|
|
107
107
|
process.exit(0);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
// Command routing
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
110
|
+
// Command routing (wrapped in async IIFE to handle async commands)
|
|
111
|
+
(async () => {
|
|
112
|
+
switch (command) {
|
|
113
|
+
case 'hello':
|
|
114
|
+
console.log(colors.BCyan('Hello from MAIASS!'));
|
|
115
|
+
break;
|
|
116
|
+
|
|
117
|
+
case 'env':
|
|
118
|
+
displayEnvironmentVariables();
|
|
119
|
+
break;
|
|
120
|
+
|
|
121
|
+
case 'git-info':
|
|
122
|
+
const gitInfo = getGitInfo();
|
|
123
|
+
displayGitInfo(gitInfo);
|
|
124
|
+
break;
|
|
125
|
+
|
|
126
|
+
case 'config':
|
|
127
|
+
await handleConfigCommand(process.argv.slice(3));
|
|
128
|
+
break;
|
|
129
|
+
|
|
130
|
+
case 'version':
|
|
131
|
+
await handleVersionCommand(process.argv.slice(3));
|
|
132
|
+
break;
|
|
133
|
+
|
|
134
|
+
case 'account-info':
|
|
135
|
+
await handleAccountInfoCommand({
|
|
136
|
+
json: args.includes('--json')
|
|
137
|
+
});
|
|
138
|
+
break;
|
|
139
|
+
|
|
140
|
+
case 'maiass':
|
|
141
|
+
// Handle the main MAIASS workflow
|
|
142
|
+
await handleMaiassCommand({
|
|
143
|
+
_: process.argv.slice(2).filter(arg => !arg.startsWith('--')),
|
|
144
|
+
'commits-only': args.includes('--commits-only') || args.includes('-c'),
|
|
145
|
+
'auto-stage': args.includes('--auto-stage'),
|
|
146
|
+
'auto': args.includes('--auto'),
|
|
147
|
+
'version-bump': versionBump,
|
|
148
|
+
'dry-run': args.includes('--dry-run') || args.includes('-d'),
|
|
149
|
+
force: args.includes('--force') || args.includes('-f'),
|
|
150
|
+
silent: args.includes('--silent') || args.includes('-s'),
|
|
151
|
+
tag: getArgValue(args, '--tag') || getArgValue(args, '-t')
|
|
152
|
+
});
|
|
153
|
+
break;
|
|
154
|
+
|
|
155
|
+
default:
|
|
156
|
+
console.error(`Unknown command: ${command}`);
|
|
157
|
+
console.log('Run `maiass --help` for available commands.');
|
|
158
|
+
process.exit(1);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Exit cleanly after successful command execution
|
|
162
|
+
process.exit(0);
|
|
163
|
+
})().catch(error => {
|
|
164
|
+
console.error(colors.Red(`${SYMBOLS.CROSS} Fatal error: ${error.message}`));
|
|
165
|
+
if (process.env.MAIASS_DEBUG === 'true') {
|
|
166
|
+
console.error(colors.Gray(error.stack));
|
|
167
|
+
}
|
|
168
|
+
process.exit(1);
|
|
169
|
+
});
|
|
159
170
|
|
|
160
171
|
// Helper function to get argument values
|
|
161
172
|
function getArgValue(args, flag) {
|