wrangler 0.0.0-e6c9c5c0 → 0.0.0-e6e1daba
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/README.md +3 -3
- package/miniflare-dist/index.mjs +22 -18
- package/package.json +12 -12
- package/src/__tests__/configuration.test.ts +70 -0
- package/src/__tests__/d1/d1.test.ts +13 -58
- package/src/__tests__/d1/execute.test.ts +64 -0
- package/src/__tests__/d1/migrate.test.ts +155 -0
- package/src/__tests__/deployments.test.ts +40 -16
- package/src/__tests__/dev.test.tsx +8 -7
- package/src/__tests__/generate.test.ts +1 -1
- package/src/__tests__/guess-worker-format.test.ts +35 -0
- package/src/__tests__/helpers/end-event-loop.ts +6 -0
- package/src/__tests__/helpers/mock-get-pages-upload-token.ts +25 -0
- package/src/__tests__/helpers/mock-set-timeout.ts +16 -0
- package/src/__tests__/helpers/msw/handlers/deployments.ts +40 -16
- package/src/__tests__/helpers/string-dynamic-values-matcher.ts +28 -0
- package/src/__tests__/index.test.ts +38 -32
- package/src/__tests__/init.test.ts +1 -1
- package/src/__tests__/kv.test.ts +63 -52
- package/src/__tests__/middleware.test.ts +65 -0
- package/src/__tests__/mtls-certificates.test.ts +585 -0
- package/src/__tests__/pages/deployment-list.test.ts +78 -0
- package/src/__tests__/pages/functions-build.test.ts +402 -0
- package/src/__tests__/pages/pages.test.ts +81 -0
- package/src/__tests__/pages/project-create.test.ts +63 -0
- package/src/__tests__/pages/project-list.test.ts +108 -0
- package/src/__tests__/pages/project-upload.test.ts +481 -0
- package/src/__tests__/pages/publish.test.ts +2745 -0
- package/src/__tests__/parse.test.ts +106 -0
- package/src/__tests__/publish.test.ts +80 -30
- package/src/__tests__/pubsub.test.ts +15 -12
- package/src/__tests__/queues.test.ts +37 -30
- package/src/__tests__/r2.test.ts +25 -20
- package/src/__tests__/secret.test.ts +4 -4
- package/src/__tests__/tsconfig.tsbuildinfo +1 -1
- package/src/__tests__/user.test.ts +1 -1
- package/src/__tests__/whoami.test.tsx +1 -1
- package/src/__tests__/worker-namespace.test.ts +26 -21
- package/src/api/dev.ts +80 -11
- package/src/api/index.ts +8 -0
- package/src/api/mtls-certificate.ts +148 -0
- package/src/api/pages/create-worker-bundle-contents.ts +75 -0
- package/src/api/pages/publish.tsx +59 -12
- package/src/bundle.ts +9 -7
- package/src/config/config.ts +14 -7
- package/src/config/environment.ts +9 -2
- package/src/config/index.ts +37 -20
- package/src/config/validation.ts +50 -3
- package/src/create-worker-preview.ts +19 -8
- package/src/create-worker-upload-form.ts +9 -0
- package/src/d1/backups.tsx +20 -24
- package/src/d1/create.tsx +6 -5
- package/src/d1/delete.ts +7 -10
- package/src/d1/execute.tsx +174 -143
- package/src/d1/index.ts +5 -6
- package/src/d1/list.tsx +21 -9
- package/src/d1/migrations/apply.tsx +42 -33
- package/src/d1/migrations/create.tsx +16 -17
- package/src/d1/migrations/helpers.ts +63 -38
- package/src/d1/migrations/list.tsx +37 -24
- package/src/d1/migrations/options.ts +7 -2
- package/src/d1/options.ts +3 -3
- package/src/d1/types.ts +1 -0
- package/src/d1/utils.ts +2 -1
- package/src/delete.ts +5 -8
- package/src/deployments.ts +62 -39
- package/src/deprecated/index.ts +7 -8
- package/src/dev/dev.tsx +1 -15
- package/src/dev/local.tsx +5 -6
- package/src/dev/remote.tsx +2 -2
- package/src/dev.tsx +51 -86
- package/src/dispatch-namespace.ts +20 -16
- package/src/docs/index.ts +7 -8
- package/src/entry.ts +1 -2
- package/src/generate/index.ts +6 -8
- package/src/index.ts +37 -26
- package/src/init.ts +5 -7
- package/src/inspect.ts +16 -1
- package/src/kv/index.ts +15 -17
- package/src/miniflare-cli/assets.ts +9 -8
- package/src/miniflare-cli/tsconfig.tsbuildinfo +1 -1
- package/src/mtls-certificate/cli.ts +155 -0
- package/src/pages/build.ts +109 -27
- package/src/pages/buildFunctions.ts +32 -31
- package/src/pages/deployment-tails.ts +7 -10
- package/src/pages/deployments.tsx +6 -4
- package/src/pages/dev.ts +19 -19
- package/src/pages/functions/tsconfig.tsbuildinfo +1 -1
- package/src/pages/functions.ts +8 -4
- package/src/pages/index.ts +3 -3
- package/src/pages/projects.tsx +7 -12
- package/src/pages/publish.tsx +18 -5
- package/src/pages/types.ts +5 -0
- package/src/pages/upload.tsx +6 -4
- package/src/pages/utils.ts +1 -1
- package/src/parse.ts +23 -1
- package/src/publish/index.ts +19 -15
- package/src/publish/publish.ts +5 -4
- package/src/pubsub/pubsub-commands.ts +18 -19
- package/src/queues/cli/commands/consumer/add.ts +18 -24
- package/src/queues/cli/commands/consumer/index.ts +3 -6
- package/src/queues/cli/commands/consumer/remove.ts +11 -18
- package/src/queues/cli/commands/create.ts +8 -8
- package/src/queues/cli/commands/delete.ts +8 -8
- package/src/queues/cli/commands/index.ts +3 -4
- package/src/queues/cli/commands/list.ts +8 -8
- package/src/r2/helpers.ts +1 -0
- package/src/r2/index.ts +28 -28
- package/src/secret/index.ts +10 -14
- package/src/sites.ts +1 -1
- package/src/tail/filters.ts +1 -1
- package/src/tail/index.ts +6 -8
- package/src/user/user.ts +4 -3
- package/src/worker.ts +6 -0
- package/src/yargs-types.ts +18 -5
- package/templates/checked-fetch.js +9 -1
- package/templates/format-dev-errors.ts +1 -0
- package/templates/new-worker.ts +3 -0
- package/templates/pages-template-plugin.ts +7 -3
- package/templates/serve-static-assets.ts +1 -0
- package/templates/service-bindings-module-facade.js +1 -0
- package/templates/tsconfig.init.json +1 -1
- package/templates/tsconfig.tsbuildinfo +1 -1
- package/wrangler-dist/cli.d.ts +596 -3
- package/wrangler-dist/cli.js +14276 -6748
- package/src/__tests__/pages.test.ts +0 -2898
|
@@ -136,7 +136,7 @@ describe("wrangler dev", () => {
|
|
|
136
136
|
|
|
137
137
|
expect(std.out).toMatchInlineSnapshot(`
|
|
138
138
|
"
|
|
139
|
-
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/
|
|
139
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose[0m"
|
|
140
140
|
`);
|
|
141
141
|
expect(std.err).toMatchInlineSnapshot(`
|
|
142
142
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mMissing entry-point: The entry-point should be specified via the command line (e.g. \`wrangler dev path/to/script\`) or the \`main\` config field.[0m
|
|
@@ -698,7 +698,7 @@ describe("wrangler dev", () => {
|
|
|
698
698
|
expect(std.out).toMatchInlineSnapshot(`
|
|
699
699
|
"Running custom build: node -e \\"console.log('custom build');\\"
|
|
700
700
|
|
|
701
|
-
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/
|
|
701
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose[0m"
|
|
702
702
|
`);
|
|
703
703
|
expect(std.err).toMatchInlineSnapshot(`
|
|
704
704
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mThe expected output file at \\"index.js\\" was not found after running custom build: node -e \\"console.log('custom build');\\".[0m
|
|
@@ -774,7 +774,7 @@ describe("wrangler dev", () => {
|
|
|
774
774
|
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mSetting upstream-protocol to http is not currently implemented.[0m
|
|
775
775
|
|
|
776
776
|
If this is required in your project, please add your use case to the following issue:
|
|
777
|
-
[4mhttps://github.com/cloudflare/
|
|
777
|
+
[4mhttps://github.com/cloudflare/workers-sdk/issues/583[0m.
|
|
778
778
|
|
|
779
779
|
"
|
|
780
780
|
`);
|
|
@@ -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
|
-
-
|
|
1222
|
-
-
|
|
1223
|
-
-
|
|
1224
|
-
-
|
|
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();
|
|
@@ -32,6 +32,41 @@ describe("guess worker format", () => {
|
|
|
32
32
|
expect(guess).toBe("service-worker");
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
it('should detect a "service-worker" worker using `typeof module`', async () => {
|
|
36
|
+
await writeFile("./index.ts", "typeof module");
|
|
37
|
+
const guess = await guessWorkerFormat(
|
|
38
|
+
path.join(process.cwd(), "./index.ts"),
|
|
39
|
+
process.cwd(),
|
|
40
|
+
undefined
|
|
41
|
+
);
|
|
42
|
+
expect(guess).toBe("service-worker");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it('should detect a "service-worker" worker using imports', async () => {
|
|
46
|
+
await writeFile(
|
|
47
|
+
"./dep.ts",
|
|
48
|
+
`
|
|
49
|
+
const value = 'thing';
|
|
50
|
+
export default value;
|
|
51
|
+
`
|
|
52
|
+
);
|
|
53
|
+
await writeFile(
|
|
54
|
+
"./index.ts",
|
|
55
|
+
`
|
|
56
|
+
import value from './dep.ts';
|
|
57
|
+
addEventListener('fetch', (event) => {
|
|
58
|
+
event.respondWith(new Response(value));
|
|
59
|
+
});
|
|
60
|
+
`
|
|
61
|
+
);
|
|
62
|
+
const guess = await guessWorkerFormat(
|
|
63
|
+
path.join(process.cwd(), "./index.ts"),
|
|
64
|
+
process.cwd(),
|
|
65
|
+
undefined
|
|
66
|
+
);
|
|
67
|
+
expect(guess).toBe("service-worker");
|
|
68
|
+
});
|
|
69
|
+
|
|
35
70
|
it("should throw an error when the hint doesn't match the guess (modules - service-worker)", async () => {
|
|
36
71
|
await writeFile("./index.ts", "export default {};");
|
|
37
72
|
await expect(
|
|
@@ -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,6 +1,25 @@
|
|
|
1
1
|
import { rest } from "msw";
|
|
2
2
|
import { createFetchResult } from "../index";
|
|
3
3
|
|
|
4
|
+
const latestDeployment = {
|
|
5
|
+
id: "Galaxy-Class",
|
|
6
|
+
number: "1701-E",
|
|
7
|
+
annotations: {
|
|
8
|
+
"workers/triggered_by": "rollback",
|
|
9
|
+
"workers/rollback_from": "MOCK-DEPLOYMENT-ID-2222",
|
|
10
|
+
},
|
|
11
|
+
metadata: {
|
|
12
|
+
author_id: "Picard-Gamma-6-0-7-3",
|
|
13
|
+
author_email: "Jean-Luc-Picard@federation.org",
|
|
14
|
+
source: "wrangler",
|
|
15
|
+
created_on: "2021-01-04T00:00:00.000000Z",
|
|
16
|
+
modified_on: "2021-01-04T00:00:00.000000Z",
|
|
17
|
+
},
|
|
18
|
+
resources: {
|
|
19
|
+
script: "MOCK-TAG",
|
|
20
|
+
bindings: [],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
4
23
|
export const mswSuccessDeployments = [
|
|
5
24
|
rest.get(
|
|
6
25
|
"*/accounts/:accountId/workers/deployments/by-script/:scriptTag",
|
|
@@ -8,25 +27,14 @@ export const mswSuccessDeployments = [
|
|
|
8
27
|
response.once(
|
|
9
28
|
context.json(
|
|
10
29
|
createFetchResult({
|
|
11
|
-
latest:
|
|
12
|
-
id: "Galaxy-Class",
|
|
13
|
-
number: "1701-E",
|
|
14
|
-
metadata: {
|
|
15
|
-
author_id: "Picard-Gamma-6-0-7-3",
|
|
16
|
-
author_email: "Jean-Luc-Picard@federation.org",
|
|
17
|
-
source: "wrangler",
|
|
18
|
-
created_on: "2021-01-01T00:00:00.000000Z",
|
|
19
|
-
modified_on: "2021-01-01T00:00:00.000000Z",
|
|
20
|
-
},
|
|
21
|
-
resources: {
|
|
22
|
-
script: "MOCK-TAG",
|
|
23
|
-
bindings: [],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
30
|
+
latest: latestDeployment,
|
|
26
31
|
items: [
|
|
27
32
|
{
|
|
28
|
-
id: "
|
|
33
|
+
id: "Constitution-Class",
|
|
29
34
|
number: "1701-E",
|
|
35
|
+
annotations: {
|
|
36
|
+
"workers/triggered_by": "upload",
|
|
37
|
+
},
|
|
30
38
|
metadata: {
|
|
31
39
|
author_id: "Picard-Gamma-6-0-7-3",
|
|
32
40
|
author_email: "Jean-Luc-Picard@federation.org",
|
|
@@ -38,6 +46,10 @@ export const mswSuccessDeployments = [
|
|
|
38
46
|
{
|
|
39
47
|
id: "Intrepid-Class",
|
|
40
48
|
number: "NCC-74656",
|
|
49
|
+
annotations: {
|
|
50
|
+
"workers/triggered_by": "rollback",
|
|
51
|
+
"workers/rollback_from": "MOCK-DEPLOYMENT-ID-1111",
|
|
52
|
+
},
|
|
41
53
|
metadata: {
|
|
42
54
|
author_id: "Kathryn-Jane-Gamma-6-0-7-3",
|
|
43
55
|
author_email: "Kathryn-Janeway@federation.org",
|
|
@@ -46,6 +58,18 @@ export const mswSuccessDeployments = [
|
|
|
46
58
|
modified_on: "2021-02-02T00:00:00.000000Z",
|
|
47
59
|
},
|
|
48
60
|
},
|
|
61
|
+
{
|
|
62
|
+
id: "Intrepid-Class",
|
|
63
|
+
number: "NCC-74656",
|
|
64
|
+
metadata: {
|
|
65
|
+
author_id: "Kathryn-Jane-Gamma-6-0-7-3",
|
|
66
|
+
author_email: "Kathryn-Janeway@federation.org",
|
|
67
|
+
source: "wrangler",
|
|
68
|
+
created_on: "2021-02-03T00:00:00.000000Z",
|
|
69
|
+
modified_on: "2021-02-03T00:00:00.000000Z",
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
latestDeployment,
|
|
49
73
|
],
|
|
50
74
|
})
|
|
51
75
|
)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type PatternReplacementPair = [string | RegExp, string];
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sometimes, we might need to test strings that contain dynamic |
|
|
5
|
+
* random | generated data (such as file hashes, IDs, etc.).
|
|
6
|
+
*
|
|
7
|
+
* This helper function replaces the dynamic parts of such strings with
|
|
8
|
+
* static values, thus enabling us to properly test the contents of the
|
|
9
|
+
* string.
|
|
10
|
+
*
|
|
11
|
+
* see https://jestjs.io/docs/snapshot-testing#property-matchers
|
|
12
|
+
*/
|
|
13
|
+
export function replaceRandomWithConstantData(
|
|
14
|
+
stringWithRandomData: string,
|
|
15
|
+
patternReplacementPairs: Array<PatternReplacementPair>
|
|
16
|
+
) {
|
|
17
|
+
let stringWithConstantData = stringWithRandomData;
|
|
18
|
+
|
|
19
|
+
patternReplacementPairs.forEach(
|
|
20
|
+
(pair) =>
|
|
21
|
+
(stringWithConstantData = stringWithConstantData.replace(
|
|
22
|
+
pair[0], // pattern
|
|
23
|
+
pair[1] // replacement
|
|
24
|
+
))
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
return stringWithConstantData;
|
|
28
|
+
}
|
|
@@ -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";
|
|
@@ -49,6 +50,7 @@ describe("wrangler", () => {
|
|
|
49
50
|
wrangler dispatch-namespace 📦 Interact with a dispatch namespace
|
|
50
51
|
wrangler d1 🗄 Interact with a D1 database
|
|
51
52
|
wrangler pubsub 📮 Interact and manage Pub/Sub Brokers
|
|
53
|
+
wrangler mtls-certificate 🪪 Manage certificates used for mTLS connections
|
|
52
54
|
wrangler login 🔓 Login to Cloudflare
|
|
53
55
|
wrangler logout 🚪 Logout from Cloudflare
|
|
54
56
|
wrangler whoami 🕵️ Retrieve your user info and test your auth config
|
|
@@ -56,10 +58,11 @@ describe("wrangler", () => {
|
|
|
56
58
|
wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
|
|
57
59
|
|
|
58
60
|
Flags:
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
61
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
62
|
+
-c, --config Path to .toml configuration file [string]
|
|
63
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
64
|
+
-h, --help Show help [boolean]
|
|
65
|
+
-v, --version Show version number [boolean]"
|
|
63
66
|
`);
|
|
64
67
|
|
|
65
68
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
@@ -97,6 +100,7 @@ describe("wrangler", () => {
|
|
|
97
100
|
wrangler dispatch-namespace 📦 Interact with a dispatch namespace
|
|
98
101
|
wrangler d1 🗄 Interact with a D1 database
|
|
99
102
|
wrangler pubsub 📮 Interact and manage Pub/Sub Brokers
|
|
103
|
+
wrangler mtls-certificate 🪪 Manage certificates used for mTLS connections
|
|
100
104
|
wrangler login 🔓 Login to Cloudflare
|
|
101
105
|
wrangler logout 🚪 Logout from Cloudflare
|
|
102
106
|
wrangler whoami 🕵️ Retrieve your user info and test your auth config
|
|
@@ -104,10 +108,11 @@ describe("wrangler", () => {
|
|
|
104
108
|
wrangler deployments 🚢 Displays the 10 most recent deployments for a worker
|
|
105
109
|
|
|
106
110
|
Flags:
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
112
|
+
-c, --config Path to .toml configuration file [string]
|
|
113
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
114
|
+
-h, --help Show help [boolean]
|
|
115
|
+
-v, --version Show version number [boolean]"
|
|
111
116
|
`);
|
|
112
117
|
expect(std.err).toMatchInlineSnapshot(`
|
|
113
118
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mUnknown argument: invalid-command[0m
|
|
@@ -151,10 +156,11 @@ describe("wrangler", () => {
|
|
|
151
156
|
wrangler secret list List all secrets for a Worker
|
|
152
157
|
|
|
153
158
|
Flags:
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
159
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
160
|
+
-c, --config Path to .toml configuration file [string]
|
|
161
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
162
|
+
-h, --help Show help [boolean]
|
|
163
|
+
-v, --version Show version number [boolean]"
|
|
158
164
|
`);
|
|
159
165
|
});
|
|
160
166
|
|
|
@@ -172,10 +178,11 @@ describe("wrangler", () => {
|
|
|
172
178
|
wrangler kv:namespace delete Deletes a given namespace.
|
|
173
179
|
|
|
174
180
|
Flags:
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
181
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
182
|
+
-c, --config Path to .toml configuration file [string]
|
|
183
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
184
|
+
-h, --help Show help [boolean]
|
|
185
|
+
-v, --version Show version number [boolean]"
|
|
179
186
|
`);
|
|
180
187
|
});
|
|
181
188
|
|
|
@@ -194,10 +201,11 @@ describe("wrangler", () => {
|
|
|
194
201
|
wrangler kv:key delete <key> Removes a single key value pair from the given namespace.
|
|
195
202
|
|
|
196
203
|
Flags:
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
204
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
205
|
+
-c, --config Path to .toml configuration file [string]
|
|
206
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
207
|
+
-h, --help Show help [boolean]
|
|
208
|
+
-v, --version Show version number [boolean]"
|
|
201
209
|
`);
|
|
202
210
|
});
|
|
203
211
|
|
|
@@ -214,10 +222,11 @@ describe("wrangler", () => {
|
|
|
214
222
|
wrangler kv:bulk delete <filename> Delete multiple key-value pairs from a namespace
|
|
215
223
|
|
|
216
224
|
Flags:
|
|
217
|
-
-
|
|
218
|
-
-
|
|
219
|
-
-
|
|
220
|
-
-
|
|
225
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
226
|
+
-c, --config Path to .toml configuration file [string]
|
|
227
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
228
|
+
-h, --help Show help [boolean]
|
|
229
|
+
-v, --version Show version number [boolean]"
|
|
221
230
|
`);
|
|
222
231
|
});
|
|
223
232
|
|
|
@@ -234,10 +243,11 @@ describe("wrangler", () => {
|
|
|
234
243
|
wrangler r2 bucket Manage R2 buckets
|
|
235
244
|
|
|
236
245
|
Flags:
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
-
|
|
240
|
-
-
|
|
246
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
247
|
+
-c, --config Path to .toml configuration file [string]
|
|
248
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
249
|
+
-h, --help Show help [boolean]
|
|
250
|
+
-v, --version Show version number [boolean]"
|
|
241
251
|
`);
|
|
242
252
|
});
|
|
243
253
|
});
|
|
@@ -262,7 +272,3 @@ describe("wrangler", () => {
|
|
|
262
272
|
`);
|
|
263
273
|
});
|
|
264
274
|
});
|
|
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", "
|
|
1395
|
+
types: ["@cloudflare/workers-types", "vitest"],
|
|
1396
1396
|
}),
|
|
1397
1397
|
},
|
|
1398
1398
|
error: undefined,
|