wrangler 0.0.0-ece06ea → 0.0.0-ed08df4
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/Cloudflare_CA.pem +18 -0
- package/README.md +27 -14
- package/bin/wrangler.js +34 -2
- package/miniflare-dist/index.mjs +4886 -0
- package/package.json +71 -36
- package/pages/functions/buildPlugin.ts +92 -0
- package/pages/functions/buildWorker.ts +138 -0
- package/pages/functions/filepath-routing.test.ts +234 -0
- package/pages/functions/filepath-routing.ts +189 -0
- package/pages/functions/identifiers.ts +78 -0
- package/pages/functions/routes.ts +156 -0
- package/pages/functions/template-plugin.ts +147 -0
- package/pages/functions/template-worker.ts +143 -0
- package/src/__tests__/config-cache.test.ts +36 -0
- package/src/__tests__/configuration.test.ts +3125 -0
- package/src/__tests__/dev.test.tsx +829 -0
- package/src/__tests__/guess-worker-format.test.ts +85 -0
- package/src/__tests__/{clipboardy-mock.js → helpers/clipboardy-mock.js} +0 -0
- package/src/__tests__/helpers/cmd-shim.d.ts +11 -0
- package/src/__tests__/helpers/faye-websocket.d.ts +6 -0
- package/src/__tests__/helpers/mock-account-id.ts +48 -0
- package/src/__tests__/helpers/mock-bin.ts +36 -0
- package/src/__tests__/helpers/mock-cfetch.ts +211 -0
- package/src/__tests__/helpers/mock-console.ts +87 -0
- package/src/__tests__/helpers/mock-dialogs.ts +90 -0
- package/src/__tests__/helpers/mock-http-server.ts +46 -0
- package/src/__tests__/helpers/mock-istty.ts +27 -0
- package/src/__tests__/helpers/mock-kv.ts +33 -0
- package/src/__tests__/helpers/mock-oauth-flow.ts +255 -0
- package/src/__tests__/helpers/mock-stdin.ts +103 -0
- package/src/__tests__/helpers/mock-web-socket.ts +29 -0
- package/src/__tests__/helpers/run-in-tmp.ts +39 -0
- package/src/__tests__/helpers/run-wrangler.ts +16 -0
- package/src/__tests__/helpers/write-worker-source.ts +31 -0
- package/src/__tests__/helpers/write-wrangler-toml.ts +17 -0
- package/src/__tests__/https-options.test.ts +130 -0
- package/src/__tests__/index.test.ts +221 -132
- package/src/__tests__/init.test.ts +1516 -0
- package/src/__tests__/jest.setup.ts +77 -0
- package/src/__tests__/kv.test.ts +1481 -0
- package/src/__tests__/logger.test.ts +115 -0
- package/src/__tests__/package-manager.test.ts +206 -0
- package/src/__tests__/pages.test.ts +327 -0
- package/src/__tests__/parse.test.ts +326 -0
- package/src/__tests__/publish.test.ts +4996 -0
- package/src/__tests__/r2.test.ts +210 -0
- package/src/__tests__/route.test.ts +45 -0
- package/src/__tests__/secret.test.ts +446 -0
- package/src/__tests__/tail.test.ts +690 -0
- package/src/__tests__/user.test.ts +131 -0
- package/src/__tests__/whoami.test.tsx +105 -0
- package/src/bundle.ts +169 -0
- package/src/cfetch/index.ts +104 -0
- package/src/cfetch/internal.ts +140 -0
- package/src/cli.ts +10 -7
- package/src/config/README.md +107 -0
- package/src/config/config.ts +234 -0
- package/src/config/diagnostics.ts +80 -0
- package/src/config/environment.ts +394 -0
- package/src/config/index.ts +63 -0
- package/src/config/validation-helpers.ts +575 -0
- package/src/config/validation.ts +1424 -0
- package/src/config-cache.ts +45 -0
- package/src/create-worker-preview.ts +175 -0
- package/src/create-worker-upload-form.ts +240 -0
- package/src/dev/dev-vars.ts +36 -0
- package/src/dev/dev.tsx +421 -0
- package/src/dev/local.tsx +312 -0
- package/src/dev/remote.tsx +213 -0
- package/src/dev/use-esbuild.ts +118 -0
- package/src/dialogs.tsx +22 -20
- package/src/entry.ts +322 -0
- package/src/environment-variables.ts +35 -0
- package/src/errors.ts +11 -0
- package/src/https-options.ts +123 -0
- package/src/index.tsx +1869 -1020
- package/src/inspect.ts +623 -0
- package/src/intl-polyfill.d.ts +139 -0
- package/src/kv.ts +344 -0
- package/src/logger.ts +66 -0
- package/src/miniflare-cli/README.md +30 -0
- package/src/miniflare-cli/enum-keys.ts +17 -0
- package/src/miniflare-cli/index.ts +41 -0
- package/src/miniflare-cli/request-context.ts +40 -0
- package/src/module-collection.ts +258 -0
- package/src/open-in-browser.ts +26 -0
- package/src/package-manager.ts +127 -0
- package/src/pages.tsx +1756 -218
- package/src/parse.ts +185 -0
- package/src/paths.ts +26 -0
- package/src/proxy.ts +449 -0
- package/src/publish.ts +377 -262
- package/src/r2.ts +50 -0
- package/src/selfsigned.d.ts +29 -0
- package/src/sites.tsx +237 -59
- package/src/tail/filters.ts +279 -0
- package/src/tail/index.ts +299 -0
- package/src/tail/printing.ts +67 -0
- package/src/update-check.ts +19 -0
- package/src/user.tsx +395 -221
- package/src/whoami.tsx +70 -0
- package/src/worker.ts +172 -0
- package/templates/gitignore +171 -0
- package/templates/new-worker.js +15 -0
- package/templates/new-worker.ts +15 -0
- package/{static-asset-facade.js → templates/static-asset-facade.js} +1 -1
- package/templates/tsconfig.json +105 -0
- package/wrangler-dist/cli.js +108921 -132528
- package/src/__tests__/fixtures/init/.gitkeep +0 -0
- package/src/__tests__/mock-cfetch.js +0 -46
- package/src/api/form_data.ts +0 -158
- package/src/api/inspect.ts +0 -441
- package/src/api/preview.ts +0 -123
- package/src/api/worker.ts +0 -161
- package/src/cfetch.ts +0 -72
- package/src/config.ts +0 -124
- package/src/dev.tsx +0 -736
- package/src/kv.tsx +0 -211
- package/src/tail.tsx +0 -71
- package/src/util/fetch.ts +0 -74
- package/wrangler-dist/cli.js.map +0 -7
|
@@ -1,153 +1,242 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
// @ts-expect-error we're mocking cfetch, so of course setMock isn't a thing
|
|
7
|
-
import { setMock, unsetAllMocks } from "../cfetch";
|
|
8
|
-
|
|
9
|
-
jest.mock("../cfetch", () => {
|
|
10
|
-
return jest.requireActual("./mock-cfetch");
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
async function w(cmd: void | string, options?: { tap: boolean }) {
|
|
14
|
-
const tapped = options?.tap ? tap() : undefined;
|
|
15
|
-
await main([...(cmd ? cmd.split(" ") : [])]);
|
|
16
|
-
tapped?.off();
|
|
17
|
-
return { stdout: tapped?.out, stderr: tapped?.err };
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function tap() {
|
|
21
|
-
const oldLog = console.log;
|
|
22
|
-
const oldError = console.error;
|
|
23
|
-
|
|
24
|
-
const toReturn = {
|
|
25
|
-
off: () => {
|
|
26
|
-
console.log = oldLog;
|
|
27
|
-
console.error = oldError;
|
|
28
|
-
},
|
|
29
|
-
out: "",
|
|
30
|
-
err: "",
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
console.log = (...args) => {
|
|
34
|
-
toReturn.out += args.join("");
|
|
35
|
-
oldLog.apply(console, args);
|
|
36
|
-
// console.trace(...args); // use this if you want to find the true source of your console.log
|
|
37
|
-
};
|
|
38
|
-
console.error = (...args) => {
|
|
39
|
-
toReturn.err += args.join("");
|
|
40
|
-
oldError.apply(console, args);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
return toReturn;
|
|
44
|
-
}
|
|
1
|
+
import { getPackageManager } from "../package-manager";
|
|
2
|
+
import { mockConsoleMethods } from "./helpers/mock-console";
|
|
3
|
+
import { runInTempDir } from "./helpers/run-in-tmp";
|
|
4
|
+
import { runWrangler } from "./helpers/run-wrangler";
|
|
5
|
+
import type { PackageManager } from "../package-manager";
|
|
45
6
|
|
|
46
7
|
describe("wrangler", () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
wrangler kv:namespace 🗂️ Interact with your Workers KV Namespaces
|
|
60
|
-
wrangler kv:key 🔑 Individually manage Workers KV key-value pairs
|
|
61
|
-
wrangler kv:bulk 💪 Interact with multiple Workers KV key-value pairs at once
|
|
62
|
-
wrangler pages ⚡️ Configure Cloudflare Pages
|
|
63
|
-
|
|
64
|
-
Flags:
|
|
65
|
-
--config Path to .toml configuration file [string]
|
|
66
|
-
--help Show help [boolean]
|
|
67
|
-
--version Show version number [boolean]
|
|
68
|
-
|
|
69
|
-
Options:
|
|
70
|
-
--local Run on my machine [boolean] [default: false]"
|
|
71
|
-
`);
|
|
8
|
+
let mockPackageManager: PackageManager;
|
|
9
|
+
runInTempDir();
|
|
10
|
+
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
mockPackageManager = {
|
|
13
|
+
cwd: process.cwd(),
|
|
14
|
+
// @ts-expect-error we're making a fake package manager here
|
|
15
|
+
type: "mockpm",
|
|
16
|
+
addDevDeps: jest.fn(),
|
|
17
|
+
install: jest.fn(),
|
|
18
|
+
};
|
|
19
|
+
(getPackageManager as jest.Mock).mockResolvedValue(mockPackageManager);
|
|
72
20
|
});
|
|
73
21
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
22
|
+
const std = mockConsoleMethods();
|
|
23
|
+
|
|
24
|
+
describe("no command", () => {
|
|
25
|
+
it("should display a list of available commands", async () => {
|
|
26
|
+
await runWrangler();
|
|
27
|
+
|
|
28
|
+
expect(std.out).toMatchInlineSnapshot(`
|
|
29
|
+
"wrangler
|
|
30
|
+
|
|
31
|
+
Commands:
|
|
32
|
+
wrangler init [name] 📥 Create a wrangler.toml configuration file
|
|
33
|
+
wrangler dev [script] 👂 Start a local server for developing your worker
|
|
34
|
+
wrangler publish [script] 🆙 Publish your Worker to Cloudflare.
|
|
35
|
+
wrangler tail [name] 🦚 Starts a log tailing session for a published Worker.
|
|
36
|
+
wrangler secret 🤫 Generate a secret that can be referenced in the worker script
|
|
37
|
+
wrangler kv:namespace 🗂️ Interact with your Workers KV Namespaces
|
|
38
|
+
wrangler kv:key 🔑 Individually manage Workers KV key-value pairs
|
|
39
|
+
wrangler kv:bulk 💪 Interact with multiple Workers KV key-value pairs at once
|
|
40
|
+
wrangler pages ⚡️ Configure Cloudflare Pages
|
|
41
|
+
wrangler r2 📦 Interact with an R2 store
|
|
42
|
+
wrangler login 🔓 Login to Cloudflare
|
|
43
|
+
wrangler logout 🚪 Logout from Cloudflare
|
|
44
|
+
wrangler whoami 🕵️ Retrieve your user info and test your auth config
|
|
45
|
+
|
|
46
|
+
Flags:
|
|
47
|
+
-c, --config Path to .toml configuration file [string]
|
|
48
|
+
-h, --help Show help [boolean]
|
|
49
|
+
-v, --version Show version number [boolean]"
|
|
50
|
+
`);
|
|
51
|
+
|
|
52
|
+
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
79
53
|
});
|
|
54
|
+
});
|
|
80
55
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
56
|
+
describe("invalid command", () => {
|
|
57
|
+
it("should display an error", async () => {
|
|
58
|
+
await expect(
|
|
59
|
+
runWrangler("invalid-command")
|
|
60
|
+
).rejects.toThrowErrorMatchingInlineSnapshot(
|
|
61
|
+
`"Unknown argument: invalid-command"`
|
|
62
|
+
);
|
|
85
63
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
64
|
+
expect(std.out).toMatchInlineSnapshot(`
|
|
65
|
+
"
|
|
66
|
+
"
|
|
67
|
+
`);
|
|
68
|
+
expect(std.err).toMatchInlineSnapshot(`
|
|
69
|
+
"wrangler
|
|
70
|
+
|
|
71
|
+
Commands:
|
|
72
|
+
wrangler init [name] 📥 Create a wrangler.toml configuration file
|
|
73
|
+
wrangler dev [script] 👂 Start a local server for developing your worker
|
|
74
|
+
wrangler publish [script] 🆙 Publish your Worker to Cloudflare.
|
|
75
|
+
wrangler tail [name] 🦚 Starts a log tailing session for a published Worker.
|
|
76
|
+
wrangler secret 🤫 Generate a secret that can be referenced in the worker script
|
|
77
|
+
wrangler kv:namespace 🗂️ Interact with your Workers KV Namespaces
|
|
78
|
+
wrangler kv:key 🔑 Individually manage Workers KV key-value pairs
|
|
79
|
+
wrangler kv:bulk 💪 Interact with multiple Workers KV key-value pairs at once
|
|
80
|
+
wrangler pages ⚡️ Configure Cloudflare Pages
|
|
81
|
+
wrangler r2 📦 Interact with an R2 store
|
|
82
|
+
wrangler login 🔓 Login to Cloudflare
|
|
83
|
+
wrangler logout 🚪 Logout from Cloudflare
|
|
84
|
+
wrangler whoami 🕵️ Retrieve your user info and test your auth config
|
|
85
|
+
|
|
86
|
+
Flags:
|
|
87
|
+
-c, --config Path to .toml configuration file [string]
|
|
88
|
+
-h, --help Show help [boolean]
|
|
89
|
+
-v, --version Show version number [boolean]
|
|
90
|
+
[31mX [41;31m[[41;97mERROR[41;31m][0m [1mUnknown argument: invalid-command[0m
|
|
91
|
+
|
|
92
|
+
"
|
|
93
|
+
`);
|
|
90
94
|
});
|
|
95
|
+
});
|
|
91
96
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
describe("preview", () => {
|
|
98
|
+
it("should throw an error if the deprecated command is used with positional arguments", async () => {
|
|
99
|
+
await expect(runWrangler("preview GET")).rejects
|
|
100
|
+
.toThrowErrorMatchingInlineSnapshot(`
|
|
101
|
+
"Deprecation:
|
|
102
|
+
The \`wrangler preview\` command has been deprecated.
|
|
103
|
+
Try using \`wrangler dev\` to to try out a worker during development.
|
|
104
|
+
"
|
|
105
|
+
`);
|
|
106
|
+
await expect(runWrangler(`preview GET "SomeBody"`)).rejects
|
|
107
|
+
.toThrowErrorMatchingInlineSnapshot(`
|
|
108
|
+
"Deprecation:
|
|
109
|
+
The \`wrangler preview\` command has been deprecated.
|
|
110
|
+
Try using \`wrangler dev\` to to try out a worker during development.
|
|
111
|
+
"
|
|
112
|
+
`);
|
|
96
113
|
});
|
|
97
114
|
});
|
|
98
115
|
|
|
99
|
-
describe("
|
|
100
|
-
|
|
101
|
-
|
|
116
|
+
describe("subcommand implicit help ran on incomplete command execution", () => {
|
|
117
|
+
function endEventLoop() {
|
|
118
|
+
return new Promise((resolve) => setImmediate(resolve));
|
|
119
|
+
}
|
|
120
|
+
it("no subcommand for 'secret' should display a list of available subcommands", async () => {
|
|
121
|
+
await runWrangler("secret");
|
|
122
|
+
await endEventLoop();
|
|
123
|
+
expect(std.out).toMatchInlineSnapshot(`
|
|
124
|
+
"wrangler secret
|
|
125
|
+
|
|
126
|
+
🤫 Generate a secret that can be referenced in the worker script
|
|
127
|
+
|
|
128
|
+
Commands:
|
|
129
|
+
wrangler secret put <key> Create or update a secret variable for a script
|
|
130
|
+
wrangler secret delete <key> Delete a secret variable from a script
|
|
131
|
+
wrangler secret list List all secrets for a script
|
|
132
|
+
|
|
133
|
+
Flags:
|
|
134
|
+
-c, --config Path to .toml configuration file [string]
|
|
135
|
+
-h, --help Show help [boolean]
|
|
136
|
+
-v, --version Show version number [boolean]"
|
|
137
|
+
`);
|
|
102
138
|
});
|
|
103
|
-
let KVNamespaces: { title: string; id: string }[] = [];
|
|
104
|
-
it("can create a namespace", async () => {
|
|
105
|
-
setMock("/accounts/:accountId/storage/kv/namespaces", (uri, init) => {
|
|
106
|
-
expect(init.method === "POST");
|
|
107
|
-
const body = JSON.parse(init.body);
|
|
108
|
-
expect(body.title).toBe("worker-UnitTestNamespace");
|
|
109
|
-
KVNamespaces.push({ title: body.title, id: "some-namespace-id" });
|
|
110
|
-
return { id: "some-namespace-id" };
|
|
111
|
-
});
|
|
112
139
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
).
|
|
140
|
+
it("no subcommand 'kv:namespace' should display a list of available subcommands", async () => {
|
|
141
|
+
await runWrangler("kv:namespace");
|
|
142
|
+
await endEventLoop();
|
|
143
|
+
expect(std.out).toMatchInlineSnapshot(`
|
|
144
|
+
"wrangler kv:namespace
|
|
145
|
+
|
|
146
|
+
🗂️ Interact with your Workers KV Namespaces
|
|
147
|
+
|
|
148
|
+
Commands:
|
|
149
|
+
wrangler kv:namespace create <namespace> Create a new namespace
|
|
150
|
+
wrangler kv:namespace list Outputs a list of all KV namespaces associated with your account id.
|
|
151
|
+
wrangler kv:namespace delete Deletes a given namespace.
|
|
152
|
+
|
|
153
|
+
Flags:
|
|
154
|
+
-c, --config Path to .toml configuration file [string]
|
|
155
|
+
-h, --help Show help [boolean]
|
|
156
|
+
-v, --version Show version number [boolean]"
|
|
157
|
+
`);
|
|
117
158
|
});
|
|
118
159
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
160
|
+
it("no subcommand 'kv:key' should display a list of available subcommands", async () => {
|
|
161
|
+
await runWrangler("kv:key");
|
|
162
|
+
await endEventLoop();
|
|
163
|
+
expect(std.out).toMatchInlineSnapshot(`
|
|
164
|
+
"wrangler kv:key
|
|
165
|
+
|
|
166
|
+
🔑 Individually manage Workers KV key-value pairs
|
|
167
|
+
|
|
168
|
+
Commands:
|
|
169
|
+
wrangler kv:key put <key> [value] Writes a single key/value pair to the given namespace.
|
|
170
|
+
wrangler kv:key list Outputs a list of all keys in a given namespace.
|
|
171
|
+
wrangler kv:key get <key> Reads a single value by key from the given namespace.
|
|
172
|
+
wrangler kv:key delete <key> Removes a single key value pair from the given namespace.
|
|
173
|
+
|
|
174
|
+
Flags:
|
|
175
|
+
-c, --config Path to .toml configuration file [string]
|
|
176
|
+
-h, --help Show help [boolean]
|
|
177
|
+
-v, --version Show version number [boolean]"
|
|
178
|
+
`);
|
|
134
179
|
});
|
|
135
180
|
|
|
136
|
-
it("
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
181
|
+
it("no subcommand 'kv:bulk' should display a list of available subcommands", async () => {
|
|
182
|
+
await runWrangler("kv:bulk");
|
|
183
|
+
await endEventLoop();
|
|
184
|
+
expect(std.out).toMatchInlineSnapshot(`
|
|
185
|
+
"wrangler kv:bulk
|
|
186
|
+
|
|
187
|
+
💪 Interact with multiple Workers KV key-value pairs at once
|
|
188
|
+
|
|
189
|
+
Commands:
|
|
190
|
+
wrangler kv:bulk put <filename> Upload multiple key-value pairs to a namespace
|
|
191
|
+
wrangler kv:bulk delete <filename> Delete multiple key-value pairs from a namespace
|
|
192
|
+
|
|
193
|
+
Flags:
|
|
194
|
+
-c, --config Path to .toml configuration file [string]
|
|
195
|
+
-h, --help Show help [boolean]
|
|
196
|
+
-v, --version Show version number [boolean]"
|
|
197
|
+
`);
|
|
198
|
+
});
|
|
199
|
+
it("no subcommand 'r2' should display a list of available subcommands", async () => {
|
|
200
|
+
await runWrangler("r2");
|
|
201
|
+
await endEventLoop();
|
|
202
|
+
expect(std.out).toMatchInlineSnapshot(`
|
|
203
|
+
"wrangler r2
|
|
204
|
+
|
|
205
|
+
📦 Interact with an R2 store
|
|
206
|
+
|
|
207
|
+
Commands:
|
|
208
|
+
wrangler r2 bucket Manage R2 buckets
|
|
209
|
+
|
|
210
|
+
Flags:
|
|
211
|
+
-c, --config Path to .toml configuration file [string]
|
|
212
|
+
-h, --help Show help [boolean]
|
|
213
|
+
-v, --version Show version number [boolean]"
|
|
214
|
+
`);
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
describe("Deprecated commands", () => {
|
|
218
|
+
it("should print a deprecation message for 'generate'", async () => {
|
|
219
|
+
await runWrangler("generate").catch((err) => {
|
|
220
|
+
expect(err.message).toMatchInlineSnapshot(`
|
|
221
|
+
"Deprecation:
|
|
222
|
+
\`wrangler generate\` has been deprecated.
|
|
223
|
+
Try running \`wrangler init\` to generate a basic Worker, or cloning the template repository instead:
|
|
224
|
+
|
|
225
|
+
\`\`\`
|
|
226
|
+
git clone https://github.com/cloudflare/worker-template
|
|
227
|
+
\`\`\`
|
|
228
|
+
|
|
229
|
+
Please refer to https://developers.cloudflare.com/workers/wrangler/deprecations/#generate for more information."
|
|
230
|
+
`);
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
it("should print a deprecation message for 'build'", async () => {
|
|
234
|
+
await runWrangler("build").catch((err) => {
|
|
235
|
+
expect(err.message).toMatchInlineSnapshot(`
|
|
236
|
+
"Deprecation:
|
|
237
|
+
\`wrangler build\` has been deprecated, please refer to https://developers.cloudflare.com/workers/wrangler/migration/deprecations/#build for alternatives"
|
|
238
|
+
`);
|
|
239
|
+
});
|
|
151
240
|
});
|
|
152
241
|
});
|
|
153
242
|
});
|