create-cloudflare 0.0.0-e18f18b2 → 0.0.0-e19903d7

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 (74) hide show
  1. package/dist/cli.js +1528 -1204
  2. package/dist/tsconfig.tsbuildinfo +1 -0
  3. package/package.json +9 -9
  4. package/templates/analog/c3.ts +134 -0
  5. package/templates/analog/snippets/devBindingsModule.ts +7 -0
  6. package/templates/analog/templates/env.d.ts +13 -0
  7. package/templates/analog/templates/src/dev-bindings.ts +18 -0
  8. package/templates/analog/templates/worker-configuration.d.ts +4 -0
  9. package/templates/analog/templates/wrangler.toml +85 -0
  10. package/templates/angular/c3.ts +2 -2
  11. package/templates/astro/c3.ts +6 -6
  12. package/templates/astro/templates/wrangler.toml +34 -2
  13. package/templates/common/js/wrangler.toml +10 -1
  14. package/templates/common/ts/package.json +2 -1
  15. package/templates/common/ts/src/index.ts +3 -0
  16. package/templates/common/ts/worker-configuration.d.ts +2 -14
  17. package/templates/common/ts/wrangler.toml +10 -1
  18. package/templates/hello-world/js/package.json +2 -1
  19. package/templates/hello-world/js/test/index.spec.js +17 -17
  20. package/templates/hello-world/js/vitest.config.js +8 -8
  21. package/templates/hello-world/js/wrangler.toml +10 -1
  22. package/templates/hello-world/ts/package.json +2 -1
  23. package/templates/hello-world/ts/src/index.ts +3 -17
  24. package/templates/hello-world/ts/test/index.spec.ts +17 -17
  25. package/templates/hello-world/ts/test/tsconfig.json +6 -9
  26. package/templates/hello-world/ts/vitest.config.ts +8 -8
  27. package/templates/hello-world/ts/worker-configuration.d.ts +4 -0
  28. package/templates/hello-world/ts/wrangler.toml +10 -1
  29. package/templates/hello-world-durable-object/c3.ts +1 -1
  30. package/templates/hello-world-durable-object/js/src/index.js +18 -14
  31. package/templates/hello-world-durable-object/js/wrangler.toml +11 -2
  32. package/templates/hello-world-durable-object/ts/package.json +2 -2
  33. package/templates/hello-world-durable-object/ts/src/index.ts +24 -16
  34. package/templates/hello-world-durable-object/ts/worker-configuration.d.ts +6 -0
  35. package/templates/hello-world-durable-object/ts/wrangler.toml +12 -4
  36. package/templates/hello-world-python/py/wrangler.toml +103 -0
  37. package/templates/hono/c3.ts +53 -0
  38. package/templates/hono/snippets/appDeclaration.ts +1 -0
  39. package/templates/hono/snippets/bindingsType.ts +3 -0
  40. package/templates/hono/templates/worker-configuration.d.ts +4 -0
  41. package/templates/hono/templates/wrangler.toml +107 -0
  42. package/templates/next/README.md +5 -5
  43. package/templates/next/c3.ts +11 -9
  44. package/templates/next/wrangler.toml +32 -1
  45. package/templates/nuxt/c3.ts +7 -7
  46. package/templates/nuxt/templates/worker-configuration.d.ts +1 -1
  47. package/templates/nuxt/templates/wrangler.toml +34 -2
  48. package/templates/openapi/ts/package.json +2 -1
  49. package/templates/openapi/ts/worker-configuration.d.ts +4 -0
  50. package/templates/openapi/ts/wrangler.toml +103 -0
  51. package/templates/pre-existing/c3.ts +5 -5
  52. package/templates/queues/js/wrangler.toml +10 -1
  53. package/templates/queues/ts/package.json +2 -1
  54. package/templates/queues/ts/src/index.ts +3 -5
  55. package/templates/queues/ts/worker-configuration.d.ts +5 -0
  56. package/templates/queues/ts/wrangler.toml +10 -1
  57. package/templates/qwik/c3.ts +6 -6
  58. package/templates/qwik/templates/worker-configuration.d.ts +1 -1
  59. package/templates/qwik/templates/wrangler.toml +34 -2
  60. package/templates/remix/c3.ts +3 -3
  61. package/templates/remix/templates/worker-configuration.d.ts +1 -1
  62. package/templates/remix/templates/wrangler.toml +34 -2
  63. package/templates/scheduled/js/package.json +2 -2
  64. package/templates/scheduled/js/src/index.js +8 -1
  65. package/templates/scheduled/js/wrangler.toml +11 -2
  66. package/templates/scheduled/ts/package.json +3 -2
  67. package/templates/scheduled/ts/src/index.ts +4 -21
  68. package/templates/scheduled/ts/worker-configuration.d.ts +4 -0
  69. package/templates/scheduled/ts/wrangler.toml +11 -2
  70. package/templates/solid/c3.ts +9 -7
  71. package/templates/solid/templates/wrangler.toml +84 -0
  72. package/templates/svelte/c3.ts +9 -9
  73. package/templates/svelte/js/wrangler.toml +34 -2
  74. package/templates/svelte/ts/wrangler.toml +34 -2
@@ -1,10 +1,20 @@
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"
5
+
6
+ # Automatically place your workloads in an optimal location to minimize latency.
7
+ # If you are running back-end logic in a Pages Function, running it closer to your back-end infrastructure
8
+ # rather than the end user may result in better performance.
9
+ # Docs: https://developers.cloudflare.com/pages/functions/smart-placement/#smart-placement
10
+ # [placement]
11
+ # mode = "smart"
4
12
 
5
13
  # Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
14
+ # Docs:
15
+ # - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
6
16
  # Note: Use secrets to store sensitive data.
7
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
17
+ # - https://developers.cloudflare.com/pages/functions/bindings/#secrets
8
18
  # [vars]
9
19
  # MY_VARIABLE = "production_value"
10
20
 
@@ -50,4 +60,26 @@ compatibility_date = "<TBD>"
50
60
  # Docs: https://developers.cloudflare.com/pages/functions/bindings/#service-bindings
51
61
  # [[services]]
52
62
  # binding = "MY_SERVICE"
53
- # service = "my-service"
63
+ # service = "my-service"
64
+
65
+ # To use different bindings for preview and production environments, follow the examples below.
66
+ # When using environment-specific overrides for bindings, ALL bindings must be specified on a per-environment basis.
67
+ # Docs: https://developers.cloudflare.com/pages/functions/wrangler-configuration#environment-specific-overrides
68
+
69
+ ######## PREVIEW environment config ########
70
+
71
+ # [env.preview.vars]
72
+ # API_KEY = "xyz789"
73
+
74
+ # [[env.preview.kv_namespaces]]
75
+ # binding = "MY_KV_NAMESPACE"
76
+ # id = "<PREVIEW_NAMESPACE_ID>"
77
+
78
+ ######## PRODUCTION environment config ########
79
+
80
+ # [env.production.vars]
81
+ # API_KEY = "abc123"
82
+
83
+ # [[env.production.kv_namespaces]]
84
+ # binding = "MY_KV_NAMESPACE"
85
+ # id = "<PRODUCTION_NAMESPACE_ID>"