wrangler 2.1.14 → 2.2.0
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/miniflare-dist/index.mjs +3 -1
- package/package.json +2 -1
- package/src/__tests__/access.test.ts +25 -0
- package/src/__tests__/api-dev.test.ts +1 -1
- package/src/__tests__/api-devregistry.test.js +2 -2
- package/src/__tests__/configuration.test.ts +119 -2
- package/src/__tests__/d1.test.ts +2 -0
- package/src/__tests__/deployments.test.ts +22 -22
- package/src/__tests__/dev.test.tsx +167 -15
- package/src/__tests__/helpers/msw/handlers/access.ts +13 -0
- package/src/__tests__/helpers/msw/handlers/deployments.ts +22 -43
- package/src/__tests__/helpers/msw/handlers/zones.ts +22 -0
- package/src/__tests__/helpers/msw/index.ts +4 -0
- package/src/__tests__/index.test.ts +42 -33
- package/src/__tests__/init.test.ts +88 -4
- package/src/__tests__/jest.setup.ts +11 -0
- package/src/__tests__/kv.test.ts +400 -400
- package/src/__tests__/pages.test.ts +140 -28
- package/src/__tests__/publish.test.ts +1161 -647
- package/src/__tests__/pubsub.test.ts +3 -0
- package/src/__tests__/queues.test.ts +371 -0
- package/src/__tests__/r2.test.ts +57 -52
- package/src/__tests__/worker-namespace.test.ts +15 -10
- package/src/bundle-reporter.tsx +41 -2
- package/src/bundle.ts +59 -30
- package/src/cli.ts +0 -1
- package/src/config/environment.ts +50 -0
- package/src/config/index.ts +41 -0
- package/src/config/validation.ts +173 -0
- package/src/create-worker-preview.ts +10 -3
- package/src/create-worker-upload-form.ts +12 -0
- package/src/d1/backups.tsx +11 -5
- package/src/d1/execute.tsx +52 -47
- package/src/d1/index.ts +2 -1
- package/src/delete.ts +7 -10
- package/src/deployments.ts +73 -0
- package/src/deprecated/index.ts +9 -24
- package/src/dev/dev-vars.ts +11 -8
- package/src/dev/dev.tsx +12 -0
- package/src/dev/local.tsx +26 -0
- package/src/dev/remote.tsx +2 -0
- package/src/dev/start-server.ts +7 -0
- package/src/dev/use-esbuild.ts +12 -5
- package/src/dev.tsx +12 -9
- package/src/dispatch-namespace.ts +4 -3
- package/src/index.tsx +61 -45
- package/src/init.ts +4 -4
- package/src/inspect.ts +21 -1
- package/src/is-interactive.ts +4 -0
- package/src/kv/index.ts +5 -54
- package/src/logger.ts +12 -0
- package/src/pages/constants.ts +2 -0
- package/src/pages/upload.tsx +42 -15
- package/src/proxy.ts +38 -6
- package/src/publish/index.ts +11 -8
- package/src/publish/publish.ts +151 -30
- package/src/pubsub/pubsub-commands.tsx +3 -2
- package/src/queues/cli/commands/consumer/add.ts +71 -0
- package/src/queues/cli/commands/consumer/index.ts +22 -0
- package/src/queues/cli/commands/consumer/remove.ts +38 -0
- package/src/queues/cli/commands/create.ts +25 -0
- package/src/queues/cli/commands/delete.ts +26 -0
- package/src/queues/cli/commands/index.ts +33 -0
- package/src/queues/cli/commands/list.ts +25 -0
- package/src/queues/client.ts +135 -0
- package/src/secret/index.ts +14 -39
- package/src/tail/index.ts +5 -8
- package/src/user/access.ts +69 -0
- package/src/worker.ts +7 -0
- package/src/yargs-types.ts +15 -2
- package/src/zones.ts +31 -5
- package/templates/pages-template-plugin.ts +4 -0
- package/templates/pages-template-worker.ts +21 -4
- package/wrangler-dist/cli.d.ts +42 -0
- package/wrangler-dist/cli.js +4559 -3228
package/src/__tests__/kv.test.ts
CHANGED
|
@@ -57,28 +57,28 @@ describe("wrangler", () => {
|
|
|
57
57
|
`"Not enough non-option arguments: got 0, need at least 1"`
|
|
58
58
|
);
|
|
59
59
|
expect(std.out).toMatchInlineSnapshot(`
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
"
|
|
61
|
+
wrangler kv:namespace create <namespace>
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Create a new namespace
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
Positionals:
|
|
66
|
+
namespace The name of the new namespace [string] [required]
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
Flags:
|
|
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]
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
`);
|
|
74
|
+
Options:
|
|
75
|
+
--preview Interact with a preview namespace [boolean]"
|
|
76
|
+
`);
|
|
77
77
|
expect(std.err).toMatchInlineSnapshot(`
|
|
78
|
-
|
|
78
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mNot enough non-option arguments: got 0, need at least 1[0m
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
"
|
|
81
|
+
`);
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
it("should error if the namespace to create contains spaces", async () => {
|
|
@@ -88,28 +88,28 @@ describe("wrangler", () => {
|
|
|
88
88
|
`"Unknown arguments: def, ghi"`
|
|
89
89
|
);
|
|
90
90
|
expect(std.out).toMatchInlineSnapshot(`
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
"
|
|
92
|
+
wrangler kv:namespace create <namespace>
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
Create a new namespace
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
Positionals:
|
|
97
|
+
namespace The name of the new namespace [string] [required]
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
Flags:
|
|
100
|
+
-c, --config Path to .toml configuration file [string]
|
|
101
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
102
|
+
-h, --help Show help [boolean]
|
|
103
|
+
-v, --version Show version number [boolean]
|
|
103
104
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
`);
|
|
105
|
+
Options:
|
|
106
|
+
--preview Interact with a preview namespace [boolean]"
|
|
107
|
+
`);
|
|
108
108
|
expect(std.err).toMatchInlineSnapshot(`
|
|
109
|
-
|
|
109
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mUnknown arguments: def, ghi[0m
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
"
|
|
112
|
+
`);
|
|
113
113
|
});
|
|
114
114
|
|
|
115
115
|
it("should error if the namespace to create is not valid", async () => {
|
|
@@ -120,50 +120,50 @@ describe("wrangler", () => {
|
|
|
120
120
|
);
|
|
121
121
|
|
|
122
122
|
expect(std.out).toMatchInlineSnapshot(`
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
"
|
|
124
|
+
wrangler kv:namespace create <namespace>
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Create a new namespace
|
|
127
127
|
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
Positionals:
|
|
129
|
+
namespace The name of the new namespace [string] [required]
|
|
130
130
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
Flags:
|
|
132
|
+
-c, --config Path to .toml configuration file [string]
|
|
133
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
134
|
+
-h, --help Show help [boolean]
|
|
135
|
+
-v, --version Show version number [boolean]
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
`);
|
|
137
|
+
Options:
|
|
138
|
+
--preview Interact with a preview namespace [boolean]"
|
|
139
|
+
`);
|
|
140
140
|
expect(std.err).toMatchInlineSnapshot(`
|
|
141
|
-
|
|
141
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mThe namespace binding name \\"abc-def\\" is invalid. It can only have alphanumeric and _ characters, and cannot begin with a number.[0m
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
"
|
|
144
|
+
`);
|
|
145
145
|
});
|
|
146
146
|
|
|
147
147
|
it("should create a namespace", async () => {
|
|
148
148
|
mockCreateRequest("worker-UnitTestNamespace");
|
|
149
149
|
await runWrangler("kv:namespace create UnitTestNamespace");
|
|
150
150
|
expect(std.out).toMatchInlineSnapshot(`
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
151
|
+
"🌀 Creating namespace with title \\"worker-UnitTestNamespace\\"
|
|
152
|
+
✨ Success!
|
|
153
|
+
Add the following to your configuration file in your kv_namespaces array:
|
|
154
|
+
{ binding = \\"UnitTestNamespace\\", id = \\"some-namespace-id\\" }"
|
|
155
|
+
`);
|
|
156
156
|
});
|
|
157
157
|
|
|
158
158
|
it("should create a preview namespace if configured to do so", async () => {
|
|
159
159
|
mockCreateRequest("worker-UnitTestNamespace_preview");
|
|
160
160
|
await runWrangler("kv:namespace create UnitTestNamespace --preview");
|
|
161
161
|
expect(std.out).toMatchInlineSnapshot(`
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
162
|
+
"🌀 Creating namespace with title \\"worker-UnitTestNamespace_preview\\"
|
|
163
|
+
✨ Success!
|
|
164
|
+
Add the following to your configuration file in your kv_namespaces array:
|
|
165
|
+
{ binding = \\"UnitTestNamespace\\", preview_id = \\"some-namespace-id\\" }"
|
|
166
|
+
`);
|
|
167
167
|
});
|
|
168
168
|
|
|
169
169
|
it("should create a namespace using configured worker name", async () => {
|
|
@@ -171,11 +171,11 @@ describe("wrangler", () => {
|
|
|
171
171
|
mockCreateRequest("other-worker-UnitTestNamespace");
|
|
172
172
|
await runWrangler("kv:namespace create UnitTestNamespace");
|
|
173
173
|
expect(std.out).toMatchInlineSnapshot(`
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
"🌀 Creating namespace with title \\"other-worker-UnitTestNamespace\\"
|
|
175
|
+
✨ Success!
|
|
176
|
+
Add the following to your configuration file in your kv_namespaces array:
|
|
177
|
+
{ binding = \\"UnitTestNamespace\\", id = \\"some-namespace-id\\" }"
|
|
178
|
+
`);
|
|
179
179
|
});
|
|
180
180
|
|
|
181
181
|
it("should create a namespace in an environment if configured to do so", async () => {
|
|
@@ -184,11 +184,11 @@ describe("wrangler", () => {
|
|
|
184
184
|
"kv:namespace create UnitTestNamespace --env customEnv"
|
|
185
185
|
);
|
|
186
186
|
expect(std.out).toMatchInlineSnapshot(`
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
187
|
+
"🌀 Creating namespace with title \\"worker-customEnv-UnitTestNamespace\\"
|
|
188
|
+
✨ Success!
|
|
189
|
+
Add the following to your configuration file in your kv_namespaces array under [env.customEnv]:
|
|
190
|
+
{ binding = \\"UnitTestNamespace\\", id = \\"some-namespace-id\\" }"
|
|
191
|
+
`);
|
|
192
192
|
});
|
|
193
193
|
});
|
|
194
194
|
|
|
@@ -290,12 +290,12 @@ describe("wrangler", () => {
|
|
|
290
290
|
A namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\"."
|
|
291
291
|
`);
|
|
292
292
|
expect(std.err).toMatchInlineSnapshot(`
|
|
293
|
-
|
|
293
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mNot able to delete namespace.[0m
|
|
294
294
|
|
|
295
|
-
|
|
295
|
+
A namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\".
|
|
296
296
|
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
"
|
|
298
|
+
`);
|
|
299
299
|
});
|
|
300
300
|
|
|
301
301
|
it("should delete a namespace specified by binding name in a given environment", async () => {
|
|
@@ -531,35 +531,35 @@ describe("wrangler", () => {
|
|
|
531
531
|
);
|
|
532
532
|
|
|
533
533
|
expect(std.out).toMatchInlineSnapshot(`
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
534
|
+
"
|
|
535
|
+
wrangler kv:key put <key> [value]
|
|
536
|
+
|
|
537
|
+
Writes a single key/value pair to the given namespace.
|
|
538
|
+
|
|
539
|
+
Positionals:
|
|
540
|
+
key The key to write to [string] [required]
|
|
541
|
+
value The value to write [string]
|
|
542
|
+
|
|
543
|
+
Flags:
|
|
544
|
+
-c, --config Path to .toml configuration file [string]
|
|
545
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
546
|
+
-h, --help Show help [boolean]
|
|
547
|
+
-v, --version Show version number [boolean]
|
|
548
|
+
|
|
549
|
+
Options:
|
|
550
|
+
--binding The binding of the namespace to write to [string]
|
|
551
|
+
--namespace-id The id of the namespace to write to [string]
|
|
552
|
+
--preview Interact with a preview namespace [boolean]
|
|
553
|
+
--ttl Time for which the entries should be visible [number]
|
|
554
|
+
--expiration Time since the UNIX epoch after which the entry expires [number]
|
|
555
|
+
--metadata Arbitrary JSON that is associated with a key [string]
|
|
556
|
+
--path Read value from the file at a given path [string]"
|
|
557
|
+
`);
|
|
558
558
|
expect(std.err).toMatchInlineSnapshot(`
|
|
559
|
-
|
|
559
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mNot enough non-option arguments: got 0, need at least 1[0m
|
|
560
560
|
|
|
561
|
-
|
|
562
|
-
|
|
561
|
+
"
|
|
562
|
+
`);
|
|
563
563
|
});
|
|
564
564
|
|
|
565
565
|
it("should error if no binding nor namespace is provided", async () => {
|
|
@@ -570,35 +570,35 @@ describe("wrangler", () => {
|
|
|
570
570
|
);
|
|
571
571
|
|
|
572
572
|
expect(std.out).toMatchInlineSnapshot(`
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
573
|
+
"
|
|
574
|
+
wrangler kv:key put <key> [value]
|
|
575
|
+
|
|
576
|
+
Writes a single key/value pair to the given namespace.
|
|
577
|
+
|
|
578
|
+
Positionals:
|
|
579
|
+
key The key to write to [string] [required]
|
|
580
|
+
value The value to write [string]
|
|
581
|
+
|
|
582
|
+
Flags:
|
|
583
|
+
-c, --config Path to .toml configuration file [string]
|
|
584
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
585
|
+
-h, --help Show help [boolean]
|
|
586
|
+
-v, --version Show version number [boolean]
|
|
587
|
+
|
|
588
|
+
Options:
|
|
589
|
+
--binding The binding of the namespace to write to [string]
|
|
590
|
+
--namespace-id The id of the namespace to write to [string]
|
|
591
|
+
--preview Interact with a preview namespace [boolean]
|
|
592
|
+
--ttl Time for which the entries should be visible [number]
|
|
593
|
+
--expiration Time since the UNIX epoch after which the entry expires [number]
|
|
594
|
+
--metadata Arbitrary JSON that is associated with a key [string]
|
|
595
|
+
--path Read value from the file at a given path [string]"
|
|
596
|
+
`);
|
|
597
597
|
expect(std.err).toMatchInlineSnapshot(`
|
|
598
|
-
|
|
598
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mExactly one of the arguments binding and namespace-id is required[0m
|
|
599
599
|
|
|
600
|
-
|
|
601
|
-
|
|
600
|
+
"
|
|
601
|
+
`);
|
|
602
602
|
});
|
|
603
603
|
|
|
604
604
|
it("should error if both binding and namespace is provided", async () => {
|
|
@@ -609,35 +609,35 @@ describe("wrangler", () => {
|
|
|
609
609
|
);
|
|
610
610
|
|
|
611
611
|
expect(std.out).toMatchInlineSnapshot(`
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
612
|
+
"
|
|
613
|
+
wrangler kv:key put <key> [value]
|
|
614
|
+
|
|
615
|
+
Writes a single key/value pair to the given namespace.
|
|
616
|
+
|
|
617
|
+
Positionals:
|
|
618
|
+
key The key to write to [string] [required]
|
|
619
|
+
value The value to write [string]
|
|
620
|
+
|
|
621
|
+
Flags:
|
|
622
|
+
-c, --config Path to .toml configuration file [string]
|
|
623
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
624
|
+
-h, --help Show help [boolean]
|
|
625
|
+
-v, --version Show version number [boolean]
|
|
626
|
+
|
|
627
|
+
Options:
|
|
628
|
+
--binding The binding of the namespace to write to [string]
|
|
629
|
+
--namespace-id The id of the namespace to write to [string]
|
|
630
|
+
--preview Interact with a preview namespace [boolean]
|
|
631
|
+
--ttl Time for which the entries should be visible [number]
|
|
632
|
+
--expiration Time since the UNIX epoch after which the entry expires [number]
|
|
633
|
+
--metadata Arbitrary JSON that is associated with a key [string]
|
|
634
|
+
--path Read value from the file at a given path [string]"
|
|
635
|
+
`);
|
|
636
636
|
expect(std.err).toMatchInlineSnapshot(`
|
|
637
|
-
|
|
637
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mArguments binding and namespace-id are mutually exclusive[0m
|
|
638
638
|
|
|
639
|
-
|
|
640
|
-
|
|
639
|
+
"
|
|
640
|
+
`);
|
|
641
641
|
});
|
|
642
642
|
|
|
643
643
|
it("should error if no value nor path is provided", async () => {
|
|
@@ -648,35 +648,35 @@ describe("wrangler", () => {
|
|
|
648
648
|
);
|
|
649
649
|
|
|
650
650
|
expect(std.out).toMatchInlineSnapshot(`
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
651
|
+
"
|
|
652
|
+
wrangler kv:key put <key> [value]
|
|
653
|
+
|
|
654
|
+
Writes a single key/value pair to the given namespace.
|
|
655
|
+
|
|
656
|
+
Positionals:
|
|
657
|
+
key The key to write to [string] [required]
|
|
658
|
+
value The value to write [string]
|
|
659
|
+
|
|
660
|
+
Flags:
|
|
661
|
+
-c, --config Path to .toml configuration file [string]
|
|
662
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
663
|
+
-h, --help Show help [boolean]
|
|
664
|
+
-v, --version Show version number [boolean]
|
|
665
|
+
|
|
666
|
+
Options:
|
|
667
|
+
--binding The binding of the namespace to write to [string]
|
|
668
|
+
--namespace-id The id of the namespace to write to [string]
|
|
669
|
+
--preview Interact with a preview namespace [boolean]
|
|
670
|
+
--ttl Time for which the entries should be visible [number]
|
|
671
|
+
--expiration Time since the UNIX epoch after which the entry expires [number]
|
|
672
|
+
--metadata Arbitrary JSON that is associated with a key [string]
|
|
673
|
+
--path Read value from the file at a given path [string]"
|
|
674
|
+
`);
|
|
675
675
|
expect(std.err).toMatchInlineSnapshot(`
|
|
676
|
-
|
|
676
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mExactly one of the arguments value and path is required[0m
|
|
677
677
|
|
|
678
|
-
|
|
679
|
-
|
|
678
|
+
"
|
|
679
|
+
`);
|
|
680
680
|
});
|
|
681
681
|
|
|
682
682
|
it("should error if both value and path is provided", async () => {
|
|
@@ -687,35 +687,35 @@ describe("wrangler", () => {
|
|
|
687
687
|
);
|
|
688
688
|
|
|
689
689
|
expect(std.out).toMatchInlineSnapshot(`
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
690
|
+
"
|
|
691
|
+
wrangler kv:key put <key> [value]
|
|
692
|
+
|
|
693
|
+
Writes a single key/value pair to the given namespace.
|
|
694
|
+
|
|
695
|
+
Positionals:
|
|
696
|
+
key The key to write to [string] [required]
|
|
697
|
+
value The value to write [string]
|
|
698
|
+
|
|
699
|
+
Flags:
|
|
700
|
+
-c, --config Path to .toml configuration file [string]
|
|
701
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
702
|
+
-h, --help Show help [boolean]
|
|
703
|
+
-v, --version Show version number [boolean]
|
|
704
|
+
|
|
705
|
+
Options:
|
|
706
|
+
--binding The binding of the namespace to write to [string]
|
|
707
|
+
--namespace-id The id of the namespace to write to [string]
|
|
708
|
+
--preview Interact with a preview namespace [boolean]
|
|
709
|
+
--ttl Time for which the entries should be visible [number]
|
|
710
|
+
--expiration Time since the UNIX epoch after which the entry expires [number]
|
|
711
|
+
--metadata Arbitrary JSON that is associated with a key [string]
|
|
712
|
+
--path Read value from the file at a given path [string]"
|
|
713
|
+
`);
|
|
714
714
|
expect(std.err).toMatchInlineSnapshot(`
|
|
715
|
-
|
|
715
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mArguments value and path are mutually exclusive[0m
|
|
716
716
|
|
|
717
|
-
|
|
718
|
-
|
|
717
|
+
"
|
|
718
|
+
`);
|
|
719
719
|
});
|
|
720
720
|
|
|
721
721
|
it("should error if a given binding name is not in the configured kv namespaces", async () => {
|
|
@@ -727,14 +727,14 @@ describe("wrangler", () => {
|
|
|
727
727
|
);
|
|
728
728
|
|
|
729
729
|
expect(std.out).toMatchInlineSnapshot(`
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
730
|
+
"
|
|
731
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
732
|
+
`);
|
|
733
733
|
expect(std.err).toMatchInlineSnapshot(`
|
|
734
|
-
|
|
734
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mA namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\".[0m
|
|
735
735
|
|
|
736
|
-
|
|
737
|
-
|
|
736
|
+
"
|
|
737
|
+
`);
|
|
738
738
|
});
|
|
739
739
|
|
|
740
740
|
it("should error if a given binding has both preview and non-preview and --preview is not specified", async () => {
|
|
@@ -749,14 +749,14 @@ describe("wrangler", () => {
|
|
|
749
749
|
`"someBinding has both a namespace ID and a preview ID. Specify \\"--preview\\" or \\"--preview false\\" to avoid writing data to the wrong namespace."`
|
|
750
750
|
);
|
|
751
751
|
expect(std.out).toMatchInlineSnapshot(`
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
752
|
+
"
|
|
753
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
754
|
+
`);
|
|
755
755
|
expect(std.err).toMatchInlineSnapshot(`
|
|
756
|
-
|
|
756
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1msomeBinding has both a namespace ID and a preview ID. Specify \\"--preview\\" or \\"--preview false\\" to avoid writing data to the wrong namespace.[0m
|
|
757
757
|
|
|
758
|
-
|
|
759
|
-
|
|
758
|
+
"
|
|
759
|
+
`);
|
|
760
760
|
expect(requests.count).toEqual(0);
|
|
761
761
|
});
|
|
762
762
|
});
|
|
@@ -772,20 +772,20 @@ describe("wrangler", () => {
|
|
|
772
772
|
await runWrangler("kv:key list --namespace-id some-namespace-id");
|
|
773
773
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
774
774
|
expect(std.out).toMatchInlineSnapshot(`
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
775
|
+
"[
|
|
776
|
+
{
|
|
777
|
+
\\"name\\": \\"key-1\\"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
\\"name\\": \\"key-2\\",
|
|
781
|
+
\\"expiration\\": 123456789
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
\\"name\\": \\"key-3\\",
|
|
785
|
+
\\"expiration_ttl\\": 666
|
|
786
|
+
}
|
|
787
|
+
]"
|
|
788
|
+
`);
|
|
789
789
|
});
|
|
790
790
|
|
|
791
791
|
it("should list the keys of a namespace specified by binding", async () => {
|
|
@@ -796,18 +796,18 @@ describe("wrangler", () => {
|
|
|
796
796
|
await runWrangler("kv:key list --binding someBinding");
|
|
797
797
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
798
798
|
expect(std.out).toMatchInlineSnapshot(`
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
799
|
+
"[
|
|
800
|
+
{
|
|
801
|
+
\\"name\\": \\"key-1\\"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
\\"name\\": \\"key-2\\"
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
\\"name\\": \\"key-3\\"
|
|
808
|
+
}
|
|
809
|
+
]"
|
|
810
|
+
`);
|
|
811
811
|
});
|
|
812
812
|
|
|
813
813
|
it("should list the keys of a preview namespace specified by binding", async () => {
|
|
@@ -817,18 +817,18 @@ describe("wrangler", () => {
|
|
|
817
817
|
await runWrangler("kv:key list --binding someBinding --preview");
|
|
818
818
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
819
819
|
expect(std.out).toMatchInlineSnapshot(`
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
820
|
+
"[
|
|
821
|
+
{
|
|
822
|
+
\\"name\\": \\"key-1\\"
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
\\"name\\": \\"key-2\\"
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
\\"name\\": \\"key-3\\"
|
|
829
|
+
}
|
|
830
|
+
]"
|
|
831
|
+
`);
|
|
832
832
|
});
|
|
833
833
|
|
|
834
834
|
it("should list the keys of a namespace specified by binding, in a given environment", async () => {
|
|
@@ -840,18 +840,18 @@ describe("wrangler", () => {
|
|
|
840
840
|
);
|
|
841
841
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
842
842
|
expect(std.out).toMatchInlineSnapshot(`
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
843
|
+
"[
|
|
844
|
+
{
|
|
845
|
+
\\"name\\": \\"key-1\\"
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
\\"name\\": \\"key-2\\"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
\\"name\\": \\"key-3\\"
|
|
852
|
+
}
|
|
853
|
+
]"
|
|
854
|
+
`);
|
|
855
855
|
});
|
|
856
856
|
|
|
857
857
|
it("should list the keys of a preview namespace specified by binding, in a given environment", async () => {
|
|
@@ -863,18 +863,18 @@ describe("wrangler", () => {
|
|
|
863
863
|
);
|
|
864
864
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
865
865
|
expect(std.out).toMatchInlineSnapshot(`
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
866
|
+
"[
|
|
867
|
+
{
|
|
868
|
+
\\"name\\": \\"key-1\\"
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
\\"name\\": \\"key-2\\"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
\\"name\\": \\"key-3\\"
|
|
875
|
+
}
|
|
876
|
+
]"
|
|
877
|
+
`);
|
|
878
878
|
});
|
|
879
879
|
|
|
880
880
|
// We'll run the next test with variations on the cursor
|
|
@@ -915,14 +915,14 @@ describe("wrangler", () => {
|
|
|
915
915
|
`"A namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\"."`
|
|
916
916
|
);
|
|
917
917
|
expect(std.err).toMatchInlineSnapshot(`
|
|
918
|
-
|
|
918
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mA namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\".[0m
|
|
919
919
|
|
|
920
|
-
|
|
921
|
-
|
|
920
|
+
"
|
|
921
|
+
`);
|
|
922
922
|
expect(std.out).toMatchInlineSnapshot(`
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
923
|
+
"
|
|
924
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
925
|
+
`);
|
|
926
926
|
});
|
|
927
927
|
});
|
|
928
928
|
|
|
@@ -955,13 +955,13 @@ describe("wrangler", () => {
|
|
|
955
955
|
);
|
|
956
956
|
expect(proc.write).not.toEqual(Buffer.from("my-value"));
|
|
957
957
|
expect(std).toMatchInlineSnapshot(`
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
958
|
+
Object {
|
|
959
|
+
"debug": "",
|
|
960
|
+
"err": "",
|
|
961
|
+
"out": "my-value",
|
|
962
|
+
"warn": "",
|
|
963
|
+
}
|
|
964
|
+
`);
|
|
965
965
|
});
|
|
966
966
|
|
|
967
967
|
it("should get a binary and decode as utf8 text, resulting in improper decoding", async () => {
|
|
@@ -1064,31 +1064,31 @@ describe("wrangler", () => {
|
|
|
1064
1064
|
`"Not enough non-option arguments: got 0, need at least 1"`
|
|
1065
1065
|
);
|
|
1066
1066
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1067
|
+
"
|
|
1068
|
+
wrangler kv:key get <key>
|
|
1069
|
+
|
|
1070
|
+
Reads a single value by key from the given namespace.
|
|
1071
|
+
|
|
1072
|
+
Positionals:
|
|
1073
|
+
key The key value to get. [string] [required]
|
|
1074
|
+
|
|
1075
|
+
Flags:
|
|
1076
|
+
-c, --config Path to .toml configuration file [string]
|
|
1077
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
1078
|
+
-h, --help Show help [boolean]
|
|
1079
|
+
-v, --version Show version number [boolean]
|
|
1080
|
+
|
|
1081
|
+
Options:
|
|
1082
|
+
--binding The name of the namespace to get from [string]
|
|
1083
|
+
--namespace-id The id of the namespace to get from [string]
|
|
1084
|
+
--preview Interact with a preview namespace [boolean] [default: false]
|
|
1085
|
+
--text Decode the returned value as a utf8 string [boolean] [default: false]"
|
|
1086
|
+
`);
|
|
1087
1087
|
expect(std.err).toMatchInlineSnapshot(`
|
|
1088
|
-
|
|
1088
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mNot enough non-option arguments: got 0, need at least 1[0m
|
|
1089
1089
|
|
|
1090
|
-
|
|
1091
|
-
|
|
1090
|
+
"
|
|
1091
|
+
`);
|
|
1092
1092
|
});
|
|
1093
1093
|
|
|
1094
1094
|
it("should error if no binding nor namespace is provided", async () => {
|
|
@@ -1098,31 +1098,31 @@ describe("wrangler", () => {
|
|
|
1098
1098
|
`"Exactly one of the arguments binding and namespace-id is required"`
|
|
1099
1099
|
);
|
|
1100
1100
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1101
|
+
"
|
|
1102
|
+
wrangler kv:key get <key>
|
|
1103
|
+
|
|
1104
|
+
Reads a single value by key from the given namespace.
|
|
1105
|
+
|
|
1106
|
+
Positionals:
|
|
1107
|
+
key The key value to get. [string] [required]
|
|
1108
|
+
|
|
1109
|
+
Flags:
|
|
1110
|
+
-c, --config Path to .toml configuration file [string]
|
|
1111
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
1112
|
+
-h, --help Show help [boolean]
|
|
1113
|
+
-v, --version Show version number [boolean]
|
|
1114
|
+
|
|
1115
|
+
Options:
|
|
1116
|
+
--binding The name of the namespace to get from [string]
|
|
1117
|
+
--namespace-id The id of the namespace to get from [string]
|
|
1118
|
+
--preview Interact with a preview namespace [boolean] [default: false]
|
|
1119
|
+
--text Decode the returned value as a utf8 string [boolean] [default: false]"
|
|
1120
|
+
`);
|
|
1121
1121
|
expect(std.err).toMatchInlineSnapshot(`
|
|
1122
|
-
|
|
1122
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mExactly one of the arguments binding and namespace-id is required[0m
|
|
1123
1123
|
|
|
1124
|
-
|
|
1125
|
-
|
|
1124
|
+
"
|
|
1125
|
+
`);
|
|
1126
1126
|
});
|
|
1127
1127
|
|
|
1128
1128
|
it("should error if both binding and namespace is provided", async () => {
|
|
@@ -1133,31 +1133,31 @@ describe("wrangler", () => {
|
|
|
1133
1133
|
);
|
|
1134
1134
|
|
|
1135
1135
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1136
|
+
"
|
|
1137
|
+
wrangler kv:key get <key>
|
|
1138
|
+
|
|
1139
|
+
Reads a single value by key from the given namespace.
|
|
1140
|
+
|
|
1141
|
+
Positionals:
|
|
1142
|
+
key The key value to get. [string] [required]
|
|
1143
|
+
|
|
1144
|
+
Flags:
|
|
1145
|
+
-c, --config Path to .toml configuration file [string]
|
|
1146
|
+
-e, --env Environment to use for operations and .env files [string]
|
|
1147
|
+
-h, --help Show help [boolean]
|
|
1148
|
+
-v, --version Show version number [boolean]
|
|
1149
|
+
|
|
1150
|
+
Options:
|
|
1151
|
+
--binding The name of the namespace to get from [string]
|
|
1152
|
+
--namespace-id The id of the namespace to get from [string]
|
|
1153
|
+
--preview Interact with a preview namespace [boolean] [default: false]
|
|
1154
|
+
--text Decode the returned value as a utf8 string [boolean] [default: false]"
|
|
1155
|
+
`);
|
|
1156
1156
|
expect(std.err).toMatchInlineSnapshot(`
|
|
1157
|
-
|
|
1157
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mArguments binding and namespace-id are mutually exclusive[0m
|
|
1158
1158
|
|
|
1159
|
-
|
|
1160
|
-
|
|
1159
|
+
"
|
|
1160
|
+
`);
|
|
1161
1161
|
});
|
|
1162
1162
|
|
|
1163
1163
|
it("should error if a given binding name is not in the configured kv namespaces", async () => {
|
|
@@ -1168,14 +1168,14 @@ describe("wrangler", () => {
|
|
|
1168
1168
|
`"A namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\"."`
|
|
1169
1169
|
);
|
|
1170
1170
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1171
|
+
"
|
|
1172
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
1173
|
+
`);
|
|
1174
1174
|
expect(std.err).toMatchInlineSnapshot(`
|
|
1175
|
-
|
|
1175
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mA namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\".[0m
|
|
1176
1176
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1177
|
+
"
|
|
1178
|
+
`);
|
|
1179
1179
|
});
|
|
1180
1180
|
|
|
1181
1181
|
describe("non-interactive", () => {
|
|
@@ -1313,10 +1313,10 @@ describe("wrangler", () => {
|
|
|
1313
1313
|
);
|
|
1314
1314
|
|
|
1315
1315
|
expect(std.err).toMatchInlineSnapshot(`
|
|
1316
|
-
|
|
1316
|
+
"[31mX [41;31m[[41;97mERROR[41;31m][0m [1mA namespace with binding name \\"otherBinding\\" was not found in the configured \\"kv_namespaces\\".[0m
|
|
1317
1317
|
|
|
1318
|
-
|
|
1319
|
-
|
|
1318
|
+
"
|
|
1319
|
+
`);
|
|
1320
1320
|
});
|
|
1321
1321
|
|
|
1322
1322
|
it("should delete a key in a namespace specified by binding name in a given environment", async () => {
|
|
@@ -1399,12 +1399,12 @@ describe("wrangler", () => {
|
|
|
1399
1399
|
);
|
|
1400
1400
|
expect(requests.count).toEqual(3);
|
|
1401
1401
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1402
|
+
"Uploaded 0% (0 out of 12,000)
|
|
1403
|
+
Uploaded 41% (5,000 out of 12,000)
|
|
1404
|
+
Uploaded 83% (10,000 out of 12,000)
|
|
1405
|
+
Uploaded 100% (12,000 out of 12,000)
|
|
1406
|
+
Success!"
|
|
1407
|
+
`);
|
|
1408
1408
|
expect(std.warn).toMatchInlineSnapshot(`""`);
|
|
1409
1409
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
1410
1410
|
});
|
|
@@ -1419,9 +1419,9 @@ describe("wrangler", () => {
|
|
|
1419
1419
|
Expected an array of key-value objects but got type \\"object\\"."
|
|
1420
1420
|
`);
|
|
1421
1421
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1422
|
+
"
|
|
1423
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
1424
|
+
`);
|
|
1425
1425
|
expect(std.warn).toMatchInlineSnapshot(`""`);
|
|
1426
1426
|
});
|
|
1427
1427
|
|
|
@@ -1481,16 +1481,16 @@ describe("wrangler", () => {
|
|
|
1481
1481
|
`);
|
|
1482
1482
|
|
|
1483
1483
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1484
|
+
"
|
|
1485
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
1486
|
+
`);
|
|
1487
1487
|
expect(std.warn).toMatchInlineSnapshot(`
|
|
1488
|
-
|
|
1488
|
+
"[33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1mUnexpected key-value properties in \\"keys.json\\".[0m
|
|
1489
1489
|
|
|
1490
|
-
|
|
1490
|
+
The item at index 5 contains unexpected properties: [\\"invalid\\"].
|
|
1491
1491
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1492
|
+
"
|
|
1493
|
+
`);
|
|
1494
1494
|
});
|
|
1495
1495
|
});
|
|
1496
1496
|
|
|
@@ -1552,12 +1552,12 @@ describe("wrangler", () => {
|
|
|
1552
1552
|
);
|
|
1553
1553
|
expect(requests.count).toEqual(3);
|
|
1554
1554
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1555
|
+
"Deleted 0% (0 out of 12,000)
|
|
1556
|
+
Deleted 41% (5,000 out of 12,000)
|
|
1557
|
+
Deleted 83% (10,000 out of 12,000)
|
|
1558
|
+
Deleted 100% (12,000 out of 12,000)
|
|
1559
|
+
Success!"
|
|
1560
|
+
`);
|
|
1561
1561
|
expect(std.warn).toMatchInlineSnapshot(`""`);
|
|
1562
1562
|
expect(std.err).toMatchInlineSnapshot(`""`);
|
|
1563
1563
|
});
|
|
@@ -1622,9 +1622,9 @@ describe("wrangler", () => {
|
|
|
1622
1622
|
12354"
|
|
1623
1623
|
`);
|
|
1624
1624
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1625
|
+
"
|
|
1626
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
1627
|
+
`);
|
|
1628
1628
|
expect(std.warn).toMatchInlineSnapshot(`""`);
|
|
1629
1629
|
});
|
|
1630
1630
|
|
|
@@ -1647,9 +1647,9 @@ describe("wrangler", () => {
|
|
|
1647
1647
|
The item at index 3 is type: \\"object\\" - null"
|
|
1648
1648
|
`);
|
|
1649
1649
|
expect(std.out).toMatchInlineSnapshot(`
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1650
|
+
"
|
|
1651
|
+
[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose[0m"
|
|
1652
|
+
`);
|
|
1653
1653
|
expect(std.warn).toMatchInlineSnapshot(`""`);
|
|
1654
1654
|
});
|
|
1655
1655
|
});
|