wrangler 2.12.2 → 2.12.3

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.
Files changed (33) hide show
  1. package/package.json +4 -3
  2. package/src/__tests__/d1/execute.test.ts +2 -0
  3. package/src/__tests__/d1/migrate.test.ts +2 -0
  4. package/src/__tests__/delete.test.ts +6 -0
  5. package/src/__tests__/dev.test.tsx +71 -56
  6. package/src/__tests__/helpers/mock-console.ts +6 -0
  7. package/src/__tests__/helpers/worker-scripts/parent-worker.js +4 -1
  8. package/src/__tests__/init.test.ts +127 -96
  9. package/src/__tests__/kv.test.ts +9 -9
  10. package/src/__tests__/middleware.scheduled.test.ts +2 -2
  11. package/src/__tests__/middleware.test.ts +2 -2
  12. package/src/__tests__/pages/deployment-list.test.ts +2 -0
  13. package/src/__tests__/pages/project-list.test.ts +2 -0
  14. package/src/__tests__/pages/project-upload.test.ts +43 -24
  15. package/src/__tests__/pages/publish.test.ts +69 -69
  16. package/src/__tests__/publish.test.ts +138 -97
  17. package/src/__tests__/pubsub.test.ts +3 -0
  18. package/src/__tests__/tsconfig.tsbuildinfo +1 -1
  19. package/src/__tests__/worker-namespace.test.ts +1 -0
  20. package/src/d1/backups.tsx +15 -11
  21. package/src/d1/create.tsx +20 -16
  22. package/src/d1/execute.tsx +21 -18
  23. package/src/d1/list.tsx +2 -2
  24. package/src/d1/migrations/apply.tsx +33 -28
  25. package/src/d1/migrations/create.tsx +15 -12
  26. package/src/d1/migrations/list.tsx +10 -7
  27. package/src/pages/deployments.tsx +3 -5
  28. package/src/pages/functions/tsconfig.tsbuildinfo +1 -1
  29. package/src/pages/projects.tsx +2 -5
  30. package/src/pages/upload.tsx +29 -9
  31. package/src/utils/render.ts +93 -0
  32. package/templates/d1-beta-facade.js +3 -0
  33. package/wrangler-dist/cli.js +225 -146
@@ -98,6 +98,7 @@ describe("publish", () => {
98
98
  Object {
99
99
  "debug": "",
100
100
  "err": "",
101
+ "info": "",
101
102
  "out": "Total Upload: xx KiB / gzip: xx KiB
102
103
  Worker ID: abc12345
103
104
  Worker ETag: etag98765
@@ -617,6 +618,7 @@ describe("publish", () => {
617
618
  Object {
618
619
  "debug": "",
619
620
  "err": "",
621
+ "info": "",
620
622
  "out": "Total Upload: xx KiB / gzip: xx KiB
621
623
  Uploaded test-name (TIMINGS)
622
624
  Published test-name (TIMINGS)
@@ -664,6 +666,7 @@ describe("publish", () => {
664
666
  Object {
665
667
  "debug": "",
666
668
  "err": "",
669
+ "info": "",
667
670
  "out": "Total Upload: xx KiB / gzip: xx KiB
668
671
  Uploaded test-name (TIMINGS)
669
672
  Published test-name (TIMINGS)
@@ -726,6 +729,7 @@ describe("publish", () => {
726
729
  Object {
727
730
  "debug": "",
728
731
  "err": "",
732
+ "info": "",
729
733
  "out": "Total Upload: xx KiB / gzip: xx KiB
730
734
  Uploaded test-name (staging) (TIMINGS)
731
735
  Published test-name (staging) (TIMINGS)
@@ -1387,6 +1391,7 @@ export default {};`
1387
1391
  Object {
1388
1392
  "debug": "",
1389
1393
  "err": "",
1394
+ "info": "",
1390
1395
  "out": "Total Upload: xx KiB / gzip: xx KiB
1391
1396
  --dry-run: exiting now.",
1392
1397
  "warn": "",
@@ -1420,6 +1425,7 @@ addEventListener('fetch', event => {});`
1420
1425
  Object {
1421
1426
  "debug": "",
1422
1427
  "err": "",
1428
+ "info": "",
1423
1429
  "out": "Total Upload: xx KiB / gzip: xx KiB
1424
1430
  --dry-run: exiting now.",
1425
1431
  "warn": "▲ [WARNING] The entrypoint index.js has exports like an ES Module, but hasn't defined a default export like a module worker normally would. Building the worker using \\"service-worker\\" format...
@@ -1519,6 +1525,7 @@ addEventListener('fetch', event => {});`
1519
1525
  Object {
1520
1526
  "debug": "",
1521
1527
  "err": "",
1528
+ "info": "",
1522
1529
  "out": "Reading file-1.txt...
1523
1530
  Uploading as file-1.2ca234f380.txt...
1524
1531
  Reading file-2.txt...
@@ -1662,6 +1669,7 @@ addEventListener('fetch', event => {});`
1662
1669
  Object {
1663
1670
  "debug": "",
1664
1671
  "err": "",
1672
+ "info": "",
1665
1673
  "out": "Reading file-1.txt...
1666
1674
  Uploading as file-1.2ca234f380.txt...
1667
1675
  Reading file-2.txt...
@@ -1752,6 +1760,7 @@ addEventListener('fetch', event => {});`
1752
1760
  Object {
1753
1761
  "debug": "",
1754
1762
  "err": "",
1763
+ "info": "",
1755
1764
  "out": "Reading file-1.txt...
1756
1765
  Uploading as file-1.2ca234f380.txt...
1757
1766
  Reading file-2.txt...
@@ -1781,18 +1790,19 @@ addEventListener('fetch', event => {});`
1781
1790
  );
1782
1791
 
1783
1792
  expect(std).toMatchInlineSnapshot(`
1784
- Object {
1785
- "debug": "",
1786
- "err": "X [ERROR] You cannot use the service-worker format with an \`assets\` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/
1793
+ Object {
1794
+ "debug": "",
1795
+ "err": "X [ERROR] You cannot use the service-worker format with an \`assets\` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/
1787
1796
 
1788
- ",
1789
- "out": "
1790
- If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1791
- "warn": "▲ [WARNING] The --assets argument is experimental and may change or break at any time
1797
+ ",
1798
+ "info": "",
1799
+ "out": "
1800
+ If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1801
+ "warn": "▲ [WARNING] The --assets argument is experimental and may change or break at any time
1792
1802
 
1793
- ",
1794
- }
1795
- `);
1803
+ ",
1804
+ }
1805
+ `);
1796
1806
  });
1797
1807
 
1798
1808
  it("should error if --assets and --site are used together", async () => {
@@ -1807,16 +1817,17 @@ addEventListener('fetch', event => {});`
1807
1817
  );
1808
1818
 
1809
1819
  expect(std).toMatchInlineSnapshot(`
1810
- Object {
1811
- "debug": "",
1812
- "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1813
-
1814
- ",
1815
- "out": "
1816
- If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1817
- "warn": "",
1818
- }
1819
- `);
1820
+ Object {
1821
+ "debug": "",
1822
+ "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1823
+
1824
+ ",
1825
+ "info": "",
1826
+ "out": "
1827
+ If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1828
+ "warn": "",
1829
+ }
1830
+ `);
1820
1831
  });
1821
1832
 
1822
1833
  it("should error if --assets and config.site are used together", async () => {
@@ -1834,16 +1845,17 @@ addEventListener('fetch', event => {});`
1834
1845
  );
1835
1846
 
1836
1847
  expect(std).toMatchInlineSnapshot(`
1837
- Object {
1838
- "debug": "",
1839
- "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1840
-
1841
- ",
1842
- "out": "
1843
- If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1844
- "warn": "",
1845
- }
1846
- `);
1848
+ Object {
1849
+ "debug": "",
1850
+ "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1851
+
1852
+ ",
1853
+ "info": "",
1854
+ "out": "
1855
+ If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1856
+ "warn": "",
1857
+ }
1858
+ `);
1847
1859
  });
1848
1860
 
1849
1861
  it("should error if config.assets and --site are used together", async () => {
@@ -1860,20 +1872,21 @@ addEventListener('fetch', event => {});`
1860
1872
  );
1861
1873
 
1862
1874
  expect(std).toMatchInlineSnapshot(`
1863
- Object {
1864
- "debug": "",
1865
- "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1875
+ Object {
1876
+ "debug": "",
1877
+ "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1866
1878
 
1867
- ",
1868
- "out": "
1869
- If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1870
- "warn": "▲ [WARNING] Processing wrangler.toml configuration:
1879
+ ",
1880
+ "info": "",
1881
+ "out": "
1882
+ If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1883
+ "warn": "▲ [WARNING] Processing wrangler.toml configuration:
1871
1884
 
1872
- - \\"assets\\" fields are experimental and may change or break at any time.
1885
+ - \\"assets\\" fields are experimental and may change or break at any time.
1873
1886
 
1874
- ",
1875
- }
1876
- `);
1887
+ ",
1888
+ }
1889
+ `);
1877
1890
  });
1878
1891
 
1879
1892
  it("should error if config.assets and config.site are used together", async () => {
@@ -1893,20 +1906,21 @@ addEventListener('fetch', event => {});`
1893
1906
  );
1894
1907
 
1895
1908
  expect(std).toMatchInlineSnapshot(`
1896
- Object {
1897
- "debug": "",
1898
- "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1909
+ Object {
1910
+ "debug": "",
1911
+ "err": "X [ERROR] Cannot use Assets and Workers Sites in the same Worker.
1899
1912
 
1900
- ",
1901
- "out": "
1902
- If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1903
- "warn": "▲ [WARNING] Processing wrangler.toml configuration:
1913
+ ",
1914
+ "info": "",
1915
+ "out": "
1916
+ If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose",
1917
+ "warn": "▲ [WARNING] Processing wrangler.toml configuration:
1904
1918
 
1905
- - \\"assets\\" fields are experimental and may change or break at any time.
1919
+ - \\"assets\\" fields are experimental and may change or break at any time.
1906
1920
 
1907
- ",
1908
- }
1909
- `);
1921
+ ",
1922
+ }
1923
+ `);
1910
1924
  });
1911
1925
 
1912
1926
  it("should warn if --assets is used", async () => {
@@ -1937,6 +1951,7 @@ addEventListener('fetch', event => {});`
1937
1951
  Object {
1938
1952
  "debug": "",
1939
1953
  "err": "",
1954
+ "info": "",
1940
1955
  "out": "Reading subdir/file-1.txt...
1941
1956
  Uploading as subdir/file-1.2ca234f380.txt...
1942
1957
  Reading subdir/file-2.txt...
@@ -1984,6 +1999,7 @@ addEventListener('fetch', event => {});`
1984
1999
  Object {
1985
2000
  "debug": "",
1986
2001
  "err": "",
2002
+ "info": "",
1987
2003
  "out": "Reading subdir/file-1.txt...
1988
2004
  Uploading as subdir/file-1.2ca234f380.txt...
1989
2005
  Reading subdir/file-2.txt...
@@ -2752,6 +2768,7 @@ addEventListener('fetch', event => {});`
2752
2768
  Object {
2753
2769
  "debug": "",
2754
2770
  "err": "",
2771
+ "info": "",
2755
2772
  "out": "Reading file-00.txt...
2756
2773
  Uploading as file-00.be5be5dd26.txt...
2757
2774
  Reading file-01.txt...
@@ -2985,6 +3002,7 @@ addEventListener('fetch', event => {});`
2985
3002
  Object {
2986
3003
  "debug": "",
2987
3004
  "err": "",
3005
+ "info": "",
2988
3006
  "out": "Reading file-1.txt...
2989
3007
  Uploading as file-1.2ca234f380.txt...
2990
3008
  Reading file-2.txt...
@@ -3028,6 +3046,7 @@ addEventListener('fetch', event => {});`
3028
3046
  Object {
3029
3047
  "debug": "",
3030
3048
  "err": "",
3049
+ "info": "",
3031
3050
  "out": "Reading file-1.txt...
3032
3051
  Uploading as file-1.2ca234f380.txt...
3033
3052
  Reading file-2.txt...
@@ -3840,7 +3859,7 @@ addEventListener('fetch', event => {});`
3840
3859
  it("should run a custom build before publishing", async () => {
3841
3860
  writeWranglerToml({
3842
3861
  build: {
3843
- command: `node -e "console.log('custom build'); require('fs').writeFileSync('index.js', 'export default { fetch(){ return new Response(123) } }')"`,
3862
+ command: `node -e "4+4; require('fs').writeFileSync('index.js', 'export default { fetch(){ return new Response(123) } }')"`,
3844
3863
  },
3845
3864
  });
3846
3865
 
@@ -3851,7 +3870,7 @@ addEventListener('fetch', event => {});`
3851
3870
 
3852
3871
  await runWrangler("publish index.js");
3853
3872
  expect(std.out).toMatchInlineSnapshot(`
3854
- "Running custom build: node -e \\"console.log('custom build'); require('fs').writeFileSync('index.js', 'export default { fetch(){ return new Response(123) } }')\\"
3873
+ "Running custom build: node -e \\"4+4; require('fs').writeFileSync('index.js', 'export default { fetch(){ return new Response(123) } }')\\"
3855
3874
  Total Upload: xx KiB / gzip: xx KiB
3856
3875
  Uploaded test-name (TIMINGS)
3857
3876
  Published test-name (TIMINGS)
@@ -3866,7 +3885,7 @@ addEventListener('fetch', event => {});`
3866
3885
  it("should run a custom build of multiple steps combined by && before publishing", async () => {
3867
3886
  writeWranglerToml({
3868
3887
  build: {
3869
- command: `echo "custom build" && echo "export default { fetch(){ return new Response(123) } }" > index.js`,
3888
+ command: `echo "export default { fetch(){ return new Response(123) } }" > index.js`,
3870
3889
  },
3871
3890
  });
3872
3891
 
@@ -3877,7 +3896,7 @@ addEventListener('fetch', event => {});`
3877
3896
 
3878
3897
  await runWrangler("publish index.js");
3879
3898
  expect(std.out).toMatchInlineSnapshot(`
3880
- "Running custom build: echo \\"custom build\\" && echo \\"export default { fetch(){ return new Response(123) } }\\" > index.js
3899
+ "Running custom build: echo \\"export default { fetch(){ return new Response(123) } }\\" > index.js
3881
3900
  Total Upload: xx KiB / gzip: xx KiB
3882
3901
  Uploaded test-name (TIMINGS)
3883
3902
  Published test-name (TIMINGS)
@@ -3893,22 +3912,22 @@ addEventListener('fetch', event => {});`
3893
3912
  writeWranglerToml({
3894
3913
  main: "index.js",
3895
3914
  build: {
3896
- command: `node -e "console.log('custom build');"`,
3915
+ command: `node -e "4+4;"`,
3897
3916
  },
3898
3917
  });
3899
3918
 
3900
3919
  await expect(runWrangler("publish index.js")).rejects
3901
3920
  .toThrowErrorMatchingInlineSnapshot(`
3902
- "The expected output file at \\"index.js\\" was not found after running custom build: node -e \\"console.log('custom build');\\".
3921
+ "The expected output file at \\"index.js\\" was not found after running custom build: node -e \\"4+4;\\".
3903
3922
  The \`main\` property in wrangler.toml should point to the file generated by the custom build."
3904
3923
  `);
3905
3924
  expect(std.out).toMatchInlineSnapshot(`
3906
- "Running custom build: node -e \\"console.log('custom build');\\"
3925
+ "Running custom build: node -e \\"4+4;\\"
3907
3926
 
3908
3927
  If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose"
3909
3928
  `);
3910
3929
  expect(std.err).toMatchInlineSnapshot(`
3911
- "X [ERROR] The expected output file at \\"index.js\\" was not found after running custom build: node -e \\"console.log('custom build');\\".
3930
+ "X [ERROR] The expected output file at \\"index.js\\" was not found after running custom build: node -e \\"4+4;\\".
3912
3931
 
3913
3932
  The \`main\` property in wrangler.toml should point to the file generated by the custom build.
3914
3933
 
@@ -3921,7 +3940,7 @@ addEventListener('fetch', event => {});`
3921
3940
  writeWranglerToml({
3922
3941
  main: "./",
3923
3942
  build: {
3924
- command: `node -e "console.log('custom build');"`,
3943
+ command: `node -e "4+4;"`,
3925
3944
  },
3926
3945
  });
3927
3946
 
@@ -3931,7 +3950,7 @@ addEventListener('fetch', event => {});`
3931
3950
 
3932
3951
  await expect(runWrangler("publish")).rejects
3933
3952
  .toThrowErrorMatchingInlineSnapshot(`
3934
- "The expected output file at \\".\\" was not found after running custom build: node -e \\"console.log('custom build');\\".
3953
+ "The expected output file at \\".\\" was not found after running custom build: node -e \\"4+4;\\".
3935
3954
  The \`main\` property in wrangler.toml should point to the file generated by the custom build.
3936
3955
  The provided entry-point path, \\".\\", points to a directory, rather than a file.
3937
3956
 
@@ -3942,12 +3961,12 @@ addEventListener('fetch', event => {});`
3942
3961
  \`\`\`"
3943
3962
  `);
3944
3963
  expect(std.out).toMatchInlineSnapshot(`
3945
- "Running custom build: node -e \\"console.log('custom build');\\"
3964
+ "Running custom build: node -e \\"4+4;\\"
3946
3965
 
3947
3966
  If you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose"
3948
3967
  `);
3949
3968
  expect(std.err).toMatchInlineSnapshot(`
3950
- "X [ERROR] The expected output file at \\".\\" was not found after running custom build: node -e \\"console.log('custom build');\\".
3969
+ "X [ERROR] The expected output file at \\".\\" was not found after running custom build: node -e \\"4+4;\\".
3951
3970
 
3952
3971
  The \`main\` property in wrangler.toml should point to the file generated by the custom build.
3953
3972
  The provided entry-point path, \\".\\", points to a directory, rather than a file.
@@ -4197,6 +4216,7 @@ addEventListener('fetch', event => {});`
4197
4216
  Object {
4198
4217
  "debug": "",
4199
4218
  "err": "",
4219
+ "info": "",
4200
4220
  "out": "Total Upload: xx KiB / gzip: xx KiB
4201
4221
  Your worker has access to the following bindings:
4202
4222
  - Durable Objects:
@@ -4242,6 +4262,7 @@ addEventListener('fetch', event => {});`
4242
4262
  Object {
4243
4263
  "debug": "",
4244
4264
  "err": "",
4265
+ "info": "",
4245
4266
  "out": "Total Upload: xx KiB / gzip: xx KiB
4246
4267
  Your worker has access to the following bindings:
4247
4268
  - Durable Objects:
@@ -4415,6 +4436,7 @@ addEventListener('fetch', event => {});`
4415
4436
  Object {
4416
4437
  "debug": "",
4417
4438
  "err": "",
4439
+ "info": "",
4418
4440
  "out": "Total Upload: xx KiB / gzip: xx KiB
4419
4441
  Your worker has access to the following bindings:
4420
4442
  - Durable Objects:
@@ -4485,6 +4507,7 @@ addEventListener('fetch', event => {});`
4485
4507
  Object {
4486
4508
  "debug": "",
4487
4509
  "err": "",
4510
+ "info": "",
4488
4511
  "out": "Total Upload: xx KiB / gzip: xx KiB
4489
4512
  Your worker has access to the following bindings:
4490
4513
  - Durable Objects:
@@ -5555,6 +5578,7 @@ addEventListener('fetch', event => {});`
5555
5578
  Object {
5556
5579
  "debug": "",
5557
5580
  "err": "",
5581
+ "info": "",
5558
5582
  "out": "Total Upload: xx KiB / gzip: xx KiB
5559
5583
  Your worker has access to the following bindings:
5560
5584
  - Vars:
@@ -6495,6 +6519,7 @@ addEventListener('fetch', event => {});`
6495
6519
  Object {
6496
6520
  "debug": "",
6497
6521
  "err": "",
6522
+ "info": "",
6498
6523
  "out": "Total Upload: xx KiB / gzip: xx KiB
6499
6524
  Uploaded test-name (TIMINGS)
6500
6525
  Published test-name (TIMINGS)
@@ -6545,6 +6570,7 @@ addEventListener('fetch', event => {});`
6545
6570
  Object {
6546
6571
  "debug": "",
6547
6572
  "err": "",
6573
+ "info": "",
6548
6574
  "out": "Total Upload: xx KiB / gzip: xx KiB
6549
6575
  Uploaded test-name (TIMINGS)
6550
6576
  Published test-name (TIMINGS)
@@ -6569,6 +6595,7 @@ addEventListener('fetch', event => {});`
6569
6595
  Object {
6570
6596
  "debug": "",
6571
6597
  "err": "",
6598
+ "info": "",
6572
6599
  "out": "Total Upload: xx KiB / gzip: xx KiB
6573
6600
  Uploaded test-name (TIMINGS)
6574
6601
  Published test-name (TIMINGS)
@@ -6603,6 +6630,7 @@ addEventListener('fetch', event => {});`
6603
6630
  Object {
6604
6631
  "debug": "",
6605
6632
  "err": "",
6633
+ "info": "",
6606
6634
  "out": "Reading file-1.txt...
6607
6635
  Uploading as file-1.2ca234f380.txt...
6608
6636
  Reading file-2.txt...
@@ -6665,6 +6693,7 @@ export default{
6665
6693
  Object {
6666
6694
  "debug": "",
6667
6695
  "err": "",
6696
+ "info": "",
6668
6697
  "out": "Total Upload: xx KiB / gzip: xx KiB
6669
6698
  Uploaded test-name (TIMINGS)
6670
6699
  Published test-name (TIMINGS)
@@ -6693,6 +6722,7 @@ export default{
6693
6722
  Object {
6694
6723
  "debug": "",
6695
6724
  "err": "",
6725
+ "info": "",
6696
6726
  "out": "Total Upload: xx KiB / gzip: xx KiB
6697
6727
  Your worker has access to the following bindings:
6698
6728
  - Durable Objects:
@@ -6710,16 +6740,17 @@ export default{
6710
6740
  writeWorkerSource();
6711
6741
  await runWrangler("publish index.js --node-compat --dry-run");
6712
6742
  expect(std).toMatchInlineSnapshot(`
6713
- Object {
6714
- "debug": "",
6715
- "err": "",
6716
- "out": "Total Upload: xx KiB / gzip: xx KiB
6717
- --dry-run: exiting now.",
6718
- "warn": "▲ [WARNING] Enabling Node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.
6719
-
6720
- ",
6721
- }
6722
- `);
6743
+ Object {
6744
+ "debug": "",
6745
+ "err": "",
6746
+ "info": "",
6747
+ "out": "Total Upload: xx KiB / gzip: xx KiB
6748
+ --dry-run: exiting now.",
6749
+ "warn": "▲ [WARNING] Enabling Node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.
6750
+
6751
+ ",
6752
+ }
6753
+ `);
6723
6754
  });
6724
6755
 
6725
6756
  it("should recommend node compatibility mode when using node builtins and node-compat isn't enabled", async () => {
@@ -6757,16 +6788,17 @@ export default{
6757
6788
  );
6758
6789
  await runWrangler("publish index.js --node-compat --dry-run"); // this would throw if node compatibility didn't exist
6759
6790
  expect(std).toMatchInlineSnapshot(`
6760
- Object {
6761
- "debug": "",
6762
- "err": "",
6763
- "out": "Total Upload: xx KiB / gzip: xx KiB
6764
- --dry-run: exiting now.",
6765
- "warn": "▲ [WARNING] Enabling Node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.
6766
-
6767
- ",
6768
- }
6769
- `);
6791
+ Object {
6792
+ "debug": "",
6793
+ "err": "",
6794
+ "info": "",
6795
+ "out": "Total Upload: xx KiB / gzip: xx KiB
6796
+ --dry-run: exiting now.",
6797
+ "warn": "▲ [WARNING] Enabling Node.js compatibility mode for built-ins and globals. This is experimental and has serious tradeoffs. Please see https://github.com/ionic-team/rollup-plugin-node-polyfills/ for more details.
6798
+
6799
+ ",
6800
+ }
6801
+ `);
6770
6802
  });
6771
6803
  });
6772
6804
 
@@ -6811,6 +6843,7 @@ export default{
6811
6843
  Object {
6812
6844
  "debug": "",
6813
6845
  "err": "",
6846
+ "info": "",
6814
6847
  "out": "Total Upload: xx KiB / gzip: xx KiB
6815
6848
  --dry-run: exiting now.",
6816
6849
  "warn": "",
@@ -6883,6 +6916,7 @@ export default{
6883
6916
  Object {
6884
6917
  "debug": "",
6885
6918
  "err": "",
6919
+ "info": "",
6886
6920
  "out": "Total Upload: xx KiB / gzip: xx KiB
6887
6921
  Uploaded test-name (TIMINGS)
6888
6922
  Published test-name (TIMINGS)
@@ -6945,23 +6979,24 @@ export default{
6945
6979
  `[ParseError: A request to the Cloudflare API (/accounts/some-account-id/workers/scripts/test-name) failed.]`
6946
6980
  );
6947
6981
  expect(std).toMatchInlineSnapshot(`
6948
- Object {
6949
- "debug": "",
6950
- "err": "",
6951
- "out": "Total Upload: xx KiB / gzip: xx KiB
6982
+ Object {
6983
+ "debug": "",
6984
+ "err": "",
6985
+ "info": "",
6986
+ "out": "Total Upload: xx KiB / gzip: xx KiB
6952
6987
 
6953
- X [ERROR] A request to the Cloudflare API (/accounts/some-account-id/workers/scripts/test-name) failed.
6988
+ X [ERROR] A request to the Cloudflare API (/accounts/some-account-id/workers/scripts/test-name) failed.
6954
6989
 
6955
- Script startup timed out. This could be due to script exceeding size limits or expensive code in
6956
- the global scope. [code: 11337]
6990
+ Script startup timed out. This could be due to script exceeding size limits or expensive code in
6991
+ the global scope. [code: 11337]
6957
6992
 
6958
- If you think this is a bug, please open an issue at:
6959
- https://github.com/cloudflare/workers-sdk/issues/new/choose
6993
+ If you think this is a bug, please open an issue at:
6994
+ https://github.com/cloudflare/workers-sdk/issues/new/choose
6960
6995
 
6961
- ",
6962
- "warn": "",
6963
- }
6964
- `);
6996
+ ",
6997
+ "warn": "",
6998
+ }
6999
+ `);
6965
7000
  });
6966
7001
 
6967
7002
  test("should check biggest dependencies when upload fails with script size error", async () => {
@@ -7011,6 +7046,7 @@ export default{
7011
7046
  Object {
7012
7047
  "debug": "",
7013
7048
  "err": "",
7049
+ "info": "",
7014
7050
  "out": "Total Upload: xx KiB / gzip: xx KiB
7015
7051
 
7016
7052
  X [ERROR] A request to the Cloudflare API (/accounts/some-account-id/workers/scripts/test-name) failed.
@@ -7077,6 +7113,7 @@ export default{
7077
7113
  Object {
7078
7114
  "debug": "",
7079
7115
  "err": "",
7116
+ "info": "",
7080
7117
  "out": "Total Upload: xx KiB / gzip: xx KiB
7081
7118
 
7082
7119
  X [ERROR] A request to the Cloudflare API (/accounts/some-account-id/workers/scripts/test-name) failed.
@@ -7115,6 +7152,7 @@ export default{
7115
7152
  Object {
7116
7153
  "debug": "",
7117
7154
  "err": "",
7155
+ "info": "",
7118
7156
  "out": "Total Upload: xx KiB / gzip: xx KiB",
7119
7157
  "warn": "▲ [WARNING] We recommend keeping your script less than 1MiB (1024 KiB) after gzip. Exceeding past this can affect cold start time
7120
7158
 
@@ -7137,6 +7175,7 @@ export default{
7137
7175
  Object {
7138
7176
  "debug": "",
7139
7177
  "err": "",
7178
+ "info": "",
7140
7179
  "out": "Total Upload: xx KiB / gzip: xx KiB",
7141
7180
  "warn": "",
7142
7181
  }
@@ -7165,6 +7204,7 @@ export default{
7165
7204
  Object {
7166
7205
  "debug": "",
7167
7206
  "err": "",
7207
+ "info": "",
7168
7208
  "out": "",
7169
7209
  "warn": "▲ [WARNING] Here are the 5 largest dependencies included in your script:
7170
7210
 
@@ -7321,6 +7361,7 @@ export default{
7321
7361
  Object {
7322
7362
  "debug": "",
7323
7363
  "err": "",
7364
+ "info": "",
7324
7365
  "out": "Total Upload: xx KiB / gzip: xx KiB
7325
7366
  Uploaded test-name (TIMINGS)
7326
7367
  Published test-name (TIMINGS)
@@ -25,6 +25,7 @@ describe("wrangler", () => {
25
25
  Object {
26
26
  "debug": "",
27
27
  "err": "",
28
+ "info": "",
28
29
  "out": "wrangler pubsub
29
30
 
30
31
  📮 Interact and manage Pub/Sub Brokers
@@ -55,6 +56,7 @@ describe("wrangler", () => {
55
56
  Object {
56
57
  "debug": "",
57
58
  "err": "",
59
+ "info": "",
58
60
  "out": "wrangler pubsub namespace
59
61
 
60
62
  Manage your Pub/Sub Namespaces
@@ -171,6 +173,7 @@ describe("wrangler", () => {
171
173
  Object {
172
174
  "debug": "",
173
175
  "err": "",
176
+ "info": "",
174
177
  "out": "wrangler pubsub broker
175
178
 
176
179
  Interact with your Pub/Sub Brokers