@h3ravel/http 11.2.2 → 11.3.1

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 CHANGED
@@ -338,10 +338,10 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
338
338
  //#endregion
339
339
  //#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
340
340
  function isUnicodeSupported() {
341
- const { env } = node_process.default;
342
- const { TERM, TERM_PROGRAM } = env;
341
+ const { env: env$1 } = node_process.default;
342
+ const { TERM, TERM_PROGRAM } = env$1;
343
343
  if (node_process.default.platform !== "win32") return TERM !== "linux";
344
- 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";
344
+ return Boolean(env$1.WT_SESSION) || Boolean(env$1.TERMINUS_SUBLIME) || env$1.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env$1.TERMINAL_EMULATOR === "JetBrains-JediTerm";
345
345
  }
346
346
 
347
347
  //#endregion
@@ -1031,7 +1031,7 @@ var require_resolveCommand = /* @__PURE__ */ require_chunk.__commonJS({ "../../n
1031
1031
  const which = require_which();
1032
1032
  const getPathKey = require_path_key();
1033
1033
  function resolveCommandAttempt(parsed, withoutPathExt) {
1034
- const env = parsed.options.env || process.env;
1034
+ const env$1 = parsed.options.env || process.env;
1035
1035
  const cwd$1 = process.cwd();
1036
1036
  const hasCustomCwd = parsed.options.cwd != null;
1037
1037
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -1041,7 +1041,7 @@ var require_resolveCommand = /* @__PURE__ */ require_chunk.__commonJS({ "../../n
1041
1041
  let resolved;
1042
1042
  try {
1043
1043
  resolved = which.sync(parsed.command, {
1044
- path: env[getPathKey({ env })],
1044
+ path: env$1[getPathKey({ env: env$1 })],
1045
1045
  pathExt: withoutPathExt ? path$14.delimiter : void 0
1046
1046
  });
1047
1047
  } catch (e) {} finally {
@@ -1247,9 +1247,9 @@ var require_cross_spawn = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
1247
1247
  //#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
1248
1248
  var import_cross_spawn = /* @__PURE__ */ require_chunk.__toESM(require_cross_spawn(), 1);
1249
1249
  function pathKey(options = {}) {
1250
- const { env = process.env, platform: platform$2 = process.platform } = options;
1250
+ const { env: env$1 = process.env, platform: platform$2 = process.platform } = options;
1251
1251
  if (platform$2 !== "win32") return "PATH";
1252
- return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
1252
+ return Object.keys(env$1).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
1253
1253
  }
1254
1254
 
1255
1255
  //#endregion
@@ -1291,12 +1291,12 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
1291
1291
  const pathPart = node_path.default.resolve(cwdPath, toPath(execPath$1), "..");
1292
1292
  if (!pathParts.includes(pathPart)) result.push(pathPart);
1293
1293
  };
1294
- const npmRunPathEnv = ({ env = node_process.default.env,...options } = {}) => {
1295
- env = { ...env };
1296
- const pathName = pathKey({ env });
1297
- options.path = env[pathName];
1298
- env[pathName] = npmRunPath(options);
1299
- return env;
1294
+ const npmRunPathEnv = ({ env: env$1 = node_process.default.env,...options } = {}) => {
1295
+ env$1 = { ...env$1 };
1296
+ const pathName = pathKey({ env: env$1 });
1297
+ options.path = env$1[pathName];
1298
+ env$1[pathName] = npmRunPath(options);
1299
+ return env$1;
1300
1300
  };
1301
1301
 
1302
1302
  //#endregion
@@ -2494,18 +2494,18 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd: cwd$1,
2494
2494
  serialization
2495
2495
  });
2496
2496
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
2497
- const env = extendEnv ? {
2497
+ const env$1 = extendEnv ? {
2498
2498
  ...node_process.default.env,
2499
2499
  ...envOption
2500
2500
  } : envOption;
2501
2501
  if (preferLocal || node) return npmRunPathEnv({
2502
- env,
2502
+ env: env$1,
2503
2503
  cwd: localDirectory,
2504
2504
  execPath: nodePath,
2505
2505
  preferLocal,
2506
2506
  addExecPath: node
2507
2507
  });
2508
- return env;
2508
+ return env$1;
2509
2509
  };
2510
2510
 
2511
2511
  //#endregion
@@ -18339,7 +18339,7 @@ var FireCommand = class extends __h3ravel_core.ConsoleCommand {
18339
18339
  }
18340
18340
  }
18341
18341
  async fire() {
18342
- const outDir = ".h3ravel/serve";
18342
+ const outDir = env("DIST_DIR", ".h3ravel/serve");
18343
18343
  const pm = (await (0, import_preferred_pm.default)(base_path()))?.name ?? "pnpm";
18344
18344
  const port = this.option("port");
18345
18345
  const host = this.option("host");
@@ -18351,16 +18351,24 @@ var FireCommand = class extends __h3ravel_core.ConsoleCommand {
18351
18351
  DIST_DIR: outDir,
18352
18352
  HOSTNAME: host,
18353
18353
  RETRIES: tries,
18354
- PORT: port
18354
+ PORT: port,
18355
+ LOG_LEVEL: [
18356
+ "silent",
18357
+ "silent",
18358
+ "info",
18359
+ "warn",
18360
+ "error"
18361
+ ][Number(this.option("verbose", 0))]
18355
18362
  };
18363
+ const silent = ENV_VARS.LOG_LEVEL === "silent" ? "--silent" : null;
18356
18364
  await execa(pm, [
18357
18365
  "tsdown",
18358
- "--silent",
18366
+ silent,
18359
18367
  "--config-loader",
18360
18368
  "unconfig",
18361
18369
  "-c",
18362
18370
  "tsdown.default.config.ts"
18363
- ], {
18371
+ ].filter((e) => e !== null), {
18364
18372
  stdout: "inherit",
18365
18373
  stderr: "inherit",
18366
18374
  cwd: base_path(),