Skip to content

Commit 350145c

Browse files
committed
fixup print bindings spacing
1 parent c3d5006 commit 350145c

File tree

8 files changed

+117
-0
lines changed

8 files changed

+117
-0
lines changed

packages/wrangler/src/__tests__/containers/deploy.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ describe("wrangler deploy with containers", () => {
123123
──────────────────
124124
Total Upload: xx KiB / gzip: xx KiB
125125
Worker Startup Time: 100 ms
126+
126127
Your Worker has access to the following bindings:
127128
Binding Resource
128129
env.EXAMPLE_DO_BINDING (ExampleDurableObject) Durable Object
@@ -201,6 +202,7 @@ describe("wrangler deploy with containers", () => {
201202
──────────────────
202203
Total Upload: xx KiB / gzip: xx KiB
203204
Worker Startup Time: 100 ms
205+
204206
Your Worker has access to the following bindings:
205207
Binding Resource
206208
env.EXAMPLE_DO_BINDING (ExampleDurableObject) Durable Object
@@ -392,6 +394,7 @@ describe("wrangler deploy with containers", () => {
392394
──────────────────
393395
Total Upload: xx KiB / gzip: xx KiB
394396
Worker Startup Time: 100 ms
397+
395398
Your Worker has access to the following bindings:
396399
Binding Resource
397400
env.EXAMPLE_DO_BINDING (ExampleDurableObject) Durable Object
@@ -541,6 +544,7 @@ describe("wrangler deploy with containers", () => {
541544
──────────────────
542545
Total Upload: xx KiB / gzip: xx KiB
543546
Worker Startup Time: 100 ms
547+
544548
Your Worker has access to the following bindings:
545549
Binding Resource
546550
env.EXAMPLE_DO_BINDING (ExampleDurableObject) Durable Object
@@ -2084,6 +2088,7 @@ describe("wrangler deploy with containers dry run", () => {
20842088
──────────────────
20852089
Total Upload: xx KiB / gzip: xx KiB
20862090
Building image my-container:worker
2091+
20872092
Your Worker has access to the following bindings:
20882093
Binding Resource
20892094
env.EXAMPLE_DO_BINDING (ExampleDurableObject) Durable Object
@@ -2114,6 +2119,7 @@ describe("wrangler deploy with containers dry run", () => {
21142119
⛅️ wrangler x.x.x
21152120
──────────────────
21162121
Total Upload: xx KiB / gzip: xx KiB
2122+
21172123
Your Worker has access to the following bindings:
21182124
Binding Resource
21192125
env.EXAMPLE_DO_BINDING (ExampleDurableObject) Durable Object

packages/wrangler/src/__tests__/deploy.test.ts

Lines changed: 68 additions & 0 deletions
Large diffs are not rendered by default.

packages/wrangler/src/__tests__/dev.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,7 @@ describe.sequential("wrangler dev", () => {
14911491
"
14921492
⛅️ wrangler x.x.x
14931493
──────────────────
1494+
14941495
Your Worker has access to the following bindings:
14951496
Binding Resource Mode
14961497
env.NAME_1 (CLASS_1) Durable Object local
@@ -1577,6 +1578,7 @@ describe.sequential("wrangler dev", () => {
15771578
⛅️ wrangler x.x.x
15781579
──────────────────
15791580
Using vars defined in .dev.vars
1581+
15801582
Your Worker has access to the following bindings:
15811583
Binding Resource Mode
15821584
env.VAR_1 (\\"(hidden)\\") Environment Variable local
@@ -1615,6 +1617,7 @@ describe.sequential("wrangler dev", () => {
16151617
⛅️ wrangler x.x.x
16161618
──────────────────
16171619
Using vars defined in .dev.vars.custom
1620+
16181621
Your Worker has access to the following bindings:
16191622
Binding Resource Mode
16201623
env.CUSTOM_VAR (\\"(hidden)\\") Environment Variable local
@@ -2022,6 +2025,7 @@ describe.sequential("wrangler dev", () => {
20222025
"
20232026
⛅️ wrangler x.x.x
20242027
──────────────────
2028+
20252029
Your Worker has access to the following bindings:
20262030
Binding Resource Mode
20272031
env.WorkerA (A) Worker local [not connected]
@@ -2050,6 +2054,7 @@ describe.sequential("wrangler dev", () => {
20502054
"
20512055
⛅️ wrangler x.x.x
20522056
──────────────────
2057+
20532058
Your Worker has access to the following bindings:
20542059
Binding Resource Mode
20552060
env.SELF (my-worker) Worker local [connected]
@@ -2075,6 +2080,7 @@ describe.sequential("wrangler dev", () => {
20752080
"
20762081
⛅️ wrangler x.x.x
20772082
──────────────────
2083+
20782084
Your Worker has access to the following bindings:
20792085
Binding Resource Mode
20802086
env.WorkerA (A) Worker local [not connected]
@@ -2106,6 +2112,7 @@ describe.sequential("wrangler dev", () => {
21062112
⛅️ wrangler x.x.x
21072113
──────────────────
21082114
Using vars defined in .dev.vars
2115+
21092116
Your Worker has access to the following bindings:
21102117
Binding Resource Mode
21112118
env.variable (123) Environment Variable local

packages/wrangler/src/__tests__/index.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ describe("wrangler", () => {
325325
⛅️ wrangler x.x.x
326326
──────────────────
327327
Total Upload: xx KiB / gzip: xx KiB
328+
328329
No bindings found.
330+
329331
--dry-run: exiting now."
330332
`);
331333
});

packages/wrangler/src/__tests__/provision.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ describe("resource provisioning", () => {
104104
──────────────────
105105
Total Upload: xx KiB / gzip: xx KiB
106106
Worker Startup Time: 100 ms
107+
107108
Your Worker has access to the following bindings:
108109
Binding Resource
109110
env.KV (inherited) KV Namespace
@@ -191,6 +192,7 @@ describe("resource provisioning", () => {
191192
──────────────────
192193
Total Upload: xx KiB / gzip: xx KiB
193194
195+
194196
Experimental: The following bindings need to be provisioned:
195197
Binding Resource
196198
env.KV KV Namespace
@@ -211,6 +213,7 @@ describe("resource provisioning", () => {
211213
🎉 All resources provisioned, continuing with deployment...
212214
213215
Worker Startup Time: 100 ms
216+
214217
Your Worker has access to the following bindings:
215218
Binding Resource
216219
env.KV (existing-kv-id) KV Namespace
@@ -312,6 +315,7 @@ describe("resource provisioning", () => {
312315
──────────────────
313316
Total Upload: xx KiB / gzip: xx KiB
314317
318+
315319
Experimental: The following bindings need to be provisioned:
316320
Binding Resource
317321
env.KV KV Namespace
@@ -332,6 +336,7 @@ describe("resource provisioning", () => {
332336
🎉 All resources provisioned, continuing with deployment...
333337
334338
Worker Startup Time: 100 ms
339+
335340
Your Worker has access to the following bindings:
336341
Binding Resource
337342
env.KV (existing-kv-id-1) KV Namespace
@@ -443,6 +448,7 @@ describe("resource provisioning", () => {
443448
──────────────────
444449
Total Upload: xx KiB / gzip: xx KiB
445450
451+
446452
Experimental: The following bindings need to be provisioned:
447453
Binding Resource
448454
env.KV KV Namespace
@@ -466,6 +472,7 @@ describe("resource provisioning", () => {
466472
🎉 All resources provisioned, continuing with deployment...
467473
468474
Worker Startup Time: 100 ms
475+
469476
Your Worker has access to the following bindings:
470477
Binding Resource
471478
env.KV (new-kv-id) KV Namespace
@@ -604,6 +611,7 @@ describe("resource provisioning", () => {
604611
──────────────────
605612
Total Upload: xx KiB / gzip: xx KiB
606613
614+
607615
Experimental: The following bindings need to be provisioned:
608616
Binding Resource
609617
env.KV KV Namespace
@@ -627,6 +635,7 @@ describe("resource provisioning", () => {
627635
🎉 All resources provisioned, continuing with deployment...
628636
629637
Worker Startup Time: 100 ms
638+
630639
Your Worker has access to the following bindings:
631640
Binding Resource
632641
env.KV (new-kv-id) KV Namespace
@@ -752,6 +761,7 @@ describe("resource provisioning", () => {
752761
──────────────────
753762
Total Upload: xx KiB / gzip: xx KiB
754763
764+
755765
Experimental: The following bindings need to be provisioned:
756766
Binding Resource
757767
env.KV KV Namespace
@@ -780,6 +790,7 @@ describe("resource provisioning", () => {
780790
🎉 All resources provisioned, continuing with deployment...
781791
782792
Worker Startup Time: 100 ms
793+
783794
Your Worker has access to the following bindings:
784795
Binding Resource
785796
env.KV (test-name-kv-id) KV Namespace
@@ -862,6 +873,7 @@ describe("resource provisioning", () => {
862873
──────────────────
863874
Total Upload: xx KiB / gzip: xx KiB
864875
876+
865877
Experimental: The following bindings need to be provisioned:
866878
Binding Resource
867879
env.D1 D1 Database
@@ -876,6 +888,7 @@ describe("resource provisioning", () => {
876888
🎉 All resources provisioned, continuing with deployment...
877889
878890
Worker Startup Time: 100 ms
891+
879892
Your Worker has access to the following bindings:
880893
Binding Resource
881894
env.D1 (prefilled-d1-name) D1 Database
@@ -922,6 +935,7 @@ describe("resource provisioning", () => {
922935
──────────────────
923936
Total Upload: xx KiB / gzip: xx KiB
924937
Worker Startup Time: 100 ms
938+
925939
Your Worker has access to the following bindings:
926940
Binding Resource
927941
env.D1 (inherited) D1 Database
@@ -991,6 +1005,7 @@ describe("resource provisioning", () => {
9911005
──────────────────
9921006
Total Upload: xx KiB / gzip: xx KiB
9931007
1008+
9941009
Experimental: The following bindings need to be provisioned:
9951010
Binding Resource
9961011
env.D1 D1 Database
@@ -1005,6 +1020,7 @@ describe("resource provisioning", () => {
10051020
🎉 All resources provisioned, continuing with deployment...
10061021
10071022
Worker Startup Time: 100 ms
1023+
10081024
Your Worker has access to the following bindings:
10091025
Binding Resource
10101026
env.D1 (new-d1-name) D1 Database
@@ -1070,6 +1086,7 @@ describe("resource provisioning", () => {
10701086
──────────────────
10711087
Total Upload: xx KiB / gzip: xx KiB
10721088
1089+
10731090
Experimental: The following bindings need to be provisioned:
10741091
Binding Resource
10751092
env.BUCKET R2 Bucket
@@ -1084,6 +1101,7 @@ describe("resource provisioning", () => {
10841101
🎉 All resources provisioned, continuing with deployment...
10851102
10861103
Worker Startup Time: 100 ms
1104+
10871105
Your Worker has access to the following bindings:
10881106
Binding Resource
10891107
env.BUCKET (prefilled-r2-name (eu)) R2 Bucket
@@ -1142,6 +1160,7 @@ describe("resource provisioning", () => {
11421160
──────────────────
11431161
Total Upload: xx KiB / gzip: xx KiB
11441162
Worker Startup Time: 100 ms
1163+
11451164
Your Worker has access to the following bindings:
11461165
Binding Resource
11471166
env.BUCKET (existing-bucket-name (eu)) R2 Bucket
@@ -1190,6 +1209,7 @@ describe("resource provisioning", () => {
11901209
──────────────────
11911210
Total Upload: xx KiB / gzip: xx KiB
11921211
Worker Startup Time: 100 ms
1212+
11931213
Your Worker has access to the following bindings:
11941214
Binding Resource
11951215
env.DB_NAME (existing-db-name) D1 Database
@@ -1266,6 +1286,7 @@ describe("resource provisioning", () => {
12661286
──────────────────
12671287
Total Upload: xx KiB / gzip: xx KiB
12681288
1289+
12691290
Experimental: The following bindings need to be provisioned:
12701291
Binding Resource
12711292
env.BUCKET R2 Bucket
@@ -1280,6 +1301,7 @@ describe("resource provisioning", () => {
12801301
🎉 All resources provisioned, continuing with deployment...
12811302
12821303
Worker Startup Time: 100 ms
1304+
12831305
Your Worker has access to the following bindings:
12841306
Binding Resource
12851307
env.BUCKET (existing-bucket-name (eu)) R2 Bucket

packages/wrangler/src/__tests__/versions/versions.upload.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ describe("versions upload", () => {
145145
──────────────────
146146
Total Upload: xx KiB / gzip: xx KiB
147147
Worker Startup Time: 500 ms
148+
148149
Your Worker has access to the following bindings:
149150
Binding Resource
150151
env.KV (xxxx-xxxx-xxxx-xxxx) KV Namespace
@@ -211,6 +212,7 @@ describe("versions upload", () => {
211212
──────────────────
212213
Total Upload: xx KiB / gzip: xx KiB
213214
Worker Startup Time: 500 ms
215+
214216
Your Worker has access to the following bindings:
215217
Binding Resource
216218
env.TEST (\\"test-string\\") Environment Variable
@@ -273,6 +275,7 @@ describe("versions upload", () => {
273275
──────────────────
274276
Total Upload: xx KiB / gzip: xx KiB
275277
Worker Startup Time: 500 ms
278+
276279
Your Worker has access to the following bindings:
277280
Binding Resource
278281
env.TEST (\\"test-string\\") Environment Variable

packages/wrangler/src/__tests__/versions/versions.view.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ describe("versions view", () => {
8181
"
8282
⛅️ wrangler x.x.x
8383
──────────────────
84+
8485
Your Worker has access to the following bindings:
8586
Binding Resource
8687
env.KV (kv-namespace-id) KV Namespace
@@ -195,6 +196,7 @@ describe("versions view", () => {
195196
"
196197
⛅️ wrangler x.x.x
197198
──────────────────
199+
198200
Your Worker has access to the following bindings:
199201
Binding Resource
200202
env.KV (kv-namespace-id) KV Namespace
@@ -664,6 +666,7 @@ describe("versions view", () => {
664666
"
665667
⛅️ wrangler x.x.x
666668
──────────────────
669+
667670
Your Worker has access to the following bindings:
668671
Binding Resource
669672
env.DO (DurableObject) Durable Object

packages/wrangler/src/utils/print-bindings.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export function printBindings(
2626
name?: string;
2727
provisioning?: boolean;
2828
warnIfNoBindings?: boolean;
29+
configPath?: string;
2930
} = {}
3031
) {
3132
let hasConnectionStatus = false;
@@ -615,13 +616,16 @@ export function printBindings(
615616

616617
if (output.length === 0) {
617618
if (context.warnIfNoBindings) {
619+
logger.log();
618620
if (context.name && getFlag("MULTIWORKER")) {
619621
logger.log(`No bindings found for ${chalk.blue(context.name)}`);
620622
} else {
621623
logger.log("No bindings found.");
622624
}
625+
logger.log();
623626
}
624627
} else {
628+
logger.log();
625629
let title: string;
626630
if (context.provisioning) {
627631
title = `${chalk.red("Experimental:")} The following bindings need to be provisioned:`;
@@ -742,13 +746,15 @@ export function printBindings(
742746
})
743747
.join("\n")}`
744748
);
749+
logger.log();
745750
}
746751

747752
if (containers.length > 0) {
748753
let containersTitle: string;
749754
if (context.name && getFlag("MULTIWORKER")) {
750755
containersTitle = `The following containers are available from ${chalk.blue(context.name)}:`;
751756
} else {
757+
containersTitle = "The following containers are available:";
752758
}
753759

754760
logger.log(

0 commit comments

Comments
 (0)