nitor 1.4.0 → 1.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitor",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "A comprehensive CLI toolkit for automating GitLab operations, AI-powered code review, build/deploy automation, MongoDB backup/restore, and developer productivity tools",
5
5
  "main": "index.js",
6
6
  "author": "Nithin V <mails2nithin@gmail.com>",
@@ -78,12 +78,12 @@ const executeMongoRestore = async (config) => {
78
78
  stdio: 'inherit',
79
79
  shell: isWindows ? 'cmd.exe' : '/bin/sh',
80
80
  });
81
- console.log(`${colors.green}Mongorestore completed successfully${colors.reset}`);
81
+ console.log(`${colors.green}Mongorestore completed successfully${colors.reset}`);
82
82
  } catch (error) {
83
83
  // mongorestore returns non-zero even for partial success (e.g., duplicate keys)
84
84
  // Log the warning but don't throw unless it's a critical failure
85
85
  console.log(
86
- `${colors.red}Mongorestore completed with some errors (this may be expected if data already exists)${colors.reset}`,
86
+ `${colors.red}Mongorestore completed with some errors (this may be expected if data already exists)${colors.reset}`,
87
87
  );
88
88
  console.log(`Check the output above for details`);
89
89
  }
@@ -41,7 +41,7 @@ const processArgs = async (type, value) => {
41
41
  }
42
42
 
43
43
  if (values === null) {
44
- return;
44
+ process.exit(1);
45
45
  }
46
46
 
47
47
  switch (type) {
@@ -57,7 +57,7 @@ Options:
57
57
  -c, --components <name> component name | client, administration, provider, rest-api
58
58
  -i, --instance <name> instance name | dev, qa, pilot`);
59
59
 
60
- return;
60
+ break;
61
61
  }
62
62
 
63
63
  await build(values);
@@ -77,7 +77,7 @@ Options:
77
77
  -c, --components <name> component name | client, administration, provider, rest-api
78
78
  -i, --instance <name> instance name | dev, qa, pilot`);
79
79
 
80
- return;
80
+ break;
81
81
  }
82
82
 
83
83
  const configs = await build(values);
@@ -110,7 +110,7 @@ Options:
110
110
  -c, --components <name> component name | client, administration, provider, rest-api
111
111
  -i, --instance <name> instance name | dev, qa, pilot`);
112
112
 
113
- return;
113
+ break;
114
114
  }
115
115
 
116
116
  await deploy(values);
@@ -131,7 +131,7 @@ Options:
131
131
  -d, --description <description> description
132
132
  -p, --project <project short name> project short name | portal, gateway, phr, configService, healthRecords, centralAuth, mpi, phrAdminBackend, phrAdminClient, terminologyService`);
133
133
 
134
- return;
134
+ break;
135
135
  }
136
136
 
137
137
  await createBranch(values);
@@ -147,11 +147,10 @@ Options:
147
147
  Review merge request
148
148
 
149
149
  Options:
150
- -p, --project <project short name> project short name | portal, gateway, phr, configService, healthRecords, centralAuth, mpi, phrAdminBackend, phrAdminClient, terminologyService
151
- -mId, --mergeId <merge id> merge id
152
- -r, --repository <repository name> repository name
150
+ -p, --project <project short name>
151
+ -mId, --mergeId <merge id>
153
152
 
154
- Repository list:
153
+ Project list:
155
154
  centralAuth
156
155
  configService
157
156
  gatewayBackend
@@ -170,7 +169,7 @@ Repository list:
170
169
  portalDeployment
171
170
  terminologyService`);
172
171
 
173
- return;
172
+ break;
174
173
  }
175
174
 
176
175
  await mrAIReview(values);
@@ -184,7 +183,7 @@ Repository list:
184
183
 
185
184
  Enhance the provided text for improved clarity, conciseness, and professional quality.`);
186
185
 
187
- return;
186
+ break;
188
187
  }
189
188
 
190
189
  await refactor(values);
@@ -204,7 +203,7 @@ project list:
204
203
  - medicaPortal
205
204
  - phr`);
206
205
 
207
- return;
206
+ break;
208
207
  }
209
208
 
210
209
  await backup(values);
@@ -230,7 +229,7 @@ This command will:
230
229
  4. Merge source into target
231
230
  5. Push changes`);
232
231
 
233
- return;
232
+ break;
234
233
  }
235
234
 
236
235
  await merge(values);
@@ -250,7 +249,7 @@ This command will:
250
249
 
251
250
  Note: This operation cannot be undone. Make sure you have pushed any important changes.`);
252
251
 
253
- return;
252
+ break;
254
253
  }
255
254
 
256
255
  await cleanup();
@@ -296,7 +295,7 @@ View task stats
296
295
  Options:
297
296
  -t, --task <number> task number`);
298
297
 
299
- return;
298
+ break;
300
299
  }
301
300
 
302
301
  const spinner = createSpinner('Fetching task statistics');
@@ -366,7 +365,7 @@ Get task details
366
365
  Options:
367
366
  -t, --task <numbers with space> task numbers with space`);
368
367
 
369
- return;
368
+ break;
370
369
  }
371
370
 
372
371
  if (!values.task) {
@@ -572,7 +571,7 @@ Running 'nitor help' will list available subcommands and provide some conceptual
572
571
  default: {
573
572
  console.error(`nitor: '${type}' is not a nitor command. See 'nitor help'.`);
574
573
 
575
- return;
574
+ break;
576
575
  }
577
576
  }
578
577