@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.js CHANGED
@@ -319,10 +319,10 @@ const NO_ESCAPE_REGEXP = /^[\w./-]+$/;
319
319
  //#endregion
320
320
  //#region ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
321
321
  function isUnicodeSupported() {
322
- const { env } = process$1;
323
- const { TERM, TERM_PROGRAM } = env;
322
+ const { env: env$1 } = process$1;
323
+ const { TERM, TERM_PROGRAM } = env$1;
324
324
  if (process$1.platform !== "win32") return TERM !== "linux";
325
- 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";
325
+ 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";
326
326
  }
327
327
 
328
328
  //#endregion
@@ -1012,7 +1012,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
1012
1012
  const which = require_which();
1013
1013
  const getPathKey = require_path_key();
1014
1014
  function resolveCommandAttempt(parsed, withoutPathExt) {
1015
- const env = parsed.options.env || process.env;
1015
+ const env$1 = parsed.options.env || process.env;
1016
1016
  const cwd$1 = process.cwd();
1017
1017
  const hasCustomCwd = parsed.options.cwd != null;
1018
1018
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -1022,7 +1022,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
1022
1022
  let resolved;
1023
1023
  try {
1024
1024
  resolved = which.sync(parsed.command, {
1025
- path: env[getPathKey({ env })],
1025
+ path: env$1[getPathKey({ env: env$1 })],
1026
1026
  pathExt: withoutPathExt ? path$10.delimiter : void 0
1027
1027
  });
1028
1028
  } catch (e) {} finally {
@@ -1228,9 +1228,9 @@ var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
1228
1228
  //#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
1229
1229
  var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
1230
1230
  function pathKey(options = {}) {
1231
- const { env = process.env, platform: platform$2 = process.platform } = options;
1231
+ const { env: env$1 = process.env, platform: platform$2 = process.platform } = options;
1232
1232
  if (platform$2 !== "win32") return "PATH";
1233
- return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
1233
+ return Object.keys(env$1).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
1234
1234
  }
1235
1235
 
1236
1236
  //#endregion
@@ -1272,12 +1272,12 @@ const applyExecPath = (result, pathParts, execPath$1, cwdPath) => {
1272
1272
  const pathPart = path.resolve(cwdPath, toPath(execPath$1), "..");
1273
1273
  if (!pathParts.includes(pathPart)) result.push(pathPart);
1274
1274
  };
1275
- const npmRunPathEnv = ({ env = process$1.env,...options } = {}) => {
1276
- env = { ...env };
1277
- const pathName = pathKey({ env });
1278
- options.path = env[pathName];
1279
- env[pathName] = npmRunPath(options);
1280
- return env;
1275
+ const npmRunPathEnv = ({ env: env$1 = process$1.env,...options } = {}) => {
1276
+ env$1 = { ...env$1 };
1277
+ const pathName = pathKey({ env: env$1 });
1278
+ options.path = env$1[pathName];
1279
+ env$1[pathName] = npmRunPath(options);
1280
+ return env$1;
1281
1281
  };
1282
1282
 
1283
1283
  //#endregion
@@ -2475,18 +2475,18 @@ const addDefaultOptions = ({ extendEnv = true, preferLocal = false, cwd: cwd$1,
2475
2475
  serialization
2476
2476
  });
2477
2477
  const getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
2478
- const env = extendEnv ? {
2478
+ const env$1 = extendEnv ? {
2479
2479
  ...process$1.env,
2480
2480
  ...envOption
2481
2481
  } : envOption;
2482
2482
  if (preferLocal || node) return npmRunPathEnv({
2483
- env,
2483
+ env: env$1,
2484
2484
  cwd: localDirectory,
2485
2485
  execPath: nodePath,
2486
2486
  preferLocal,
2487
2487
  addExecPath: node
2488
2488
  });
2489
- return env;
2489
+ return env$1;
2490
2490
  };
2491
2491
 
2492
2492
  //#endregion
@@ -18320,7 +18320,7 @@ var FireCommand = class extends ConsoleCommand {
18320
18320
  }
18321
18321
  }
18322
18322
  async fire() {
18323
- const outDir = ".h3ravel/serve";
18323
+ const outDir = env("DIST_DIR", ".h3ravel/serve");
18324
18324
  const pm = (await (0, import_preferred_pm.default)(base_path()))?.name ?? "pnpm";
18325
18325
  const port = this.option("port");
18326
18326
  const host = this.option("host");
@@ -18332,16 +18332,24 @@ var FireCommand = class extends ConsoleCommand {
18332
18332
  DIST_DIR: outDir,
18333
18333
  HOSTNAME: host,
18334
18334
  RETRIES: tries,
18335
- PORT: port
18335
+ PORT: port,
18336
+ LOG_LEVEL: [
18337
+ "silent",
18338
+ "silent",
18339
+ "info",
18340
+ "warn",
18341
+ "error"
18342
+ ][Number(this.option("verbose", 0))]
18336
18343
  };
18344
+ const silent = ENV_VARS.LOG_LEVEL === "silent" ? "--silent" : null;
18337
18345
  await execa(pm, [
18338
18346
  "tsdown",
18339
- "--silent",
18347
+ silent,
18340
18348
  "--config-loader",
18341
18349
  "unconfig",
18342
18350
  "-c",
18343
18351
  "tsdown.default.config.ts"
18344
- ], {
18352
+ ].filter((e) => e !== null), {
18345
18353
  stdout: "inherit",
18346
18354
  stderr: "inherit",
18347
18355
  cwd: base_path(),