@serverless-devs/s 0.0.45 → 0.1.4-18cdd23b
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/LICENSE +201 -21
- package/OWNERS +33 -0
- package/_config.yml +1 -0
- package/bin/s +1 -1
- package/lib/daemon/lib.js +327 -0
- package/lib/daemon/report.js +50 -0
- package/lib/daemon/update-cli.js +20 -0
- package/lib/daemon/update-component.js +21 -0
- package/lib/daemon/update-templates.js +19 -0
- package/lib/index.js +1732 -0
- package/package.json +73 -61
- package/readme.md +127 -0
- package/.eslintrc +0 -75
- package/README.md +0 -65
- package/bin/s-config +0 -2
- package/bin/s-config-add +0 -2
- package/bin/s-config-delete +0 -2
- package/bin/s-config-get +0 -3
- package/bin/s-config-update +0 -3
- package/bin/s-deploy +0 -2
- package/bin/s-gui +0 -2
- package/bin/s-init +0 -2
- package/bin/s-platform +0 -2
- package/bin/s-platform-delete +0 -2
- package/bin/s-platform-init +0 -2
- package/bin/s-platform-login +0 -2
- package/bin/s-platform-publish +0 -2
- package/bin/s-remove +0 -2
- package/bin/s-search +0 -2
- package/bin/s-set +0 -2
- package/bin/s-set-analysis +0 -2
- package/bin/s-set-language +0 -2
- package/bin/s-set-output-color +0 -2
- package/compile.tsconfig.json +0 -12
- package/configs/base.tsconfig.json +0 -25
- package/lib/command/command-manager.d.ts +0 -12
- package/lib/command/command-manager.d.ts.map +0 -1
- package/lib/command/command-manager.js +0 -144
- package/lib/command/command-manager.js.map +0 -1
- package/lib/command/index.d.ts +0 -2
- package/lib/command/index.d.ts.map +0 -1
- package/lib/command/index.js +0 -41
- package/lib/command/index.js.map +0 -1
- package/lib/component/hook.d.ts +0 -17
- package/lib/component/hook.d.ts.map +0 -1
- package/lib/component/hook.js +0 -201
- package/lib/component/hook.js.map +0 -1
- package/lib/component/index.d.ts +0 -53
- package/lib/component/index.d.ts.map +0 -1
- package/lib/component/index.js +0 -577
- package/lib/component/index.js.map +0 -1
- package/lib/config/add/add-manager.d.ts +0 -23
- package/lib/config/add/add-manager.d.ts.map +0 -1
- package/lib/config/add/add-manager.js +0 -282
- package/lib/config/add/add-manager.js.map +0 -1
- package/lib/config/add/index.d.ts +0 -2
- package/lib/config/add/index.d.ts.map +0 -1
- package/lib/config/add/index.js +0 -77
- package/lib/config/add/index.js.map +0 -1
- package/lib/config/common/common.d.ts +0 -7
- package/lib/config/common/common.d.ts.map +0 -1
- package/lib/config/common/common.js +0 -175
- package/lib/config/common/common.js.map +0 -1
- package/lib/config/delete/delete-manager.d.ts +0 -11
- package/lib/config/delete/delete-manager.d.ts.map +0 -1
- package/lib/config/delete/delete-manager.js +0 -133
- package/lib/config/delete/delete-manager.js.map +0 -1
- package/lib/config/delete/index.d.ts +0 -2
- package/lib/config/delete/index.d.ts.map +0 -1
- package/lib/config/delete/index.js +0 -77
- package/lib/config/delete/index.js.map +0 -1
- package/lib/config/get/get-manager.d.ts +0 -14
- package/lib/config/get/get-manager.d.ts.map +0 -1
- package/lib/config/get/get-manager.js +0 -205
- package/lib/config/get/get-manager.js.map +0 -1
- package/lib/config/get/index.d.ts +0 -2
- package/lib/config/get/index.d.ts.map +0 -1
- package/lib/config/get/index.js +0 -86
- package/lib/config/get/index.js.map +0 -1
- package/lib/config/index.d.ts +0 -2
- package/lib/config/index.d.ts.map +0 -1
- package/lib/config/index.js +0 -15
- package/lib/config/index.js.map +0 -1
- package/lib/config/update/index.d.ts +0 -2
- package/lib/config/update/index.d.ts.map +0 -1
- package/lib/config/update/index.js +0 -83
- package/lib/config/update/index.js.map +0 -1
- package/lib/config/update/update-manager.d.ts +0 -23
- package/lib/config/update/update-manager.d.ts.map +0 -1
- package/lib/config/update/update-manager.js +0 -208
- package/lib/config/update/update-manager.js.map +0 -1
- package/lib/constants/static-variable.d.ts +0 -12
- package/lib/constants/static-variable.d.ts.map +0 -1
- package/lib/constants/static-variable.js +0 -15
- package/lib/constants/static-variable.js.map +0 -1
- package/lib/entity.d.ts +0 -11
- package/lib/entity.d.ts.map +0 -1
- package/lib/entity.js +0 -3
- package/lib/entity.js.map +0 -1
- package/lib/error/command-error.d.ts +0 -5
- package/lib/error/command-error.d.ts.map +0 -1
- package/lib/error/command-error.js +0 -26
- package/lib/error/command-error.js.map +0 -1
- package/lib/error/config-delete-error.d.ts +0 -5
- package/lib/error/config-delete-error.d.ts.map +0 -1
- package/lib/error/config-delete-error.js +0 -26
- package/lib/error/config-delete-error.js.map +0 -1
- package/lib/error/config-error.d.ts +0 -5
- package/lib/error/config-error.d.ts.map +0 -1
- package/lib/error/config-error.js +0 -26
- package/lib/error/config-error.js.map +0 -1
- package/lib/error/config-get-error.d.ts +0 -5
- package/lib/error/config-get-error.d.ts.map +0 -1
- package/lib/error/config-get-error.js +0 -26
- package/lib/error/config-get-error.js.map +0 -1
- package/lib/error/config-update-error.d.ts +0 -5
- package/lib/error/config-update-error.d.ts.map +0 -1
- package/lib/error/config-update-error.js +0 -26
- package/lib/error/config-update-error.js.map +0 -1
- package/lib/error/init-error.d.ts +0 -5
- package/lib/error/init-error.d.ts.map +0 -1
- package/lib/error/init-error.js +0 -26
- package/lib/error/init-error.js.map +0 -1
- package/lib/error/login-error.d.ts +0 -5
- package/lib/error/login-error.d.ts.map +0 -1
- package/lib/error/login-error.js +0 -26
- package/lib/error/login-error.js.map +0 -1
- package/lib/error/platform-delete-error.d.ts +0 -5
- package/lib/error/platform-delete-error.d.ts.map +0 -1
- package/lib/error/platform-delete-error.js +0 -26
- package/lib/error/platform-delete-error.js.map +0 -1
- package/lib/error/platform-init-error.d.ts +0 -5
- package/lib/error/platform-init-error.d.ts.map +0 -1
- package/lib/error/platform-init-error.js +0 -26
- package/lib/error/platform-init-error.js.map +0 -1
- package/lib/error/platform-publish-error.d.ts +0 -5
- package/lib/error/platform-publish-error.d.ts.map +0 -1
- package/lib/error/platform-publish-error.js +0 -26
- package/lib/error/platform-publish-error.js.map +0 -1
- package/lib/error/search-error.d.ts +0 -5
- package/lib/error/search-error.d.ts.map +0 -1
- package/lib/error/search-error.js +0 -26
- package/lib/error/search-error.js.map +0 -1
- package/lib/error/serverless-error.d.ts +0 -4
- package/lib/error/serverless-error.d.ts.map +0 -1
- package/lib/error/serverless-error.js +0 -20
- package/lib/error/serverless-error.js.map +0 -1
- package/lib/error/set-analysis-error.d.ts +0 -5
- package/lib/error/set-analysis-error.d.ts.map +0 -1
- package/lib/error/set-analysis-error.js +0 -26
- package/lib/error/set-analysis-error.js.map +0 -1
- package/lib/error/set-language-error.d.ts +0 -5
- package/lib/error/set-language-error.d.ts.map +0 -1
- package/lib/error/set-language-error.js +0 -26
- package/lib/error/set-language-error.js.map +0 -1
- package/lib/gui/gui-service.d.ts +0 -11
- package/lib/gui/gui-service.d.ts.map +0 -1
- package/lib/gui/gui-service.js +0 -276
- package/lib/gui/gui-service.js.map +0 -1
- package/lib/gui/index.d.ts +0 -2
- package/lib/gui/index.d.ts.map +0 -1
- package/lib/gui/index.js +0 -67
- package/lib/gui/index.js.map +0 -1
- package/lib/init/init-manager.d.ts +0 -9
- package/lib/init/init-manager.d.ts.map +0 -1
- package/lib/init/init-manager.js +0 -171
- package/lib/init/init-manager.js.map +0 -1
- package/lib/init/init-message.d.ts +0 -6
- package/lib/init/init-message.d.ts.map +0 -1
- package/lib/init/init-message.js +0 -9
- package/lib/init/init-message.js.map +0 -1
- package/lib/init/init.d.ts +0 -2
- package/lib/init/init.d.ts.map +0 -1
- package/lib/init/init.js +0 -87
- package/lib/init/init.js.map +0 -1
- package/lib/platform/delete/index.d.ts +0 -2
- package/lib/platform/delete/index.d.ts.map +0 -1
- package/lib/platform/delete/index.js +0 -89
- package/lib/platform/delete/index.js.map +0 -1
- package/lib/platform/delete/platform-delete-manager.d.ts +0 -4
- package/lib/platform/delete/platform-delete-manager.d.ts.map +0 -1
- package/lib/platform/delete/platform-delete-manager.js +0 -100
- package/lib/platform/delete/platform-delete-manager.js.map +0 -1
- package/lib/platform/index.d.ts +0 -2
- package/lib/platform/index.d.ts.map +0 -1
- package/lib/platform/index.js +0 -25
- package/lib/platform/index.js.map +0 -1
- package/lib/platform/init/index.d.ts +0 -2
- package/lib/platform/init/index.d.ts.map +0 -1
- package/lib/platform/init/index.js +0 -70
- package/lib/platform/init/index.js.map +0 -1
- package/lib/platform/init/platform-init-manager.d.ts +0 -4
- package/lib/platform/init/platform-init-manager.d.ts.map +0 -1
- package/lib/platform/init/platform-init-manager.js +0 -24
- package/lib/platform/init/platform-init-manager.js.map +0 -1
- package/lib/platform/login/index.d.ts +0 -2
- package/lib/platform/login/index.d.ts.map +0 -1
- package/lib/platform/login/index.js +0 -68
- package/lib/platform/login/index.js.map +0 -1
- package/lib/platform/login/login-manager.d.ts +0 -15
- package/lib/platform/login/login-manager.d.ts.map +0 -1
- package/lib/platform/login/login-manager.js +0 -176
- package/lib/platform/login/login-manager.js.map +0 -1
- package/lib/platform/publish/index.d.ts +0 -2
- package/lib/platform/publish/index.d.ts.map +0 -1
- package/lib/platform/publish/index.js +0 -93
- package/lib/platform/publish/index.js.map +0 -1
- package/lib/platform/publish/platform-publish-manager.d.ts +0 -5
- package/lib/platform/publish/platform-publish-manager.d.ts.map +0 -1
- package/lib/platform/publish/platform-publish-manager.js +0 -115
- package/lib/platform/publish/platform-publish-manager.js.map +0 -1
- package/lib/plugin/index.d.ts +0 -20
- package/lib/plugin/index.d.ts.map +0 -1
- package/lib/plugin/index.js +0 -175
- package/lib/plugin/index.js.map +0 -1
- package/lib/s.d.ts +0 -2
- package/lib/s.d.ts.map +0 -1
- package/lib/s.js +0 -134
- package/lib/s.js.map +0 -1
- package/lib/search/search.d.ts +0 -2
- package/lib/search/search.d.ts.map +0 -1
- package/lib/search/search.js +0 -233
- package/lib/search/search.js.map +0 -1
- package/lib/set/analysis/index.d.ts +0 -2
- package/lib/set/analysis/index.d.ts.map +0 -1
- package/lib/set/analysis/index.js +0 -84
- package/lib/set/analysis/index.js.map +0 -1
- package/lib/set/index.d.ts +0 -2
- package/lib/set/index.d.ts.map +0 -1
- package/lib/set/index.js +0 -16
- package/lib/set/index.js.map +0 -1
- package/lib/set/language/index.d.ts +0 -2
- package/lib/set/language/index.d.ts.map +0 -1
- package/lib/set/language/index.js +0 -73
- package/lib/set/language/index.js.map +0 -1
- package/lib/set/output-color/index.d.ts +0 -2
- package/lib/set/output-color/index.d.ts.map +0 -1
- package/lib/set/output-color/index.js +0 -87
- package/lib/set/output-color/index.js.map +0 -1
- package/lib/utils/analysis.d.ts +0 -12
- package/lib/utils/analysis.d.ts.map +0 -1
- package/lib/utils/analysis.js +0 -42
- package/lib/utils/analysis.js.map +0 -1
- package/lib/utils/check-version.d.ts +0 -13
- package/lib/utils/check-version.d.ts.map +0 -1
- package/lib/utils/check-version.js +0 -241
- package/lib/utils/check-version.js.map +0 -1
- package/lib/utils/command.d.ts +0 -14
- package/lib/utils/command.d.ts.map +0 -1
- package/lib/utils/command.js +0 -251
- package/lib/utils/command.js.map +0 -1
- package/lib/utils/common.d.ts +0 -4
- package/lib/utils/common.d.ts.map +0 -1
- package/lib/utils/common.js +0 -50
- package/lib/utils/common.js.map +0 -1
- package/lib/utils/download-manager.d.ts +0 -23
- package/lib/utils/download-manager.d.ts.map +0 -1
- package/lib/utils/download-manager.js +0 -302
- package/lib/utils/download-manager.js.map +0 -1
- package/lib/utils/handler-set-config.d.ts +0 -14
- package/lib/utils/handler-set-config.d.ts.map +0 -1
- package/lib/utils/handler-set-config.js +0 -122
- package/lib/utils/handler-set-config.js.map +0 -1
- package/lib/utils/i18n.d.ts +0 -3
- package/lib/utils/i18n.d.ts.map +0 -1
- package/lib/utils/i18n.js +0 -21
- package/lib/utils/i18n.js.map +0 -1
- package/lib/utils/locales/en.json +0 -9
- package/lib/utils/locales/zh.json +0 -203
- package/lib/utils/logger.d.ts +0 -18
- package/lib/utils/logger.d.ts.map +0 -1
- package/lib/utils/logger.js +0 -196
- package/lib/utils/logger.js.map +0 -1
- package/lib/utils/package-type.d.ts +0 -6
- package/lib/utils/package-type.d.ts.map +0 -1
- package/lib/utils/package-type.js +0 -10
- package/lib/utils/package-type.js.map +0 -1
- package/lib/utils/parse.d.ts +0 -26
- package/lib/utils/parse.d.ts.map +0 -1
- package/lib/utils/parse.js +0 -229
- package/lib/utils/parse.js.map +0 -1
- package/lib/utils/repo-template-entity.d.ts +0 -12
- package/lib/utils/repo-template-entity.d.ts.map +0 -1
- package/lib/utils/repo-template-entity.js +0 -3
- package/lib/utils/repo-template-entity.js.map +0 -1
- package/lib/utils/start-service.d.ts +0 -22
- package/lib/utils/start-service.d.ts.map +0 -1
- package/lib/utils/start-service.js +0 -97
- package/lib/utils/start-service.js.map +0 -1
- package/lib/utils/storage.d.ts +0 -3
- package/lib/utils/storage.d.ts.map +0 -1
- package/lib/utils/storage.js +0 -23
- package/lib/utils/storage.js.map +0 -1
- package/lib/utils/url-parser.d.ts +0 -8
- package/lib/utils/url-parser.d.ts.map +0 -1
- package/lib/utils/url-parser.js +0 -58
- package/lib/utils/url-parser.js.map +0 -1
- package/scripts/tests/deploy/parse.ts +0 -0
- package/scripts/tests/download-manager-test.ts +0 -135
- package/scripts/tests/init-manager-test.ts +0 -232
- package/scripts/tests/url-parser-test.ts +0 -44
- package/src/command/command-manager.ts +0 -83
- package/src/command/index.ts +0 -42
- package/src/component/hook.ts +0 -88
- package/src/component/index.ts +0 -433
- package/src/config/add/add-manager.ts +0 -207
- package/src/config/add/index.ts +0 -45
- package/src/config/common/common.ts +0 -186
- package/src/config/delete/delete-manager.ts +0 -51
- package/src/config/delete/index.ts +0 -38
- package/src/config/get/get-manager.ts +0 -148
- package/src/config/get/index.ts +0 -49
- package/src/config/index.ts +0 -13
- package/src/config/update/index.ts +0 -46
- package/src/config/update/update-manager.ts +0 -120
- package/src/constants/static-variable.ts +0 -12
- package/src/entity.ts +0 -10
- package/src/error/command-error.ts +0 -7
- package/src/error/config-delete-error.ts +0 -7
- package/src/error/config-error.ts +0 -7
- package/src/error/config-get-error.ts +0 -7
- package/src/error/config-update-error.ts +0 -7
- package/src/error/init-error.ts +0 -7
- package/src/error/login-error.ts +0 -7
- package/src/error/platform-delete-error.ts +0 -7
- package/src/error/platform-init-error.ts +0 -7
- package/src/error/platform-publish-error.ts +0 -7
- package/src/error/search-error.ts +0 -7
- package/src/error/serverless-error.ts +0 -17
- package/src/error/set-analysis-error.ts +0 -7
- package/src/error/set-language-error.ts +0 -7
- package/src/gui/gui-service.ts +0 -183
- package/src/gui/index.ts +0 -26
- package/src/init/init-manager.ts +0 -104
- package/src/init/init-message.ts +0 -8
- package/src/init/init.ts +0 -56
- package/src/platform/delete/index.ts +0 -46
- package/src/platform/delete/platform-delete-manager.ts +0 -46
- package/src/platform/index.ts +0 -26
- package/src/platform/init/index.ts +0 -33
- package/src/platform/init/platform-init-manager.ts +0 -17
- package/src/platform/login/index.ts +0 -25
- package/src/platform/login/login-manager.ts +0 -121
- package/src/platform/publish/index.ts +0 -52
- package/src/platform/publish/platform-publish-manager.ts +0 -69
- package/src/plugin/index.ts +0 -96
- package/src/s.ts +0 -83
- package/src/search/search.ts +0 -127
- package/src/set/analysis/index.ts +0 -45
- package/src/set/index.ts +0 -19
- package/src/set/language/index.ts +0 -39
- package/src/set/output-color/index.ts +0 -49
- package/src/utils/analysis.ts +0 -36
- package/src/utils/check-version.ts +0 -139
- package/src/utils/command.ts +0 -123
- package/src/utils/common.ts +0 -47
- package/src/utils/download-manager.ts +0 -197
- package/src/utils/handler-set-config.ts +0 -83
- package/src/utils/i18n.ts +0 -21
- package/src/utils/locales/en.json +0 -9
- package/src/utils/locales/zh.json +0 -228
- package/src/utils/logger.ts +0 -84
- package/src/utils/package-type.ts +0 -3
- package/src/utils/parse.ts +0 -176
- package/src/utils/repo-template-entity.ts +0 -14
- package/src/utils/start-service.ts +0 -64
- package/src/utils/storage.ts +0 -20
- package/src/utils/url-parser.ts +0 -60
- package/templates/application/common/publish.yaml +0 -16
- package/templates/application/common/readme.md +0 -99
- package/templates/application/common/src/index.js +0 -13
- package/templates/application/common/src/template.yaml +0 -16
- package/templates/component/common/publish.yaml +0 -24
- package/templates/component/common/readme.md +0 -386
- package/templates/component/common/src/index.js +0 -18
- package/templates/component/common/src/package.json +0 -7
- package/templates/plugin/common/publish.yaml +0 -9
- package/templates/plugin/common/readme.md +0 -128
- package/templates/plugin/common/src/index.js +0 -9
|
@@ -1,282 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __values = (this && this.__values) || function(o) {
|
|
39
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
40
|
-
if (m) return m.call(o);
|
|
41
|
-
if (o && typeof o.length === "number") return {
|
|
42
|
-
next: function () {
|
|
43
|
-
if (o && i >= o.length) o = void 0;
|
|
44
|
-
return { value: o && o[i++], done: !o };
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.AddManager = void 0;
|
|
51
|
-
var path = require('path');
|
|
52
|
-
var os = require('os');
|
|
53
|
-
var inquirer = require('inquirer');
|
|
54
|
-
var fs = require('fs');
|
|
55
|
-
var yaml = require('js-yaml');
|
|
56
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
57
|
-
// @ts-ignore
|
|
58
|
-
var program = require("commander");
|
|
59
|
-
var i18n_1 = require("../../utils/i18n");
|
|
60
|
-
var logger_1 = require("../../utils/logger");
|
|
61
|
-
var config_error_1 = require("../../error/config-error");
|
|
62
|
-
var common_1 = require("../common/common");
|
|
63
|
-
function isEqualArray(rightFormat, inputFormat) {
|
|
64
|
-
if (!(rightFormat || inputFormat)) {
|
|
65
|
-
return false;
|
|
66
|
-
}
|
|
67
|
-
if (rightFormat.length !== inputFormat.length) {
|
|
68
|
-
return false;
|
|
69
|
-
}
|
|
70
|
-
rightFormat.forEach(function (item) {
|
|
71
|
-
if (!inputFormat.includes(item)) {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
var AddManager = /** @class */ (function () {
|
|
78
|
-
function AddManager() {
|
|
79
|
-
this.inputProviderAlias = '';
|
|
80
|
-
this.isRightFormat = true;
|
|
81
|
-
this.globalFilePath = path.join(os.homedir(), '.s/access.yaml');
|
|
82
|
-
this.inputFullData = {};
|
|
83
|
-
this.context = program.args;
|
|
84
|
-
}
|
|
85
|
-
AddManager.prototype.init = function (inputProviderAndAlisName, inputSecretCheck) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var inputSecretCheckKeys, providerAccessFormatSecret, inputSecretCheckKeys_1, inputSecretCheckKeys_1_1, item;
|
|
88
|
-
var e_1, _a;
|
|
89
|
-
return __generator(this, function (_b) {
|
|
90
|
-
switch (_b.label) {
|
|
91
|
-
case 0:
|
|
92
|
-
if (!(program.args.length > 0)) return [3 /*break*/, 1];
|
|
93
|
-
throw new config_error_1.ConfigError('Configuration failed');
|
|
94
|
-
case 1:
|
|
95
|
-
if (!inputProviderAndAlisName['Provider']) return [3 /*break*/, 2];
|
|
96
|
-
this.provider = String(inputProviderAndAlisName['Provider']).toLocaleLowerCase();
|
|
97
|
-
this.aliasName = String(inputProviderAndAlisName['AliasName'] || 'default').toLocaleLowerCase();
|
|
98
|
-
if (common_1.providerArray.indexOf(this.provider) === -1) {
|
|
99
|
-
throw new config_error_1.ConfigError('The cloud vendor[{{provider}}] was not found. [alibaba/aws/azure/baidu/google/huawei/tencent]', { provider: this.provider });
|
|
100
|
-
}
|
|
101
|
-
this.inputSecretID = {};
|
|
102
|
-
inputSecretCheckKeys = Object.keys(inputSecretCheck);
|
|
103
|
-
providerAccessFormatSecret = common_1.providerAccessFormat[this.provider];
|
|
104
|
-
//检查用户输入的秘钥的格式与对应云厂商的格式是否相同
|
|
105
|
-
if (isEqualArray(providerAccessFormatSecret, inputSecretCheckKeys)) {
|
|
106
|
-
try {
|
|
107
|
-
for (inputSecretCheckKeys_1 = __values(inputSecretCheckKeys), inputSecretCheckKeys_1_1 = inputSecretCheckKeys_1.next(); !inputSecretCheckKeys_1_1.done; inputSecretCheckKeys_1_1 = inputSecretCheckKeys_1.next()) {
|
|
108
|
-
item = inputSecretCheckKeys_1_1.value;
|
|
109
|
-
this.inputSecretID[item] = inputSecretCheck[item];
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
113
|
-
finally {
|
|
114
|
-
try {
|
|
115
|
-
if (inputSecretCheckKeys_1_1 && !inputSecretCheckKeys_1_1.done && (_a = inputSecretCheckKeys_1.return)) _a.call(inputSecretCheckKeys_1);
|
|
116
|
-
}
|
|
117
|
-
finally { if (e_1) throw e_1.error; }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
throw new config_error_1.ConfigError('Please Input Right Secret Format: [{{providerAccessFormatSecret}}]', { providerAccessFormatSecret: providerAccessFormatSecret });
|
|
122
|
-
}
|
|
123
|
-
return [3 /*break*/, 4];
|
|
124
|
-
case 2: return [4 /*yield*/, this.inputLengthZero()];
|
|
125
|
-
case 3:
|
|
126
|
-
_b.sent();
|
|
127
|
-
_b.label = 4;
|
|
128
|
-
case 4: return [4 /*yield*/, this.checkInputSecretID()];
|
|
129
|
-
case 5:
|
|
130
|
-
_b.sent();
|
|
131
|
-
this.inputProviderAlias = this.provider + "." + (this.aliasName || 'default');
|
|
132
|
-
this.inputFullData[this.inputProviderAlias] = this.inputSecretID;
|
|
133
|
-
this.writeData(this.globalFilePath, this.inputFullData);
|
|
134
|
-
return [2 /*return*/];
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
};
|
|
139
|
-
AddManager.prototype.output = function () {
|
|
140
|
-
logger_1.default.log('');
|
|
141
|
-
logger_1.default.info(i18n_1.default.__(' Provider: {{provider}}', { provider: common_1.providerObject[this.provider] + " (" + this.provider + ")" }));
|
|
142
|
-
if (this.aliasName) {
|
|
143
|
-
logger_1.default.info(i18n_1.default.__(' Alias: {{alias}}', { alias: this.aliasName }));
|
|
144
|
-
}
|
|
145
|
-
// eslint-disable-next-line guard-for-in
|
|
146
|
-
for (var item in this.inputSecretID) {
|
|
147
|
-
logger_1.default.info(" " + item + ": " + this.inputSecretID[item]);
|
|
148
|
-
}
|
|
149
|
-
logger_1.default.log('');
|
|
150
|
-
};
|
|
151
|
-
// 用户输入参数为0的时候
|
|
152
|
-
AddManager.prototype.inputLengthZero = function (provider) {
|
|
153
|
-
if (provider === void 0) { provider = undefined; }
|
|
154
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
155
|
-
var _this = this;
|
|
156
|
-
return __generator(this, function (_a) {
|
|
157
|
-
switch (_a.label) {
|
|
158
|
-
case 0:
|
|
159
|
-
if (!!provider) return [3 /*break*/, 2];
|
|
160
|
-
return [4 /*yield*/, inquirer.prompt(common_1.checkProviderList).then(function (answers) {
|
|
161
|
-
_this.provider = answers.provider;
|
|
162
|
-
})];
|
|
163
|
-
case 1:
|
|
164
|
-
_a.sent();
|
|
165
|
-
return [3 /*break*/, 3];
|
|
166
|
-
case 2:
|
|
167
|
-
this.provider = provider.toLocaleLowerCase();
|
|
168
|
-
_a.label = 3;
|
|
169
|
-
case 3:
|
|
170
|
-
if (!common_1.providerArray.includes(this.provider)) {
|
|
171
|
-
throw new config_error_1.ConfigError('The cloud vendor[{{provider}}] was not found. [alibaba/aws/azure/baidu/google/huawei/tencent]', { provider: this.provider });
|
|
172
|
-
}
|
|
173
|
-
try {
|
|
174
|
-
Object.keys(common_1.providerCollection).forEach(function (item) {
|
|
175
|
-
if (item === _this.provider) {
|
|
176
|
-
_this.promptList = common_1.providerCollection[item];
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
this.promptList.push({
|
|
180
|
-
type: 'input',
|
|
181
|
-
message: i18n_1.default.__('Please create alias for key pair. If not, please enter to skip'),
|
|
182
|
-
name: 'aliasName',
|
|
183
|
-
default: 'default' // 默认值
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
catch (err) {
|
|
187
|
-
throw new config_error_1.ConfigError(err.message);
|
|
188
|
-
}
|
|
189
|
-
return [4 /*yield*/, inquirer.prompt(this.promptList).then(function (answers) {
|
|
190
|
-
_this.inputSecretID = answers;
|
|
191
|
-
})];
|
|
192
|
-
case 4:
|
|
193
|
-
_a.sent();
|
|
194
|
-
Object.keys(this.inputSecretID).forEach(function (item) {
|
|
195
|
-
if (item === 'aliasName') {
|
|
196
|
-
_this.aliasName = _this.inputSecretID[item];
|
|
197
|
-
delete _this.inputSecretID[item];
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
this.inputProviderAlias = this.provider + '.' + this.aliasName || 'default';
|
|
201
|
-
return [2 /*return*/, this.inputSecretID];
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
};
|
|
206
|
-
// 检查用户输入的输入的inputSecretID是否为空值
|
|
207
|
-
AddManager.prototype.checkInputSecretID = function () {
|
|
208
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
209
|
-
var item, isTrue;
|
|
210
|
-
return __generator(this, function (_a) {
|
|
211
|
-
// eslint-disable-next-line guard-for-in
|
|
212
|
-
for (item in this.inputSecretID) {
|
|
213
|
-
isTrue = String(typeof this.inputSecretID[item]) === 'string';
|
|
214
|
-
{
|
|
215
|
-
if (!this.inputSecretID[item] || !isTrue) {
|
|
216
|
-
throw new config_error_1.ConfigError('The Provider[{{provider}}]: key[{{key}}] is required.', { provider: common_1.providerObject[this.provider], key: item });
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return [2 /*return*/];
|
|
221
|
-
});
|
|
222
|
-
});
|
|
223
|
-
};
|
|
224
|
-
AddManager.prototype.writeFileWay = function (filePath, text) {
|
|
225
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
226
|
-
var err_1;
|
|
227
|
-
return __generator(this, function (_a) {
|
|
228
|
-
switch (_a.label) {
|
|
229
|
-
case 0:
|
|
230
|
-
this.output();
|
|
231
|
-
_a.label = 1;
|
|
232
|
-
case 1:
|
|
233
|
-
_a.trys.push([1, 3, , 4]);
|
|
234
|
-
return [4 /*yield*/, fs.writeFileSync(filePath, yaml.dump(text))];
|
|
235
|
-
case 2:
|
|
236
|
-
_a.sent();
|
|
237
|
-
return [3 /*break*/, 4];
|
|
238
|
-
case 3:
|
|
239
|
-
err_1 = _a.sent();
|
|
240
|
-
throw new config_error_1.ConfigError('Configuration failed');
|
|
241
|
-
case 4: return [2 /*return*/];
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
AddManager.prototype.writeData = function (filePath, text) {
|
|
247
|
-
var isExists = fs.existsSync(filePath);
|
|
248
|
-
// 当前文件不存在
|
|
249
|
-
if (!isExists) {
|
|
250
|
-
this.writeFileWay(filePath, text);
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
var userInformation = yaml.safeLoad(fs.readFileSync(filePath, 'utf8'));
|
|
254
|
-
// 文件存在,且不为空;
|
|
255
|
-
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
256
|
-
if (userInformation != null) {
|
|
257
|
-
var userProviderAlias = Object.keys(userInformation);
|
|
258
|
-
var isExistProviderAlias = userProviderAlias.includes(this.inputProviderAlias);
|
|
259
|
-
//全局配置是否含有用户输入的provider.alias
|
|
260
|
-
if (isExistProviderAlias) {
|
|
261
|
-
throw new config_error_1.ConfigError('Provider + Alias already exists. You can set a different alias or modify it through: {{input}}', { input: "s config update -p " + this.provider + " -a " + (this.aliasName || 'default') });
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
try {
|
|
265
|
-
fs.appendFileSync(filePath, yaml.dump(text));
|
|
266
|
-
this.output();
|
|
267
|
-
logger_1.default.success('Configuration successful');
|
|
268
|
-
}
|
|
269
|
-
catch (err) {
|
|
270
|
-
throw new config_error_1.ConfigError('Configuration failed');
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
this.writeFileWay(filePath, text);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
};
|
|
279
|
-
return AddManager;
|
|
280
|
-
}());
|
|
281
|
-
exports.AddManager = AddManager;
|
|
282
|
-
//# sourceMappingURL=add-manager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"add-manager.js","sourceRoot":"","sources":["../../../src/config/add/add-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,IAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,IAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACrC,IAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,IAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAChC,6DAA6D;AAC7D,aAAa;AACb,mCAAqC;AACrC,yCAAoC;AACpC,6CAAwC;AACxC,yDAAuD;AACvD,2CAA8H;AAE9H,SAAS,YAAY,CAAC,WAA0B,EAAE,WAA0B;IAC1E,IAA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IAAI;wBACF,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;wBAC7C,IAAI,CAAC,MAAM,EAAE,CAAC;wBACd,gBAAM,CAAC,OAAO,CAAC,0BAA0B,CAAC,CAAC;qBAC5C;oBAAC,OAAO,GAAG,EAAE;wBACZ,MAAM,IAAI,0BAAW,CAAC,sBAAsB,CAAC,CAAC;qBAC/C;iBACF;aACF;iBAAM;gBACL,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;aACnC;SACF;IACH,CAAC;IACH,iBAAC;AAAD,CAAC,AAhLD,IAgLC;AAhLY,gCAAU"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/config/add/index.ts"],"names":[],"mappings":""}
|
package/lib/config/add/index.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var program = require("commander");
|
|
40
|
-
var add_manager_1 = require("./add-manager");
|
|
41
|
-
var i18n_1 = require("../../utils/i18n");
|
|
42
|
-
var common_1 = require("../common/common");
|
|
43
|
-
var command_error_1 = require("../../error/command-error");
|
|
44
|
-
var description = i18n_1.default.__('s config add help');
|
|
45
|
-
program
|
|
46
|
-
.name('s config add')
|
|
47
|
-
.usage('[options] [name]')
|
|
48
|
-
.helpOption('-h, --help', i18n_1.default.__('Display help for command'))
|
|
49
|
-
.option('-p, --provider [name]', i18n_1.default.__('The cloud service provider. [alibaba/aws/azure/baidu/google/huawei/tencent]'))
|
|
50
|
-
.option('-a, --alias-name [name]', i18n_1.default.__('Key pair alias, if the alias is not set, use default instead'))
|
|
51
|
-
.option('--AccountID [name]', i18n_1.default.__('Configure the AccountID'))
|
|
52
|
-
.option('--AccessKeyID [name]', i18n_1.default.__('Configure the AccessKeyID'))
|
|
53
|
-
.option('--AccessKeySecret [name]', i18n_1.default.__('Configure the AccessKeySecret'))
|
|
54
|
-
.option('--SecretID [name]', i18n_1.default.__('Configure the SecretID'))
|
|
55
|
-
.option('--SecretKey [name]', i18n_1.default.__('Configure the SecretKey'))
|
|
56
|
-
.option('--SecretAccessKey [name]', i18n_1.default.__('Configure the SecretAccessKey'))
|
|
57
|
-
.option('--KeyVault [name]', i18n_1.default.__('Configure the KeyVault'))
|
|
58
|
-
.option('--Secret [name]', i18n_1.default.__('Configure the Secret'))
|
|
59
|
-
.option('--PrivateKeyData [name]', i18n_1.default.__('Configure the PrivateKeyData'))
|
|
60
|
-
.description(description)
|
|
61
|
-
.parse(process.argv);
|
|
62
|
-
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
-
return __generator(this, function (_a) {
|
|
64
|
-
switch (_a.label) {
|
|
65
|
-
case 0: return [4 /*yield*/, new add_manager_1.AddManager().init({
|
|
66
|
-
Provider: program.provider,
|
|
67
|
-
AliasName: program.aliasName
|
|
68
|
-
}, common_1.getInputData(program))];
|
|
69
|
-
case 1:
|
|
70
|
-
_a.sent();
|
|
71
|
-
return [2 /*return*/];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}); })().catch(function (err) {
|
|
75
|
-
throw new command_error_1.CommandError(err.message);
|
|
76
|
-
});
|
|
77
|
-
//# source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AM,CAAC,yBAAyB,EAAE,cAAI,CAAC,EAAE,CAAC,8BAA8B,CAAC,CAAC;KAC1E,WAAW,CAAC,WAAW,CAAC;KACxB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAEvB,CAAC;;;oBACC,qBAAM,IAAI,wBAAU,EAAE,CAAC,IAAI,CACzB;oBACE,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,SAAS,EAAE,OAAO,CAAC,SAAS;iBAC7B,EACD,qBAAY,CAAC,OAAO,CAAC,CACtB,EAAA;;gBAND,SAMC,CAAC;;;;KACH,CAAC,EAAE,CAAC,KAAK,CAAC,UAAC,GAAG;IACb,MAAM,IAAI,4BAAY,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export declare const providerArray: Array<string>;
|
|
2
|
-
export declare const providerObject: any;
|
|
3
|
-
export declare const providerCollection: any;
|
|
4
|
-
export declare const providerAccessFormat: any;
|
|
5
|
-
export declare const checkProviderList: Array<any>;
|
|
6
|
-
export declare function getInputData(program: any): any;
|
|
7
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/config/common/common.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,MAAM,CAAuE,CAAC;AAEhH,eAAO,MAAM,cAAc,EAAE,GAQ5B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,GAyHhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,GAQlC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,GAAG,CAexC,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,OAqBxC"}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getInputData = exports.checkProviderList = exports.providerAccessFormat = exports.providerCollection = exports.providerObject = exports.providerArray = void 0;
|
|
4
|
-
var i18n_1 = require("../../utils/i18n");
|
|
5
|
-
exports.providerArray = ['alibaba', 'baidu', 'huawei', 'aws', 'azure', 'google', 'tencent'];
|
|
6
|
-
exports.providerObject = {
|
|
7
|
-
alibaba: i18n_1.default.__('Alibaba Cloud'),
|
|
8
|
-
baidu: i18n_1.default.__('Baidu Cloud'),
|
|
9
|
-
huawei: i18n_1.default.__('Huawei Cloud'),
|
|
10
|
-
aws: i18n_1.default.__('AWS Cloud'),
|
|
11
|
-
azure: i18n_1.default.__('Azure Cloud'),
|
|
12
|
-
google: i18n_1.default.__('Google Cloud'),
|
|
13
|
-
tencent: i18n_1.default.__('Tencent Cloud')
|
|
14
|
-
};
|
|
15
|
-
exports.providerCollection = {
|
|
16
|
-
alibaba: [
|
|
17
|
-
{
|
|
18
|
-
type: 'input',
|
|
19
|
-
message: 'AccountID',
|
|
20
|
-
name: 'AccountID',
|
|
21
|
-
default: '' // 默认值
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
type: 'input',
|
|
25
|
-
message: 'AccessKeyID',
|
|
26
|
-
name: 'AccessKeyID',
|
|
27
|
-
default: '' // 默认值
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
type: 'input',
|
|
31
|
-
message: 'AccessKeySecret',
|
|
32
|
-
name: 'AccessKeySecret',
|
|
33
|
-
default: '' // 默认值
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
aws: [
|
|
37
|
-
{
|
|
38
|
-
type: 'input',
|
|
39
|
-
message: 'AccessKeyID',
|
|
40
|
-
name: 'AccessKeyID',
|
|
41
|
-
default: '' // 默认值
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: 'input',
|
|
45
|
-
message: 'SecretAccessKey',
|
|
46
|
-
name: 'SecretAccessKey',
|
|
47
|
-
default: '' // 默认值
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
huawei: [
|
|
51
|
-
{
|
|
52
|
-
type: 'input',
|
|
53
|
-
message: 'AccessKeyID',
|
|
54
|
-
name: 'AccessKeyID',
|
|
55
|
-
default: '' // 默认值
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
type: 'input',
|
|
59
|
-
message: 'SecretAccessKey',
|
|
60
|
-
name: 'SecretAccessKey',
|
|
61
|
-
default: '' // 默认值
|
|
62
|
-
}
|
|
63
|
-
],
|
|
64
|
-
azure: [
|
|
65
|
-
{
|
|
66
|
-
type: 'input',
|
|
67
|
-
message: 'KeyVault',
|
|
68
|
-
name: 'KeyVault',
|
|
69
|
-
default: '' // 默认值
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
type: 'input',
|
|
73
|
-
message: 'Secret',
|
|
74
|
-
name: 'Secret',
|
|
75
|
-
default: '' // 默认值
|
|
76
|
-
}
|
|
77
|
-
],
|
|
78
|
-
baidu: [
|
|
79
|
-
{
|
|
80
|
-
type: 'input',
|
|
81
|
-
message: 'AccessKeyID',
|
|
82
|
-
name: 'AccessKeyID',
|
|
83
|
-
default: '' // 默认值
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
type: 'input',
|
|
87
|
-
message: 'SecretAccessKey',
|
|
88
|
-
name: 'SecretAccessKey',
|
|
89
|
-
default: '' // 默认值
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
google: [
|
|
93
|
-
{
|
|
94
|
-
type: 'input',
|
|
95
|
-
message: 'AccountID',
|
|
96
|
-
name: 'AccountID',
|
|
97
|
-
default: '' // 默认值
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
type: 'input',
|
|
101
|
-
message: 'PrivateKeyData',
|
|
102
|
-
name: 'PrivateKeyData',
|
|
103
|
-
default: '' // 默认值
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
tencent: [
|
|
107
|
-
{
|
|
108
|
-
type: 'input',
|
|
109
|
-
message: 'AccountID',
|
|
110
|
-
name: 'AccountID',
|
|
111
|
-
default: '' // 默认值
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
type: 'input',
|
|
115
|
-
message: 'SecretID',
|
|
116
|
-
name: 'SecretID',
|
|
117
|
-
default: '' // 默认值
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
type: 'input',
|
|
121
|
-
message: 'SecretKey',
|
|
122
|
-
name: 'SecretKey',
|
|
123
|
-
default: '' // 默认值
|
|
124
|
-
}
|
|
125
|
-
]
|
|
126
|
-
};
|
|
127
|
-
exports.providerAccessFormat = {
|
|
128
|
-
alibaba: ['AccountID', 'AccessKeyID', 'AccessKeySecret'],
|
|
129
|
-
aws: ['AccessKeyID', 'SecretAccessKey'],
|
|
130
|
-
baidu: ['AccessKeyID', 'SecretAccessKey'],
|
|
131
|
-
huawei: ['AccessKeyID', 'SecretAccessKey'],
|
|
132
|
-
azure: ['KeyVault', 'Secret'],
|
|
133
|
-
tencent: ['AccountID', 'SecretID', 'SecretKey'],
|
|
134
|
-
google: ['AccountID', 'PrivateKeyData']
|
|
135
|
-
};
|
|
136
|
-
exports.checkProviderList = [
|
|
137
|
-
{
|
|
138
|
-
type: 'list',
|
|
139
|
-
name: 'provider',
|
|
140
|
-
message: i18n_1.default.__('Please select a provider:'),
|
|
141
|
-
choices: [
|
|
142
|
-
{ name: i18n_1.default.__('Alibaba Cloud (alibaba)'), value: 'alibaba' },
|
|
143
|
-
{ name: i18n_1.default.__('AWS (aws)'), value: 'aws' },
|
|
144
|
-
{ name: i18n_1.default.__('Azure (azure)'), value: 'azure' },
|
|
145
|
-
{ name: i18n_1.default.__('Baidu Cloud (baidu)'), value: 'baidu' },
|
|
146
|
-
{ name: i18n_1.default.__('Google Cloud (google)'), value: 'google' },
|
|
147
|
-
{ name: i18n_1.default.__('Huawei Cloud (huawei)'), value: 'huawei' },
|
|
148
|
-
{ name: i18n_1.default.__('Tencent Cloud (tencent)'), value: 'tencent' }
|
|
149
|
-
]
|
|
150
|
-
}
|
|
151
|
-
];
|
|
152
|
-
function getInputData(program) {
|
|
153
|
-
var inputSecretCheck = {};
|
|
154
|
-
if (program.AccountID) {
|
|
155
|
-
inputSecretCheck['AccountID'] = program.AccountID;
|
|
156
|
-
}
|
|
157
|
-
if (program.AccessKeyID) {
|
|
158
|
-
inputSecretCheck['AccessKeyID'] = program.AccessKeyID;
|
|
159
|
-
}
|
|
160
|
-
if (program.AccessKeySecret) {
|
|
161
|
-
inputSecretCheck['AccessKeySecret'] = program.AccessKeySecret;
|
|
162
|
-
}
|
|
163
|
-
if (program.SecretID) {
|
|
164
|
-
inputSecretCheck['SecretID'] = program.SecretID;
|
|
165
|
-
}
|
|
166
|
-
if (program.SecretKey) {
|
|
167
|
-
inputSecretCheck['SecretKey'] = program.SecretKey;
|
|
168
|
-
}
|
|
169
|
-
if (program.SecretAccessKey) {
|
|
170
|
-
inputSecretCheck['SecretAccessKey'] = program.SecretAccessKey;
|
|
171
|
-
}
|
|
172
|
-
return inputSecretCheck;
|
|
173
|
-
}
|
|
174
|
-
exports.getInputData = getInputData;
|
|
175
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/config/common/common.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AAEvB,QAAA,aAAa,GAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;AAEnG,QAAA,cAAc,GAAQ;IACjC,OAAO,EAAE,cAAI,CAAC,EAAE,CAAC,eAAe,CAAC;IACjC,KAAK,EAAE,cAAI,CAAC,EAAE,CAAC,aAAa,CAAC;IAC7B,MAAM,EAAE,cAAI,CAAC,EAAE,CAAC,cAAc,CAAC;IAC/B,GAAG,EAAE,cAAI,CAAC,EAAE,CAAC,WAAW,CAAC;IACzB,KA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CAAC,WAAW,EAAE;QACvB,gBAAgB,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;KACvD;IACD,IAAI,OAAO,CAAC,eAAe,EAAE;QAC3B,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;KAC/D;IACD,IAAI,OAAO,CAAC,QAAQ,EAAE;QACpB,gBAAgB,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;KACjD;IACD,IAAI,OAAO,CAAC,SAAS,EAAE;QACrB,gBAAgB,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;KACnD;IACD,IAAI,OAAO,CAAC,eAAe,EAAE;QAC3B,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;KAC/D;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AArBD,oCAqBC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class DeleteManager {
|
|
2
|
-
protected findProviderAliasFlag: boolean;
|
|
3
|
-
protected globalPath: string;
|
|
4
|
-
protected provider: string;
|
|
5
|
-
protected aliasName: string;
|
|
6
|
-
protected inputProviderAlias: string;
|
|
7
|
-
constructor();
|
|
8
|
-
init(providerAlias: any): Promise<void>;
|
|
9
|
-
isSuccessDle(userInformation: any): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=delete-manager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-manager.d.ts","sourceRoot":"","sources":["../../../src/config/delete/delete-manager.ts"],"names":[],"mappings":"AAOA,qBAAa,aAAa;IACxB,SAAS,CAAC,qBAAqB,UAAQ;IACvC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;IAC7B,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,SAAS,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAC;;IAK/B,IAAI,CAAC,aAAa,EAAE,GAAG;IAyBvB,YAAY,CAAC,eAAe,EAAE,GAAG;CAQxC"}
|