@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.
- package/README.md +2 -2
- package/dist/commands/apply/index.js +2 -8
- package/dist/commands/completion/index.js +1 -3
- package/dist/commands/create/index.js +2 -8
- package/dist/commands/delete/index.js +2 -8
- package/dist/commands/edit/index.js +2 -8
- package/dist/commands/get/index.js +2 -8
- package/dist/commands/install/agents.js +3 -8
- package/dist/commands/install/awsAgents.js +11 -11
- package/dist/commands/install/azureAgents.js +2 -2
- package/dist/commands/install/edgeAgents.js +10 -4
- package/dist/commands/install/helpers/creators.js +0 -7
- package/dist/commands/install/helpers/getters.js +2 -21
- package/dist/commands/install/helpers/inputs.js +1 -8
- package/dist/commands/install/helpers/templates/istioTemplates.js +3 -0
- package/dist/commands/install/index.js +2 -7
- package/dist/commands/install/istioAgents.js +4 -15
- package/dist/commands/install/platform.js +25 -27
- package/dist/commands/proxies/index.js +2 -8
- package/dist/common/ApiServerClient.js +2 -6
- package/dist/common/CliConfigManager.js +4 -2
- package/dist/common/CoreConfigController.js +62 -83
- package/dist/common/dataService.js +139 -147
- package/dist/common/errorHandler.js +1 -1
- package/dist/common/resultsRenderers.js +2 -2
- package/dist/common/utils.js +5 -17
- package/package.json +48 -51
- package/tsconfig.json +1 -1
package/dist/common/utils.js
CHANGED
|
@@ -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.
|
|
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:
|
|
91
|
+
// note: loadAll is always returning an array
|
|
104
92
|
let docs = [];
|
|
105
93
|
|
|
106
94
|
try {
|
|
107
|
-
docs = (0, _jsYaml.
|
|
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:
|
|
129
|
+
// note: loadAll is always returning an array
|
|
142
130
|
let docs = [];
|
|
143
131
|
|
|
144
132
|
try {
|
|
145
|
-
docs = (0, _jsYaml.
|
|
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.
|
|
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": ">=
|
|
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": "
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
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": "^
|
|
52
|
-
"fs-extra": "^
|
|
49
|
+
"form-data": "^4.0.0",
|
|
50
|
+
"fs-extra": "^10.0.0",
|
|
53
51
|
"handlebars": "^4.7.7",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
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
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
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
|
|
67
|
-
"@babel/core": "^7.
|
|
68
|
-
"@babel/plugin-proposal-class-properties": "^7.
|
|
69
|
-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.
|
|
70
|
-
"@babel/plugin-proposal-optional-chaining": "^7.
|
|
71
|
-
"@babel/preset-env": "^7.
|
|
72
|
-
"@babel/preset-typescript": "^7.
|
|
73
|
-
"@types/chai": "^4.2.
|
|
74
|
-
"@types/easy-table": "^0.0.
|
|
75
|
-
"@types/form-data": "^2.
|
|
76
|
-
"@types/fs-extra": "^
|
|
77
|
-
"@types/inquirer": "^
|
|
78
|
-
"@types/js-yaml": "^
|
|
79
|
-
"@types/lodash": "^4.14.
|
|
80
|
-
"@types/mocha": "^
|
|
81
|
-
"@types/node": "^
|
|
82
|
-
"@types/
|
|
83
|
-
"@types/semver": "^
|
|
84
|
-
"@types/sinon": "^
|
|
85
|
-
"@types/tmp": "^0.1
|
|
86
|
-
"@types/update-notifier": "^
|
|
87
|
-
"@types/uuid": "^8.3.
|
|
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.
|
|
90
|
-
"
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
-
"
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
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,
|