@opennextjs/cloudflare 1.14.2 → 1.14.4
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.
|
@@ -56,4 +56,11 @@ const defaultQualities = [75];
|
|
|
56
56
|
const defaultMaxRedirects = 3;
|
|
57
57
|
const defaultFormats = ["image/webp"];
|
|
58
58
|
const defaultMinimumCacheTTLSec = 14400;
|
|
59
|
-
|
|
59
|
+
// Allow any local image when no localPatterns are specified.
|
|
60
|
+
// This regexp was generated using the image manifest generated by setting the local patterns
|
|
61
|
+
// to [{ pathname: "/**" }] in the next config.
|
|
62
|
+
const defaultLocalPatterns = [
|
|
63
|
+
{
|
|
64
|
+
pathname: "^(?:\\/(?!\\.{1,2}(?:\\/|$))(?:(?:(?!(?:^|\\/)\\.{1,2}(?:\\/|$)).)*?))$",
|
|
65
|
+
},
|
|
66
|
+
];
|
|
@@ -26,7 +26,7 @@ export async function createWranglerConfigIfNotExistent(projectOpts) {
|
|
|
26
26
|
let wranglerConfig = readFileSync(join(getPackageTemplatesDirPath(), "wrangler.jsonc"), "utf8");
|
|
27
27
|
const appName = getAppNameFromPackageJson(projectOpts.sourceDir) ?? "app-name";
|
|
28
28
|
if (appName) {
|
|
29
|
-
wranglerConfig = wranglerConfig.
|
|
29
|
+
wranglerConfig = wranglerConfig.replaceAll('"app-name"', JSON.stringify(appName.replaceAll("_", "-")));
|
|
30
30
|
}
|
|
31
31
|
const compatDate = await getLatestCompatDate();
|
|
32
32
|
if (compatDate) {
|
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": "1.14.
|
|
4
|
+
"version": "1.14.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"opennextjs-cloudflare": "dist/cli/index.js"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@ast-grep/napi": "0.40.0",
|
|
46
46
|
"@dotenvx/dotenvx": "1.31.0",
|
|
47
|
-
"@opennextjs/aws": "3.9.
|
|
47
|
+
"@opennextjs/aws": "3.9.4",
|
|
48
48
|
"cloudflare": "^4.4.1",
|
|
49
49
|
"enquirer": "^2.4.1",
|
|
50
50
|
"glob": "^12.0.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"wrangler": "^4.49.1",
|
|
79
|
-
"next": "14 - 14.2 || 14.3.0-canary.0 - 14.3.0-canary.76 || ~15.0.5 || ~15.1.9 || ~15.3.6 || ~15.4.8 || ~15.5.7 || ^16.0.7"
|
|
79
|
+
"next": "14 - 14.2 || 14.3.0-canary.0 - 14.3.0-canary.76 || ~15.0.5 || ~15.1.9 || ~15.2.6 || ~15.3.6 || ~15.4.8 || ~15.5.7 || ^16.0.7"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"clean": "rimraf dist",
|
package/templates/wrangler.jsonc
CHANGED
|
@@ -8,6 +8,12 @@
|
|
|
8
8
|
"directory": ".open-next/assets",
|
|
9
9
|
"binding": "ASSETS"
|
|
10
10
|
},
|
|
11
|
+
"services": [
|
|
12
|
+
{
|
|
13
|
+
"binding": "WORKER_SELF_REFERENCE",
|
|
14
|
+
"service": "app-name"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
11
17
|
"r2_buckets": [
|
|
12
18
|
// Use R2 incremental cache
|
|
13
19
|
// See https://opennext.js.org/cloudflare/caching
|