Skip to content

Commit f379635

Browse files
fix(create-cloudflare): use tabs for indentation in wrangler.json template literal (#8311)
* fix(create-cloudflare): use tabs for indentation in wrangler.json template literal * update C3 test snapshots * add changeset --------- Co-authored-by: Peter Bacon Darwin <[email protected]>
1 parent cf14e17 commit f379635

File tree

3 files changed

+73
-68
lines changed

3 files changed

+73
-68
lines changed

.changeset/quiet-apples-press.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+
use tabs for indentation in generated wrangler.json

packages/create-cloudflare/src/wrangler/__tests__/config.test.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -114,40 +114,40 @@ describe("update wrangler config", () => {
114114
"observability": {
115115
"enabled": true
116116
}
117-
/**
118-
* Smart Placement
119-
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
120-
*/
121-
// "placement": { "mode": "smart" },
122-
123-
/**
124-
* Bindings
125-
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
126-
* databases, object storage, AI inference, real-time communication and more.
127-
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
128-
*/
129-
130-
/**
131-
* Environment Variables
132-
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
133-
*/
134-
// "vars": { "MY_VARIABLE": "production_value" },
135-
/**
136-
* Note: Use secrets to store sensitive data.
137-
* https://developers.cloudflare.com/workers/configuration/secrets/
138-
*/
139-
140-
/**
141-
* Static Assets
142-
* https://developers.cloudflare.com/workers/static-assets/binding/
143-
*/
144-
// "assets": { "directory": "./public/", "binding": "ASSETS" },
145-
146-
/**
147-
* Service Bindings (communicate between multiple Workers)
148-
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
149-
*/
150-
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
117+
/**
118+
* Smart Placement
119+
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
120+
*/
121+
// "placement": { "mode": "smart" },
122+
123+
/**
124+
* Bindings
125+
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
126+
* databases, object storage, AI inference, real-time communication and more.
127+
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
128+
*/
129+
130+
/**
131+
* Environment Variables
132+
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
133+
*/
134+
// "vars": { "MY_VARIABLE": "production_value" },
135+
/**
136+
* Note: Use secrets to store sensitive data.
137+
* https://developers.cloudflare.com/workers/configuration/secrets/
138+
*/
139+
140+
/**
141+
* Static Assets
142+
* https://developers.cloudflare.com/workers/static-assets/binding/
143+
*/
144+
// "assets": { "directory": "./public/", "binding": "ASSETS" },
145+
146+
/**
147+
* Service Bindings (communicate between multiple Workers)
148+
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
149+
*/
150+
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
151151
}
152152
"
153153
`);

packages/create-cloudflare/src/wrangler/config.ts

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,40 +56,40 @@ export const updateWranglerConfig = async (ctx: C3Context) => {
5656
ctx,
5757
stringified.slice(0, -2) +
5858
`
59-
/**
60-
* Smart Placement
61-
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
62-
*/
63-
// "placement": { "mode": "smart" },
64-
65-
/**
66-
* Bindings
67-
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
68-
* databases, object storage, AI inference, real-time communication and more.
69-
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
70-
*/
71-
72-
/**
73-
* Environment Variables
74-
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
75-
*/
76-
// "vars": { "MY_VARIABLE": "production_value" },
77-
/**
78-
* Note: Use secrets to store sensitive data.
79-
* https://developers.cloudflare.com/workers/configuration/secrets/
80-
*/
81-
82-
/**
83-
* Static Assets
84-
* https://developers.cloudflare.com/workers/static-assets/binding/
85-
*/
86-
// "assets": { "directory": "./public/", "binding": "ASSETS" },
87-
88-
/**
89-
* Service Bindings (communicate between multiple Workers)
90-
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
91-
*/
92-
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
59+
/**
60+
* Smart Placement
61+
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
62+
*/
63+
// "placement": { "mode": "smart" },
64+
65+
/**
66+
* Bindings
67+
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
68+
* databases, object storage, AI inference, real-time communication and more.
69+
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
70+
*/
71+
72+
/**
73+
* Environment Variables
74+
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
75+
*/
76+
// "vars": { "MY_VARIABLE": "production_value" },
77+
/**
78+
* Note: Use secrets to store sensitive data.
79+
* https://developers.cloudflare.com/workers/configuration/secrets/
80+
*/
81+
82+
/**
83+
* Static Assets
84+
* https://developers.cloudflare.com/workers/static-assets/binding/
85+
*/
86+
// "assets": { "directory": "./public/", "binding": "ASSETS" },
87+
88+
/**
89+
* Service Bindings (communicate between multiple Workers)
90+
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
91+
*/
92+
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
9393
}
9494
`,
9595
);

0 commit comments

Comments
 (0)