create-cloudflare 2.21.3 → 2.21.5

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/dist/cli.js CHANGED
@@ -3902,7 +3902,7 @@ var init_args = __esm({
3902
3902
  var version;
3903
3903
  var init_package = __esm({
3904
3904
  "package.json"() {
3905
- version = "2.21.3";
3905
+ version = "2.21.5";
3906
3906
  }
3907
3907
  });
3908
3908
 
@@ -24720,11 +24720,11 @@ var init_package2 = __esm({
24720
24720
  "create-docusaurus": "3.3.2",
24721
24721
  "create-hono": "0.7.3",
24722
24722
  "create-next-app": "14.1.0",
24723
- "create-qwik": "1.5.4",
24723
+ "create-qwik": "1.5.5",
24724
24724
  "create-react-app": "5.0.1",
24725
24725
  "create-remix": "2.9.2",
24726
- "create-solid": "0.5.5",
24727
- "create-svelte": "6.1.2",
24726
+ "create-solid": "0.5.11",
24727
+ "create-svelte": "6.3.0",
24728
24728
  "create-vue": "3.10.2",
24729
24729
  gatsby: "5.13.5",
24730
24730
  nuxi: "3.11.1"
@@ -24803,7 +24803,7 @@ var init_frameworks = __esm({
24803
24803
  var version2;
24804
24804
  var init_package3 = __esm({
24805
24805
  "../wrangler/package.json"() {
24806
- version2 = "3.57.1";
24806
+ version2 = "3.60.0";
24807
24807
  }
24808
24808
  });
24809
24809
 
@@ -24928,6 +24928,7 @@ var init_git = __esm({
24928
24928
  }
24929
24929
  const insideGitRepo = await isInsideGitRepo(ctx.project.path);
24930
24930
  if (insideGitRepo) {
24931
+ ctx.args.git = true;
24931
24932
  return;
24932
24933
  }
24933
24934
  ctx.args.git = await processArgument(ctx.args, "git", {
@@ -72138,18 +72139,18 @@ var init_c316 = __esm({
72138
72139
  }
72139
72140
  });
72140
72141
 
72141
- // templates/hello-world-durable-object/c3.ts
72142
+ // templates/common/c3.ts
72142
72143
  var c3_exports17 = {};
72143
72144
  __export(c3_exports17, {
72144
72145
  default: () => c3_default17
72145
72146
  });
72146
72147
  var c3_default17;
72147
72148
  var init_c317 = __esm({
72148
- "templates/hello-world-durable-object/c3.ts"() {
72149
+ "templates/common/c3.ts"() {
72149
72150
  c3_default17 = {
72150
72151
  configVersion: 1,
72151
- id: "hello-world-durable-object",
72152
- displayName: '"Hello World" Durable Object',
72152
+ id: "common",
72153
+ displayName: "Example router & proxy Worker",
72153
72154
  platform: "workers",
72154
72155
  copyFiles: {
72155
72156
  variants: {
@@ -72165,18 +72166,18 @@ var init_c317 = __esm({
72165
72166
  }
72166
72167
  });
72167
72168
 
72168
- // templates/common/c3.ts
72169
+ // templates/scheduled/c3.ts
72169
72170
  var c3_exports18 = {};
72170
72171
  __export(c3_exports18, {
72171
72172
  default: () => c3_default18
72172
72173
  });
72173
72174
  var c3_default18;
72174
72175
  var init_c318 = __esm({
72175
- "templates/common/c3.ts"() {
72176
+ "templates/scheduled/c3.ts"() {
72176
72177
  c3_default18 = {
72177
72178
  configVersion: 1,
72178
- id: "common",
72179
- displayName: "Example router & proxy Worker",
72179
+ id: "scheduled",
72180
+ displayName: "Scheduled Worker (Cron Trigger)",
72180
72181
  platform: "workers",
72181
72182
  copyFiles: {
72182
72183
  variants: {
@@ -72192,18 +72193,18 @@ var init_c318 = __esm({
72192
72193
  }
72193
72194
  });
72194
72195
 
72195
- // templates/scheduled/c3.ts
72196
+ // templates/queues/c3.ts
72196
72197
  var c3_exports19 = {};
72197
72198
  __export(c3_exports19, {
72198
72199
  default: () => c3_default19
72199
72200
  });
72200
72201
  var c3_default19;
72201
72202
  var init_c319 = __esm({
72202
- "templates/scheduled/c3.ts"() {
72203
+ "templates/queues/c3.ts"() {
72203
72204
  c3_default19 = {
72204
72205
  configVersion: 1,
72205
- id: "scheduled",
72206
- displayName: "Scheduled Worker (Cron Trigger)",
72206
+ id: "queues",
72207
+ displayName: "Queue consumer & producer Worker",
72207
72208
  platform: "workers",
72208
72209
  copyFiles: {
72209
72210
  variants: {
@@ -72214,23 +72215,33 @@ var init_c319 = __esm({
72214
72215
  path: "./ts"
72215
72216
  }
72216
72217
  }
72218
+ },
72219
+ bindings: {
72220
+ queues: [
72221
+ {
72222
+ boundVariable: "MY_QUEUE",
72223
+ defaultValue: "my-queue",
72224
+ producer: true,
72225
+ consumer: true
72226
+ }
72227
+ ]
72217
72228
  }
72218
72229
  };
72219
72230
  }
72220
72231
  });
72221
72232
 
72222
- // templates/queues/c3.ts
72233
+ // templates/hello-world-durable-object/c3.ts
72223
72234
  var c3_exports20 = {};
72224
72235
  __export(c3_exports20, {
72225
72236
  default: () => c3_default20
72226
72237
  });
72227
72238
  var c3_default20;
72228
72239
  var init_c320 = __esm({
72229
- "templates/queues/c3.ts"() {
72240
+ "templates/hello-world-durable-object/c3.ts"() {
72230
72241
  c3_default20 = {
72231
72242
  configVersion: 1,
72232
- id: "queues",
72233
- displayName: "Queue consumer & producer Worker",
72243
+ id: "hello-world-durable-object",
72244
+ displayName: "Co-ordination / multiplayer API (using Durable Objects)",
72234
72245
  platform: "workers",
72235
72246
  copyFiles: {
72236
72247
  variants: {
@@ -72241,16 +72252,6 @@ var init_c320 = __esm({
72241
72252
  path: "./ts"
72242
72253
  }
72243
72254
  }
72244
- },
72245
- bindings: {
72246
- queues: [
72247
- {
72248
- boundVariable: "MY_QUEUE",
72249
- defaultValue: "my-queue",
72250
- producer: true,
72251
- consumer: true
72252
- }
72253
- ]
72254
72255
  }
72255
72256
  };
72256
72257
  }
@@ -72423,12 +72424,12 @@ var init_templates = __esm({
72423
72424
  return {
72424
72425
  "hello-world": (await Promise.resolve().then(() => (init_c315(), c3_exports15))).default,
72425
72426
  "hello-world-python": (await Promise.resolve().then(() => (init_c316(), c3_exports16))).default,
72426
- "hello-world-durable-object": (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
72427
72427
  // Dummy record -- actual template config resolved in `selectFramework`
72428
72428
  "web-framework": { displayName: "Website or web app" },
72429
- common: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
72430
- scheduled: (await Promise.resolve().then(() => (init_c319(), c3_exports19))).default,
72431
- queues: (await Promise.resolve().then(() => (init_c320(), c3_exports20))).default,
72429
+ common: (await Promise.resolve().then(() => (init_c317(), c3_exports17))).default,
72430
+ scheduled: (await Promise.resolve().then(() => (init_c318(), c3_exports18))).default,
72431
+ queues: (await Promise.resolve().then(() => (init_c319(), c3_exports19))).default,
72432
+ "hello-world-durable-object": (await Promise.resolve().then(() => (init_c320(), c3_exports20))).default,
72432
72433
  openapi: (await Promise.resolve().then(() => (init_c321(), c3_exports21))).default,
72433
72434
  // Dummy record -- actual template config resolved in `processRemoteTemplate`
72434
72435
  "remote-template": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.21.3",
3
+ "version": "2.21.5",
4
4
  "description": "A CLI for creating and deploying new applications to Cloudflare.",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -29,7 +29,7 @@
29
29
  "@babel/parser": "^7.21.3",
30
30
  "@babel/types": "^7.21.4",
31
31
  "@clack/prompts": "^0.6.3",
32
- "@cloudflare/workers-types": "^4.20240512.0",
32
+ "@cloudflare/workers-types": "^4.20240605.0",
33
33
  "@iarna/toml": "^3.0.0",
34
34
  "@types/command-exists": "^1.2.0",
35
35
  "@types/cross-spawn": "^6.0.2",
@@ -64,10 +64,10 @@
64
64
  "which-pm-runs": "^1.1.0",
65
65
  "wrap-ansi": "^9.0.0",
66
66
  "yargs": "^17.7.1",
67
- "@cloudflare/eslint-config-worker": "1.1.0",
68
- "wrangler": "3.57.1",
69
67
  "@cloudflare/cli": "1.1.1",
70
- "@cloudflare/workers-tsconfig": "0.0.0"
68
+ "@cloudflare/eslint-config-worker": "1.1.0",
69
+ "@cloudflare/workers-tsconfig": "0.0.0",
70
+ "wrangler": "3.60.0"
71
71
  },
72
72
  "engines": {
73
73
  "node": ">=18.14.1"
@@ -75,6 +75,9 @@
75
75
  "workers-sdk": {
76
76
  "prerelease": true
77
77
  },
78
+ "volta": {
79
+ "extends": "../../package.json"
80
+ },
78
81
  "scripts": {
79
82
  "build": "node -r esbuild-register scripts/build.ts",
80
83
  "dev:codemod": "node -r esbuild-register scripts/codemodDev.ts",
@@ -82,6 +85,10 @@
82
85
  "check:type": "tsc",
83
86
  "lint": "eslint",
84
87
  "test:e2e": "vitest run --config ./vitest-e2e.config.ts",
88
+ "test:e2e:npm": "pnpm run build && cross-env TEST_PM=npm vitest run --config ./vitest-e2e.config.ts",
89
+ "test:e2e:pnpm": "pnpm run build && cross-env TEST_PM=pnpm vitest run --config ./vitest-e2e.config.ts",
90
+ "test:e2e:bun": "pnpm run build && cross-env TEST_PM=bun vitest run --config ./vitest-e2e.config.ts",
91
+ "test:e2e:yarn": "pnpm run build && cross-env TEST_PM=yarn vitest run --config ./vitest-e2e.config.ts",
85
92
  "test:unit": "vitest run --config ./vitest.config.ts",
86
93
  "test:unit:watch": "vitest --config ./vitest.config.ts",
87
94
  "watch": "node -r esbuild-register scripts/build.ts --watch",
@@ -1,11 +1,11 @@
1
- import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config";
1
+ import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config';
2
2
 
3
3
  export default defineWorkersConfig({
4
- test: {
5
- poolOptions: {
6
- workers: {
7
- wrangler: { configPath: "./wrangler.toml" },
8
- },
9
- },
10
- },
4
+ test: {
5
+ poolOptions: {
6
+ workers: {
7
+ wrangler: { configPath: './wrangler.toml' },
8
+ },
9
+ },
10
+ },
11
11
  });
@@ -1,11 +1,8 @@
1
1
  {
2
- "extends": "../tsconfig.json",
3
- "compilerOptions": {
4
- "types": [
5
- "@cloudflare/workers-types/experimental",
6
- "@cloudflare/vitest-pool-workers"
7
- ]
8
- },
9
- "include": ["./**/*.ts", "../src/env.d.ts"],
10
- "exclude": []
2
+ "extends": "../tsconfig.json",
3
+ "compilerOptions": {
4
+ "types": ["@cloudflare/workers-types/experimental", "@cloudflare/vitest-pool-workers"]
5
+ },
6
+ "include": ["./**/*.ts", "../src/env.d.ts"],
7
+ "exclude": []
11
8
  }
@@ -1,11 +1,11 @@
1
- import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config";
1
+ import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config';
2
2
 
3
3
  export default defineWorkersConfig({
4
- test: {
5
- poolOptions: {
6
- workers: {
7
- wrangler: { configPath: "./wrangler.toml" },
8
- },
9
- },
10
- },
4
+ test: {
5
+ poolOptions: {
6
+ workers: {
7
+ wrangler: { configPath: './wrangler.toml' },
8
+ },
9
+ },
10
+ },
11
11
  });
@@ -1,7 +1,7 @@
1
1
  export default {
2
2
  configVersion: 1,
3
3
  id: "hello-world-durable-object",
4
- displayName: '"Hello World" Durable Object',
4
+ displayName: "Co-ordination / multiplayer API (using Durable Objects)",
5
5
  platform: "workers",
6
6
  copyFiles: {
7
7
  variants: {
@@ -1,6 +1,6 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
- main = "src/index.ts"
3
+ main = "src/index.js"
4
4
  compatibility_date = "<TBD>"
5
5
 
6
6
  # Automatically place your workloads in an optimal location to minimize latency.
@@ -48,13 +48,13 @@ compatibility_date = "<TBD>"
48
48
 
49
49
  # Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
50
50
  # Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
51
- # Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
51
+ # Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
52
52
  [[durable_objects.bindings]]
53
53
  name = "MY_DURABLE_OBJECT"
54
54
  class_name = "MyDurableObject"
55
55
 
56
56
  # Durable Object migrations.
57
- # Docs: https://developers.cloudflare.com/workers/learning/using-durable-objects#configure-durable-object-classes-with-migrations
57
+ # Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
58
58
  [[migrations]]
59
59
  tag = "v1"
60
60
  new_classes = ["MyDurableObject"]