@adinsure-ops/ops-cli 5.2.2 → 5.3.0

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.
Files changed (40) hide show
  1. package/README.md +123 -9
  2. package/lib/commands/config/get.d.ts +11 -0
  3. package/lib/commands/config/get.js +40 -0
  4. package/lib/commands/config/list.d.ts +8 -0
  5. package/lib/commands/config/list.js +26 -0
  6. package/lib/commands/config/set.d.ts +12 -0
  7. package/lib/commands/config/set.js +60 -0
  8. package/lib/commands/config/unset.d.ts +11 -0
  9. package/lib/commands/config/unset.js +42 -0
  10. package/lib/commands/download/client.d.ts +11 -3
  11. package/lib/commands/download/client.js +52 -8
  12. package/lib/commands/download/identity-server.d.ts +11 -3
  13. package/lib/commands/download/identity-server.js +53 -8
  14. package/lib/commands/download/jmeter.d.ts +1 -1
  15. package/lib/commands/download/jmeter.js +13 -3
  16. package/lib/commands/download/keycloak-scim.d.ts +1 -1
  17. package/lib/commands/download/keycloak-scim.js +13 -3
  18. package/lib/commands/download/platform.d.ts +11 -3
  19. package/lib/commands/download/platform.js +53 -8
  20. package/lib/commands/download/scheduler.d.ts +11 -3
  21. package/lib/commands/download/scheduler.js +52 -8
  22. package/lib/commands/download/server.d.ts +11 -3
  23. package/lib/commands/download/server.js +53 -9
  24. package/lib/commands/download/signalr.d.ts +11 -3
  25. package/lib/commands/download/signalr.js +52 -8
  26. package/lib/commands/download/studio.d.ts +11 -3
  27. package/lib/commands/download/studio.js +52 -8
  28. package/lib/commands/login.d.ts +9 -0
  29. package/lib/commands/login.js +60 -1
  30. package/lib/commands/login.ru.d.ts +12 -0
  31. package/lib/commands/login.ru.js +42 -0
  32. package/lib/commands/npm/check-publish.js +1 -1
  33. package/lib/lib/config.d.ts +10 -0
  34. package/lib/lib/config.js +33 -0
  35. package/lib/lib/yarnrc.d.ts +22 -0
  36. package/lib/lib/yarnrc.js +40 -0
  37. package/lib/security/context.d.ts +22 -0
  38. package/lib/security/context.js +113 -0
  39. package/oclif.manifest.json +275 -12
  40. package/package.json +1 -1
@@ -0,0 +1,22 @@
1
+ export default class YarnRc {
2
+ private readonly filePath;
3
+ private config;
4
+ constructor(createIfNotExists?: boolean);
5
+ /**
6
+ * Load config file
7
+ * @returns {void}
8
+ */
9
+ load(): void;
10
+ /**
11
+ * Add registry to config file
12
+ * @param key Config key
13
+ * @param value Config value
14
+ * @returns {void}
15
+ */
16
+ set(key: string, value: string): void;
17
+ /**
18
+ * Set token for Registry
19
+ * @returns {void}
20
+ */
21
+ save(): void;
22
+ }
@@ -0,0 +1,40 @@
1
+ import fs from "fs";
2
+ import os from "os";
3
+ import path from "path";
4
+ import yaml from "yaml";
5
+ export default class YarnRc {
6
+ constructor(createIfNotExists = true) {
7
+ this.config = {};
8
+ this.filePath = path.resolve(os.homedir(), `.yarnrc.yml`);
9
+ if (!fs.existsSync(this.filePath) && createIfNotExists) {
10
+ fs.writeFileSync(this.filePath, JSON.stringify({}));
11
+ }
12
+ if (fs.existsSync(this.filePath) &&
13
+ fs.lstatSync(this.filePath).isFile()) {
14
+ this.load();
15
+ }
16
+ }
17
+ /**
18
+ * Load config file
19
+ * @returns {void}
20
+ */
21
+ load() {
22
+ this.config = yaml.parse(fs.readFileSync(this.filePath, "utf8"));
23
+ }
24
+ /**
25
+ * Add registry to config file
26
+ * @param key Config key
27
+ * @param value Config value
28
+ * @returns {void}
29
+ */
30
+ set(key, value) {
31
+ this.config[key] = value;
32
+ }
33
+ /**
34
+ * Set token for Registry
35
+ * @returns {void}
36
+ */
37
+ save() {
38
+ fs.writeFileSync(this.filePath, yaml.stringify(this.config));
39
+ }
40
+ }
@@ -7,11 +7,16 @@ import { ParsedUrlQuery } from 'querystring';
7
7
  export default class SecurityContext {
8
8
  private readonly clientId;
9
9
  private readonly devopsResourceId;
10
+ private readonly managementCoreWindowsNet;
10
11
  private readonly tenant;
12
+ private readonly tenantId;
13
+ private readonly registry;
11
14
  private readonly authorityUrl;
12
15
  private readonly redirectUri;
13
16
  private readonly resource;
14
17
  private readonly _accessTokenPath;
18
+ private readonly _accessTokenRuPath;
19
+ private readonly _accessConfigPath;
15
20
  private readonly _pca;
16
21
  private readonly _cryptoProvider;
17
22
  private _verifier;
@@ -26,6 +31,16 @@ export default class SecurityContext {
26
31
  * @returns {string} Returns access token path
27
32
  */
28
33
  getTokenPath(): string;
34
+ /**
35
+ * Get the accessTokenRuPath, as it is a private variable
36
+ * @returns {string} Returns access token Ru path
37
+ */
38
+ getTokenRuPath(): string;
39
+ /**
40
+ * Get the accessConfigPath, as it is a private variable
41
+ * @returns {string} Returns config.json path
42
+ */
43
+ getConfigPath(): string;
29
44
  /**
30
45
  * Contacts authority server, fetches and saves the authentication token to be used in subsequent requests.
31
46
  *
@@ -58,6 +73,13 @@ export default class SecurityContext {
58
73
  * @returns Promise that resolves bearer authentication token
59
74
  */
60
75
  getToken(): Promise<string>;
76
+ /**
77
+ * Fetches the locally stored token for GitlabRu
78
+ * @returns authentication token for gitlabru.adacta-fintech.ru
79
+ */
80
+ getTokenRu(): string;
81
+ getAADToken(): Promise<string>;
82
+ getACRToken(): Promise<string>;
61
83
  /**
62
84
  * Contacts authority server, fetches and saves the authentication token to be used in subsequent requests.
63
85
  *
@@ -2,7 +2,10 @@ import { __awaiter } from "tslib";
2
2
  import { AuthError, ConfidentialClientApplication, CryptoProvider, InteractionRequiredAuthError, PublicClientApplication, } from '@azure/msal-node';
3
3
  import { reject } from 'lodash-es';
4
4
  import path from 'path';
5
+ import fs from 'fs';
6
+ import querystring from 'querystring';
5
7
  import LocalCachePlugin from './cache.js';
8
+ import axios from 'axios';
6
9
  /**
7
10
  * Security context that keeps track of current authentication token.
8
11
  * It's not recommended you instantiate this class on your own but rather inherit your commands from [[CommandBase]].
@@ -15,13 +18,18 @@ export default class SecurityContext {
15
18
  constructor(configDir) {
16
19
  this.clientId = 'bed40d09-53d7-4af8-bf63-3288658b65fb';
17
20
  this.devopsResourceId = '499b84ac-1321-427f-aa17-267ca6975798';
21
+ this.managementCoreWindowsNet = 'https://management.core.windows.net//';
18
22
  this.tenant = 'adfintech.onmicrosoft.com';
23
+ this.tenantId = 'cdeb9156-219a-49e3-b414-f63acd298e9c';
24
+ this.registry = 'adinsure.azurecr.io';
19
25
  this.authorityUrl = `https://login.microsoftonline.com/${this.tenant}/`;
20
26
  this.redirectUri = 'http://localhost:3044';
21
27
  this.resource = 'https://ops.adinsure.com';
22
28
  this._verifier = null;
23
29
  this._challenge = null;
24
30
  this._accessTokenPath = path.resolve(configDir, 'accessToken.json');
31
+ this._accessTokenRuPath = path.resolve(configDir, 'accessTokenRu.json');
32
+ this._accessConfigPath = path.resolve(configDir, 'config.json');
25
33
  this._cryptoProvider = new CryptoProvider();
26
34
  this._pca = new PublicClientApplication({
27
35
  auth: {
@@ -40,6 +48,20 @@ export default class SecurityContext {
40
48
  getTokenPath() {
41
49
  return this._accessTokenPath;
42
50
  }
51
+ /**
52
+ * Get the accessTokenRuPath, as it is a private variable
53
+ * @returns {string} Returns access token Ru path
54
+ */
55
+ getTokenRuPath() {
56
+ return this._accessTokenRuPath;
57
+ }
58
+ /**
59
+ * Get the accessConfigPath, as it is a private variable
60
+ * @returns {string} Returns config.json path
61
+ */
62
+ getConfigPath() {
63
+ return this._accessConfigPath;
64
+ }
43
65
  /**
44
66
  * Contacts authority server, fetches and saves the authentication token to be used in subsequent requests.
45
67
  *
@@ -202,6 +224,97 @@ export default class SecurityContext {
202
224
  }));
203
225
  });
204
226
  }
227
+ /**
228
+ * Fetches the locally stored token for GitlabRu
229
+ * @returns authentication token for gitlabru.adacta-fintech.ru
230
+ */
231
+ getTokenRu() {
232
+ try {
233
+ const fileContent = fs.readFileSync(this._accessTokenRuPath, 'utf8').trim();
234
+ if (!fileContent) {
235
+ throw new Error('Token file is empty.');
236
+ }
237
+ const tokenData = JSON.parse(fileContent);
238
+ if (!tokenData.accessTokenRu) {
239
+ throw new Error('GitLabRu token not found in file.');
240
+ }
241
+ return tokenData.accessTokenRu;
242
+ //eslint-disable-next-line @typescript-eslint/no-explicit-any
243
+ }
244
+ catch (err) {
245
+ throw new Error(`Failed to retrieve GitLabRu token: ${err.message}`);
246
+ }
247
+ }
248
+ getAADToken() {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ const msalTokenCache = this._pca.getTokenCache();
251
+ const cachedAccounts = yield msalTokenCache.getAllAccounts();
252
+ return new Promise((resolve, reject) => {
253
+ if (cachedAccounts.length > 0) {
254
+ this._pca
255
+ .acquireTokenSilent({
256
+ account: cachedAccounts[0],
257
+ scopes: [
258
+ this.managementCoreWindowsNet + '.default',
259
+ 'offline_access',
260
+ ],
261
+ })
262
+ .then((response) => {
263
+ if (response) {
264
+ resolve(response.accessToken);
265
+ }
266
+ else {
267
+ reject(new Error('Error getting token, please call `ops login`.'));
268
+ }
269
+ })
270
+ .catch((error) => {
271
+ reject(new Error(error));
272
+ });
273
+ }
274
+ else {
275
+ reject();
276
+ }
277
+ });
278
+ });
279
+ }
280
+ getACRToken() {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ try {
283
+ // First, retrieve the AAD token using your existing method.
284
+ const aadAccessToken = yield this.getAADToken();
285
+ // Build the form data as per the ACR token exchange API:
286
+ // grant_type=access_token
287
+ // service=<registry>
288
+ // tenant=<tenantId>
289
+ // access_token=<aadAccessToken>
290
+ const postData = querystring.stringify({
291
+ grant_type: 'access_token',
292
+ service: this.registry, // e.g., "adinsure.azurecr.io"
293
+ tenant: this.tenantId, // e.g., "cdeb9156-219a-49e3-b414-f63acd298e9c"
294
+ access_token: aadAccessToken,
295
+ });
296
+ // Define the URL for token exchange:
297
+ const url = `https://${this.registry}/oauth2/exchange`;
298
+ // Make the POST request with the appropriate headers.
299
+ const response = yield axios.post(url, postData, {
300
+ headers: {
301
+ 'Content-Type': 'application/x-www-form-urlencoded',
302
+ },
303
+ });
304
+ // The ACR token should be in the "access_token" field of the response.
305
+ if (response.data && response.data.refresh_token) {
306
+ return response.data.refresh_token;
307
+ }
308
+ else {
309
+ throw new Error('ACR token not found in the response.');
310
+ }
311
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
312
+ }
313
+ catch (error) {
314
+ throw new Error('Failed to retrieve ACR token: ' + error.message);
315
+ }
316
+ });
317
+ }
205
318
  /**
206
319
  * Contacts authority server, fetches and saves the authentication token to be used in subsequent requests.
207
320
  *
@@ -34,7 +34,7 @@
34
34
  "login": {
35
35
  "aliases": [],
36
36
  "args": {},
37
- "description": "log in to use ops services",
37
+ "description": "log in to use ops services with AzureAD",
38
38
  "examples": [
39
39
  "$ ops login",
40
40
  "$ ops login --npm",
@@ -66,6 +66,12 @@
66
66
  "name": "force",
67
67
  "allowNo": false,
68
68
  "type": "boolean"
69
+ },
70
+ "docker": {
71
+ "description": "Authenticate with adinsure.azurecr.io for Docker",
72
+ "name": "docker",
73
+ "allowNo": false,
74
+ "type": "boolean"
69
75
  }
70
76
  },
71
77
  "hasDynamicHelp": false,
@@ -84,6 +90,46 @@
84
90
  "login.js"
85
91
  ]
86
92
  },
93
+ "login.ru": {
94
+ "aliases": [
95
+ "login:ru"
96
+ ],
97
+ "args": {},
98
+ "description": "Log in to use ops services with GitLabRu token",
99
+ "examples": [
100
+ "$ ops login:ru --token abc123"
101
+ ],
102
+ "flags": {
103
+ "token": {
104
+ "description": "The GitLabRu token to store",
105
+ "name": "token",
106
+ "required": true,
107
+ "hasDynamicHelp": false,
108
+ "multiple": false,
109
+ "type": "option"
110
+ },
111
+ "force": {
112
+ "description": "Force update of token",
113
+ "name": "force",
114
+ "allowNo": false,
115
+ "type": "boolean"
116
+ }
117
+ },
118
+ "hasDynamicHelp": false,
119
+ "hiddenAliases": [],
120
+ "id": "login.ru",
121
+ "pluginAlias": "@adinsure-ops/ops-cli",
122
+ "pluginName": "@adinsure-ops/ops-cli",
123
+ "pluginType": "core",
124
+ "strict": true,
125
+ "usage": "login:ru --token <token>",
126
+ "isESM": true,
127
+ "relativePath": [
128
+ "lib",
129
+ "commands",
130
+ "login.ru.js"
131
+ ]
132
+ },
87
133
  "prepare-content": {
88
134
  "aliases": [],
89
135
  "args": {},
@@ -420,6 +466,148 @@
420
466
  "version.js"
421
467
  ]
422
468
  },
469
+ "config:get": {
470
+ "aliases": [
471
+ "config:get"
472
+ ],
473
+ "args": {
474
+ "type": {
475
+ "description": "Type of OPS configuration to retrieve",
476
+ "name": "type",
477
+ "options": [
478
+ "endpoint",
479
+ "download_folder"
480
+ ],
481
+ "required": true
482
+ }
483
+ },
484
+ "description": "Get a configuration value",
485
+ "examples": [
486
+ "$ ops config:get endpoint",
487
+ "$ ops config:get download_folder"
488
+ ],
489
+ "flags": {},
490
+ "hasDynamicHelp": false,
491
+ "hiddenAliases": [],
492
+ "id": "config:get",
493
+ "pluginAlias": "@adinsure-ops/ops-cli",
494
+ "pluginName": "@adinsure-ops/ops-cli",
495
+ "pluginType": "core",
496
+ "strict": true,
497
+ "usage": "config:get <type>",
498
+ "isESM": true,
499
+ "relativePath": [
500
+ "lib",
501
+ "commands",
502
+ "config",
503
+ "get.js"
504
+ ]
505
+ },
506
+ "config:list": {
507
+ "aliases": [
508
+ "config:list"
509
+ ],
510
+ "args": {},
511
+ "description": "List all configuration values",
512
+ "examples": [
513
+ "$ ops config:list"
514
+ ],
515
+ "flags": {},
516
+ "hasDynamicHelp": false,
517
+ "hiddenAliases": [],
518
+ "id": "config:list",
519
+ "pluginAlias": "@adinsure-ops/ops-cli",
520
+ "pluginName": "@adinsure-ops/ops-cli",
521
+ "pluginType": "core",
522
+ "strict": true,
523
+ "usage": "config:list",
524
+ "isESM": true,
525
+ "relativePath": [
526
+ "lib",
527
+ "commands",
528
+ "config",
529
+ "list.js"
530
+ ]
531
+ },
532
+ "config:set": {
533
+ "aliases": [
534
+ "config:set"
535
+ ],
536
+ "args": {
537
+ "type": {
538
+ "description": "Type of OPS configuration",
539
+ "name": "type",
540
+ "options": [
541
+ "endpoint",
542
+ "download_folder"
543
+ ],
544
+ "required": true
545
+ },
546
+ "value": {
547
+ "description": "For \"endpoint\", allowed values: azure, gitlabru; for \"download_folder\", a valid folder path is expected.",
548
+ "name": "value",
549
+ "required": true
550
+ }
551
+ },
552
+ "description": "Set a configuration value",
553
+ "examples": [
554
+ "$ ops config:set endpoint gitlabru",
555
+ "$ ops config:set endpoint azure",
556
+ "$ ops config:set download_folder ~/Downloads"
557
+ ],
558
+ "flags": {},
559
+ "hasDynamicHelp": false,
560
+ "hiddenAliases": [],
561
+ "id": "config:set",
562
+ "pluginAlias": "@adinsure-ops/ops-cli",
563
+ "pluginName": "@adinsure-ops/ops-cli",
564
+ "pluginType": "core",
565
+ "strict": true,
566
+ "isESM": true,
567
+ "relativePath": [
568
+ "lib",
569
+ "commands",
570
+ "config",
571
+ "set.js"
572
+ ]
573
+ },
574
+ "config:unset": {
575
+ "aliases": [
576
+ "config:unset"
577
+ ],
578
+ "args": {
579
+ "type": {
580
+ "description": "Type of OPS configuration to remove",
581
+ "name": "type",
582
+ "options": [
583
+ "endpoint",
584
+ "download_folder"
585
+ ],
586
+ "required": true
587
+ }
588
+ },
589
+ "description": "Remove a configuration value so that the system default is used",
590
+ "examples": [
591
+ "$ ops config:unset endpoint",
592
+ "$ ops config:unset download_folder"
593
+ ],
594
+ "flags": {},
595
+ "hasDynamicHelp": false,
596
+ "hiddenAliases": [],
597
+ "id": "config:unset",
598
+ "pluginAlias": "@adinsure-ops/ops-cli",
599
+ "pluginName": "@adinsure-ops/ops-cli",
600
+ "pluginType": "core",
601
+ "strict": true,
602
+ "usage": "config:unset <type>",
603
+ "isESM": true,
604
+ "relativePath": [
605
+ "lib",
606
+ "commands",
607
+ "config",
608
+ "unset.js"
609
+ ]
610
+ },
423
611
  "docker:update-image-version": {
424
612
  "aliases": [],
425
613
  "args": {
@@ -477,6 +665,18 @@
477
665
  "$ ops download:client -v 3.2.0 -o ~/Downloads"
478
666
  ],
479
667
  "flags": {
668
+ "source": {
669
+ "char": "s",
670
+ "description": "[default: azure] artifact source, configurable with config:set endpoint <option>",
671
+ "name": "source",
672
+ "hasDynamicHelp": false,
673
+ "multiple": false,
674
+ "options": [
675
+ "azure",
676
+ "gitlabru"
677
+ ],
678
+ "type": "option"
679
+ },
480
680
  "version": {
481
681
  "char": "v",
482
682
  "description": "version we want to download",
@@ -490,7 +690,6 @@
490
690
  "char": "o",
491
691
  "description": "output directory",
492
692
  "name": "output",
493
- "default": "./",
494
693
  "hasDynamicHelp": false,
495
694
  "multiple": false,
496
695
  "type": "option"
@@ -520,6 +719,18 @@
520
719
  "$ ops download:identity-server -v 3.0.3 -o ~/Downloads"
521
720
  ],
522
721
  "flags": {
722
+ "source": {
723
+ "char": "s",
724
+ "description": "[default: azure] artifact source, configurable with config:set endpoint <option>",
725
+ "name": "source",
726
+ "hasDynamicHelp": false,
727
+ "multiple": false,
728
+ "options": [
729
+ "azure",
730
+ "gitlabru"
731
+ ],
732
+ "type": "option"
733
+ },
523
734
  "version": {
524
735
  "char": "v",
525
736
  "description": "version we want to download",
@@ -533,7 +744,6 @@
533
744
  "char": "o",
534
745
  "description": "output directory",
535
746
  "name": "output",
536
- "default": "./",
537
747
  "hasDynamicHelp": false,
538
748
  "multiple": false,
539
749
  "type": "option"
@@ -567,7 +777,6 @@
567
777
  "char": "o",
568
778
  "description": "output directory",
569
779
  "name": "output",
570
- "default": "./",
571
780
  "hasDynamicHelp": false,
572
781
  "multiple": false,
573
782
  "type": "option"
@@ -610,7 +819,6 @@
610
819
  "char": "o",
611
820
  "description": "output directory",
612
821
  "name": "output",
613
- "default": "./",
614
822
  "hasDynamicHelp": false,
615
823
  "multiple": false,
616
824
  "type": "option"
@@ -642,6 +850,18 @@
642
850
  "$ ops download -v 6.0.0 -o ~/Downloads"
643
851
  ],
644
852
  "flags": {
853
+ "source": {
854
+ "char": "s",
855
+ "description": "[default: azure] artifact source, configurable with config:set endpoint <option>",
856
+ "name": "source",
857
+ "hasDynamicHelp": false,
858
+ "multiple": false,
859
+ "options": [
860
+ "azure",
861
+ "gitlabru"
862
+ ],
863
+ "type": "option"
864
+ },
645
865
  "version": {
646
866
  "char": "v",
647
867
  "description": "version we want to download",
@@ -655,7 +875,6 @@
655
875
  "char": "o",
656
876
  "description": "output directory",
657
877
  "name": "output",
658
- "default": "./",
659
878
  "hasDynamicHelp": false,
660
879
  "multiple": false,
661
880
  "type": "option"
@@ -685,6 +904,18 @@
685
904
  "$ ops download:scheduler -v 3.2.0 -o ~/Downloads"
686
905
  ],
687
906
  "flags": {
907
+ "source": {
908
+ "char": "s",
909
+ "description": "[default: azure] artifact source, configurable with config:set endpoint <option>",
910
+ "name": "source",
911
+ "hasDynamicHelp": false,
912
+ "multiple": false,
913
+ "options": [
914
+ "azure",
915
+ "gitlabru"
916
+ ],
917
+ "type": "option"
918
+ },
688
919
  "version": {
689
920
  "char": "v",
690
921
  "description": "version we want to download",
@@ -698,7 +929,6 @@
698
929
  "char": "o",
699
930
  "description": "output directory",
700
931
  "name": "output",
701
- "default": "./",
702
932
  "hasDynamicHelp": false,
703
933
  "multiple": false,
704
934
  "type": "option"
@@ -728,6 +958,18 @@
728
958
  "$ ops download:server -v 3.2.0 -o ~/Downloads"
729
959
  ],
730
960
  "flags": {
961
+ "source": {
962
+ "char": "s",
963
+ "description": "[default: azure] artifact source, configurable with config:set endpoint <option>",
964
+ "name": "source",
965
+ "hasDynamicHelp": false,
966
+ "multiple": false,
967
+ "options": [
968
+ "azure",
969
+ "gitlabru"
970
+ ],
971
+ "type": "option"
972
+ },
731
973
  "version": {
732
974
  "char": "v",
733
975
  "description": "version we want to download",
@@ -741,7 +983,6 @@
741
983
  "char": "o",
742
984
  "description": "output directory",
743
985
  "name": "output",
744
- "default": "./",
745
986
  "hasDynamicHelp": false,
746
987
  "multiple": false,
747
988
  "type": "option"
@@ -771,6 +1012,18 @@
771
1012
  "$ ops download:signalr -v 18.0.0 -o ~/Downloads"
772
1013
  ],
773
1014
  "flags": {
1015
+ "source": {
1016
+ "char": "s",
1017
+ "description": "[default: azure] artifact source, configurable with config:set endpoint <option>",
1018
+ "name": "source",
1019
+ "hasDynamicHelp": false,
1020
+ "multiple": false,
1021
+ "options": [
1022
+ "azure",
1023
+ "gitlabru"
1024
+ ],
1025
+ "type": "option"
1026
+ },
774
1027
  "version": {
775
1028
  "char": "v",
776
1029
  "description": "version we want to download",
@@ -784,7 +1037,6 @@
784
1037
  "char": "o",
785
1038
  "description": "output directory",
786
1039
  "name": "output",
787
- "default": "./",
788
1040
  "hasDynamicHelp": false,
789
1041
  "multiple": false,
790
1042
  "type": "option"
@@ -815,9 +1067,21 @@
815
1067
  "$ ops download:studio -v 15.0.0 -o ~/Downloads -f",
816
1068
  "$ ops download:studio -v 15.0.0 -i",
817
1069
  "$ ops download:studio -v 15.0.0 -i -s",
818
- "$ ops download:studio -v 15.0.0 -i -k"
1070
+ "$ ops download:studio -v 15.0.0 -i -k",
1071
+ "$ ops download:studio -v 15.0.0 --source=gitlabru"
819
1072
  ],
820
1073
  "flags": {
1074
+ "source": {
1075
+ "description": "[default: azure] artifact source, configurable with config:set endpoint <option>",
1076
+ "name": "source",
1077
+ "hasDynamicHelp": false,
1078
+ "multiple": false,
1079
+ "options": [
1080
+ "azure",
1081
+ "gitlabru"
1082
+ ],
1083
+ "type": "option"
1084
+ },
821
1085
  "version": {
822
1086
  "char": "v",
823
1087
  "description": "version we want to download",
@@ -831,7 +1095,6 @@
831
1095
  "char": "o",
832
1096
  "description": "output directory",
833
1097
  "name": "output",
834
- "default": "./",
835
1098
  "hasDynamicHelp": false,
836
1099
  "multiple": false,
837
1100
  "type": "option"
@@ -1589,5 +1852,5 @@
1589
1852
  ]
1590
1853
  }
1591
1854
  },
1592
- "version": "5.2.2"
1855
+ "version": "5.3.0"
1593
1856
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adinsure-ops/ops-cli",
3
3
  "description": "Operations CLI for working with AdInsure",
4
- "version": "5.2.2",
4
+ "version": "5.3.0",
5
5
  "author": "Adacta Digital Service Department",
6
6
  "bin": {
7
7
  "ops": "./bin/run.js"