@adinsure-ops/ops-cli 4.7.0 → 4.8.1

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,5 +1,18 @@
1
1
  # Changelogs
2
2
 
3
+ ## next
4
+
5
+ ## 4.8.1: 2023-03-01
6
+
7
+ - Added --force option to login command, to forcefully replace the old auth token
8
+
9
+ ## 4.8.0: 2023-06-01
10
+
11
+ - VERSION files now don't need to be trimmed (they can have leading or trailing whitespace characters) in order for commands to read it properly
12
+ - Added two new commands (usage in README file):
13
+ - download:jmeter-examples
14
+ - download:keycloak-scim
15
+
3
16
  ## 4.7.0: 2023-03-22
4
17
 
5
18
  - fixed bug in `download:studio` when flag `-i` was always required in case we used `-o` flag
package/README.md CHANGED
@@ -26,35 +26,37 @@ 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 gitlab:get-tag-pipeline`](#ops-gitlab-get-tag-pipeline)
39
- * [`ops gitlab:next-nightly-tag`](#ops-gitlab-next-nightly-tag)
40
- * [`ops log <component> <issue> [options]`](#ops-log-component-issue-options)
41
- * [`ops log:gen [options]`](#ops-loggen-options)
42
- * [`ops log:validate [options]`](#ops-logvalidate-options)
43
- * [`ops login`](#ops-login)
44
- * [`ops npm:check-publish`](#ops-npm-check-publish)
45
- * [`ops npm:publish`](#ops-npm-publish)
46
- * [`ops npm:dependency-update`](#ops-npm-dependency-update)
47
- * [`ops nuget:dependency-update`](#ops-nuget-dependency-update)
48
- * [`ops prepare-content`](#ops-prepare-content)
49
- * [`ops sql <type> <module> [flags]`](#ops-sql-type-module-flags)
50
- * [`ops translate`](#ops-translate)
51
- * [`ops version <type> [flags]`](#ops-version)
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 prepare-content`](##ops-prepare-content)
51
+ - [`ops sql <type> <module> [flags]`](##ops-sql-<type>-<module>-[flags])
52
+ - [`ops translate`](##ops-translate)
53
+ - [`ops version <type> [flags]`](##ops-version-<type>[flags])
52
54
 
53
55
  ## `ops help [COMMAND]`
54
56
 
55
57
  display help for ops
56
58
 
57
- ```
59
+ ```txt
58
60
  USAGE
59
61
  $ ops help [COMMAND]
60
62
 
@@ -67,12 +69,11 @@ OPTIONS
67
69
 
68
70
  _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.0/src\commands\help.ts)_
69
71
 
70
-
71
72
  ## `ops doctor`
72
73
 
73
74
  check if everyting is installed
74
75
 
75
- ```
76
+ ```txt
76
77
  USAGE
77
78
  $ ops doctor
78
79
 
@@ -87,7 +88,7 @@ EXAMPLE
87
88
 
88
89
  download AdInsure Client zip from Azure storage
89
90
 
90
- ```
91
+ ```txt
91
92
  USAGE
92
93
  $ ops download:client <flags>
93
94
 
@@ -103,7 +104,7 @@ EXAMPLE
103
104
 
104
105
  download AdInsure Identity Server zip from Azure storage
105
106
 
106
- ```
107
+ ```txt
107
108
  USAGE
108
109
  $ ops download:identity-server <flags>
109
110
 
@@ -119,7 +120,7 @@ EXAMPLE
119
120
 
120
121
  download AdInsure Platform bundle containing zip of Client, Server IdentityServer and SignalR from azure storage
121
122
 
122
- ```
123
+ ```txt
123
124
  USAGE
124
125
  $ ops download <flags>
125
126
 
@@ -138,7 +139,7 @@ EXAMPLE
138
139
 
139
140
  download AdInsure Scheduler zip from azure storage
140
141
 
141
- ```
142
+ ```txt
142
143
  USAGE
143
144
  $ ops download:scheduler <flags>
144
145
 
@@ -154,7 +155,7 @@ EXAMPLE
154
155
 
155
156
  download AdInsure Server zip from Azure storage
156
157
 
157
- ```
158
+ ```txt
158
159
  USAGE
159
160
  $ ops download:server <flags>
160
161
 
@@ -170,7 +171,7 @@ EXAMPLE
170
171
 
171
172
  download AdInsure SignalR zip from Azure storage
172
173
 
173
- ```
174
+ ```txt
174
175
  USAGE
175
176
  $ ops download:signalr <flags>
176
177
 
@@ -186,7 +187,7 @@ EXAMPLE
186
187
 
187
188
  download AdInsure Studio vsix from azure storage
188
189
 
189
- ```
190
+ ```txt
190
191
  USAGE
191
192
  $ ops download:studio <flags>
192
193
 
@@ -202,11 +203,43 @@ EXAMPLES
202
203
  $ ops download:studio -v 15.0.0 -i -s
203
204
  ```
204
205
 
206
+ ## `ops download:keycloak-scim <flags>`
207
+
208
+ Download the Keycloak scim zip for AdInsure server
209
+
210
+ ```txt
211
+ USAGE
212
+ $ ops download:keycloak-scim <flags>
213
+
214
+ OPTIONS
215
+ -o, --output=output [default: ./] output directory
216
+ -v, --version=version (required) version we want to download
217
+
218
+ EXAMPLES
219
+ $ ops download:keycloak-scim -v 3.2.0 -o ~/Downloads
220
+ $ ops download:keycloak-scim -v 3.0.0
221
+ ```
222
+
223
+ ## `ops download:jmeter-examples <flags>`
224
+
225
+ Download the Jmeter examples zip
226
+
227
+ ```txt
228
+ USAGE
229
+ $ ops download:jmeter-examples <flags>
230
+
231
+ OPTIONS
232
+ -o, --output=output [default: ./] output directory
233
+
234
+ EXAMPLES
235
+ $ ops download:jmeter-examples -o ~/Downloads
236
+ ```
237
+
205
238
  ## `ops gitlab:get-tag-pipeline`
206
239
 
207
240
  get pipeline status for tag
208
241
 
209
- ```
242
+ ```txt
210
243
  USAGE
211
244
  $ ops gitlab:get-tag-pipeline <tag>
212
245
 
@@ -226,7 +259,7 @@ OPTIONS
226
259
 
227
260
  creates new gitlab tag
228
261
 
229
- ```
262
+ ```txt
230
263
  USAGE
231
264
  $ ops gitlab:next-nightly-tag <version>
232
265
 
@@ -245,7 +278,7 @@ OPTIONS
245
278
 
246
279
  get Jira issue
247
280
 
248
- ```
281
+ ```txt
249
282
  USAGE
250
283
  $ ops jira:issue <issue>
251
284
 
@@ -265,7 +298,7 @@ EXAMPLE
265
298
 
266
299
  list or edit labels on Jira issue
267
300
 
268
- ```
301
+ ```txt
269
302
  USAGE
270
303
  $ ops jira:labels <issue> -a [label] -r [label]
271
304
 
@@ -287,7 +320,7 @@ EXAMPLE
287
320
 
288
321
  creates a new changelog entry
289
322
 
290
- ```
323
+ ```txt
291
324
  USAGE
292
325
  $ ops log <issue> -t <type> -c [component]
293
326
 
@@ -317,7 +350,7 @@ EXAMPLES
317
350
  generates final changelog from unreleased notes on the root,
318
351
  final changelog for implementation component is placed under basic/Changelog.md
319
352
 
320
- ```
353
+ ```txt
321
354
  USAGE
322
355
  $ ops log:gen [options]
323
356
 
@@ -346,7 +379,7 @@ validates formatting of all unreleased changelogs:
346
379
 
347
380
  - 2.4.2 - added an exit statement that will force exit on changelog validation errors, preparing it for CI
348
381
 
349
- ```
382
+ ```tx
350
383
  USAGE
351
384
  $ ops log:validate [options]
352
385
 
@@ -361,14 +394,14 @@ EXAMPLE
361
394
 
362
395
  log in to use ops services
363
396
 
364
- ```
397
+ ```txt
365
398
  USAGE
366
399
  $ ops login
367
400
 
368
401
  OPTIONS
369
- --servicePrincipal authenticate using service principal credentials
370
- -c, --clientId (application) client id
371
- -s, --secret client secret
402
+ --servicePrincipal # authenticate using service principal credentials
403
+ -c, --clientId # (application) client id
404
+ -s, --secret # client secret
372
405
 
373
406
  EXAMPLES
374
407
  $ ops login
@@ -379,7 +412,7 @@ EXAMPLES
379
412
 
380
413
  check if npm packages were published
381
414
 
382
- ```
415
+ ```txt
383
416
  USAGE
384
417
  $ ops npm:check-publish [options]
385
418
 
@@ -399,7 +432,7 @@ EXAMPLES
399
432
 
400
433
  publish npm packages
401
434
 
402
- ```
435
+ ```txt
403
436
  USAGE
404
437
  $ ops npm:publish [options]
405
438
 
@@ -420,7 +453,7 @@ EXAMPLES
420
453
 
421
454
  update npm dependencies per package filter
422
455
 
423
- ```
456
+ ```txt
424
457
  USAGE
425
458
  $ ops npm:dependency-update <type> [flags]
426
459
 
@@ -434,11 +467,12 @@ OPTIONS
434
467
  EXAMPLE
435
468
  $ ops npm:dependency-update 3.4.3 --filter @adinsure/*
436
469
  ```
470
+
437
471
  ## `ops nuget:dependency-update`
438
472
 
439
473
  update nuget dependencies per package filter
440
474
 
441
- ```
475
+ ```txt
442
476
  USAGE
443
477
  $ ops nuget:dependency-update <type> [flags]
444
478
 
@@ -461,7 +495,7 @@ destination path for each file will be specified destination path with appended
461
495
 
462
496
  > Introduced in version 3.1.0.
463
497
 
464
- ```
498
+ ```txt
465
499
  USAGE
466
500
  $ ops prepare-content -d <destination> -s [source]
467
501
 
@@ -510,7 +544,7 @@ based on the specified `.opsprepare` file residing in source directory.
510
544
 
511
545
  This is the example source directory structure:
512
546
 
513
- ```
547
+ ```ascii
514
548
  src_data
515
549
  ├── .opsprepare
516
550
  ├── README.tpl
@@ -533,7 +567,7 @@ src_data
533
567
 
534
568
  Contents of `.opsprepare` file in the `src_data` directory:
535
569
 
536
- ```
570
+ ```txt
537
571
  # Comment
538
572
  src
539
573
  dist/server
@@ -549,7 +583,7 @@ README.tpl {cp:/README.tpl.src}
549
583
  Running `ops -s src_data -d dst_data` with `src_data/.opsprepare` containing above content
550
584
  results in:
551
585
 
552
- ```sh
586
+ ```ascii
553
587
  dst_data
554
588
  └── src_data
555
589
  ├── README.md
@@ -581,6 +615,7 @@ Note that copying and explicit transformations are performed before any removal
581
615
  #### Comments
582
616
 
583
617
  Any line prefixed by `#` is considered a comment and will not result in any file/directory operation.
618
+
584
619
  #### Copy operations
585
620
 
586
621
  Any file/directory not prefixed by `!` or `#` having explicit transformation defined in `{...}` after
@@ -592,7 +627,7 @@ to the target directory.
592
627
  Transformation operations are always specified using curly braces following the source file name. Base
593
628
  syntax looks like this:
594
629
 
595
- ```
630
+ ```txt
596
631
  {<transformation type>:<transformation parameters>}
597
632
  ```
598
633
 
@@ -604,7 +639,7 @@ Two types of transformation operations are supported:
604
639
 
605
640
  **cp - copy transformation syntax**
606
641
 
607
- ```
642
+ ```txt
608
643
  {cp:<destination path>}
609
644
 
610
645
  Examples:
@@ -619,7 +654,7 @@ can start with or without the `/` character but using makes the syntax more read
619
654
 
620
655
  **js - JavaScript transformation syntax**
621
656
 
622
- ```
657
+ ```txt
623
658
  {js:<transformation_module_path>:<transformation_function_name>}
624
659
 
625
660
  Example:
@@ -661,11 +696,12 @@ module.exports = {
661
696
 
662
697
  Any file/directory prefixed by `!` will be removed from the destination based on it's full path
663
698
  relative from `ops` execution directory to source file/directory path.
699
+
664
700
  ## `ops version <type>`
665
701
 
666
702
  creates everything necessary for the new release
667
703
 
668
- ```
704
+ ```txt
669
705
  USAGE
670
706
  $ ops version <type> [flags]
671
707
 
@@ -690,37 +726,37 @@ EXAMPLES
690
726
  $ ops version new -v 3.2.1 --only-npm-packages "@adinsure/"
691
727
  ```
692
728
 
693
- * *prerelease* is generated from YearMonth incremental number (example: 201909.1) or RC (example: rc.0). prereleases generated in same month will have only last number incremented and first prerelease generated in next month will bump first number and start with 0 (example: 201910.0)
729
+ - _prerelease_ is generated from YearMonth incremental number (example: 201909.1) or RC (example: rc.0). prereleases generated in same month will have only last number incremented and first prerelease generated in next month will bump first number and start with 0 (example: 201910.0)
694
730
 
695
- * *patch* increments third number and prerelease number is ommited. (example: 3.4.0-201909.2 -> 3.4.0 and 3.3.11 -> 3.3.12)
731
+ - _patch_ increments third number and prerelease number is ommited. (example: 3.4.0-201909.2 -> 3.4.0 and 3.3.11 -> 3.3.12)
696
732
 
697
- * *preminor* increments for prerelease in second number (example: 3.2.3 -> 3.3.0-201910.0)
733
+ - _preminor_ increments for prerelease in second number (example: 3.2.3 -> 3.3.0-201910.0)
698
734
 
699
- * *minor* increments second number (example: 3.4.3 -> 3.5.0)
735
+ - _minor_ increments second number (example: 3.4.3 -> 3.5.0)
700
736
 
701
- * *premajor* increments to prerelease in first number (example: 3.4.3 -> 4.0.0-201911.0)
737
+ - _premajor_ increments to prerelease in first number (example: 3.4.3 -> 4.0.0-201911.0)
702
738
 
703
- * *major* increments first number (example: 3.4.5 -> 4.0.0)
739
+ - _major_ increments first number (example: 3.4.5 -> 4.0.0)
704
740
 
705
- * *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.**
741
+ - _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.**
706
742
 
707
743
  > Prerelease Note: Prerelease should only be user in **master** branch.
708
744
 
709
745
  > Patch Note: Patch is used on **release/x.x** branches for creating patch releases
710
-
711
746
  > When creating new **release/x.x** branch 2 steps are needed:
712
- > * creating *patch* version on **release/x.x** branch
713
- > * creating *preminor* or *premajor* version on **master** branch
747
+ >
748
+ > - creating _patch_ version on **release/x.x** branch
749
+ > - creating _preminor_ or _premajor_ version on **master** branch
714
750
 
715
751
  > 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)
716
752
 
717
- > 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"`)
753
+ > 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"`)
718
754
 
719
755
  ## `ops sql <type> <module> [flags]`
720
756
 
721
757
  creates a new database script
722
758
 
723
- ```
759
+ ```txt
724
760
  USAGE
725
761
  $ ops sql <type> <module> [flags]
726
762
 
@@ -748,7 +784,7 @@ EXAMPLES
748
784
 
749
785
  downloads translate from AdDictionary service
750
786
 
751
- ```
787
+ ```txt
752
788
  USAGE
753
789
  $ ops translate <language> [flags]
754
790
 
@@ -30,7 +30,7 @@ class CommandBase extends command_1.Command {
30
30
  for (const file of filesToCheck) {
31
31
  const versionPath = path.resolve(gitRoot, file);
32
32
  if (await fs.pathExists(versionPath)) {
33
- return fs.readFileSync(versionPath, 'utf-8');
33
+ return fs.readFileSync(versionPath, 'utf-8').trim();
34
34
  }
35
35
  }
36
36
  return this.error(`${filesToCheck} file was not found`, { exit: 2 });
@@ -43,7 +43,6 @@ class DownloadClient extends command_base_1.default {
43
43
  catch (err) {
44
44
  switch (err.statusCode) {
45
45
  case 404:
46
- // cli.action.stop(`${chalk.red('Does not exists.')}`);
47
46
  this.error('Does not exists.', { exit: 1 });
48
47
  break;
49
48
  case 400:
@@ -0,0 +1,13 @@
1
+ import { flags } from '@oclif/command';
2
+ import CommandBase from '../../command.base';
3
+ export default class DownloadJmeter extends CommandBase {
4
+ static description: string;
5
+ static usage: string;
6
+ static examples: string[];
7
+ static flags: {
8
+ output: flags.IOptionFlag<string>;
9
+ };
10
+ private readonly url;
11
+ downloadFile(): Promise<string>;
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@oclif/command");
4
+ const chalk_1 = require("chalk");
5
+ const cli_ux_1 = require("cli-ux");
6
+ const fs = require("fs-extra");
7
+ const path = require("path");
8
+ const request = require("request-promise");
9
+ const command_base_1 = require("../../command.base");
10
+ class DownloadJmeter extends command_base_1.default {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.url = 'https://ops.adinsure.com/api/storage/jmeter/';
14
+ }
15
+ async downloadFile() {
16
+ let options = {
17
+ uri: `${this.url}/jmeter-artifacts.zip`,
18
+ encoding: 'binary',
19
+ headers: {
20
+ Authorization: 'Bearer ' + await this.security.getToken()
21
+ }
22
+ };
23
+ return request.get(options);
24
+ }
25
+ async run() {
26
+ const { flags } = this.parse(DownloadJmeter);
27
+ let basePath = flags.output;
28
+ const filename = `jmeter-artifacts.zip`;
29
+ let filePath = path.resolve(basePath, filename);
30
+ cli_ux_1.default.action.start(`Downloading jmeter examples to ${filePath}`, undefined, { stdout: true });
31
+ try {
32
+ let file = await this.downloadFile();
33
+ let writeStream = fs.createWriteStream(filePath);
34
+ writeStream.write(file, 'binary');
35
+ writeStream.on('finish', () => {
36
+ cli_ux_1.default.action.stop(`${chalk_1.default.green('OK')}`);
37
+ });
38
+ writeStream.end();
39
+ }
40
+ catch (err) {
41
+ switch (err.statusCode) {
42
+ case 404:
43
+ this.error('Does not exists.', { exit: 1 });
44
+ break;
45
+ case 400:
46
+ this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
47
+ break;
48
+ default:
49
+ this.error(err.message);
50
+ }
51
+ }
52
+ }
53
+ }
54
+ exports.default = DownloadJmeter;
55
+ DownloadJmeter.description = 'download jmeter examples from Azure storage';
56
+ DownloadJmeter.usage = 'download:jmeter-examples <flags>';
57
+ DownloadJmeter.examples = [
58
+ `$ ops download:jmeter-examples -o ~/Downloads`
59
+ ];
60
+ DownloadJmeter.flags = {
61
+ output: command_1.flags.string({
62
+ char: 'o',
63
+ description: 'output directory',
64
+ default: './'
65
+ }),
66
+ };
@@ -0,0 +1,14 @@
1
+ import { flags } from '@oclif/command';
2
+ import CommandBase from '../../command.base';
3
+ export default class DownloadKeycloak extends CommandBase {
4
+ static description: string;
5
+ static usage: string;
6
+ static examples: string[];
7
+ static flags: {
8
+ version: flags.IOptionFlag<string>;
9
+ output: flags.IOptionFlag<string>;
10
+ };
11
+ private readonly url;
12
+ downloadFile(version: string): Promise<string>;
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@oclif/command");
4
+ const chalk_1 = require("chalk");
5
+ const cli_ux_1 = require("cli-ux");
6
+ const fs = require("fs-extra");
7
+ const path = require("path");
8
+ const request = require("request-promise");
9
+ const command_base_1 = require("../../command.base");
10
+ class DownloadKeycloak extends command_base_1.default {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.url = 'https://ops.adinsure.com/api/storage/extensions/';
14
+ }
15
+ async downloadFile(version) {
16
+ let options = {
17
+ uri: `${this.url}/keycloak-scim2-outbound-provisioning-${version}.zip`,
18
+ encoding: 'binary',
19
+ headers: {
20
+ Authorization: 'Bearer ' + await this.security.getToken()
21
+ }
22
+ };
23
+ return request.get(options);
24
+ }
25
+ async run() {
26
+ const { flags } = this.parse(DownloadKeycloak);
27
+ let basePath = flags.output;
28
+ const filename = `Keycloak-scim-${flags.version}.zip`;
29
+ let filePath = path.resolve(basePath, filename);
30
+ cli_ux_1.default.action.start(`Downloading Keycloack version ${flags.version} to ${filePath}`, undefined, { stdout: true });
31
+ try {
32
+ let file = await this.downloadFile(flags.version);
33
+ let writeStream = fs.createWriteStream(filePath);
34
+ writeStream.write(file, 'binary');
35
+ writeStream.on('finish', () => {
36
+ cli_ux_1.default.action.stop(`${chalk_1.default.green('OK')}`);
37
+ });
38
+ writeStream.end();
39
+ }
40
+ catch (err) {
41
+ switch (err.statusCode) {
42
+ case 404:
43
+ this.error('Does not exists.', { exit: 1 });
44
+ break;
45
+ case 400:
46
+ this.error('Try refreshing your login credentials with "ops login".', { exit: 1 });
47
+ break;
48
+ default:
49
+ this.error(err.message);
50
+ }
51
+ }
52
+ }
53
+ }
54
+ exports.default = DownloadKeycloak;
55
+ DownloadKeycloak.description = 'download Keycloak-scim from Azure storage';
56
+ DownloadKeycloak.usage = 'download:keycloak-scim <flags>';
57
+ DownloadKeycloak.examples = [
58
+ `$ ops download:keycloak-scim -v 3.2.0 -o ~/Downloads`
59
+ ];
60
+ DownloadKeycloak.flags = {
61
+ version: command_1.flags.string({
62
+ char: 'v',
63
+ description: 'version we want to download',
64
+ required: true
65
+ }),
66
+ output: command_1.flags.string({
67
+ char: 'o',
68
+ description: 'output directory',
69
+ default: './'
70
+ }),
71
+ };
@@ -11,6 +11,7 @@ export default class Login extends CommandBase {
11
11
  secret: flags.IOptionFlag<string | undefined>;
12
12
  npm: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
13
13
  skipCI: flags.IOptionFlag<string | undefined>;
14
+ force: import("@oclif/parser/lib/flags").IBooleanFlag<boolean>;
14
15
  };
15
16
  static responsePageContent: string;
16
17
  private readonly npmRegistries;
@@ -2,8 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@oclif/command");
4
4
  const chalk_1 = require("chalk");
5
+ const fs = require("fs");
5
6
  const http = require("http");
6
7
  const open = require("open");
8
+ const path = require("path");
7
9
  const url = require("url");
8
10
  const command_base_1 = require("../command.base");
9
11
  const npmrc_1 = require("../lib/npmrc");
@@ -43,7 +45,16 @@ class Login extends command_base_1.default {
43
45
  }
44
46
  async run() {
45
47
  const { flags } = this.parse(Login);
48
+ if (flags.force) {
49
+ fs.unlink(path.resolve(this.security.getTokenPath()), err => {
50
+ if (err) {
51
+ }
52
+ `${chalk_1.default.white('The old access token was deleted and replaced with a new one.')}`;
53
+ });
54
+ }
46
55
  if (flags.skipCI && process.env[flags.skipCI]) {
56
+ if (flags.force)
57
+ this.error(new Error('Cannot skip login as the force login flag has been set'));
47
58
  this.log(`${chalk_1.default.yellow('Note: skipping login because variables was set for CI')}`);
48
59
  return;
49
60
  }
@@ -108,47 +119,51 @@ Login.examples = [
108
119
  `$ ops login`,
109
120
  `$ ops login --npm`,
110
121
  `$ ops login --skipCi CI`,
111
- `$ ops login --deviceFlow`
122
+ `$ ops login --deviceFlow`,
112
123
  ];
113
124
  Login.flags = {
114
125
  servicePrincipal: command_1.flags.boolean({
115
126
  description: 'authenticate using service principal credentials',
116
- default: false
127
+ default: false,
117
128
  }),
118
129
  deviceFlow: command_1.flags.boolean({
119
130
  description: 'authenticate using device flow',
120
- default: false
131
+ default: false,
121
132
  }),
122
133
  clientId: command_1.flags.string({
123
134
  char: 'c',
124
135
  env: 'AZURE_CLIENT_ID',
125
- description: '[DEPRECATED] (application) client id'
136
+ description: '[DEPRECATED] (application) client id',
126
137
  }),
127
138
  secret: command_1.flags.string({
128
139
  char: 's',
129
140
  env: 'AZURE_CLIENT_SECRET',
130
- description: '[DEPRECATED] client secret'
141
+ description: '[DEPRECATED] client secret',
131
142
  }),
132
143
  npm: command_1.flags.boolean({
133
144
  description: 'register also for npm',
134
- default: false
145
+ default: false,
135
146
  }),
136
147
  skipCI: command_1.flags.string({
137
- description: 'Skip login if environment variables is set'
138
- })
148
+ description: 'Skip login if environment variables is set',
149
+ }),
150
+ force: command_1.flags.boolean({
151
+ description: 'Force a change of login token',
152
+ default: false,
153
+ }),
139
154
  };
140
155
  Login.responsePageContent = `
141
156
  <!DOCTYPE html>
142
157
  <html>
143
158
  <head>
144
159
  <title>ops-cli authenticate</title>
145
- <link rel="icon" href="data:;base64,iVBORw0KGgo=">
160
+ <link rel='icon' href='data:;base64,iVBORw0KGgo='>
146
161
  </head>
147
162
  <body>
148
163
  <p><strong>Your login was successful!</strong></p>
149
164
  <p>This page will automatically close after 10 seconds OR you can close it yourself immediately.</p>
150
- <script type="text/javascript">
151
- setTimeout("self.close()", 10000);
165
+ <script type='text/javascript'>
166
+ setTimeout('self.close()', 10000);
152
167
  </script>
153
168
  </body>
154
169
  </html>`;
@@ -310,7 +310,7 @@ class PrepareContent extends command_base_1.default {
310
310
  try {
311
311
  fs.removeSync(curPath);
312
312
  this.log('Removing file: ', curPath);
313
- } catch (error) {
313
+ } catch (err) {
314
314
  cli.action.stop(`${chalk.red('failed')}`);
315
315
  this.error(error.message);
316
316
  }
@@ -318,7 +318,7 @@ class PrepareContent extends command_base_1.default {
318
318
  try {
319
319
  fs.removeSync(curPath);
320
320
  this.log('Removing dir: ', curPath);
321
- } catch (error) {
321
+ } catch (err) {
322
322
  cli.action.stop(`${chalk.red('failed')}`);
323
323
  this.error(error.message);
324
324
  }
@@ -41,17 +41,17 @@ class Translate extends command_base_1.default {
41
41
  let response = await request.get(requestOptions);
42
42
  return response;
43
43
  }
44
- catch (error) {
44
+ catch (err) {
45
45
  let errorMessage;
46
46
  try {
47
- const errorJson = JSON.parse(error.error);
47
+ const errorJson = JSON.parse(err.error);
48
48
  errorMessage = `An error has occurred: ${errorJson.ExceptionMessage}`;
49
49
  }
50
50
  catch (_a) {
51
- errorMessage = error.message;
51
+ errorMessage = err.message;
52
52
  }
53
53
  this.log(chalk_1.default.red(errorMessage));
54
- throw error;
54
+ throw err;
55
55
  }
56
56
  }
57
57
  /**
@@ -107,9 +107,9 @@ class Translate extends command_base_1.default {
107
107
  await this.extractFiles(response, destination, finalFileName);
108
108
  cli_ux_1.default.action.stop(`${chalk_1.default.green('done')}`);
109
109
  }
110
- catch (error) {
110
+ catch (err) {
111
111
  cli_ux_1.default.action.stop(`${chalk_1.default.red('error')}`);
112
- this.error(error.message);
112
+ this.error(err.message);
113
113
  }
114
114
  this.log(`Translations extracted into ${chalk_1.default.cyan(path.resolve(destination))}`);
115
115
  this.log(`${chalk_1.default.green('Done.')}`);
@@ -21,6 +21,10 @@ export default class SecurityContext {
21
21
  * @param configDir Directory where CLI configuration is stored
22
22
  */
23
23
  constructor(configDir: string);
24
+ /**
25
+ * Get the accessTokenPath, as it is a private variable
26
+ */
27
+ getTokenPath(): string;
24
28
  /**
25
29
  * Contacts authority server, fetches and saves the authentication token to be used in subsequent requests.
26
30
  *
@@ -35,6 +35,12 @@ class SecurityContext {
35
35
  }
36
36
  });
37
37
  }
38
+ /**
39
+ * Get the accessTokenPath, as it is a private variable
40
+ */
41
+ getTokenPath() {
42
+ return this._accessTokenPath;
43
+ }
38
44
  /**
39
45
  * Contacts authority server, fetches and saves the authentication token to be used in subsequent requests.
40
46
  *
@@ -1 +1 @@
1
- {"version":"4.7.0","commands":{"doctor":{"id":"doctor","description":"check if everything is installed","usage":"doctor","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops doctor"],"flags":{"fix":{"name":"fix","type":"boolean","char":"p","description":"try to install missing packages","allowNo":false}},"args":[]},"login":{"id":"login","description":"log in to use ops services","usage":"login","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops login","$ ops login --npm","$ ops login --skipCi CI","$ ops login --deviceFlow"],"flags":{"servicePrincipal":{"name":"servicePrincipal","type":"boolean","description":"authenticate using service principal credentials","allowNo":false},"deviceFlow":{"name":"deviceFlow","type":"boolean","description":"authenticate using device flow","allowNo":false},"clientId":{"name":"clientId","type":"option","char":"c","description":"[DEPRECATED] (application) client id"},"secret":{"name":"secret","type":"option","char":"s","description":"[DEPRECATED] client secret"},"npm":{"name":"npm","type":"boolean","description":"register also for npm","allowNo":false},"skipCI":{"name":"skipCI","type":"option","description":"Skip login if environment variables is set"}},"args":[]},"prepare-content":{"id":"prepare-content","description":"copies files as described in .opsprepare which is at root of source directory","usage":"prepare-content -d <destination> [-s <source>]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops prepare-content -d .\\my_workspace","$ ops prepare-content -d .\\my_workspace -s .\\my_repository","$ ops prepare-content -d C:\\git\\my_workspace","$ ops prepare-content -d C:\\git\\my_workspace -s C:\\git\\my_repository\\my_repository"],"flags":{"destination":{"name":"destination","type":"option","char":"d","description":"where to copy the workspace files","required":true},"source":{"name":"source","type":"option","char":"s","description":"[optional] source directory, default: current dir","required":false,"default":"."}},"args":[]},"sql":{"id":"sql","description":"creates a new database script","usage":"sql <type> <module> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops sql schema ","$ ops sql data shared --layer basic","$ ops sql data shared --major","$ ops sql data shared --offline --description \"this is script description\""],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating database script"},"layer":{"name":"layer","type":"option","char":"l","description":"name of the configuration layer for which you are generating database script"},"offline":{"name":"offline","type":"boolean","char":"o","description":"generate database script with timestamp","allowNo":false},"description":{"name":"description","type":"option","char":"d","description":"description of script to be used in filename for offline"},"major":{"name":"major","type":"boolean","char":"m","description":"generate script for major version","allowNo":false}},"args":[{"name":"type","description":"Type of database scripts","options":["Schema","Data","migration"]},{"name":"module","description":"Module of data database scripts","options":["acc","claims","core","pas","reins","shared"]}]},"translate":{"id":"translate","description":"downloads translate from AdDictionary service","usage":"translate <language> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f json -m \"Client business accounting;Client business base;\"","$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f xml -o translationDestination"],"flags":{"format":{"name":"format","type":"option","char":"f","description":"translations format [xml - server translations, json - client translations]","required":true,"options":["json","xml"]},"module":{"name":"module","type":"option","char":"m","description":"module name you want to download. Values must be semi-colon (;) separated."},"output":{"name":"output","type":"option","char":"o","description":"absolute or relative destination path to a folder where translations are extracted.","default":"."},"filename":{"name":"filename","type":"option","description":"specify filename of output (XML only)."},"respectServerFilename":{"name":"respectServerFilename","type":"boolean","description":"respect filename that is returned from AdDictionary server (XML only).","allowNo":false}},"args":[{"name":"language","description":"language id you want to download. Values must be semi-colon (;) separated.","required":true}]},"version":{"id":"version","description":"release new version","usage":"version <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops version patch","$ ops version prerelease -i","$ ops version new -v 3.4.3"],"flags":{"independent":{"name":"independent","type":"boolean","char":"i","description":"increment npm packages independent of VERSION file","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"force version"},"script-prefix":{"name":"script-prefix","type":"option","description":"prefix for db script version creation. (default: 7.10)","default":"7.10"},"no-deps":{"name":"no-deps","type":"boolean","description":"skip dependency update","allowNo":false},"no-script":{"name":"no-script","type":"boolean","description":"skip creation of script","allowNo":false},"only-npm-packages":{"name":"only-npm-packages","type":"option","description":"regular expression for which NPM packages to include","default":".*"},"exclude-dir":{"name":"exclude-dir","type":"option","description":"exclude directories where to search for package.json"}},"args":[{"name":"type","description":"Type of release","required":true,"options":["patch","minor","major","prerelease","preminor","premajor","new"]}]},"docker:update-image-version":{"id":"docker:update-image-version","description":"update docker image version docker compose file","usage":"docker:update-image-version <tag>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops docker:update-image-version 17.0.0 --service server client"],"flags":{"services":{"name":"services","type":"option","description":"list of services to update","required":true},"file-path":{"name":"file-path","type":"option","description":"list of services to update","default":"./docker-compose.yml"}},"args":[{"name":"version","description":"version","required":true}]},"download:client":{"id":"download:client","description":"download AdInsure Client zip from Azure storage","usage":"download:client <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:client -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:identity-server":{"id":"download:identity-server","description":"download AdInsure Identity Server zip from Azure storage","usage":"download:identity-server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:identity-server -v 3.0.3 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:platform":{"id":"download:platform","description":"download AdInsure Platform bundle containing zip of Client, Server and IdentityServer from azure storage","usage":"download <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["download"],"examples":["$ ops download -v 6.0.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:scheduler":{"id":"download:scheduler","description":"download AdInsure Scheduler zip from azure storage","usage":"download:scheduler <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:scheduler -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:server":{"id":"download:server","description":"download AdInsure Server zip from Azure storage","usage":"download:server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:server -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:signalr":{"id":"download:signalr","description":"download AdInsure SignalR Server zip from Azure storage","usage":"download:signalr <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:signalr -v 18.0.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:studio":{"id":"download:studio","description":"download AdInsure Studio vsix from azure storage","usage":"download:studio <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:studio -v 15.0.0 -o ~/Downloads","$ ops download:studio -v 15.0.0 -i","$ ops download:studio -v 15.0.0 -i -s"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"},"install":{"name":"install","type":"boolean","char":"i","description":"install plugin to vscode. save to temp folder and remove vsix after.","allowNo":false},"skip":{"name":"skip","type":"boolean","char":"s","description":"only with install. If passed, and desired version is installed it will skip it.","allowNo":false}},"args":[]},"gitlab:get-tag-pipeline":{"id":"gitlab:get-tag-pipeline","description":"get pipeline status for tag","usage":"gitlab:get-tag-pipeline <tag>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops gitlab:get-tag-pipeline 17.0.0"],"flags":{"pat":{"name":"pat","type":"option","description":"Token from user that has permissions to list and create tags","required":true},"host":{"name":"host","type":"option","description":"Server hostname","required":true,"default":"https://git.adacta-fintech.com"},"project":{"name":"project","type":"option","description":"Project ID","required":true,"default":"413"},"wait":{"name":"wait","type":"boolean","description":"Wait for pipeline to finish","allowNo":false},"timeout":{"name":"timeout","type":"option","description":"Timeout for wait command in seconds (defaults to 120 seconds)","default":"120"},"delay":{"name":"delay","type":"option","description":"Delay of check in seconds (defaults to 5 seconds)","default":"5"}},"args":[{"name":"tag","description":"Tag","required":true}]},"gitlab:next-nightly-tag":{"id":"gitlab:next-nightly-tag","description":"creates new gitlab tag","usage":"gitlab:next-nightly-tag <version>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops gitlab:next-nightly-tag 17.0.0"],"flags":{"pat":{"name":"pat","type":"option","description":"Token from user that has permissions to list and create tags","required":true},"host":{"name":"host","type":"option","description":"Server hostname","required":true,"default":"https://git.adacta-fintech.com"},"project":{"name":"project","type":"option","description":"Project ID","required":true,"default":"413"},"reference":{"name":"reference","type":"option","description":"Reference to create tag on (branch, commit, tag)","required":true},"outputVersionOnly":{"name":"outputVersionOnly","type":"boolean","description":"output only version instead of pretty output","allowNo":false},"dryRun":{"name":"dryRun","type":"boolean","description":"Only printout version and don't create it","allowNo":false}},"args":[{"name":"version","description":"Tag version"}]},"jira:issue":{"id":"jira:issue","description":"get Jira issue","usage":"jira:issue <issue>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:issue LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"jira:labels":{"id":"jira:labels","description":"list or edit labels on Jira issue","usage":"jira:labels <issue> -a [label] -r [label]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:labels LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"},"add":{"name":"add","type":"option","char":"a","description":"add label"},"remove":{"name":"remove","type":"option","char":"r","description":"remove label"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"log:add":{"id":"log:add","description":"creates a new changelog entry","usage":"log <issue> -t [type] -c [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log","log:add"],"examples":["$ ops log LJADIRD-1234 -t feature","$ ops log LJADIRD-5678 -t fixed","$ ops log LJADIRD-8765 -t breaking -c Platform","$ ops log LJADIRD-4321 -t improve -c Configuration"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of changelog","options":["feature","fixed","improve","breaking"]},"component":{"name":"component","type":"option","char":"c","description":"Component for which new changelog should be generated","default":""}},"args":[{"name":"issue","description":"Jira issue number"}]},"log:generate":{"id":"log:generate","description":"generates final changelog from unreleased notes","usage":"log:gen [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:gen"],"examples":["$ ops log:gen","$ ops log:gen -p","$ ops log:gen -c Platform","$ ops log:gen -c Platform,Configuration","$ ops log:gen -c Implementation -f CHANGELOG.Implementation.md"],"flags":{"components":{"name":"components","type":"option","char":"c","description":"components separated by comma (,) to process for final changelog","default":""},"file":{"name":"file","type":"option","char":"f","description":"file to update with new changelogs","default":"CHANGELOG.md"},"force":{"name":"force","type":"boolean","description":"update target file without prompting for confirmation","allowNo":false},"preview":{"name":"preview","type":"boolean","char":"p","description":"generates a preview markdown of current unreleased changelogs","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating changelogs"},"ignore-no-changelogs":{"name":"ignore-no-changelogs","type":"boolean","description":"generate final changelog even if no unreleased changelogs exist","allowNo":false}},"args":[]},"log:validate":{"id":"log:validate","description":"validates formatting of all unreleased changelogs","usage":"log:validate [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:validate"],"examples":["$ ops log:validate"],"flags":{},"args":[]},"npm:check-publish":{"id":"npm:check-publish","description":"check if npm packages were published","usage":"npm:check-publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:check-publish -v 6.0.1","$ ops npm:check-publish -p @adinsure/* -v 6.0.0","$ ops npm:check-publish -p @adinsure/* -x @adisure/demo -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]},"npm:dependency-update":{"id":"npm:dependency-update","description":"update npm dependencies per package filter","usage":"npm:dependency-update <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:dependency-update 3.4.3 --filter @adinsure/*"],"flags":{"filter":{"name":"filter","type":"option","description":"regular expression for which NPM packages to update","required":true},"exclude":{"name":"exclude","type":"option","description":"exclude directories where to search for package.json"},"force":{"name":"force","type":"boolean","description":"force update of version regardless of lower vs higher version check","allowNo":false}},"args":[{"name":"version","description":"Type of release","required":true}]},"npm:publish":{"id":"npm:publish","description":"Publish npm packages","usage":"npm:publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:publish -v 15.0.0","$ ops npm:publish -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -x @adisure-tooling/studio-services -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]},"nuget:dependency-update":{"id":"nuget:dependency-update","description":"update nuget dependencies per package filter","usage":"nuget:dependency-update <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops nuget:dependency-update 3.4.3 --filter Adacta.AdInsure --exclude Scheduler"],"flags":{"filter":{"name":"filter","type":"option","description":"regular expression for which NuGet packages to update","required":true},"exclude":{"name":"exclude","type":"option","description":"exclude directories where to search for csproj files"}},"args":[{"name":"version","description":"Type of release","required":true}]}}}
1
+ {"version":"4.8.1","commands":{"doctor":{"id":"doctor","description":"check if everything is installed","usage":"doctor","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops doctor"],"flags":{"fix":{"name":"fix","type":"boolean","char":"p","description":"try to install missing packages","allowNo":false}},"args":[]},"login":{"id":"login","description":"log in to use ops services","usage":"login","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops login","$ ops login --npm","$ ops login --skipCi CI","$ ops login --deviceFlow"],"flags":{"servicePrincipal":{"name":"servicePrincipal","type":"boolean","description":"authenticate using service principal credentials","allowNo":false},"deviceFlow":{"name":"deviceFlow","type":"boolean","description":"authenticate using device flow","allowNo":false},"clientId":{"name":"clientId","type":"option","char":"c","description":"[DEPRECATED] (application) client id"},"secret":{"name":"secret","type":"option","char":"s","description":"[DEPRECATED] client secret"},"npm":{"name":"npm","type":"boolean","description":"register also for npm","allowNo":false},"skipCI":{"name":"skipCI","type":"option","description":"Skip login if environment variables is set"},"force":{"name":"force","type":"boolean","description":"Force a change of login token","allowNo":false}},"args":[]},"prepare-content":{"id":"prepare-content","description":"copies files as described in .opsprepare which is at root of source directory","usage":"prepare-content -d <destination> [-s <source>]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops prepare-content -d .\\my_workspace","$ ops prepare-content -d .\\my_workspace -s .\\my_repository","$ ops prepare-content -d C:\\git\\my_workspace","$ ops prepare-content -d C:\\git\\my_workspace -s C:\\git\\my_repository\\my_repository"],"flags":{"destination":{"name":"destination","type":"option","char":"d","description":"where to copy the workspace files","required":true},"source":{"name":"source","type":"option","char":"s","description":"[optional] source directory, default: current dir","required":false,"default":"."}},"args":[]},"sql":{"id":"sql","description":"creates a new database script","usage":"sql <type> <module> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops sql schema ","$ ops sql data shared --layer basic","$ ops sql data shared --major","$ ops sql data shared --offline --description \"this is script description\""],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating database script"},"layer":{"name":"layer","type":"option","char":"l","description":"name of the configuration layer for which you are generating database script"},"offline":{"name":"offline","type":"boolean","char":"o","description":"generate database script with timestamp","allowNo":false},"description":{"name":"description","type":"option","char":"d","description":"description of script to be used in filename for offline"},"major":{"name":"major","type":"boolean","char":"m","description":"generate script for major version","allowNo":false}},"args":[{"name":"type","description":"Type of database scripts","options":["Schema","Data","migration"]},{"name":"module","description":"Module of data database scripts","options":["acc","claims","core","pas","reins","shared"]}]},"translate":{"id":"translate","description":"downloads translate from AdDictionary service","usage":"translate <language> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f json -m \"Client business accounting;Client business base;\"","$ ops translate \"en-US=en-US;ru-Ru=ru-RU\" -f xml -o translationDestination"],"flags":{"format":{"name":"format","type":"option","char":"f","description":"translations format [xml - server translations, json - client translations]","required":true,"options":["json","xml"]},"module":{"name":"module","type":"option","char":"m","description":"module name you want to download. Values must be semi-colon (;) separated."},"output":{"name":"output","type":"option","char":"o","description":"absolute or relative destination path to a folder where translations are extracted.","default":"."},"filename":{"name":"filename","type":"option","description":"specify filename of output (XML only)."},"respectServerFilename":{"name":"respectServerFilename","type":"boolean","description":"respect filename that is returned from AdDictionary server (XML only).","allowNo":false}},"args":[{"name":"language","description":"language id you want to download. Values must be semi-colon (;) separated.","required":true}]},"version":{"id":"version","description":"release new version","usage":"version <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops version patch","$ ops version prerelease -i","$ ops version new -v 3.4.3"],"flags":{"independent":{"name":"independent","type":"boolean","char":"i","description":"increment npm packages independent of VERSION file","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"force version"},"script-prefix":{"name":"script-prefix","type":"option","description":"prefix for db script version creation. (default: 7.10)","default":"7.10"},"no-deps":{"name":"no-deps","type":"boolean","description":"skip dependency update","allowNo":false},"no-script":{"name":"no-script","type":"boolean","description":"skip creation of script","allowNo":false},"only-npm-packages":{"name":"only-npm-packages","type":"option","description":"regular expression for which NPM packages to include","default":".*"},"exclude-dir":{"name":"exclude-dir","type":"option","description":"exclude directories where to search for package.json"}},"args":[{"name":"type","description":"Type of release","required":true,"options":["patch","minor","major","prerelease","preminor","premajor","new"]}]},"docker:update-image-version":{"id":"docker:update-image-version","description":"update docker image version docker compose file","usage":"docker:update-image-version <tag>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops docker:update-image-version 17.0.0 --service server client"],"flags":{"services":{"name":"services","type":"option","description":"list of services to update","required":true},"file-path":{"name":"file-path","type":"option","description":"list of services to update","default":"./docker-compose.yml"}},"args":[{"name":"version","description":"version","required":true}]},"download:client":{"id":"download:client","description":"download AdInsure Client zip from Azure storage","usage":"download:client <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:client -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:identity-server":{"id":"download:identity-server","description":"download AdInsure Identity Server zip from Azure storage","usage":"download:identity-server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:identity-server -v 3.0.3 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:jmeter":{"id":"download:jmeter","description":"download jmeter examples from Azure storage","usage":"download:jmeter-examples <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:jmeter-examples -o ~/Downloads"],"flags":{"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:keycloak-scim":{"id":"download:keycloak-scim","description":"download Keycloak-scim from Azure storage","usage":"download:keycloak-scim <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:keycloak-scim -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:platform":{"id":"download:platform","description":"download AdInsure Platform bundle containing zip of Client, Server and IdentityServer from azure storage","usage":"download <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["download"],"examples":["$ ops download -v 6.0.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:scheduler":{"id":"download:scheduler","description":"download AdInsure Scheduler zip from azure storage","usage":"download:scheduler <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:scheduler -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:server":{"id":"download:server","description":"download AdInsure Server zip from Azure storage","usage":"download:server <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:server -v 3.2.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:signalr":{"id":"download:signalr","description":"download AdInsure SignalR Server zip from Azure storage","usage":"download:signalr <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:signalr -v 18.0.0 -o ~/Downloads"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"}},"args":[]},"download:studio":{"id":"download:studio","description":"download AdInsure Studio vsix from azure storage","usage":"download:studio <flags>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops download:studio -v 15.0.0 -o ~/Downloads","$ ops download:studio -v 15.0.0 -i","$ ops download:studio -v 15.0.0 -i -s"],"flags":{"version":{"name":"version","type":"option","char":"v","description":"version we want to download","required":true},"output":{"name":"output","type":"option","char":"o","description":"output directory","default":"./"},"install":{"name":"install","type":"boolean","char":"i","description":"install plugin to vscode. save to temp folder and remove vsix after.","allowNo":false},"skip":{"name":"skip","type":"boolean","char":"s","description":"only with install. If passed, and desired version is installed it will skip it.","allowNo":false}},"args":[]},"gitlab:get-tag-pipeline":{"id":"gitlab:get-tag-pipeline","description":"get pipeline status for tag","usage":"gitlab:get-tag-pipeline <tag>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops gitlab:get-tag-pipeline 17.0.0"],"flags":{"pat":{"name":"pat","type":"option","description":"Token from user that has permissions to list and create tags","required":true},"host":{"name":"host","type":"option","description":"Server hostname","required":true,"default":"https://git.adacta-fintech.com"},"project":{"name":"project","type":"option","description":"Project ID","required":true,"default":"413"},"wait":{"name":"wait","type":"boolean","description":"Wait for pipeline to finish","allowNo":false},"timeout":{"name":"timeout","type":"option","description":"Timeout for wait command in seconds (defaults to 120 seconds)","default":"120"},"delay":{"name":"delay","type":"option","description":"Delay of check in seconds (defaults to 5 seconds)","default":"5"}},"args":[{"name":"tag","description":"Tag","required":true}]},"gitlab:next-nightly-tag":{"id":"gitlab:next-nightly-tag","description":"creates new gitlab tag","usage":"gitlab:next-nightly-tag <version>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops gitlab:next-nightly-tag 17.0.0"],"flags":{"pat":{"name":"pat","type":"option","description":"Token from user that has permissions to list and create tags","required":true},"host":{"name":"host","type":"option","description":"Server hostname","required":true,"default":"https://git.adacta-fintech.com"},"project":{"name":"project","type":"option","description":"Project ID","required":true,"default":"413"},"reference":{"name":"reference","type":"option","description":"Reference to create tag on (branch, commit, tag)","required":true},"outputVersionOnly":{"name":"outputVersionOnly","type":"boolean","description":"output only version instead of pretty output","allowNo":false},"dryRun":{"name":"dryRun","type":"boolean","description":"Only printout version and don't create it","allowNo":false}},"args":[{"name":"version","description":"Tag version"}]},"jira:issue":{"id":"jira:issue","description":"get Jira issue","usage":"jira:issue <issue>","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:issue LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"jira:labels":{"id":"jira:labels","description":"list or edit labels on Jira issue","usage":"jira:labels <issue> -a [label] -r [label]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops jira:labels LJADIRD-1337"],"flags":{"username":{"name":"username","type":"option","description":"jira username","required":true},"password":{"name":"password","type":"option","description":"jira password","required":true},"hostname":{"name":"hostname","type":"option","description":"jira hostname","default":"https://jira.adacta-fintech.com"},"add":{"name":"add","type":"option","char":"a","description":"add label"},"remove":{"name":"remove","type":"option","char":"r","description":"remove label"}},"args":[{"name":"issue","description":"Jira issue number","required":true}]},"log:add":{"id":"log:add","description":"creates a new changelog entry","usage":"log <issue> -t [type] -c [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log","log:add"],"examples":["$ ops log LJADIRD-1234 -t feature","$ ops log LJADIRD-5678 -t fixed","$ ops log LJADIRD-8765 -t breaking -c Platform","$ ops log LJADIRD-4321 -t improve -c Configuration"],"flags":{"type":{"name":"type","type":"option","char":"t","description":"type of changelog","options":["feature","fixed","improve","breaking"]},"component":{"name":"component","type":"option","char":"c","description":"Component for which new changelog should be generated","default":""}},"args":[{"name":"issue","description":"Jira issue number"}]},"log:generate":{"id":"log:generate","description":"generates final changelog from unreleased notes","usage":"log:gen [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:gen"],"examples":["$ ops log:gen","$ ops log:gen -p","$ ops log:gen -c Platform","$ ops log:gen -c Platform,Configuration","$ ops log:gen -c Implementation -f CHANGELOG.Implementation.md"],"flags":{"components":{"name":"components","type":"option","char":"c","description":"components separated by comma (,) to process for final changelog","default":""},"file":{"name":"file","type":"option","char":"f","description":"file to update with new changelogs","default":"CHANGELOG.md"},"force":{"name":"force","type":"boolean","description":"update target file without prompting for confirmation","allowNo":false},"preview":{"name":"preview","type":"boolean","char":"p","description":"generates a preview markdown of current unreleased changelogs","allowNo":false},"version":{"name":"version","type":"option","char":"v","description":"version for which you're generating changelogs"},"ignore-no-changelogs":{"name":"ignore-no-changelogs","type":"boolean","description":"generate final changelog even if no unreleased changelogs exist","allowNo":false}},"args":[]},"log:validate":{"id":"log:validate","description":"validates formatting of all unreleased changelogs","usage":"log:validate [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":["log:validate"],"examples":["$ ops log:validate"],"flags":{},"args":[]},"npm:check-publish":{"id":"npm:check-publish","description":"check if npm packages were published","usage":"npm:check-publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:check-publish -v 6.0.1","$ ops npm:check-publish -p @adinsure/* -v 6.0.0","$ ops npm:check-publish -p @adinsure/* -x @adisure/demo -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]},"npm:dependency-update":{"id":"npm:dependency-update","description":"update npm dependencies per package filter","usage":"npm:dependency-update <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:dependency-update 3.4.3 --filter @adinsure/*"],"flags":{"filter":{"name":"filter","type":"option","description":"regular expression for which NPM packages to update","required":true},"exclude":{"name":"exclude","type":"option","description":"exclude directories where to search for package.json"},"force":{"name":"force","type":"boolean","description":"force update of version regardless of lower vs higher version check","allowNo":false}},"args":[{"name":"version","description":"Type of release","required":true}]},"npm:publish":{"id":"npm:publish","description":"Publish npm packages","usage":"npm:publish [options]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops npm:publish -v 15.0.0","$ ops npm:publish -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -v 15.0.0","$ ops npm:publish -p @adinsure-tooling/* -x @adisure-tooling/studio-services -v 6.0.0"],"flags":{"package":{"name":"package","type":"option","char":"p","description":"package name filter you want to check"},"exclude":{"name":"exclude","type":"option","char":"x","description":"exclude packages from filter"},"version":{"name":"version","type":"option","char":"v","description":"version we want to check if published","required":true},"pat":{"name":"pat","type":"option","description":"PAT token or AZURE_DEVOPS_EXT_PAT environment variable"}},"args":[]},"nuget:dependency-update":{"id":"nuget:dependency-update","description":"update nuget dependencies per package filter","usage":"nuget:dependency-update <type> [flags]","pluginName":"@adinsure-ops/ops-cli","pluginType":"core","aliases":[],"examples":["$ ops nuget:dependency-update 3.4.3 --filter Adacta.AdInsure --exclude Scheduler"],"flags":{"filter":{"name":"filter","type":"option","description":"regular expression for which NuGet packages to update","required":true},"exclude":{"name":"exclude","type":"option","description":"exclude directories where to search for csproj files"}},"args":[{"name":"version","description":"Type of release","required":true}]}}}
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": "4.7.0",
4
+ "version": "4.8.1",
5
5
  "author": "Adacta Digital Service Department",
6
6
  "bin": {
7
7
  "ops": "./bin/run"
@@ -22,7 +22,7 @@
22
22
  "gray-matter": "^4.0.2",
23
23
  "ini": "^3.0.0",
24
24
  "inquirer": "^7.3.3",
25
- "jira-client": "^6.23.0",
25
+ "jira-client": "^8.2.2",
26
26
  "jszip": "^3.2.2",
27
27
  "lodash": "^4.17.11",
28
28
  "minimatch": "^3.0.4",
@@ -30,36 +30,43 @@
30
30
  "oauth": "^0.9.15",
31
31
  "open": "^6.4.0",
32
32
  "replace-in-file": "^4.3.1",
33
- "request-promise": "^4.2.4",
33
+ "request": "^2.88.2",
34
+ "request-promise": "^4.2.6",
34
35
  "rimraf": "^2.6.3",
35
36
  "semver": "^7.3.7",
36
37
  "tslib": "^1",
37
38
  "yaml": "^2.1.1"
38
39
  },
39
40
  "devDependencies": {
41
+ "@istanbuljs/nyc-config-typescript": "^1.0.2",
40
42
  "@oclif/dev-cli": "^1",
41
43
  "@oclif/test": "^1",
42
44
  "@oclif/tslint": "^3",
45
+ "@testdeck/mocha": "^0.3.3",
43
46
  "@types/chai": "^4",
44
47
  "@types/fs-extra": "^7.0.0",
45
48
  "@types/ini": "^1.3.31",
46
49
  "@types/inquirer": "^7.3.1",
47
50
  "@types/jira-client": "^6.21.3",
48
51
  "@types/jszip": "^3.4.1",
49
- "@types/mocha": "^5",
52
+ "@types/mocha": "^5.2.7",
50
53
  "@types/mock-fs": "^4.13.1",
51
54
  "@types/node": "^10",
52
55
  "@types/oauth": "^0.9.1",
53
56
  "@types/request-promise": "^4.1.44",
54
57
  "@types/rimraf": "^2.0.2",
55
- "chai": "^4",
56
- "mocha": "^5",
58
+ "@types/sinon": "^10.0.15",
59
+ "chai": "^4.3.7",
60
+ "mocha": "^10.2.0",
61
+ "mocha-typescript": "^1.1.17",
57
62
  "mock-fs": "^5.1.1",
58
63
  "mock-spawn": "^0.2.6",
59
64
  "nock": "^13.1.3",
60
- "nyc": "^15.0.0",
65
+ "nyc": "^15.1.0",
66
+ "sinon": "^15.1.0",
61
67
  "timekeeper": "^2.2.0",
62
- "ts-node": "^8",
68
+ "ts-mockito": "^2.6.1",
69
+ "ts-node": "^8.10.2",
63
70
  "tslint": "^5",
64
71
  "typescript": "^3.3"
65
72
  },
@@ -104,10 +111,11 @@
104
111
  "scripts": {
105
112
  "postpack": "rimraf oclif.manifest.json",
106
113
  "prepack": "rimraf lib && tsc -b && oclif-dev manifest",
107
- "test": "nyc --extension .ts mocha --timeout 20000 --forbid-only \"test/**/*.test.ts\"",
108
- "test-with-coverage": "nyc --extension .ts mocha --reporter=doc --timeout 20000 --forbid-only \"test/**/*.test.ts\"",
109
- "test-single": "nyc --extension .ts mocha --timeout 20000 --forbid-only",
110
- "test-single-with-coverage": "nyc --extension .ts mocha --reporter=doc --timeout 20000 --forbid-only",
114
+ "test": "nyc --require ts-node/register --extension .ts mocha --timeout 20000 --forbid-only \"test/**/*.test.ts\"",
115
+ "test-unit": "mocha \"./test/**/*.spec.ts\"",
116
+ "test-with-coverage": "nyc --require ts-node/register --extension .ts mocha --reporter=doc --timeout 20000 --forbid-only \"test/**/*.test.ts\"",
117
+ "test-single": "nyc --require ts-node/register --extension .ts mocha --timeout 20000 --forbid-only",
118
+ "test-single-with-coverage": "nyc --require ts-node/register --extension .ts mocha --reporter=doc --timeout 20000 --forbid-only",
111
119
  "lint": "tslint -p test -t stylish"
112
120
  },
113
121
  "types": "lib/index.d.ts"