@kubb/core 4.37.5 → 4.37.7
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/dist/index.cjs +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -203,6 +203,20 @@ function renderHelp(def, parentName) {
|
|
|
203
203
|
}
|
|
204
204
|
console.log();
|
|
205
205
|
}
|
|
206
|
+
const runtimeBinaries = new Set([
|
|
207
|
+
"node",
|
|
208
|
+
"nodejs",
|
|
209
|
+
"bun",
|
|
210
|
+
"deno"
|
|
211
|
+
]);
|
|
212
|
+
function normalizeArgv(argv) {
|
|
213
|
+
if (argv.length < 2) return argv;
|
|
214
|
+
const firstArg = argv[0];
|
|
215
|
+
if (!firstArg) return argv;
|
|
216
|
+
const runtime = firstArg.split(/[\\/]/).pop()?.toLowerCase().replace(/\.exe$/, "");
|
|
217
|
+
if (runtime && runtimeBinaries.has(runtime)) return argv.slice(2);
|
|
218
|
+
return argv;
|
|
219
|
+
}
|
|
206
220
|
function buildParseOptions(def) {
|
|
207
221
|
const result = { help: {
|
|
208
222
|
type: "boolean",
|
|
@@ -272,7 +286,7 @@ defineCLIAdapter({
|
|
|
272
286
|
},
|
|
273
287
|
async run(defs, argv, opts) {
|
|
274
288
|
const { programName, defaultCommandName, version } = opts;
|
|
275
|
-
const args =
|
|
289
|
+
const args = normalizeArgv(argv);
|
|
276
290
|
if (args[0] === "--version" || args[0] === "-v") {
|
|
277
291
|
console.log(version);
|
|
278
292
|
process.exit(0);
|
|
@@ -1469,7 +1483,7 @@ const fsStorage = defineStorage(() => ({
|
|
|
1469
1483
|
}));
|
|
1470
1484
|
//#endregion
|
|
1471
1485
|
//#region package.json
|
|
1472
|
-
var version = "4.37.
|
|
1486
|
+
var version = "4.37.7";
|
|
1473
1487
|
//#endregion
|
|
1474
1488
|
//#region src/utils/diagnostics.ts
|
|
1475
1489
|
/**
|