maiass 5.7.32 → 5.7.33

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.
Files changed (2) hide show
  1. package/maiass.mjs +60 -49
  2. 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
- switch (command) {
112
- case 'hello':
113
- console.log(colors.BCyan('Hello from MAIASS!'));
114
- break;
115
-
116
- case 'env':
117
- displayEnvironmentVariables();
118
- break;
119
-
120
- case 'git-info':
121
- const gitInfo = getGitInfo();
122
- displayGitInfo(gitInfo);
123
- break;
124
-
125
- case 'config':
126
- handleConfigCommand(process.argv.slice(3));
127
- break;
128
-
129
- case 'version':
130
- handleVersionCommand(process.argv.slice(3));
131
- break;
132
-
133
- case 'account-info':
134
- handleAccountInfoCommand({
135
- json: args.includes('--json')
136
- });
137
- break;
138
-
139
- case 'maiass':
140
- // Handle the main MAIASS workflow
141
- handleMaiassCommand({
142
- _: process.argv.slice(2).filter(arg => !arg.startsWith('--')),
143
- 'commits-only': args.includes('--commits-only') || args.includes('-c'),
144
- 'auto-stage': args.includes('--auto-stage'),
145
- 'auto': args.includes('--auto'),
146
- 'version-bump': versionBump,
147
- 'dry-run': args.includes('--dry-run') || args.includes('-d'),
148
- force: args.includes('--force') || args.includes('-f'),
149
- silent: args.includes('--silent') || args.includes('-s'),
150
- tag: getArgValue(args, '--tag') || getArgValue(args, '-t')
151
- });
152
- break;
153
-
154
- default:
155
- console.error(`Unknown command: ${command}`);
156
- console.log('Run `maiass --help` for available commands.');
157
- process.exit(1);
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) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maiass",
3
3
  "type": "module",
4
- "version": "5.7.32",
4
+ "version": "5.7.33",
5
5
  "description": "MAIASS - Modular AI-Augmented Semantic Scribe - Intelligent Git workflow automation",
6
6
  "main": "maiass.mjs",
7
7
  "bin": {