@adinsure-ops/ops-cli 4.8.3 → 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 +52 -36
- package/LICENSE +1 -1
- package/README.md +32 -242
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +6 -0
- package/bin/run.cmd +1 -1
- package/bin/run.js +8 -0
- package/lib/command.base.d.ts +9 -5
- package/lib/command.base.jira.d.ts +7 -8
- package/lib/command.base.jira.js +26 -24
- package/lib/command.base.js +69 -57
- package/lib/commands/docker/update-image-version.d.ts +6 -9
- package/lib/commands/docker/update-image-version.js +35 -34
- package/lib/commands/doctor.d.ts +15 -5
- package/lib/commands/doctor.js +219 -186
- package/lib/commands/download/client.d.ts +10 -7
- package/lib/commands/download/client.js +60 -52
- package/lib/commands/download/identity-server.d.ts +9 -7
- package/lib/commands/download/identity-server.js +59 -53
- package/lib/commands/download/jmeter.d.ts +5 -5
- package/lib/commands/download/jmeter.js +54 -49
- package/lib/commands/download/keycloak-scim.d.ts +6 -6
- package/lib/commands/download/keycloak-scim.js +56 -51
- package/lib/commands/download/platform.d.ts +9 -7
- package/lib/commands/download/platform.js +59 -53
- package/lib/commands/download/scheduler.d.ts +9 -7
- package/lib/commands/download/scheduler.js +59 -53
- package/lib/commands/download/server.d.ts +9 -7
- package/lib/commands/download/server.js +59 -53
- package/lib/commands/download/signalr.d.ts +9 -7
- package/lib/commands/download/signalr.js +59 -53
- package/lib/commands/download/studio.d.ts +12 -9
- package/lib/commands/download/studio.js +107 -82
- package/lib/commands/gitlab/get-tag-pipeline.d.ts +11 -14
- package/lib/commands/gitlab/get-tag-pipeline.js +95 -92
- package/lib/commands/gitlab/next-nightly-tag.d.ts +10 -12
- package/lib/commands/gitlab/next-nightly-tag.js +96 -98
- package/lib/commands/jira/issue.d.ts +6 -8
- package/lib/commands/jira/issue.js +25 -23
- package/lib/commands/jira/labels.d.ts +9 -12
- package/lib/commands/jira/labels.js +52 -51
- package/lib/commands/log/add.d.ts +6 -8
- package/lib/commands/log/add.js +92 -87
- package/lib/commands/log/generate.d.ts +9 -10
- package/lib/commands/log/generate.js +112 -107
- package/lib/commands/log/validate.d.ts +2 -2
- package/lib/commands/log/validate.js +47 -43
- package/lib/commands/login.d.ts +9 -10
- package/lib/commands/login.js +101 -97
- package/lib/commands/npm/check-publish.d.ts +7 -8
- package/lib/commands/npm/check-publish.js +59 -54
- package/lib/commands/npm/dependency-update.d.ts +14 -12
- package/lib/commands/npm/dependency-update.js +94 -86
- package/lib/commands/npm/publish.d.ts +8 -9
- package/lib/commands/npm/publish.js +154 -140
- package/lib/commands/nuget/dependency-update.d.ts +15 -10
- package/lib/commands/nuget/dependency-update.js +60 -49
- package/lib/commands/sql.d.ts +24 -20
- package/lib/commands/sql.js +245 -226
- package/lib/commands/translate.d.ts +15 -16
- package/lib/commands/translate.js +109 -104
- package/lib/commands/version.d.ts +29 -19
- package/lib/commands/version.js +215 -190
- package/lib/config.js +3 -6
- package/lib/hooks/init/version-override.d.ts +2 -2
- package/lib/hooks/init/version-override.js +15 -13
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -4
- package/lib/lib/command.d.ts +2 -0
- package/lib/lib/command.js +65 -58
- package/lib/lib/gitlab.d.ts +8 -2
- package/lib/lib/gitlab.js +94 -82
- package/lib/lib/npm.d.ts +7 -3
- package/lib/lib/npm.js +72 -60
- package/lib/lib/npmrc.d.ts +5 -0
- package/lib/lib/npmrc.js +20 -13
- package/lib/lib/nuget.d.ts +2 -0
- package/lib/lib/nuget.js +20 -17
- package/lib/security/cache.js +31 -27
- package/lib/security/context.d.ts +2 -1
- package/lib/security/context.js +106 -103
- package/lib/types/changelog.types.js +1 -2
- package/lib/types/npm.types.d.ts +5 -5
- package/lib/types/npm.types.js +1 -2
- package/oclif.manifest.json +1223 -1
- package/package.json +50 -46
- package/bin/run +0 -5
- package/lib/commands/prepare-content.d.ts +0 -29
- package/lib/commands/prepare-content.js +0 -386
package/CHANGELOGS.md
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
# Changelogs
|
|
2
2
|
|
|
3
|
+
## 5.0.0-rc4: 2023-09-05
|
|
4
|
+
|
|
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
|
|
13
|
+
|
|
14
|
+
## 4.8.3: 2023-08-22
|
|
15
|
+
|
|
16
|
+
- Bugfixes; sql command was fixed so that even when Extend was not used it required its parameters
|
|
17
|
+
- Security patches in library dependencies
|
|
18
|
+
|
|
3
19
|
## 4.8.2: 2023-07-28
|
|
4
20
|
|
|
5
|
-
-
|
|
21
|
+
- Sql command can now generate a template for mssql and oracle, for extending an sql table with a column
|
|
6
22
|
|
|
7
23
|
## 4.8.1: 2023-06-01
|
|
8
24
|
|
|
@@ -18,45 +34,45 @@
|
|
|
18
34
|
|
|
19
35
|
## 4.7.0: 2023-03-22
|
|
20
36
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
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
|
|
25
41
|
|
|
26
42
|
## 4.6.0: 2023-02-15
|
|
27
43
|
|
|
28
|
-
-
|
|
29
|
-
-
|
|
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
|
|
30
46
|
|
|
31
47
|
## 4.5.2: 2023-01-12
|
|
32
48
|
|
|
33
|
-
-
|
|
49
|
+
- Limit description length for sql scripts
|
|
34
50
|
|
|
35
51
|
## 4.5.1: 2022-12-13
|
|
36
52
|
|
|
37
|
-
-
|
|
53
|
+
- Fixed release version for windows and linux packages
|
|
38
54
|
|
|
39
55
|
## 4.5.0: 2022-10-05
|
|
40
56
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
57
|
+
- Add `--major` flag for sql script generation
|
|
58
|
+
- Add `SQL_SCRIPT_VERSION` to force script generation
|
|
43
59
|
|
|
44
60
|
## 4.4.0: 2022-10-03
|
|
45
61
|
|
|
46
|
-
-
|
|
47
|
-
-
|
|
62
|
+
- Added parameters for offline sql script creation
|
|
63
|
+
- Ability to recover from prerelease tag when creating db scripts
|
|
48
64
|
|
|
49
65
|
## 4.3.0: 2022-07-27
|
|
50
66
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
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
|
|
55
71
|
|
|
56
72
|
## 4.2.0: 2022-07-15
|
|
57
73
|
|
|
58
|
-
-
|
|
59
|
-
-
|
|
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
|
|
60
76
|
|
|
61
77
|
## 4.1.0: 2022-06-15
|
|
62
78
|
|
|
@@ -64,55 +80,55 @@
|
|
|
64
80
|
|
|
65
81
|
## 4.0.0: 2021-05-31
|
|
66
82
|
|
|
67
|
-
-
|
|
83
|
+
- New auth options
|
|
68
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.
|
|
69
85
|
|
|
70
86
|
## 3.9.0: 2021-05-30
|
|
71
87
|
|
|
72
|
-
-
|
|
88
|
+
- Additional options for translations output filename
|
|
73
89
|
|
|
74
90
|
## 3.8.1: 2021-05-17
|
|
75
91
|
|
|
76
|
-
-
|
|
92
|
+
- Fix GitLab next nightly tag when tags with `test` and `qa` annotation exists
|
|
77
93
|
|
|
78
94
|
## 3.8.0: 2021-05-05
|
|
79
95
|
|
|
80
|
-
-
|
|
96
|
+
- Added GitLab next nightly tag
|
|
81
97
|
|
|
82
98
|
## 3.7.0: 2021-04-28
|
|
83
99
|
|
|
84
|
-
-
|
|
100
|
+
- Added download commands for AdInsure Server, Client, IdentityServer and Scheduler
|
|
85
101
|
|
|
86
102
|
## 3.6.1: 2021-12-02
|
|
87
103
|
|
|
88
|
-
-
|
|
104
|
+
- Improve workspace search pattern for npm publish
|
|
89
105
|
|
|
90
106
|
## 3.6.0: 2021-11-30
|
|
91
107
|
|
|
92
|
-
-
|
|
108
|
+
- Add ability to transform files with prepare-content
|
|
93
109
|
|
|
94
110
|
## 3.5.0: 2021-11-24
|
|
95
111
|
|
|
96
|
-
-
|
|
112
|
+
- Renaming prepare-content command
|
|
97
113
|
|
|
98
114
|
## 3.4.0: 2021-10-24
|
|
99
115
|
|
|
100
|
-
-
|
|
101
|
-
-
|
|
116
|
+
- Added Jira command for listing labels and setting them
|
|
117
|
+
- Added Jira command for listing issue
|
|
102
118
|
|
|
103
119
|
## 3.3.1: 2021-10-16
|
|
104
120
|
|
|
105
|
-
-
|
|
121
|
+
- Exclude should be optional for npm:publish
|
|
106
122
|
|
|
107
123
|
## 3.3.0: 2021-10-14
|
|
108
124
|
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
125
|
+
- Introduced npm check command
|
|
126
|
+
- Introcuced npm publish command
|
|
127
|
+
- Introduced doctor command
|
|
128
|
+
- Introduced download:platform and download:studio command
|
|
113
129
|
|
|
114
130
|
## 3.2.4: 2021-10-09
|
|
115
131
|
|
|
116
|
-
-
|
|
132
|
+
- Ignore VERSION file when using 'new' command
|
|
117
133
|
- Unexpected token in JSON files should not stop execution
|
|
118
|
-
-
|
|
134
|
+
- Introduce `--exclude-dir` parameter for `version` command
|
package/LICENSE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(c) Copyright
|
|
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
|
|
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,31 +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]`](
|
|
30
|
-
- [`ops doctor`](
|
|
31
|
-
- [`ops download:client <flags>`](
|
|
32
|
-
- [`ops download:identity-server <flags>`](
|
|
33
|
-
- [`ops download:platform <flags>`](
|
|
34
|
-
- [`ops download:scheduler <flags>`](
|
|
35
|
-
- [`ops download:server <flags>`](
|
|
36
|
-
- [`ops download:signalr <flags>`](
|
|
37
|
-
- [`ops download:studio <flags>`](
|
|
38
|
-
- [`ops download:keycloak-scim <flags>`](
|
|
39
|
-
- [`ops download:jmeter-examples <flags>`](
|
|
40
|
-
- [`ops gitlab:get-tag-pipeline`](
|
|
41
|
-
- [`ops gitlab:next-nightly-tag`](
|
|
42
|
-
- [`ops log <
|
|
43
|
-
- [`ops log:gen [options]`](
|
|
44
|
-
- [`ops log:validate [options]`](
|
|
45
|
-
- [`ops login`](
|
|
46
|
-
- [`ops npm:check-publish`](
|
|
47
|
-
- [`ops npm:publish`](
|
|
48
|
-
- [`ops npm:dependency-update`](
|
|
49
|
-
- [`ops nuget:dependency-update`](
|
|
50
|
-
- [`ops
|
|
51
|
-
- [`ops
|
|
52
|
-
- [`ops
|
|
53
|
-
- [`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)
|
|
54
53
|
|
|
55
54
|
## `ops help [COMMAND]`
|
|
56
55
|
|
|
@@ -67,7 +66,7 @@ OPTIONS
|
|
|
67
66
|
--all see all commands in CLI
|
|
68
67
|
```
|
|
69
68
|
|
|
70
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.0/src
|
|
69
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.0/src/commands/help.ts)_
|
|
71
70
|
|
|
72
71
|
## `ops doctor`
|
|
73
72
|
|
|
@@ -192,6 +191,7 @@ USAGE
|
|
|
192
191
|
$ ops download:studio <flags>
|
|
193
192
|
|
|
194
193
|
OPTIONS
|
|
194
|
+
-k, --keep only with install. If passed, it will not remove the vsix file
|
|
195
195
|
-i, --install install plugin to vscode. save to temp folder and remove vsix after.
|
|
196
196
|
-o, --output=output [default: ./] output directory
|
|
197
197
|
-s, --skip only with install. If passed, and desired version is installed it will skip it.
|
|
@@ -487,216 +487,6 @@ EXAMPLE
|
|
|
487
487
|
$ ops nuget:dependency-update 3.4.3 --filter Adacta.AdInsure --exclude Scheduler
|
|
488
488
|
```
|
|
489
489
|
|
|
490
|
-
## `ops prepare-content -d <destination> -s [source]`
|
|
491
|
-
|
|
492
|
-
creates a directory/file structure from `/source` to `/destination</source>` as defined in the `.opsprepare` file. Actual
|
|
493
|
-
destination path for each file will be specified destination path with appended relative path from working directory where command is executed to specified source directory or current directory (if source is not specified). Be careful about using
|
|
494
|
-
`..` notation in target and source paths as it may lead to unpredictable results due to relative path resolving.
|
|
495
|
-
|
|
496
|
-
> Introduced in version 3.1.0.
|
|
497
|
-
|
|
498
|
-
```txt
|
|
499
|
-
USAGE
|
|
500
|
-
$ ops prepare-content -d <destination> -s [source]
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
OPTIONS
|
|
504
|
-
-d, --destination=destination path to target directory
|
|
505
|
-
-s, --source=source optional path to source directory containing .opsprepare file, (default: current directory)
|
|
506
|
-
|
|
507
|
-
EXAMPLES
|
|
508
|
-
$ ops prepare-content -d ./target_directory/
|
|
509
|
-
copies everything defined in .opsprepare
|
|
510
|
-
from current directory
|
|
511
|
-
to ./target_directory
|
|
512
|
-
|
|
513
|
-
$ ops prepare-content -d ./target_directory/ -s ./source_directory
|
|
514
|
-
copies everything defined in ./source_directory/.opsprepare
|
|
515
|
-
from ./source_directory/
|
|
516
|
-
to ./target_directory/source_directory
|
|
517
|
-
|
|
518
|
-
$ ops prepare-content -d C:\git\target_directory
|
|
519
|
-
copies everything defined in .opsprepare
|
|
520
|
-
from current directory
|
|
521
|
-
to C:\git\target_directory
|
|
522
|
-
|
|
523
|
-
$ ops prepare-content -d C:\git\target_directory -s C:\git\subfolder\subfolder
|
|
524
|
-
when executed in c:\git it copies everything defined in C:\git\subfolder\subfolder\.opsprepare
|
|
525
|
-
from C:\git\subfolder\subfolder
|
|
526
|
-
to C:\git\target_directory\subfolder\subfolder
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
### .opsprepare dotfile
|
|
530
|
-
|
|
531
|
-
The prepare-content command uses `.opsprepare` dotfile as instruction set for content preparation.
|
|
532
|
-
The syntax resembles that of `.gitignore` but differs in how it functions and doesn't support advanced
|
|
533
|
-
pattern matching.
|
|
534
|
-
|
|
535
|
-
Following operations/transformations are currently supported:
|
|
536
|
-
|
|
537
|
-
- Copy: copies the file/directory from source path to destination path with same name
|
|
538
|
-
- Transform: transform source file to destination file with same name
|
|
539
|
-
- Removal: remove file/directory (based on source path) from destination path
|
|
540
|
-
|
|
541
|
-
Before diving into the actual syntax and supported tokens let's look at an example
|
|
542
|
-
of how using `ops prepare-content` creates a target directory structure with files
|
|
543
|
-
based on the specified `.opsprepare` file residing in source directory.
|
|
544
|
-
|
|
545
|
-
This is the example source directory structure:
|
|
546
|
-
|
|
547
|
-
```ascii
|
|
548
|
-
src_data
|
|
549
|
-
├── .opsprepare
|
|
550
|
-
├── README.tpl
|
|
551
|
-
├── bin
|
|
552
|
-
│ ├── ops.sh
|
|
553
|
-
│ └── run
|
|
554
|
-
│ └── ops
|
|
555
|
-
├── dist
|
|
556
|
-
│ └── server
|
|
557
|
-
│ └── main.cs
|
|
558
|
-
├── src
|
|
559
|
-
│ ├── commands
|
|
560
|
-
│ │ ├── prepare.ts
|
|
561
|
-
│ │ └── version.ts
|
|
562
|
-
│ ├── config.ts
|
|
563
|
-
│ └── main.ts
|
|
564
|
-
└── transform
|
|
565
|
-
└── render-tpl.js
|
|
566
|
-
```
|
|
567
|
-
|
|
568
|
-
Contents of `.opsprepare` file in the `src_data` directory:
|
|
569
|
-
|
|
570
|
-
```txt
|
|
571
|
-
# Comment
|
|
572
|
-
src
|
|
573
|
-
dist/server
|
|
574
|
-
!src/commands
|
|
575
|
-
!src/config.ts
|
|
576
|
-
src/config.ts {cp:/src/configuration.ts}
|
|
577
|
-
# Another comment
|
|
578
|
-
!bin/run
|
|
579
|
-
README.md {js:/transform/render-tpl.js:render}
|
|
580
|
-
README.tpl {cp:/README.tpl.src}
|
|
581
|
-
```
|
|
582
|
-
|
|
583
|
-
Running `ops -s src_data -d dst_data` with `src_data/.opsprepare` containing above content
|
|
584
|
-
results in:
|
|
585
|
-
|
|
586
|
-
```ascii
|
|
587
|
-
dst_data
|
|
588
|
-
└── src_data
|
|
589
|
-
├── README.md
|
|
590
|
-
├── README.tpl.src
|
|
591
|
-
├── dist
|
|
592
|
-
│ └── server
|
|
593
|
-
│ └── main.cs
|
|
594
|
-
└── src
|
|
595
|
-
├── main.ts
|
|
596
|
-
└── src
|
|
597
|
-
└── configuration.ts
|
|
598
|
-
```
|
|
599
|
-
|
|
600
|
-
What actually happened:
|
|
601
|
-
|
|
602
|
-
1. First note that all data was copied into `dst_data/src_data` because `.opsprepare` files relative
|
|
603
|
-
location to `ops` execution directiory is `src_data`.
|
|
604
|
-
2. `src` directory was copied recursively to destination
|
|
605
|
-
3. `dist/server` directory was copied recursively including its full path path relative to `src_data`
|
|
606
|
-
4. `src/config.ts` file was transformed (copied) to `src/configuration.ts` in the destination
|
|
607
|
-
5. `README.md` file was created at the destination as a result of JavaScript based transformation
|
|
608
|
-
6. `README.tpl` file was transformed (copied) to `README.tpl.src` in the destination
|
|
609
|
-
7. `src/commands` directory was removed from destination
|
|
610
|
-
8. `src/config.ts` file was removed from destination
|
|
611
|
-
9. `bin/run` directory was removed from destination
|
|
612
|
-
|
|
613
|
-
Note that copying and explicit transformations are performed before any removal operations.
|
|
614
|
-
|
|
615
|
-
#### Comments
|
|
616
|
-
|
|
617
|
-
Any line prefixed by `#` is considered a comment and will not result in any file/directory operation.
|
|
618
|
-
|
|
619
|
-
#### Copy operations
|
|
620
|
-
|
|
621
|
-
Any file/directory not prefixed by `!` or `#` having explicit transformation defined in `{...}` after
|
|
622
|
-
its name will be copied to the destination with it's full path relative to `ops` execution directory
|
|
623
|
-
to the target directory.
|
|
624
|
-
|
|
625
|
-
#### Transformation operations
|
|
626
|
-
|
|
627
|
-
Transformation operations are always specified using curly braces following the source file name. Base
|
|
628
|
-
syntax looks like this:
|
|
629
|
-
|
|
630
|
-
```txt
|
|
631
|
-
{<transformation type>:<transformation parameters>}
|
|
632
|
-
```
|
|
633
|
-
|
|
634
|
-
Two types of transformation operations are supported:
|
|
635
|
-
|
|
636
|
-
- cp: copy transformation which supports renaming of the source file at the destination
|
|
637
|
-
- js: JavasSript based transformation which results in the file containing string returned by the
|
|
638
|
-
transformation function contained in transformation module.
|
|
639
|
-
|
|
640
|
-
**cp - copy transformation syntax**
|
|
641
|
-
|
|
642
|
-
```txt
|
|
643
|
-
{cp:<destination path>}
|
|
644
|
-
|
|
645
|
-
Examples:
|
|
646
|
-
{cp:/dst/newfilename}
|
|
647
|
-
{cp:dst/newfilenames}
|
|
648
|
-
```
|
|
649
|
-
|
|
650
|
-
Copy transformation is supported for both files and directories. Source file or directory will be
|
|
651
|
-
copied to the destination path with its new name. The destination will always be relative to the
|
|
652
|
-
destination path of entire `prepare-content` operation therefore paths in the transformation block
|
|
653
|
-
can start with or without the `/` character but using makes the syntax more readable.
|
|
654
|
-
|
|
655
|
-
**js - JavaScript transformation syntax**
|
|
656
|
-
|
|
657
|
-
```txt
|
|
658
|
-
{js:<transformation_module_path>:<transformation_function_name>}
|
|
659
|
-
|
|
660
|
-
Example:
|
|
661
|
-
{js:/transformations/templateRenderer.js:renderEjsTemplate}
|
|
662
|
-
```
|
|
663
|
-
|
|
664
|
-
JavaScript transformation is supported only for files, not directories.
|
|
665
|
-
|
|
666
|
-
Transformation module path should be relative to `.opsprepare` file but can start with `/` character
|
|
667
|
-
for better readability. It can export multiple functions though only one can be used in single
|
|
668
|
-
transformation specification.
|
|
669
|
-
|
|
670
|
-
Transformation function that is defined in the transformation module will be called with a single
|
|
671
|
-
parameter - absolute path of the source file.
|
|
672
|
-
|
|
673
|
-
Transformation function MUST return a string. This string will become the content of the file on
|
|
674
|
-
destination.
|
|
675
|
-
|
|
676
|
-
Destination file will be created with the same name as source file and content returned by the
|
|
677
|
-
transformation function. The existence of actual source file will not be validated by the
|
|
678
|
-
`prepare-content` operation (warning is shown if it doesn't exist), such validation is responsibility
|
|
679
|
-
of the transformation function if required.
|
|
680
|
-
|
|
681
|
-
Example transformation module `transform.js` with exported function called transform:
|
|
682
|
-
|
|
683
|
-
```js
|
|
684
|
-
module.exports = {
|
|
685
|
-
render: (path) => {
|
|
686
|
-
/*
|
|
687
|
-
Some transformation happens in here and it's result which is
|
|
688
|
-
a string is assigned to result variable which is returned.
|
|
689
|
-
*/
|
|
690
|
-
return result;
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
```
|
|
694
|
-
|
|
695
|
-
#### Removal operations
|
|
696
|
-
|
|
697
|
-
Any file/directory prefixed by `!` will be removed from the destination based on it's full path
|
|
698
|
-
relative from `ops` execution directory to source file/directory path.
|
|
699
|
-
|
|
700
490
|
## `ops version <type>`
|
|
701
491
|
|
|
702
492
|
creates everything necessary for the new release
|
|
@@ -741,15 +531,15 @@ EXAMPLES
|
|
|
741
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.**
|
|
742
532
|
|
|
743
533
|
> Prerelease Note: Prerelease should only be user in **master** branch.
|
|
744
|
-
|
|
534
|
+
\\
|
|
745
535
|
> Patch Note: Patch is used on **release/x.x** branches for creating patch releases
|
|
746
536
|
> When creating new **release/x.x** branch 2 steps are needed:
|
|
747
537
|
>
|
|
748
538
|
> - creating _patch_ version on **release/x.x** branch
|
|
749
539
|
> - creating _preminor_ or _premajor_ version on **master** branch
|
|
750
|
-
|
|
540
|
+
\\
|
|
751
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)
|
|
752
|
-
|
|
542
|
+
\\
|
|
753
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"`)
|
|
754
544
|
|
|
755
545
|
## `ops sql <type> <module> [flags]`
|
|
@@ -771,7 +561,7 @@ OPTIONS
|
|
|
771
561
|
-o, --offline generate database script with timestamp
|
|
772
562
|
-v, --version=version version for which you're generating database script
|
|
773
563
|
|
|
774
|
-
|
|
564
|
+
Extend type options for extending DBs:
|
|
775
565
|
--table-schema table schema name
|
|
776
566
|
--table-name table name
|
|
777
567
|
--column-name new column's name
|
package/bin/dev.cmd
ADDED
package/bin/dev.js
ADDED
package/bin/run.cmd
CHANGED
package/bin/run.js
ADDED
package/lib/command.base.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { Command } from '@oclif/
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export default abstract class CommandBase extends Command {
|
|
1
|
+
import { Command, Config } from '@oclif/core';
|
|
2
|
+
import SecurityContext from './security/context.js';
|
|
3
|
+
export default abstract class CommandBase<T extends typeof Command> extends Command {
|
|
5
4
|
protected readonly security: SecurityContext;
|
|
6
|
-
constructor(argv: string[], config:
|
|
5
|
+
constructor(argv: string[], config: Config);
|
|
7
6
|
getGitRoot(startDir?: string): Promise<string>;
|
|
8
7
|
getVersion(versionFile?: string, ...filesToCheck: string[]): Promise<string>;
|
|
9
8
|
/**
|
|
10
9
|
* Resolve path to Changelog folder from current execution directory
|
|
10
|
+
* @returns {string} the resolved path to changelogs
|
|
11
11
|
*/
|
|
12
12
|
getChangelogsRoot(): Promise<string>;
|
|
13
13
|
/**
|
|
14
14
|
* Get all files inside directory and normalize it against {baseRelativePath}.
|
|
15
|
+
* @param {string} dir The name or path of the current directory
|
|
16
|
+
* @param {string} baseRelativePath The relatice path format from the `dir`
|
|
17
|
+
* @param {RegExp} filter Regular expressions filter for the file path
|
|
18
|
+
* @returns {string[]} An array of files inside the directory with the specified filter
|
|
15
19
|
*/
|
|
16
20
|
getFilesRecursive(dir: string, baseRelativePath: string, filter: RegExp): Promise<string[]>;
|
|
17
21
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export default abstract class CommandBaseJira extends CommandBase {
|
|
1
|
+
import JiraApi from 'jira-client';
|
|
2
|
+
import CommandBase from './command.base.js';
|
|
3
|
+
export default abstract class CommandBaseJira extends CommandBase<typeof CommandBaseJira> {
|
|
5
4
|
static flags: {
|
|
6
|
-
username:
|
|
7
|
-
password:
|
|
8
|
-
hostname:
|
|
5
|
+
username: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
6
|
+
password: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
7
|
+
hostname: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
9
8
|
};
|
|
10
|
-
jiraInit(
|
|
9
|
+
jiraInit(urlString: string, username: string, password: string): Promise<JiraApi>;
|
|
11
10
|
}
|
package/lib/command.base.jira.js
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class CommandBaseJira extends
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { __awaiter } from "tslib";
|
|
2
|
+
import { Flags } from '@oclif/core';
|
|
3
|
+
import JiraApi from 'jira-client';
|
|
4
|
+
import url from 'url';
|
|
5
|
+
import CommandBase from './command.base.js';
|
|
6
|
+
class CommandBaseJira extends CommandBase {
|
|
7
|
+
jiraInit(urlString, username, password) {
|
|
8
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
9
|
+
const jiraUrl = new url.URL(urlString);
|
|
10
|
+
const jira = new JiraApi({
|
|
11
|
+
protocol: jiraUrl.protocol,
|
|
12
|
+
host: jiraUrl.hostname,
|
|
13
|
+
username,
|
|
14
|
+
password,
|
|
15
|
+
apiVersion: '2',
|
|
16
|
+
strictSSL: true,
|
|
17
|
+
});
|
|
18
|
+
return jira;
|
|
16
19
|
});
|
|
17
|
-
return jira;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
|
-
exports.default = CommandBaseJira;
|
|
21
22
|
CommandBaseJira.flags = {
|
|
22
|
-
username:
|
|
23
|
+
username: Flags.string({
|
|
23
24
|
description: 'jira username',
|
|
24
25
|
env: 'JIRA_USERNAME',
|
|
25
|
-
required: true
|
|
26
|
+
required: true,
|
|
26
27
|
}),
|
|
27
|
-
password:
|
|
28
|
+
password: Flags.string({
|
|
28
29
|
description: 'jira password',
|
|
29
30
|
env: 'JIRA_PASSWORD',
|
|
30
|
-
required: true
|
|
31
|
+
required: true,
|
|
31
32
|
}),
|
|
32
|
-
hostname:
|
|
33
|
+
hostname: Flags.string({
|
|
33
34
|
description: 'jira hostname',
|
|
34
35
|
default: 'https://jira.adacta-fintech.com',
|
|
35
|
-
env: 'JIRA_HOSTNAME'
|
|
36
|
-
})
|
|
36
|
+
env: 'JIRA_HOSTNAME',
|
|
37
|
+
}),
|
|
37
38
|
};
|
|
39
|
+
export default CommandBaseJira;
|