wrangler 2.8.1 → 2.9.1

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 (81) hide show
  1. package/miniflare-dist/index.mjs +1 -14
  2. package/package.json +2 -2
  3. package/src/__tests__/d1/d1.test.ts +11 -56
  4. package/src/__tests__/d1/migrate.test.ts +141 -0
  5. package/src/__tests__/dev.test.tsx +5 -4
  6. package/src/__tests__/generate.test.ts +1 -1
  7. package/src/__tests__/helpers/end-event-loop.ts +6 -0
  8. package/src/__tests__/helpers/mock-get-pages-upload-token.ts +25 -0
  9. package/src/__tests__/helpers/mock-set-timeout.ts +16 -0
  10. package/src/__tests__/index.test.ts +36 -32
  11. package/src/__tests__/init.test.ts +1 -1
  12. package/src/__tests__/kv.test.ts +55 -44
  13. package/src/__tests__/pages/deployment-list.test.ts +78 -0
  14. package/src/__tests__/pages/pages.test.ts +81 -0
  15. package/src/__tests__/pages/project-create.test.ts +63 -0
  16. package/src/__tests__/pages/project-list.test.ts +108 -0
  17. package/src/__tests__/pages/project-upload.test.ts +481 -0
  18. package/src/__tests__/pages/publish.test.ts +2221 -0
  19. package/src/__tests__/parse.test.ts +106 -0
  20. package/src/__tests__/pubsub.test.ts +15 -12
  21. package/src/__tests__/queues.test.ts +35 -28
  22. package/src/__tests__/r2.test.ts +25 -20
  23. package/src/__tests__/tsconfig.tsbuildinfo +1 -1
  24. package/src/__tests__/worker-namespace.test.ts +26 -21
  25. package/src/api/dev.ts +80 -11
  26. package/src/api/pages/publish.tsx +7 -4
  27. package/src/bundle.ts +1 -1
  28. package/src/config/config.ts +7 -0
  29. package/src/config/index.ts +24 -20
  30. package/src/d1/backups.tsx +20 -24
  31. package/src/d1/create.tsx +6 -5
  32. package/src/d1/delete.ts +7 -10
  33. package/src/d1/execute.tsx +83 -85
  34. package/src/d1/index.ts +5 -6
  35. package/src/d1/list.tsx +21 -9
  36. package/src/d1/migrations/apply.tsx +13 -9
  37. package/src/d1/migrations/create.tsx +9 -10
  38. package/src/d1/migrations/list.tsx +19 -9
  39. package/src/d1/migrations/options.ts +2 -2
  40. package/src/d1/options.ts +3 -3
  41. package/src/delete.ts +5 -8
  42. package/src/deprecated/index.ts +7 -8
  43. package/src/dev.tsx +42 -80
  44. package/src/dispatch-namespace.ts +20 -16
  45. package/src/docs/index.ts +7 -8
  46. package/src/generate/index.ts +5 -7
  47. package/src/index.ts +22 -21
  48. package/src/init.ts +5 -7
  49. package/src/kv/index.ts +15 -17
  50. package/src/miniflare-cli/tsconfig.tsbuildinfo +1 -1
  51. package/src/pages/build.ts +6 -4
  52. package/src/pages/deployment-tails.ts +7 -10
  53. package/src/pages/deployments.tsx +6 -4
  54. package/src/pages/dev.ts +15 -17
  55. package/src/pages/functions/tsconfig.tsbuildinfo +1 -1
  56. package/src/pages/functions.ts +8 -4
  57. package/src/pages/index.ts +3 -3
  58. package/src/pages/projects.tsx +7 -12
  59. package/src/pages/publish.tsx +6 -4
  60. package/src/pages/types.ts +5 -0
  61. package/src/pages/upload.tsx +6 -4
  62. package/src/parse.ts +23 -1
  63. package/src/publish/index.ts +19 -15
  64. package/src/publish/publish.ts +2 -2
  65. package/src/pubsub/pubsub-commands.ts +18 -19
  66. package/src/queues/cli/commands/consumer/add.ts +18 -24
  67. package/src/queues/cli/commands/consumer/index.ts +3 -6
  68. package/src/queues/cli/commands/consumer/remove.ts +11 -18
  69. package/src/queues/cli/commands/create.ts +8 -8
  70. package/src/queues/cli/commands/delete.ts +8 -8
  71. package/src/queues/cli/commands/index.ts +3 -4
  72. package/src/queues/cli/commands/list.ts +8 -8
  73. package/src/r2/index.ts +28 -28
  74. package/src/secret/index.ts +9 -14
  75. package/src/tail/index.ts +6 -8
  76. package/src/yargs-types.ts +18 -5
  77. package/templates/checked-fetch.js +9 -1
  78. package/templates/tsconfig.init.json +1 -1
  79. package/templates/tsconfig.tsbuildinfo +1 -1
  80. package/wrangler-dist/cli.js +2180 -1799
  81. package/src/__tests__/pages.test.ts +0 -2898
@@ -669,7 +669,7 @@ async function generateHandler({
669
669
  return new HTMLRewriter().on("body", {
670
670
  element(e) {
671
671
  e.append(
672
- `<!-- Cloudflare Pages Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "${metadata.analytics?.token}"}'><\/script><!-- Cloudflare Pages Analytics -->`,
672
+ `<!-- Cloudflare Pages Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "${metadata.analytics?.token}"}'></script><!-- Cloudflare Pages Analytics -->`,
673
673
  { html: true }
674
674
  );
675
675
  }
@@ -6349,16 +6349,3 @@ async function main() {
6349
6349
  }
6350
6350
  }
6351
6351
  await main();
6352
- /**
6353
- * @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
6354
- * CJS and ESM environments.
6355
- *
6356
- * @license
6357
- * Copyright (c) 2016, Contributors
6358
- * SPDX-License-Identifier: ISC
6359
- */
6360
- /**
6361
- * @license
6362
- * Copyright (c) 2016, Contributors
6363
- * SPDX-License-Identifier: ISC
6364
- */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wrangler",
3
- "version": "2.8.1",
3
+ "version": "2.9.1",
4
4
  "description": "Command-line interface for all things Cloudflare Workers",
5
5
  "keywords": [
6
6
  "wrangler",
@@ -105,7 +105,7 @@
105
105
  "@miniflare/durable-objects": "2.11.0",
106
106
  "blake3-wasm": "^2.1.5",
107
107
  "chokidar": "^3.5.3",
108
- "esbuild": "0.14.51",
108
+ "esbuild": "0.16.3",
109
109
  "miniflare": "2.11.0",
110
110
  "nanoid": "^3.3.3",
111
111
  "path-to-regexp": "^6.2.0",
@@ -1,18 +1,11 @@
1
- import { cwd } from "process";
1
+ import { endEventLoop } from "../helpers/end-event-loop";
2
2
  import { mockConsoleMethods } from "../helpers/mock-console";
3
- import { useMockIsTTY } from "../helpers/mock-istty";
4
3
  import { runInTempDir } from "../helpers/run-in-tmp";
5
4
  import { runWrangler } from "../helpers/run-wrangler";
6
- import writeWranglerToml from "../helpers/write-wrangler-toml";
7
-
8
- function endEventLoop() {
9
- return new Promise((resolve) => setImmediate(resolve));
10
- }
11
5
 
12
6
  describe("d1", () => {
13
7
  const std = mockConsoleMethods();
14
8
  runInTempDir();
15
- const { setIsTTY } = useMockIsTTY();
16
9
 
17
10
  it("should show help when no argument is passed", async () => {
18
11
  await runWrangler("d1");
@@ -32,10 +25,11 @@ describe("d1", () => {
32
25
  wrangler d1 migrations Interact with D1 Migrations
33
26
 
34
27
  Flags:
35
- -c, --config Path to .toml configuration file [string]
36
- -e, --env Environment to use for operations and .env files [string]
37
- -h, --help Show help [boolean]
38
- -v, --version Show version number [boolean]
28
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
29
+ -c, --config Path to .toml configuration file [string]
30
+ -e, --env Environment to use for operations and .env files [string]
31
+ -h, --help Show help [boolean]
32
+ -v, --version Show version number [boolean]
39
33
 
40
34
  --------------------
41
35
  🚧 D1 is currently in open alpha and is not recommended for production data and traffic
@@ -71,10 +65,11 @@ describe("d1", () => {
71
65
  wrangler d1 migrations Interact with D1 Migrations
72
66
 
73
67
  Flags:
74
- -c, --config Path to .toml configuration file [string]
75
- -e, --env Environment to use for operations and .env files [string]
76
- -h, --help Show help [boolean]
77
- -v, --version Show version number [boolean]
68
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
69
+ -c, --config Path to .toml configuration file [string]
70
+ -e, --env Environment to use for operations and .env files [string]
71
+ -h, --help Show help [boolean]
72
+ -v, --version Show version number [boolean]
78
73
 
79
74
  --------------------
80
75
  🚧 D1 is currently in open alpha and is not recommended for production data and traffic
@@ -84,44 +79,4 @@ describe("d1", () => {
84
79
  --------------------"
85
80
  `);
86
81
  });
87
-
88
- describe("migrate", () => {
89
- describe("apply", () => {
90
- it("should not attempt to login in local mode", async () => {
91
- setIsTTY(false);
92
- writeWranglerToml({
93
- d1_databases: [
94
- { binding: "DATABASE", database_name: "db", database_id: "xxxx" },
95
- ],
96
- });
97
- // If we get to the point where we are checking for migrations then we have not been asked to log in.
98
- await expect(
99
- runWrangler("d1 migrations apply --local DATABASE")
100
- ).rejects.toThrowError(
101
- `No migrations present at ${cwd().replaceAll("\\", "/")}/migrations.`
102
- );
103
- });
104
-
105
- it("should try to read D1 config from wrangler.toml", async () => {
106
- setIsTTY(false);
107
- writeWranglerToml();
108
- await expect(
109
- runWrangler("d1 migrations apply DATABASE")
110
- ).rejects.toThrowError(
111
- "Can't find a DB with name/binding 'DATABASE' in local config. Check info in wrangler.toml..."
112
- );
113
- });
114
-
115
- it("should not try to read wrangler.toml in local mode", async () => {
116
- setIsTTY(false);
117
- writeWranglerToml();
118
- // If we get to the point where we are checking for migrations then we have not checked wrangler.toml.
119
- await expect(
120
- runWrangler("d1 migrations apply --local DATABASE")
121
- ).rejects.toThrowError(
122
- `No migrations present at ${cwd().replaceAll("\\", "/")}/migrations.`
123
- );
124
- });
125
- });
126
- });
127
82
  });
@@ -0,0 +1,141 @@
1
+ import { cwd } from "process";
2
+ import { reinitialiseAuthTokens } from "../../user";
3
+ import { mockAccountId, mockApiToken } from "../helpers/mock-account-id";
4
+ import { useMockIsTTY } from "../helpers/mock-istty";
5
+ import { runInTempDir } from "../helpers/run-in-tmp";
6
+ import { runWrangler } from "../helpers/run-wrangler";
7
+ import writeWranglerToml from "../helpers/write-wrangler-toml";
8
+
9
+ describe("migrate", () => {
10
+ runInTempDir();
11
+ const { setIsTTY } = useMockIsTTY();
12
+
13
+ describe("create", () => {
14
+ it("should reject the --local flag for create", async () => {
15
+ setIsTTY(false);
16
+ writeWranglerToml({
17
+ d1_databases: [
18
+ { binding: "DATABASE", database_name: "db", database_id: "xxxx" },
19
+ ],
20
+ });
21
+
22
+ await expect(
23
+ runWrangler("d1 migrations create test some-message --local DATABASE")
24
+ ).rejects.toThrowError(`Unknown argument: local`);
25
+ });
26
+ });
27
+
28
+ describe("apply", () => {
29
+ it("should not attempt to login in local mode", async () => {
30
+ setIsTTY(false);
31
+ writeWranglerToml({
32
+ d1_databases: [
33
+ { binding: "DATABASE", database_name: "db", database_id: "xxxx" },
34
+ ],
35
+ });
36
+ // If we get to the point where we are checking for migrations then we have not been asked to log in.
37
+ await expect(
38
+ runWrangler("d1 migrations apply --local DATABASE")
39
+ ).rejects.toThrowError(
40
+ `No migrations present at ${cwd().replaceAll("\\", "/")}/migrations.`
41
+ );
42
+ });
43
+
44
+ it("should try to read D1 config from wrangler.toml", async () => {
45
+ setIsTTY(false);
46
+ writeWranglerToml();
47
+ await expect(
48
+ runWrangler("d1 migrations apply DATABASE")
49
+ ).rejects.toThrowError(
50
+ "Can't find a DB with name/binding 'DATABASE' in local config. Check info in wrangler.toml..."
51
+ );
52
+ });
53
+
54
+ it("should not try to read wrangler.toml in local mode", async () => {
55
+ setIsTTY(false);
56
+ writeWranglerToml();
57
+ // If we get to the point where we are checking for migrations then we have not checked wrangler.toml.
58
+ await expect(
59
+ runWrangler("d1 migrations apply --local DATABASE")
60
+ ).rejects.toThrowError(
61
+ `No migrations present at ${cwd().replaceAll("\\", "/")}/migrations.`
62
+ );
63
+ });
64
+ });
65
+
66
+ describe("list", () => {
67
+ mockAccountId();
68
+ mockApiToken({ apiToken: null });
69
+
70
+ it("should not attempt to login in local mode", async () => {
71
+ setIsTTY(false);
72
+ writeWranglerToml({
73
+ d1_databases: [
74
+ { binding: "DATABASE", database_name: "db", database_id: "xxxx" },
75
+ ],
76
+ });
77
+ // If we get to the point where we are checking for migrations then we have not been asked to log in.
78
+ await expect(
79
+ runWrangler("d1 migrations list --local DATABASE")
80
+ ).rejects.toThrowError(
81
+ `No migrations present at ${cwd().replaceAll("\\", "/")}/migrations.`
82
+ );
83
+ });
84
+
85
+ it("should use the custom migrations folder when provided", async () => {
86
+ setIsTTY(false);
87
+ writeWranglerToml({
88
+ d1_databases: [
89
+ {
90
+ binding: "DATABASE",
91
+ database_name: "db",
92
+ database_id: "xxxx",
93
+ migrations_dir: "my-migrations-go-here",
94
+ },
95
+ ],
96
+ });
97
+ await expect(
98
+ runWrangler("d1 migrations list --local DATABASE")
99
+ ).rejects.toThrowError(
100
+ `No migrations present at ${cwd().replaceAll(
101
+ "\\",
102
+ "/"
103
+ )}/my-migrations-go-here.`
104
+ );
105
+ });
106
+
107
+ it("should try to read D1 config from wrangler.toml when logged in", async () => {
108
+ // no need to clear this env var as it's implicitly cleared by mockApiToken in afterEach
109
+ process.env.CLOUDFLARE_API_TOKEN = "api-token";
110
+ reinitialiseAuthTokens();
111
+ setIsTTY(false);
112
+ writeWranglerToml();
113
+ await expect(
114
+ runWrangler("d1 migrations list DATABASE")
115
+ ).rejects.toThrowError(
116
+ "Can't find a DB with name/binding 'DATABASE' in local config. Check info in wrangler.toml..."
117
+ );
118
+ });
119
+
120
+ it("should throw if user is not authenticated and not using --local", async () => {
121
+ setIsTTY(false);
122
+
123
+ await expect(
124
+ runWrangler("d1 migrations list DATABASE")
125
+ ).rejects.toThrowError(
126
+ "In a non-interactive environment, it's necessary to set a CLOUDFLARE_API_TOKEN environment variable for wrangler to work"
127
+ );
128
+ });
129
+
130
+ it("should not try to read wrangler.toml in local mode", async () => {
131
+ setIsTTY(false);
132
+ writeWranglerToml();
133
+ // If we get to the point where we are checking for migrations then we have not checked wrangler.toml.
134
+ await expect(
135
+ runWrangler("d1 migrations list --local DATABASE")
136
+ ).rejects.toThrowError(
137
+ `No migrations present at ${cwd().replaceAll("\\", "/")}/migrations.`
138
+ );
139
+ });
140
+ });
141
+ });
@@ -1218,10 +1218,11 @@ describe("wrangler dev", () => {
1218
1218
  script The path to an entry point for your worker [string]
1219
1219
 
1220
1220
  Flags:
1221
- -c, --config Path to .toml configuration file [string]
1222
- -e, --env Environment to use for operations and .env files [string]
1223
- -h, --help Show help [boolean]
1224
- -v, --version Show version number [boolean]
1221
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
1222
+ -c, --config Path to .toml configuration file [string]
1223
+ -e, --env Environment to use for operations and .env files [string]
1224
+ -h, --help Show help [boolean]
1225
+ -v, --version Show version number [boolean]
1225
1226
 
1226
1227
  Options:
1227
1228
  --name Name of the worker [string]
@@ -131,7 +131,7 @@ describe("generate", () => {
131
131
  // was harder than i thought, leaving this for now.
132
132
  it.todo("clones a cloudflare template with full checkouts");
133
133
 
134
- it("clones a user/repo template", async () => {
134
+ it.skip("clones a user/repo template", async () => {
135
135
  await expect(
136
136
  runWrangler("generate my-worker caass/wrangler-generate-test-template")
137
137
  ).resolves.toBeUndefined();
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Forces a tick and ensures that all pending promises resolve
3
+ */
4
+ export function endEventLoop() {
5
+ return new Promise((resolve) => setImmediate(resolve));
6
+ }
@@ -0,0 +1,25 @@
1
+ import { rest } from "msw";
2
+ import { msw } from "./msw";
3
+
4
+ /**
5
+ * Mocks the `/accounts/:accountId/pages/projects/:projectName/upload-token` GET request
6
+ */
7
+ export function mockGetUploadTokenRequest(
8
+ jwt: string,
9
+ accountId: string,
10
+ projectName: string
11
+ ) {
12
+ msw.use(
13
+ rest.get(
14
+ `*/accounts/:accountId/pages/projects/${projectName}/upload-token`,
15
+ (req, res, ctx) => {
16
+ expect(req.params.accountId).toEqual(accountId);
17
+
18
+ return res(
19
+ ctx.status(200),
20
+ ctx.json({ success: true, errors: [], messages: [], result: { jwt } })
21
+ );
22
+ }
23
+ )
24
+ );
25
+ }
@@ -0,0 +1,16 @@
1
+ let setTimeoutSpy: jest.SpyInstance;
2
+
3
+ export function mockSetTimeout() {
4
+ beforeEach(() => {
5
+ setTimeoutSpy = jest
6
+ .spyOn(global, "setTimeout")
7
+ // @ts-expect-error we're using a very simple setTimeout mock here
8
+ .mockImplementation((fn, _period) => {
9
+ setImmediate(fn);
10
+ });
11
+ });
12
+
13
+ afterEach(() => {
14
+ setTimeoutSpy.mockRestore();
15
+ });
16
+ }
@@ -1,4 +1,5 @@
1
1
  import { getPackageManager } from "../package-manager";
2
+ import { endEventLoop } from "./helpers/end-event-loop";
2
3
  import { mockConsoleMethods } from "./helpers/mock-console";
3
4
  import { runInTempDir } from "./helpers/run-in-tmp";
4
5
  import { runWrangler } from "./helpers/run-wrangler";
@@ -56,10 +57,11 @@ describe("wrangler", () => {
56
57
  wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
57
58
 
58
59
  Flags:
59
- -c, --config Path to .toml configuration file [string]
60
- -e, --env Environment to use for operations and .env files [string]
61
- -h, --help Show help [boolean]
62
- -v, --version Show version number [boolean]"
60
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
61
+ -c, --config Path to .toml configuration file [string]
62
+ -e, --env Environment to use for operations and .env files [string]
63
+ -h, --help Show help [boolean]
64
+ -v, --version Show version number [boolean]"
63
65
  `);
64
66
 
65
67
  expect(std.err).toMatchInlineSnapshot(`""`);
@@ -104,10 +106,11 @@ describe("wrangler", () => {
104
106
  wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
105
107
 
106
108
  Flags:
107
- -c, --config Path to .toml configuration file [string]
108
- -e, --env Environment to use for operations and .env files [string]
109
- -h, --help Show help [boolean]
110
- -v, --version Show version number [boolean]"
109
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
110
+ -c, --config Path to .toml configuration file [string]
111
+ -e, --env Environment to use for operations and .env files [string]
112
+ -h, --help Show help [boolean]
113
+ -v, --version Show version number [boolean]"
111
114
  `);
112
115
  expect(std.err).toMatchInlineSnapshot(`
113
116
  "X [ERROR] Unknown argument: invalid-command
@@ -151,10 +154,11 @@ describe("wrangler", () => {
151
154
  wrangler secret list List all secrets for a Worker
152
155
 
153
156
  Flags:
154
- -c, --config Path to .toml configuration file [string]
155
- -e, --env Environment to use for operations and .env files [string]
156
- -h, --help Show help [boolean]
157
- -v, --version Show version number [boolean]"
157
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
158
+ -c, --config Path to .toml configuration file [string]
159
+ -e, --env Environment to use for operations and .env files [string]
160
+ -h, --help Show help [boolean]
161
+ -v, --version Show version number [boolean]"
158
162
  `);
159
163
  });
160
164
 
@@ -172,10 +176,11 @@ describe("wrangler", () => {
172
176
  wrangler kv:namespace delete Deletes a given namespace.
173
177
 
174
178
  Flags:
175
- -c, --config Path to .toml configuration file [string]
176
- -e, --env Environment to use for operations and .env files [string]
177
- -h, --help Show help [boolean]
178
- -v, --version Show version number [boolean]"
179
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
180
+ -c, --config Path to .toml configuration file [string]
181
+ -e, --env Environment to use for operations and .env files [string]
182
+ -h, --help Show help [boolean]
183
+ -v, --version Show version number [boolean]"
179
184
  `);
180
185
  });
181
186
 
@@ -194,10 +199,11 @@ describe("wrangler", () => {
194
199
  wrangler kv:key delete <key> Removes a single key value pair from the given namespace.
195
200
 
196
201
  Flags:
197
- -c, --config Path to .toml configuration file [string]
198
- -e, --env Environment to use for operations and .env files [string]
199
- -h, --help Show help [boolean]
200
- -v, --version Show version number [boolean]"
202
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
203
+ -c, --config Path to .toml configuration file [string]
204
+ -e, --env Environment to use for operations and .env files [string]
205
+ -h, --help Show help [boolean]
206
+ -v, --version Show version number [boolean]"
201
207
  `);
202
208
  });
203
209
 
@@ -214,10 +220,11 @@ describe("wrangler", () => {
214
220
  wrangler kv:bulk delete <filename> Delete multiple key-value pairs from a namespace
215
221
 
216
222
  Flags:
217
- -c, --config Path to .toml configuration file [string]
218
- -e, --env Environment to use for operations and .env files [string]
219
- -h, --help Show help [boolean]
220
- -v, --version Show version number [boolean]"
223
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
224
+ -c, --config Path to .toml configuration file [string]
225
+ -e, --env Environment to use for operations and .env files [string]
226
+ -h, --help Show help [boolean]
227
+ -v, --version Show version number [boolean]"
221
228
  `);
222
229
  });
223
230
 
@@ -234,10 +241,11 @@ describe("wrangler", () => {
234
241
  wrangler r2 bucket Manage R2 buckets
235
242
 
236
243
  Flags:
237
- -c, --config Path to .toml configuration file [string]
238
- -e, --env Environment to use for operations and .env files [string]
239
- -h, --help Show help [boolean]
240
- -v, --version Show version number [boolean]"
244
+ -j, --experimental-json-config Experimental: Support wrangler.json [boolean]
245
+ -c, --config Path to .toml configuration file [string]
246
+ -e, --env Environment to use for operations and .env files [string]
247
+ -h, --help Show help [boolean]
248
+ -v, --version Show version number [boolean]"
241
249
  `);
242
250
  });
243
251
  });
@@ -262,7 +270,3 @@ describe("wrangler", () => {
262
270
  `);
263
271
  });
264
272
  });
265
-
266
- function endEventLoop() {
267
- return new Promise((resolve) => setImmediate(resolve));
268
- }
@@ -1392,7 +1392,7 @@ describe("init", () => {
1392
1392
  contents: {
1393
1393
  config: {
1394
1394
  compilerOptions: expect.objectContaining({
1395
- types: ["@cloudflare/workers-types", "jest"],
1395
+ types: ["@cloudflare/workers-types", "vitest"],
1396
1396
  }),
1397
1397
  },
1398
1398
  error: undefined,