@adinsure-ops/ops-cli 5.0.0-rc3 → 5.0.0-rc5

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 CHANGED
@@ -1,20 +1,29 @@
1
1
  # Changelogs
2
2
 
3
- ## 5.0.0-rc1
4
3
 
5
- - bugfixes
6
- - security patching: the project was migrated to a new oclif framework from the old one
7
- - performace tuning
8
- - removal of the prepare-content command
4
+ ## 5.0.0-rc5: 2023-09-08
5
+
6
+ - Added --description flag to the log command
7
+
8
+ ## 5.0.0-rc4: 2023-09-05
9
+
10
+ - Added --keep flag to the download:studio command
11
+
12
+ ## 5.0.0-rc3: 2023-09-01
13
+
14
+ - Bugfixes
15
+ - Security patching: the project was migrated to a new oclif framework from the old one
16
+ - Performace tuning
17
+ - [DEPRECATED] Deprecation and removal of the prepare-content command
9
18
 
10
19
  ## 4.8.3: 2023-08-22
11
20
 
12
- - bugfixes; sql command was fixed so that even when Extend was not used it required its parameters
13
- - security patches in library dependencies
21
+ - Bugfixes; sql command was fixed so that even when Extend was not used it required its parameters
22
+ - Security patches in library dependencies
14
23
 
15
24
  ## 4.8.2: 2023-07-28
16
25
 
17
- - sql command can now generate a template for mssql and oracle, for extending an sql table with a column
26
+ - Sql command can now generate a template for mssql and oracle, for extending an sql table with a column
18
27
 
19
28
  ## 4.8.1: 2023-06-01
20
29
 
@@ -30,45 +39,45 @@
30
39
 
31
40
  ## 4.7.0: 2023-03-22
32
41
 
33
- - fixed bug in `download:studio` when flag `-i` was always required in case we used `-o` flag
34
- - download of signalr is now also supported
35
- - improved description for download topic, it now displays information on downloading individual components
36
- - update command is no longer supported. Instead the update available warning provides information on available update options
42
+ - Fixed bug in `download:studio` when flag `-i` was always required in case we used `-o` flag
43
+ - Download of signalr is now also supported
44
+ - Improved description for download topic, it now displays information on downloading individual components
45
+ - Update command is no longer supported. Instead the update available warning provides information on available update options
37
46
 
38
47
  ## 4.6.0: 2023-02-15
39
48
 
40
- - doctor no longer checks for `vsts-npm-auth` package
41
- - when installing studio you can pass parameter `s` to skip installation in case the selected version is already installed
49
+ - Doctor no longer checks for `vsts-npm-auth` package
50
+ - When installing studio you can pass parameter `s` to skip installation in case the selected version is already installed
42
51
 
43
52
  ## 4.5.2: 2023-01-12
44
53
 
45
- - limit description length for sql scripts
54
+ - Limit description length for sql scripts
46
55
 
47
56
  ## 4.5.1: 2022-12-13
48
57
 
49
- - fixed release version for windows and linux packages
58
+ - Fixed release version for windows and linux packages
50
59
 
51
60
  ## 4.5.0: 2022-10-05
52
61
 
53
- - add `--major` flag for sql script generation
54
- - add `SQL_SCRIPT_VERSION` to force script generation
62
+ - Add `--major` flag for sql script generation
63
+ - Add `SQL_SCRIPT_VERSION` to force script generation
55
64
 
56
65
  ## 4.4.0: 2022-10-03
57
66
 
58
- - added parameters for offline sql script creation
59
- - ability to recover from prerelease tag when creating db scripts
67
+ - Added parameters for offline sql script creation
68
+ - Ability to recover from prerelease tag when creating db scripts
60
69
 
61
70
  ## 4.3.0: 2022-07-27
62
71
 
63
- - added command `npm:dependency-update` to update dependencies on packages in workspace defined by filter
64
- - added command `nuget:dependency-update` to update dependencies on packages in workspace defined by filter
65
- - improve error handling in translation fetching
66
- - improve warning output when npm publish fails
72
+ - Added command `npm:dependency-update` to update dependencies on packages in workspace defined by filter
73
+ - Added command `nuget:dependency-update` to update dependencies on packages in workspace defined by filter
74
+ - Improve error handling in translation fetching
75
+ - Improve warning output when npm publish fails
67
76
 
68
77
  ## 4.2.0: 2022-07-15
69
78
 
70
- - added command `gitlab:get-tag-pipeline` to track pipeline status and wait for pipeline to finish
71
- - added `--outputVersionOnly` to `gitlab:next-nightly-tag` to output only version
79
+ - Added command `gitlab:get-tag-pipeline` to track pipeline status and wait for pipeline to finish
80
+ - Added `--outputVersionOnly` to `gitlab:next-nightly-tag` to output only version
72
81
 
73
82
  ## 4.1.0: 2022-06-15
74
83
 
@@ -76,55 +85,55 @@
76
85
 
77
86
  ## 4.0.0: 2021-05-31
78
87
 
79
- - new auth options
88
+ - New auth options
80
89
  - [DEPRECATED] `--servicePrincipal` login is no longer available or required. 'AZURE_CLIENT_ID' and 'AZURE_CLIENT_SECRET' environment variables are required with every command in order to use service principal.
81
90
 
82
91
  ## 3.9.0: 2021-05-30
83
92
 
84
- - additional options for translations output filename
93
+ - Additional options for translations output filename
85
94
 
86
95
  ## 3.8.1: 2021-05-17
87
96
 
88
- - fix GitLab next nightly tag when tags with `test` and `qa` annotation exists
97
+ - Fix GitLab next nightly tag when tags with `test` and `qa` annotation exists
89
98
 
90
99
  ## 3.8.0: 2021-05-05
91
100
 
92
- - added GitLab next nightly tag
101
+ - Added GitLab next nightly tag
93
102
 
94
103
  ## 3.7.0: 2021-04-28
95
104
 
96
- - added download commands for AdInsure Server, Client, IdentityServer and Scheduler
105
+ - Added download commands for AdInsure Server, Client, IdentityServer and Scheduler
97
106
 
98
107
  ## 3.6.1: 2021-12-02
99
108
 
100
- - improve workspace search pattern for npm publish
109
+ - Improve workspace search pattern for npm publish
101
110
 
102
111
  ## 3.6.0: 2021-11-30
103
112
 
104
- - add ability to transform files with prepare-content
113
+ - Add ability to transform files with prepare-content
105
114
 
106
115
  ## 3.5.0: 2021-11-24
107
116
 
108
- - renaming prepare-content command
117
+ - Renaming prepare-content command
109
118
 
110
119
  ## 3.4.0: 2021-10-24
111
120
 
112
- - added Jira command for listing labels and setting them
113
- - added Jira command for listing issue
121
+ - Added Jira command for listing labels and setting them
122
+ - Added Jira command for listing issue
114
123
 
115
124
  ## 3.3.1: 2021-10-16
116
125
 
117
- - exclude should be optional for npm:publish
126
+ - Exclude should be optional for npm:publish
118
127
 
119
128
  ## 3.3.0: 2021-10-14
120
129
 
121
- - introduced npm check command
122
- - introcuced npm publish command
123
- - introduced doctor command
124
- - introduced download:platform and download:studio command
130
+ - Introduced npm check command
131
+ - Introcuced npm publish command
132
+ - Introduced doctor command
133
+ - Introduced download:platform and download:studio command
125
134
 
126
135
  ## 3.2.4: 2021-10-09
127
136
 
128
- - ignore VERSION file when using 'new' command
137
+ - Ignore VERSION file when using 'new' command
129
138
  - Unexpected token in JSON files should not stop execution
130
- - introduce `--exclude-dir` parameter for `version` command
139
+ - Introduce `--exclude-dir` parameter for `version` command
package/LICENSE CHANGED
@@ -1 +1 @@
1
- (c) Copyright 2021 Adacta d.o.o., all rights reserved.
1
+ (c) Copyright 2023 Adacta d.o.o., all rights reserved.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Operations CLI for supporting AdInsure development processes.
4
4
 
5
- https://www.npmjs.com/package/@adinsure-ops/ops-cli
5
+ <https://www.npmjs.com/package/@adinsure-ops/ops-cli>
6
6
 
7
7
  ## Install
8
8
 
@@ -10,7 +10,7 @@ https://www.npmjs.com/package/@adinsure-ops/ops-cli
10
10
 
11
11
  ## CLI development
12
12
 
13
- For development you will need **[Node.js](https://nodejs.org/en/)** (recommended 16 LTS, minimal 8.0.0) and **[Yarn](https://yarnpkg.com/en/)** installed.
13
+ For development you will need **[Node.js](https://nodejs.org/en/)** (recommended 16 LTS, minimal 14.0.0) and **[Yarn](https://yarnpkg.com/en/)** installed.
14
14
 
15
15
  We recommend **[Visual Studio Code](https://code.visualstudio.com/)** IDE.
16
16
 
@@ -26,30 +26,30 @@ You can run and debug commands directly from terminal by running `ops [command]`
26
26
  ## Commands
27
27
 
28
28
  <!-- commands -->
29
- - [`ops help [COMMAND]`](##ops-help-command)
30
- - [`ops doctor`](##ops-doctor)
31
- - [`ops download:client <flags>`](##ops-download:client-<flags>)
32
- - [`ops download:identity-server <flags>`](##ops-download:identity-server-<flags>)
33
- - [`ops download:platform <flags>`](##ops-download:platform-<flags>)
34
- - [`ops download:scheduler <flags>`](##ops-download:scheduler-<flags>)
35
- - [`ops download:server <flags>`](##ops-download:server-<flags>)
36
- - [`ops download:signalr <flags>`](##ops-download:signalr-<flags>)
37
- - [`ops download:studio <flags>`](##ops-download:studio-<flags>)
38
- - [`ops download:keycloak-scim <flags>`](##ops-download:keycloak-scim-<flags>)
39
- - [`ops download:jmeter-examples <flags>`](##ops-download:studio-<flags>)
40
- - [`ops gitlab:get-tag-pipeline`](##ops-gitlab:get-tag-pipeline)
41
- - [`ops gitlab:next-nightly-tag`](##ops-gitlab:next-nightly-tag)
42
- - [`ops log <component> <issue> [options]`](##ops-log-<component>-<issue>-[options])
43
- - [`ops log:gen [options]`](##ops-log:gen-[options])
44
- - [`ops log:validate [options]`](##ops-log:validate-[options])
45
- - [`ops login`](##ops-login)
46
- - [`ops npm:check-publish`](##ops-npm:check-publish)
47
- - [`ops npm:publish`](##ops-npm:publish)
48
- - [`ops npm:dependency-update`](##ops-npm:dependency-update)
49
- - [`ops nuget:dependency-update`](##ops-nuget:dependency-update)
50
- - [`ops sql <type> <module> [flags]`](##ops-sql-<type>-<module>-[flags])
51
- - [`ops translate`](##ops-translate)
52
- - [`ops version <type> [flags]`](##ops-version-<type>[flags])
29
+ - [`ops help [COMMAND]`](#ops-help-command)
30
+ - [`ops doctor`](#ops-doctor)
31
+ - [`ops download:client <flags>`](#ops-downloadclient-flags)
32
+ - [`ops download:identity-server <flags>`](#ops-downloadidentity-server-flags)
33
+ - [`ops download:platform <flags>`](#ops-downloadplatform-flags)
34
+ - [`ops download:scheduler <flags>`](#ops-downloadscheduler-flags)
35
+ - [`ops download:server <flags>`](#ops-downloadserver-flags)
36
+ - [`ops download:signalr <flags>`](#ops-downloadsignalr-flags)
37
+ - [`ops download:studio <flags>`](#ops-downloadstudio-flags)
38
+ - [`ops download:keycloak-scim <flags>`](#ops-downloadkeycloak-scim-flags)
39
+ - [`ops download:jmeter-examples <flags>`](#ops-downloadstudio-flags)
40
+ - [`ops gitlab:get-tag-pipeline`](#ops-gitlabget-tag-pipeline)
41
+ - [`ops gitlab:next-nightly-tag`](#ops-gitlabnext-nightly-tag)
42
+ - [`ops log <issue> -t <type> -c [component]`](#ops-log-issue-t-type-c-component)
43
+ - [`ops log:gen [options]`](#ops-loggen-options)
44
+ - [`ops log:validate [options]`](#ops-logvalidate-options)
45
+ - [`ops login`](#ops-login)
46
+ - [`ops npm:check-publish`](#ops-npmcheck-publish)
47
+ - [`ops npm:publish`](#ops-npmpublish)
48
+ - [`ops npm:dependency-update`](#ops-npmdependency-update)
49
+ - [`ops nuget:dependency-update`](#ops-nugetdependency-update)
50
+ - [`ops sql <type> <module> [flags]`](#ops-sql-type-module-flags)
51
+ - [`ops translate`](#ops-translate)
52
+ - [`ops version <type> [flags]`](#ops-version-type)
53
53
 
54
54
  ## `ops help [COMMAND]`
55
55
 
@@ -66,7 +66,7 @@ OPTIONS
66
66
  --all see all commands in CLI
67
67
  ```
68
68
 
69
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.0/src\commands\help.ts)_
69
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.0/src/commands/help.ts)_
70
70
 
71
71
  ## `ops doctor`
72
72
 
@@ -191,6 +191,7 @@ USAGE
191
191
  $ ops download:studio <flags>
192
192
 
193
193
  OPTIONS
194
+ -k, --keep only with install. If passed, it will not remove the vsix file
194
195
  -i, --install install plugin to vscode. save to temp folder and remove vsix after.
195
196
  -o, --output=output [default: ./] output directory
196
197
  -s, --skip only with install. If passed, and desired version is installed it will skip it.
@@ -332,6 +333,7 @@ ARGUMENTS
332
333
  OPTIONS
333
334
  -c, --component=component Component for which new changelog should be generated
334
335
  -t, --type=feature|fixed|improve|breaking (required) type of changelog
336
+ -d, --description=description Description of a changelog
335
337
 
336
338
  ALIASES
337
339
  $ ops log
@@ -341,6 +343,7 @@ EXAMPLES
341
343
  $ ops log LJADIRD-1234 -t feature
342
344
  $ ops log LJADIRD-5678 -t fixed
343
345
  $ ops log LJADIRD-8765 -t breaking -c Platform
346
+ $ ops log LJADIRD-5678 -t fixed -d "Fixed my bug"
344
347
  $ ops log LJADIRD-4321 -t improve -c Configuration
345
348
  ```
346
349
 
@@ -530,15 +533,15 @@ EXAMPLES
530
533
  - _new-version_ allows setting own version regardles of VERSION file. **Incrementing NPM version separately is not supported in this case. NPM packages are also bumped to specified version.**
531
534
 
532
535
  > Prerelease Note: Prerelease should only be user in **master** branch.
533
-
536
+ \\
534
537
  > Patch Note: Patch is used on **release/x.x** branches for creating patch releases
535
538
  > When creating new **release/x.x** branch 2 steps are needed:
536
539
  >
537
540
  > - creating _patch_ version on **release/x.x** branch
538
541
  > - creating _preminor_ or _premajor_ version on **master** branch
539
-
542
+ \\
540
543
  > Dependencies for packages are updated on all package.json files. If prerelease version in specified full version is specified (example: 4.0.0-201911.0), or if non prerelease version ends with x (example: 3.5.x)
541
-
544
+ \\
542
545
  > NPM packages node: For npm package to update properly _wsrun-version_ preset needs to be in _scripts_ portion of _package.json_. (example: `"wsrun-version": "yarn wsrun -p @adinsure-tools/* -p @adinsure/* -c"`)
543
546
 
544
547
  ## `ops sql <type> <module> [flags]`
@@ -560,7 +563,7 @@ OPTIONS
560
563
  -o, --offline generate database script with timestamp
561
564
  -v, --version=version version for which you're generating database script
562
565
 
563
- // when using the Extend datascript type to add a new column (column-name, column-type) to the table (table-name in table-schema)
566
+ Extend type options for extending DBs:
564
567
  --table-schema table schema name
565
568
  --table-name table name
566
569
  --column-name new column's name
@@ -9,6 +9,7 @@ export default class DownloadStudio extends CommandBase<typeof DownloadStudio> {
9
9
  output: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
10
  install: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
11
11
  skip: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
12
+ keep: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
12
13
  };
13
14
  private readonly url;
14
15
  /**
@@ -56,8 +56,15 @@ class DownloadStudio extends CommandBase {
56
56
  this.log(`The ${studioVersion} already exists. Skipping install.`);
57
57
  return 0;
58
58
  }
59
- ux.action.start(`Downloading AdInsure Studio version ${flags.version} to ${filePath}`, undefined, { stdout: true });
60
59
  try {
60
+ const alreadyDownloaded = yield fs.pathExists(filePath);
61
+ if (alreadyDownloaded && flags.install) {
62
+ ux.action.start(`Installing already downloaded AdInsure Studio version ${flags.version} from ${filePath}`, undefined, { stdout: true });
63
+ yield this.installExtension(filePath);
64
+ ux.action.stop(`${chalk.green('Done')}`);
65
+ return;
66
+ }
67
+ ux.action.start(`Downloading AdInsure Studio version ${flags.version} to ${filePath}`, undefined, { stdout: true });
61
68
  const file = yield this.downloadFile(flags.version);
62
69
  const writeStream = fs.createWriteStream(filePath);
63
70
  writeStream.write(file.data, 'binary');
@@ -67,8 +74,10 @@ class DownloadStudio extends CommandBase {
67
74
  ux.action.start(`Installing into VSCode`, undefined, { stdout: true });
68
75
  yield this.installExtension(filePath);
69
76
  ux.action.stop(`${chalk.green('Done')}`);
70
- ux.action.start(`Removing VSIX file`, undefined, { stdout: true });
71
- fs.removeSync(filePath);
77
+ if (!flags.keep) {
78
+ ux.action.start(`Removing VSIX file`, undefined, { stdout: true });
79
+ fs.removeSync(filePath);
80
+ }
72
81
  ux.action.stop(`${chalk.green('Done')}`);
73
82
  this.log(`${chalk.yellow('Use \'CRTL + SHIFT + P\' and select reload windows to apply this studio version.')}`);
74
83
  }
@@ -100,6 +109,7 @@ DownloadStudio.examples = [
100
109
  `$ ops download:studio -v 15.0.0 -o ~/Downloads`,
101
110
  `$ ops download:studio -v 15.0.0 -i`,
102
111
  `$ ops download:studio -v 15.0.0 -i -s`,
112
+ `$ ops download:studio -v 15.0.0 -i -k`,
103
113
  ];
104
114
  DownloadStudio.flags = {
105
115
  version: Flags.string({
@@ -122,5 +132,10 @@ DownloadStudio.flags = {
122
132
  description: 'only with install. If passed, and desired version is installed it will skip it.',
123
133
  dependsOn: ['install'],
124
134
  }),
135
+ keep: Flags.boolean({
136
+ char: 'k',
137
+ description: 'only with install. If passed, it will not remove the vsix file.',
138
+ dependsOn: ['install'],
139
+ }),
125
140
  };
126
141
  export default DownloadStudio;
@@ -10,6 +10,7 @@ export default class Changelog extends CommandBase<typeof Changelog> {
10
10
  static flags: {
11
11
  type: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
12
12
  component: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
13
+ description: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
13
14
  };
14
15
  run(): Promise<void>;
15
16
  }
@@ -54,7 +54,7 @@ class Changelog extends CommandBase {
54
54
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
55
55
  const responses = yield inquirer.prompt([{
56
56
  name: 'component',
57
- message: 'Multiple components found. Select a changelog componet',
57
+ message: 'Multiple components found. Select a changelog component',
58
58
  type: 'list',
59
59
  choices: possibleComponents,
60
60
  }]);
@@ -75,7 +75,7 @@ class Changelog extends CommandBase {
75
75
  issue: changelogIssue,
76
76
  type: changelogType,
77
77
  },
78
- content: 'Explain your changes here',
78
+ content: flags.description || 'Explain your changes here',
79
79
  };
80
80
  yield fs.writeFile(changelogPath, matter.stringify(entry.content, entry.meta));
81
81
  this.log(`Created changelog for ${changelogIssue} in '${changelogPath}'`);
@@ -108,5 +108,10 @@ Changelog.flags = {
108
108
  description: 'Component for which new changelog should be generated',
109
109
  default: '',
110
110
  }),
111
+ description: Flags.string({
112
+ char: 'd',
113
+ description: 'Description of a changelog',
114
+ default: '',
115
+ }),
111
116
  };
112
117
  export default Changelog;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.0.0-rc3",
2
+ "version": "5.0.0-rc5",
3
3
  "commands": {
4
4
  "doctor": {
5
5
  "id": "doctor",
@@ -634,7 +634,8 @@
634
634
  "examples": [
635
635
  "$ ops download:studio -v 15.0.0 -o ~/Downloads",
636
636
  "$ ops download:studio -v 15.0.0 -i",
637
- "$ ops download:studio -v 15.0.0 -i -s"
637
+ "$ ops download:studio -v 15.0.0 -i -s",
638
+ "$ ops download:studio -v 15.0.0 -i -k"
638
639
  ],
639
640
  "flags": {
640
641
  "version": {
@@ -669,6 +670,16 @@
669
670
  "dependsOn": [
670
671
  "install"
671
672
  ]
673
+ },
674
+ "keep": {
675
+ "name": "keep",
676
+ "type": "boolean",
677
+ "char": "k",
678
+ "description": "only with install. If passed, it will not remove the vsix file.",
679
+ "allowNo": false,
680
+ "dependsOn": [
681
+ "install"
682
+ ]
672
683
  }
673
684
  },
674
685
  "args": {}
@@ -941,6 +952,14 @@
941
952
  "description": "Component for which new changelog should be generated",
942
953
  "multiple": false,
943
954
  "default": ""
955
+ },
956
+ "description": {
957
+ "name": "description",
958
+ "type": "option",
959
+ "char": "d",
960
+ "description": "Description of a changelog",
961
+ "multiple": false,
962
+ "default": ""
944
963
  }
945
964
  },
946
965
  "args": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adinsure-ops/ops-cli",
3
3
  "description": "Operations CLI for working with AdInsure",
4
- "version": "5.0.0-rc3",
4
+ "version": "5.0.0-rc5",
5
5
  "author": "Adacta Digital Service Department",
6
6
  "bin": {
7
7
  "ops": "./bin/run.js"