zcatalyst-cli 1.25.3 → 1.26.1
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/api-timer.d.ts +0 -1
- package/lib/apig-utils.d.ts +1 -1
- package/lib/apig-utils.js +1 -1
- package/lib/appsail-utils.js +6 -7
- package/lib/archiver.d.ts +0 -4
- package/lib/archiver.js +21 -11
- package/lib/authentication/constants/auth.js +1 -1
- package/lib/authentication/credential.js +3 -3
- package/lib/authentication/index.js +25 -14
- package/lib/authentication/login.d.ts +0 -2
- package/lib/authentication/login.js +23 -10
- package/lib/bin/catalyst.js +17 -7
- package/lib/client-utils.d.ts +3 -3
- package/lib/client-utils.js +2 -2
- package/lib/client.js +19 -9
- package/lib/code-deck.d.ts +0 -2
- package/lib/code-deck.js +4 -4
- package/lib/command_needs/config.js +1 -1
- package/lib/command_needs/rc.js +5 -2
- package/lib/commands/appsail/add.js +17 -7
- package/lib/commands/client/setup.js +17 -7
- package/lib/commands/config/set.js +5 -3
- package/lib/commands/deploy/appsail.js +37 -14
- package/lib/commands/deploy/index.js +88 -66
- package/lib/commands/deploy/slate.js +37 -14
- package/lib/commands/event/generate/integ.js +18 -9
- package/lib/commands/functions/add.js +17 -7
- package/lib/commands/functions/execute.js +17 -7
- package/lib/commands/functions/setup.js +17 -7
- package/lib/commands/functions/shell.js +17 -7
- package/lib/commands/iac/import.js +18 -8
- package/lib/commands/iac/pack.js +17 -7
- package/lib/commands/iac/status.js +17 -7
- package/lib/commands/index.js +20 -12
- package/lib/commands/init.js +17 -7
- package/lib/commands/login.js +17 -7
- package/lib/commands/logout.js +17 -7
- package/lib/commands/project/list.js +17 -7
- package/lib/commands/project/use.js +1 -0
- package/lib/commands/pull.js +17 -7
- package/lib/commands/run.js +17 -7
- package/lib/commands/serve.js +17 -7
- package/lib/commands/signals/generate/index.js +1 -1
- package/lib/commands/slate/create.js +17 -7
- package/lib/commands/slate/link.js +17 -7
- package/lib/commands/token/generate.js +17 -7
- package/lib/commands/token/list.js +17 -7
- package/lib/commands/token/revoke.js +17 -7
- package/lib/commands/zest/generate/index.js +21 -11
- package/lib/deploy/features/appsail/index.js +2 -3
- package/lib/deploy/features/appsail/pack.d.ts +0 -1
- package/lib/deploy/features/appsail/pack.js +2 -3
- package/lib/deploy/features/appsail/utils.js +7 -8
- package/lib/deploy/features/functions/languages/index.js +3 -4
- package/lib/deploy/features/index.js +17 -7
- package/lib/deploy/features/slate.js +11 -8
- package/lib/deploy/index.js +2 -2
- package/lib/deploy/util.d.ts +2 -0
- package/lib/deploy/util.js +3 -1
- package/lib/docs/commands/signals/generate/generate.toml +19 -0
- package/lib/docs/commands/slate/unlink.toml +9 -0
- package/lib/docs/fn-utils/lib/node.toml +4 -0
- package/lib/docs/init/dependencies/python/ensure-python.toml +4 -0
- package/lib/docs/serve/server/lib/slate/index.toml +20 -0
- package/lib/docs/slate-utils.toml +9 -0
- package/lib/endpoints/index.d.ts +2 -1
- package/lib/endpoints/index.js +88 -79
- package/lib/endpoints/lib/apig.d.ts +0 -1
- package/lib/endpoints/lib/apig.js +2 -2
- package/lib/endpoints/lib/applogic.d.ts +0 -1
- package/lib/endpoints/lib/applogic.js +2 -2
- package/lib/endpoints/lib/appsail.d.ts +1 -4
- package/lib/endpoints/lib/appsail.js +7 -7
- package/lib/endpoints/lib/client.d.ts +0 -1
- package/lib/endpoints/lib/code-deck.js +1 -1
- package/lib/endpoints/lib/common.d.ts +0 -2
- package/lib/endpoints/lib/ds-bulk.js +2 -2
- package/lib/endpoints/lib/env.js +2 -2
- package/lib/endpoints/lib/filestore.d.ts +0 -1
- package/lib/endpoints/lib/functions.d.ts +0 -1
- package/lib/endpoints/lib/functions.js +2 -2
- package/lib/endpoints/lib/git-hub.d.ts +0 -2
- package/lib/endpoints/lib/iac.d.ts +0 -3
- package/lib/endpoints/lib/iac.js +2 -2
- package/lib/endpoints/lib/project.d.ts +0 -1
- package/lib/endpoints/lib/project.js +2 -2
- package/lib/endpoints/lib/sdk.d.ts +0 -2
- package/lib/endpoints/lib/sdk.js +1 -1
- package/lib/endpoints/lib/slate.d.ts +0 -1
- package/lib/endpoints/lib/stratus.d.ts +0 -1
- package/lib/endpoints/lib/user.d.ts +0 -2
- package/lib/endpoints/lib/user.js +2 -1
- package/lib/error/context-help.js +1 -1
- package/lib/error/index.js +2 -2
- package/lib/event_generate/cache.js +4 -4
- package/lib/event_generate/custom.js +1 -2
- package/lib/event_generate/datastore.js +4 -4
- package/lib/event_generate/filestore.js +4 -4
- package/lib/event_generate/github.js +2 -2
- package/lib/event_generate/index.js +19 -11
- package/lib/event_generate/stratus.js +2 -2
- package/lib/event_generate/user.js +2 -2
- package/lib/event_generate/webapp.js +2 -2
- package/lib/execute/caller.d.ts +0 -1
- package/lib/execute/caller.js +20 -7
- package/lib/execute/index.js +27 -4
- package/lib/execute-script.js +22 -13
- package/lib/express_middlewares/auth-checker.js +2 -3
- package/lib/express_middlewares/project.d.ts +1 -1
- package/lib/fn-utils/index.js +17 -7
- package/lib/fn-utils/lib/browserLogic.js +4 -5
- package/lib/fn-utils/lib/common.d.ts +0 -1
- package/lib/fn-utils/lib/common.js +25 -26
- package/lib/fn-utils/lib/integ.js +2 -3
- package/lib/fn-utils/lib/java/classpath.js +2 -3
- package/lib/fn-utils/lib/java/compile.js +4 -4
- package/lib/fn-utils/lib/java/ensure-java-userconfig.d.ts +10 -0
- package/lib/fn-utils/lib/java/ensure-java-userconfig.js +45 -23
- package/lib/fn-utils/lib/java/index.d.ts +0 -1
- package/lib/fn-utils/lib/java/index.js +11 -11
- package/lib/fn-utils/lib/java/keywords.js +2 -2
- package/lib/fn-utils/lib/node.d.ts +1 -1
- package/lib/fn-utils/lib/node.js +67 -15
- package/lib/fn-utils/lib/python.js +29 -19
- package/lib/iac/status/util/index.d.ts +1 -1
- package/lib/init/dependencies/npm-install.js +2 -2
- package/lib/init/dependencies/python/ensure-python.d.ts +2 -2
- package/lib/init/dependencies/python/ensure-python.js +65 -58
- package/lib/init/dependencies/python/pip-install.d.ts +3 -5
- package/lib/init/dependencies/python/pip-install.js +14 -53
- package/lib/init/features/appsail/utils.js +21 -12
- package/lib/init/features/client/index.js +18 -9
- package/lib/init/features/client/initializers/angular.js +17 -7
- package/lib/init/features/client/initializers/basic.js +17 -7
- package/lib/init/features/client/initializers/lyte.js +17 -7
- package/lib/init/features/client/initializers/react.js +17 -7
- package/lib/init/features/index.js +29 -20
- package/lib/init/features/project.js +5 -5
- package/lib/init/features/slate/index.js +23 -11
- package/lib/init/util/client.js +23 -13
- package/lib/init/util/common.js +5 -6
- package/lib/init/util/project.js +1 -1
- package/lib/internal/api.d.ts +0 -3
- package/lib/internal/api.js +19 -9
- package/lib/internal/command.js +18 -9
- package/lib/migration/global/1.25.0.d.ts +2 -0
- package/lib/migration/global/1.25.0.js +28 -0
- package/lib/migration/index.js +20 -12
- package/lib/option-filter.js +19 -10
- package/lib/optional-import.js +19 -10
- package/lib/plugin-loader.d.ts +0 -2
- package/lib/plugin-loader.js +18 -8
- package/lib/port-resolver.js +10 -10
- package/lib/prompt/index.d.ts +3 -3
- package/lib/prompt/index.js +17 -7
- package/lib/prompt/types/file-path.d.ts +0 -1
- package/lib/prompt/types/search-box.d.ts +0 -1
- package/lib/prompt/types/tree.d.ts +1 -2
- package/lib/prompt/types/tree.js +10 -10
- package/lib/prompt/types/with-description.d.ts +0 -1
- package/lib/pull/features/functions/index.js +71 -52
- package/lib/pull/features/functions/languages.js +3 -4
- package/lib/pull/features/index.js +17 -7
- package/lib/repl-server.d.ts +0 -1
- package/lib/repl-server.js +9 -1
- package/lib/serve/features/apig.js +7 -1
- package/lib/serve/features/appsail.d.ts +1 -0
- package/lib/serve/features/appsail.js +51 -7
- package/lib/serve/features/index.js +22 -13
- package/lib/serve/index.js +17 -7
- package/lib/serve/server/index.d.ts +0 -2
- package/lib/serve/server/index.js +26 -12
- package/lib/serve/server/lib/appsail/index.js +27 -34
- package/lib/serve/server/lib/appsail/util.d.ts +11 -0
- package/lib/serve/server/lib/appsail/util.js +69 -0
- package/lib/serve/server/lib/java/index.js +18 -7
- package/lib/serve/server/lib/master/appsail.js +3 -4
- package/lib/serve/server/lib/master/functions.js +1 -2
- package/lib/serve/server/lib/master/index.d.ts +0 -1
- package/lib/serve/server/lib/master/index.js +5 -5
- package/lib/serve/server/lib/master/slate.js +1 -2
- package/lib/serve/server/lib/master/unknown-req-proxy.js +5 -2
- package/lib/serve/server/lib/master/utils.d.ts +4 -8
- package/lib/serve/server/lib/master/utils.js +4 -6
- package/lib/serve/server/lib/master/web-client.js +1 -2
- package/lib/serve/server/lib/node/index.js +22 -11
- package/lib/serve/server/lib/node/server/browserlogic/utils/playwright-handler.js +1 -1
- package/lib/serve/server/lib/node/server/browserlogic/utils/puppeteer-handler.js +1 -1
- package/lib/serve/server/lib/node/server/browserlogic/utils/selenium-handler.js +2 -0
- package/lib/serve/server/lib/python/index.js +23 -14
- package/lib/serve/server/lib/slate/index.js +7 -0
- package/lib/serve/server/lib/slate/static-server.d.ts +0 -1
- package/lib/serve/server/lib/slate/static-server.js +5 -4
- package/lib/serve/server/lib/web_client/server.d.ts +0 -1
- package/lib/serve/server/lib/web_client/server.js +5 -4
- package/lib/shell/dependencies/http-functions.d.ts +0 -2
- package/lib/shell/dependencies/http-functions.js +7 -7
- package/lib/shell/dependencies/non-http-function/fn-execution-handler.d.ts +0 -2
- package/lib/shell/dependencies/non-http-function/fn-execution-handler.js +55 -24
- package/lib/shell/dependencies/non-http-function/fn-handler.d.ts +3 -3
- package/lib/shell/dependencies/non-http-function/fn-handler.js +54 -20
- package/lib/shell/dependencies/non-http-function/node.js +4 -4
- package/lib/shell/dependencies/non-http-function/python.d.ts +1 -1
- package/lib/shell/dependencies/non-http-function/python.js +11 -13
- package/lib/shell/dependencies/non-http-function/slave-manager.d.ts +0 -2
- package/lib/shell/dependencies/non-http-function/slave-manager.js +11 -7
- package/lib/shell/dependencies/tunnel-server.js +4 -4
- package/lib/shell/index.js +50 -3
- package/lib/shell/prepare/index.js +4 -3
- package/lib/shell/prepare/languages/index.js +18 -9
- package/lib/shell/prepare/languages/node.js +29 -19
- package/lib/shell/prepare/languages/python.js +6 -12
- package/lib/signals/index.js +19 -11
- package/lib/slate-utils.js +25 -16
- package/lib/throbber/index.d.ts +1 -2
- package/lib/throbber/index.js +5 -2
- package/lib/throbber/utils.d.ts +0 -1
- package/lib/throbber/utils.js +4 -5
- package/lib/userConfig.d.ts +14 -0
- package/lib/userConfig.js +15 -1
- package/lib/util_modules/config/index.js +17 -7
- package/lib/util_modules/config/lib/apig.d.ts +1 -0
- package/lib/util_modules/config/lib/apig.js +10 -5
- package/lib/util_modules/config/lib/appsail.js +7 -7
- package/lib/util_modules/config/lib/client.js +5 -6
- package/lib/util_modules/config/lib/functions.js +5 -6
- package/lib/util_modules/config/lib/slate.d.ts +2 -1
- package/lib/util_modules/config/lib/slate.js +27 -13
- package/lib/util_modules/config-store.d.ts +1 -1
- package/lib/util_modules/config-store.js +30 -13
- package/lib/util_modules/constants/lib/apig-rules.d.ts +1 -1
- package/lib/util_modules/constants/lib/dc-type.js +3 -3
- package/lib/util_modules/constants/lib/placeholders.d.ts +1 -1
- package/lib/util_modules/constants/lib/placeholders.js +1 -1
- package/lib/util_modules/constants/lib/urls.js +2 -9
- package/lib/util_modules/container.js +23 -14
- package/lib/util_modules/dc.js +3 -4
- package/lib/util_modules/env.d.ts +3 -0
- package/lib/util_modules/env.js +64 -4
- package/lib/util_modules/event-emitter.d.ts +9 -0
- package/lib/util_modules/event-emitter.js +68 -0
- package/lib/util_modules/fs/index.js +17 -7
- package/lib/util_modules/fs/lib/async.d.ts +0 -4
- package/lib/util_modules/fs/lib/async.js +46 -46
- package/lib/util_modules/fs/lib/sync.d.ts +1 -3
- package/lib/util_modules/fs/lib/sync.js +40 -30
- package/lib/util_modules/logger/index.js +12 -12
- package/lib/util_modules/logger/utils.d.ts +0 -4
- package/lib/util_modules/logger/utils.js +1 -1
- package/lib/util_modules/logger/winston.js +2 -2
- package/lib/util_modules/option.js +5 -6
- package/lib/util_modules/project.js +22 -23
- package/lib/util_modules/runtime-store.d.ts +2 -2
- package/lib/util_modules/server.d.ts +1 -2
- package/lib/util_modules/server.js +54 -15
- package/lib/util_modules/shell.d.ts +0 -3
- package/lib/util_modules/shell.js +5 -6
- package/lib/util_modules/toml.js +2 -3
- package/package.json +13 -13
- package/templates/init/functions/java/event/sample.java +5 -2
- package/templates/web-socket.txt +1 -1
- /package/lib/docs/{commands/event/generate → event_generate}/index.toml +0 -0
- /package/templates/init/functions/java/integ/convokraft/{Sample.java → sample.java} +0 -0
package/lib/userConfig.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
export declare const CONFIG_KEYS: {
|
|
2
|
+
node12_bin: string;
|
|
3
|
+
node14_bin: string;
|
|
4
|
+
node16_bin: string;
|
|
5
|
+
node18_bin: string;
|
|
6
|
+
node20_bin: string;
|
|
7
|
+
node22_bin: string;
|
|
8
|
+
node24_bin: string;
|
|
2
9
|
python39_bin: string;
|
|
10
|
+
python310_bin: string;
|
|
11
|
+
python311_bin: string;
|
|
12
|
+
python312_bin: string;
|
|
13
|
+
python313_bin: string;
|
|
3
14
|
java8_bin: string;
|
|
4
15
|
java11_bin: string;
|
|
5
16
|
java17_bin: string;
|
|
17
|
+
java21_bin: string;
|
|
18
|
+
java25_bin: string;
|
|
6
19
|
javac_disableWarnings: string;
|
|
7
20
|
serve_container: string;
|
|
21
|
+
functionsShell_prompt: string;
|
|
8
22
|
};
|
|
9
23
|
declare class UserConfig {
|
|
10
24
|
private configFilePath;
|
package/lib/userConfig.js
CHANGED
|
@@ -9,12 +9,26 @@ const constants_1 = require("./util_modules/constants");
|
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const error_1 = __importDefault(require("./error"));
|
|
11
11
|
exports.CONFIG_KEYS = {
|
|
12
|
+
node12_bin: 'node12.bin',
|
|
13
|
+
node14_bin: 'node14.bin',
|
|
14
|
+
node16_bin: 'node16.bin',
|
|
15
|
+
node18_bin: 'node18.bin',
|
|
16
|
+
node20_bin: 'node20.bin',
|
|
17
|
+
node22_bin: 'node22.bin',
|
|
18
|
+
node24_bin: 'node24.bin',
|
|
12
19
|
python39_bin: 'python3_9.bin',
|
|
20
|
+
python310_bin: 'python3_10.bin',
|
|
21
|
+
python311_bin: 'python3_11.bin',
|
|
22
|
+
python312_bin: 'python3_12.bin',
|
|
23
|
+
python313_bin: 'python3_13.bin',
|
|
13
24
|
java8_bin: 'java8.bin',
|
|
14
25
|
java11_bin: 'java11.bin',
|
|
15
26
|
java17_bin: 'java17.bin',
|
|
27
|
+
java21_bin: 'java21.bin',
|
|
28
|
+
java25_bin: 'java25.bin',
|
|
16
29
|
javac_disableWarnings: 'javac.disable_warnings',
|
|
17
|
-
serve_container: 'serve.container'
|
|
30
|
+
serve_container: 'serve.container',
|
|
31
|
+
functionsShell_prompt: 'functions_shell.prompt'
|
|
18
32
|
};
|
|
19
33
|
class UserConfig {
|
|
20
34
|
constructor() {
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.slateConfig = exports.appSailConfig = exports.apigConfig = exports.functionsConfig = exports.clientConfig = void 0;
|
|
27
37
|
const apigConfig = __importStar(require("./lib/apig"));
|
|
@@ -3,10 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.source =
|
|
6
|
+
exports.source = void 0;
|
|
7
|
+
exports.raw = raw;
|
|
8
|
+
exports.rules = rules;
|
|
9
|
+
exports.enabled = enabled;
|
|
10
|
+
exports.script = script;
|
|
11
|
+
exports.exists = exists;
|
|
7
12
|
const index_js_1 = __importDefault(require("../../../error/index.js"));
|
|
8
13
|
const runtime_store_1 = __importDefault(require("../../../runtime-store"));
|
|
9
14
|
const constants_1 = require("../../constants");
|
|
15
|
+
const index_js_2 = require("../index.js");
|
|
10
16
|
function raw(throwError = false) {
|
|
11
17
|
const config = runtime_store_1.default.get('config', null);
|
|
12
18
|
if (config === null) {
|
|
@@ -17,17 +23,14 @@ function raw(throwError = false) {
|
|
|
17
23
|
}
|
|
18
24
|
return config.get('apig');
|
|
19
25
|
}
|
|
20
|
-
exports.raw = raw;
|
|
21
26
|
function rules() {
|
|
22
27
|
const apigConfig = raw();
|
|
23
28
|
return (apigConfig && apigConfig.rules) || constants_1.FILENAME.apig.user_rules;
|
|
24
29
|
}
|
|
25
|
-
exports.rules = rules;
|
|
26
30
|
function enabled(fallback) {
|
|
27
31
|
const apigConfig = raw();
|
|
28
32
|
return (apigConfig && apigConfig.enabled) || fallback || false;
|
|
29
33
|
}
|
|
30
|
-
exports.enabled = enabled;
|
|
31
34
|
function script(name, fallback) {
|
|
32
35
|
const apigConfig = raw();
|
|
33
36
|
const rawScripts = apigConfig && (apigConfig === null || apigConfig === void 0 ? void 0 : apigConfig.scripts);
|
|
@@ -42,5 +45,7 @@ function script(name, fallback) {
|
|
|
42
45
|
}
|
|
43
46
|
return (rawScripts && rawScripts[name]) || fallback;
|
|
44
47
|
}
|
|
45
|
-
|
|
48
|
+
function exists() {
|
|
49
|
+
return index_js_2.apigConfig.raw() !== undefined;
|
|
50
|
+
}
|
|
46
51
|
exports.source = rules;
|
|
@@ -12,7 +12,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.CONTAINER_IMAGE_PROTOCOLS = void 0;
|
|
16
|
+
exports.raw = raw;
|
|
17
|
+
exports.getTargetDetails = getTargetDetails;
|
|
18
|
+
exports.getAllTargetDetails = getAllTargetDetails;
|
|
19
|
+
exports.unlinkAppSail = unlinkAppSail;
|
|
16
20
|
const path_1 = require("path");
|
|
17
21
|
const error_1 = __importDefault(require("../../../error"));
|
|
18
22
|
const runtime_store_1 = __importDefault(require("../../../runtime-store"));
|
|
@@ -124,7 +128,6 @@ function raw(throwError = false) {
|
|
|
124
128
|
};
|
|
125
129
|
});
|
|
126
130
|
}
|
|
127
|
-
exports.raw = raw;
|
|
128
131
|
function getTargetDetails(name) {
|
|
129
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
133
|
const rawTargets = raw();
|
|
@@ -146,9 +149,8 @@ function getTargetDetails(name) {
|
|
|
146
149
|
return Object.assign(Object.assign(Object.assign({}, target), appConfigJson), { validity: { valid: true } });
|
|
147
150
|
});
|
|
148
151
|
}
|
|
149
|
-
|
|
150
|
-
function
|
|
151
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
152
|
+
function getAllTargetDetails() {
|
|
153
|
+
return __awaiter(this, arguments, void 0, function* (throwErr = true) {
|
|
152
154
|
const rawTargets = raw();
|
|
153
155
|
if (!rawTargets) {
|
|
154
156
|
if (throwErr) {
|
|
@@ -192,7 +194,6 @@ function getAllTargetDetails(throwErr = true) {
|
|
|
192
194
|
}, []));
|
|
193
195
|
});
|
|
194
196
|
}
|
|
195
|
-
exports.getAllTargetDetails = getAllTargetDetails;
|
|
196
197
|
function unlinkAppSail(name) {
|
|
197
198
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
199
|
const _raw = raw();
|
|
@@ -210,4 +211,3 @@ function unlinkAppSail(name) {
|
|
|
210
211
|
return !!deleted;
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
|
-
exports.unlinkAppSail = unlinkAppSail;
|
|
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.raw = raw;
|
|
7
|
+
exports.source = source;
|
|
8
|
+
exports.plugin = plugin;
|
|
9
|
+
exports.ignore = ignore;
|
|
10
|
+
exports.script = script;
|
|
7
11
|
const path_1 = require("path");
|
|
8
12
|
const index_js_1 = __importDefault(require("../../../error/index.js"));
|
|
9
13
|
const runtime_store_js_1 = __importDefault(require("../../../runtime-store.js"));
|
|
@@ -21,7 +25,6 @@ function raw(throwError = false) {
|
|
|
21
25
|
}
|
|
22
26
|
return config.get('client');
|
|
23
27
|
}
|
|
24
|
-
exports.raw = raw;
|
|
25
28
|
function source(fallback = folder_names_js_1.default.client) {
|
|
26
29
|
const clientConfig = raw();
|
|
27
30
|
const pth = (clientConfig === null || clientConfig === void 0 ? void 0 : clientConfig.source) || fallback;
|
|
@@ -38,7 +41,6 @@ function source(fallback = folder_names_js_1.default.client) {
|
|
|
38
41
|
}
|
|
39
42
|
return resolvedSource;
|
|
40
43
|
}
|
|
41
|
-
exports.source = source;
|
|
42
44
|
function plugin(name) {
|
|
43
45
|
const clientConfig = raw();
|
|
44
46
|
const rawPlugins = clientConfig && clientConfig.plugin;
|
|
@@ -60,7 +62,6 @@ function plugin(name) {
|
|
|
60
62
|
}
|
|
61
63
|
return rawPlugins[name];
|
|
62
64
|
}
|
|
63
|
-
exports.plugin = plugin;
|
|
64
65
|
function ignore(sourcePath) {
|
|
65
66
|
const clientConfig = raw();
|
|
66
67
|
const ignoreArr = (clientConfig && clientConfig.ignore) || [];
|
|
@@ -78,7 +79,6 @@ function ignore(sourcePath) {
|
|
|
78
79
|
: sourcePath + path_1.sep + value;
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
exports.ignore = ignore;
|
|
82
82
|
function script(name, fallback) {
|
|
83
83
|
const clientConfig = raw();
|
|
84
84
|
const rawScripts = clientConfig && (clientConfig === null || clientConfig === void 0 ? void 0 : clientConfig.scripts);
|
|
@@ -93,4 +93,3 @@ function script(name, fallback) {
|
|
|
93
93
|
}
|
|
94
94
|
return (rawScripts && rawScripts[name]) || fallback;
|
|
95
95
|
}
|
|
96
|
-
exports.script = script;
|
|
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.source = source;
|
|
7
|
+
exports.ignore = ignore;
|
|
8
|
+
exports.targets = targets;
|
|
9
|
+
exports.script = script;
|
|
10
|
+
exports.plugin = plugin;
|
|
7
11
|
const path_1 = require("path");
|
|
8
12
|
const index_js_1 = __importDefault(require("../../../error/index.js"));
|
|
9
13
|
const runtime_store_1 = __importDefault(require("../../../runtime-store"));
|
|
@@ -59,7 +63,6 @@ function source(fallback = constants_1.FOLDERNAME.functions) {
|
|
|
59
63
|
}
|
|
60
64
|
return resolvedSource;
|
|
61
65
|
}
|
|
62
|
-
exports.source = source;
|
|
63
66
|
function ignore(sourcePath) {
|
|
64
67
|
let matchTarget;
|
|
65
68
|
if (sourcePath) {
|
|
@@ -87,7 +90,6 @@ function ignore(sourcePath) {
|
|
|
87
90
|
: sourcePath + path_1.sep + value;
|
|
88
91
|
});
|
|
89
92
|
}
|
|
90
|
-
exports.ignore = ignore;
|
|
91
93
|
function targets(fallback) {
|
|
92
94
|
const rawTargetArr = getRawTargets();
|
|
93
95
|
if (rawTargetArr === null) {
|
|
@@ -108,7 +110,6 @@ function targets(fallback) {
|
|
|
108
110
|
return targetVal;
|
|
109
111
|
});
|
|
110
112
|
}
|
|
111
|
-
exports.targets = targets;
|
|
112
113
|
function script(name, fallback, sourcePath) {
|
|
113
114
|
let matchTarget;
|
|
114
115
|
if (sourcePath) {
|
|
@@ -133,7 +134,6 @@ function script(name, fallback, sourcePath) {
|
|
|
133
134
|
}
|
|
134
135
|
return (rawScripts && rawScripts[name]) || fallback;
|
|
135
136
|
}
|
|
136
|
-
exports.script = script;
|
|
137
137
|
function plugin(name, sourcePath) {
|
|
138
138
|
let matchTarget;
|
|
139
139
|
if (sourcePath) {
|
|
@@ -165,4 +165,3 @@ function plugin(name, sourcePath) {
|
|
|
165
165
|
}
|
|
166
166
|
return rawPlugins && rawPlugins[name];
|
|
167
167
|
}
|
|
168
|
-
exports.plugin = plugin;
|
|
@@ -95,6 +95,7 @@ export interface ISlateConfig {
|
|
|
95
95
|
config?: ISlateConfigDetails;
|
|
96
96
|
details?: ISlateUploadResponse;
|
|
97
97
|
source: string;
|
|
98
|
+
originalSource?: string;
|
|
98
99
|
name: string;
|
|
99
100
|
validity: {
|
|
100
101
|
valid?: boolean;
|
|
@@ -103,4 +104,4 @@ export interface ISlateConfig {
|
|
|
103
104
|
}
|
|
104
105
|
export declare function raw(throwError?: boolean): Array<ISlateConfig> | undefined;
|
|
105
106
|
export declare function getTargetDetails(targ: ISlateConfig): Promise<ISlateConfig>;
|
|
106
|
-
export declare function getAllTargetDetails(throwErr?: boolean): Promise<Array<ISlateConfig> | undefined>;
|
|
107
|
+
export declare function getAllTargetDetails(throwErr?: boolean, loadConfig?: boolean): Promise<Array<ISlateConfig> | undefined>;
|
|
@@ -12,7 +12,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.raw = raw;
|
|
16
|
+
exports.getTargetDetails = getTargetDetails;
|
|
17
|
+
exports.getAllTargetDetails = getAllTargetDetails;
|
|
16
18
|
const ansi_colors_1 = require("ansi-colors");
|
|
17
19
|
const error_1 = __importDefault(require("../../../error"));
|
|
18
20
|
const runtime_store_1 = __importDefault(require("../../../runtime-store"));
|
|
@@ -31,7 +33,11 @@ function raw(throwError = false) {
|
|
|
31
33
|
}
|
|
32
34
|
return config.get('slate');
|
|
33
35
|
}
|
|
34
|
-
|
|
36
|
+
function normalizeTarget(target) {
|
|
37
|
+
const originalSource = target.source;
|
|
38
|
+
const resolvedSource = (0, project_1.resolveProjectPath)(originalSource);
|
|
39
|
+
return Object.assign(Object.assign({}, target), { source: resolvedSource, originalSource });
|
|
40
|
+
}
|
|
35
41
|
function getTargetDetails(targ) {
|
|
36
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
43
|
const rawTargets = raw();
|
|
@@ -39,19 +45,22 @@ function getTargetDetails(targ) {
|
|
|
39
45
|
if (!target) {
|
|
40
46
|
return Object.assign(Object.assign({}, targ), { validity: { valid: false, reason: 'Slate not found' } });
|
|
41
47
|
}
|
|
42
|
-
const
|
|
48
|
+
const normalized = normalizeTarget(target);
|
|
49
|
+
const slateConfigPth = (0, path_1.join)(normalized.source, '.catalyst', constants_1.FILENAME.slate_config);
|
|
50
|
+
if (!fs_1.SYNC.fileExists(slateConfigPth)) {
|
|
51
|
+
return Object.assign(Object.assign({}, normalized), { validity: { valid: false, reason: 'Config file not present' } });
|
|
52
|
+
}
|
|
43
53
|
const slateConfigJson = fs_1.SYNC.readFile(slateConfigPth);
|
|
44
54
|
const slateConfig = (0, toml_1.parseTOML)(slateConfigJson);
|
|
45
55
|
if (!slateConfig) {
|
|
46
|
-
return Object.assign(Object.assign({},
|
|
56
|
+
return Object.assign(Object.assign({}, normalized), { validity: { valid: false, reason: 'Config file is empty' } });
|
|
47
57
|
}
|
|
48
|
-
|
|
49
|
-
return Object.assign({},
|
|
58
|
+
normalized.config = slateConfig;
|
|
59
|
+
return Object.assign({}, normalized);
|
|
50
60
|
});
|
|
51
61
|
}
|
|
52
|
-
|
|
53
|
-
function
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
function getAllTargetDetails() {
|
|
63
|
+
return __awaiter(this, arguments, void 0, function* (throwErr = true, loadConfig = true) {
|
|
55
64
|
const rawTargets = raw();
|
|
56
65
|
if (!rawTargets) {
|
|
57
66
|
if (throwErr) {
|
|
@@ -59,16 +68,22 @@ function getAllTargetDetails(throwErr = true) {
|
|
|
59
68
|
}
|
|
60
69
|
return;
|
|
61
70
|
}
|
|
62
|
-
return Promise.all(rawTargets.reduce((resArr,
|
|
71
|
+
return Promise.all(rawTargets.reduce((resArr, rawTarget) => {
|
|
72
|
+
var _a;
|
|
73
|
+
const target = normalizeTarget(rawTarget);
|
|
63
74
|
const isPath = fs_1.SYNC.dirExists(target.source);
|
|
64
75
|
if (!isPath) {
|
|
65
76
|
resArr.push(Promise.resolve(Object.assign(Object.assign({}, target), { validity: {
|
|
66
77
|
valid: false,
|
|
67
|
-
reason: `Invalid source path: (${(0, ansi_colors_1.bold)(target.source)}) directory not found`
|
|
78
|
+
reason: `Invalid source path: (${(0, ansi_colors_1.bold)((_a = target.originalSource) !== null && _a !== void 0 ? _a : target.source)}) directory not found`
|
|
68
79
|
} })));
|
|
69
80
|
return resArr;
|
|
70
81
|
}
|
|
71
|
-
|
|
82
|
+
if (!loadConfig) {
|
|
83
|
+
resArr.push(Promise.resolve(Object.assign(Object.assign({}, target), { validity: { valid: true } })));
|
|
84
|
+
return resArr;
|
|
85
|
+
}
|
|
86
|
+
const slateConfigPth = (0, path_1.join)(target.source, '.catalyst', constants_1.FILENAME.slate_config);
|
|
72
87
|
const isConfigPath = fs_1.SYNC.fileExists(slateConfigPth);
|
|
73
88
|
if (!isConfigPath) {
|
|
74
89
|
resArr.push(Promise.resolve(Object.assign(Object.assign({}, target), { validity: {
|
|
@@ -91,4 +106,3 @@ function getAllTargetDetails(throwErr = true) {
|
|
|
91
106
|
}, []));
|
|
92
107
|
});
|
|
93
108
|
}
|
|
94
|
-
exports.getAllTargetDetails = getAllTargetDetails;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default class Store {
|
|
2
2
|
private static _store;
|
|
3
|
-
static changeStore(store: 'cli' | 'vscode', path?: string): void;
|
|
3
|
+
static changeStore(store: 'cli' | 'vscode' | 'zcode', path?: string): void;
|
|
4
4
|
private static get istore();
|
|
5
5
|
static get path(): string | undefined;
|
|
6
6
|
static get store(): Record<string, unknown>;
|
|
@@ -5,22 +5,39 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const conf_1 = __importDefault(require("conf"));
|
|
7
7
|
const path_1 = require("path");
|
|
8
|
+
const error_1 = __importDefault(require("../error"));
|
|
8
9
|
const path = process.env['X_ZC_CREDENTIAL_PATH'];
|
|
9
10
|
class Store {
|
|
10
11
|
static changeStore(store, path) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
switch (store) {
|
|
13
|
+
case 'cli': {
|
|
14
|
+
Store._store = new conf_1.default({
|
|
15
|
+
configName: 'zcatalyst-cli',
|
|
16
|
+
projectName: 'zcatalyst-cli',
|
|
17
|
+
cwd: path
|
|
18
|
+
});
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
case 'vscode': {
|
|
22
|
+
Store._store = new conf_1.default({
|
|
23
|
+
configName: 'auth',
|
|
24
|
+
projectName: 'zcatalyst-vscode',
|
|
25
|
+
cwd: path ? (0, path_1.join)(path, 'zcatalyst-vscode') : undefined
|
|
26
|
+
});
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
case 'zcode': {
|
|
30
|
+
Store._store = new conf_1.default({
|
|
31
|
+
configName: 'auth',
|
|
32
|
+
projectName: 'zcatalyst-zcode',
|
|
33
|
+
cwd: path ? (0, path_1.join)(path, 'zcatalyst-code') : undefined
|
|
34
|
+
});
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
default: {
|
|
38
|
+
throw new error_1.default('Invalid Store type: ' + store, { exit: 2 });
|
|
39
|
+
}
|
|
18
40
|
}
|
|
19
|
-
Store._store = new conf_1.default({
|
|
20
|
-
configName: 'auth',
|
|
21
|
-
projectName: 'zcatalyst-vscode',
|
|
22
|
-
cwd: path ? (0, path_1.join)(path, 'zcatalyst-vscode') : undefined
|
|
23
|
-
});
|
|
24
41
|
}
|
|
25
42
|
static get istore() {
|
|
26
43
|
return Store._store;
|
|
@@ -47,9 +64,9 @@ class Store {
|
|
|
47
64
|
return Store.istore.has(key);
|
|
48
65
|
}
|
|
49
66
|
}
|
|
50
|
-
exports.default = Store;
|
|
51
67
|
Store._store = new conf_1.default({
|
|
52
68
|
configName: 'zcatalyst-cli',
|
|
53
69
|
projectName: 'zcatalyst-cli',
|
|
54
70
|
cwd: path
|
|
55
71
|
});
|
|
72
|
+
exports.default = Store;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = Object.freeze({
|
|
4
4
|
us: {
|
|
5
|
-
loc: '
|
|
5
|
+
loc: 'United States',
|
|
6
6
|
ref: 'us',
|
|
7
7
|
value: 'com',
|
|
8
8
|
w_auth: 'us',
|
|
@@ -42,7 +42,7 @@ exports.default = Object.freeze({
|
|
|
42
42
|
ext: '.ca'
|
|
43
43
|
},
|
|
44
44
|
sa: {
|
|
45
|
-
loc: '
|
|
45
|
+
loc: 'Saudi Arabia',
|
|
46
46
|
ref: 'sa',
|
|
47
47
|
value: 'sa',
|
|
48
48
|
w_auth: 'us',
|
|
@@ -58,7 +58,7 @@ exports.default = Object.freeze({
|
|
|
58
58
|
ext: '.jp'
|
|
59
59
|
},
|
|
60
60
|
uae: {
|
|
61
|
-
loc: '
|
|
61
|
+
loc: 'United Arab Emirates',
|
|
62
62
|
ref: 'ae',
|
|
63
63
|
value: 'ae',
|
|
64
64
|
w_auth: 'us',
|
|
@@ -35,20 +35,12 @@ class URL {
|
|
|
35
35
|
return (0, env_js_1.envOverride)('CATALYST_CONSOLE_URL', mapDataCenterUrl(URL._consoleBase));
|
|
36
36
|
}
|
|
37
37
|
static get contacts() {
|
|
38
|
-
|
|
39
|
-
if (dc === undefined) {
|
|
40
|
-
return URL._contacts;
|
|
41
|
-
}
|
|
42
|
-
if (dc.value === dc_type_js_1.default.ca.value) {
|
|
43
|
-
return URL._contacts.replace('.zoho.com', '.zohocloud.ca');
|
|
44
|
-
}
|
|
45
|
-
return URL._contacts.replace('.com', dc.ext);
|
|
38
|
+
return (0, env_js_1.envOverride)('ZOHO_CONTACTS', mapDataCenterUrl(URL._contacts));
|
|
46
39
|
}
|
|
47
40
|
static get stratusSuffix() {
|
|
48
41
|
return (0, env_js_1.envOverride)('CATALYST_STRATUS_RESOURCE_SUFFIX', mapDataCenterUrl(URL._stratusSuffixBase));
|
|
49
42
|
}
|
|
50
43
|
}
|
|
51
|
-
exports.default = URL;
|
|
52
44
|
URL._authBase = 'https://accounts.zoho.com';
|
|
53
45
|
URL._portalBase = 'https://accounts.zohoportal.com';
|
|
54
46
|
URL._adminBase = 'https://api.catalyst.zoho.com';
|
|
@@ -63,6 +55,7 @@ URL.external = Object.freeze({
|
|
|
63
55
|
gitHubAPI: 'https://api.github.com',
|
|
64
56
|
gitHubWeb: 'https://github.com'
|
|
65
57
|
});
|
|
58
|
+
exports.default = URL;
|
|
66
59
|
function mapDataCenterUrl(url) {
|
|
67
60
|
const dc = (0, dc_js_1.getActiveDCType)();
|
|
68
61
|
if (dc === undefined) {
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
36
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
37
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -35,7 +45,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
35
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
46
|
};
|
|
37
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.
|
|
48
|
+
exports.showContainerUsagePrompt = showContainerUsagePrompt;
|
|
49
|
+
exports.isSocketAccessible = isSocketAccessible;
|
|
50
|
+
exports.isContainer = isContainer;
|
|
39
51
|
const ansi_colors_1 = require("ansi-colors");
|
|
40
52
|
const logger_1 = require("./logger");
|
|
41
53
|
const cli_table_1 = require("../cli_table");
|
|
@@ -45,8 +57,8 @@ const error_1 = __importDefault(require("@zcatalyst/container-plugin/out/error")
|
|
|
45
57
|
const userConfig_1 = __importStar(require("../userConfig"));
|
|
46
58
|
const error_2 = __importDefault(require("../error"));
|
|
47
59
|
function showContainerUsagePrompt() {
|
|
48
|
-
var _a, _b;
|
|
49
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
var _a, _b;
|
|
50
62
|
const headerText = 'Attention Developer !!!';
|
|
51
63
|
const padding = Math.round((process.stdout.columns - headerText.length) / 2) - 2;
|
|
52
64
|
const fillLen = padding + headerText.length + padding - 2;
|
|
@@ -152,9 +164,8 @@ function showContainerUsagePrompt() {
|
|
|
152
164
|
(0, logger_1.info)('\n' + table.toString());
|
|
153
165
|
});
|
|
154
166
|
}
|
|
155
|
-
|
|
156
|
-
function
|
|
157
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
function isSocketAccessible() {
|
|
168
|
+
return __awaiter(this, arguments, void 0, function* (throwErr = true) {
|
|
158
169
|
if (!(yield (0, container_plugin_1.ping)(false))) {
|
|
159
170
|
const error = new error_2.default('Docker socket not accessible', {
|
|
160
171
|
exit: 1,
|
|
@@ -169,8 +180,6 @@ function isSocketAccessible(throwErr = true) {
|
|
|
169
180
|
return true;
|
|
170
181
|
});
|
|
171
182
|
}
|
|
172
|
-
exports.isSocketAccessible = isSocketAccessible;
|
|
173
183
|
function isContainer() {
|
|
174
184
|
return false;
|
|
175
185
|
}
|
|
176
|
-
exports.isContainer = isContainer;
|
package/lib/util_modules/dc.js
CHANGED
|
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.getActiveDC = getActiveDC;
|
|
7
|
+
exports.getActiveDCType = getActiveDCType;
|
|
8
|
+
exports.updateActiveDC = updateActiveDC;
|
|
7
9
|
const ansi_colors_1 = require("ansi-colors");
|
|
8
10
|
const path_1 = require("path");
|
|
9
11
|
const config_store_js_1 = __importDefault(require("./config-store.js"));
|
|
@@ -35,13 +37,10 @@ function getActiveDC(dcOption) {
|
|
|
35
37
|
}
|
|
36
38
|
return config_store_js_1.default.get('active_dc', dc_type_js_1.default.us.value);
|
|
37
39
|
}
|
|
38
|
-
exports.getActiveDC = getActiveDC;
|
|
39
40
|
function getActiveDCType() {
|
|
40
41
|
const activeDC = getActiveDC();
|
|
41
42
|
return Object.values(dc_type_js_1.default).find((type) => type.value === activeDC);
|
|
42
43
|
}
|
|
43
|
-
exports.getActiveDCType = getActiveDCType;
|
|
44
44
|
function updateActiveDC(dc) {
|
|
45
45
|
config_store_js_1.default.set('active_dc', dc);
|
|
46
46
|
}
|
|
47
|
-
exports.updateActiveDC = updateActiveDC;
|
|
@@ -2,6 +2,9 @@ export declare const isCI: boolean;
|
|
|
2
2
|
export declare const isMac: boolean;
|
|
3
3
|
export declare const isWindows: boolean;
|
|
4
4
|
export declare const isVsCode: boolean;
|
|
5
|
+
export declare const isZCode: boolean;
|
|
6
|
+
export declare const isExtension: boolean;
|
|
5
7
|
export declare function isPrimaryShell(): boolean;
|
|
6
8
|
export declare function envOverride(envname: string, value: string): string;
|
|
7
9
|
export declare function getEnvVariable(variable: string, fallback?: unknown): unknown;
|
|
10
|
+
export declare const getLocalAccessDomain: (port: number, protocol?: "http" | "ws") => string;
|