@axway/axway-central-cli 1.29.0-rc.9 → 2.1.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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.transformSimpleFilters = exports.verifyScopeParam = exports.parseScopeParam = exports.hbsCompare = exports.writeTemplates = exports.buildTemplate = exports.sanitizeMetadata = exports.compareResourcesByKindDesc = exports.compareResourcesByKindAsc = exports.isApiServerErrorResponseType = exports.isApiServerErrorType = exports.buildGenericResource = exports.loadAndVerifySpecs = exports.LEGACY_loadAndVerifySpecs = exports.isValidJson = exports.writeToFile = exports.verifyFile = exports.getConfig = exports.configFile = exports.isAmplifyCli = exports.isWindows = void 0;
6
+ exports.transformSimpleFilters = exports.verifyScopeParam = exports.parseScopeParam = exports.hbsCompare = exports.writeTemplates = exports.buildTemplate = exports.sanitizeMetadata = exports.compareResourcesByKindDesc = exports.compareResourcesByKindAsc = exports.isApiServerErrorResponseType = exports.isApiServerErrorType = exports.buildGenericResource = exports.loadAndVerifySpecs = exports.LEGACY_loadAndVerifySpecs = exports.isValidJson = exports.writeToFile = exports.verifyFile = exports.getConfig = exports.configFile = exports.isWindows = void 0;
7
7
 
8
8
  var _fsExtra = require("fs-extra");
9
9
 
@@ -20,19 +20,7 @@ var _types = require("./types");
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
22
22
  const isWindows = /^win/.test(process.platform);
23
- /**
24
- * Helper to identify if cli is running under "amplify-cli" package.
25
- * Needed when implementing backward-compatible logic.
26
- * @returns {boolean} true - if cli running with "amplify-cli", false - otherwise (or if unable to identify).
27
- */
28
-
29
23
  exports.isWindows = isWindows;
30
-
31
- const isAmplifyCli = () => {
32
- return process.argv && process.argv.length >= 2 && process.argv[1].endsWith('amplify');
33
- };
34
-
35
- exports.isAmplifyCli = isAmplifyCli;
36
24
  const configFile = (0, _path.join)((0, _os.homedir)(), '.axway', 'central.json');
37
25
  exports.configFile = configFile;
38
26
 
@@ -100,11 +88,11 @@ const isValidJson = item => {
100
88
  exports.isValidJson = isValidJson;
101
89
 
102
90
  const LEGACY_loadAndVerifySpecs = specFilePath => {
103
- // note: safeLoadAll is always returning an array
91
+ // note: loadAll is always returning an array
104
92
  let docs = [];
105
93
 
106
94
  try {
107
- docs = (0, _jsYaml.safeLoadAll)((0, _fsExtra.readFileSync)(specFilePath, 'utf8'));
95
+ docs = (0, _jsYaml.loadAll)((0, _fsExtra.readFileSync)(specFilePath, 'utf8'));
108
96
  } catch (e) {
109
97
  // if parser is failing, rethrow with our own error
110
98
  throw new Error(`File content is invalid.`);
@@ -138,11 +126,11 @@ const LEGACY_loadAndVerifySpecs = specFilePath => {
138
126
  exports.LEGACY_loadAndVerifySpecs = LEGACY_loadAndVerifySpecs;
139
127
 
140
128
  const loadAndVerifySpecs = (specFilePath, allowedKinds) => {
141
- // note: safeLoadAll is always returning an array
129
+ // note: loadAll is always returning an array
142
130
  let docs = [];
143
131
 
144
132
  try {
145
- docs = (0, _jsYaml.safeLoadAll)((0, _fsExtra.readFileSync)(specFilePath, 'utf8'));
133
+ docs = (0, _jsYaml.loadAll)((0, _fsExtra.readFileSync)(specFilePath, 'utf8'));
146
134
  } catch (e) {
147
135
  // if parser is failing, rethrow with our own error
148
136
  throw new Error(`File content is invalid.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axway/axway-central-cli",
3
- "version": "1.29.0-rc.9",
3
+ "version": "2.1.0",
4
4
  "description": "Manage APIs, services and publish to the Unified Catalog",
5
5
  "homepage": "https://platform.axway.com",
6
6
  "author": {
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "license": "SEE LICENCE IN LICENSE",
12
12
  "engines": {
13
- "node": ">= 10.13"
13
+ "node": ">=12.13.0"
14
14
  },
15
15
  "keywords": [
16
16
  "axway",
@@ -40,63 +40,60 @@
40
40
  "name": "central"
41
41
  },
42
42
  "dependencies": {
43
- "@axway/amplify-cli-utils": "^4.2.5",
44
- "@axway/amplify-cli-utils-v2": "npm:@axway/amplify-cli-utils@^2.0.0",
45
- "abort-controller": "^3.0.0",
46
- "chalk": "^4.1.0",
47
- "cli-kit": "^1.9.3",
48
- "dayjs": "^1.8.25",
43
+ "@axway/amplify-cli-utils": "5.0.0",
44
+ "chalk": "^4.1.2",
45
+ "cli-kit": "^1.14.1",
46
+ "dayjs": "^1.10.7",
49
47
  "easy-table": "^1.1.1",
50
48
  "extract-zip": "^2.0.1",
51
- "form-data": "^2.3.3",
52
- "fs-extra": "^7.0.0",
49
+ "form-data": "^4.0.0",
50
+ "fs-extra": "^10.0.0",
53
51
  "handlebars": "^4.7.7",
54
- "https-proxy-agent": "^2.2.4",
55
- "inquirer": "^7.3.2",
56
- "js-yaml": "^3.14.0",
52
+ "inquirer": "^8.1.5",
53
+ "js-yaml": "^4.1.0",
57
54
  "lodash": "^4.17.21",
58
55
  "node-cache": "^5.1.2",
59
- "node-fetch": "^2.6.0",
60
- "ora": "^3.4.0",
61
- "semver": "^6.3.0",
62
- "snooplogg": "^2.3.2",
63
- "tmp": "^0.1.0"
56
+ "ora": "^5.4.1",
57
+ "semver": "^7.3.5",
58
+ "snooplogg": "^3.0.2",
59
+ "tmp": "^0.2.1"
64
60
  },
65
61
  "devDependencies": {
66
- "@babel/cli": "^7.4.3",
67
- "@babel/core": "^7.4.3",
68
- "@babel/plugin-proposal-class-properties": "^7.12.1",
69
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
70
- "@babel/plugin-proposal-optional-chaining": "^7.9.0",
71
- "@babel/preset-env": "^7.4.3",
72
- "@babel/preset-typescript": "^7.9.0",
73
- "@types/chai": "^4.2.11",
74
- "@types/easy-table": "^0.0.32",
75
- "@types/form-data": "^2.2.1",
76
- "@types/fs-extra": "^5.0.5",
77
- "@types/inquirer": "^6.5.0",
78
- "@types/js-yaml": "^3.12.1",
79
- "@types/lodash": "^4.14.168",
80
- "@types/mocha": "^7.0.2",
81
- "@types/node": "^11.13.4",
82
- "@types/node-fetch": "^2.5.3",
83
- "@types/semver": "^6.0.2",
84
- "@types/sinon": "^9.0.0",
85
- "@types/tmp": "^0.1.0",
86
- "@types/update-notifier": "^4.1.1",
87
- "@types/uuid": "^8.3.0",
62
+ "@babel/cli": "^7.15.4",
63
+ "@babel/core": "^7.15.5",
64
+ "@babel/plugin-proposal-class-properties": "^7.14.5",
65
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
66
+ "@babel/plugin-proposal-optional-chaining": "^7.14.5",
67
+ "@babel/preset-env": "^7.15.6",
68
+ "@babel/preset-typescript": "^7.15.0",
69
+ "@types/chai": "^4.2.21",
70
+ "@types/easy-table": "^0.0.33",
71
+ "@types/form-data": "^2.5.0",
72
+ "@types/fs-extra": "^9.0.12",
73
+ "@types/inquirer": "^8.1.1",
74
+ "@types/js-yaml": "^4.0.3",
75
+ "@types/lodash": "^4.14.173",
76
+ "@types/mocha": "^9.0.0",
77
+ "@types/node": "^16.9.1",
78
+ "@types/rx": "^4.1.2",
79
+ "@types/semver": "^7.3.8",
80
+ "@types/sinon": "^10.0.2",
81
+ "@types/tmp": "^0.2.1",
82
+ "@types/update-notifier": "^5.1.0",
83
+ "@types/uuid": "^8.3.1",
88
84
  "babel-plugin-lodash": "^3.3.4",
89
- "chai": "^4.2.0",
90
- "core-js": "^3.6.5",
91
- "mocha": "^7.1.1",
92
- "nock": "^12.0.3",
93
- "nodemon": "^2.0.7",
94
- "nyc": "^15.0.1",
95
- "prettier": "^2.4.0",
96
- "sinon": "^9.0.2",
97
- "source-map-support": "^0.5.16",
98
- "ts-mocha": "^7.0.0",
99
- "typescript": "^3.4.3"
85
+ "chai": "^4.3.4",
86
+ "chai-as-promised": "^7.1.1",
87
+ "core-js": "^3.17.3",
88
+ "mocha": "^9.1.1",
89
+ "nock": "^13.1.3",
90
+ "nodemon": "^2.0.12",
91
+ "nyc": "^15.1.0",
92
+ "prettier": "^2.4.1",
93
+ "sinon": "^11.1.2",
94
+ "source-map-support": "^0.5.20",
95
+ "ts-mocha": "^8.0.0",
96
+ "typescript": "^4.4.3"
100
97
  },
101
98
  "jest": {
102
99
  "verbose": true,
package/tsconfig.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "noUnusedParameters": true,
11
11
  "pretty": true,
12
12
  "strict": true,
13
- "target": "es2020",
13
+ "target": "es2019",
14
14
  "resolveJsonModule": true,
15
15
  "sourceMap": true
16
16
  },