create-cloudflare 2.29.1 → 2.29.2

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
@@ -74090,7 +74090,7 @@ var Yargs = YargsFactory(esm_default);
74090
74090
  var yargs_default = Yargs;
74091
74091
 
74092
74092
  // package.json
74093
- var version = "2.29.1";
74093
+ var version = "2.29.2";
74094
74094
 
74095
74095
  // src/metrics.ts
74096
74096
  var import_node_async_hooks = require("node:async_hooks");
@@ -74838,7 +74838,7 @@ var usesEslint = (ctx) => {
74838
74838
  var import_node_path3 = require("node:path");
74839
74839
 
74840
74840
  // ../wrangler/package.json
74841
- var version2 = "3.78.12";
74841
+ var version2 = "3.80.0";
74842
74842
 
74843
74843
  // src/git.ts
74844
74844
  var offerGit = async (ctx) => {
@@ -75029,7 +75029,7 @@ var package_default = {
75029
75029
  ],
75030
75030
  dependencies: {
75031
75031
  "create-astro": "4.8.0",
75032
- "create-analog": "1.3.1",
75032
+ "create-analog": "1.8.1",
75033
75033
  "@angular/create": "18.2.0",
75034
75034
  "create-docusaurus": "3.5.2",
75035
75035
  "create-hono": "0.12.0",
@@ -76362,10 +76362,11 @@ var config16 = {
76362
76362
  generate: generate15,
76363
76363
  transformPackageJson: async () => ({
76364
76364
  scripts: {
76365
+ preview: `${npm11} run build && wrangler pages dev ./build`,
76365
76366
  deploy: `${npm11} run build && wrangler pages deploy ./build`
76366
76367
  }
76367
76368
  }),
76368
- devScript: "start",
76369
+ devScript: "preview",
76369
76370
  deployScript: "deploy"
76370
76371
  };
76371
76372
  var c3_default19 = config16;
@@ -77647,7 +77648,7 @@ var createContext = async (args, prevArgs) => {
77647
77648
  description: "Select from a range of starter applications using various Cloudflare products"
77648
77649
  },
77649
77650
  {
77650
- label: "Template from a Github repo",
77651
+ label: "Template from a GitHub repo",
77651
77652
  value: "remote-template",
77652
77653
  description: "Start from an existing GitHub repo link"
77653
77654
  },
@@ -78003,7 +78004,7 @@ var cliDefinition = {
78003
78004
  { name: "demo", description: "Application Starter" },
78004
78005
  {
78005
78006
  name: "remote-template",
78006
- description: "Template from a Github repo"
78007
+ description: "Template from a GitHub repo"
78007
78008
  }
78008
78009
  ];
78009
78010
  }
@@ -80030,6 +80031,7 @@ var retry = async (config26, fn) => {
80030
80031
  if (config26.exitCondition?.(e)) {
80031
80032
  break;
80032
80033
  }
80034
+ await sleep(config26.sleepMs ?? 1e3);
80033
80035
  }
80034
80036
  }
80035
80037
  throw error2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.29.1",
3
+ "version": "2.29.2",
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.78.12"
72
+ "wrangler": "3.80.0"
73
73
  },
74
74
  "engines": {
75
75
  "node": ">=18.14.1"
@@ -18,10 +18,11 @@ const config: TemplateConfig = {
18
18
  generate,
19
19
  transformPackageJson: async () => ({
20
20
  scripts: {
21
+ preview: `${npm} run build && wrangler pages dev ./build`,
21
22
  deploy: `${npm} run build && wrangler pages deploy ./build`,
22
23
  },
23
24
  }),
24
- devScript: "start",
25
+ devScript: "preview",
25
26
  deployScript: "deploy",
26
27
  };
27
28
  export default config;
@@ -1,6 +1,7 @@
1
1
  #:schema node_modules/wrangler/config-schema.json
2
2
  name = "<TBD>"
3
3
  compatibility_date = "<TBD>"
4
+ compatibility_flags = ["nodejs_compat"]
4
5
  pages_build_output_dir = "./dist"
5
6
 
6
7
  # Automatically place your workloads in an optimal location to minimize latency.
@@ -1,4 +1,4 @@
1
- import { env, ctx, createExecutionContext, waitOnExecutionContext, SELF } from 'cloudflare:test';
1
+ import { env, createExecutionContext, waitOnExecutionContext, SELF } from 'cloudflare:test';
2
2
  import { describe, it, expect } from 'vitest';
3
3
  import worker from '../src';
4
4
 
@@ -16,7 +16,7 @@ describe('Hello World user worker', () => {
16
16
 
17
17
  it('responds with "Hello, World!" (integration style)', async () => {
18
18
  const request = new Request('http://example.com/message');
19
- const response = await SELF.fetch(request, env, ctx);
19
+ const response = await SELF.fetch(request);
20
20
  expect(await response.text()).toMatchInlineSnapshot(`"Hello, World!"`);
21
21
  });
22
22
  });
@@ -34,7 +34,7 @@ describe('Hello World user worker', () => {
34
34
 
35
35
  it('responds with a random UUID (integration style)', async () => {
36
36
  const request = new Request('http://example.com/random');
37
- const response = await SELF.fetch(request, env, ctx);
37
+ const response = await SELF.fetch(request);
38
38
  expect(await response.text()).toMatch(/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/);
39
39
  });
40
40
  });
@@ -1,11 +1,11 @@
1
- import { env, ctx, createExecutionContext, waitOnExecutionContext, SELF } from 'cloudflare:test';
1
+ import { env, createExecutionContext, waitOnExecutionContext, SELF } from 'cloudflare:test';
2
2
  import { describe, it, expect } from 'vitest';
3
3
  import worker from '../src';
4
4
 
5
5
  describe('Hello World user worker', () => {
6
6
  describe('request for /message', () => {
7
7
  it('/ responds with "Hello, World!" (unit style)', async () => {
8
- const request = new Request('http://example.com/message');
8
+ const request = new Request<unknown, IncomingRequestCfProperties>('http://example.com/message');
9
9
  // Create an empty context to pass to `worker.fetch()`.
10
10
  const ctx = createExecutionContext();
11
11
  const response = await worker.fetch(request, env, ctx);
@@ -16,14 +16,14 @@ describe('Hello World user worker', () => {
16
16
 
17
17
  it('responds with "Hello, World!" (integration style)', async () => {
18
18
  const request = new Request('http://example.com/message');
19
- const response = await SELF.fetch(request, env, ctx);
19
+ const response = await SELF.fetch(request);
20
20
  expect(await response.text()).toMatchInlineSnapshot(`"Hello, World!"`);
21
21
  });
22
22
  });
23
23
 
24
24
  describe('request for /random', () => {
25
25
  it('/ responds with a random UUID (unit style)', async () => {
26
- const request = new Request('http://example.com/random');
26
+ const request = new Request<unknown, IncomingRequestCfProperties>('http://example.com/random');
27
27
  // Create an empty context to pass to `worker.fetch()`.
28
28
  const ctx = createExecutionContext();
29
29
  const response = await worker.fetch(request, env, ctx);
@@ -34,7 +34,7 @@ describe('Hello World user worker', () => {
34
34
 
35
35
  it('responds with a random UUID (integration style)', async () => {
36
36
  const request = new Request('http://example.com/random');
37
- const response = await SELF.fetch(request, env, ctx);
37
+ const response = await SELF.fetch(request);
38
38
  expect(await response.text()).toMatch(/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/);
39
39
  });
40
40
  });