@solcreek/adapter-creek 0.2.3 → 0.2.5
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/bundler.js +3 -2
- package/dist/compat.d.ts +21 -0
- package/dist/compat.js +21 -0
- package/dist/manifest.js +3 -2
- package/package.json +2 -2
package/dist/bundler.js
CHANGED
|
@@ -12,6 +12,7 @@ import * as path from "node:path";
|
|
|
12
12
|
import { execFileSync } from "node:child_process";
|
|
13
13
|
import { builtinModules, createRequire } from "node:module";
|
|
14
14
|
import { fileURLToPath } from "node:url";
|
|
15
|
+
import { WORKER_COMPATIBILITY_DATE, WORKER_COMPATIBILITY_FLAGS } from "./compat.js";
|
|
15
16
|
/**
|
|
16
17
|
* Resolve wrangler's CLI entry script through Node module resolution.
|
|
17
18
|
*
|
|
@@ -676,8 +677,8 @@ export async function bundleForWorkers(opts) {
|
|
|
676
677
|
const wranglerConfig = {
|
|
677
678
|
name: "creek-adapter-build",
|
|
678
679
|
main: entryPath,
|
|
679
|
-
compatibility_date:
|
|
680
|
-
compatibility_flags: [
|
|
680
|
+
compatibility_date: WORKER_COMPATIBILITY_DATE,
|
|
681
|
+
compatibility_flags: [...WORKER_COMPATIBILITY_FLAGS],
|
|
681
682
|
define: {
|
|
682
683
|
__dirname: '""',
|
|
683
684
|
__filename: '""',
|
package/dist/compat.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the compatibility settings the generated
|
|
3
|
+
* worker is built AND deployed with.
|
|
4
|
+
*
|
|
5
|
+
* The Next.js worker statically imports node:http (server APIs). Per
|
|
6
|
+
* Cloudflare's Node.js docs, node:http is served by the umbrella
|
|
7
|
+
* `nodejs_compat` flag (NOT `nodejs_compat_v2`, which the docs no longer
|
|
8
|
+
* list and which WfP rejects for node:http). Its SERVER modules
|
|
9
|
+
* (`http.createServer`/`Server`/`ServerResponse`) are gated behind
|
|
10
|
+
* `enable_nodejs_http_server_modules`, auto-enabled only at
|
|
11
|
+
* compatibility_date >= 2025-09-01 (client APIs at 2025-08-15). This is why
|
|
12
|
+
* a 2025-03-14 deploy was rejected with "No such module node:http".
|
|
13
|
+
*
|
|
14
|
+
* The bundle step (bundler.ts) and the deploy manifest (manifest.ts) MUST
|
|
15
|
+
* agree: the worker is validated at upload against the date/flags it ships
|
|
16
|
+
* with, so the deploy must use exactly what the bundle was built against.
|
|
17
|
+
* Keep DATE >= 2025-09-01.
|
|
18
|
+
*/
|
|
19
|
+
export declare const WORKER_COMPATIBILITY_DATE = "2026-03-28";
|
|
20
|
+
export declare const WORKER_COMPATIBILITY_FLAGS: readonly string[];
|
|
21
|
+
//# sourceMappingURL=compat.d.ts.map
|
package/dist/compat.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for the compatibility settings the generated
|
|
3
|
+
* worker is built AND deployed with.
|
|
4
|
+
*
|
|
5
|
+
* The Next.js worker statically imports node:http (server APIs). Per
|
|
6
|
+
* Cloudflare's Node.js docs, node:http is served by the umbrella
|
|
7
|
+
* `nodejs_compat` flag (NOT `nodejs_compat_v2`, which the docs no longer
|
|
8
|
+
* list and which WfP rejects for node:http). Its SERVER modules
|
|
9
|
+
* (`http.createServer`/`Server`/`ServerResponse`) are gated behind
|
|
10
|
+
* `enable_nodejs_http_server_modules`, auto-enabled only at
|
|
11
|
+
* compatibility_date >= 2025-09-01 (client APIs at 2025-08-15). This is why
|
|
12
|
+
* a 2025-03-14 deploy was rejected with "No such module node:http".
|
|
13
|
+
*
|
|
14
|
+
* The bundle step (bundler.ts) and the deploy manifest (manifest.ts) MUST
|
|
15
|
+
* agree: the worker is validated at upload against the date/flags it ships
|
|
16
|
+
* with, so the deploy must use exactly what the bundle was built against.
|
|
17
|
+
* Keep DATE >= 2025-09-01.
|
|
18
|
+
*/
|
|
19
|
+
export const WORKER_COMPATIBILITY_DATE = "2026-03-28";
|
|
20
|
+
export const WORKER_COMPATIBILITY_FLAGS = ["nodejs_compat"];
|
|
21
|
+
//# sourceMappingURL=compat.js.map
|
package/dist/manifest.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import * as fs from "node:fs/promises";
|
|
8
8
|
import * as path from "node:path";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
|
+
import { WORKER_COMPATIBILITY_DATE, WORKER_COMPATIBILITY_FLAGS } from "./compat.js";
|
|
10
11
|
const require = createRequire(import.meta.url);
|
|
11
12
|
const adapterPackage = require("../package.json");
|
|
12
13
|
export async function writeManifest(outputDir, opts) {
|
|
@@ -22,8 +23,8 @@ export async function writeManifest(outputDir, opts) {
|
|
|
22
23
|
entrypoint: opts.entrypoint,
|
|
23
24
|
serverFiles: opts.serverFiles,
|
|
24
25
|
assetDir: "assets",
|
|
25
|
-
compatibilityDate:
|
|
26
|
-
compatibilityFlags: [
|
|
26
|
+
compatibilityDate: WORKER_COMPATIBILITY_DATE,
|
|
27
|
+
compatibilityFlags: [...WORKER_COMPATIBILITY_FLAGS],
|
|
27
28
|
hasMiddleware: opts.hasMiddleware,
|
|
28
29
|
hasPrerender: opts.hasPrerender,
|
|
29
30
|
// Always inject DO bindings for Next.js SSR (ISR cache support)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solcreek/adapter-creek",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Next.js deployment adapter for Creek (Cloudflare Workers)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@next/routing": "16.2.3",
|
|
48
|
+
"@node-rs/xxhash": "^1.7.6",
|
|
48
49
|
"@solcreek/adapter-core": "^0.2.0",
|
|
49
50
|
"@solcreek/adapter-next-core": "^0.1.1",
|
|
50
51
|
"sql.js": "^1.14.1",
|
|
@@ -54,7 +55,6 @@
|
|
|
54
55
|
"next": ">=16.2.3"
|
|
55
56
|
},
|
|
56
57
|
"devDependencies": {
|
|
57
|
-
"@node-rs/xxhash": "^1.7.6",
|
|
58
58
|
"@types/node": "^22.13.10",
|
|
59
59
|
"miniflare": "^4.20260410.0",
|
|
60
60
|
"next": "16.2.3",
|