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
package/lib/fn-utils/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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.fnUtils = void 0;
|
|
27
37
|
const common = __importStar(require("./lib/common"));
|
|
@@ -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.getBrowserLogicFramework = getBrowserLogicFramework;
|
|
16
|
+
exports.downloadJavaDependencies = downloadJavaDependencies;
|
|
16
17
|
const path_1 = require("path");
|
|
17
18
|
const util_1 = require("util");
|
|
18
19
|
const archiver_1 = __importDefault(require("../../archiver"));
|
|
@@ -40,9 +41,8 @@ function getBrowserLogicFramework(stack) {
|
|
|
40
41
|
return framework.framework;
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
function downloadJavaDependencies(path_2, deps_1) {
|
|
45
|
+
return __awaiter(this, arguments, void 0, function* (path, deps, isZip = true) {
|
|
46
46
|
const _commonAPI = yield (0, endpoints_1.commonAPI)();
|
|
47
47
|
return Promise.all(deps.map((dep) => __awaiter(this, void 0, void 0, function* () {
|
|
48
48
|
try {
|
|
@@ -65,4 +65,3 @@ function downloadJavaDependencies(path, deps, isZip = true) {
|
|
|
65
65
|
})));
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
exports.downloadJavaDependencies = downloadJavaDependencies;
|
|
@@ -12,7 +12,17 @@ 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.validate = validate;
|
|
16
|
+
exports.refineTargets = refineTargets;
|
|
17
|
+
exports.executeHook = executeHook;
|
|
18
|
+
exports.pack = pack;
|
|
19
|
+
exports.generateUrlForTarget = generateUrlForTarget;
|
|
20
|
+
exports.findAndReplaceConfigProps = findAndReplaceConfigProps;
|
|
21
|
+
exports.resolveAllFnPorts = resolveAllFnPorts;
|
|
22
|
+
exports.deleteFunctionLocal = deleteFunctionLocal;
|
|
23
|
+
exports.getSDK = getSDK;
|
|
24
|
+
exports.updateFnConfig = updateFnConfig;
|
|
25
|
+
exports.copyModDirPerm = copyModDirPerm;
|
|
16
26
|
const ansi_colors_1 = require("ansi-colors");
|
|
17
27
|
const path_1 = require("path");
|
|
18
28
|
const archiver_1 = __importDefault(require("../../archiver"));
|
|
@@ -34,8 +44,8 @@ const option_1 = require("../../util_modules/option");
|
|
|
34
44
|
const project_1 = require("../../util_modules/project");
|
|
35
45
|
const os_1 = require("os");
|
|
36
46
|
const pip_install_1 = require("../../init/dependencies/python/pip-install");
|
|
37
|
-
function validate(
|
|
38
|
-
return __awaiter(this,
|
|
47
|
+
function validate() {
|
|
48
|
+
return __awaiter(this, arguments, void 0, function* (skipFnFilter = false) {
|
|
39
49
|
const sourceDir = config_1.functionsConfig.source();
|
|
40
50
|
const fnTargets = config_1.functionsConfig.targets();
|
|
41
51
|
if (fnTargets === undefined || fnTargets.length === 0) {
|
|
@@ -127,9 +137,8 @@ function validate(skipFnFilter = false) {
|
|
|
127
137
|
return filteredFnsPath;
|
|
128
138
|
});
|
|
129
139
|
}
|
|
130
|
-
|
|
131
|
-
function
|
|
132
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
function refineTargets() {
|
|
141
|
+
return __awaiter(this, arguments, void 0, function* (rawTargets = (0, functions_1.targets)([]), mapRemoteFn = true) {
|
|
133
142
|
let remoteFnMap = {};
|
|
134
143
|
let runtimeDetails = runtime_store_1.default.get('context.catalyst.runtime', { runtimes: [] });
|
|
135
144
|
const projectRoot = (0, project_1.getProjectRoot)();
|
|
@@ -260,7 +269,6 @@ function refineTargets(rawTargets = (0, functions_1.targets)([]), mapRemoteFn =
|
|
|
260
269
|
})));
|
|
261
270
|
});
|
|
262
271
|
}
|
|
263
|
-
exports.refineTargets = refineTargets;
|
|
264
272
|
function refineEnvVariables(vars) {
|
|
265
273
|
return !vars
|
|
266
274
|
? undefined
|
|
@@ -270,8 +278,8 @@ function refineEnvVariables(vars) {
|
|
|
270
278
|
return envObj;
|
|
271
279
|
}, {});
|
|
272
280
|
}
|
|
273
|
-
function executeHook(
|
|
274
|
-
return __awaiter(this,
|
|
281
|
+
function executeHook(_a) {
|
|
282
|
+
return __awaiter(this, arguments, void 0, function* ({ prefix, command }) {
|
|
275
283
|
if ((0, option_1.getOptionValue)('ignoreScripts', false)) {
|
|
276
284
|
(0, logger_1.debug)(`skipping ${prefix + command} hook`);
|
|
277
285
|
return;
|
|
@@ -283,10 +291,9 @@ function executeHook({ prefix, command }) {
|
|
|
283
291
|
return (0, execute_script_1.default)('functions:' + prefix + command);
|
|
284
292
|
});
|
|
285
293
|
}
|
|
286
|
-
exports.executeHook = executeHook;
|
|
287
294
|
function pack(target) {
|
|
288
|
-
var _a, _b;
|
|
289
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
296
|
+
var _a, _b, _c;
|
|
290
297
|
try {
|
|
291
298
|
let source = target.source;
|
|
292
299
|
const buildPlugin = yield (0, plugin_loader_1.default)('functions', 'build', source).catch((err) => (0, logger_1.debug)(err));
|
|
@@ -338,7 +345,7 @@ function pack(target) {
|
|
|
338
345
|
const tmpDir = (0, path_1.join)((0, os_1.tmpdir)(), '.catalyst', 'python', target.name + Date.now().toString());
|
|
339
346
|
yield fs_1.ASYNC.ensureDir(tmpDir);
|
|
340
347
|
yield fs_1.ASYNC.emptyDir(tmpDir);
|
|
341
|
-
yield (0, pip_install_1.installRequirements)(reqFile, tmpDir, target.
|
|
348
|
+
yield (0, pip_install_1.installRequirements)(reqFile, tmpDir, (_c = target.additionalInfo) === null || _c === void 0 ? void 0 : _c.binPath, true);
|
|
342
349
|
const files = yield fs_1.ASYNC.walk(tmpDir);
|
|
343
350
|
files.forEach((file) => {
|
|
344
351
|
zip.add(file.path.replace(tmpDir + path_1.sep, ''), file.stats.isSymbolicLink()
|
|
@@ -360,7 +367,6 @@ function pack(target) {
|
|
|
360
367
|
}
|
|
361
368
|
});
|
|
362
369
|
}
|
|
363
|
-
exports.pack = pack;
|
|
364
370
|
function generateUrlForTarget(target) {
|
|
365
371
|
const domainPrefix = (0, project_1.getDomainPrefix)(false);
|
|
366
372
|
if (!domainPrefix) {
|
|
@@ -384,9 +390,8 @@ function generateUrlForTarget(target) {
|
|
|
384
390
|
}
|
|
385
391
|
return target.url;
|
|
386
392
|
}
|
|
387
|
-
|
|
388
|
-
function
|
|
389
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
393
|
+
function findAndReplaceConfigProps(dir_1, _a) {
|
|
394
|
+
return __awaiter(this, arguments, void 0, function* (dir, { stack, type, integ_config, integ_handler }) {
|
|
390
395
|
return fs_1.ASYNC.findAndReplace(dir)([
|
|
391
396
|
constants_1.PLACEHOLDER.catalyst_config.stack,
|
|
392
397
|
constants_1.PLACEHOLDER.catalyst_config.type,
|
|
@@ -395,7 +400,6 @@ function findAndReplaceConfigProps(dir, { stack, type, integ_config, integ_handl
|
|
|
395
400
|
], [stack, constants_1.REMOTE_REF.functions.type[type], integ_config, integ_handler]);
|
|
396
401
|
});
|
|
397
402
|
}
|
|
398
|
-
exports.findAndReplaceConfigProps = findAndReplaceConfigProps;
|
|
399
403
|
function resolveAllFnServePort(targets) {
|
|
400
404
|
return __awaiter(this, void 0, void 0, function* () {
|
|
401
405
|
const debugOpts = runtime_store_1.default.get('context.port.debug', false);
|
|
@@ -449,7 +453,6 @@ function resolveAllFnPorts(targets) {
|
|
|
449
453
|
}
|
|
450
454
|
});
|
|
451
455
|
}
|
|
452
|
-
exports.resolveAllFnPorts = resolveAllFnPorts;
|
|
453
456
|
function fnDirDelete(conf) {
|
|
454
457
|
return __awaiter(this, void 0, void 0, function* () {
|
|
455
458
|
const fnSource = conf.get('functions.source', false);
|
|
@@ -482,9 +485,8 @@ function deleteFunctionLocal(path) {
|
|
|
482
485
|
return conf.syncSave();
|
|
483
486
|
});
|
|
484
487
|
}
|
|
485
|
-
|
|
486
|
-
function
|
|
487
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
488
|
+
function getSDK(fnType_1, dest_1, stack_1) {
|
|
489
|
+
return __awaiter(this, arguments, void 0, function* (fnType, dest, stack, options = {}) {
|
|
488
490
|
const sdk = yield (0, endpoints_1.sdkAPI)();
|
|
489
491
|
let sdkZip;
|
|
490
492
|
switch (stack) {
|
|
@@ -502,7 +504,6 @@ function getSDK(fnType, dest, stack, options = {}) {
|
|
|
502
504
|
.finalize();
|
|
503
505
|
});
|
|
504
506
|
}
|
|
505
|
-
exports.getSDK = getSDK;
|
|
506
507
|
function updateFnConfig(target) {
|
|
507
508
|
return __awaiter(this, void 0, void 0, function* () {
|
|
508
509
|
const targetConfig = target.configuration;
|
|
@@ -558,9 +559,8 @@ function updateFnConfig(target) {
|
|
|
558
559
|
(0, logger_1.success)(`Memory configuration for function ${(0, ansi_colors_1.bold)(target.name)}(${target.id}) has been updated to ${(0, ansi_colors_1.bold)(memValue + ' MB')}`);
|
|
559
560
|
});
|
|
560
561
|
}
|
|
561
|
-
|
|
562
|
-
function
|
|
563
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
562
|
+
function copyModDirPerm(src_1, dest_1, perm_1) {
|
|
563
|
+
return __awaiter(this, arguments, void 0, function* (src, dest, perm, { replace = true } = {}) {
|
|
564
564
|
const srcContents = yield fs_1.ASYNC.walk(src, { includeDirPaths: true, depth: 1 });
|
|
565
565
|
srcContents.shift();
|
|
566
566
|
yield Promise.all(srcContents.map((content) => {
|
|
@@ -591,4 +591,3 @@ function copyModDirPerm(src, dest, perm, { replace = true } = {}) {
|
|
|
591
591
|
return fs_1.ASYNC.chmod(dest, perm);
|
|
592
592
|
});
|
|
593
593
|
}
|
|
594
|
-
exports.copyModDirPerm = copyModDirPerm;
|
|
@@ -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.integHelper = integHelper;
|
|
16
|
+
exports.copyIntegHandlers = copyIntegHandlers;
|
|
16
17
|
const ansi_colors_1 = require("ansi-colors");
|
|
17
18
|
const path_1 = require("path");
|
|
18
19
|
const index_js_1 = __importDefault(require("../../error/index.js"));
|
|
@@ -78,7 +79,6 @@ function integHelper(services) {
|
|
|
78
79
|
}
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
|
-
exports.integHelper = integHelper;
|
|
82
82
|
function copyIntegHandlers(templatePath, targetPath, lang) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
84
|
const service = runtime_store_1.default.get('context.functions.integration.service', false);
|
|
@@ -137,4 +137,3 @@ function copyIntegHandlers(templatePath, targetPath, lang) {
|
|
|
137
137
|
runtime_store_1.default.set('context.functions.integration.config', configString);
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
|
-
exports.copyIntegHandlers = copyIntegHandlers;
|
|
@@ -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.rewriteClasspath = rewriteClasspath;
|
|
16
|
+
exports.normaliseClasspath = normaliseClasspath;
|
|
16
17
|
const path_1 = require("path");
|
|
17
18
|
const error_1 = __importDefault(require("../../../error"));
|
|
18
19
|
const fs_1 = require("../../../util_modules/fs");
|
|
@@ -51,7 +52,6 @@ function rewriteClasspath(pth, libPth) {
|
|
|
51
52
|
return fs_1.ASYNC.writeFile(pth, builder.buildObject(result));
|
|
52
53
|
});
|
|
53
54
|
}
|
|
54
|
-
exports.rewriteClasspath = rewriteClasspath;
|
|
55
55
|
function normaliseClasspath(pth, libFolder) {
|
|
56
56
|
return __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
const content = yield fs_1.ASYNC.readFile(pth);
|
|
@@ -104,4 +104,3 @@ function normaliseClasspath(pth, libFolder) {
|
|
|
104
104
|
return fs_1.ASYNC.writeFile(pth, builder.buildObject(result));
|
|
105
105
|
});
|
|
106
106
|
}
|
|
107
|
-
exports.normaliseClasspath = normaliseClasspath;
|
|
@@ -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.warningMessages = void 0;
|
|
16
|
+
exports.compileTarget = compileTarget;
|
|
17
|
+
exports.printCompilationLog = printCompilationLog;
|
|
16
18
|
const path_1 = require("path");
|
|
17
19
|
const constants_1 = require("../../../util_modules/constants");
|
|
18
20
|
const ensure_java_userconfig_1 = require("./ensure-java-userconfig");
|
|
@@ -30,8 +32,8 @@ exports.warningMessages = [
|
|
|
30
32
|
'warning: [options] system modules path not set in conjunction with -source 11'
|
|
31
33
|
];
|
|
32
34
|
function compileTarget(target) {
|
|
33
|
-
var _a, _b;
|
|
34
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
var _a, _b;
|
|
35
37
|
const targetSource = target.source;
|
|
36
38
|
const outputFolder = (0, path_1.join)(targetSource, constants_1.FOLDERNAME.output);
|
|
37
39
|
const integ = target.integ_config;
|
|
@@ -105,7 +107,6 @@ function compileTarget(target) {
|
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
109
|
}
|
|
108
|
-
exports.compileTarget = compileTarget;
|
|
109
110
|
function compileJavaFiles(file, spawnCommand, targetVersion, targetSource, outputFolder) {
|
|
110
111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
111
112
|
(0, index_1.message)('Compiling ' + file);
|
|
@@ -219,4 +220,3 @@ function printCompilationLog(javaFns) {
|
|
|
219
220
|
});
|
|
220
221
|
}
|
|
221
222
|
}
|
|
222
|
-
exports.printCompilationLog = printCompilationLog;
|
|
@@ -14,6 +14,16 @@ export declare const stackVsVersions: {
|
|
|
14
14
|
target: string;
|
|
15
15
|
label: string;
|
|
16
16
|
};
|
|
17
|
+
java21: {
|
|
18
|
+
version: string;
|
|
19
|
+
target: string;
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
java25: {
|
|
23
|
+
version: string;
|
|
24
|
+
target: string;
|
|
25
|
+
label: string;
|
|
26
|
+
};
|
|
17
27
|
};
|
|
18
28
|
type javaProcess = 'java' | 'javac';
|
|
19
29
|
export declare function ensureJava(stack: string): Promise<string | void>;
|
|
@@ -12,7 +12,10 @@ 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.stackVsVersions = void 0;
|
|
16
|
+
exports.ensureJava = ensureJava;
|
|
17
|
+
exports.getJavaSpawnCommand = getJavaSpawnCommand;
|
|
18
|
+
exports.getTargetVersion = getTargetVersion;
|
|
16
19
|
const semver_1 = require("semver");
|
|
17
20
|
const error_1 = __importDefault(require("../../../error"));
|
|
18
21
|
const runtime_store_1 = __importDefault(require("../../../runtime-store"));
|
|
@@ -23,6 +26,7 @@ const ansi_colors_1 = require("ansi-colors");
|
|
|
23
26
|
const index_1 = require("../../../util_modules/logger/index");
|
|
24
27
|
const env_1 = require("../../../util_modules/env");
|
|
25
28
|
const jdk_utils_1 = require("jdk-utils");
|
|
29
|
+
const utils_1 = require("../../../util_modules/fs/utils");
|
|
26
30
|
exports.stackVsVersions = {
|
|
27
31
|
java8: {
|
|
28
32
|
version: '1.8.x',
|
|
@@ -38,6 +42,16 @@ exports.stackVsVersions = {
|
|
|
38
42
|
version: '17.x',
|
|
39
43
|
target: '17',
|
|
40
44
|
label: 'Java 17'
|
|
45
|
+
},
|
|
46
|
+
java21: {
|
|
47
|
+
version: '21.x',
|
|
48
|
+
target: '21',
|
|
49
|
+
label: 'Java 21'
|
|
50
|
+
},
|
|
51
|
+
java25: {
|
|
52
|
+
version: '25.x',
|
|
53
|
+
target: '25',
|
|
54
|
+
label: 'Java 25'
|
|
41
55
|
}
|
|
42
56
|
};
|
|
43
57
|
class JavaRuntimes {
|
|
@@ -74,22 +88,27 @@ class JavaRuntimes {
|
|
|
74
88
|
return (0, path_1.join)(home, 'bin');
|
|
75
89
|
}
|
|
76
90
|
}
|
|
91
|
+
const runtimeBinPathCache = 'context.java.runtimeBinPathCache';
|
|
77
92
|
function ensureJava(stack) {
|
|
78
|
-
var _a;
|
|
79
93
|
return __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
var _a;
|
|
95
|
+
const runtimeCacheKey = `${runtimeBinPathCache}.${stack}`;
|
|
96
|
+
if (runtime_store_1.default.get(runtimeCacheKey)) {
|
|
97
|
+
return runtime_store_1.default.get(runtimeCacheKey);
|
|
98
|
+
}
|
|
80
99
|
const configKey = `${stack}.bin`;
|
|
81
|
-
const binPath = env_1.
|
|
100
|
+
const binPath = env_1.isExtension
|
|
82
101
|
? runtime_store_1.default.get(`executables.${configKey}`)
|
|
83
102
|
: userConfig_1.default.get(configKey);
|
|
84
103
|
if (!binPath) {
|
|
85
104
|
const javaRuntimes = yield JavaRuntimes.init();
|
|
86
105
|
const runtimeArr = javaRuntimes.get(stack);
|
|
87
106
|
if (runtimeArr && runtimeArr.length > 1) {
|
|
88
|
-
if (env_1.
|
|
107
|
+
if (env_1.isExtension) {
|
|
89
108
|
(0, index_1.info)();
|
|
90
109
|
(0, index_1.labeled)(stack, `Found more than one java runtime for java major version ${stack.replace('java', '')} in the below paths`).WARN();
|
|
91
110
|
runtimeArr === null || runtimeArr === void 0 ? void 0 : runtimeArr.forEach((rn) => {
|
|
92
|
-
(0, index_1.labeled)(stack, ' * ' + rn.homedir).WARN();
|
|
111
|
+
(0, index_1.labeled)(stack, ' * ' + (0, path_1.join)(rn.homedir, 'bin')).WARN();
|
|
93
112
|
});
|
|
94
113
|
(0, index_1.info)();
|
|
95
114
|
(0, index_1.labeled)(stack, `Please specify the required java runtime for stack ${stack} using the "zcatalyst.${configKey}" config`).WARN();
|
|
@@ -102,7 +121,7 @@ function ensureJava(stack) {
|
|
|
102
121
|
errorId: 'JAVA_CONFIG_MORE_RN',
|
|
103
122
|
arg: [
|
|
104
123
|
stack.replace('java', ''),
|
|
105
|
-
runtimeArr.map((rn) => '* ' + rn.homedir).join('\n'),
|
|
124
|
+
runtimeArr.map((rn) => '* ' + (0, path_1.join)(rn.homedir, 'bin')).join('\n'),
|
|
106
125
|
(0, ansi_colors_1.bold)('catalyst config:set'),
|
|
107
126
|
(0, ansi_colors_1.bold)(`catalyst config:set ${configKey}=${(rnWithJavac && (0, ansi_colors_1.underline)((0, path_1.join)(rnWithJavac.homedir, 'bin'))) ||
|
|
108
127
|
'<java_bin_folder_path>'}`)
|
|
@@ -111,7 +130,7 @@ function ensureJava(stack) {
|
|
|
111
130
|
}
|
|
112
131
|
const runtime = runtimeArr === null || runtimeArr === void 0 ? void 0 : runtimeArr.at(0);
|
|
113
132
|
if (!runtime) {
|
|
114
|
-
if (env_1.
|
|
133
|
+
if (env_1.isExtension) {
|
|
115
134
|
(0, index_1.labeled)(stack, 'Unable to detect the java version for stack: ' + stack).ERROR();
|
|
116
135
|
(0, index_1.labeled)(stack, `Please install the required JDK version and configure it using the "zcatalyst.${configKey}" settings`).ERROR();
|
|
117
136
|
(0, index_1.info)();
|
|
@@ -123,9 +142,10 @@ function ensureJava(stack) {
|
|
|
123
142
|
});
|
|
124
143
|
}
|
|
125
144
|
if (!runtime.hasJavac) {
|
|
126
|
-
if (env_1.
|
|
145
|
+
if (env_1.isExtension) {
|
|
127
146
|
(0, index_1.labeled)(stack, 'Unable to detect the javac executable for stack: ' + stack).ERROR();
|
|
128
|
-
(0, index_1.labeled)(stack, 'Please install the required JDK version and configure it using the ' +
|
|
147
|
+
(0, index_1.labeled)(stack, 'Please install the required JDK version and configure it using the ' +
|
|
148
|
+
env_1.isExtension
|
|
129
149
|
? ` "catalyst config:set ${configKey}=<java_bin_dir_path>" command`
|
|
130
150
|
: `zcatalyst.${configKey} settings`).ERROR();
|
|
131
151
|
(0, index_1.info)();
|
|
@@ -155,23 +175,24 @@ function ensureJava(stack) {
|
|
|
155
175
|
]
|
|
156
176
|
});
|
|
157
177
|
}
|
|
178
|
+
const _binPath = (0, utils_1.untildify)(binPath);
|
|
158
179
|
try {
|
|
159
|
-
const foundStack = yield findJavaVersion(
|
|
180
|
+
const foundStack = yield findJavaVersion(_binPath);
|
|
160
181
|
if (!foundStack || !(foundStack in exports.stackVsVersions)) {
|
|
161
|
-
if (env_1.
|
|
162
|
-
(0, index_1.labeled)(stack, `The required Java runtime version for ${stack} was not found in the supplied setting zcatalyst.${configKey}=${(0, ansi_colors_1.underline)(
|
|
182
|
+
if (env_1.isExtension) {
|
|
183
|
+
(0, index_1.labeled)(stack, `The required Java runtime version for ${stack} was not found in the supplied setting zcatalyst.${configKey}=${(0, ansi_colors_1.underline)(_binPath)}`).ERROR();
|
|
163
184
|
(0, index_1.labeled)(stack, `Please install the required java version and configure it using the zcatalyst.${configKey} settings`).ERROR();
|
|
164
185
|
(0, index_1.info)();
|
|
165
186
|
return;
|
|
166
187
|
}
|
|
167
|
-
throw new error_1.default('Unable to find the required java version from bin path: ' +
|
|
188
|
+
throw new error_1.default('Unable to find the required java version from bin path: ' + _binPath, {
|
|
168
189
|
exit: 1,
|
|
169
190
|
errorId: 'JAVA_CONFIG-1A',
|
|
170
|
-
arg: [(0, ansi_colors_1.bold)(configKey), (0, ansi_colors_1.underline)((0, path_1.join)(
|
|
191
|
+
arg: [(0, ansi_colors_1.bold)(configKey), (0, ansi_colors_1.underline)((0, path_1.join)(_binPath, (0, ansi_colors_1.red)('java'))), stack, 'java']
|
|
171
192
|
});
|
|
172
193
|
}
|
|
173
194
|
if (foundStack !== stack) {
|
|
174
|
-
if (env_1.
|
|
195
|
+
if (env_1.isExtension) {
|
|
175
196
|
(0, index_1.labeled)(stack, `The version of java executable found in the bin path from the config ${stack}.bin does not match with the required stack`).ERROR();
|
|
176
197
|
(0, index_1.labeled)(stack, `Please specify a valid bin path for the stack ${stack} in the settings "zcatalyst.${configKey}"`).ERROR();
|
|
177
198
|
(0, index_1.info)();
|
|
@@ -199,19 +220,19 @@ function ensureJava(stack) {
|
|
|
199
220
|
throw error;
|
|
200
221
|
}
|
|
201
222
|
try {
|
|
202
|
-
yield findJavaCVersion(
|
|
223
|
+
yield findJavaCVersion(_binPath);
|
|
203
224
|
}
|
|
204
225
|
catch (er) {
|
|
205
226
|
const error = error_1.default.getErrorInstance(er, { skipHelp: true });
|
|
206
227
|
if (error.original instanceof Error &&
|
|
207
228
|
'code' in error.original &&
|
|
208
229
|
error.original.code === 'ENOENT') {
|
|
209
|
-
throw new error_1.default(`Unable to check the javac version using the given binary path: ${
|
|
230
|
+
throw new error_1.default(`Unable to check the javac version using the given binary path: ${_binPath}`, {
|
|
210
231
|
exit: 1,
|
|
211
232
|
errorId: 'JAVA_CONFIG-1A',
|
|
212
233
|
arg: [
|
|
213
234
|
(0, ansi_colors_1.bold)(`${stack}.bin`),
|
|
214
|
-
(0, ansi_colors_1.underline)((0, path_1.join)(
|
|
235
|
+
(0, ansi_colors_1.underline)((0, path_1.join)(_binPath, (0, ansi_colors_1.red)('javac'))),
|
|
215
236
|
stack,
|
|
216
237
|
'javac'
|
|
217
238
|
]
|
|
@@ -219,13 +240,16 @@ function ensureJava(stack) {
|
|
|
219
240
|
}
|
|
220
241
|
throw error;
|
|
221
242
|
}
|
|
222
|
-
|
|
243
|
+
if (_binPath) {
|
|
244
|
+
runtime_store_1.default.set(runtimeCacheKey, _binPath);
|
|
245
|
+
return _binPath;
|
|
246
|
+
}
|
|
247
|
+
return;
|
|
223
248
|
});
|
|
224
249
|
}
|
|
225
|
-
exports.ensureJava = ensureJava;
|
|
226
250
|
function findJavaVersion(bin) {
|
|
227
|
-
var _a;
|
|
228
251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
252
|
+
var _a;
|
|
229
253
|
const javaVersionOut = yield (0, shell_1.spawn)(getJavaSpawnCommand('java', bin), ['-version'], {
|
|
230
254
|
stdio: 'pipe'
|
|
231
255
|
}).ASYNC();
|
|
@@ -257,8 +281,6 @@ function findJavaCVersion(bin) {
|
|
|
257
281
|
function getJavaSpawnCommand(process, binPath) {
|
|
258
282
|
return binPath ? (0, path_1.join)(binPath, process) : process;
|
|
259
283
|
}
|
|
260
|
-
exports.getJavaSpawnCommand = getJavaSpawnCommand;
|
|
261
284
|
function getTargetVersion(stack) {
|
|
262
285
|
return exports.stackVsVersions[stack].target;
|
|
263
286
|
}
|
|
264
|
-
exports.getTargetVersion = getTargetVersion;
|
|
@@ -26,7 +26,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.classPathSep = exports.FN_TYPE = void 0;
|
|
30
|
+
exports.isValidClassName = isValidClassName;
|
|
31
|
+
exports.ensureJavaInvoker = ensureJavaInvoker;
|
|
32
|
+
exports.projectFileValidation = projectFileValidation;
|
|
33
|
+
exports.extractAllData = extractAllData;
|
|
34
|
+
exports.validate = validate;
|
|
35
|
+
exports.getTemplatePath = getTemplatePath;
|
|
30
36
|
const ansi_colors_1 = require("ansi-colors");
|
|
31
37
|
const path_1 = require("path");
|
|
32
38
|
const xml2js_1 = __importDefault(require("xml2js"));
|
|
@@ -57,7 +63,6 @@ function isValidClassName(name) {
|
|
|
57
63
|
}
|
|
58
64
|
return true;
|
|
59
65
|
}
|
|
60
|
-
exports.isValidClassName = isValidClassName;
|
|
61
66
|
function ensureJavaInvoker(pth, invoker, target) {
|
|
62
67
|
var _a, _b, _c;
|
|
63
68
|
const spawnCommand = (0, ensure_java_userconfig_js_1.getJavaSpawnCommand)('javac', (_a = target.additionalInfo) === null || _a === void 0 ? void 0 : _a.binPath);
|
|
@@ -94,10 +99,9 @@ function ensureJavaInvoker(pth, invoker, target) {
|
|
|
94
99
|
index_js_3.SYNC.copyDir((0, path_1.join)((0, path_1.dirname)(invoker), 'lib'), (0, path_1.join)((0, path_1.dirname)(classPth), 'lib'));
|
|
95
100
|
return true;
|
|
96
101
|
}
|
|
97
|
-
exports.ensureJavaInvoker = ensureJavaInvoker;
|
|
98
102
|
function projectFileValidation(pth, target) {
|
|
99
|
-
var _a, _b;
|
|
100
103
|
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
var _a, _b;
|
|
101
105
|
const fileExists = yield index_js_3.ASYNC.fileExists(pth);
|
|
102
106
|
if (!fileExists) {
|
|
103
107
|
const templatePath = getTemplatePath(target.type, (_b = (_a = target.integ_config) === null || _a === void 0 ? void 0 : _a.at(0)) === null || _b === void 0 ? void 0 : _b.service);
|
|
@@ -119,7 +123,6 @@ function projectFileValidation(pth, target) {
|
|
|
119
123
|
}
|
|
120
124
|
});
|
|
121
125
|
}
|
|
122
|
-
exports.projectFileValidation = projectFileValidation;
|
|
123
126
|
function extractAllData(child, name) {
|
|
124
127
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
128
|
return new Promise((res, rej) => {
|
|
@@ -137,16 +140,14 @@ function extractAllData(child, name) {
|
|
|
137
140
|
});
|
|
138
141
|
});
|
|
139
142
|
}
|
|
140
|
-
exports.extractAllData = extractAllData;
|
|
141
143
|
function validate(targets) {
|
|
142
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
145
|
return _validate(targets);
|
|
144
146
|
});
|
|
145
147
|
}
|
|
146
|
-
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
function _validate(targets_1) {
|
|
149
|
+
return __awaiter(this, arguments, void 0, function* (targets, ensured = {}, idx = 0) {
|
|
150
|
+
var _a;
|
|
150
151
|
if (targets.length < idx + 1) {
|
|
151
152
|
return;
|
|
152
153
|
}
|
|
@@ -247,7 +248,6 @@ function getTemplatePath(fnType, add) {
|
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
|
-
exports.getTemplatePath = getTemplatePath;
|
|
251
251
|
__exportStar(require("./classpath"), exports);
|
|
252
252
|
__exportStar(require("./compile"), exports);
|
|
253
253
|
__exportStar(require("./ensure-java-userconfig.js"), exports);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.keywords = void 0;
|
|
4
|
+
exports.containsKeyWord = containsKeyWord;
|
|
4
5
|
const js_1 = require("../../../util_modules/js");
|
|
5
6
|
exports.keywords = Object.freeze([
|
|
6
7
|
'abstract',
|
|
@@ -68,4 +69,3 @@ function containsKeyWord(name) {
|
|
|
68
69
|
return false;
|
|
69
70
|
});
|
|
70
71
|
}
|
|
71
|
-
exports.containsKeyWord = containsKeyWord;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TEMPLATE } from '../../util_modules/constants';
|
|
2
2
|
import { IFnTarget, NodeFn } from './common';
|
|
3
3
|
export declare function validate(targets: Array<IFnTarget<NodeFn>>): Promise<void>;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function ensureNodeVersion(stack: string, onlyDirPath?: boolean): Promise<string>;
|
|
5
5
|
export declare function getTemplatePath(fnType: keyof typeof TEMPLATE.functions.node, add?: string): string;
|