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

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,24 @@
1
1
  # Changelogs
2
2
 
3
- ## 5.0.0-rc1
3
+ ## 5.0.0-rc4: 2023-09-05
4
4
 
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
5
+ - Added --keep flag to the download:studio command
6
+
7
+ ## 5.0.0-rc3: 2023-09-01
8
+
9
+ - Bugfixes
10
+ - Security patching: the project was migrated to a new oclif framework from the old one
11
+ - Performace tuning
12
+ - [DEPRECATED] Deprecation and removal of the prepare-content command
9
13
 
10
14
  ## 4.8.3: 2023-08-22
11
15
 
12
- - bugfixes; sql command was fixed so that even when Extend was not used it required its parameters
13
- - security patches in library dependencies
16
+ - Bugfixes; sql command was fixed so that even when Extend was not used it required its parameters
17
+ - Security patches in library dependencies
14
18
 
15
19
  ## 4.8.2: 2023-07-28
16
20
 
17
- - sql command can now generate a template for mssql and oracle, for extending an sql table with a column
21
+ - Sql command can now generate a template for mssql and oracle, for extending an sql table with a column
18
22
 
19
23
  ## 4.8.1: 2023-06-01
20
24
 
@@ -30,45 +34,45 @@
30
34
 
31
35
  ## 4.7.0: 2023-03-22
32
36
 
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
37
+ - Fixed bug in `download:studio` when flag `-i` was always required in case we used `-o` flag
38
+ - Download of signalr is now also supported
39
+ - Improved description for download topic, it now displays information on downloading individual components
40
+ - Update command is no longer supported. Instead the update available warning provides information on available update options
37
41
 
38
42
  ## 4.6.0: 2023-02-15
39
43
 
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
44
+ - Doctor no longer checks for `vsts-npm-auth` package
45
+ - When installing studio you can pass parameter `s` to skip installation in case the selected version is already installed
42
46
 
43
47
  ## 4.5.2: 2023-01-12
44
48
 
45
- - limit description length for sql scripts
49
+ - Limit description length for sql scripts
46
50
 
47
51
  ## 4.5.1: 2022-12-13
48
52
 
49
- - fixed release version for windows and linux packages
53
+ - Fixed release version for windows and linux packages
50
54
 
51
55
  ## 4.5.0: 2022-10-05
52
56
 
53
- - add `--major` flag for sql script generation
54
- - add `SQL_SCRIPT_VERSION` to force script generation
57
+ - Add `--major` flag for sql script generation
58
+ - Add `SQL_SCRIPT_VERSION` to force script generation
55
59
 
56
60
  ## 4.4.0: 2022-10-03
57
61
 
58
- - added parameters for offline sql script creation
59
- - ability to recover from prerelease tag when creating db scripts
62
+ - Added parameters for offline sql script creation
63
+ - Ability to recover from prerelease tag when creating db scripts
60
64
 
61
65
  ## 4.3.0: 2022-07-27
62
66
 
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
67
+ - Added command `npm:dependency-update` to update dependencies on packages in workspace defined by filter
68
+ - Added command `nuget:dependency-update` to update dependencies on packages in workspace defined by filter
69
+ - Improve error handling in translation fetching
70
+ - Improve warning output when npm publish fails
67
71
 
68
72
  ## 4.2.0: 2022-07-15
69
73
 
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
74
+ - Added command `gitlab:get-tag-pipeline` to track pipeline status and wait for pipeline to finish
75
+ - Added `--outputVersionOnly` to `gitlab:next-nightly-tag` to output only version
72
76
 
73
77
  ## 4.1.0: 2022-06-15
74
78
 
@@ -76,55 +80,55 @@
76
80
 
77
81
  ## 4.0.0: 2021-05-31
78
82
 
79
- - new auth options
83
+ - New auth options
80
84
  - [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
85
 
82
86
  ## 3.9.0: 2021-05-30
83
87
 
84
- - additional options for translations output filename
88
+ - Additional options for translations output filename
85
89
 
86
90
  ## 3.8.1: 2021-05-17
87
91
 
88
- - fix GitLab next nightly tag when tags with `test` and `qa` annotation exists
92
+ - Fix GitLab next nightly tag when tags with `test` and `qa` annotation exists
89
93
 
90
94
  ## 3.8.0: 2021-05-05
91
95
 
92
- - added GitLab next nightly tag
96
+ - Added GitLab next nightly tag
93
97
 
94
98
  ## 3.7.0: 2021-04-28
95
99
 
96
- - added download commands for AdInsure Server, Client, IdentityServer and Scheduler
100
+ - Added download commands for AdInsure Server, Client, IdentityServer and Scheduler
97
101
 
98
102
  ## 3.6.1: 2021-12-02
99
103
 
100
- - improve workspace search pattern for npm publish
104
+ - Improve workspace search pattern for npm publish
101
105
 
102
106
  ## 3.6.0: 2021-11-30
103
107
 
104
- - add ability to transform files with prepare-content
108
+ - Add ability to transform files with prepare-content
105
109
 
106
110
  ## 3.5.0: 2021-11-24
107
111
 
108
- - renaming prepare-content command
112
+ - Renaming prepare-content command
109
113
 
110
114
  ## 3.4.0: 2021-10-24
111
115
 
112
- - added Jira command for listing labels and setting them
113
- - added Jira command for listing issue
116
+ - Added Jira command for listing labels and setting them
117
+ - Added Jira command for listing issue
114
118
 
115
119
  ## 3.3.1: 2021-10-16
116
120
 
117
- - exclude should be optional for npm:publish
121
+ - Exclude should be optional for npm:publish
118
122
 
119
123
  ## 3.3.0: 2021-10-14
120
124
 
121
- - introduced npm check command
122
- - introcuced npm publish command
123
- - introduced doctor command
124
- - introduced download:platform and download:studio command
125
+ - Introduced npm check command
126
+ - Introcuced npm publish command
127
+ - Introduced doctor command
128
+ - Introduced download:platform and download:studio command
125
129
 
126
130
  ## 3.2.4: 2021-10-09
127
131
 
128
- - ignore VERSION file when using 'new' command
132
+ - Ignore VERSION file when using 'new' command
129
133
  - Unexpected token in JSON files should not stop execution
130
- - introduce `--exclude-dir` parameter for `version` command
134
+ - 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.
@@ -530,15 +531,15 @@ EXAMPLES
530
531
  - _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
532
 
532
533
  > Prerelease Note: Prerelease should only be user in **master** branch.
533
-
534
+ \\
534
535
  > Patch Note: Patch is used on **release/x.x** branches for creating patch releases
535
536
  > When creating new **release/x.x** branch 2 steps are needed:
536
537
  >
537
538
  > - creating _patch_ version on **release/x.x** branch
538
539
  > - creating _preminor_ or _premajor_ version on **master** branch
539
-
540
+ \\
540
541
  > 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
-
542
+ \\
542
543
  > 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
544
 
544
545
  ## `ops sql <type> <module> [flags]`
@@ -560,7 +561,7 @@ OPTIONS
560
561
  -o, --offline generate database script with timestamp
561
562
  -v, --version=version version for which you're generating database script
562
563
 
563
- // when using the Extend datascript type to add a new column (column-name, column-type) to the table (table-name in table-schema)
564
+ Extend type options for extending DBs:
564
565
  --table-schema table schema name
565
566
  --table-name table name
566
567
  --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;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.0.0-rc3",
2
+ "version": "5.0.0-rc4",
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": {}
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-rc4",
5
5
  "author": "Adacta Digital Service Department",
6
6
  "bin": {
7
7
  "ops": "./bin/run.js"