zcatalyst-cli 1.12.1 → 1.13.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/lib/apig-utils.js +39 -39
- package/lib/archiver.js +13 -9
- package/lib/authentication/index.js +22 -18
- package/lib/authentication/login.js +32 -32
- package/lib/bin/catalyst.js +15 -15
- package/lib/cli_table/src/cell.js +26 -26
- package/lib/cli_table/src/layout-manager.js +44 -45
- package/lib/cli_table/src/table.js +9 -9
- package/lib/cli_table/src/utils.js +35 -36
- package/lib/client-utils.js +18 -18
- package/lib/client.js +1 -1
- package/lib/command_needs/auth.js +7 -7
- package/lib/command_needs/rc.js +24 -24
- package/lib/commands/apig/disable.js +5 -5
- package/lib/commands/apig/enable.js +5 -5
- package/lib/commands/apig/status.js +9 -9
- package/lib/commands/client/delete.js +18 -18
- package/lib/commands/client/setup.js +8 -4
- package/lib/commands/deploy.js +18 -14
- package/lib/commands/ds/export.js +11 -11
- package/lib/commands/ds/import.js +12 -12
- package/lib/commands/ds/status.js +10 -10
- package/lib/commands/event/generate/index.js +21 -17
- package/lib/commands/event/generate/integ.js +7 -3
- package/lib/commands/functions/add.js +8 -4
- package/lib/commands/functions/config.js +5 -5
- package/lib/commands/functions/delete.js +20 -20
- package/lib/commands/functions/setup.js +8 -4
- package/lib/commands/functions/shell.js +7 -3
- package/lib/commands/help.js +4 -4
- package/lib/commands/iac/export.js +8 -8
- package/lib/commands/iac/import.js +23 -19
- package/lib/commands/iac/pack.js +15 -11
- package/lib/commands/iac/status.js +6 -2
- package/lib/commands/index.js +5 -1
- package/lib/commands/init.js +14 -10
- package/lib/commands/login.js +5 -1
- package/lib/commands/logout.js +5 -1
- package/lib/commands/project/list.js +14 -10
- package/lib/commands/project/reset.js +5 -5
- package/lib/commands/project/use.js +9 -9
- package/lib/commands/pull.js +18 -14
- package/lib/commands/run.js +13 -9
- package/lib/commands/serve.js +5 -1
- package/lib/commands/token/generate.js +6 -2
- package/lib/commands/token/list.js +7 -3
- package/lib/commands/token/revoke.js +6 -2
- package/lib/commands/whoami.js +3 -3
- package/lib/dc.js +2 -2
- package/lib/deploy/features/apig.js +6 -6
- package/lib/deploy/features/client.js +1 -1
- package/lib/deploy/features/functions/index.js +9 -9
- package/lib/deploy/features/index.js +5 -1
- package/lib/deploy/index.js +2 -2
- package/lib/endpoints/index.js +17 -13
- package/lib/endpoints/lib/apig.js +5 -5
- package/lib/endpoints/lib/applogic.js +4 -4
- package/lib/endpoints/lib/cache.js +3 -3
- package/lib/endpoints/lib/catalyst-details.js +1 -1
- package/lib/endpoints/lib/client.js +5 -5
- package/lib/endpoints/lib/datastore.js +2 -2
- package/lib/endpoints/lib/ds-bulk.js +5 -5
- package/lib/endpoints/lib/env.js +1 -1
- package/lib/endpoints/lib/event-bus.js +1 -1
- package/lib/endpoints/lib/filestore.js +2 -2
- package/lib/endpoints/lib/functions.js +4 -4
- package/lib/endpoints/lib/iac.js +10 -10
- package/lib/endpoints/lib/project.js +20 -5
- package/lib/endpoints/lib/queue.js +3 -3
- package/lib/endpoints/lib/sdk.js +1 -1
- package/lib/endpoints/lib/zcql.js +1 -1
- package/lib/error.js +1 -1
- package/lib/errorOut.js +2 -2
- package/lib/event_generate/cache.js +5 -5
- package/lib/event_generate/custom.js +2 -2
- package/lib/event_generate/datastore.js +5 -5
- package/lib/event_generate/filestore.js +5 -5
- package/lib/event_generate/integration/cliq.js +3 -3
- package/lib/event_generate/user.js +1 -1
- package/lib/event_generate/webapp.js +5 -5
- package/lib/execute-script.js +19 -15
- package/lib/express_middlewares/authenticator.js +32 -5
- package/lib/express_middlewares/logger.js +2 -2
- package/lib/express_middlewares/unknownReqProxy.js +1 -1
- package/lib/fn-utils/index.js +5 -1
- package/lib/fn-utils/lib/common.js +44 -44
- package/lib/fn-utils/lib/integ.js +9 -9
- package/lib/fn-utils/lib/java.js +46 -46
- package/lib/fn-utils/lib/node.js +7 -7
- package/lib/fn-watcher.js +9 -11
- package/lib/iac/status/bundle.js +5 -5
- package/lib/iac/status/deploy.js +4 -4
- package/lib/index.js +2 -2
- package/lib/init/dependencies/npm-install.js +1 -1
- package/lib/init/dependencies/package-json.js +6 -6
- package/lib/init/features/client/index.js +5 -1
- package/lib/init/features/client/initializers/angular.js +16 -12
- package/lib/init/features/client/initializers/basic.js +10 -6
- package/lib/init/features/client/initializers/lyte.js +11 -7
- package/lib/init/features/client/initializers/react.js +13 -9
- package/lib/init/features/functions/index.js +9 -9
- package/lib/init/features/functions/languages/java.js +10 -10
- package/lib/init/features/functions/languages/node.js +9 -9
- package/lib/init/features/index.js +12 -8
- package/lib/init/features/project.js +20 -20
- package/lib/init/index.js +2 -2
- package/lib/init/util/client.js +7 -3
- package/lib/init/util/functions.js +1 -1
- package/lib/init/util/project.js +4 -4
- package/lib/internal/api.js +19 -19
- package/lib/internal/command.js +20 -16
- package/lib/internal/config.js +5 -5
- package/lib/internal/credential.js +10 -10
- package/lib/internal/crypt.js +5 -5
- package/lib/internal/rc.js +5 -5
- package/lib/migration/global/1.6.2.js +3 -3
- package/lib/migration/index.js +22 -18
- package/lib/option-filter.js +34 -30
- package/lib/optional-import.js +12 -8
- package/lib/plugin-loader.js +7 -3
- package/lib/port-resolver.js +4 -4
- package/lib/progress.js +2 -2
- package/lib/prompt/index.js +5 -1
- package/lib/prompt/types/file-path.js +1 -1
- package/lib/pull/features/apig.js +9 -9
- package/lib/pull/features/client.js +7 -7
- package/lib/pull/features/functions/index.js +14 -14
- package/lib/pull/features/index.js +5 -1
- package/lib/pull/index.js +4 -4
- package/lib/repl-server.js +2 -2
- package/lib/serve/features/apig.js +1 -1
- package/lib/serve/features/index.js +8 -4
- package/lib/serve/index.js +15 -11
- package/lib/serve/server/index.js +34 -27
- package/lib/serve/server/lib/java/JavaaioServer.java +2 -1
- package/lib/serve/server/lib/java/lib/catalyst-cli-java-runtime-1.0.0.jar +0 -0
- package/lib/serve/server/lib/java/lib/catalyst-java-runtime-1.0.0.jar +0 -0
- package/lib/serve/server/lib/java/lib/zip4j-2.5.0.jar +0 -0
- package/lib/serve/server/lib/master.js +26 -15
- package/lib/serve/server/lib/node.js +7 -3
- package/lib/serve/server/lib/web_client/index.js +3 -3
- package/lib/serve/server/lib/web_client/server.js +17 -17
- package/lib/shell/dependencies/http-functions.js +38 -33
- package/lib/shell/dependencies/invoker/bio/java/JavabioInvoker.java +7 -2
- package/lib/shell/dependencies/invoker/cron/java/JavacronInvoker.java +7 -2
- package/lib/shell/dependencies/invoker/event/java/JavaeventInvoker.java +7 -2
- package/lib/shell/dependencies/invoker/integ/java/JavaintegInvoker.java +7 -2
- package/lib/shell/dependencies/invoker/integ/node.js +8 -4
- package/lib/shell/dependencies/local-function.js +44 -40
- package/lib/shell/index.js +12 -12
- package/lib/shell/prepare/index.js +2 -2
- package/lib/shell/prepare/languages/index.js +5 -1
- package/lib/shell/prepare/languages/java.js +1 -1
- package/lib/throbber/index.js +17 -17
- package/lib/throbber/utils.js +9 -9
- package/lib/track.js +7 -7
- package/lib/util_modules/config/index.js +5 -1
- package/lib/util_modules/constants/lib/auth.js +6 -6
- package/lib/util_modules/constants/lib/cliq-handlers.js +2 -2
- package/lib/util_modules/constants/lib/template.js +21 -21
- package/lib/util_modules/constants/lib/urls.js +11 -11
- package/lib/util_modules/context-help.js +15 -15
- package/lib/util_modules/fs/index.js +5 -1
- package/lib/util_modules/fs/lib/async.js +4 -4
- package/lib/util_modules/fs/utils.js +1 -1
- package/lib/util_modules/logger.js +2 -2
- package/lib/util_modules/parser/toml.js +1 -1
- package/lib/util_modules/project.js +6 -6
- package/lib/util_modules/shell.js +4 -4
- package/lib/winston.js +5 -5
- package/package.json +39 -39
- package/scripts/postInstall.js +7 -6
- package/docs/.DS_Store +0 -0
- package/lib/serve/server/lib/java/lib/catalyst-function-sdk-1.0.0.jar +0 -0
- package/templates/.DS_Store +0 -0
- package/templates/init/.DS_Store +0 -0
- package/templates/init/client/.DS_Store +0 -0
- package/templates/init/client/react/.DS_Store +0 -0
- package/templates/init/functions/node/integ/cliq/.DS_Store +0 -0
package/lib/commands/whoami.js
CHANGED
|
@@ -20,13 +20,13 @@ const logger_1 = require("../util_modules/logger");
|
|
|
20
20
|
exports.default = new command_1.default('whoami')
|
|
21
21
|
.description('Print the email address of the user currently logged in')
|
|
22
22
|
.action(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
-
const activeDC = dc_1.getActiveDC();
|
|
23
|
+
const activeDC = (0, dc_1.getActiveDC)();
|
|
24
24
|
const user = config_store_1.default.get(`${activeDC}.user`);
|
|
25
25
|
const token = config_store_1.default.get(`${activeDC}.credential`);
|
|
26
26
|
if (user && token) {
|
|
27
|
-
logger_1.success('Logged as: ' + ansi_colors_1.cyan.bold(user.Email));
|
|
27
|
+
(0, logger_1.success)('Logged as: ' + ansi_colors_1.cyan.bold(user.Email));
|
|
28
28
|
return user;
|
|
29
29
|
}
|
|
30
|
-
logger_1.error('Not logged in yet. To login use ' + ansi_colors_1.underline.bold('catalyst login'));
|
|
30
|
+
(0, logger_1.error)('Not logged in yet. To login use ' + ansi_colors_1.underline.bold('catalyst login'));
|
|
31
31
|
return;
|
|
32
32
|
}));
|
package/lib/dc.js
CHANGED
|
@@ -14,7 +14,7 @@ function getActiveDC() {
|
|
|
14
14
|
if (process.env[envname] !== undefined) {
|
|
15
15
|
return process.env[envname];
|
|
16
16
|
}
|
|
17
|
-
let dcOption = option_1.getGlobalOptionValue('dc');
|
|
17
|
+
let dcOption = (0, option_1.getGlobalOptionValue)('dc');
|
|
18
18
|
if (dcOption === undefined) {
|
|
19
19
|
const argv = process.argv.slice(2);
|
|
20
20
|
const dcIdx = argv.indexOf('--dc');
|
|
@@ -29,7 +29,7 @@ function getActiveDC() {
|
|
|
29
29
|
errorId: 'DC-1',
|
|
30
30
|
arg: [
|
|
31
31
|
ansi_colors_1.bold.red(dcOption),
|
|
32
|
-
ansi_colors_1.bold(Object.keys(constants_1.DC_TYPE)
|
|
32
|
+
(0, ansi_colors_1.bold)(Object.keys(constants_1.DC_TYPE)
|
|
33
33
|
.map((dc) => '* ' + dc)
|
|
34
34
|
.join('\n'))
|
|
35
35
|
]
|
|
@@ -21,11 +21,11 @@ const config_1 = require("../../util_modules/config");
|
|
|
21
21
|
const constants_1 = require("../../util_modules/constants");
|
|
22
22
|
const logger_1 = require("../../util_modules/logger");
|
|
23
23
|
exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
-
const api = yield endpoints_1.apigAPI();
|
|
24
|
+
const api = yield (0, endpoints_1.apigAPI)();
|
|
25
25
|
const response = (yield api.getAPIGStatus());
|
|
26
26
|
if (response.scheduled) {
|
|
27
|
-
logger_1.labeled('apig', 'Skipping deploy since previous schedule is not over yet.').ERROR();
|
|
28
|
-
logger_1.labeled('apig', 'You can deploy apig separately using "--only apig" option next time.').MESSAGE();
|
|
27
|
+
(0, logger_1.labeled)('apig', 'Skipping deploy since previous schedule is not over yet.').ERROR();
|
|
28
|
+
(0, logger_1.labeled)('apig', 'You can deploy apig separately using "--only apig" option next time.').MESSAGE();
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
31
|
if (config_1.apigConfig.enabled(null) === null) {
|
|
@@ -37,17 +37,17 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
37
37
|
if (!config_1.apigConfig.enabled()) {
|
|
38
38
|
if (response.status) {
|
|
39
39
|
yield api.updateAPIGStatus(false);
|
|
40
|
-
logger_1.labeled('apig', 'Disabled successfully').SUCCESS();
|
|
40
|
+
(0, logger_1.labeled)('apig', 'Disabled successfully').SUCCESS();
|
|
41
41
|
}
|
|
42
42
|
throw new error_1.default('APIG not enabled locally', {
|
|
43
43
|
errorId: 'APIG-1',
|
|
44
|
-
arg: [ansi_colors_1.bold('catalyst apig:enable')],
|
|
44
|
+
arg: [(0, ansi_colors_1.bold)('catalyst apig:enable')],
|
|
45
45
|
exit: 0
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
if (config_1.apigConfig.enabled() && !response.status) {
|
|
49
49
|
yield api.updateAPIGStatus(true);
|
|
50
|
-
logger_1.labeled('apig', 'Enabled successfully').SUCCESS();
|
|
50
|
+
(0, logger_1.labeled)('apig', 'Enabled successfully').SUCCESS();
|
|
51
51
|
}
|
|
52
52
|
apig_utils_1.apigUtils.executeHook({ prefix: 'pre', command: 'deploy' });
|
|
53
53
|
yield apig_utils_1.apigUtils.validate();
|
|
@@ -20,7 +20,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
20
20
|
client_utils_1.clientUtils.executeHook({ prefix: 'pre', command: 'deploy' });
|
|
21
21
|
yield client_utils_1.clientUtils.validate();
|
|
22
22
|
const readStream = yield client_utils_1.clientUtils.pack();
|
|
23
|
-
const resp = (yield (yield endpoints_1.clientAPI()).deploy(readStream));
|
|
23
|
+
const resp = (yield (yield (0, endpoints_1.clientAPI)()).deploy(readStream));
|
|
24
24
|
runtime_store_1.default.set('payload.client.url', 'https://' +
|
|
25
25
|
resp.url_prefix +
|
|
26
26
|
'.' +
|
|
@@ -26,25 +26,25 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
26
26
|
fn_utils_1.fnUtils.common.executeHook({ prefix: 'pre', command: 'deploy' });
|
|
27
27
|
const targets = yield fn_utils_1.fnUtils.common.validate();
|
|
28
28
|
if (targets.length === 0) {
|
|
29
|
-
const only = option_1.getOptionValue('only', false);
|
|
30
|
-
const except = option_1.getOptionValue('except', false);
|
|
29
|
+
const only = (0, option_1.getOptionValue)('only', false);
|
|
30
|
+
const except = (0, option_1.getOptionValue)('except', false);
|
|
31
31
|
const option = only ? 'only' : except ? 'except' : 'none';
|
|
32
32
|
throw new error_1.default('No functions are ready to be deployed', {
|
|
33
33
|
exit: 1,
|
|
34
34
|
errorId: 'IDX-1',
|
|
35
|
-
arg: [ansi_colors_1.bold(option)]
|
|
35
|
+
arg: [(0, ansi_colors_1.bold)(option)]
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
const refinedTargets = yield fn_utils_1.fnUtils.common.refineTargets(targets);
|
|
39
39
|
runtime_store_1.default.set('context.functions.targets', refinedTargets);
|
|
40
40
|
const packedTargets = yield Promise.all([
|
|
41
|
-
languages_1.node(refinedTargets.filter((target) => { var _a; return ((_a = target.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.nodejs)) && target.valid; })),
|
|
42
|
-
languages_1.java(refinedTargets.filter((target) => { var _a; return ((_a = target.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.java)) && target.valid; }))
|
|
41
|
+
(0, languages_1.node)(refinedTargets.filter((target) => { var _a; return ((_a = target.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.nodejs)) && target.valid; })),
|
|
42
|
+
(0, languages_1.java)(refinedTargets.filter((target) => { var _a; return ((_a = target.stack) === null || _a === void 0 ? void 0 : _a.startsWith(runtime_1.default.language.java)) && target.valid; }))
|
|
43
43
|
]);
|
|
44
44
|
const combinedTarget = [...(packedTargets[0] || []), ...(packedTargets[1] || [])];
|
|
45
45
|
const batchSize = 1;
|
|
46
|
-
const fnAPI = yield endpoints_1.functionsAPI();
|
|
47
|
-
const appAPI = yield endpoints_1.applogicAPI();
|
|
46
|
+
const fnAPI = yield (0, endpoints_1.functionsAPI)();
|
|
47
|
+
const appAPI = yield (0, endpoints_1.applogicAPI)();
|
|
48
48
|
while (combinedTarget.length > 0) {
|
|
49
49
|
const limit = combinedTarget.length > batchSize ? batchSize : combinedTarget.length;
|
|
50
50
|
const targetBatch = combinedTarget.splice(0, limit);
|
|
@@ -72,7 +72,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
72
72
|
}
|
|
73
73
|
catch (e) {
|
|
74
74
|
const err = error_1.default.getErrorInstance(e);
|
|
75
|
-
logger_1.debug(err.stack);
|
|
75
|
+
(0, logger_1.debug)(err.stack);
|
|
76
76
|
target.valid = false;
|
|
77
77
|
target.failure_reason = err.message;
|
|
78
78
|
}
|
|
@@ -80,7 +80,7 @@ exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
80
80
|
}
|
|
81
81
|
const allTargets = refinedTargets.filter((target) => {
|
|
82
82
|
if (!target.valid) {
|
|
83
|
-
logger_1.warning('skipping deploy of target [' + target.name + '] since ' + target.failure_reason);
|
|
83
|
+
(0, logger_1.warning)('skipping deploy of target [' + target.name + '] since ' + target.failure_reason);
|
|
84
84
|
}
|
|
85
85
|
return target.valid;
|
|
86
86
|
});
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/lib/deploy/index.js
CHANGED
|
@@ -34,8 +34,8 @@ function deploy() {
|
|
|
34
34
|
}
|
|
35
35
|
catch (e) {
|
|
36
36
|
const error = error_1.default.getErrorInstance(e);
|
|
37
|
-
logger_1.debug(`${currentTarget} deploy unsuccessful, reason : ${error.stack}`);
|
|
38
|
-
logger_1.labeled(currentTarget, error.message).WARN();
|
|
37
|
+
(0, logger_1.debug)(`${currentTarget} deploy unsuccessful, reason : ${error.stack}`);
|
|
38
|
+
(0, logger_1.labeled)(currentTarget, error.message).WARN();
|
|
39
39
|
}
|
|
40
40
|
return deploy();
|
|
41
41
|
});
|
package/lib/endpoints/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -51,84 +55,84 @@ function sdkAPI({ auth = true } = {}) {
|
|
|
51
55
|
});
|
|
52
56
|
}
|
|
53
57
|
exports.sdkAPI = sdkAPI;
|
|
54
|
-
function cacheAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
58
|
+
function cacheAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
55
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
60
|
const cache = (yield Promise.resolve().then(() => __importStar(require('./lib/cache')))).default;
|
|
57
61
|
return new cache(projectId, { authNeeded: auth, env });
|
|
58
62
|
});
|
|
59
63
|
}
|
|
60
64
|
exports.cacheAPI = cacheAPI;
|
|
61
|
-
function filestoreAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
65
|
+
function filestoreAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
62
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
67
|
const filestore = (yield Promise.resolve().then(() => __importStar(require('./lib/filestore')))).default;
|
|
64
68
|
return new filestore(projectId, { authNeeded: auth, env });
|
|
65
69
|
});
|
|
66
70
|
}
|
|
67
71
|
exports.filestoreAPI = filestoreAPI;
|
|
68
|
-
function queueAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
72
|
+
function queueAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
69
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
74
|
const queue = (yield Promise.resolve().then(() => __importStar(require('./lib/queue')))).default;
|
|
71
75
|
return new queue(projectId, { authNeeded: auth, env });
|
|
72
76
|
});
|
|
73
77
|
}
|
|
74
78
|
exports.queueAPI = queueAPI;
|
|
75
|
-
function zcqlAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
79
|
+
function zcqlAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
76
80
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
81
|
const zcql = (yield Promise.resolve().then(() => __importStar(require('./lib/zcql')))).default;
|
|
78
82
|
return new zcql(projectId, { authNeeded: auth, env });
|
|
79
83
|
});
|
|
80
84
|
}
|
|
81
85
|
exports.zcqlAPI = zcqlAPI;
|
|
82
|
-
function datastoreAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
86
|
+
function datastoreAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
83
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
88
|
const datastore = (yield Promise.resolve().then(() => __importStar(require('./lib/datastore')))).default;
|
|
85
89
|
return new datastore(projectId, { authNeeded: auth, env });
|
|
86
90
|
});
|
|
87
91
|
}
|
|
88
92
|
exports.datastoreAPI = datastoreAPI;
|
|
89
|
-
function clientAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
93
|
+
function clientAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
90
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
91
95
|
const client = (yield Promise.resolve().then(() => __importStar(require('./lib/client')))).default;
|
|
92
96
|
return new client(projectId, { authNeeded: auth, env });
|
|
93
97
|
});
|
|
94
98
|
}
|
|
95
99
|
exports.clientAPI = clientAPI;
|
|
96
|
-
function apigAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
100
|
+
function apigAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
97
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
98
102
|
const apig = (yield Promise.resolve().then(() => __importStar(require('./lib/apig')))).default;
|
|
99
103
|
return new apig(projectId, { authNeeded: auth, env });
|
|
100
104
|
});
|
|
101
105
|
}
|
|
102
106
|
exports.apigAPI = apigAPI;
|
|
103
|
-
function bulkDSAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
107
|
+
function bulkDSAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
104
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
105
109
|
const bulk = (yield Promise.resolve().then(() => __importStar(require('./lib/ds-bulk')))).default;
|
|
106
110
|
return new bulk(projectId, { authNeeded: auth, env });
|
|
107
111
|
});
|
|
108
112
|
}
|
|
109
113
|
exports.bulkDSAPI = bulkDSAPI;
|
|
110
|
-
function applogicAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
114
|
+
function applogicAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
111
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
112
116
|
const applogic = (yield Promise.resolve().then(() => __importStar(require('./lib/applogic')))).default;
|
|
113
117
|
return new applogic(projectId, { authNeeded: auth, env });
|
|
114
118
|
});
|
|
115
119
|
}
|
|
116
120
|
exports.applogicAPI = applogicAPI;
|
|
117
|
-
function functionsAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
121
|
+
function functionsAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
118
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
119
123
|
const functions = (yield Promise.resolve().then(() => __importStar(require('./lib/functions')))).default;
|
|
120
124
|
return new functions(projectId, { authNeeded: auth, env });
|
|
121
125
|
});
|
|
122
126
|
}
|
|
123
127
|
exports.functionsAPI = functionsAPI;
|
|
124
|
-
function eventBusAPI({ auth = true, projectId = project_1.getProjectId(), env = project_1.getEnvName() } = {}) {
|
|
128
|
+
function eventBusAPI({ auth = true, projectId = (0, project_1.getProjectId)(), env = (0, project_1.getEnvName)() } = {}) {
|
|
125
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
126
130
|
const event = (yield Promise.resolve().then(() => __importStar(require('./lib/event-bus')))).default;
|
|
127
131
|
return new event(projectId, { authNeeded: auth, env });
|
|
128
132
|
});
|
|
129
133
|
}
|
|
130
134
|
exports.eventBusAPI = eventBusAPI;
|
|
131
|
-
function logAPI({ auth = true, projectId = project_1.getProjectId(-1), env = project_1.getEnvName() } = {}) {
|
|
135
|
+
function logAPI({ auth = true, projectId = (0, project_1.getProjectId)(-1), env = (0, project_1.getEnvName)() } = {}) {
|
|
132
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
137
|
if (projectId === -1) {
|
|
134
138
|
return;
|
|
@@ -32,7 +32,7 @@ class Apig {
|
|
|
32
32
|
if (res.body && res.body.data) {
|
|
33
33
|
return res.body.data;
|
|
34
34
|
}
|
|
35
|
-
logger_1.debug('get all apis response from server : ' + res.body);
|
|
35
|
+
(0, logger_1.debug)('get all apis response from server : ' + res.body);
|
|
36
36
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
37
37
|
exit: 2
|
|
38
38
|
});
|
|
@@ -49,7 +49,7 @@ class Apig {
|
|
|
49
49
|
if (res.body && res.body.data) {
|
|
50
50
|
return res.body.data;
|
|
51
51
|
}
|
|
52
|
-
logger_1.debug('deploy APIG response from server : ' + res.body);
|
|
52
|
+
(0, logger_1.debug)('deploy APIG response from server : ' + res.body);
|
|
53
53
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
54
54
|
exit: 2
|
|
55
55
|
});
|
|
@@ -75,7 +75,7 @@ class Apig {
|
|
|
75
75
|
if (res.body && res.body.data) {
|
|
76
76
|
return res.body.data;
|
|
77
77
|
}
|
|
78
|
-
logger_1.debug('get all apis response from server : ' + res.body);
|
|
78
|
+
(0, logger_1.debug)('get all apis response from server : ' + res.body);
|
|
79
79
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
80
80
|
exit: 2
|
|
81
81
|
});
|
|
@@ -91,7 +91,7 @@ class Apig {
|
|
|
91
91
|
if (res.body && res.body.data) {
|
|
92
92
|
return res.body.data;
|
|
93
93
|
}
|
|
94
|
-
logger_1.debug('getScheduleReport response from server : ' + res.body);
|
|
94
|
+
(0, logger_1.debug)('getScheduleReport response from server : ' + res.body);
|
|
95
95
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
96
96
|
exit: 2
|
|
97
97
|
});
|
|
@@ -108,7 +108,7 @@ class Apig {
|
|
|
108
108
|
if (res.body && res.body.data) {
|
|
109
109
|
return res.body.data;
|
|
110
110
|
}
|
|
111
|
-
logger_1.debug('change status of APIG response from server : ' + res.body);
|
|
111
|
+
(0, logger_1.debug)('change status of APIG response from server : ' + res.body);
|
|
112
112
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
113
113
|
exit: 2
|
|
114
114
|
});
|
|
@@ -42,7 +42,7 @@ class Applogic {
|
|
|
42
42
|
if (res.body && res.body.data) {
|
|
43
43
|
return res.body.data;
|
|
44
44
|
}
|
|
45
|
-
logger_1.debug('save applogic response from server : ' + res.body);
|
|
45
|
+
(0, logger_1.debug)('save applogic response from server : ' + res.body);
|
|
46
46
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
47
47
|
exit: 2
|
|
48
48
|
});
|
|
@@ -54,7 +54,7 @@ class Applogic {
|
|
|
54
54
|
if (res.body && res.body.data) {
|
|
55
55
|
return res.body.data;
|
|
56
56
|
}
|
|
57
|
-
logger_1.debug('get applogic response from server : ' + res.body);
|
|
57
|
+
(0, logger_1.debug)('get applogic response from server : ' + res.body);
|
|
58
58
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
59
59
|
exit: 2
|
|
60
60
|
});
|
|
@@ -72,7 +72,7 @@ class Applogic {
|
|
|
72
72
|
if (res.body) {
|
|
73
73
|
return res.body;
|
|
74
74
|
}
|
|
75
|
-
logger_1.debug('java sdk response from server : ' + res.body);
|
|
75
|
+
(0, logger_1.debug)('java sdk response from server : ' + res.body);
|
|
76
76
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
77
77
|
exit: 2
|
|
78
78
|
});
|
|
@@ -84,7 +84,7 @@ class Applogic {
|
|
|
84
84
|
if (res.body && res.body.data) {
|
|
85
85
|
return res.body.data;
|
|
86
86
|
}
|
|
87
|
-
logger_1.debug('delete applogic response from server : ' + res.body);
|
|
87
|
+
(0, logger_1.debug)('delete applogic response from server : ' + res.body);
|
|
88
88
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
89
89
|
exit: 2
|
|
90
90
|
});
|
|
@@ -26,7 +26,7 @@ class Cache {
|
|
|
26
26
|
if (res.body && res.body.data) {
|
|
27
27
|
return res.body.data;
|
|
28
28
|
}
|
|
29
|
-
logger_1.debug('get all segments response from server : ' + res.body);
|
|
29
|
+
(0, logger_1.debug)('get all segments response from server : ' + res.body);
|
|
30
30
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
31
31
|
exit: 2
|
|
32
32
|
});
|
|
@@ -46,7 +46,7 @@ class Cache {
|
|
|
46
46
|
if (res.body && res.body.data) {
|
|
47
47
|
return res.body.data;
|
|
48
48
|
}
|
|
49
|
-
logger_1.debug('put cache response from server : ' + res.body);
|
|
49
|
+
(0, logger_1.debug)('put cache response from server : ' + res.body);
|
|
50
50
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
51
51
|
exit: 2
|
|
52
52
|
});
|
|
@@ -65,7 +65,7 @@ class Cache {
|
|
|
65
65
|
if (res.body && res.body.data) {
|
|
66
66
|
return res.body.data;
|
|
67
67
|
}
|
|
68
|
-
logger_1.debug('get cache response from server : ' + res.body);
|
|
68
|
+
(0, logger_1.debug)('get cache response from server : ' + res.body);
|
|
69
69
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
70
70
|
exit: 2
|
|
71
71
|
});
|
|
@@ -29,7 +29,7 @@ class CatalystDetailsAPI {
|
|
|
29
29
|
if (res.body && res.body.data) {
|
|
30
30
|
return res.body.data;
|
|
31
31
|
}
|
|
32
|
-
logger_1.debug('get detail response from server : ' + JSON.stringify(res.body));
|
|
32
|
+
(0, logger_1.debug)('get detail response from server : ' + JSON.stringify(res.body));
|
|
33
33
|
throw new error_1.default('Server Error: Unexpected Response from server.', { exit: 2 });
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -31,7 +31,7 @@ class Client {
|
|
|
31
31
|
if (res.body && res.body.data) {
|
|
32
32
|
return res.body.data;
|
|
33
33
|
}
|
|
34
|
-
logger_1.debug('deploy webapp response from server : ' + res.body);
|
|
34
|
+
(0, logger_1.debug)('deploy webapp response from server : ' + res.body);
|
|
35
35
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
36
36
|
exit: 2
|
|
37
37
|
});
|
|
@@ -43,7 +43,7 @@ class Client {
|
|
|
43
43
|
if (res.body && res.body.data) {
|
|
44
44
|
return res.body.data;
|
|
45
45
|
}
|
|
46
|
-
logger_1.debug('get all history response from server : ' + res.body);
|
|
46
|
+
(0, logger_1.debug)('get all history response from server : ' + res.body);
|
|
47
47
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
48
48
|
exit: 2
|
|
49
49
|
});
|
|
@@ -55,7 +55,7 @@ class Client {
|
|
|
55
55
|
if (res.body && res.body.data) {
|
|
56
56
|
return res.body.data;
|
|
57
57
|
}
|
|
58
|
-
logger_1.debug('get webapp response from server : ' + res.body);
|
|
58
|
+
(0, logger_1.debug)('get webapp response from server : ' + res.body);
|
|
59
59
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
60
60
|
exit: 2
|
|
61
61
|
});
|
|
@@ -69,7 +69,7 @@ class Client {
|
|
|
69
69
|
if (res.body) {
|
|
70
70
|
return res.body;
|
|
71
71
|
}
|
|
72
|
-
logger_1.debug('download client response from server : ' + res.body);
|
|
72
|
+
(0, logger_1.debug)('download client response from server : ' + res.body);
|
|
73
73
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
74
74
|
exit: 2
|
|
75
75
|
});
|
|
@@ -81,7 +81,7 @@ class Client {
|
|
|
81
81
|
if (res.body && res.body.data) {
|
|
82
82
|
return true;
|
|
83
83
|
}
|
|
84
|
-
logger_1.debug('delete history response from server : ' + res.body);
|
|
84
|
+
(0, logger_1.debug)('delete history response from server : ' + res.body);
|
|
85
85
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
86
86
|
exit: 2
|
|
87
87
|
});
|
|
@@ -26,7 +26,7 @@ class Datastore {
|
|
|
26
26
|
if (res.body && res.body.data) {
|
|
27
27
|
return res.body.data;
|
|
28
28
|
}
|
|
29
|
-
logger_1.debug('get all table response from server : ' + res.body);
|
|
29
|
+
(0, logger_1.debug)('get all table response from server : ' + res.body);
|
|
30
30
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
31
31
|
exit: 2
|
|
32
32
|
});
|
|
@@ -38,7 +38,7 @@ class Datastore {
|
|
|
38
38
|
if (res.body && res.body.data) {
|
|
39
39
|
return res.body.data;
|
|
40
40
|
}
|
|
41
|
-
logger_1.debug('get column details for table response from server : ' + res.body);
|
|
41
|
+
(0, logger_1.debug)('get column details for table response from server : ' + res.body);
|
|
42
42
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
43
43
|
exit: 2
|
|
44
44
|
});
|
|
@@ -26,7 +26,7 @@ class BulkDS {
|
|
|
26
26
|
if (res.body && res.body.data) {
|
|
27
27
|
return res.body.data;
|
|
28
28
|
}
|
|
29
|
-
logger_1.debug('bulk response from server : ' + res.body);
|
|
29
|
+
(0, logger_1.debug)('bulk response from server : ' + res.body);
|
|
30
30
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
31
31
|
exit: 2
|
|
32
32
|
});
|
|
@@ -69,7 +69,7 @@ class BulkDS {
|
|
|
69
69
|
if (res.body && res.body.data) {
|
|
70
70
|
return res.body.data;
|
|
71
71
|
}
|
|
72
|
-
logger_1.debug('getStatus response from server : ' + res.body);
|
|
72
|
+
(0, logger_1.debug)('getStatus response from server : ' + res.body);
|
|
73
73
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
74
74
|
exit: 2
|
|
75
75
|
});
|
|
@@ -81,7 +81,7 @@ class BulkDS {
|
|
|
81
81
|
if (res.body && res.body.data) {
|
|
82
82
|
return res.body.data;
|
|
83
83
|
}
|
|
84
|
-
logger_1.debug('getReport response from server : ' + res.body);
|
|
84
|
+
(0, logger_1.debug)('getReport response from server : ' + res.body);
|
|
85
85
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
86
86
|
exit: 2
|
|
87
87
|
});
|
|
@@ -93,7 +93,7 @@ class BulkDS {
|
|
|
93
93
|
if (res.body && res.body.data) {
|
|
94
94
|
return res.body.data;
|
|
95
95
|
}
|
|
96
|
-
logger_1.debug('getAllJobs response from server : ' + res.body);
|
|
96
|
+
(0, logger_1.debug)('getAllJobs response from server : ' + res.body);
|
|
97
97
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
98
98
|
exit: 2
|
|
99
99
|
});
|
|
@@ -115,7 +115,7 @@ class BulkDS {
|
|
|
115
115
|
if (res.body) {
|
|
116
116
|
return res.body;
|
|
117
117
|
}
|
|
118
|
-
logger_1.debug('download report response from server : ' + res.body);
|
|
118
|
+
(0, logger_1.debug)('download report response from server : ' + res.body);
|
|
119
119
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
120
120
|
exit: 2
|
|
121
121
|
});
|
package/lib/endpoints/lib/env.js
CHANGED
|
@@ -25,7 +25,7 @@ class Env {
|
|
|
25
25
|
if (res.body && res.body.data) {
|
|
26
26
|
return res.body.data;
|
|
27
27
|
}
|
|
28
|
-
logger_1.debug('get environment response from server : ' + JSON.stringify(res.body));
|
|
28
|
+
(0, logger_1.debug)('get environment response from server : ' + JSON.stringify(res.body));
|
|
29
29
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
30
30
|
exit: 2
|
|
31
31
|
});
|
|
@@ -26,7 +26,7 @@ class EventBus {
|
|
|
26
26
|
if (res.body && res.body.data) {
|
|
27
27
|
return res.body.data;
|
|
28
28
|
}
|
|
29
|
-
logger_1.debug('get all event bus response from server : ' + res.body);
|
|
29
|
+
(0, logger_1.debug)('get all event bus response from server : ' + res.body);
|
|
30
30
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
31
31
|
exit: 2
|
|
32
32
|
});
|
|
@@ -26,7 +26,7 @@ class Filestore {
|
|
|
26
26
|
if (res.body && res.body.data) {
|
|
27
27
|
return res.body.data;
|
|
28
28
|
}
|
|
29
|
-
logger_1.debug('get all folder response from server : ' + res.body);
|
|
29
|
+
(0, logger_1.debug)('get all folder response from server : ' + res.body);
|
|
30
30
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
31
31
|
exit: 2
|
|
32
32
|
});
|
|
@@ -43,7 +43,7 @@ class Filestore {
|
|
|
43
43
|
if (res.body && res.body.data) {
|
|
44
44
|
return res.body.data;
|
|
45
45
|
}
|
|
46
|
-
logger_1.debug('uploadFile response from server : ' + res.body);
|
|
46
|
+
(0, logger_1.debug)('uploadFile response from server : ' + res.body);
|
|
47
47
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
48
48
|
exit: 2
|
|
49
49
|
});
|
|
@@ -37,7 +37,7 @@ class Functions {
|
|
|
37
37
|
if (res.body && res.body.data) {
|
|
38
38
|
return res.body.data;
|
|
39
39
|
}
|
|
40
|
-
logger_1.debug('get all function response from server : ' + res.body);
|
|
40
|
+
(0, logger_1.debug)('get all function response from server : ' + res.body);
|
|
41
41
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
42
42
|
exit: 2
|
|
43
43
|
});
|
|
@@ -63,7 +63,7 @@ class Functions {
|
|
|
63
63
|
if (res.body && res.body.data) {
|
|
64
64
|
return res.body.data;
|
|
65
65
|
}
|
|
66
|
-
logger_1.debug('save function response from server : ' + res.body);
|
|
66
|
+
(0, logger_1.debug)('save function response from server : ' + res.body);
|
|
67
67
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
68
68
|
exit: 2
|
|
69
69
|
});
|
|
@@ -78,7 +78,7 @@ class Functions {
|
|
|
78
78
|
if (res.body) {
|
|
79
79
|
return res.body;
|
|
80
80
|
}
|
|
81
|
-
logger_1.debug('download function response from server : ' + res.body);
|
|
81
|
+
(0, logger_1.debug)('download function response from server : ' + res.body);
|
|
82
82
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
83
83
|
exit: 2
|
|
84
84
|
});
|
|
@@ -90,7 +90,7 @@ class Functions {
|
|
|
90
90
|
if (res.body && res.body.data) {
|
|
91
91
|
return res.body.data;
|
|
92
92
|
}
|
|
93
|
-
logger_1.debug('get all function response from server : ' + res.body);
|
|
93
|
+
(0, logger_1.debug)('get all function response from server : ' + res.body);
|
|
94
94
|
throw new error_1.default('Server Error: Unexpected Response from server.', {
|
|
95
95
|
exit: 2
|
|
96
96
|
});
|