create-cloudflare 2.33.3 → 2.34.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.33.3",
3
+ "version": "2.34.0",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -69,7 +69,7 @@
69
69
  "@cloudflare/cli": "1.1.1",
70
70
  "@cloudflare/eslint-config-worker": "1.1.0",
71
71
  "@cloudflare/workers-tsconfig": "0.0.0",
72
- "wrangler": "3.93.0"
72
+ "wrangler": "3.95.0"
73
73
  },
74
74
  "engines": {
75
75
  "node": ">=18.14.1"
@@ -131,10 +131,7 @@ const config: TemplateConfig = {
131
131
  displayName: "SvelteKit",
132
132
  platform: "pages",
133
133
  copyFiles: {
134
- variants: {
135
- js: { path: "./js" },
136
- ts: { path: "./ts" },
137
- },
134
+ path: "./templates",
138
135
  },
139
136
  generate,
140
137
  configure,
@@ -101,10 +101,7 @@ const config: TemplateConfig = {
101
101
  displayName: "SvelteKit",
102
102
  platform: "workers",
103
103
  copyFiles: {
104
- variants: {
105
- js: { path: "./js" },
106
- ts: { path: "./ts" },
107
- },
104
+ path: "./templates",
108
105
  },
109
106
  path: "templates-experimental/svelte",
110
107
  generate,
@@ -0,0 +1,33 @@
1
+ import { runFrameworkGenerator } from "frameworks/index";
2
+ import { detectPackageManager } from "helpers/packageManagers";
3
+ import type { TemplateConfig } from "../../src/templates";
4
+ import type { C3Context } from "types";
5
+
6
+ const { npm } = detectPackageManager();
7
+
8
+ const generate = async (ctx: C3Context) => {
9
+ await runFrameworkGenerator(ctx, [ctx.project.name]);
10
+ };
11
+
12
+ const config: TemplateConfig = {
13
+ configVersion: 1,
14
+ id: "vue",
15
+ frameworkCli: "create-vue",
16
+ platform: "workers",
17
+ displayName: "Vue",
18
+ copyFiles: {
19
+ path: "./templates",
20
+ },
21
+ path: "templates-experimental/vue",
22
+ generate,
23
+ transformPackageJson: async () => ({
24
+ scripts: {
25
+ deploy: `${npm} run build && wrangler deploy`,
26
+ preview: `${npm} run build && wrangler dev`,
27
+ },
28
+ }),
29
+ devScript: "dev",
30
+ deployScript: "deploy",
31
+ previewScript: "preview",
32
+ };
33
+ export default config;
@@ -1,8 +1,7 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
- main = ".svelte-kit/cloudflare/_worker.js"
5
- assets = { directory = ".svelte-kit/cloudflare", binding = "ASSETS" }
4
+ assets = { directory = "./dist" }
6
5
 
7
6
  # Workers Logs
8
7
  # Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
@@ -1,85 +0,0 @@
1
- #:schema node_modules/wrangler/config-schema.json
2
- name = "<TBD>"
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"
12
-
13
- # Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
14
- # Docs:
15
- # - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
16
- # Note: Use secrets to store sensitive data.
17
- # - https://developers.cloudflare.com/pages/functions/bindings/#secrets
18
- # [vars]
19
- # MY_VARIABLE = "production_value"
20
-
21
- # Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
22
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#workers-ai
23
- # [ai]
24
- # binding = "AI"
25
-
26
- # Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
27
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#d1-databases
28
- # [[d1_databases]]
29
- # binding = "MY_DB"
30
- # database_name = "my-database"
31
- # database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
32
-
33
- # Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
34
- # Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
35
- # Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
36
- # [[durable_objects.bindings]]
37
- # name = "MY_DURABLE_OBJECT"
38
- # class_name = "MyDurableObject"
39
- # script_name = 'my-durable-object'
40
-
41
- # Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
42
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#kv-namespaces
43
- # [[kv_namespaces]]
44
- # binding = "MY_KV_NAMESPACE"
45
- # id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
46
-
47
- # Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
48
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#queue-producers
49
- # [[queues.producers]]
50
- # binding = "MY_QUEUE"
51
- # queue = "my-queue"
52
-
53
- # Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
54
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#r2-buckets
55
- # [[r2_buckets]]
56
- # binding = "MY_BUCKET"
57
- # bucket_name = "my-bucket"
58
-
59
- # Bind another Worker service. Use this binding to call another Worker without network overhead.
60
- # Docs: https://developers.cloudflare.com/pages/functions/bindings/#service-bindings
61
- # [[services]]
62
- # binding = "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>"
@@ -1,4 +0,0 @@
1
- _worker.js
2
- _routes.json
3
- _headers
4
- _redirects