create-cloudflare 2.19.0 → 2.20.1

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.
Files changed (54) hide show
  1. package/dist/cli.js +26 -24
  2. package/package.json +3 -3
  3. package/templates/analog/c3.ts +1 -1
  4. package/templates/analog/templates/worker-configuration.d.ts +1 -1
  5. package/templates/astro/c3.ts +3 -3
  6. package/templates/astro/templates/wrangler.toml +27 -2
  7. package/templates/common/js/wrangler.toml +3 -1
  8. package/templates/common/ts/package.json +2 -1
  9. package/templates/common/ts/src/index.ts +3 -0
  10. package/templates/common/ts/worker-configuration.d.ts +2 -14
  11. package/templates/common/ts/wrangler.toml +3 -1
  12. package/templates/hello-world/js/test/index.spec.js +17 -17
  13. package/templates/hello-world/js/wrangler.toml +3 -1
  14. package/templates/hello-world/ts/package.json +2 -1
  15. package/templates/hello-world/ts/src/index.ts +3 -17
  16. package/templates/hello-world/ts/test/index.spec.ts +17 -17
  17. package/templates/hello-world/ts/worker-configuration.d.ts +4 -0
  18. package/templates/hello-world/ts/wrangler.toml +3 -1
  19. package/templates/hello-world-durable-object/js/wrangler.toml +3 -1
  20. package/templates/hello-world-durable-object/ts/package.json +2 -1
  21. package/templates/hello-world-durable-object/ts/src/index.ts +3 -20
  22. package/templates/hello-world-durable-object/ts/worker-configuration.d.ts +6 -0
  23. package/templates/hello-world-durable-object/ts/wrangler.toml +3 -2
  24. package/templates/hello-world-python/py/wrangler.toml +3 -1
  25. package/templates/next/README.md +5 -5
  26. package/templates/next/c3.ts +3 -3
  27. package/templates/next/wrangler.toml +25 -1
  28. package/templates/nuxt/c3.ts +3 -3
  29. package/templates/nuxt/templates/worker-configuration.d.ts +1 -1
  30. package/templates/nuxt/templates/wrangler.toml +27 -2
  31. package/templates/openapi/ts/package.json +2 -1
  32. package/templates/openapi/ts/worker-configuration.d.ts +4 -0
  33. package/templates/openapi/ts/wrangler.toml +96 -0
  34. package/templates/queues/js/wrangler.toml +3 -1
  35. package/templates/queues/ts/package.json +2 -1
  36. package/templates/queues/ts/src/index.ts +3 -5
  37. package/templates/queues/ts/worker-configuration.d.ts +5 -0
  38. package/templates/queues/ts/wrangler.toml +3 -1
  39. package/templates/qwik/c3.ts +3 -3
  40. package/templates/qwik/templates/worker-configuration.d.ts +1 -1
  41. package/templates/qwik/templates/wrangler.toml +27 -2
  42. package/templates/remix/c3.ts +3 -3
  43. package/templates/remix/templates/worker-configuration.d.ts +1 -1
  44. package/templates/remix/templates/wrangler.toml +27 -2
  45. package/templates/scheduled/js/wrangler.toml +4 -2
  46. package/templates/scheduled/ts/package.json +2 -1
  47. package/templates/scheduled/ts/src/index.ts +3 -20
  48. package/templates/scheduled/ts/worker-configuration.d.ts +4 -0
  49. package/templates/scheduled/ts/wrangler.toml +4 -2
  50. package/templates/solid/c3.ts +5 -3
  51. package/templates/solid/templates/wrangler.toml +77 -0
  52. package/templates/svelte/c3.ts +3 -3
  53. package/templates/svelte/js/wrangler.toml +27 -2
  54. package/templates/svelte/ts/wrangler.toml +27 -2
@@ -1,10 +1,13 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
+ pages_build_output_dir = ".svelte-kit/cloudflare"
4
5
 
5
6
  # Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
7
+ # Docs:
8
+ # - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
6
9
  # Note: Use secrets to store sensitive data.
7
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
10
+ # - https://developers.cloudflare.com/pages/functions/bindings/#secrets
8
11
  # [vars]
9
12
  # MY_VARIABLE = "production_value"
10
13
 
@@ -50,4 +53,26 @@ compatibility_date = "<TBD>"
50
53
  # Docs: https://developers.cloudflare.com/pages/functions/bindings/#service-bindings
51
54
  # [[services]]
52
55
  # binding = "MY_SERVICE"
53
- # service = "my-service"
56
+ # service = "my-service"
57
+
58
+ # To use different bindings for preview and production environments, follow the examples below.
59
+ # When using environment-specific overrides for bindings, ALL bindings must be specified on a per-environment basis.
60
+ # Docs: https://developers.cloudflare.com/pages/functions/wrangler-configuration#environment-specific-overrides
61
+
62
+ ######## PREVIEW environment config ########
63
+
64
+ # [env.preview.vars]
65
+ # API_KEY = "xyz789"
66
+
67
+ # [[env.preview.kv_namespaces]]
68
+ # binding = "MY_KV_NAMESPACE"
69
+ # id = "<PREVIEW_NAMESPACE_ID>"
70
+
71
+ ######## PRODUCTION environment config ########
72
+
73
+ # [env.production.vars]
74
+ # API_KEY = "abc123"
75
+
76
+ # [[env.production.kv_namespaces]]
77
+ # binding = "MY_KV_NAMESPACE"
78
+ # id = "<PRODUCTION_NAMESPACE_ID>"