@kubb/cli 3.3.1 → 3.3.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.
@@ -5,7 +5,7 @@ var url = require('url');
5
5
  var child_process = require('child_process');
6
6
  var string_decoder = require('string_decoder');
7
7
  var util = require('util');
8
- var process3 = require('process');
8
+ var process4 = require('process');
9
9
  var path2 = require('path');
10
10
  var promises$1 = require('timers/promises');
11
11
  var os = require('os');
@@ -41,7 +41,7 @@ function _interopNamespace(e) {
41
41
  }
42
42
 
43
43
  var tty__default = /*#__PURE__*/_interopDefault(tty);
44
- var process3__namespace = /*#__PURE__*/_interopNamespace(process3);
44
+ var process4__namespace = /*#__PURE__*/_interopNamespace(process4);
45
45
  var path2__default = /*#__PURE__*/_interopDefault(path2);
46
46
 
47
47
  var __create = Object.create;
@@ -79,10 +79,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
79
79
  mod
80
80
  ));
81
81
 
82
- // ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@20.17.10__@swc+core@1.7.22_jiti@2.4.1__77u6eq5nvhzfov6ddvuxt4wipe/node_modules/tsup/assets/cjs_shims.js
82
+ // ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@20.17.10__jiti@2.4.1_postcss@8.4.49_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
83
83
  var getImportMetaUrl; exports.importMetaUrl = void 0;
84
84
  var init_cjs_shims = __esm({
85
- "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@20.17.10__@swc+core@1.7.22_jiti@2.4.1__77u6eq5nvhzfov6ddvuxt4wipe/node_modules/tsup/assets/cjs_shims.js"() {
85
+ "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@20.17.10__jiti@2.4.1_postcss@8.4.49_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js"() {
86
86
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
87
87
  exports.importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
88
88
  }
@@ -1056,7 +1056,7 @@ init_cjs_shims();
1056
1056
  // ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/utils/standard-stream.js
1057
1057
  init_cjs_shims();
1058
1058
  var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
1059
- var STANDARD_STREAMS = [process3__namespace.default.stdin, process3__namespace.default.stdout, process3__namespace.default.stderr];
1059
+ var STANDARD_STREAMS = [process4__namespace.default.stdin, process4__namespace.default.stdout, process4__namespace.default.stderr];
1060
1060
  var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
1061
1061
  var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
1062
1062
 
@@ -1185,7 +1185,7 @@ var quoteString = (escapedArgument) => {
1185
1185
  if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
1186
1186
  return escapedArgument;
1187
1187
  }
1188
- return process3.platform === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
1188
+ return process4.platform === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
1189
1189
  };
1190
1190
  var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
1191
1191
 
@@ -1195,13 +1195,15 @@ init_cjs_shims();
1195
1195
  // ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
1196
1196
  init_cjs_shims();
1197
1197
 
1198
- // ../../node_modules/.pnpm/is-unicode-supported@2.0.0/node_modules/is-unicode-supported/index.js
1198
+ // ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
1199
1199
  init_cjs_shims();
1200
1200
  function isUnicodeSupported() {
1201
- if (process3__namespace.default.platform !== "win32") {
1202
- return process3__namespace.default.env.TERM !== "linux";
1201
+ const { env } = process4__namespace.default;
1202
+ const { TERM, TERM_PROGRAM } = env;
1203
+ if (process4__namespace.default.platform !== "win32") {
1204
+ return TERM !== "linux";
1203
1205
  }
1204
- return Boolean(process3__namespace.default.env.WT_SESSION) || Boolean(process3__namespace.default.env.TERMINUS_SUBLIME) || process3__namespace.default.env.ConEmuTask === "{cmd::Cmder}" || process3__namespace.default.env.TERM_PROGRAM === "Terminus-Sublime" || process3__namespace.default.env.TERM_PROGRAM === "vscode" || process3__namespace.default.env.TERM === "xterm-256color" || process3__namespace.default.env.TERM === "alacritty" || process3__namespace.default.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1206
+ return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
1205
1207
  }
1206
1208
 
1207
1209
  // ../../node_modules/.pnpm/figures@6.1.0/node_modules/figures/index.js
@@ -1644,8 +1646,8 @@ var validateVerbose = (verbose) => {
1644
1646
 
1645
1647
  // ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/return/duration.js
1646
1648
  init_cjs_shims();
1647
- var getStartTime = () => process3.hrtime.bigint();
1648
- var getDurationMs = (startTime) => Number(process3.hrtime.bigint() - startTime) / 1e6;
1649
+ var getStartTime = () => process4.hrtime.bigint();
1650
+ var getDurationMs = (startTime) => Number(process4.hrtime.bigint() - startTime) / 1e6;
1649
1651
 
1650
1652
  // ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/command.js
1651
1653
  var handleCommand = (filePath, rawArguments, rawOptions) => {
@@ -1704,10 +1706,10 @@ function traversePathUp(startPath) {
1704
1706
 
1705
1707
  // ../../node_modules/.pnpm/npm-run-path@6.0.0/node_modules/npm-run-path/index.js
1706
1708
  var npmRunPath = ({
1707
- cwd = process3__namespace.default.cwd(),
1708
- path: pathOption = process3__namespace.default.env[pathKey()],
1709
+ cwd = process4__namespace.default.cwd(),
1710
+ path: pathOption = process4__namespace.default.env[pathKey()],
1709
1711
  preferLocal = true,
1710
- execPath: execPath2 = process3__namespace.default.execPath,
1712
+ execPath: execPath2 = process4__namespace.default.execPath,
1711
1713
  addExecPath = true
1712
1714
  } = {}) => {
1713
1715
  const cwdPath = path2__default.default.resolve(toPath(cwd));
@@ -1735,7 +1737,7 @@ var applyExecPath = (result, pathParts, execPath2, cwdPath) => {
1735
1737
  result.push(pathPart);
1736
1738
  }
1737
1739
  };
1738
- var npmRunPathEnv = ({ env = process3__namespace.default.env, ...options } = {}) => {
1740
+ var npmRunPathEnv = ({ env = process4__namespace.default.env, ...options } = {}) => {
1739
1741
  env = { ...env };
1740
1742
  const pathName = pathKey({ env });
1741
1743
  options.path = env[pathName];
@@ -2908,8 +2910,8 @@ var mapNode = ({ options }) => {
2908
2910
  };
2909
2911
  var handleNodeOption = (file, commandArguments, {
2910
2912
  node: shouldHandleNode = false,
2911
- nodePath = process3.execPath,
2912
- nodeOptions = process3.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")),
2913
+ nodePath = process4.execPath,
2914
+ nodeOptions = process4.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")),
2913
2915
  cwd,
2914
2916
  execPath: formerNodePath,
2915
2917
  ...options
@@ -3025,7 +3027,7 @@ var normalizeCwd = (cwd = getDefaultCwd()) => {
3025
3027
  };
3026
3028
  var getDefaultCwd = () => {
3027
3029
  try {
3028
- return process3__namespace.default.cwd();
3030
+ return process4__namespace.default.cwd();
3029
3031
  } catch (error) {
3030
3032
  error.message = `The current directory does not exist.
3031
3033
  ${error.message}`;
@@ -3068,7 +3070,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
3068
3070
  options.killSignal = normalizeKillSignal(options.killSignal);
3069
3071
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
3070
3072
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
3071
- if (process3__namespace.default.platform === "win32" && path2__default.default.basename(file, ".exe") === "cmd") {
3073
+ if (process4__namespace.default.platform === "win32" && path2__default.default.basename(file, ".exe") === "cmd") {
3072
3074
  commandArguments.unshift("/q");
3073
3075
  }
3074
3076
  return { file, commandArguments, options };
@@ -3109,7 +3111,7 @@ var addDefaultOptions = ({
3109
3111
  serialization
3110
3112
  });
3111
3113
  var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
3112
- const env = extendEnv ? { ...process3__namespace.default.env, ...envOption } : envOption;
3114
+ const env = extendEnv ? { ...process4__namespace.default.env, ...envOption } : envOption;
3113
3115
  if (preferLocal || node) {
3114
3116
  return npmRunPathEnv({
3115
3117
  env,
@@ -3895,7 +3897,7 @@ init_cjs_shims();
3895
3897
  // ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/complete.js
3896
3898
  init_cjs_shims();
3897
3899
 
3898
- // ../../node_modules/.pnpm/pretty-ms@9.0.0/node_modules/pretty-ms/index.js
3900
+ // ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
3899
3901
  init_cjs_shims();
3900
3902
 
3901
3903
  // ../../node_modules/.pnpm/parse-ms@4.0.0/node_modules/parse-ms/index.js
@@ -3938,7 +3940,7 @@ function parseMilliseconds(milliseconds) {
3938
3940
  throw new TypeError("Expected a finite number or bigint");
3939
3941
  }
3940
3942
 
3941
- // ../../node_modules/.pnpm/pretty-ms@9.0.0/node_modules/pretty-ms/index.js
3943
+ // ../../node_modules/.pnpm/pretty-ms@9.2.0/node_modules/pretty-ms/index.js
3942
3944
  var isZero = (value) => value === 0 || value === 0n;
3943
3945
  var pluralize = (word, count2) => count2 === 1 || count2 === 1n ? word : `${word}s`;
3944
3946
  var SECOND_ROUNDING_EPSILON = 1e-7;
@@ -3949,6 +3951,8 @@ function prettyMilliseconds(milliseconds, options) {
3949
3951
  throw new TypeError("Expected a finite number or bigint");
3950
3952
  }
3951
3953
  options = { ...options };
3954
+ const sign = milliseconds < 0 ? "-" : "";
3955
+ milliseconds = milliseconds < 0 ? -milliseconds : milliseconds;
3952
3956
  if (options.colonNotation) {
3953
3957
  options.compact = false;
3954
3958
  options.formatSubMilliseconds = false;
@@ -3970,7 +3974,7 @@ function prettyMilliseconds(milliseconds, options) {
3970
3974
  if ((result.length === 0 || !options.colonNotation) && isZero(value) && !(options.colonNotation && short === "m")) {
3971
3975
  return;
3972
3976
  }
3973
- valueString = valueString ?? String(value);
3977
+ valueString ??= String(value);
3974
3978
  if (options.colonNotation) {
3975
3979
  const wholeDigits = valueString.includes(".") ? valueString.split(".")[0].length : valueString.length;
3976
3980
  const minLength = result.length > 0 ? 2 : 1;
@@ -3982,47 +3986,57 @@ function prettyMilliseconds(milliseconds, options) {
3982
3986
  };
3983
3987
  const parsed = parseMilliseconds(milliseconds);
3984
3988
  const days = BigInt(parsed.days);
3985
- add(days / 365n, "year", "y");
3986
- add(days % 365n, "day", "d");
3987
- add(Number(parsed.hours), "hour", "h");
3989
+ if (options.hideYearAndDays) {
3990
+ add(BigInt(days) * 24n + BigInt(parsed.hours), "hour", "h");
3991
+ } else {
3992
+ if (options.hideYear) {
3993
+ add(days, "day", "d");
3994
+ } else {
3995
+ add(days / 365n, "year", "y");
3996
+ add(days % 365n, "day", "d");
3997
+ }
3998
+ add(Number(parsed.hours), "hour", "h");
3999
+ }
3988
4000
  add(Number(parsed.minutes), "minute", "m");
3989
- if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
3990
- const seconds = Number(parsed.seconds);
3991
- const milliseconds2 = Number(parsed.milliseconds);
3992
- const microseconds = Number(parsed.microseconds);
3993
- const nanoseconds = Number(parsed.nanoseconds);
3994
- add(seconds, "second", "s");
3995
- if (options.formatSubMilliseconds) {
3996
- add(milliseconds2, "millisecond", "ms");
3997
- add(microseconds, "microsecond", "\xB5s");
3998
- add(nanoseconds, "nanosecond", "ns");
4001
+ if (!options.hideSeconds) {
4002
+ if (options.separateMilliseconds || options.formatSubMilliseconds || !options.colonNotation && milliseconds < 1e3) {
4003
+ const seconds = Number(parsed.seconds);
4004
+ const milliseconds2 = Number(parsed.milliseconds);
4005
+ const microseconds = Number(parsed.microseconds);
4006
+ const nanoseconds = Number(parsed.nanoseconds);
4007
+ add(seconds, "second", "s");
4008
+ if (options.formatSubMilliseconds) {
4009
+ add(milliseconds2, "millisecond", "ms");
4010
+ add(microseconds, "microsecond", "\xB5s");
4011
+ add(nanoseconds, "nanosecond", "ns");
4012
+ } else {
4013
+ const millisecondsAndBelow = milliseconds2 + microseconds / 1e3 + nanoseconds / 1e6;
4014
+ const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
4015
+ const roundedMilliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
4016
+ const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMilliseconds;
4017
+ add(
4018
+ Number.parseFloat(millisecondsString),
4019
+ "millisecond",
4020
+ "ms",
4021
+ millisecondsString
4022
+ );
4023
+ }
3999
4024
  } else {
4000
- const millisecondsAndBelow = milliseconds2 + microseconds / 1e3 + nanoseconds / 1e6;
4001
- const millisecondsDecimalDigits = typeof options.millisecondsDecimalDigits === "number" ? options.millisecondsDecimalDigits : 0;
4002
- const roundedMilliseconds = millisecondsAndBelow >= 1 ? Math.round(millisecondsAndBelow) : Math.ceil(millisecondsAndBelow);
4003
- const millisecondsString = millisecondsDecimalDigits ? millisecondsAndBelow.toFixed(millisecondsDecimalDigits) : roundedMilliseconds;
4004
- add(
4005
- Number.parseFloat(millisecondsString),
4006
- "millisecond",
4007
- "ms",
4008
- millisecondsString
4009
- );
4025
+ const seconds = (isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60;
4026
+ const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
4027
+ const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
4028
+ const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
4029
+ add(Number.parseFloat(secondsString), "second", "s", secondsString);
4010
4030
  }
4011
- } else {
4012
- const seconds = (isBigInt ? Number(milliseconds % ONE_DAY_IN_MILLISECONDS) : milliseconds) / 1e3 % 60;
4013
- const secondsDecimalDigits = typeof options.secondsDecimalDigits === "number" ? options.secondsDecimalDigits : 1;
4014
- const secondsFixed = floorDecimals(seconds, secondsDecimalDigits);
4015
- const secondsString = options.keepDecimalsOnWholeSeconds ? secondsFixed : secondsFixed.replace(/\.0+$/, "");
4016
- add(Number.parseFloat(secondsString), "second", "s", secondsString);
4017
4031
  }
4018
4032
  if (result.length === 0) {
4019
- return "0" + (options.verbose ? " milliseconds" : "ms");
4033
+ return sign + "0" + (options.verbose ? " milliseconds" : "ms");
4020
4034
  }
4021
4035
  const separator = options.colonNotation ? ":" : " ";
4022
4036
  if (typeof options.unitCount === "number") {
4023
4037
  result = result.slice(0, Math.max(options.unitCount, 1));
4024
4038
  }
4025
- return result.join(separator);
4039
+ return sign + result.join(separator);
4026
4040
  }
4027
4041
 
4028
4042
  // ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/verbose/error.js
@@ -4357,10 +4371,10 @@ var guessStreamDirection = {
4357
4371
  }
4358
4372
  };
4359
4373
  var getStandardStreamDirection = (value) => {
4360
- if ([0, process3__namespace.default.stdin].includes(value)) {
4374
+ if ([0, process4__namespace.default.stdin].includes(value)) {
4361
4375
  return "input";
4362
4376
  }
4363
- if ([1, 2, process3__namespace.default.stdout, process3__namespace.default.stderr].includes(value)) {
4377
+ if ([1, 2, process4__namespace.default.stdout, process4__namespace.default.stderr].includes(value)) {
4364
4378
  return "output";
4365
4379
  }
4366
4380
  };
@@ -5619,9 +5633,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
5619
5633
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
5620
5634
  };
5621
5635
  var getIpcExport = () => {
5622
- const anyProcess = process3__namespace.default;
5636
+ const anyProcess = process4__namespace.default;
5623
5637
  const isSubprocess = true;
5624
- const ipc = process3__namespace.default.channel !== void 0;
5638
+ const ipc = process4__namespace.default.channel !== void 0;
5625
5639
  return {
5626
5640
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
5627
5641
  getCancelSignal: getCancelSignal.bind(void 0, {
@@ -7682,7 +7696,7 @@ var ConsolaWritable = class extends stream.Writable {
7682
7696
  this.consola = consola;
7683
7697
  }
7684
7698
  _write(chunk, _encoding, callback) {
7685
- process3__namespace.stdout.write(`${p2.dim(chunk?.toString())}`);
7699
+ process4__namespace.stdout.write(`${p2.dim(chunk?.toString())}`);
7686
7700
  callback();
7687
7701
  }
7688
7702
  };
@@ -7694,7 +7708,7 @@ init_cjs_shims();
7694
7708
  init_cjs_shims();
7695
7709
  var import_index = __toESM(require_eventemitter3());
7696
7710
 
7697
- // ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
7711
+ // ../../node_modules/.pnpm/p-timeout@6.1.3/node_modules/p-timeout/index.js
7698
7712
  init_cjs_shims();
7699
7713
  var TimeoutError = class extends Error {
7700
7714
  constructor(message) {
@@ -7731,8 +7745,12 @@ function pTimeout(promise, options) {
7731
7745
  if (signal.aborted) {
7732
7746
  reject(getAbortedReason(signal));
7733
7747
  }
7734
- signal.addEventListener("abort", () => {
7748
+ const abortHandler = () => {
7735
7749
  reject(getAbortedReason(signal));
7750
+ };
7751
+ signal.addEventListener("abort", abortHandler, { once: true });
7752
+ promise.finally(() => {
7753
+ signal.removeEventListener("abort", abortHandler);
7736
7754
  });
7737
7755
  }
7738
7756
  if (milliseconds === Number.POSITIVE_INFINITY) {
@@ -8312,5 +8330,5 @@ ${logFiles.join("\n")}`);
8312
8330
  exports.generate = generate;
8313
8331
  exports.init_cjs_shims = init_cjs_shims;
8314
8332
  exports.p = p2;
8315
- //# sourceMappingURL=chunk-UINFIRKN.cjs.map
8316
- //# sourceMappingURL=chunk-UINFIRKN.cjs.map
8333
+ //# sourceMappingURL=chunk-WLKZONQS.cjs.map
8334
+ //# sourceMappingURL=chunk-WLKZONQS.cjs.map