nitropack-nightly 2.11.7-20250317-120939.729315be → 2.11.7-20250318-123444.96e0b73b
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/kit/index.d.mts +1 -1
- package/dist/kit/index.d.ts +1 -1
- package/dist/meta/index.d.mts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.mjs +1 -1
- package/dist/presets/cloudflare/runtime/_module-handler.mjs +9 -7
- package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +7 -5
- package/dist/presets/cloudflare/runtime/cloudflare-worker.mjs +6 -4
- package/dist/presets/vercel/runtime/vercel-edge.mjs +4 -2
- package/dist/presets/winterjs/runtime/winterjs.mjs +4 -2
- package/dist/runtime/internal/app.mjs +11 -5
- package/dist/runtime/internal/routes/scalar.mjs +2 -0
- package/dist/shared/{nitro.ZcB8T5yn.d.mts → nitro.BvFZg7IX.d.mts} +2 -2
- package/dist/shared/{nitro.ZcB8T5yn.d.ts → nitro.BvFZg7IX.d.ts} +2 -2
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +14 -16
package/dist/kit/index.d.mts
CHANGED
package/dist/kit/index.d.ts
CHANGED
package/dist/meta/index.d.mts
CHANGED
package/dist/meta/index.d.ts
CHANGED
package/dist/meta/index.mjs
CHANGED
|
@@ -91,14 +91,16 @@ export async function fetchHandler(request, env, context, url = new URL(request.
|
|
|
91
91
|
globalThis.__env__ = env;
|
|
92
92
|
return nitroApp.localFetch(url.pathname + url.search, {
|
|
93
93
|
context: {
|
|
94
|
-
cf: request.cf,
|
|
95
94
|
waitUntil: (promise) => context.waitUntil(promise),
|
|
96
|
-
|
|
97
|
-
request,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
_platform: {
|
|
96
|
+
cf: request.cf,
|
|
97
|
+
cloudflare: {
|
|
98
|
+
request,
|
|
99
|
+
env,
|
|
100
|
+
context,
|
|
101
|
+
url,
|
|
102
|
+
...ctxExt
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
},
|
|
104
106
|
host: url.hostname,
|
|
@@ -25,12 +25,14 @@ export default {
|
|
|
25
25
|
globalThis.__env__ = env;
|
|
26
26
|
return nitroApp.localFetch(url.pathname + url.search, {
|
|
27
27
|
context: {
|
|
28
|
-
cf: request.cf,
|
|
29
28
|
waitUntil: (promise) => context.waitUntil(promise),
|
|
30
|
-
|
|
31
|
-
request,
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
_platform: {
|
|
30
|
+
cf: request.cf,
|
|
31
|
+
cloudflare: {
|
|
32
|
+
request,
|
|
33
|
+
env,
|
|
34
|
+
context
|
|
35
|
+
}
|
|
34
36
|
}
|
|
35
37
|
},
|
|
36
38
|
host: url.hostname,
|
|
@@ -31,11 +31,13 @@ async function handleEvent(event) {
|
|
|
31
31
|
}
|
|
32
32
|
return nitroApp.localFetch(url.pathname + url.search, {
|
|
33
33
|
context: {
|
|
34
|
-
// https://developers.cloudflare.com/workers//runtime-apis/request#incomingrequestcfproperties
|
|
35
|
-
cf: event.request.cf,
|
|
36
34
|
waitUntil: (promise) => event.waitUntil(promise),
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
_platform: {
|
|
36
|
+
// https://developers.cloudflare.com/workers/runtime-apis/request#incomingrequestcfproperties
|
|
37
|
+
cf: event.request.cf,
|
|
38
|
+
cloudflare: {
|
|
39
|
+
event
|
|
40
|
+
}
|
|
39
41
|
}
|
|
40
42
|
},
|
|
41
43
|
host: url.hostname,
|
|
@@ -46,9 +46,15 @@ function createNitroApp() {
|
|
|
46
46
|
},
|
|
47
47
|
onRequest: async (event) => {
|
|
48
48
|
event.context.nitro = event.context.nitro || { errors: [] };
|
|
49
|
-
const
|
|
50
|
-
if (
|
|
51
|
-
|
|
49
|
+
const fetchContext = event.node.req?.__unenv__;
|
|
50
|
+
if (fetchContext?._platform) {
|
|
51
|
+
event.context = {
|
|
52
|
+
...fetchContext._platform,
|
|
53
|
+
...event.context
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (!event.context.waitUntil && fetchContext?.waitUntil) {
|
|
57
|
+
event.context.waitUntil = fetchContext.waitUntil;
|
|
52
58
|
}
|
|
53
59
|
event.fetch = (req, init) => fetchWithEvent(event, req, init, { fetch: localFetch });
|
|
54
60
|
event.$fetch = (req, init) => fetchWithEvent(event, req, init, {
|
|
@@ -59,8 +65,8 @@ function createNitroApp() {
|
|
|
59
65
|
event.context.nitro._waitUntilPromises = [];
|
|
60
66
|
}
|
|
61
67
|
event.context.nitro._waitUntilPromises.push(promise);
|
|
62
|
-
if (
|
|
63
|
-
|
|
68
|
+
if (event.context.waitUntil) {
|
|
69
|
+
event.context.waitUntil(promise);
|
|
64
70
|
}
|
|
65
71
|
};
|
|
66
72
|
event.captureError = (error, context) => {
|
|
@@ -8,6 +8,8 @@ export default eventHandler((event) => {
|
|
|
8
8
|
const _config = runtimeConfig.nitro.openAPI?.ui?.scalar;
|
|
9
9
|
const scalarConfig = {
|
|
10
10
|
..._config,
|
|
11
|
+
url: openAPIEndpoint,
|
|
12
|
+
// @ts-expect-error (missing types?)
|
|
11
13
|
spec: { url: openAPIEndpoint, ..._config?.spec }
|
|
12
14
|
};
|
|
13
15
|
return (
|
|
@@ -25,7 +25,7 @@ import { FilterPattern } from 'unplugin-utils';
|
|
|
25
25
|
import { NodeFileTraceOptions } from '@vercel/nft';
|
|
26
26
|
import { TransformOptions, Loader } from 'esbuild';
|
|
27
27
|
import { InputOptions, OutputOptions } from 'rollup';
|
|
28
|
-
import {
|
|
28
|
+
import { ApiReferenceConfiguration } from '@scalar/api-reference';
|
|
29
29
|
import { ProviderName } from 'std-env';
|
|
30
30
|
|
|
31
31
|
type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc["length"]]>;
|
|
@@ -231,7 +231,7 @@ interface NitroOpenAPIConfig {
|
|
|
231
231
|
/**
|
|
232
232
|
* Scalar UI configuration
|
|
233
233
|
*/
|
|
234
|
-
scalar?: false | (
|
|
234
|
+
scalar?: false | (Partial<ApiReferenceConfiguration> & {
|
|
235
235
|
/**
|
|
236
236
|
* Scalar UI route
|
|
237
237
|
*
|
|
@@ -25,7 +25,7 @@ import { FilterPattern } from 'unplugin-utils';
|
|
|
25
25
|
import { NodeFileTraceOptions } from '@vercel/nft';
|
|
26
26
|
import { TransformOptions, Loader } from 'esbuild';
|
|
27
27
|
import { InputOptions, OutputOptions } from 'rollup';
|
|
28
|
-
import {
|
|
28
|
+
import { ApiReferenceConfiguration } from '@scalar/api-reference';
|
|
29
29
|
import { ProviderName } from 'std-env';
|
|
30
30
|
|
|
31
31
|
type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc["length"]]>;
|
|
@@ -231,7 +231,7 @@ interface NitroOpenAPIConfig {
|
|
|
231
231
|
/**
|
|
232
232
|
* Scalar UI configuration
|
|
233
233
|
*/
|
|
234
|
-
scalar?: false | (
|
|
234
|
+
scalar?: false | (Partial<ApiReferenceConfiguration> & {
|
|
235
235
|
/**
|
|
236
236
|
* Scalar UI route
|
|
237
237
|
*
|
package/dist/types/index.d.mts
CHANGED
|
@@ -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.
|
|
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.
|
|
3
|
+
import { a as NitroOptions, b as NitroConfig, N as NitroModule } from '../shared/nitro.BvFZg7IX.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.BvFZg7IX.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';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -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.
|
|
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.
|
|
3
|
+
import { a as NitroOptions, b as NitroConfig, N as NitroModule } from '../shared/nitro.BvFZg7IX.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.BvFZg7IX.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.7-
|
|
3
|
+
"version": "2.11.7-20250318-123444.96e0b73b",
|
|
4
4
|
"description": "Build and Deploy Universal JavaScript Servers",
|
|
5
5
|
"repository": "nitrojs/nitro",
|
|
6
6
|
"license": "MIT",
|
|
@@ -98,16 +98,15 @@
|
|
|
98
98
|
"nitropack": "link:."
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@cloudflare/kv-asset-handler": "^0.
|
|
102
|
-
"@netlify/functions": "3.0.
|
|
101
|
+
"@cloudflare/kv-asset-handler": "^0.4.0",
|
|
102
|
+
"@netlify/functions": "^3.0.2",
|
|
103
103
|
"@rollup/plugin-alias": "^5.1.1",
|
|
104
104
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
105
105
|
"@rollup/plugin-inject": "^5.0.5",
|
|
106
106
|
"@rollup/plugin-json": "^6.1.0",
|
|
107
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
107
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
108
108
|
"@rollup/plugin-replace": "^6.0.2",
|
|
109
109
|
"@rollup/plugin-terser": "^0.4.4",
|
|
110
|
-
"@types/http-proxy": "^1.17.16",
|
|
111
110
|
"@vercel/nft": "^0.29.2",
|
|
112
111
|
"archiver": "^7.0.1",
|
|
113
112
|
"c12": "^3.0.2",
|
|
@@ -115,7 +114,7 @@
|
|
|
115
114
|
"citty": "^0.1.6",
|
|
116
115
|
"compatx": "^0.1.8",
|
|
117
116
|
"confbox": "^0.2.1",
|
|
118
|
-
"consola": "^3.4.
|
|
117
|
+
"consola": "^3.4.2",
|
|
119
118
|
"cookie-es": "^2.0.0",
|
|
120
119
|
"croner": "^9.0.0",
|
|
121
120
|
"crossws": "^0.3.4",
|
|
@@ -123,11 +122,10 @@
|
|
|
123
122
|
"defu": "^6.1.4",
|
|
124
123
|
"destr": "^2.0.3",
|
|
125
124
|
"dot-prop": "^9.0.0",
|
|
126
|
-
"esbuild": "^0.25.
|
|
125
|
+
"esbuild": "^0.25.1",
|
|
127
126
|
"escape-string-regexp": "^5.0.0",
|
|
128
127
|
"etag": "^1.8.1",
|
|
129
128
|
"exsolve": "^1.0.4",
|
|
130
|
-
"fs-extra": "^11.3.0",
|
|
131
129
|
"globby": "^14.1.0",
|
|
132
130
|
"gzip-size": "^7.0.0",
|
|
133
131
|
"h3": "npm:h3-nightly@latest",
|
|
@@ -152,7 +150,7 @@
|
|
|
152
150
|
"pkg-types": "^2.1.0",
|
|
153
151
|
"pretty-bytes": "^6.1.1",
|
|
154
152
|
"radix3": "^1.1.2",
|
|
155
|
-
"rollup": "^4.
|
|
153
|
+
"rollup": "^4.36.0",
|
|
156
154
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
157
155
|
"scule": "^1.3.0",
|
|
158
156
|
"semver": "^7.7.1",
|
|
@@ -164,7 +162,7 @@
|
|
|
164
162
|
"ultrahtml": "^1.5.3",
|
|
165
163
|
"uncrypto": "^0.1.3",
|
|
166
164
|
"unctx": "^2.4.1",
|
|
167
|
-
"unenv": "^2.0.0-rc.
|
|
165
|
+
"unenv": "^2.0.0-rc.15",
|
|
168
166
|
"unimport": "^4.1.2",
|
|
169
167
|
"unplugin-utils": "^0.2.4",
|
|
170
168
|
"unstorage": "^1.15.0",
|
|
@@ -176,10 +174,10 @@
|
|
|
176
174
|
"devDependencies": {
|
|
177
175
|
"@azure/functions": "^3.5.1",
|
|
178
176
|
"@azure/static-web-apps-cli": "^2.0.4",
|
|
179
|
-
"@cloudflare/workers-types": "^4.
|
|
177
|
+
"@cloudflare/workers-types": "^4.20250317.0",
|
|
180
178
|
"@deno/types": "^0.0.1",
|
|
181
179
|
"@netlify/edge-functions": "^2.11.1",
|
|
182
|
-
"@scalar/api-reference": "^1.
|
|
180
|
+
"@scalar/api-reference": "^1.28.5",
|
|
183
181
|
"@types/archiver": "^6.0.3",
|
|
184
182
|
"@types/aws-lambda": "^8.10.147",
|
|
185
183
|
"@types/estree": "^1.0.6",
|
|
@@ -189,7 +187,7 @@
|
|
|
189
187
|
"@types/semver": "^7.5.8",
|
|
190
188
|
"@types/serve-static": "^1.15.7",
|
|
191
189
|
"@types/xml2js": "^0.4.14",
|
|
192
|
-
"@vitest/coverage-v8": "^3.0.
|
|
190
|
+
"@vitest/coverage-v8": "^3.0.9",
|
|
193
191
|
"automd": "^0.4.0",
|
|
194
192
|
"changelogen": "^0.6.1",
|
|
195
193
|
"edge-runtime": "^4.0.1",
|
|
@@ -200,13 +198,13 @@
|
|
|
200
198
|
"firebase-admin": "^12.7.0",
|
|
201
199
|
"firebase-functions": "^4.9.0",
|
|
202
200
|
"get-port-please": "^3.1.2",
|
|
203
|
-
"miniflare": "^
|
|
201
|
+
"miniflare": "^4.20250317.0",
|
|
204
202
|
"ohash-v1": "npm:ohash@^1.1.6",
|
|
205
203
|
"prettier": "^3.5.3",
|
|
206
204
|
"typescript": "^5.8.2",
|
|
207
205
|
"unbuild": "^3.5.0",
|
|
208
|
-
"undici": "^7.
|
|
209
|
-
"vitest": "^3.0.
|
|
206
|
+
"undici": "^7.5.0",
|
|
207
|
+
"vitest": "^3.0.9",
|
|
210
208
|
"xml2js": "^0.6.2"
|
|
211
209
|
},
|
|
212
210
|
"peerDependencies": {
|