nitropack-nightly 2.11.13-20250521-182135.be404a71 → 2.11.13-20250611-074501.eb43d1c8
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/core/index.mjs +6 -5
- package/dist/kit/index.d.mts +1 -1
- package/dist/kit/index.d.ts +1 -1
- package/dist/meta/index.mjs +1 -1
- package/dist/presets/_unenv/workerd/process.mjs +5 -0
- package/dist/shared/{nitro.BULiwDWR.d.mts → nitro.CUq3mBBf.d.mts} +1 -0
- package/dist/shared/{nitro.BULiwDWR.d.ts → nitro.CUq3mBBf.d.ts} +1 -0
- package/dist/types/index.d.mts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/core/index.mjs
CHANGED
|
@@ -1218,8 +1218,7 @@ async function writeTypes(nitro) {
|
|
|
1218
1218
|
})).trim() : ""
|
|
1219
1219
|
];
|
|
1220
1220
|
}
|
|
1221
|
-
|
|
1222
|
-
const routes = [
|
|
1221
|
+
const generateRoutes = () => [
|
|
1223
1222
|
"// Generated by nitro",
|
|
1224
1223
|
'import type { Serialize, Simplify } from "nitropack/types";',
|
|
1225
1224
|
'declare module "nitropack/types" {',
|
|
@@ -1285,7 +1284,7 @@ declare module "nitropack/types" {
|
|
|
1285
1284
|
const buildFiles = [];
|
|
1286
1285
|
buildFiles.push({
|
|
1287
1286
|
path: join$1(typesDir, "nitro-routes.d.ts"),
|
|
1288
|
-
contents:
|
|
1287
|
+
contents: () => generateRoutes().join("\n")
|
|
1289
1288
|
});
|
|
1290
1289
|
buildFiles.push({
|
|
1291
1290
|
path: join$1(typesDir, "nitro-config.d.ts"),
|
|
@@ -1408,16 +1407,18 @@ declare module "nitropack/types" {
|
|
|
1408
1407
|
)
|
|
1409
1408
|
];
|
|
1410
1409
|
}
|
|
1410
|
+
types.tsConfig = tsConfig;
|
|
1411
1411
|
buildFiles.push({
|
|
1412
1412
|
path: tsConfigPath,
|
|
1413
|
-
contents: JSON.stringify(tsConfig, null, 2)
|
|
1413
|
+
contents: () => JSON.stringify(tsConfig, null, 2)
|
|
1414
1414
|
});
|
|
1415
1415
|
}
|
|
1416
|
+
await nitro.hooks.callHook("types:extend", types);
|
|
1416
1417
|
await Promise.all(
|
|
1417
1418
|
buildFiles.map(async (file) => {
|
|
1418
1419
|
await writeFile(
|
|
1419
1420
|
resolve(nitro.options.buildDir, file.path),
|
|
1420
|
-
file.contents
|
|
1421
|
+
typeof file.contents === "string" ? file.contents : file.contents()
|
|
1421
1422
|
);
|
|
1422
1423
|
})
|
|
1423
1424
|
);
|
package/dist/kit/index.d.mts
CHANGED
package/dist/kit/index.d.ts
CHANGED
package/dist/meta/index.mjs
CHANGED
|
@@ -3,10 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
import workerdProcess from "#workerd/node:process";
|
|
5
5
|
|
|
6
|
+
import { env as WorkerEnv } from "cloudflare:workers";
|
|
7
|
+
|
|
6
8
|
import { Process as UnenvProcess } from "unenv/node/internal/process/process";
|
|
7
9
|
import { env as UnenvEnv } from "unenv/node/internal/process/env";
|
|
8
10
|
import { hrtime as UnenvHrTime } from "unenv/node/internal/process/hrtime";
|
|
9
11
|
|
|
12
|
+
// Polyfill for unenv (without Node.js compatibility)
|
|
13
|
+
globalThis.__env__ = WorkerEnv;
|
|
14
|
+
|
|
10
15
|
const mixedProcess = new UnenvProcess({
|
|
11
16
|
env: UnenvEnv,
|
|
12
17
|
hrtime: UnenvHrTime,
|
|
@@ -1226,6 +1226,7 @@ interface Nitro {
|
|
|
1226
1226
|
type NitroDynamicConfig = Pick<NitroConfig, "runtimeConfig" | "routeRules">;
|
|
1227
1227
|
type NitroTypes = {
|
|
1228
1228
|
routes: Record<string, Partial<Record<RouterMethod | "default", string[]>>>;
|
|
1229
|
+
tsConfig?: TSConfig;
|
|
1229
1230
|
};
|
|
1230
1231
|
interface NitroFrameworkInfo {
|
|
1231
1232
|
name?: "nitro" | (string & {});
|
|
@@ -1226,6 +1226,7 @@ interface Nitro {
|
|
|
1226
1226
|
type NitroDynamicConfig = Pick<NitroConfig, "runtimeConfig" | "routeRules">;
|
|
1227
1227
|
type NitroTypes = {
|
|
1228
1228
|
routes: Record<string, Partial<Record<RouterMethod | "default", string[]>>>;
|
|
1229
|
+
tsConfig?: TSConfig;
|
|
1229
1230
|
};
|
|
1230
1231
|
interface NitroFrameworkInfo {
|
|
1231
1232
|
name?: "nitro" | (string & {});
|
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.CUq3mBBf.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.CUq3mBBf.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.CUq3mBBf.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.CUq3mBBf.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