wp-typia 0.22.2 → 0.22.3
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/wp-typia.js +15 -1
- package/dist-bunli/.bunli/commands.gen.js +981 -760
- package/dist-bunli/{cli-add-s0p4w1wz.js → cli-add-p3re8act.js} +134 -94
- package/dist-bunli/{cli-doctor-6dchxz12.js → cli-doctor-cjm4rzbk.js} +463 -412
- package/dist-bunli/{cli-init-r6h1xchq.js → cli-init-7gcthyn1.js} +1 -1
- package/dist-bunli/{cli-n6hgvysz.js → cli-mpgt29xc.js} +3 -3
- package/dist-bunli/{cli-6hcbjvym.js → cli-prc42zqd.js} +1 -1
- package/dist-bunli/{cli-scaffold-f023yxc5.js → cli-scaffold-x1dp8sz1.js} +3 -3
- package/dist-bunli/{cli-kww2sraq.js → cli-tbd9x8b6.js} +7 -5
- package/dist-bunli/{cli-smzkbfna.js → cli-x0h03qqe.js} +172 -73
- package/dist-bunli/cli.js +2 -2
- package/dist-bunli/{command-list-d3dcvzg2.js → command-list-wzej5c7v.js} +84 -92
- package/dist-bunli/{migrations-pg5b9fh4.js → migrations-xfb2h7nf.js} +2 -2
- package/dist-bunli/node-cli.js +120 -119
- package/package.json +2 -2
package/bin/wp-typia.js
CHANGED
|
@@ -38,6 +38,20 @@ const sourceCliEntrypoint = path.join(packageRoot, 'src', 'cli.ts');
|
|
|
38
38
|
const standaloneGuidance =
|
|
39
39
|
'Prefer not to install Bun? Use the standalone wp-typia binary from the GitHub release assets.';
|
|
40
40
|
|
|
41
|
+
function normalizeTopLevelHelpArgv(argv) {
|
|
42
|
+
const [firstArg, secondArg, ...rest] = argv;
|
|
43
|
+
if (
|
|
44
|
+
(firstArg === '--help' || firstArg === '-h') &&
|
|
45
|
+
typeof secondArg === 'string' &&
|
|
46
|
+
secondArg.length > 0 &&
|
|
47
|
+
!secondArg.startsWith('-')
|
|
48
|
+
) {
|
|
49
|
+
return [secondArg, firstArg, ...rest];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return argv;
|
|
53
|
+
}
|
|
54
|
+
|
|
41
55
|
function isWorkingBunBinary() {
|
|
42
56
|
const bunCheck = spawnSync(bunBinary, ['--version'], {
|
|
43
57
|
env: process.env,
|
|
@@ -75,7 +89,7 @@ function ensureBuiltRuntime() {
|
|
|
75
89
|
return fs.existsSync(cliEntrypoint) && fs.existsSync(nodeCliEntrypoint);
|
|
76
90
|
}
|
|
77
91
|
|
|
78
|
-
const argv = process.argv.slice(2);
|
|
92
|
+
const argv = normalizeTopLevelHelpArgv(process.argv.slice(2));
|
|
79
93
|
const { command } = getRuntimeRoutingInvocation(argv, {
|
|
80
94
|
longValueOptions: longValueOptionSet,
|
|
81
95
|
reservedCommands: reservedCommandSet,
|