Skip to content

Commit 822e103

Browse files
authored
Add the global_fetch_strictly_public flag to Workers templates (#9147)
1 parent 4ac93f2 commit 822e103

File tree

8 files changed

+16
-7
lines changed

8 files changed

+16
-7
lines changed

.changeset/chubby-gifts-sip.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-cloudflare": patch
3+
---
4+
5+
Add the `global_fetch_strictly_public` flag to workers template

packages/create-cloudflare/src/templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export type TemplateConfig = {
132132
ctx: C3Context,
133133
) => Promise<Record<string, string | object>>;
134134

135-
/** An array of compatibility flags to be specified when deploying to pages or workers.*/
135+
/** An array of compatibility flags to be specified when deploying to pages (unused for workers) */
136136
compatibilityFlags?: string[];
137137

138138
/** The key of the package.json "scripts" entry for deploying the project. Defaults to `pages:deploy` */

packages/create-cloudflare/templates/astro/workers/templates/js/wrangler.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"main": "./dist/_worker.js/index.js",
44
"compatibility_date": "<TBD>",
55
"compatibility_flags": [
6-
"nodejs_compat"
6+
"nodejs_compat",
7+
"global_fetch_strictly_public"
78
],
89
"assets": {
910
"binding": "ASSETS",

packages/create-cloudflare/templates/astro/workers/templates/ts/wrangler.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"main": "./dist/_worker.js/index.js",
44
"compatibility_date": "<TBD>",
55
"compatibility_flags": [
6-
"nodejs_compat"
6+
"nodejs_compat",
7+
"global_fetch_strictly_public"
78
],
89
"assets": {
910
"binding": "ASSETS",

packages/create-cloudflare/templates/hello-world-with-assets/js/wrangler.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"main": "src/index.js",
44
"compatibility_date": "<TBD>",
55
"compatibility_flags": [
6-
"nodejs_compat"
6+
"nodejs_compat",
7+
"global_fetch_strictly_public"
78
],
89
"assets": {
910
"binding": "ASSETS",

packages/create-cloudflare/templates/hello-world-with-assets/ts/wrangler.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"main": "src/index.ts",
44
"compatibility_date": "<TBD>",
55
"compatibility_flags": [
6-
"nodejs_compat"
6+
"nodejs_compat",
7+
"global_fetch_strictly_public"
78
],
89
"assets": {
910
"binding": "ASSETS",

packages/create-cloudflare/templates/next/workers/c3.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,4 @@ export default {
6868
deployScript: "deploy",
6969
typesPath,
7070
envInterfaceName,
71-
compatibilityFlags: ["nodejs_compat"],
7271
} as TemplateConfig;

packages/create-cloudflare/templates/qwik/workers/templates/wrangler.jsonc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"main": "./dist/_worker.js",
44
"compatibility_date": "<TBD>",
55
"compatibility_flags": [
6-
"nodejs_compat"
6+
"nodejs_compat",
7+
"global_fetch_strictly_public"
78
],
89
"assets": {
910
"binding": "ASSET",

0 commit comments

Comments
 (0)