@edgeone/opennextjs-pages 0.0.1
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/advanced-api-routes.js +147 -0
- package/dist/build/cache.js +36 -0
- package/dist/build/content/next-shims/telemetry-storage.cjs +55 -0
- package/dist/build/content/prerendered.js +292 -0
- package/dist/build/content/server.js +236 -0
- package/dist/build/content/static.js +119 -0
- package/dist/build/functions/server.js +133 -0
- package/dist/build/plugin-context.js +367 -0
- package/dist/build/routes.js +127 -0
- package/dist/build/templates/handler-monorepo.tmpl.js +210 -0
- package/dist/build/templates/handler.tmpl.js +206 -0
- package/dist/esm-chunks/chunk-5J3FID2N.js +5551 -0
- package/dist/esm-chunks/chunk-6BT4RYQJ.js +43 -0
- package/dist/esm-chunks/chunk-FKDTZJRV.js +832 -0
- package/dist/esm-chunks/chunk-TLQCAGE2.js +1921 -0
- package/dist/index.js +50 -0
- package/dist/run/config.js +37 -0
- package/dist/run/constants.js +19 -0
- package/dist/run/handlers/cache.cjs +369 -0
- package/dist/run/handlers/request-context.cjs +148 -0
- package/dist/run/handlers/server.js +3213 -0
- package/dist/run/handlers/tags-handler.cjs +92 -0
- package/dist/run/handlers/tracer.cjs +916 -0
- package/dist/run/handlers/use-cache-handler.js +1538 -0
- package/dist/run/handlers/wait-until.cjs +39 -0
- package/dist/run/headers.js +81 -0
- package/dist/run/next.cjs +100 -0
- package/dist/run/revalidate.js +34 -0
- package/dist/run/storage/regional-blob-store.cjs +64 -0
- package/dist/run/storage/request-scoped-in-memory-cache.cjs +1496 -0
- package/dist/run/storage/storage.cjs +37 -0
- package/dist/shared/blob-types.cjs +37 -0
- package/dist/shared/blobkey.js +25 -0
- package/dist/shared/cache-types.cjs +33 -0
- package/package.json +55 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/run/storage/storage.cts
|
|
21
|
+
var storage_exports = {};
|
|
22
|
+
__export(storage_exports, {
|
|
23
|
+
getMemoizedKeyValueStoreBackedByRegionalBlobStore: () => getMemoizedKeyValueStoreBackedByRegionalBlobStore,
|
|
24
|
+
setFetchBeforeNextPatchedIt: () => import_regional_blob_store.setFetchBeforeNextPatchedIt,
|
|
25
|
+
setInMemoryCacheMaxSizeFromNextConfig: () => import_request_scoped_in_memory_cache.setInMemoryCacheMaxSizeFromNextConfig
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(storage_exports);
|
|
28
|
+
var import_request_scoped_in_memory_cache = require("./request-scoped-in-memory-cache.cjs");
|
|
29
|
+
var import_regional_blob_store = require("./regional-blob-store.cjs");
|
|
30
|
+
var getMemoizedKeyValueStoreBackedByRegionalBlobStore = (...args) => {
|
|
31
|
+
};
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
getMemoizedKeyValueStoreBackedByRegionalBlobStore,
|
|
35
|
+
setFetchBeforeNextPatchedIt,
|
|
36
|
+
setInMemoryCacheMaxSizeFromNextConfig
|
|
37
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/shared/blob-types.cts
|
|
21
|
+
var blob_types_exports = {};
|
|
22
|
+
__export(blob_types_exports, {
|
|
23
|
+
isHtmlBlob: () => isHtmlBlob,
|
|
24
|
+
isTagManifest: () => isTagManifest
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(blob_types_exports);
|
|
27
|
+
var isTagManifest = (value) => {
|
|
28
|
+
return typeof value === "object" && value !== null && "revalidatedAt" in value && typeof value.revalidatedAt === "number" && Object.keys(value).length === 1;
|
|
29
|
+
};
|
|
30
|
+
var isHtmlBlob = (value) => {
|
|
31
|
+
return typeof value === "object" && value !== null && "html" in value && "isFullyStaticPage" in value && typeof value.html === "string" && typeof value.isFullyStaticPage === "boolean" && Object.keys(value).length === 2;
|
|
32
|
+
};
|
|
33
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
34
|
+
0 && (module.exports = {
|
|
35
|
+
isHtmlBlob,
|
|
36
|
+
isTagManifest
|
|
37
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
var require = await (async () => {
|
|
3
|
+
var { createRequire } = await import("node:module");
|
|
4
|
+
return createRequire(import.meta.url);
|
|
5
|
+
})();
|
|
6
|
+
|
|
7
|
+
import "../esm-chunks/chunk-6BT4RYQJ.js";
|
|
8
|
+
|
|
9
|
+
// src/shared/blobkey.ts
|
|
10
|
+
import { Buffer } from "node:buffer";
|
|
11
|
+
import { webcrypto as crypto } from "node:crypto";
|
|
12
|
+
var maxLength = 180;
|
|
13
|
+
async function encodeBlobKey(key) {
|
|
14
|
+
const buffer = Buffer.from(key);
|
|
15
|
+
const base64 = buffer.toString("base64url");
|
|
16
|
+
if (base64.length <= maxLength) {
|
|
17
|
+
return base64;
|
|
18
|
+
}
|
|
19
|
+
const digest = await crypto.subtle.digest("SHA-256", buffer);
|
|
20
|
+
const hash = Buffer.from(digest).toString("base64url");
|
|
21
|
+
return `${base64.slice(0, maxLength - hash.length - 1)}-${hash}`;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
encodeBlobKey
|
|
25
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/shared/cache-types.cts
|
|
21
|
+
var cache_types_exports = {};
|
|
22
|
+
__export(cache_types_exports, {
|
|
23
|
+
isCachedPageValue: () => isCachedPageValue,
|
|
24
|
+
isCachedRouteValue: () => isCachedRouteValue
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(cache_types_exports);
|
|
27
|
+
var isCachedPageValue = (value) => value.kind === "PAGE" || value.kind === "PAGES";
|
|
28
|
+
var isCachedRouteValue = (value) => value.kind === "ROUTE" || value.kind === "APP_ROUTE";
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
isCachedPageValue,
|
|
32
|
+
isCachedRouteValue
|
|
33
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@edgeone/opennextjs-pages",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "node ./tools/build.js",
|
|
12
|
+
"build:watch": "node ./tools/build.js --watch"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public",
|
|
16
|
+
"registry": "https://registry.npmjs.org/"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@fastly/http-compute-js": "1.1.5",
|
|
20
|
+
"@netlify/functions": "^3.1.8",
|
|
21
|
+
"@opentelemetry/api": "^1.8.0",
|
|
22
|
+
"@playwright/test": "^1.43.1",
|
|
23
|
+
"@types/node": "^20.19.4",
|
|
24
|
+
"@types/picomatch": "^3.0.0",
|
|
25
|
+
"@types/uuid": "^10.0.0",
|
|
26
|
+
"@vercel/nft": "^0.27.0",
|
|
27
|
+
"cheerio": "^1.0.0-rc.12",
|
|
28
|
+
"clean-package": "^2.2.0",
|
|
29
|
+
"esbuild": "^0.25.0",
|
|
30
|
+
"execa": "^8.0.1",
|
|
31
|
+
"fast-glob": "^3.3.2",
|
|
32
|
+
"fs-monkey": "^1.0.6",
|
|
33
|
+
"get-port": "^7.1.0",
|
|
34
|
+
"lambda-local": "^2.2.0",
|
|
35
|
+
"lru-cache": "^10.4.3",
|
|
36
|
+
"memfs": "^4.9.2",
|
|
37
|
+
"mock-require": "^3.0.3",
|
|
38
|
+
"msw": "^2.0.7",
|
|
39
|
+
"next": "^15.0.0-canary.28",
|
|
40
|
+
"next-with-cache-handler-v2": "npm:next@15.3.0-canary.13",
|
|
41
|
+
"os": "^0.1.2",
|
|
42
|
+
"outdent": "^0.8.0",
|
|
43
|
+
"p-limit": "^6.0.0",
|
|
44
|
+
"path-to-regexp": "^6.2.1",
|
|
45
|
+
"picomatch": "^4.0.2",
|
|
46
|
+
"prettier": "^3.2.5",
|
|
47
|
+
"semver": "^7.6.0",
|
|
48
|
+
"typescript": "^5.4.5",
|
|
49
|
+
"unionfs": "^4.5.4",
|
|
50
|
+
"uuid": "^11.0.0",
|
|
51
|
+
"vitest": "^3.0.0"
|
|
52
|
+
},
|
|
53
|
+
"author": "",
|
|
54
|
+
"license": "ISC"
|
|
55
|
+
}
|