@edgeone/nuxt-pages 1.0.4 → 1.0.6
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/routes.js +1 -1
- package/dist/esm-chunks/{chunk-SS6G7FEH.js → chunk-VCO654TD.js} +22 -4
- package/dist/index.js +3 -3
- package/dist/run/handlers/cache.cjs +1 -1
- package/dist/run/handlers/tags-handler.cjs +1 -1
- package/dist/run/handlers/use-cache-handler.js +1 -1
- package/package.json +1 -1
package/dist/build/routes.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
convertNuxtRoutePattern,
|
|
9
9
|
createNuxtApiRoutesMeta,
|
|
10
10
|
createNuxtPagesRouteMeta
|
|
11
|
-
} from "../esm-chunks/chunk-
|
|
11
|
+
} from "../esm-chunks/chunk-VCO654TD.js";
|
|
12
12
|
import "../esm-chunks/chunk-5VJRCUAW.js";
|
|
13
13
|
import "../esm-chunks/chunk-6BT4RYQJ.js";
|
|
14
14
|
export {
|
|
@@ -60,9 +60,6 @@ var createNuxtPagesRouteMeta = async (ctx) => {
|
|
|
60
60
|
if (!routeMap[route]) {
|
|
61
61
|
routeMap[route] = {};
|
|
62
62
|
}
|
|
63
|
-
if (routeInfo.ssr !== void 0 && routeInfo.ssr) {
|
|
64
|
-
routeMap[route].ssr = routeInfo.ssr;
|
|
65
|
-
}
|
|
66
63
|
if (routeInfo.prerender !== void 0) {
|
|
67
64
|
routeMap[route].isStatic = routeInfo.prerender;
|
|
68
65
|
}
|
|
@@ -160,7 +157,7 @@ var createNuxtApiRoutesMeta = async (ctx) => {
|
|
|
160
157
|
frameworkRoutes: existingMetaData.routes.concat(apiRoutes.map((route) => ({ path: route.path })))
|
|
161
158
|
};
|
|
162
159
|
const excludeRoutes = ["/**"];
|
|
163
|
-
|
|
160
|
+
let processedRoutes = mergedMetaData.frameworkRoutes.filter((route) => !excludeRoutes.includes(route.path)).map((route) => {
|
|
164
161
|
if (!route.path || route.path === "/**") {
|
|
165
162
|
return {
|
|
166
163
|
...route,
|
|
@@ -192,6 +189,27 @@ var createNuxtApiRoutesMeta = async (ctx) => {
|
|
|
192
189
|
processedRoutes.push({
|
|
193
190
|
path: ".*-ssr-functions/:path*"
|
|
194
191
|
});
|
|
192
|
+
processedRoutes = processedRoutes.map((route) => {
|
|
193
|
+
if (route.hasOwnProperty("ssr")) {
|
|
194
|
+
Reflect.deleteProperty(route, "ssr");
|
|
195
|
+
}
|
|
196
|
+
route.path = route.path.replace(/\(/g, "").replace(/\)/g, "");
|
|
197
|
+
return route;
|
|
198
|
+
});
|
|
199
|
+
processedRoutes = processedRoutes.map((route) => {
|
|
200
|
+
if (route.path.startsWith("/:")) {
|
|
201
|
+
if (route.hasOwnProperty("isStatic")) {
|
|
202
|
+
route.isStatic = true;
|
|
203
|
+
} else {
|
|
204
|
+
Reflect.defineProperty(route, "isStatic", {
|
|
205
|
+
value: true,
|
|
206
|
+
enumerable: true
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
return route;
|
|
210
|
+
}
|
|
211
|
+
return route;
|
|
212
|
+
});
|
|
195
213
|
const finalMetaData = {
|
|
196
214
|
frameworkRoutes: processedRoutes,
|
|
197
215
|
conf: {
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
createNuxtApiRoutesMeta,
|
|
22
22
|
createNuxtPagesRouteMeta
|
|
23
|
-
} from "./esm-chunks/chunk-
|
|
23
|
+
} from "./esm-chunks/chunk-VCO654TD.js";
|
|
24
24
|
import "./esm-chunks/chunk-5VJRCUAW.js";
|
|
25
25
|
import "./esm-chunks/chunk-6BT4RYQJ.js";
|
|
26
26
|
|
|
@@ -29,7 +29,7 @@ import { rm } from "node:fs/promises";
|
|
|
29
29
|
function checkNuxtVersion(version) {
|
|
30
30
|
const versionData = version.split(".");
|
|
31
31
|
if (versionData.length === 3 && Number(versionData[0]) < 3) {
|
|
32
|
-
console.error("Nuxt version must be greater than 3.
|
|
32
|
+
console.error("Nuxt version must be greater than 3.16.0. Compatibility for lower versions is under development...");
|
|
33
33
|
process.exit(1);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -40,7 +40,7 @@ var recordOldNitroConfig = null;
|
|
|
40
40
|
var onPreBuild = async (options) => {
|
|
41
41
|
try {
|
|
42
42
|
const ctx = new PluginContext(options);
|
|
43
|
-
checkNuxtVersion(ctx.nuxtVersion || "
|
|
43
|
+
checkNuxtVersion(ctx.nuxtVersion || "1.0.0");
|
|
44
44
|
recordOldNitroConfig = await addNitroBuildOutputConfig(ctx);
|
|
45
45
|
} catch (error) {
|
|
46
46
|
console.error("onPreBuild failed:", error);
|
|
@@ -199,7 +199,7 @@ var getMemoizedKeyValueStoreBackedByRegionalBlobStore = (...args) => {
|
|
|
199
199
|
|
|
200
200
|
// package.json
|
|
201
201
|
var name = "@edgeone/nuxt-pages";
|
|
202
|
-
var version = "1.0.
|
|
202
|
+
var version = "1.0.6";
|
|
203
203
|
|
|
204
204
|
// src/run/handlers/tags-handler.cts
|
|
205
205
|
var purgeCacheUserAgent = `${name}@${version}`;
|
|
@@ -28,7 +28,7 @@ module.exports = __toCommonJS(tags_handler_exports);
|
|
|
28
28
|
|
|
29
29
|
// package.json
|
|
30
30
|
var name = "@edgeone/nuxt-pages";
|
|
31
|
-
var version = "1.0.
|
|
31
|
+
var version = "1.0.6";
|
|
32
32
|
|
|
33
33
|
// src/run/handlers/request-context.cts
|
|
34
34
|
var import_node_async_hooks = require("node:async_hooks");
|