kschema-api-gen-appjs 1.3.4 → 1.3.6

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.
Files changed (2) hide show
  1. package/index.js +24 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,10 +1,29 @@
1
1
  import getLatestVersion from "./bin/core/getLatestVersion.js";
2
2
 
3
- const load = async (cmd) => {
3
+ const load = async () => {
4
4
  const v = getLatestVersion();
5
- return (await import(`./bin/${v}/commands/exportCommands/${cmd}.js`)).default;
5
+
6
+ return import(`../bin/${v}/core/resolveCommand.js`);
7
+ };
8
+
9
+ const startFunc = async ({ inCommandToSend, inFolderName,
10
+ inToPath
11
+ }) => {
12
+ const { default: run } = await load();
13
+
14
+ const fn = run(inCommandToSend);
15
+
16
+ fn({
17
+ folderName: inFolderName,
18
+ toPath: inToPath,
19
+ showLog: false,
20
+ isAnnounce: false
21
+ });
6
22
  };
7
23
 
8
- export const StartEndPoint = async (...a) => (await load("StartEndPoint"))(...a);
9
- export const init = async (...a) => (await load("init"))(...a);
10
- export const tally = async (...a) => (await load("tally"))(...a);
24
+ export const StartEndPoint = async ({ inFolderName, inToPath }) => {
25
+ return startFunc({
26
+ inCommandToSend: "StartEndPoint",
27
+ inFolderName, inToPath
28
+ });
29
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kschema-api-gen-appjs",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "description": "CLI to build for appjs, the endpoints",
5
5
  "keywords": [
6
6
  "cli",