@opennextjs/cloudflare 0.4.2 → 0.4.3

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.
@@ -18,19 +18,16 @@ export function getCloudflareContext() {
18
18
  // the cloudflare context is initialized by the worker and is always present in production/preview
19
19
  // during local development (`next dev`) it might be missing only if the developers hasn't called
20
20
  // the `initOpenNextCloudflareForDev` function in their Next.js config file
21
- const getContextFunctionName = getCloudflareContext.name;
22
- const initFunctionName = initOpenNextCloudflareForDev.name;
23
- throw new Error(`\n\n\`${getContextFunctionName}\` has been called during development without having called` +
24
- ` the \`${initFunctionName}\` function inside the Next.js config file.\n\n` +
25
- `In order to use \`${getContextFunctionName}\` import and call ${initFunctionName} in the Next.js config file.\n\n` +
26
- "Example: \n ```\n // next.config.mjs\n\n" +
27
- ` import { ${initFunctionName} } from "@opennextjs/cloudflare";\n\n` +
28
- ` ${initFunctionName}();\n\n` +
29
- " /** @type {import('next').NextConfig} */\n" +
30
- " const nextConfig = {};\n" +
21
+ throw new Error(`\n\nERROR: \`getCloudflareContext\` has been called without having called` +
22
+ ` \`initOpenNextCloudflareForDev\` from the Next.js config file.\n` +
23
+ `You should update your Next.js config file as shown below:\n\n` +
24
+ " ```\n // next.config.mjs\n\n" +
25
+ ` import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";\n\n` +
26
+ ` initOpenNextCloudflareForDev();\n\n` +
27
+ " const nextConfig = { ... };\n" +
31
28
  " export default nextConfig;\n" +
32
29
  " ```\n" +
33
- "\n(note: currently middlewares in Next.js are always run using the edge runtime)\n\n");
30
+ "\n");
34
31
  }
35
32
  return cloudflareContext;
36
33
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opennextjs/cloudflare",
3
3
  "description": "Cloudflare builder for next apps",
4
- "version": "0.4.2",
4
+ "version": "0.4.3",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "opennextjs-cloudflare": "dist/cli/index.js"
@@ -70,7 +70,7 @@
70
70
  "yaml": "^2.7.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "wrangler": "^3.106.0"
73
+ "wrangler": "^3.107.0"
74
74
  },
75
75
  "scripts": {
76
76
  "clean": "rimraf dist",