wrangler 2.6.2 → 2.7.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 (128) hide show
  1. package/bin/wrangler.js +9 -1
  2. package/miniflare-dist/index.mjs +1 -1
  3. package/package.json +12 -10
  4. package/src/__tests__/api-dev.test.ts +65 -36
  5. package/src/__tests__/api-devregistry.test.js +14 -6
  6. package/src/__tests__/configuration.test.ts +2 -31
  7. package/src/__tests__/{d1.test.ts → d1/d1.test.ts} +48 -5
  8. package/src/__tests__/d1/splitter.test.ts +255 -0
  9. package/src/__tests__/delete.test.ts +5 -2
  10. package/src/__tests__/deployments.test.ts +20 -6
  11. package/src/__tests__/dev.test.tsx +52 -19
  12. package/src/__tests__/generate.test.ts +7 -4
  13. package/src/__tests__/helpers/mock-auth-domain.ts +20 -0
  14. package/src/__tests__/helpers/mock-cfetch.ts +2 -57
  15. package/src/__tests__/helpers/mock-dialogs.ts +70 -86
  16. package/src/__tests__/helpers/mock-oauth-flow.ts +64 -49
  17. package/src/__tests__/helpers/mock-process.ts +8 -13
  18. package/src/__tests__/helpers/msw/blob-worker.cjs +19 -0
  19. package/src/__tests__/helpers/msw/read-file-sync.js +61 -0
  20. package/src/__tests__/index.test.ts +46 -44
  21. package/src/__tests__/init.test.ts +761 -537
  22. package/src/__tests__/jest.setup.ts +20 -24
  23. package/src/__tests__/kv.test.ts +286 -173
  24. package/src/__tests__/logout.test.ts +1 -1
  25. package/src/__tests__/metrics.test.ts +5 -7
  26. package/src/__tests__/middleware.scheduled.test.ts +40 -30
  27. package/src/__tests__/middleware.test.ts +144 -120
  28. package/src/__tests__/pages.test.ts +1617 -1161
  29. package/src/__tests__/publish.test.ts +174 -125
  30. package/src/__tests__/r2.test.ts +2 -2
  31. package/src/__tests__/secret.test.ts +183 -126
  32. package/src/__tests__/tail.test.ts +6 -0
  33. package/src/__tests__/tsconfig-sanity.ts +12 -0
  34. package/src/__tests__/tsconfig.json +8 -0
  35. package/src/__tests__/tsconfig.tsbuildinfo +1 -0
  36. package/src/__tests__/whoami.test.tsx +1 -96
  37. package/src/api/dev.ts +90 -41
  38. package/src/api/index.ts +1 -1
  39. package/src/{bundle-reporter.tsx → bundle-reporter.ts} +0 -0
  40. package/src/cfetch/index.ts +0 -2
  41. package/src/cfetch/internal.ts +6 -15
  42. package/src/cli.ts +2 -2
  43. package/src/config/validation.ts +1 -2
  44. package/src/create-worker-upload-form.ts +2 -2
  45. package/src/d1/{delete.tsx → delete.ts} +0 -0
  46. package/src/d1/execute.tsx +8 -37
  47. package/src/d1/migrations/apply.tsx +29 -19
  48. package/src/d1/migrations/{index.tsx → index.ts} +0 -0
  49. package/src/d1/splitter.ts +161 -0
  50. package/src/d1/{types.tsx → types.ts} +0 -0
  51. package/src/delete.ts +3 -8
  52. package/src/deployments.ts +6 -0
  53. package/src/deprecated/index.ts +2 -295
  54. package/src/dev/dev.tsx +2 -2
  55. package/src/dev/{get-local-persistence-path.tsx → get-local-persistence-path.ts} +0 -0
  56. package/src/dev/local.tsx +16 -4
  57. package/src/dev/remote.tsx +28 -1
  58. package/src/dev/start-server.ts +19 -11
  59. package/src/dev/use-esbuild.ts +1 -1
  60. package/src/{dev-registry.tsx → dev-registry.ts} +0 -0
  61. package/src/dev.tsx +21 -2
  62. package/src/dialogs.ts +136 -0
  63. package/src/dispatch-namespace.ts +1 -1
  64. package/src/docs/index.ts +3 -0
  65. package/src/environment-variables/factory.ts +88 -0
  66. package/src/environment-variables/misc-variables.ts +30 -0
  67. package/src/generate/index.ts +300 -0
  68. package/src/{index.tsx → index.ts} +10 -13
  69. package/src/init.ts +92 -52
  70. package/src/jest.d.ts +4 -0
  71. package/src/logger.ts +15 -3
  72. package/src/metrics/metrics-config.ts +1 -1
  73. package/src/miniflare-cli/assets.ts +4 -0
  74. package/src/miniflare-cli/index.ts +1 -5
  75. package/src/miniflare-cli/tsconfig.json +9 -0
  76. package/src/miniflare-cli/tsconfig.tsbuildinfo +1 -0
  77. package/src/miniflare-cli/types.ts +11 -0
  78. package/src/pages/{build.tsx → build.ts} +0 -0
  79. package/src/pages/{deployment-tails.tsx → deployment-tails.ts} +0 -0
  80. package/src/pages/{dev.tsx → dev.ts} +53 -55
  81. package/src/pages/functions/buildWorker.ts +1 -1
  82. package/src/pages/functions/tsconfig.json +8 -0
  83. package/src/pages/functions/tsconfig.tsbuildinfo +1 -0
  84. package/src/pages/{functions.tsx → functions.ts} +0 -0
  85. package/src/pages/{hash.tsx → hash.ts} +0 -0
  86. package/src/pages/{index.tsx → index.ts} +0 -0
  87. package/src/pages/projects.tsx +3 -5
  88. package/src/pages/publish.tsx +5 -4
  89. package/src/pages/upload.tsx +1 -1
  90. package/src/publish/publish.ts +9 -7
  91. package/src/pubsub/{pubsub-commands.tsx → pubsub-commands.ts} +1 -1
  92. package/src/secret/index.ts +1 -1
  93. package/src/{sites.tsx → sites.ts} +0 -0
  94. package/src/tail/index.ts +2 -3
  95. package/src/tsconfig-sanity.ts +16 -0
  96. package/src/user/access.ts +0 -1
  97. package/src/user/auth-variables.ts +113 -0
  98. package/src/user/choose-account.tsx +1 -31
  99. package/src/user/index.ts +0 -1
  100. package/src/user/{user.tsx → user.ts} +107 -73
  101. package/src/{whoami.tsx → whoami.ts} +37 -71
  102. package/templates/__tests__/tsconfig-sanity.ts +12 -0
  103. package/templates/__tests__/tsconfig.json +8 -0
  104. package/templates/__tests__/tsconfig.tsbuildinfo +1 -0
  105. package/templates/d1-beta-facade.js +36 -0
  106. package/templates/facade.d.ts +14 -0
  107. package/templates/first-party-worker-module-facade.ts +4 -3
  108. package/templates/format-dev-errors.ts +7 -6
  109. package/templates/init-tests/test-jest-new-worker.js +3 -5
  110. package/templates/init-tests/test-vitest-new-worker.js +3 -5
  111. package/templates/init-tests/test-vitest-new-worker.ts +25 -0
  112. package/templates/middleware/loader-modules.ts +0 -2
  113. package/templates/middleware/loader-sw.ts +6 -0
  114. package/templates/pages-dev-pipeline.ts +4 -1
  115. package/templates/pages-shim.ts +4 -1
  116. package/templates/pages-template-plugin.ts +12 -7
  117. package/templates/serve-static-assets.ts +16 -14
  118. package/templates/tsconfig-sanity.ts +11 -0
  119. package/templates/tsconfig.init.json +106 -0
  120. package/templates/tsconfig.json +5 -103
  121. package/templates/tsconfig.tsbuildinfo +1 -0
  122. package/wrangler-dist/cli.d.ts +58 -60
  123. package/wrangler-dist/cli.js +34447 -55514
  124. package/wrangler-dist/wasm-sync.wasm +0 -0
  125. package/src/__tests__/dialogs.test.tsx +0 -40
  126. package/src/dialogs.tsx +0 -168
  127. package/src/environment-variables.ts +0 -50
  128. package/src/user/env-vars.ts +0 -46
@@ -1,11 +1,7 @@
1
1
  import fetchMock from "jest-fetch-mock";
2
2
  import { Request } from "undici";
3
3
  import openInBrowser from "../../open-in-browser";
4
- import {
5
- createFetchResult,
6
- setMockRawResponse,
7
- setMockResponse,
8
- } from "./mock-cfetch";
4
+ import { setMockResponse } from "./mock-cfetch";
9
5
  import { mockHttpServer } from "./mock-http-server";
10
6
 
11
7
  export function mockGetMemberships(
@@ -16,12 +12,6 @@ export function mockGetMemberships(
16
12
  });
17
13
  }
18
14
 
19
- export function mockGetMembershipsFail() {
20
- setMockRawResponse("/memberships", () => {
21
- return createFetchResult([], false);
22
- });
23
- }
24
-
25
15
  // the response to send when wrangler wants an oauth grant
26
16
  let oauthGrantResponse: GrantResponseOptions | "timeout" = {};
27
17
 
@@ -92,10 +82,12 @@ export const mockOAuthFlow = () => {
92
82
  }
93
83
  };
94
84
 
95
- const mockRevokeAuthorization = () => {
85
+ const mockRevokeAuthorization = ({
86
+ domain = "dash.cloudflare.com",
87
+ }: { domain?: string } = {}) => {
96
88
  const outcome = {
97
89
  actual: new Request("https://example.org"),
98
- expected: new Request("https://dash.cloudflare.com/oauth2/revoke", {
90
+ expected: new Request(`https://${domain}/oauth2/revoke`, {
99
91
  method: "POST",
100
92
  }),
101
93
  };
@@ -111,12 +103,14 @@ export const mockOAuthFlow = () => {
111
103
 
112
104
  const mockGrantAccessToken = ({
113
105
  respondWith,
106
+ domain = "dash.cloudflare.com",
114
107
  }: {
115
108
  respondWith: MockTokenResponse;
109
+ domain?: string;
116
110
  }) => {
117
111
  const outcome = {
118
112
  actual: new Request("https://example.org"),
119
- expected: new Request("https://dash.cloudflare.com/oauth2/token", {
113
+ expected: new Request(`https://${domain}/oauth2/token`, {
120
114
  method: "POST",
121
115
  }),
122
116
  };
@@ -132,49 +126,70 @@ export const mockOAuthFlow = () => {
132
126
 
133
127
  const mockExchangeRefreshTokenForAccessToken = ({
134
128
  respondWith,
129
+ domain = "dash.cloudlfare.com",
135
130
  }: {
136
131
  respondWith: "refreshSuccess" | "refreshError" | "badResponse";
132
+ domain?: string;
137
133
  }) => {
138
- fetchMock.mockOnceIf(
139
- "https://dash.cloudflare.com/oauth2/token",
140
- async () => {
141
- switch (respondWith) {
142
- case "refreshSuccess":
143
- return {
144
- status: 200,
145
- body: JSON.stringify({
146
- access_token: "access_token_success_mock",
147
- expires_in: 1701,
148
- refresh_token: "refresh_token_sucess_mock",
149
- scope: "scope_success_mock",
150
- token_type: "bearer",
151
- }),
152
- };
153
- case "refreshError":
154
- return {
155
- status: 400,
156
- body: JSON.stringify({
157
- error: "invalid_request",
158
- error_description: "error_description_mock",
159
- error_hint: "error_hint_mock",
160
- error_verbose: "error_verbose_mock",
161
- status_code: 400,
162
- }),
163
- };
164
- case "badResponse":
165
- return {
166
- status: 400,
167
- body: `<html> <body> This shouldn't be sent, but should be handled </body> </html>`,
168
- };
134
+ fetchMock.mockOnceIf(`https://${domain}/oauth2/token`, async () => {
135
+ switch (respondWith) {
136
+ case "refreshSuccess":
137
+ return {
138
+ status: 200,
139
+ body: JSON.stringify({
140
+ access_token: "access_token_success_mock",
141
+ expires_in: 1701,
142
+ refresh_token: "refresh_token_success_mock",
143
+ scope: "scope_success_mock",
144
+ token_type: "bearer",
145
+ }),
146
+ };
147
+ case "refreshError":
148
+ return {
149
+ status: 400,
150
+ body: JSON.stringify({
151
+ error: "invalid_request",
152
+ error_description: "error_description_mock",
153
+ error_hint: "error_hint_mock",
154
+ error_verbose: "error_verbose_mock",
155
+ status_code: 400,
156
+ }),
157
+ };
158
+ case "badResponse":
159
+ return {
160
+ status: 400,
161
+ body: `<html> <body> This shouldn't be sent, but should be handled </body> </html>`,
162
+ };
163
+
164
+ default:
165
+ return "Not a respondWith option for `mockExchangeRefreshTokenForAccessToken`";
166
+ }
167
+ });
168
+ };
169
169
 
170
- default:
171
- return "Not a respondWith option for `mockExchangeRefreshTokenForAccessToken`";
172
- }
170
+ const mockDomainUsesAccess = ({
171
+ usesAccess,
172
+ domain = "dash.cloudflare.com",
173
+ }: {
174
+ usesAccess: boolean;
175
+ domain?: string;
176
+ }) => {
177
+ // If the domain relies upon Cloudflare Access, then a request to the domain
178
+ // will result in a redirect to the `cloudflareaccess.com` domain.
179
+ fetchMock.mockOnceIf(`https://${domain}/`, async () => {
180
+ if (usesAccess) {
181
+ return {
182
+ status: 302,
183
+ headers: { location: "cloudflareaccess.com" },
184
+ };
185
+ } else {
186
+ return { status: 200 };
173
187
  }
174
- );
188
+ });
175
189
  };
176
190
 
177
191
  return {
192
+ mockDomainUsesAccess,
178
193
  mockGrantAccessToken,
179
194
  mockGrantAuthorization,
180
195
  mockOAuthServerCallback,
@@ -5,22 +5,17 @@
5
5
 
6
6
  let writeSpy: jest.SpyInstance;
7
7
 
8
- function captureLastWriteCall(spy: jest.SpyInstance): Buffer {
8
+ function captureLastWriteCall(spy: jest.SpyInstance): Buffer | undefined {
9
9
  const calls = spy.mock.calls;
10
- if (calls.length > 1) {
11
- throw new Error(
12
- "Unexpected calls to `stdout.write()`: " + JSON.stringify(calls)
13
- );
14
- }
15
- const buffer = calls[0]?.[0] ?? Buffer.alloc(0);
10
+
11
+ // Loop through and find the buffer in calls
12
+ // (we don't know the index of the buffer in the calls array)
13
+ const buffer = calls
14
+ .map((call) => call[0])
15
+ .find((call) => call instanceof Buffer);
16
+
16
17
  if (buffer instanceof Buffer) {
17
18
  return buffer;
18
- } else {
19
- throw new Error(
20
- `Unexpected non-Buffer passed to \`stdout.write()\`: "${JSON.stringify(
21
- buffer
22
- )}"`
23
- );
24
19
  }
25
20
  }
26
21
 
@@ -0,0 +1,19 @@
1
+ /*! Read blob sync in NodeJS. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource>
2
+ * Special Thanks to Jimmy Wärting helping in https://github.com/nodejs/undici/issues/1830
3
+ */
4
+
5
+ const { workerData } = require("worker_threads");
6
+
7
+ const { signal, port, blob } = workerData;
8
+
9
+ blob.arrayBuffer().then((ab) => {
10
+ // Post the result back to the main thread before unlocking 'signal'
11
+ port.postMessage(ab, [ab]);
12
+ port.close();
13
+
14
+ // Change the value of signal[0] to 1
15
+ Atomics.store(signal, 0, 1);
16
+
17
+ // This will unlock the main thread when we notify it
18
+ Atomics.notify(signal, 0);
19
+ });
@@ -0,0 +1,61 @@
1
+ /*! Read blob sync in NodeJS. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource>
2
+ * Special Thanks to Jimmy Wärting helping in https://github.com/nodejs/undici/issues/1830
3
+ */
4
+ const { join } = require("path");
5
+ const {
6
+ Worker,
7
+ receiveMessageOnPort,
8
+ MessageChannel,
9
+ } = require("worker_threads");
10
+
11
+ /**
12
+ * blob-worker & read-file-sync are part of a polyfill to synchronously read a blob in NodeJS
13
+ * this is needed for MSW FormData patching to work and support Blobs, serializing them to a string before recreating the FormData.
14
+ */
15
+ function read(blob) {
16
+ const subChannel = new MessageChannel();
17
+ const signal = new Int32Array(new SharedArrayBuffer(4));
18
+ signal[0] = 0;
19
+
20
+ const path = join(__dirname, "blob-worker.cjs");
21
+
22
+ const worker = new Worker(path, {
23
+ transferList: [subChannel.port1],
24
+ workerData: {
25
+ signal,
26
+ port: subChannel.port1,
27
+ blob,
28
+ },
29
+ });
30
+
31
+ // Sleep until the other thread sets signal[0] to 1
32
+ Atomics.wait(signal, 0, 0);
33
+
34
+ // Close the worker thread
35
+ worker.terminate();
36
+
37
+ return receiveMessageOnPort(subChannel.port2)?.message;
38
+ }
39
+
40
+ class FileReaderSync {
41
+ readAsArrayBuffer(blob) {
42
+ this.result = read(blob);
43
+ }
44
+
45
+ readAsDataURL(blob) {
46
+ const ab = read(blob);
47
+ this.result = `data:${blob.type};base64,${Buffer.from(ab).toString(
48
+ "base64"
49
+ )}`;
50
+ }
51
+
52
+ readAsText(blob) {
53
+ const ab = read(blob);
54
+ this.result = new TextDecoder().decode(ab);
55
+ }
56
+
57
+ // Should not be used, use readAsArrayBuffer instead
58
+ // readAsBinaryString(blob) { ... }
59
+ }
60
+
61
+ exports.FileReaderSync = FileReaderSync;
@@ -31,28 +31,29 @@ describe("wrangler", () => {
31
31
  "wrangler
32
32
 
33
33
  Commands:
34
- wrangler docs [command] 📚 Open wrangler's docs in your browser
35
- wrangler init [name] 📥 Create a wrangler.toml configuration file
36
- wrangler dev [script] 👂 Start a local server for developing your worker
37
- wrangler publish [script] 🆙 Publish your Worker to Cloudflare.
38
- wrangler delete [script] 🗑 Delete your Worker from Cloudflare.
39
- wrangler tail [worker] 🦚 Starts a log tailing session for a published Worker.
40
- wrangler secret 🤫 Generate a secret that can be referenced in a Worker
41
- wrangler secret:bulk <json> 🗄️ Bulk upload secrets for a Worker
42
- wrangler kv:namespace 🗂️ Interact with your Workers KV Namespaces
43
- wrangler kv:key 🔑 Individually manage Workers KV key-value pairs
44
- wrangler kv:bulk 💪 Interact with multiple Workers KV key-value pairs at once
45
- wrangler pages ⚡️ Configure Cloudflare Pages
46
- wrangler queues 🇶 Configure Workers Queues
47
- wrangler r2 📦 Interact with an R2 store
48
- wrangler dispatch-namespace 📦 Interact with a dispatch namespace
49
- wrangler d1 🗄 Interact with a D1 database
50
- wrangler pubsub 📮 Interact and manage Pub/Sub Brokers
51
- wrangler login 🔓 Login to Cloudflare
52
- wrangler logout 🚪 Logout from Cloudflare
53
- wrangler whoami 🕵️ Retrieve your user info and test your auth config
54
- wrangler types 📝 Generate types from bindings & module rules in config
55
- wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
34
+ wrangler docs [command] 📚 Open wrangler's docs in your browser
35
+ wrangler init [name] 📥 Initialize a basic Worker project, including a wrangler.toml file
36
+ wrangler generate [name] [template] ✨ Generate a new Worker project from an existing Worker template. See https://github.com/cloudflare/templates
37
+ wrangler dev [script] 👂 Start a local server for developing your worker
38
+ wrangler publish [script] 🆙 Publish your Worker to Cloudflare.
39
+ wrangler delete [script] 🗑 Delete your Worker from Cloudflare.
40
+ wrangler tail [worker] 🦚 Starts a log tailing session for a published Worker.
41
+ wrangler secret 🤫 Generate a secret that can be referenced in a Worker
42
+ wrangler secret:bulk <json> 🗄️ Bulk upload secrets for a Worker
43
+ wrangler kv:namespace 🗂️ Interact with your Workers KV Namespaces
44
+ wrangler kv:key 🔑 Individually manage Workers KV key-value pairs
45
+ wrangler kv:bulk 💪 Interact with multiple Workers KV key-value pairs at once
46
+ wrangler pages ⚡️ Configure Cloudflare Pages
47
+ wrangler queues 🇶 Configure Workers Queues
48
+ wrangler r2 📦 Interact with an R2 store
49
+ wrangler dispatch-namespace 📦 Interact with a dispatch namespace
50
+ wrangler d1 🗄 Interact with a D1 database
51
+ wrangler pubsub 📮 Interact and manage Pub/Sub Brokers
52
+ wrangler login 🔓 Login to Cloudflare
53
+ wrangler logout 🚪 Logout from Cloudflare
54
+ wrangler whoami 🕵️ Retrieve your user info and test your auth config
55
+ wrangler types 📝 Generate types from bindings & module rules in config
56
+ wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
56
57
 
57
58
  Flags:
58
59
  -c, --config Path to .toml configuration file [string]
@@ -78,28 +79,29 @@ describe("wrangler", () => {
78
79
  wrangler
79
80
 
80
81
  Commands:
81
- wrangler docs [command] 📚 Open wrangler's docs in your browser
82
- wrangler init [name] 📥 Create a wrangler.toml configuration file
83
- wrangler dev [script] 👂 Start a local server for developing your worker
84
- wrangler publish [script] 🆙 Publish your Worker to Cloudflare.
85
- wrangler delete [script] 🗑 Delete your Worker from Cloudflare.
86
- wrangler tail [worker] 🦚 Starts a log tailing session for a published Worker.
87
- wrangler secret 🤫 Generate a secret that can be referenced in a Worker
88
- wrangler secret:bulk <json> 🗄️ Bulk upload secrets for a Worker
89
- wrangler kv:namespace 🗂️ Interact with your Workers KV Namespaces
90
- wrangler kv:key 🔑 Individually manage Workers KV key-value pairs
91
- wrangler kv:bulk 💪 Interact with multiple Workers KV key-value pairs at once
92
- wrangler pages ⚡️ Configure Cloudflare Pages
93
- wrangler queues 🇶 Configure Workers Queues
94
- wrangler r2 📦 Interact with an R2 store
95
- wrangler dispatch-namespace 📦 Interact with a dispatch namespace
96
- wrangler d1 🗄 Interact with a D1 database
97
- wrangler pubsub 📮 Interact and manage Pub/Sub Brokers
98
- wrangler login 🔓 Login to Cloudflare
99
- wrangler logout 🚪 Logout from Cloudflare
100
- wrangler whoami 🕵️ Retrieve your user info and test your auth config
101
- wrangler types 📝 Generate types from bindings & module rules in config
102
- wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
82
+ wrangler docs [command] 📚 Open wrangler's docs in your browser
83
+ wrangler init [name] 📥 Initialize a basic Worker project, including a wrangler.toml file
84
+ wrangler generate [name] [template] ✨ Generate a new Worker project from an existing Worker template. See https://github.com/cloudflare/templates
85
+ wrangler dev [script] 👂 Start a local server for developing your worker
86
+ wrangler publish [script] 🆙 Publish your Worker to Cloudflare.
87
+ wrangler delete [script] 🗑 Delete your Worker from Cloudflare.
88
+ wrangler tail [worker] 🦚 Starts a log tailing session for a published Worker.
89
+ wrangler secret 🤫 Generate a secret that can be referenced in a Worker
90
+ wrangler secret:bulk <json> 🗄️ Bulk upload secrets for a Worker
91
+ wrangler kv:namespace 🗂️ Interact with your Workers KV Namespaces
92
+ wrangler kv:key 🔑 Individually manage Workers KV key-value pairs
93
+ wrangler kv:bulk 💪 Interact with multiple Workers KV key-value pairs at once
94
+ wrangler pages ⚡️ Configure Cloudflare Pages
95
+ wrangler queues 🇶 Configure Workers Queues
96
+ wrangler r2 📦 Interact with an R2 store
97
+ wrangler dispatch-namespace 📦 Interact with a dispatch namespace
98
+ wrangler d1 🗄 Interact with a D1 database
99
+ wrangler pubsub 📮 Interact and manage Pub/Sub Brokers
100
+ wrangler login 🔓 Login to Cloudflare
101
+ wrangler logout 🚪 Logout from Cloudflare
102
+ wrangler whoami 🕵️ Retrieve your user info and test your auth config
103
+ wrangler types 📝 Generate types from bindings & module rules in config
104
+ wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
103
105
 
104
106
  Flags:
105
107
  -c, --config Path to .toml configuration file [string]