vite 5.0.11 → 5.1.0-beta.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/LICENSE.md +0 -398
- package/client.d.ts +8 -0
- package/dist/client/client.mjs +56 -44
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-V3BH7oO1.js → dep-7tgnmQn7.js} +929 -1720
- package/dist/node/chunks/{dep-oIJQVJc7.js → dep-VtWyYv-v.js} +1 -1
- package/dist/node/chunks/dep-oXyoRRWa.js +1012 -0
- package/dist/node/cli.js +5 -5
- package/dist/node/constants.js +5 -1
- package/dist/node/index.d.ts +2 -2
- package/dist/node/index.js +3 -3
- package/dist/node-cjs/publicUtils.cjs +33 -28
- package/package.json +10 -11
- package/types/hmrPayload.d.ts +4 -4
- package/types/importGlob.d.ts +2 -0
- package/dist/node/chunks/dep-ggdMrszO.js +0 -914
package/LICENSE.md
CHANGED
@@ -463,28 +463,6 @@ License: MIT
|
|
463
463
|
By: Luke Edwards
|
464
464
|
Repository: lukeed/polka
|
465
465
|
|
466
|
-
> The MIT License (MIT)
|
467
|
-
>
|
468
|
-
> Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (https://lukeed.com)
|
469
|
-
>
|
470
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
471
|
-
> of this software and associated documentation files (the "Software"), to deal
|
472
|
-
> in the Software without restriction, including without limitation the rights
|
473
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
474
|
-
> copies of the Software, and to permit persons to whom the Software is
|
475
|
-
> furnished to do so, subject to the following conditions:
|
476
|
-
>
|
477
|
-
> The above copyright notice and this permission notice shall be included in
|
478
|
-
> all copies or substantial portions of the Software.
|
479
|
-
>
|
480
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
481
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
482
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
483
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
484
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
485
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
486
|
-
> THE SOFTWARE.
|
487
|
-
|
488
466
|
---------------------------------------
|
489
467
|
|
490
468
|
## @rollup/plugin-alias
|
@@ -861,35 +839,6 @@ Repository: egoist/cac
|
|
861
839
|
|
862
840
|
---------------------------------------
|
863
841
|
|
864
|
-
## call-bind
|
865
|
-
License: MIT
|
866
|
-
By: Jordan Harband
|
867
|
-
Repository: git+https://github.com/ljharb/call-bind.git
|
868
|
-
|
869
|
-
> MIT License
|
870
|
-
>
|
871
|
-
> Copyright (c) 2020 Jordan Harband
|
872
|
-
>
|
873
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
874
|
-
> of this software and associated documentation files (the "Software"), to deal
|
875
|
-
> in the Software without restriction, including without limitation the rights
|
876
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
877
|
-
> copies of the Software, and to permit persons to whom the Software is
|
878
|
-
> furnished to do so, subject to the following conditions:
|
879
|
-
>
|
880
|
-
> The above copyright notice and this permission notice shall be included in all
|
881
|
-
> copies or substantial portions of the Software.
|
882
|
-
>
|
883
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
884
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
885
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
886
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
887
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
888
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
889
|
-
> SOFTWARE.
|
890
|
-
|
891
|
-
---------------------------------------
|
892
|
-
|
893
842
|
## chokidar
|
894
843
|
License: MIT
|
895
844
|
By: Paul Miller, Elan Shanker
|
@@ -1129,35 +1078,6 @@ Repository: git://github.com/debug-js/debug.git
|
|
1129
1078
|
|
1130
1079
|
---------------------------------------
|
1131
1080
|
|
1132
|
-
## define-data-property
|
1133
|
-
License: MIT
|
1134
|
-
By: Jordan Harband
|
1135
|
-
Repository: git+https://github.com/ljharb/define-data-property.git
|
1136
|
-
|
1137
|
-
> MIT License
|
1138
|
-
>
|
1139
|
-
> Copyright (c) 2023 Jordan Harband
|
1140
|
-
>
|
1141
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1142
|
-
> of this software and associated documentation files (the "Software"), to deal
|
1143
|
-
> in the Software without restriction, including without limitation the rights
|
1144
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1145
|
-
> copies of the Software, and to permit persons to whom the Software is
|
1146
|
-
> furnished to do so, subject to the following conditions:
|
1147
|
-
>
|
1148
|
-
> The above copyright notice and this permission notice shall be included in all
|
1149
|
-
> copies or substantial portions of the Software.
|
1150
|
-
>
|
1151
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1152
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1153
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1154
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1155
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1156
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1157
|
-
> SOFTWARE.
|
1158
|
-
|
1159
|
-
---------------------------------------
|
1160
|
-
|
1161
1081
|
## define-lazy-prop
|
1162
1082
|
License: MIT
|
1163
1083
|
By: Sindre Sorhus
|
@@ -1623,33 +1543,6 @@ Repository: git+https://github.com/isaacs/fs.realpath.git
|
|
1623
1543
|
|
1624
1544
|
---------------------------------------
|
1625
1545
|
|
1626
|
-
## function-bind
|
1627
|
-
License: MIT
|
1628
|
-
By: Raynos, Jordan Harband
|
1629
|
-
Repository: https://github.com/Raynos/function-bind.git
|
1630
|
-
|
1631
|
-
> Copyright (c) 2013 Raynos.
|
1632
|
-
>
|
1633
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1634
|
-
> of this software and associated documentation files (the "Software"), to deal
|
1635
|
-
> in the Software without restriction, including without limitation the rights
|
1636
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1637
|
-
> copies of the Software, and to permit persons to whom the Software is
|
1638
|
-
> furnished to do so, subject to the following conditions:
|
1639
|
-
>
|
1640
|
-
> The above copyright notice and this permission notice shall be included in
|
1641
|
-
> all copies or substantial portions of the Software.
|
1642
|
-
>
|
1643
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1644
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1645
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1646
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1647
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1648
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
1649
|
-
> THE SOFTWARE.
|
1650
|
-
|
1651
|
-
---------------------------------------
|
1652
|
-
|
1653
1546
|
## generic-names
|
1654
1547
|
License: MIT
|
1655
1548
|
By: Alexey Litvinov
|
@@ -1679,35 +1572,6 @@ Repository: git+https://github.com/css-modules/generic-names.git
|
|
1679
1572
|
|
1680
1573
|
---------------------------------------
|
1681
1574
|
|
1682
|
-
## get-intrinsic
|
1683
|
-
License: MIT
|
1684
|
-
By: Jordan Harband
|
1685
|
-
Repository: git+https://github.com/ljharb/get-intrinsic.git
|
1686
|
-
|
1687
|
-
> MIT License
|
1688
|
-
>
|
1689
|
-
> Copyright (c) 2020 Jordan Harband
|
1690
|
-
>
|
1691
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1692
|
-
> of this software and associated documentation files (the "Software"), to deal
|
1693
|
-
> in the Software without restriction, including without limitation the rights
|
1694
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1695
|
-
> copies of the Software, and to permit persons to whom the Software is
|
1696
|
-
> furnished to do so, subject to the following conditions:
|
1697
|
-
>
|
1698
|
-
> The above copyright notice and this permission notice shall be included in all
|
1699
|
-
> copies or substantial portions of the Software.
|
1700
|
-
>
|
1701
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1702
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1703
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1704
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1705
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1706
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1707
|
-
> SOFTWARE.
|
1708
|
-
|
1709
|
-
---------------------------------------
|
1710
|
-
|
1711
1575
|
## glob
|
1712
1576
|
License: ISC
|
1713
1577
|
By: Isaac Z. Schlueter
|
@@ -1754,152 +1618,6 @@ Repository: gulpjs/glob-parent
|
|
1754
1618
|
|
1755
1619
|
---------------------------------------
|
1756
1620
|
|
1757
|
-
## gopd
|
1758
|
-
License: MIT
|
1759
|
-
By: Jordan Harband
|
1760
|
-
Repository: git+https://github.com/ljharb/gopd.git
|
1761
|
-
|
1762
|
-
> MIT License
|
1763
|
-
>
|
1764
|
-
> Copyright (c) 2022 Jordan Harband
|
1765
|
-
>
|
1766
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1767
|
-
> of this software and associated documentation files (the "Software"), to deal
|
1768
|
-
> in the Software without restriction, including without limitation the rights
|
1769
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1770
|
-
> copies of the Software, and to permit persons to whom the Software is
|
1771
|
-
> furnished to do so, subject to the following conditions:
|
1772
|
-
>
|
1773
|
-
> The above copyright notice and this permission notice shall be included in all
|
1774
|
-
> copies or substantial portions of the Software.
|
1775
|
-
>
|
1776
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1777
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1778
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1779
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1780
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1781
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1782
|
-
> SOFTWARE.
|
1783
|
-
|
1784
|
-
---------------------------------------
|
1785
|
-
|
1786
|
-
## has
|
1787
|
-
License: MIT
|
1788
|
-
By: Thiago de Arruda, Jordan Harband
|
1789
|
-
Repository: git://github.com/tarruda/has.git
|
1790
|
-
|
1791
|
-
> Copyright (c) 2013 Thiago de Arruda
|
1792
|
-
>
|
1793
|
-
> Permission is hereby granted, free of charge, to any person
|
1794
|
-
> obtaining a copy of this software and associated documentation
|
1795
|
-
> files (the "Software"), to deal in the Software without
|
1796
|
-
> restriction, including without limitation the rights to use,
|
1797
|
-
> copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1798
|
-
> copies of the Software, and to permit persons to whom the
|
1799
|
-
> Software is furnished to do so, subject to the following
|
1800
|
-
> conditions:
|
1801
|
-
>
|
1802
|
-
> The above copyright notice and this permission notice shall be
|
1803
|
-
> included in all copies or substantial portions of the Software.
|
1804
|
-
>
|
1805
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
1806
|
-
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
1807
|
-
> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
1808
|
-
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
1809
|
-
> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
1810
|
-
> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
1811
|
-
> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
1812
|
-
> OTHER DEALINGS IN THE SOFTWARE.
|
1813
|
-
|
1814
|
-
---------------------------------------
|
1815
|
-
|
1816
|
-
## has-property-descriptors
|
1817
|
-
License: MIT
|
1818
|
-
By: Jordan Harband
|
1819
|
-
Repository: git+https://github.com/inspect-js/has-property-descriptors.git
|
1820
|
-
|
1821
|
-
> MIT License
|
1822
|
-
>
|
1823
|
-
> Copyright (c) 2022 Inspect JS
|
1824
|
-
>
|
1825
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1826
|
-
> of this software and associated documentation files (the "Software"), to deal
|
1827
|
-
> in the Software without restriction, including without limitation the rights
|
1828
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1829
|
-
> copies of the Software, and to permit persons to whom the Software is
|
1830
|
-
> furnished to do so, subject to the following conditions:
|
1831
|
-
>
|
1832
|
-
> The above copyright notice and this permission notice shall be included in all
|
1833
|
-
> copies or substantial portions of the Software.
|
1834
|
-
>
|
1835
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1836
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1837
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1838
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1839
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1840
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1841
|
-
> SOFTWARE.
|
1842
|
-
|
1843
|
-
---------------------------------------
|
1844
|
-
|
1845
|
-
## has-proto
|
1846
|
-
License: MIT
|
1847
|
-
By: Jordan Harband
|
1848
|
-
Repository: git+https://github.com/inspect-js/has-proto.git
|
1849
|
-
|
1850
|
-
> MIT License
|
1851
|
-
>
|
1852
|
-
> Copyright (c) 2022 Inspect JS
|
1853
|
-
>
|
1854
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1855
|
-
> of this software and associated documentation files (the "Software"), to deal
|
1856
|
-
> in the Software without restriction, including without limitation the rights
|
1857
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1858
|
-
> copies of the Software, and to permit persons to whom the Software is
|
1859
|
-
> furnished to do so, subject to the following conditions:
|
1860
|
-
>
|
1861
|
-
> The above copyright notice and this permission notice shall be included in all
|
1862
|
-
> copies or substantial portions of the Software.
|
1863
|
-
>
|
1864
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1865
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1866
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1867
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1868
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1869
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1870
|
-
> SOFTWARE.
|
1871
|
-
|
1872
|
-
---------------------------------------
|
1873
|
-
|
1874
|
-
## has-symbols
|
1875
|
-
License: MIT
|
1876
|
-
By: Jordan Harband
|
1877
|
-
Repository: git://github.com/inspect-js/has-symbols.git
|
1878
|
-
|
1879
|
-
> MIT License
|
1880
|
-
>
|
1881
|
-
> Copyright (c) 2016 Jordan Harband
|
1882
|
-
>
|
1883
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
1884
|
-
> of this software and associated documentation files (the "Software"), to deal
|
1885
|
-
> in the Software without restriction, including without limitation the rights
|
1886
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
1887
|
-
> copies of the Software, and to permit persons to whom the Software is
|
1888
|
-
> furnished to do so, subject to the following conditions:
|
1889
|
-
>
|
1890
|
-
> The above copyright notice and this permission notice shall be included in all
|
1891
|
-
> copies or substantial portions of the Software.
|
1892
|
-
>
|
1893
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
1894
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
1895
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
1896
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
1897
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
1898
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
1899
|
-
> SOFTWARE.
|
1900
|
-
|
1901
|
-
---------------------------------------
|
1902
|
-
|
1903
1621
|
## http-proxy
|
1904
1622
|
License: MIT
|
1905
1623
|
By: Charlie Robbins, jcrugzz <jcrugzz@gmail.com>
|
@@ -2134,35 +1852,6 @@ Repository: sindresorhus/is-wsl
|
|
2134
1852
|
|
2135
1853
|
---------------------------------------
|
2136
1854
|
|
2137
|
-
## isarray
|
2138
|
-
License: MIT
|
2139
|
-
By: Julian Gruber
|
2140
|
-
Repository: git://github.com/juliangruber/isarray.git
|
2141
|
-
|
2142
|
-
> MIT License
|
2143
|
-
>
|
2144
|
-
> Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>
|
2145
|
-
>
|
2146
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
2147
|
-
> of this software and associated documentation files (the "Software"), to deal
|
2148
|
-
> in the Software without restriction, including without limitation the rights
|
2149
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2150
|
-
> copies of the Software, and to permit persons to whom the Software is
|
2151
|
-
> furnished to do so, subject to the following conditions:
|
2152
|
-
>
|
2153
|
-
> The above copyright notice and this permission notice shall be included in all
|
2154
|
-
> copies or substantial portions of the Software.
|
2155
|
-
>
|
2156
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2157
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2158
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2159
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2160
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2161
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2162
|
-
> SOFTWARE.
|
2163
|
-
|
2164
|
-
---------------------------------------
|
2165
|
-
|
2166
1855
|
## isexe
|
2167
1856
|
License: ISC
|
2168
1857
|
By: Isaac Z. Schlueter
|
@@ -2215,35 +1904,6 @@ Repository: lydell/js-tokens
|
|
2215
1904
|
|
2216
1905
|
---------------------------------------
|
2217
1906
|
|
2218
|
-
## json-stable-stringify
|
2219
|
-
License: MIT
|
2220
|
-
By: James Halliday
|
2221
|
-
Repository: git://github.com/ljharb/json-stable-stringify.git
|
2222
|
-
|
2223
|
-
> MIT License
|
2224
|
-
>
|
2225
|
-
> Copyright (c) 2013 contributors
|
2226
|
-
>
|
2227
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
2228
|
-
> of this software and associated documentation files (the "Software"), to deal
|
2229
|
-
> in the Software without restriction, including without limitation the rights
|
2230
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2231
|
-
> copies of the Software, and to permit persons to whom the Software is
|
2232
|
-
> furnished to do so, subject to the following conditions:
|
2233
|
-
>
|
2234
|
-
> The above copyright notice and this permission notice shall be included in all
|
2235
|
-
> copies or substantial portions of the Software.
|
2236
|
-
>
|
2237
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2238
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2239
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2240
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2241
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2242
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
2243
|
-
> SOFTWARE.
|
2244
|
-
|
2245
|
-
---------------------------------------
|
2246
|
-
|
2247
1907
|
## launch-editor
|
2248
1908
|
License: MIT
|
2249
1909
|
By: Evan You
|
@@ -2652,35 +2312,6 @@ Repository: sindresorhus/object-assign
|
|
2652
2312
|
|
2653
2313
|
---------------------------------------
|
2654
2314
|
|
2655
|
-
## object-keys
|
2656
|
-
License: MIT
|
2657
|
-
By: Jordan Harband, Raynos, Nathan Rajlich, Ivan Starkov, Gary Katsevman
|
2658
|
-
Repository: git://github.com/ljharb/object-keys.git
|
2659
|
-
|
2660
|
-
> The MIT License (MIT)
|
2661
|
-
>
|
2662
|
-
> Copyright (C) 2013 Jordan Harband
|
2663
|
-
>
|
2664
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
2665
|
-
> of this software and associated documentation files (the "Software"), to deal
|
2666
|
-
> in the Software without restriction, including without limitation the rights
|
2667
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
2668
|
-
> copies of the Software, and to permit persons to whom the Software is
|
2669
|
-
> furnished to do so, subject to the following conditions:
|
2670
|
-
>
|
2671
|
-
> The above copyright notice and this permission notice shall be included in
|
2672
|
-
> all copies or substantial portions of the Software.
|
2673
|
-
>
|
2674
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2675
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
2676
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
2677
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
2678
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
2679
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
2680
|
-
> THE SOFTWARE.
|
2681
|
-
|
2682
|
-
---------------------------------------
|
2683
|
-
|
2684
2315
|
## okie
|
2685
2316
|
License: MIT
|
2686
2317
|
By: Evan You
|
@@ -3366,35 +2997,6 @@ Repository: git://github.com/feross/run-parallel.git
|
|
3366
2997
|
|
3367
2998
|
---------------------------------------
|
3368
2999
|
|
3369
|
-
## set-function-length
|
3370
|
-
License: MIT
|
3371
|
-
By: Jordan Harband
|
3372
|
-
Repository: git+https://github.com/ljharb/set-function-length.git
|
3373
|
-
|
3374
|
-
> MIT License
|
3375
|
-
>
|
3376
|
-
> Copyright (c) Jordan Harband and contributors
|
3377
|
-
>
|
3378
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
3379
|
-
> of this software and associated documentation files (the "Software"), to deal
|
3380
|
-
> in the Software without restriction, including without limitation the rights
|
3381
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
3382
|
-
> copies of the Software, and to permit persons to whom the Software is
|
3383
|
-
> furnished to do so, subject to the following conditions:
|
3384
|
-
>
|
3385
|
-
> The above copyright notice and this permission notice shall be included in all
|
3386
|
-
> copies or substantial portions of the Software.
|
3387
|
-
>
|
3388
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
3389
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
3390
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
3391
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
3392
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
3393
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
3394
|
-
> SOFTWARE.
|
3395
|
-
|
3396
|
-
---------------------------------------
|
3397
|
-
|
3398
3000
|
## shebang-command
|
3399
3001
|
License: MIT
|
3400
3002
|
By: Kevin Mårtensson
|
package/client.d.ts
CHANGED
@@ -136,6 +136,14 @@ declare module '*.mov' {
|
|
136
136
|
const src: string
|
137
137
|
export default src
|
138
138
|
}
|
139
|
+
declare module '*.m4a' {
|
140
|
+
const src: string
|
141
|
+
export default src
|
142
|
+
}
|
143
|
+
declare module '*.vtt' {
|
144
|
+
const src: string
|
145
|
+
export default src
|
146
|
+
}
|
139
147
|
|
140
148
|
// fonts
|
141
149
|
declare module '*.woff' {
|
package/dist/client/client.mjs
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
import '@vite/env';
|
2
2
|
|
3
3
|
class HMRContext {
|
4
|
-
constructor(
|
5
|
-
this.ownerPath = ownerPath;
|
4
|
+
constructor(hmrClient, ownerPath) {
|
6
5
|
this.hmrClient = hmrClient;
|
7
|
-
this.
|
6
|
+
this.ownerPath = ownerPath;
|
8
7
|
if (!hmrClient.dataMap.has(ownerPath)) {
|
9
8
|
hmrClient.dataMap.set(ownerPath, {});
|
10
9
|
}
|
@@ -94,8 +93,7 @@ class HMRContext {
|
|
94
93
|
removeFromMap(this.newListeners);
|
95
94
|
}
|
96
95
|
send(event, data) {
|
97
|
-
this.
|
98
|
-
this.connection.send();
|
96
|
+
this.hmrClient.messenger.send(JSON.stringify({ type: 'custom', event, data }));
|
99
97
|
}
|
100
98
|
acceptDeps(deps, callback = () => { }) {
|
101
99
|
const mod = this.hmrClient.hotModulesMap.get(this.ownerPath) || {
|
@@ -109,9 +107,25 @@ class HMRContext {
|
|
109
107
|
this.hmrClient.hotModulesMap.set(this.ownerPath, mod);
|
110
108
|
}
|
111
109
|
}
|
110
|
+
class HMRMessenger {
|
111
|
+
constructor(connection) {
|
112
|
+
this.connection = connection;
|
113
|
+
this.queue = [];
|
114
|
+
}
|
115
|
+
send(message) {
|
116
|
+
this.queue.push(message);
|
117
|
+
this.flush();
|
118
|
+
}
|
119
|
+
flush() {
|
120
|
+
if (this.connection.isReady()) {
|
121
|
+
this.queue.forEach((msg) => this.connection.send(msg));
|
122
|
+
this.queue = [];
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
112
126
|
class HMRClient {
|
113
|
-
constructor(logger,
|
114
|
-
//
|
127
|
+
constructor(logger, connection,
|
128
|
+
// This allows implementing reloading via different methods depending on the environment
|
115
129
|
importUpdatedModule) {
|
116
130
|
this.logger = logger;
|
117
131
|
this.importUpdatedModule = importUpdatedModule;
|
@@ -121,6 +135,9 @@ class HMRClient {
|
|
121
135
|
this.dataMap = new Map();
|
122
136
|
this.customListenersMap = new Map();
|
123
137
|
this.ctxToListenersMap = new Map();
|
138
|
+
this.updateQueue = [];
|
139
|
+
this.pendingUpdateQueue = false;
|
140
|
+
this.messenger = new HMRMessenger(connection);
|
124
141
|
}
|
125
142
|
async notifyListeners(event, data) {
|
126
143
|
const cbs = this.customListenersMap.get(event);
|
@@ -148,6 +165,22 @@ class HMRClient {
|
|
148
165
|
`This could be due to syntax errors or importing non-existent ` +
|
149
166
|
`modules. (see errors above)`);
|
150
167
|
}
|
168
|
+
/**
|
169
|
+
* buffer multiple hot updates triggered by the same src change
|
170
|
+
* so that they are invoked in the same order they were sent.
|
171
|
+
* (otherwise the order may be inconsistent because of the http request round trip)
|
172
|
+
*/
|
173
|
+
async queueUpdate(payload) {
|
174
|
+
this.updateQueue.push(this.fetchUpdate(payload));
|
175
|
+
if (!this.pendingUpdateQueue) {
|
176
|
+
this.pendingUpdateQueue = true;
|
177
|
+
await Promise.resolve();
|
178
|
+
this.pendingUpdateQueue = false;
|
179
|
+
const loading = [...this.updateQueue];
|
180
|
+
this.updateQueue = [];
|
181
|
+
(await Promise.all(loading)).forEach((fn) => fn && fn());
|
182
|
+
}
|
183
|
+
}
|
151
184
|
async fetchUpdate(update) {
|
152
185
|
const { path, acceptedPath } = update;
|
153
186
|
const mod = this.hotModulesMap.get(path);
|
@@ -432,7 +465,6 @@ const hmrPort = __HMR_PORT__;
|
|
432
465
|
const socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${hmrPort || importMetaUrl.port}${__HMR_BASE__}`;
|
433
466
|
const directSocketHost = __HMR_DIRECT_TARGET__;
|
434
467
|
const base = __BASE__ || '/';
|
435
|
-
const messageBuffer = [];
|
436
468
|
let socket;
|
437
469
|
try {
|
438
470
|
let fallback;
|
@@ -507,19 +539,30 @@ const debounceReload = (time) => {
|
|
507
539
|
};
|
508
540
|
};
|
509
541
|
const pageReload = debounceReload(50);
|
510
|
-
const hmrClient = new HMRClient(console,
|
542
|
+
const hmrClient = new HMRClient(console, {
|
543
|
+
isReady: () => socket && socket.readyState === 1,
|
544
|
+
send: (message) => socket.send(message),
|
545
|
+
}, async function importUpdatedModule({ acceptedPath, timestamp, explicitImportRequired, isWithinCircularImport, }) {
|
511
546
|
const [acceptedPathWithoutQuery, query] = acceptedPath.split(`?`);
|
512
|
-
|
547
|
+
const importPromise = import(
|
513
548
|
/* @vite-ignore */
|
514
549
|
base +
|
515
550
|
acceptedPathWithoutQuery.slice(1) +
|
516
551
|
`?${explicitImportRequired ? 'import&' : ''}t=${timestamp}${query ? `&${query}` : ''}`);
|
552
|
+
if (isWithinCircularImport) {
|
553
|
+
importPromise.catch(() => {
|
554
|
+
console.info(`[hmr] ${acceptedPath} failed to apply HMR as it's within a circular import. Reloading page to reset the execution order. ` +
|
555
|
+
`To debug and break the circular import, you can run \`vite --debug hmr\` to log the circular dependency path if a file change triggered it.`);
|
556
|
+
pageReload();
|
557
|
+
});
|
558
|
+
}
|
559
|
+
return await importPromise;
|
517
560
|
});
|
518
561
|
async function handleMessage(payload) {
|
519
562
|
switch (payload.type) {
|
520
563
|
case 'connected':
|
521
564
|
console.debug(`[vite] connected.`);
|
522
|
-
|
565
|
+
hmrClient.messenger.flush();
|
523
566
|
// proxy(nginx, docker) hmr ws maybe caused timeout,
|
524
567
|
// so send ping package let ws keep alive.
|
525
568
|
setInterval(() => {
|
@@ -544,7 +587,7 @@ async function handleMessage(payload) {
|
|
544
587
|
}
|
545
588
|
await Promise.all(payload.updates.map(async (update) => {
|
546
589
|
if (update.type === 'js-update') {
|
547
|
-
return
|
590
|
+
return hmrClient.queueUpdate(update);
|
548
591
|
}
|
549
592
|
// css-update
|
550
593
|
// this is only sent when a css file referenced with <link> is updated
|
@@ -636,24 +679,6 @@ function clearErrorOverlay() {
|
|
636
679
|
function hasErrorOverlay() {
|
637
680
|
return document.querySelectorAll(overlayId).length;
|
638
681
|
}
|
639
|
-
let pending = false;
|
640
|
-
let queued = [];
|
641
|
-
/**
|
642
|
-
* buffer multiple hot updates triggered by the same src change
|
643
|
-
* so that they are invoked in the same order they were sent.
|
644
|
-
* (otherwise the order may be inconsistent because of the http request round trip)
|
645
|
-
*/
|
646
|
-
async function queueUpdate(p) {
|
647
|
-
queued.push(p);
|
648
|
-
if (!pending) {
|
649
|
-
pending = true;
|
650
|
-
await Promise.resolve();
|
651
|
-
pending = false;
|
652
|
-
const loading = [...queued];
|
653
|
-
queued = [];
|
654
|
-
(await Promise.all(loading)).forEach((fn) => fn && fn());
|
655
|
-
}
|
656
|
-
}
|
657
682
|
async function waitForSuccessfulPing(socketProtocol, hostAndPath, ms = 1000) {
|
658
683
|
const pingHostProtocol = socketProtocol === 'wss' ? 'https' : 'http';
|
659
684
|
const ping = async () => {
|
@@ -750,21 +775,8 @@ function removeStyle(id) {
|
|
750
775
|
sheetsMap.delete(id);
|
751
776
|
}
|
752
777
|
}
|
753
|
-
function sendMessageBuffer() {
|
754
|
-
if (socket.readyState === 1) {
|
755
|
-
messageBuffer.forEach((msg) => socket.send(msg));
|
756
|
-
messageBuffer.length = 0;
|
757
|
-
}
|
758
|
-
}
|
759
778
|
function createHotContext(ownerPath) {
|
760
|
-
return new HMRContext(
|
761
|
-
addBuffer(message) {
|
762
|
-
messageBuffer.push(message);
|
763
|
-
},
|
764
|
-
send() {
|
765
|
-
sendMessageBuffer();
|
766
|
-
},
|
767
|
-
});
|
779
|
+
return new HMRContext(hmrClient, ownerPath);
|
768
780
|
}
|
769
781
|
/**
|
770
782
|
* urls here are dynamic import() urls that couldn't be statically analyzed
|