zcatalyst-cli 1.18.0-beta.6 → 1.18.0-beta.7

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.
@@ -33,12 +33,15 @@ const logger_1 = require("../util_modules/logger");
33
33
  const option_1 = require("../util_modules/option");
34
34
  const crypto_1 = require("crypto");
35
35
  exports.missingScopes = {
36
- [constants_1.DC_TYPE.in.value]: ['dataverse'],
37
- [constants_1.DC_TYPE.eu.value]: ['quick_ml', 'dataverse'],
38
- [constants_1.DC_TYPE.au.value]: ['dataverse'],
39
- [constants_1.DC_TYPE.ca.value]: ['quick_ml', 'dataverse'],
40
- [constants_1.DC_TYPE.sa.value]: ['quick_ml', 'dataverse']
36
+ [constants_1.DC_TYPE.in.value]: getScopes(['zest', 'dataverse']),
37
+ [constants_1.DC_TYPE.eu.value]: getScopes(['zest', 'quick_ml', 'dataverse']),
38
+ [constants_1.DC_TYPE.au.value]: getScopes(['zest', 'dataverse']),
39
+ [constants_1.DC_TYPE.ca.value]: getScopes(['zest', 'quick_ml', 'dataverse']),
40
+ [constants_1.DC_TYPE.sa.value]: getScopes(['zest', 'quick_ml', 'dataverse'])
41
41
  };
42
+ function getScopes(keys) {
43
+ return Object.keys(constants_1.SCOPE).filter((scope) => keys.some((prefix) => scope.startsWith(prefix)));
44
+ }
42
45
  class Login {
43
46
  constructor(localhost = true, user = true) {
44
47
  this.localhost = localhost;
@@ -42,7 +42,7 @@ exports.default = Object.freeze({
42
42
  ext: '.ca'
43
43
  },
44
44
  sa: {
45
- loc: 'SouthAfrica',
45
+ loc: 'SaudiArabia',
46
46
  ref: 'sa',
47
47
  value: 'sa',
48
48
  w_auth: 'us',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zcatalyst-cli",
3
- "version": "1.18.0-beta.6",
3
+ "version": "1.18.0-beta.7",
4
4
  "description": "Command Line Tool for CATALYST",
5
5
  "main": "./lib/index.js",
6
6
  "bin": {