nitropack-nightly 2.11.4-20250307-005815.a4569493 → 2.11.5-20250307-083241.14283fb5

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.
@@ -43,9 +43,9 @@ import { walk, parse } from 'ultrahtml';
43
43
  import { createError, getRequestURL, getRequestHeader, getResponseHeader, getRequestHeaders, setResponseHeaders, setResponseStatus, send, eventHandler, getRequestIP, toNodeListener, createApp, fromNodeMiddleware } from 'h3';
44
44
  import { Worker } from 'node:worker_threads';
45
45
  import { createProxyServer } from 'httpxy';
46
- import nodeCrypto from 'node:crypto';
47
46
  import { resolve as resolve$1, dirname as dirname$1 } from 'node:path';
48
- import * as _youch from 'youch-redist';
47
+ import { ErrorParser } from 'youch-core';
48
+ import { Youch } from 'youch';
49
49
  import { SourceMapConsumer } from 'source-map';
50
50
  import serveStatic from 'serve-static';
51
51
  import { listen } from 'listhen';
@@ -2392,7 +2392,6 @@ function defineNitroErrorHandler(handler) {
2392
2392
  return handler;
2393
2393
  }
2394
2394
 
2395
- const { Youch, ErrorParser } = _youch;
2396
2395
  const devErrorHandler = defineNitroErrorHandler(
2397
2396
  async function defaultNitroErrorHandler(error, event) {
2398
2397
  const res = await defaultHandler(error, event);
@@ -2448,9 +2447,6 @@ async function defaultHandler(error, event, opts) {
2448
2447
  if (statusCode === 404 || !getResponseHeader(event, "cache-control")) {
2449
2448
  headers["cache-control"] = "no-cache";
2450
2449
  }
2451
- if (!globalThis.crypto && !useJSON) {
2452
- globalThis.crypto = nodeCrypto;
2453
- }
2454
2450
  const body = useJSON ? {
2455
2451
  error: true,
2456
2452
  url,
@@ -1,5 +1,5 @@
1
1
  import { NitroPreset, NitroPresetMeta, Nitro } from 'nitropack/types';
2
- import { N as NitroModule } from '../shared/nitro.JLO839lv.mjs';
2
+ import { N as NitroModule } from '../shared/nitro.ZcB8T5yn.mjs';
3
3
  import 'consola';
4
4
  import 'h3';
5
5
  import 'hookable';
@@ -1,5 +1,5 @@
1
1
  import { NitroPreset, NitroPresetMeta, Nitro } from 'nitropack/types';
2
- import { N as NitroModule } from '../shared/nitro.JLO839lv.js';
2
+ import { N as NitroModule } from '../shared/nitro.ZcB8T5yn.js';
3
3
  import 'consola';
4
4
  import 'h3';
5
5
  import 'hookable';
@@ -1,3 +1,3 @@
1
- const version = "2.11.4-20250307-005815.a4569493";
1
+ const version = "2.11.5-20250307-083241.14283fb5";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "2.11.4-20250307-005815.a4569493";
1
+ const version = "2.11.5-20250307-083241.14283fb5";
2
2
 
3
3
  export { version };
@@ -1,3 +1,3 @@
1
- const version = "2.11.4-20250307-005815.a4569493";
1
+ const version = "2.11.5-20250307-083241.14283fb5";
2
2
 
3
3
  export { version };
@@ -7,14 +7,13 @@ import {
7
7
  setResponseHeaders,
8
8
  setResponseStatus
9
9
  } from "h3";
10
- import nodeCrypto from "node:crypto";
11
10
  import { readFile } from "node:fs/promises";
12
11
  import { resolve, dirname } from "node:path";
13
12
  import consola from "consola";
14
- import * as _youch from "youch-redist";
13
+ import { ErrorParser } from "youch-core";
14
+ import { Youch } from "youch";
15
15
  import { SourceMapConsumer } from "source-map";
16
16
  import { defineNitroErrorHandler } from "./utils.mjs";
17
- const { Youch, ErrorParser } = _youch;
18
17
  export default defineNitroErrorHandler(
19
18
  async function defaultNitroErrorHandler(error, event) {
20
19
  const res = await defaultHandler(error, event);
@@ -70,9 +69,6 @@ export async function defaultHandler(error, event, opts) {
70
69
  if (statusCode === 404 || !getResponseHeader(event, "cache-control")) {
71
70
  headers["cache-control"] = "no-cache";
72
71
  }
73
- if (!globalThis.crypto && !useJSON) {
74
- globalThis.crypto = nodeCrypto;
75
- }
76
72
  const body = useJSON ? {
77
73
  error: true,
78
74
  url,
@@ -61,7 +61,7 @@ type MaybeArray<T> = T | T[];
61
61
  /** @exprerimental */
62
62
  interface NitroRouteMeta {
63
63
  openAPI?: OperationObject & {
64
- $global: Pick<OpenAPI3, "components">;
64
+ $global?: Pick<OpenAPI3, "components">;
65
65
  };
66
66
  }
67
67
  interface NitroEventHandler {
@@ -61,7 +61,7 @@ type MaybeArray<T> = T | T[];
61
61
  /** @exprerimental */
62
62
  interface NitroRouteMeta {
63
63
  openAPI?: OperationObject & {
64
- $global: Pick<OpenAPI3, "components">;
64
+ $global?: Pick<OpenAPI3, "components">;
65
65
  };
66
66
  }
67
67
  interface NitroEventHandler {
@@ -1,7 +1,7 @@
1
1
  import { App, Router, H3Event, RouterMethod } from 'h3';
2
2
  import { FetchRequest, FetchOptions, FetchResponse } from 'ofetch';
3
- import { a as NitroOptions, b as NitroConfig, N as NitroModule } from '../shared/nitro.JLO839lv.mjs';
4
- export { A as AppConfig, C as CacheEntry, c as CacheOptions, d as CachedEventHandlerOptions, e as CompressOptions, g as DatabaseConnectionConfig, h as DatabaseConnectionConfigs, D as DatabaseConnectionName, l as DevServerOptions, I as EsbuildOptions, O as HTTPStatusCode, L as LoadConfigOptions, u as Nitro, y as NitroBuildInfo, q as NitroDevEventHandler, n as NitroDevServer, v as NitroDynamicConfig, r as NitroErrorHandler, p as NitroEventHandler, x as NitroFrameworkInfo, s as NitroHooks, t as NitroModuleInput, k as NitroOpenAPIConfig, E as NitroPreset, F as NitroPresetMeta, Q as NitroRouteConfig, o as NitroRouteMeta, T as NitroRouteRules, j as NitroRuntimeConfig, i as NitroRuntimeConfigApp, w as NitroTypes, m as NitroWorker, J as NodeExternalsOptions, B as PrerenderGenerateRoute, z as PrerenderRoute, P as PublicAssetDir, M as RawOptions, R as ResponseCacheEntry, G as RollupConfig, H as RollupVirtualOptions, S as ServerAssetDir, K as ServerAssetOptions, f as StorageMounts, V as VirtualModule } from '../shared/nitro.JLO839lv.mjs';
3
+ import { a as NitroOptions, b as NitroConfig, N as NitroModule } from '../shared/nitro.ZcB8T5yn.mjs';
4
+ export { A as AppConfig, C as CacheEntry, c as CacheOptions, d as CachedEventHandlerOptions, e as CompressOptions, g as DatabaseConnectionConfig, h as DatabaseConnectionConfigs, D as DatabaseConnectionName, l as DevServerOptions, I as EsbuildOptions, O as HTTPStatusCode, L as LoadConfigOptions, u as Nitro, y as NitroBuildInfo, q as NitroDevEventHandler, n as NitroDevServer, v as NitroDynamicConfig, r as NitroErrorHandler, p as NitroEventHandler, x as NitroFrameworkInfo, s as NitroHooks, t as NitroModuleInput, k as NitroOpenAPIConfig, E as NitroPreset, F as NitroPresetMeta, Q as NitroRouteConfig, o as NitroRouteMeta, T as NitroRouteRules, j as NitroRuntimeConfig, i as NitroRuntimeConfigApp, w as NitroTypes, m as NitroWorker, J as NodeExternalsOptions, B as PrerenderGenerateRoute, z as PrerenderRoute, P as PublicAssetDir, M as RawOptions, R as ResponseCacheEntry, G as RollupConfig, H as RollupVirtualOptions, S as ServerAssetDir, K as ServerAssetOptions, f as StorageMounts, V as VirtualModule } from '../shared/nitro.ZcB8T5yn.mjs';
5
5
  import { Hookable } from 'hookable';
6
6
  import { NitroRuntimeHooks as NitroRuntimeHooks$1 } from 'nitropack';
7
7
  import { AbstractRequest, AbstractResponse } from 'node-mock-http';
@@ -1,7 +1,7 @@
1
1
  import { App, Router, H3Event, RouterMethod } from 'h3';
2
2
  import { FetchRequest, FetchOptions, FetchResponse } from 'ofetch';
3
- import { a as NitroOptions, b as NitroConfig, N as NitroModule } from '../shared/nitro.JLO839lv.js';
4
- export { A as AppConfig, C as CacheEntry, c as CacheOptions, d as CachedEventHandlerOptions, e as CompressOptions, g as DatabaseConnectionConfig, h as DatabaseConnectionConfigs, D as DatabaseConnectionName, l as DevServerOptions, I as EsbuildOptions, O as HTTPStatusCode, L as LoadConfigOptions, u as Nitro, y as NitroBuildInfo, q as NitroDevEventHandler, n as NitroDevServer, v as NitroDynamicConfig, r as NitroErrorHandler, p as NitroEventHandler, x as NitroFrameworkInfo, s as NitroHooks, t as NitroModuleInput, k as NitroOpenAPIConfig, E as NitroPreset, F as NitroPresetMeta, Q as NitroRouteConfig, o as NitroRouteMeta, T as NitroRouteRules, j as NitroRuntimeConfig, i as NitroRuntimeConfigApp, w as NitroTypes, m as NitroWorker, J as NodeExternalsOptions, B as PrerenderGenerateRoute, z as PrerenderRoute, P as PublicAssetDir, M as RawOptions, R as ResponseCacheEntry, G as RollupConfig, H as RollupVirtualOptions, S as ServerAssetDir, K as ServerAssetOptions, f as StorageMounts, V as VirtualModule } from '../shared/nitro.JLO839lv.js';
3
+ import { a as NitroOptions, b as NitroConfig, N as NitroModule } from '../shared/nitro.ZcB8T5yn.js';
4
+ export { A as AppConfig, C as CacheEntry, c as CacheOptions, d as CachedEventHandlerOptions, e as CompressOptions, g as DatabaseConnectionConfig, h as DatabaseConnectionConfigs, D as DatabaseConnectionName, l as DevServerOptions, I as EsbuildOptions, O as HTTPStatusCode, L as LoadConfigOptions, u as Nitro, y as NitroBuildInfo, q as NitroDevEventHandler, n as NitroDevServer, v as NitroDynamicConfig, r as NitroErrorHandler, p as NitroEventHandler, x as NitroFrameworkInfo, s as NitroHooks, t as NitroModuleInput, k as NitroOpenAPIConfig, E as NitroPreset, F as NitroPresetMeta, Q as NitroRouteConfig, o as NitroRouteMeta, T as NitroRouteRules, j as NitroRuntimeConfig, i as NitroRuntimeConfigApp, w as NitroTypes, m as NitroWorker, J as NodeExternalsOptions, B as PrerenderGenerateRoute, z as PrerenderRoute, P as PublicAssetDir, M as RawOptions, R as ResponseCacheEntry, G as RollupConfig, H as RollupVirtualOptions, S as ServerAssetDir, K as ServerAssetOptions, f as StorageMounts, V as VirtualModule } from '../shared/nitro.ZcB8T5yn.js';
5
5
  import { Hookable } from 'hookable';
6
6
  import { NitroRuntimeHooks as NitroRuntimeHooks$1 } from 'nitropack';
7
7
  import { AbstractRequest, AbstractResponse } from 'node-mock-http';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nitropack-nightly",
3
- "version": "2.11.4-20250307-005815.a4569493",
3
+ "version": "2.11.5-20250307-083241.14283fb5",
4
4
  "description": "Build and Deploy Universal JavaScript Servers",
5
5
  "repository": "nitrojs/nitro",
6
6
  "license": "MIT",
@@ -170,7 +170,8 @@
170
170
  "unstorage": "^1.15.0",
171
171
  "untyped": "^2.0.0",
172
172
  "unwasm": "^0.3.9",
173
- "youch-redist": "4.1.0-beta.5-1"
173
+ "youch": "^4.1.0-beta.6",
174
+ "youch-core": "^0.3.1"
174
175
  },
175
176
  "devDependencies": {
176
177
  "@azure/functions": "^3.5.1",
@@ -206,9 +207,7 @@
206
207
  "unbuild": "^3.5.0",
207
208
  "undici": "^7.4.0",
208
209
  "vitest": "^3.0.7",
209
- "xml2js": "^0.6.2",
210
- "youch": "^4.1.0-beta.5",
211
- "youch-core": "^0.3.1"
210
+ "xml2js": "^0.6.2"
212
211
  },
213
212
  "peerDependencies": {
214
213
  "xml2js": "^0.6.2"