@adinsure-ops/ops-cli 5.0.6 → 5.0.8
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/CHANGELOGS.md +9 -0
- package/README.md +2 -2
- package/lib/commands/sql.js +4 -1
- package/lib/lib/gitlab.d.ts +2 -2
- package/lib/lib/gitlab.js +3 -3
- package/lib/lib/helper.d.ts +1 -0
- package/lib/lib/helper.js +3 -0
- package/oclif.manifest.json +5 -1
- package/package.json +1 -1
package/CHANGELOGS.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelogs
|
|
2
2
|
|
|
3
|
+
## 5.0.8: 2023-12-22
|
|
4
|
+
|
|
5
|
+
- gitlab:get-nightly-tag command request is fixed since the parameters in the HTTP header were misconfigured
|
|
6
|
+
|
|
7
|
+
## 5.0.7: 2023-12-18
|
|
8
|
+
|
|
9
|
+
- Sql command can now accept aruguments in lowercase as well as with a capital first letter
|
|
10
|
+
- Bugfix: sql path will now stop capitalizing the extend, migration, data and schema directory
|
|
11
|
+
|
|
3
12
|
## 5.0.6: 2023-12-14
|
|
4
13
|
|
|
5
14
|
- Node 16 support added
|
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ You can run and debug commands directly from terminal by running `ops [command]`
|
|
|
27
27
|
|
|
28
28
|
### Upgrade to version 5
|
|
29
29
|
|
|
30
|
-
Node 18 or 20
|
|
30
|
+
Node 16, 18 or 20 is required.
|
|
31
31
|
|
|
32
32
|
### Upgrade to version 4
|
|
33
33
|
|
|
@@ -741,7 +741,7 @@ for better readability. It can export multiple functions though only one can be
|
|
|
741
741
|
transformation specification.
|
|
742
742
|
|
|
743
743
|
Transformation function that is defined in the transformation module will be called with a single
|
|
744
|
-
parameter - absolute path of the source file.
|
|
744
|
+
parameter - absolute path of the source file.
|
|
745
745
|
|
|
746
746
|
Transformation function MUST return a string. This string will become the content of the file on
|
|
747
747
|
destination.
|
package/lib/commands/sql.js
CHANGED
|
@@ -185,6 +185,7 @@ end;`;
|
|
|
185
185
|
}
|
|
186
186
|
// Validation of input parameters
|
|
187
187
|
let scriptType = args.type;
|
|
188
|
+
console.log(scriptType);
|
|
188
189
|
if (!scriptType) {
|
|
189
190
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
190
191
|
const responses = yield inquirer.prompt([{
|
|
@@ -195,6 +196,8 @@ end;`;
|
|
|
195
196
|
}]);
|
|
196
197
|
scriptType = responses.type;
|
|
197
198
|
}
|
|
199
|
+
if (scriptType === 'Migration')
|
|
200
|
+
scriptType = scriptType.toLowerCase();
|
|
198
201
|
let scriptModule = args.module;
|
|
199
202
|
if (!scriptModule && scriptType === 'data') {
|
|
200
203
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -286,7 +289,7 @@ Sql.args = {
|
|
|
286
289
|
type: Args.string({
|
|
287
290
|
description: 'Type of database scripts',
|
|
288
291
|
required: true,
|
|
289
|
-
options: ['Schema', 'Data', 'Migration', 'Extend'],
|
|
292
|
+
options: ['schema', 'data', 'migration', 'extend', 'Schema', 'Data', 'Migration', 'Extend'],
|
|
290
293
|
}),
|
|
291
294
|
module: Args.string({
|
|
292
295
|
description: 'Module of data database scripts',
|
package/lib/lib/gitlab.d.ts
CHANGED
|
@@ -14,10 +14,10 @@ export default class GitLab {
|
|
|
14
14
|
getLatestVersion(searchVersion: string, prefix?: string): Promise<semver.SemVer>;
|
|
15
15
|
/**
|
|
16
16
|
* Try to figure out latest available version already created
|
|
17
|
-
* @param
|
|
17
|
+
* @param tag_name Tag name
|
|
18
18
|
* @param ref Reference
|
|
19
19
|
* @returns {void}
|
|
20
20
|
*/
|
|
21
|
-
createNewTag(
|
|
21
|
+
createNewTag(tag_name: string, ref: string): Promise<void>;
|
|
22
22
|
getTagPipelineStatus(tag: string): Promise<string>;
|
|
23
23
|
}
|
package/lib/lib/gitlab.js
CHANGED
|
@@ -65,15 +65,15 @@ export default class GitLab {
|
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Try to figure out latest available version already created
|
|
68
|
-
* @param
|
|
68
|
+
* @param tag_name Tag name
|
|
69
69
|
* @param ref Reference
|
|
70
70
|
* @returns {void}
|
|
71
71
|
*/
|
|
72
|
-
createNewTag(
|
|
72
|
+
createNewTag(tag_name, ref) {
|
|
73
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
74
|
try {
|
|
75
75
|
yield axios.post(`${this.host}${this.apiBase}/${this.project}/repository/tags`, {
|
|
76
|
-
|
|
76
|
+
tag_name,
|
|
77
77
|
ref,
|
|
78
78
|
}, {
|
|
79
79
|
headers: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function capitalizeFirstLetter(str: string): string;
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.0.
|
|
2
|
+
"version": "5.0.8",
|
|
3
3
|
"commands": {
|
|
4
4
|
"doctor": {
|
|
5
5
|
"id": "doctor",
|
|
@@ -190,6 +190,10 @@
|
|
|
190
190
|
"description": "Type of database scripts",
|
|
191
191
|
"required": true,
|
|
192
192
|
"options": [
|
|
193
|
+
"schema",
|
|
194
|
+
"data",
|
|
195
|
+
"migration",
|
|
196
|
+
"extend",
|
|
193
197
|
"Schema",
|
|
194
198
|
"Data",
|
|
195
199
|
"Migration",
|