kschema-api-gen-appjs 1.3.2 → 1.3.4
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/bin/cli.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import getLatestVersion from "./core/getLatestVersion.js";
|
|
4
4
|
import loadRunner from "./core/loadRunner.js";
|
|
5
5
|
|
|
6
|
-
const run = () => {
|
|
6
|
+
const run = async () => {
|
|
7
7
|
const version = getLatestVersion();
|
|
8
|
-
const runner = loadRunner(version);
|
|
9
|
-
runner();
|
|
8
|
+
const runner = await loadRunner(version);
|
|
9
|
+
await runner();
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
run();
|
|
12
|
+
run().then();
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
export default function parseInput() {
|
|
2
2
|
const [cmd, ...args] = process.argv.slice(2);
|
|
3
3
|
|
|
4
|
+
const flags = Object.fromEntries(
|
|
5
|
+
args
|
|
6
|
+
.filter(a => a.includes("="))
|
|
7
|
+
.map(a => a.split("="))
|
|
8
|
+
);
|
|
9
|
+
|
|
4
10
|
return {
|
|
5
11
|
cmd: cmd || null,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
argsAsIs: args[0] || null,
|
|
12
|
+
folderName: flags?.folderName || null,
|
|
13
|
+
isAnnounce: flags?.isAnnounce || true,
|
|
14
|
+
showLog: flags?.showLog || false,
|
|
10
15
|
toPath: process.cwd()
|
|
11
16
|
};
|
|
12
17
|
};
|