@kubb/core 4.37.4 → 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.js
CHANGED
|
@@ -195,6 +195,20 @@ function renderHelp(def, parentName) {
|
|
|
195
195
|
}
|
|
196
196
|
console.log();
|
|
197
197
|
}
|
|
198
|
+
const runtimeBinaries = new Set([
|
|
199
|
+
"node",
|
|
200
|
+
"nodejs",
|
|
201
|
+
"bun",
|
|
202
|
+
"deno"
|
|
203
|
+
]);
|
|
204
|
+
function normalizeArgv(argv) {
|
|
205
|
+
if (argv.length < 2) return argv;
|
|
206
|
+
const firstArg = argv[0];
|
|
207
|
+
if (!firstArg) return argv;
|
|
208
|
+
const runtime = firstArg.split(/[\\/]/).pop()?.toLowerCase().replace(/\.exe$/, "");
|
|
209
|
+
if (runtime && runtimeBinaries.has(runtime)) return argv.slice(2);
|
|
210
|
+
return argv;
|
|
211
|
+
}
|
|
198
212
|
function buildParseOptions(def) {
|
|
199
213
|
const result = { help: {
|
|
200
214
|
type: "boolean",
|
|
@@ -264,7 +278,7 @@ defineCLIAdapter({
|
|
|
264
278
|
},
|
|
265
279
|
async run(defs, argv, opts) {
|
|
266
280
|
const { programName, defaultCommandName, version } = opts;
|
|
267
|
-
const args =
|
|
281
|
+
const args = normalizeArgv(argv);
|
|
268
282
|
if (args[0] === "--version" || args[0] === "-v") {
|
|
269
283
|
console.log(version);
|
|
270
284
|
process.exit(0);
|
|
@@ -1461,7 +1475,7 @@ const fsStorage = defineStorage(() => ({
|
|
|
1461
1475
|
}));
|
|
1462
1476
|
//#endregion
|
|
1463
1477
|
//#region package.json
|
|
1464
|
-
var version$1 = "4.37.
|
|
1478
|
+
var version$1 = "4.37.7";
|
|
1465
1479
|
//#endregion
|
|
1466
1480
|
//#region src/utils/diagnostics.ts
|
|
1467
1481
|
/**
|