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
package/src/__tests__/r2.test.ts
CHANGED
|
@@ -39,10 +39,11 @@ describe("r2", () => {
|
|
|
39
39
|
wrangler r2 bucket delete <name> Delete an R2 bucket
|
|
40
40
|
|
|
41
41
|
Flags:
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
42
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
43
|
+
-c, --config Path to .toml configuration file [string]
|
|
44
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
45
|
+
-h, --help Show help [boolean]
|
|
46
|
+
-v, --version Show version number [boolean]"
|
|
46
47
|
`);
|
|
47
48
|
});
|
|
48
49
|
|
|
@@ -103,10 +104,11 @@ describe("r2", () => {
|
|
|
103
104
|
name The name of the new bucket [string] [required]
|
|
104
105
|
|
|
105
106
|
Flags:
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
107
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
108
|
+
-c, --config Path to .toml configuration file [string]
|
|
109
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
110
|
+
-h, --help Show help [boolean]
|
|
111
|
+
-v, --version Show version number [boolean]"
|
|
110
112
|
`);
|
|
111
113
|
expect(std.err).toMatchInlineSnapshot(`
|
|
112
114
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mNot enough non-option arguments: got 0, need at least 1[0m
|
|
@@ -131,10 +133,11 @@ describe("r2", () => {
|
|
|
131
133
|
name The name of the new bucket [string] [required]
|
|
132
134
|
|
|
133
135
|
Flags:
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
136
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
137
|
+
-c, --config Path to .toml configuration file [string]
|
|
138
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
139
|
+
-h, --help Show help [boolean]
|
|
140
|
+
-v, --version Show version number [boolean]"
|
|
138
141
|
`);
|
|
139
142
|
expect(std.err).toMatchInlineSnapshot(`
|
|
140
143
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mUnknown arguments: def, ghi[0m
|
|
@@ -180,10 +183,11 @@ describe("r2", () => {
|
|
|
180
183
|
name The name of the bucket to delete [string] [required]
|
|
181
184
|
|
|
182
185
|
Flags:
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
186
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
187
|
+
-c, --config Path to .toml configuration file [string]
|
|
188
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
189
|
+
-h, --help Show help [boolean]
|
|
190
|
+
-v, --version Show version number [boolean]"
|
|
187
191
|
`);
|
|
188
192
|
expect(std.err).toMatchInlineSnapshot(`
|
|
189
193
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mNot enough non-option arguments: got 0, need at least 1[0m
|
|
@@ -208,10 +212,11 @@ describe("r2", () => {
|
|
|
208
212
|
name The name of the bucket to delete [string] [required]
|
|
209
213
|
|
|
210
214
|
Flags:
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
-
|
|
214
|
-
-
|
|
215
|
+
-j, --experimental-json-config Experimental: Support wrangler.json [boolean]
|
|
216
|
+
-c, --config Path to .toml configuration file [string]
|
|
217
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
218
|
+
-h, --help Show help [boolean]
|
|
219
|
+
-v, --version Show version number [boolean]"
|
|
215
220
|
`);
|
|
216
221
|
expect(std.err).toMatchInlineSnapshot(`
|
|
217
222
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mUnknown arguments: def, ghi[0m
|
|
@@ -340,7 +340,7 @@ describe("wrangler secret", () => {
|
|
|
340
340
|
}
|
|
341
341
|
expect(std.out).toMatchInlineSnapshot(`
|
|
342
342
|
"
|
|
343
|
-
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/
|
|
343
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose[0m"
|
|
344
344
|
`);
|
|
345
345
|
expect(std.err).toMatchInlineSnapshot(`
|
|
346
346
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mRequired Worker name missing. Please specify the Worker name in wrangler.toml, or pass it as an argument with \`--name <worker-name>\`[0m
|
|
@@ -401,7 +401,7 @@ describe("wrangler secret", () => {
|
|
|
401
401
|
|
|
402
402
|
expect(std.out).toMatchInlineSnapshot(`
|
|
403
403
|
"
|
|
404
|
-
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/
|
|
404
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose[0m"
|
|
405
405
|
`);
|
|
406
406
|
expect(std.warn).toMatchInlineSnapshot(`""`);
|
|
407
407
|
});
|
|
@@ -572,7 +572,7 @@ describe("wrangler secret", () => {
|
|
|
572
572
|
}
|
|
573
573
|
expect(std.out).toMatchInlineSnapshot(`
|
|
574
574
|
"
|
|
575
|
-
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/
|
|
575
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose[0m"
|
|
576
576
|
`);
|
|
577
577
|
expect(std.err).toMatchInlineSnapshot(`
|
|
578
578
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mRequired Worker name missing. Please specify the Worker name in wrangler.toml, or pass it as an argument with \`--name <worker-name>\`[0m
|
|
@@ -678,7 +678,7 @@ describe("wrangler secret", () => {
|
|
|
678
678
|
}
|
|
679
679
|
expect(std.out).toMatchInlineSnapshot(`
|
|
680
680
|
"
|
|
681
|
-
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/
|
|
681
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose[0m"
|
|
682
682
|
`);
|
|
683
683
|
expect(std.err).toMatchInlineSnapshot(`
|
|
684
684
|
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mRequired Worker name missing. Please specify the Worker name in wrangler.toml, or pass it as an argument with \`--name <worker-name>\`[0m
|