nitro-nightly 3.0.1-20251215-195947-2e108f51 → 3.0.1-20251216-085613-98f51461
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/_build/shared3.mjs +15 -15
- package/dist/presets/_nitro/runtime/nitro-dev.d.mts +1 -1
- package/dist/presets/_nitro/runtime/nitro-dev.mjs +1 -1
- package/dist/presets/_nitro/runtime/nitro-prerenderer.d.mts +1 -1
- package/dist/presets/_nitro/runtime/nitro-prerenderer.mjs +1 -1
- package/dist/presets/_nitro/runtime/service-worker.d.mts +1 -1
- package/dist/presets/_nitro/runtime/service-worker.mjs +1 -1
- package/dist/presets/aws-amplify/runtime/aws-amplify.d.mts +1 -1
- package/dist/presets/aws-amplify/runtime/aws-amplify.mjs +1 -1
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.d.mts +1 -1
- package/dist/presets/aws-lambda/runtime/aws-lambda-streaming.mjs +1 -1
- package/dist/presets/aws-lambda/runtime/aws-lambda.d.mts +1 -1
- package/dist/presets/aws-lambda/runtime/aws-lambda.mjs +1 -1
- package/dist/presets/azure/runtime/azure-swa.d.mts +1 -1
- package/dist/presets/azure/runtime/azure-swa.mjs +1 -1
- package/dist/presets/bun/runtime/bun.d.mts +1 -1
- package/dist/presets/bun/runtime/bun.mjs +1 -1
- package/dist/presets/cloudflare/runtime/_module-handler.d.mts +1 -1
- package/dist/presets/cloudflare/runtime/_module-handler.mjs +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-durable.d.mts +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-durable.mjs +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-module.d.mts +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-module.mjs +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-pages.d.mts +1 -1
- package/dist/presets/cloudflare/runtime/cloudflare-pages.mjs +1 -1
- package/dist/presets/deno/runtime/deno-deploy.d.mts +1 -1
- package/dist/presets/deno/runtime/deno-deploy.mjs +1 -1
- package/dist/presets/deno/runtime/deno-server.d.mts +1 -1
- package/dist/presets/deno/runtime/deno-server.mjs +1 -1
- package/dist/presets/netlify/runtime/netlify-edge.d.mts +1 -1
- package/dist/presets/netlify/runtime/netlify-edge.mjs +1 -1
- package/dist/presets/netlify/runtime/netlify.d.mts +1 -1
- package/dist/presets/netlify/runtime/netlify.mjs +1 -1
- package/dist/presets/node/runtime/node-cluster.d.mts +1 -1
- package/dist/presets/node/runtime/node-cluster.mjs +1 -1
- package/dist/presets/node/runtime/node-middleware.d.mts +1 -1
- package/dist/presets/node/runtime/node-middleware.mjs +1 -1
- package/dist/presets/node/runtime/node-server.d.mts +1 -1
- package/dist/presets/node/runtime/node-server.mjs +1 -1
- package/dist/presets/standard/runtime/server.d.mts +1 -1
- package/dist/presets/standard/runtime/server.mjs +1 -1
- package/dist/presets/stormkit/runtime/stormkit.d.mts +1 -1
- package/dist/presets/stormkit/runtime/stormkit.mjs +1 -1
- package/dist/presets/vercel/runtime/vercel.node.d.mts +1 -1
- package/dist/presets/vercel/runtime/vercel.node.mjs +1 -1
- package/dist/presets/vercel/runtime/vercel.web.d.mts +1 -1
- package/dist/presets/vercel/runtime/vercel.web.mjs +1 -1
- package/dist/presets/winterjs/runtime/winterjs.d.mts +1 -1
- package/dist/presets/winterjs/runtime/winterjs.mjs +1 -1
- package/dist/presets/zeabur/runtime/zeabur.d.mts +1 -1
- package/dist/presets/zeabur/runtime/zeabur.mjs +1 -1
- package/dist/runtime/internal/vite/dev-entry.mjs +1 -1
- package/package.json +1 -1
package/dist/_build/shared3.mjs
CHANGED
|
@@ -245,7 +245,7 @@ function plugins(nitro) {
|
|
|
245
245
|
//#region src/build/virtual/polyfills.ts
|
|
246
246
|
function polyfills(_nitro, polyfills$1) {
|
|
247
247
|
return {
|
|
248
|
-
id: "#nitro
|
|
248
|
+
id: "#nitro/virtual/polyfills",
|
|
249
249
|
moduleSideEffects: true,
|
|
250
250
|
template: () => {
|
|
251
251
|
return polyfills$1.map((p) => `import '${p}';`).join("\n") || `/* No polyfills */`;
|
|
@@ -694,7 +694,7 @@ function virtualTemplates(nitro, _polyfills) {
|
|
|
694
694
|
|
|
695
695
|
//#endregion
|
|
696
696
|
//#region src/build/plugins/route-meta.ts
|
|
697
|
-
const PREFIX$
|
|
697
|
+
const PREFIX$1 = "\0nitro:route-meta:";
|
|
698
698
|
function routeMeta(nitro) {
|
|
699
699
|
return {
|
|
700
700
|
name: "nitro:route-meta",
|
|
@@ -704,14 +704,14 @@ function routeMeta(nitro) {
|
|
|
704
704
|
if (id.endsWith("?meta")) {
|
|
705
705
|
const resolved = await this.resolve(id.replace("?meta", ""), importer, resolveOpts);
|
|
706
706
|
if (!resolved) return;
|
|
707
|
-
return PREFIX$
|
|
707
|
+
return PREFIX$1 + resolved.id;
|
|
708
708
|
}
|
|
709
709
|
}
|
|
710
710
|
},
|
|
711
711
|
load: {
|
|
712
|
-
filter: { id: /* @__PURE__ */ new RegExp(`^${escapeRegExp(PREFIX$
|
|
712
|
+
filter: { id: /* @__PURE__ */ new RegExp(`^${escapeRegExp(PREFIX$1)}`) },
|
|
713
713
|
handler(id) {
|
|
714
|
-
if (id.startsWith(PREFIX$
|
|
714
|
+
if (id.startsWith(PREFIX$1)) {
|
|
715
715
|
const fullPath = id.slice(18);
|
|
716
716
|
if (isAbsolute(fullPath)) return readFile(fullPath, { encoding: "utf8" });
|
|
717
717
|
else return "export default undefined;";
|
|
@@ -719,7 +719,7 @@ function routeMeta(nitro) {
|
|
|
719
719
|
}
|
|
720
720
|
},
|
|
721
721
|
transform: {
|
|
722
|
-
filter: { id: /* @__PURE__ */ new RegExp(`^${escapeRegExp(PREFIX$
|
|
722
|
+
filter: { id: /* @__PURE__ */ new RegExp(`^${escapeRegExp(PREFIX$1)}`) },
|
|
723
723
|
async handler(code, id) {
|
|
724
724
|
let meta = null;
|
|
725
725
|
try {
|
|
@@ -778,7 +778,6 @@ function serverMain(nitro) {
|
|
|
778
778
|
|
|
779
779
|
//#endregion
|
|
780
780
|
//#region src/build/plugins/virtual.ts
|
|
781
|
-
const PREFIX$1 = "\0nitro:virtual:";
|
|
782
781
|
function virtual(input) {
|
|
783
782
|
const modules = /* @__PURE__ */ new Map();
|
|
784
783
|
for (const mod of input) {
|
|
@@ -788,28 +787,29 @@ function virtual(input) {
|
|
|
788
787
|
render
|
|
789
788
|
});
|
|
790
789
|
}
|
|
790
|
+
const include = [/^#nitro\/virtual/];
|
|
791
|
+
const extraIds = [...modules.keys()].filter((key) => !key.startsWith("#nitro/virtual"));
|
|
792
|
+
if (extraIds.length > 0) include.push(/* @__PURE__ */ new RegExp(`^(${extraIds.map((id) => pathRegExp(id)).join("|")})$`));
|
|
791
793
|
return {
|
|
792
794
|
name: "nitro:virtual",
|
|
793
795
|
api: { modules },
|
|
794
796
|
resolveId: {
|
|
795
797
|
order: "pre",
|
|
796
|
-
filter: { id:
|
|
798
|
+
filter: { id: include },
|
|
797
799
|
handler: (id) => {
|
|
798
800
|
const mod = modules.get(id);
|
|
799
|
-
if (
|
|
800
|
-
|
|
801
|
-
id: PREFIX$1 + id,
|
|
801
|
+
if (mod) return {
|
|
802
|
+
id,
|
|
802
803
|
moduleSideEffects: mod.module.moduleSideEffects ?? false
|
|
803
804
|
};
|
|
804
805
|
}
|
|
805
806
|
},
|
|
806
807
|
load: {
|
|
807
808
|
order: "pre",
|
|
808
|
-
filter: { id:
|
|
809
|
+
filter: { id: include },
|
|
809
810
|
handler: async (id) => {
|
|
810
|
-
const
|
|
811
|
-
|
|
812
|
-
if (!mod) throw new Error(`Virtual module ${idNoPrefix} not found.`);
|
|
811
|
+
const mod = modules.get(id);
|
|
812
|
+
if (!mod) throw new Error(`Virtual module ${id} not found.`);
|
|
813
813
|
return {
|
|
814
814
|
code: await mod.render(),
|
|
815
815
|
map: null
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "#nitro
|
|
1
|
+
import "#nitro/virtual/polyfills";
|
|
2
2
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "#nitro
|
|
1
|
+
import "#nitro/virtual/polyfills";
|
|
2
2
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "#nitro
|
|
1
|
+
import "#nitro/virtual/polyfills";
|
|
2
2
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import "#nitro
|
|
1
|
+
import "#nitro/virtual/polyfills";
|
|
2
2
|
export declare const handler: unknown;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "#nitro
|
|
1
|
+
import "#nitro/virtual/polyfills";
|
|
2
2
|
import type { APIGatewayProxyEvent, APIGatewayProxyEventV2, APIGatewayProxyResult, APIGatewayProxyResultV2, Context } from "aws-lambda";
|
|
3
3
|
export declare function handler(event: APIGatewayProxyEvent | APIGatewayProxyEventV2, context: Context): Promise<APIGatewayProxyResult | APIGatewayProxyResultV2>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "#nitro
|
|
1
|
+
import "#nitro/virtual/polyfills";
|
|
2
2
|
import type { Request as CFRequest, EventContext, ExecutionContext } from "@cloudflare/workers-types";
|
|
3
3
|
/**
|
|
4
4
|
* Reference: https://developers.cloudflare.com/workers/runtime-apis/fetch-event/#parameters
|
package/package.json
CHANGED