zcatalyst-cli 1.25.3 → 1.26.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/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 +2 -3
- 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 +15 -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 +19 -9
- 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/start.js +12 -5
- 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/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 +2 -2
- 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.js +5 -6
- 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
|
@@ -20,7 +20,7 @@ const runtime_store_1 = __importDefault(require("../../runtime-store"));
|
|
|
20
20
|
const throbber_1 = __importDefault(require("../../throbber"));
|
|
21
21
|
const constants_1 = require("../../util_modules/constants");
|
|
22
22
|
const languages_1 = require("./languages");
|
|
23
|
-
exports.default = (
|
|
23
|
+
exports.default = (fnTypes_1, ...args_1) => __awaiter(void 0, [fnTypes_1, ...args_1], void 0, function* (fnTypes, skipFnFilter = false) {
|
|
24
24
|
yield fn_utils_1.fnUtils.common.executeHook({ prefix: 'pre', command: 'serve' });
|
|
25
25
|
const throbber = throbber_1.default.getInstance();
|
|
26
26
|
const targets = yield fn_utils_1.fnUtils.common.validate(skipFnFilter);
|
|
@@ -44,13 +44,14 @@ exports.default = (fnTypes, skipFnFilter = false) => __awaiter(void 0, void 0, v
|
|
|
44
44
|
const [_nodeFns, javaFns, pythonFns] = yield (0, languages_1.prepareFunctions)(refinedTargets);
|
|
45
45
|
javaFns && (0, compile_1.printCompilationLog)(javaFns);
|
|
46
46
|
const pyStacks = [];
|
|
47
|
-
pythonFns === null || pythonFns === void 0 ? void 0 : pythonFns.
|
|
47
|
+
pythonFns === null || pythonFns === void 0 ? void 0 : pythonFns.forEach((target) => {
|
|
48
48
|
if (!pyStacks.includes(target.stack + '') && target.valid) {
|
|
49
49
|
pyStacks.push(target.stack + '');
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
yield Promise.all(pyStacks.map((stack) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
-
|
|
53
|
+
var _a, _b;
|
|
54
|
+
yield (0, pip_install_1.ensurePyRuntime)(constants_1.ENVPATH.runtimes.data, stack, (_b = (_a = pythonFns === null || pythonFns === void 0 ? void 0 : pythonFns.at(0)) === null || _a === void 0 ? void 0 : _a.additionalInfo) === null || _b === void 0 ? void 0 : _b.binPath);
|
|
54
55
|
})));
|
|
55
56
|
yield (0, common_1.resolveAllFnPorts)(refinedTargets);
|
|
56
57
|
return refinedTargets;
|
|
@@ -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,7 @@ 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.prepareFunctions =
|
|
48
|
+
exports.prepareFunctions = prepareFunctions;
|
|
39
49
|
const runtime_1 = __importDefault(require("../../../util_modules/constants/lib/runtime"));
|
|
40
50
|
function node(targets) {
|
|
41
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -76,4 +86,3 @@ function prepareFunctions(targets) {
|
|
|
76
86
|
return Promise.all([node(nodeFns), java(javaFns), python(pythonFns)]);
|
|
77
87
|
});
|
|
78
88
|
}
|
|
79
|
-
exports.prepareFunctions = prepareFunctions;
|
|
@@ -24,31 +24,41 @@ exports.default = (targets) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
24
24
|
if (targets === undefined || targets.length === 0) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
const reqNodeStacks = targets.reduce((stacks, target) => {
|
|
28
|
+
if (target.stack) {
|
|
29
|
+
stacks[target.stack] = '';
|
|
30
|
+
}
|
|
31
|
+
return stacks;
|
|
32
|
+
}, {});
|
|
33
|
+
yield Promise.all(Object.keys(reqNodeStacks).map((stack) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
try {
|
|
35
|
+
const binPath = yield fn_utils_1.fnUtils.node.ensureNodeVersion(stack);
|
|
36
|
+
reqNodeStacks[stack] = binPath;
|
|
37
|
+
(0, index_1.debug)(`Node binary for stack ${stack} is at ${binPath}`);
|
|
38
|
+
}
|
|
39
|
+
catch (er) {
|
|
40
|
+
(0, index_1.debug)('Ensure node version error: ', er);
|
|
41
|
+
targets.forEach((targ) => {
|
|
42
|
+
if (targ.stack === stack) {
|
|
43
|
+
targ.valid = false;
|
|
44
|
+
targ.failure_reason = error_1.default.getErrorInstance(er).message;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
})));
|
|
38
49
|
const throbber = throbber_1.default.getInstance();
|
|
39
50
|
yield fn_utils_1.fnUtils.node.validate(targets);
|
|
40
|
-
|
|
41
|
-
.filter((target) => {
|
|
51
|
+
return Promise.all(targets.map((target) => __awaiter(void 0, void 0, void 0, function* () {
|
|
42
52
|
if (!target.valid) {
|
|
43
53
|
throbber.remove('function_serve_' + target.name);
|
|
54
|
+
return target;
|
|
44
55
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
56
|
+
target.additionalInfo = {
|
|
57
|
+
binPath: target.stack && reqNodeStacks[target.stack]
|
|
58
|
+
? reqNodeStacks[target.stack]
|
|
59
|
+
: 'node'
|
|
60
|
+
};
|
|
48
61
|
fn_utils_1.fnUtils.common.generateUrlForTarget(target);
|
|
49
|
-
return target;
|
|
50
|
-
});
|
|
51
|
-
return Promise.all(nodeTargets.map((target) => __awaiter(void 0, void 0, void 0, function* () {
|
|
52
62
|
const buildPath = (0, path_1.join)(runtime_store_1.default.get('project.root'), constants_1.FOLDERNAME.build, constants_1.FOLDERNAME.functions, target.name);
|
|
53
63
|
yield fs_1.ASYNC.emptyDir(buildPath);
|
|
54
64
|
yield fs_1.ASYNC.copyDir(target.source, buildPath);
|
|
@@ -27,29 +27,23 @@ exports.default = (targets) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
27
27
|
}
|
|
28
28
|
const throbber = throbber_1.default.getInstance();
|
|
29
29
|
yield fn_utils_1.fnUtils.python.validate(targets);
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const _debugFns = runtime_store_1.default.get('context.port.debug', {});
|
|
31
|
+
return Promise.all(targets.map((target) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
var _a, _b;
|
|
32
33
|
if (!target.valid) {
|
|
33
34
|
throbber.remove('function_serve_' + target.name);
|
|
35
|
+
return target;
|
|
34
36
|
}
|
|
35
|
-
return target.valid;
|
|
36
|
-
})
|
|
37
|
-
.map((target) => {
|
|
38
37
|
fn_utils_1.fnUtils.common.generateUrlForTarget(target);
|
|
39
|
-
return target;
|
|
40
|
-
});
|
|
41
|
-
const _debugFns = runtime_store_1.default.get('context.port.debug', {});
|
|
42
|
-
return Promise.all(pyTargets.map((target) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
-
var _a;
|
|
44
38
|
const buildPath = (0, path_1.join)(runtime_store_1.default.get('project.root'), constants_1.FOLDERNAME.build, constants_1.FOLDERNAME.functions, target.name);
|
|
45
39
|
const reqFile = (0, path_1.join)(target.source, constants_1.FILENAME.functions.python_requirements);
|
|
46
40
|
yield (0, fs_extra_1.ensureDir)(buildPath);
|
|
47
41
|
yield fs_1.ASYNC.emptyDir(buildPath);
|
|
48
42
|
try {
|
|
49
|
-
yield (0, pip_install_1.installRequirements)(reqFile, buildPath, (_a = target.
|
|
43
|
+
yield (0, pip_install_1.installRequirements)(reqFile, buildPath, (_a = target.additionalInfo) === null || _a === void 0 ? void 0 : _a.binPath);
|
|
50
44
|
const debugFns = _debugFns[target.type] || {};
|
|
51
45
|
if (debugFns[target.name]) {
|
|
52
|
-
yield (0, pip_install_1.installPkgs)(['debugpy'],
|
|
46
|
+
yield (0, pip_install_1.installPkgs)(['debugpy'], (_b = target.additionalInfo) === null || _b === void 0 ? void 0 : _b.binPath, buildPath);
|
|
53
47
|
if (!target.additionalInfo)
|
|
54
48
|
target.additionalInfo = { binPath: '' };
|
|
55
49
|
target.additionalInfo.debug = {
|
package/lib/signals/index.js
CHANGED
|
@@ -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,7 @@ 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.generate =
|
|
48
|
+
exports.generate = generate;
|
|
39
49
|
const ansi_colors_1 = require("ansi-colors");
|
|
40
50
|
const error_1 = __importDefault(require("../error"));
|
|
41
51
|
const constants_1 = require("../util_modules/constants");
|
|
@@ -46,7 +56,6 @@ const js_1 = require("../util_modules/js");
|
|
|
46
56
|
const option_1 = require("../util_modules/option");
|
|
47
57
|
function generate(publisher, event) {
|
|
48
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
var _a;
|
|
50
59
|
const unknownArgs = (0, option_1.getUnknownOpts)([]);
|
|
51
60
|
if (unknownArgs.length % 2 !== 0) {
|
|
52
61
|
throw new error_1.default('Unknown options are not provided as key value pairs', {
|
|
@@ -101,7 +110,7 @@ function generate(publisher, event) {
|
|
|
101
110
|
}, {});
|
|
102
111
|
let data = {};
|
|
103
112
|
if (publisher !== 'custom') {
|
|
104
|
-
const publisherModule = yield (
|
|
113
|
+
const publisherModule = yield Promise.resolve(`${'../event_generate/' + (publisher === 'authentication' ? 'user' : publisher)}`).then(s => __importStar(require(s)));
|
|
105
114
|
data = yield publisherModule.getData(optionMap);
|
|
106
115
|
if (publisher === 'datastore') {
|
|
107
116
|
data = Object.assign(Object.assign({}, data), { table_details: {
|
|
@@ -197,7 +206,6 @@ function generate(publisher, event) {
|
|
|
197
206
|
return jsonContent;
|
|
198
207
|
});
|
|
199
208
|
}
|
|
200
|
-
exports.generate = generate;
|
|
201
209
|
function getPublisherType(publisher) {
|
|
202
210
|
for (const [category, services] of Object.entries(constants_1.SIGNALS_PUBLISHERS_TYPE)) {
|
|
203
211
|
if (services.includes(publisher)) {
|
package/lib/slate-utils.js
CHANGED
|
@@ -12,7 +12,8 @@ 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.slateUtils = void 0;
|
|
16
|
+
exports.validateServeCommand = validateServeCommand;
|
|
16
17
|
const ansi_colors_1 = require("ansi-colors");
|
|
17
18
|
const path_1 = require("path");
|
|
18
19
|
const archiver_1 = __importDefault(require("./archiver"));
|
|
@@ -151,4 +152,3 @@ function validateServeCommand(targDetails) {
|
|
|
151
152
|
});
|
|
152
153
|
return targDetails;
|
|
153
154
|
}
|
|
154
|
-
exports.validateServeCommand = validateServeCommand;
|
package/lib/throbber/index.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { ISpinnerOptions, VALID_STATUSES } from './utils';
|
|
4
2
|
import { TTYPassThrough } from '../util_modules/logger';
|
|
5
3
|
interface IThrobbers {
|
|
@@ -25,6 +23,7 @@ declare class Throbber {
|
|
|
25
23
|
remove(name: string): ISpinnerOptions;
|
|
26
24
|
stopAll(newStatus?: string): IThrobbers;
|
|
27
25
|
hasActiveSpinners(): boolean;
|
|
26
|
+
hasSpinner(name: string): boolean;
|
|
28
27
|
setSpinnerProperties(name: string, options: ISpinnerOptions, status?: VALID_STATUSES): void;
|
|
29
28
|
updateSpinnerState(): void;
|
|
30
29
|
loopStream(): NodeJS.Timeout;
|
package/lib/throbber/index.js
CHANGED
|
@@ -20,13 +20,13 @@ class Throbber {
|
|
|
20
20
|
this.spinners = {};
|
|
21
21
|
this.isCursorHidden = false;
|
|
22
22
|
this.currentInterval = null;
|
|
23
|
-
this.stream = env_1.
|
|
23
|
+
this.stream = env_1.isExtension ? logger_1.LogStreamFactory.getStream() : process.stderr;
|
|
24
24
|
this.lineCount = 0;
|
|
25
25
|
this.currentFrameIndex = 0;
|
|
26
26
|
this.spin =
|
|
27
27
|
!this.options.disableSpins &&
|
|
28
28
|
!process.env.CI &&
|
|
29
|
-
((process.stderr && process.stderr.isTTY) || env_1.
|
|
29
|
+
((process.stderr && process.stderr.isTTY) || env_1.isExtension);
|
|
30
30
|
this.bindSigint();
|
|
31
31
|
Throbber.instance = this;
|
|
32
32
|
}
|
|
@@ -99,6 +99,9 @@ class Throbber {
|
|
|
99
99
|
hasActiveSpinners() {
|
|
100
100
|
return !!Object.values(this.spinners).find(({ status }) => status === 'spinning');
|
|
101
101
|
}
|
|
102
|
+
hasSpinner(name) {
|
|
103
|
+
return this.spinners[name] !== undefined;
|
|
104
|
+
}
|
|
102
105
|
setSpinnerProperties(name, options, status = 'spinning') {
|
|
103
106
|
if (!this.spin) {
|
|
104
107
|
return;
|
package/lib/throbber/utils.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
export type VALID_STATUSES = 'succeed' | 'fail' | 'spinning' | 'non-spinnable' | 'stopped';
|
|
3
2
|
export type VALID_COLORS = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'grey' | 'redBright' | 'greenBright' | 'yellowBright' | 'blueBright' | 'magentaBright' | 'cyanBright' | 'whiteBright';
|
|
4
3
|
export interface ISpinnerOptions {
|
package/lib/throbber/utils.js
CHANGED
|
@@ -3,7 +3,10 @@ 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.breakText = breakText;
|
|
7
|
+
exports.getLinesLength = getLinesLength;
|
|
8
|
+
exports.writeStream = writeStream;
|
|
9
|
+
exports.cleanStream = cleanStream;
|
|
7
10
|
const readline_1 = require("readline");
|
|
8
11
|
const strip_ansi_1 = __importDefault(require("strip-ansi"));
|
|
9
12
|
function breakText(text, prefixLength) {
|
|
@@ -12,7 +15,6 @@ function breakText(text, prefixLength) {
|
|
|
12
15
|
.map((line, index) => (index === 0 ? breakLine(line, prefixLength) : breakLine(line, 0)))
|
|
13
16
|
.join('\n');
|
|
14
17
|
}
|
|
15
|
-
exports.breakText = breakText;
|
|
16
18
|
function breakLine(line, prefixLength) {
|
|
17
19
|
const columns = process.stderr.columns || 95;
|
|
18
20
|
return line.length >= columns - prefixLength
|
|
@@ -24,12 +26,10 @@ function getLinesLength(text, prefixLength) {
|
|
|
24
26
|
.split('\n')
|
|
25
27
|
.map((line, index) => (index === 0 ? line.length + prefixLength : line.length));
|
|
26
28
|
}
|
|
27
|
-
exports.getLinesLength = getLinesLength;
|
|
28
29
|
function writeStream(stream, output, rawLines) {
|
|
29
30
|
stream.write(output);
|
|
30
31
|
(0, readline_1.moveCursor)(stream, 0, -rawLines.length);
|
|
31
32
|
}
|
|
32
|
-
exports.writeStream = writeStream;
|
|
33
33
|
function cleanStream(stream, rawLines) {
|
|
34
34
|
rawLines.forEach((lineLength, index) => {
|
|
35
35
|
(0, readline_1.moveCursor)(stream, lineLength, index);
|
|
@@ -40,4 +40,3 @@ function cleanStream(stream, rawLines) {
|
|
|
40
40
|
(0, readline_1.clearScreenDown)(stream);
|
|
41
41
|
(0, readline_1.moveCursor)(stream, 0, -rawLines.length);
|
|
42
42
|
}
|
|
43
|
-
exports.cleanStream = cleanStream;
|
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;
|
|
@@ -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,6 @@ function raw(throwError = false) {
|
|
|
31
33
|
}
|
|
32
34
|
return config.get('slate');
|
|
33
35
|
}
|
|
34
|
-
exports.raw = raw;
|
|
35
36
|
function getTargetDetails(targ) {
|
|
36
37
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
38
|
const rawTargets = raw();
|
|
@@ -49,9 +50,8 @@ function getTargetDetails(targ) {
|
|
|
49
50
|
return Object.assign({}, target);
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
function
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
function getAllTargetDetails() {
|
|
54
|
+
return __awaiter(this, arguments, void 0, function* (throwErr = true) {
|
|
55
55
|
const rawTargets = raw();
|
|
56
56
|
if (!rawTargets) {
|
|
57
57
|
if (throwErr) {
|
|
@@ -91,4 +91,3 @@ function getAllTargetDetails(throwErr = true) {
|
|
|
91
91
|
}, []));
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
|
-
exports.getAllTargetDetails = getAllTargetDetails;
|