nitor 1.7.1 → 1.7.2
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/CHANGELOG.md +6 -0
- package/README.md +1 -0
- package/package.json +2 -2
- package/services/autocomplete.js +4 -0
- package/services/merge.js +2 -1
- package/services/process-commands.js +8 -6
- package/services/utils.js +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -83,3 +83,9 @@ For a complete list of changes and discussion, see [Issue #1](https://github.com
|
|
|
83
83
|
- Removed unused `commander` and `compression` dependencies.
|
|
84
84
|
- Declared `engines.node >= 18` to reflect the actual minimum supported by
|
|
85
85
|
runtime dependencies (notably `@google/generative-ai`).
|
|
86
|
+
|
|
87
|
+
## [1.7.2] - 2026-05-20
|
|
88
|
+
|
|
89
|
+
### New Features
|
|
90
|
+
|
|
91
|
+
- Added `skip` option to build and build-deploy commands.
|
package/README.md
CHANGED
|
@@ -368,6 +368,7 @@ The backup service is designed to work on Windows, macOS, and Linux:
|
|
|
368
368
|
- `-project` or `-p` : Project name (`portal`, `gateway`, `phr`)
|
|
369
369
|
- `-components` or `-c` : Components (`client`, `backend`, etc.)
|
|
370
370
|
- `-instance` or `-i` : Instance/environment (`dev`, `qa`, `pilot`)
|
|
371
|
+
- `-skip` or `-sk` : Skip steps (`owasp`, `sonar`)
|
|
371
372
|
- `-branch` or `-b` : Git branch (optional)
|
|
372
373
|
- `-task` or `-t` : Task number
|
|
373
374
|
- `-type` or `-ty` : Type (`feat`, `fix`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitor",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
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>",
|
|
@@ -104,4 +104,4 @@
|
|
|
104
104
|
}
|
|
105
105
|
},
|
|
106
106
|
"type": "commonjs"
|
|
107
|
-
}
|
|
107
|
+
}
|
package/services/autocomplete.js
CHANGED
|
@@ -35,6 +35,8 @@ const setupAutocomplete = () => {
|
|
|
35
35
|
'-c': ['client', 'administration', 'provider', 'rest-api'],
|
|
36
36
|
'-instance': ['dev', 'qa', 'pilot'],
|
|
37
37
|
'-i': ['dev', 'qa', 'pilot'],
|
|
38
|
+
'-skip': ['owasp', 'sonar'],
|
|
39
|
+
'-sk': ['owasp', 'sonar'],
|
|
38
40
|
'-help': [],
|
|
39
41
|
'--h': [],
|
|
40
42
|
},
|
|
@@ -99,6 +101,8 @@ const setupAutocomplete = () => {
|
|
|
99
101
|
'-c': ['client', 'administration', 'provider', 'rest-api'],
|
|
100
102
|
'-instance': ['dev', 'qa', 'pilot'],
|
|
101
103
|
'-i': ['dev', 'qa', 'pilot'],
|
|
104
|
+
'-skip': ['owasp', 'sonar'],
|
|
105
|
+
'-sk': ['owasp', 'sonar'],
|
|
102
106
|
'-help': [],
|
|
103
107
|
'--h': [],
|
|
104
108
|
},
|
package/services/merge.js
CHANGED
|
@@ -16,8 +16,9 @@ const merge = async (values) => {
|
|
|
16
16
|
|
|
17
17
|
const execOptions = { stdio: 'inherit', shell: isWindows ? 'cmd.exe' : '/bin/sh' };
|
|
18
18
|
|
|
19
|
-
execSync('
|
|
19
|
+
execSync('nitor cleanup', execOptions);
|
|
20
20
|
execSync('git pull', execOptions);
|
|
21
|
+
execSync('git fetch', execOptions);
|
|
21
22
|
execSync(`git checkout ${source}`, execOptions);
|
|
22
23
|
execSync('git pull', execOptions);
|
|
23
24
|
|
|
@@ -49,15 +49,16 @@ const processArgs = async (type, value) => {
|
|
|
49
49
|
switch (type) {
|
|
50
50
|
case ACTIONS.BUILD: {
|
|
51
51
|
if (value === '-help' || value === '--h') {
|
|
52
|
-
console.log(`usage: \tnu build [-project <project name>] [-components <component name>] [-instance <instance name>]
|
|
53
|
-
\tnu build [-p <project name>] [-c <component name>] [-i <instance name>]
|
|
52
|
+
console.log(`usage: \tnu build [-project <project name>] [-components <component name>] [-instance <instance name>] [-skip <owasp|sonar>]
|
|
53
|
+
\tnu build [-p <project name>] [-c <component name>] [-i <instance name>] [-sk <owasp|sonar>]
|
|
54
54
|
|
|
55
55
|
Build specified components
|
|
56
56
|
|
|
57
57
|
Options:
|
|
58
58
|
-p, --project <name> project name | portal, gateway, phr, configService, healthRecords, centralAuth, mpi, phrAdminBackend, phrAdminClient, terminologyService
|
|
59
59
|
-c, --components <name> component name | client, administration, provider, rest-api
|
|
60
|
-
-i, --instance <name> instance name | dev, qa, pilot
|
|
60
|
+
-i, --instance <name> instance name | dev, qa, pilot
|
|
61
|
+
-sk, --skip <steps> skip steps | owasp, sonar`);
|
|
61
62
|
|
|
62
63
|
break;
|
|
63
64
|
}
|
|
@@ -69,15 +70,16 @@ Options:
|
|
|
69
70
|
|
|
70
71
|
case ACTIONS.BUILD_DEPLOY: {
|
|
71
72
|
if (value === '-help' || value === '--h') {
|
|
72
|
-
console.log(`usage: \tnu build-deploy [-project <project name>] [-components <component name>] [-instance <instance name>]
|
|
73
|
-
\tnu build-deploy [-p <project name>] [-c <component name>] [-i <instance name>]
|
|
73
|
+
console.log(`usage: \tnu build-deploy [-project <project name>] [-components <component name>] [-instance <instance name>] [-skip <owasp|sonar>]
|
|
74
|
+
\tnu build-deploy [-p <project name>] [-c <component name>] [-i <instance name>] [-sk <owasp|sonar>]
|
|
74
75
|
|
|
75
76
|
Build and deploy specified components
|
|
76
77
|
|
|
77
78
|
Options:
|
|
78
79
|
-p, --project <name> project name | portal, gateway, phr, configService, healthRecords, centralAuth, mpi, phrAdminBackend, phrAdminClient, terminologyService
|
|
79
80
|
-c, --components <name> component name | client, administration, provider, rest-api
|
|
80
|
-
-i, --instance <name> instance name | dev, qa, pilot
|
|
81
|
+
-i, --instance <name> instance name | dev, qa, pilot
|
|
82
|
+
-sk, --skip <steps> skip steps | owasp, sonar`);
|
|
81
83
|
|
|
82
84
|
break;
|
|
83
85
|
}
|
package/services/utils.js
CHANGED
|
@@ -67,6 +67,8 @@ const keyMap = {
|
|
|
67
67
|
st: 'state',
|
|
68
68
|
search: 'search',
|
|
69
69
|
q: 'search',
|
|
70
|
+
skip: 'skip',
|
|
71
|
+
sk: 'skip',
|
|
70
72
|
};
|
|
71
73
|
const projectMap = {
|
|
72
74
|
portal: 'medica-portal',
|
|
@@ -184,6 +186,22 @@ const generateBuildConfigs = (values = {}) => {
|
|
|
184
186
|
|
|
185
187
|
const variables_attributes = [];
|
|
186
188
|
|
|
189
|
+
if (values.skip?.includes('owasp')) {
|
|
190
|
+
variables_attributes.push({
|
|
191
|
+
variable_type: 'env_var',
|
|
192
|
+
key: 'SKIP_OWASP',
|
|
193
|
+
value: 'true',
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if (values.skip?.includes('sonar')) {
|
|
198
|
+
variables_attributes.push({
|
|
199
|
+
variable_type: 'env_var',
|
|
200
|
+
key: 'SKIP_SONAR',
|
|
201
|
+
value: 'true',
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
187
205
|
if (values.instance) {
|
|
188
206
|
variables_attributes.push({
|
|
189
207
|
variable_type: 'env_var',
|
|
@@ -233,6 +251,7 @@ const generateBuildConfigs = (values = {}) => {
|
|
|
233
251
|
: []),
|
|
234
252
|
],
|
|
235
253
|
};
|
|
254
|
+
|
|
236
255
|
configs.backend.config = makeConfig(`${gitlabConfig.url}/cxd/${project}-backend/-/pipelines`, {
|
|
237
256
|
pipeline: backendData,
|
|
238
257
|
});
|