create-cloudflare 0.0.0-e60a675d → 0.0.0-e640ed9d

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 (48) hide show
  1. package/dist/cli.js +736 -541
  2. package/dist/tsconfig.tsbuildinfo +1 -0
  3. package/package.json +7 -10
  4. package/templates/analog/c3.ts +4 -4
  5. package/templates/analog/templates/wrangler.toml +7 -0
  6. package/templates/angular/c3.ts +2 -2
  7. package/templates/astro/c3.ts +3 -3
  8. package/templates/astro/templates/wrangler.toml +7 -0
  9. package/templates/common/js/wrangler.toml +7 -0
  10. package/templates/common/ts/wrangler.toml +7 -0
  11. package/templates/hello-world/js/vitest.config.js +8 -8
  12. package/templates/hello-world/js/wrangler.toml +7 -0
  13. package/templates/hello-world/ts/test/tsconfig.json +6 -9
  14. package/templates/hello-world/ts/vitest.config.ts +8 -8
  15. package/templates/hello-world/ts/wrangler.toml +7 -0
  16. package/templates/hello-world-durable-object/js/src/index.js +18 -14
  17. package/templates/hello-world-durable-object/js/wrangler.toml +8 -1
  18. package/templates/hello-world-durable-object/ts/package.json +0 -1
  19. package/templates/hello-world-durable-object/ts/src/index.ts +40 -15
  20. package/templates/hello-world-durable-object/ts/wrangler.toml +9 -2
  21. package/templates/hello-world-python/py/wrangler.toml +7 -0
  22. package/templates/hono/c3.ts +53 -0
  23. package/templates/hono/snippets/appDeclaration.ts +1 -0
  24. package/templates/hono/snippets/bindingsType.ts +3 -0
  25. package/templates/hono/templates/worker-configuration.d.ts +4 -0
  26. package/templates/hono/templates/wrangler.toml +107 -0
  27. package/templates/next/c3.ts +8 -6
  28. package/templates/next/wrangler.toml +7 -0
  29. package/templates/nuxt/c3.ts +3 -3
  30. package/templates/nuxt/templates/wrangler.toml +7 -0
  31. package/templates/openapi/ts/wrangler.toml +7 -0
  32. package/templates/pre-existing/c3.ts +5 -5
  33. package/templates/queues/js/wrangler.toml +7 -0
  34. package/templates/queues/ts/wrangler.toml +7 -0
  35. package/templates/qwik/c3.ts +3 -3
  36. package/templates/qwik/templates/wrangler.toml +7 -0
  37. package/templates/remix/templates/wrangler.toml +7 -0
  38. package/templates/scheduled/js/package.json +2 -2
  39. package/templates/scheduled/js/src/index.js +8 -1
  40. package/templates/scheduled/js/wrangler.toml +7 -0
  41. package/templates/scheduled/ts/package.json +2 -2
  42. package/templates/scheduled/ts/src/index.ts +1 -1
  43. package/templates/scheduled/ts/wrangler.toml +7 -0
  44. package/templates/solid/c3.ts +4 -4
  45. package/templates/solid/templates/wrangler.toml +7 -0
  46. package/templates/svelte/c3.ts +6 -6
  47. package/templates/svelte/js/wrangler.toml +7 -0
  48. package/templates/svelte/ts/wrangler.toml +7 -0
@@ -39,18 +39,18 @@ const configure = async (ctx: C3Context) => {
39
39
  b.objectExpression([
40
40
  b.objectProperty(
41
41
  b.identifier("preset"),
42
- b.stringLiteral("cloudflare-pages")
42
+ b.stringLiteral("cloudflare-pages"),
43
43
  ),
44
44
  b.objectProperty(
45
45
  b.identifier("rollupConfig"),
46
46
  b.objectExpression([
47
47
  b.objectProperty(
48
48
  b.identifier("external"),
49
- b.arrayExpression([b.stringLiteral("node:async_hooks")])
49
+ b.arrayExpression([b.stringLiteral("node:async_hooks")]),
50
50
  ),
51
- ])
51
+ ]),
52
52
  ),
53
- ])
53
+ ]),
54
54
  ),
55
55
  ]),
56
56
  ];
@@ -4,6 +4,13 @@ compatibility_date = "<TBD>"
4
4
  compatibility_flags = ["nodejs_compat"]
5
5
  pages_build_output_dir = "./dist"
6
6
 
7
+ # Automatically place your workloads in an optimal location to minimize latency.
8
+ # If you are running back-end logic in a Pages Function, running it closer to your back-end infrastructure
9
+ # rather than the end user may result in better performance.
10
+ # Docs: https://developers.cloudflare.com/pages/functions/smart-placement/#smart-placement
11
+ # [placement]
12
+ # mode = "smart"
13
+
7
14
  # Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
8
15
  # Note: Use secrets to store sensitive data.
9
16
  # Docs: https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
@@ -69,21 +69,21 @@ const updateTypeDefinitions = (ctx: C3Context) => {
69
69
  b.tsInterfaceBody([
70
70
  b.tsPropertySignature(
71
71
  b.identifier("env"),
72
- b.tsTypeAnnotation(b.tsTypeReference(b.identifier("Env")))
72
+ b.tsTypeAnnotation(b.tsTypeReference(b.identifier("Env"))),
73
73
  ),
74
74
  b.tsPropertySignature(
75
75
  b.identifier("cf"),
76
76
  b.tsTypeAnnotation(
77
- b.tsTypeReference(b.identifier("CfProperties"))
78
- )
77
+ b.tsTypeReference(b.identifier("CfProperties")),
78
+ ),
79
79
  ),
80
80
  b.tsPropertySignature(
81
81
  b.identifier("ctx"),
82
82
  b.tsTypeAnnotation(
83
- b.tsTypeReference(b.identifier("ExecutionContext"))
84
- )
83
+ b.tsTypeReference(b.identifier("ExecutionContext")),
84
+ ),
85
85
  ),
86
- ])
86
+ ]),
87
87
  );
88
88
 
89
89
  moduleBlock.body.unshift(platformInterface);
@@ -3,6 +3,13 @@ name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  pages_build_output_dir = ".svelte-kit/cloudflare"
5
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"
12
+
6
13
  # Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
7
14
  # Docs:
8
15
  # - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
@@ -3,6 +3,13 @@ name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
4
  pages_build_output_dir = ".svelte-kit/cloudflare"
5
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"
12
+
6
13
  # Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
7
14
  # Docs:
8
15
  # - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables