vite 5.0.0-beta.8 → 5.0.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.
@@ -1,10 +1,10 @@
1
- import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-73034a1b.js';
1
+ import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-T98iZFpD.js';
2
2
  import require$$0__default from 'fs';
3
3
  import require$$0 from 'postcss';
4
4
  import require$$0$1 from 'path';
5
- import require$$3 from 'crypto';
6
- import require$$0$2 from 'util';
7
- import { l as lib } from './dep-c423598f.js';
5
+ import require$$0$2 from 'crypto';
6
+ import require$$0$3 from 'util';
7
+ import { l as lib } from './dep-8a-6Quh6.js';
8
8
 
9
9
  import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
10
10
  import { dirname as __cjs_dirname } from 'node:path';
@@ -1448,6 +1448,122 @@ src$3.exports.postcss = true;
1448
1448
 
1449
1449
  var srcExports$2 = src$3.exports;
1450
1450
 
1451
+ var BulkUpdateDecorator_1;
1452
+ var hasRequiredBulkUpdateDecorator;
1453
+
1454
+ function requireBulkUpdateDecorator () {
1455
+ if (hasRequiredBulkUpdateDecorator) return BulkUpdateDecorator_1;
1456
+ hasRequiredBulkUpdateDecorator = 1;
1457
+ const BULK_SIZE = 2000;
1458
+
1459
+ // We are using an object instead of a Map as this will stay static during the runtime
1460
+ // so access to it can be optimized by v8
1461
+ const digestCaches = {};
1462
+
1463
+ class BulkUpdateDecorator {
1464
+ /**
1465
+ * @param {Hash | function(): Hash} hashOrFactory function to create a hash
1466
+ * @param {string=} hashKey key for caching
1467
+ */
1468
+ constructor(hashOrFactory, hashKey) {
1469
+ this.hashKey = hashKey;
1470
+
1471
+ if (typeof hashOrFactory === "function") {
1472
+ this.hashFactory = hashOrFactory;
1473
+ this.hash = undefined;
1474
+ } else {
1475
+ this.hashFactory = undefined;
1476
+ this.hash = hashOrFactory;
1477
+ }
1478
+
1479
+ this.buffer = "";
1480
+ }
1481
+
1482
+ /**
1483
+ * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
1484
+ * @param {string|Buffer} data data
1485
+ * @param {string=} inputEncoding data encoding
1486
+ * @returns {this} updated hash
1487
+ */
1488
+ update(data, inputEncoding) {
1489
+ if (
1490
+ inputEncoding !== undefined ||
1491
+ typeof data !== "string" ||
1492
+ data.length > BULK_SIZE
1493
+ ) {
1494
+ if (this.hash === undefined) {
1495
+ this.hash = this.hashFactory();
1496
+ }
1497
+
1498
+ if (this.buffer.length > 0) {
1499
+ this.hash.update(this.buffer);
1500
+ this.buffer = "";
1501
+ }
1502
+
1503
+ this.hash.update(data, inputEncoding);
1504
+ } else {
1505
+ this.buffer += data;
1506
+
1507
+ if (this.buffer.length > BULK_SIZE) {
1508
+ if (this.hash === undefined) {
1509
+ this.hash = this.hashFactory();
1510
+ }
1511
+
1512
+ this.hash.update(this.buffer);
1513
+ this.buffer = "";
1514
+ }
1515
+ }
1516
+
1517
+ return this;
1518
+ }
1519
+
1520
+ /**
1521
+ * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
1522
+ * @param {string=} encoding encoding of the return value
1523
+ * @returns {string|Buffer} digest
1524
+ */
1525
+ digest(encoding) {
1526
+ let digestCache;
1527
+
1528
+ const buffer = this.buffer;
1529
+
1530
+ if (this.hash === undefined) {
1531
+ // short data for hash, we can use caching
1532
+ const cacheKey = `${this.hashKey}-${encoding}`;
1533
+
1534
+ digestCache = digestCaches[cacheKey];
1535
+
1536
+ if (digestCache === undefined) {
1537
+ digestCache = digestCaches[cacheKey] = new Map();
1538
+ }
1539
+
1540
+ const cacheEntry = digestCache.get(buffer);
1541
+
1542
+ if (cacheEntry !== undefined) {
1543
+ return cacheEntry;
1544
+ }
1545
+
1546
+ this.hash = this.hashFactory();
1547
+ }
1548
+
1549
+ if (buffer.length > 0) {
1550
+ this.hash.update(buffer);
1551
+ }
1552
+
1553
+ const digestResult = this.hash.digest(encoding);
1554
+
1555
+ if (digestCache !== undefined) {
1556
+ digestCache.set(buffer, digestResult);
1557
+ }
1558
+
1559
+ return digestResult;
1560
+ }
1561
+ }
1562
+
1563
+ BulkUpdateDecorator_1 = BulkUpdateDecorator;
1564
+ return BulkUpdateDecorator_1;
1565
+ }
1566
+
1451
1567
  var wasmHash = {exports: {}};
1452
1568
 
1453
1569
  /*
@@ -1670,27 +1786,27 @@ function requireWasmHash () {
1670
1786
  Author Tobias Koppers @sokra
1671
1787
  */
1672
1788
 
1673
- var xxhash64_1;
1674
- var hasRequiredXxhash64;
1789
+ var md4_1;
1790
+ var hasRequiredMd4;
1675
1791
 
1676
- function requireXxhash64 () {
1677
- if (hasRequiredXxhash64) return xxhash64_1;
1678
- hasRequiredXxhash64 = 1;
1792
+ function requireMd4 () {
1793
+ if (hasRequiredMd4) return md4_1;
1794
+ hasRequiredMd4 = 1;
1679
1795
 
1680
1796
  const create = requireWasmHash();
1681
1797
 
1682
- //#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1
1683
- const xxhash64 = new WebAssembly.Module(
1798
+ //#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1
1799
+ const md4 = new WebAssembly.Module(
1684
1800
  Buffer.from(
1685
- // 1173 bytes
1686
- "AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmL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nzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=",
1687
1803
  "base64"
1688
1804
  )
1689
1805
  );
1690
1806
  //#endregion
1691
1807
 
1692
- xxhash64_1 = create.bind(null, xxhash64, [], 32, 16);
1693
- return xxhash64_1;
1808
+ md4_1 = create.bind(null, md4, [], 64, 32);
1809
+ return md4_1;
1694
1810
  }
1695
1811
 
1696
1812
  var BatchedHash_1;
@@ -1771,143 +1887,27 @@ function requireBatchedHash () {
1771
1887
  Author Tobias Koppers @sokra
1772
1888
  */
1773
1889
 
1774
- var md4_1;
1775
- var hasRequiredMd4;
1890
+ var xxhash64_1;
1891
+ var hasRequiredXxhash64;
1776
1892
 
1777
- function requireMd4 () {
1778
- if (hasRequiredMd4) return md4_1;
1779
- hasRequiredMd4 = 1;
1893
+ function requireXxhash64 () {
1894
+ if (hasRequiredXxhash64) return xxhash64_1;
1895
+ hasRequiredXxhash64 = 1;
1780
1896
 
1781
1897
  const create = requireWasmHash();
1782
1898
 
1783
- //#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1
1784
- const md4 = new WebAssembly.Module(
1899
+ //#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1
1900
+ const xxhash64 = new WebAssembly.Module(
1785
1901
  Buffer.from(
1786
- // 2150 bytes
1787
- "AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGak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4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL",
1788
1904
  "base64"
1789
1905
  )
1790
1906
  );
1791
1907
  //#endregion
1792
1908
 
1793
- md4_1 = create.bind(null, md4, [], 64, 32);
1794
- return md4_1;
1795
- }
1796
-
1797
- var BulkUpdateDecorator_1;
1798
- var hasRequiredBulkUpdateDecorator;
1799
-
1800
- function requireBulkUpdateDecorator () {
1801
- if (hasRequiredBulkUpdateDecorator) return BulkUpdateDecorator_1;
1802
- hasRequiredBulkUpdateDecorator = 1;
1803
- const BULK_SIZE = 2000;
1804
-
1805
- // We are using an object instead of a Map as this will stay static during the runtime
1806
- // so access to it can be optimized by v8
1807
- const digestCaches = {};
1808
-
1809
- class BulkUpdateDecorator {
1810
- /**
1811
- * @param {Hash | function(): Hash} hashOrFactory function to create a hash
1812
- * @param {string=} hashKey key for caching
1813
- */
1814
- constructor(hashOrFactory, hashKey) {
1815
- this.hashKey = hashKey;
1816
-
1817
- if (typeof hashOrFactory === "function") {
1818
- this.hashFactory = hashOrFactory;
1819
- this.hash = undefined;
1820
- } else {
1821
- this.hashFactory = undefined;
1822
- this.hash = hashOrFactory;
1823
- }
1824
-
1825
- this.buffer = "";
1826
- }
1827
-
1828
- /**
1829
- * Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
1830
- * @param {string|Buffer} data data
1831
- * @param {string=} inputEncoding data encoding
1832
- * @returns {this} updated hash
1833
- */
1834
- update(data, inputEncoding) {
1835
- if (
1836
- inputEncoding !== undefined ||
1837
- typeof data !== "string" ||
1838
- data.length > BULK_SIZE
1839
- ) {
1840
- if (this.hash === undefined) {
1841
- this.hash = this.hashFactory();
1842
- }
1843
-
1844
- if (this.buffer.length > 0) {
1845
- this.hash.update(this.buffer);
1846
- this.buffer = "";
1847
- }
1848
-
1849
- this.hash.update(data, inputEncoding);
1850
- } else {
1851
- this.buffer += data;
1852
-
1853
- if (this.buffer.length > BULK_SIZE) {
1854
- if (this.hash === undefined) {
1855
- this.hash = this.hashFactory();
1856
- }
1857
-
1858
- this.hash.update(this.buffer);
1859
- this.buffer = "";
1860
- }
1861
- }
1862
-
1863
- return this;
1864
- }
1865
-
1866
- /**
1867
- * Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
1868
- * @param {string=} encoding encoding of the return value
1869
- * @returns {string|Buffer} digest
1870
- */
1871
- digest(encoding) {
1872
- let digestCache;
1873
-
1874
- const buffer = this.buffer;
1875
-
1876
- if (this.hash === undefined) {
1877
- // short data for hash, we can use caching
1878
- const cacheKey = `${this.hashKey}-${encoding}`;
1879
-
1880
- digestCache = digestCaches[cacheKey];
1881
-
1882
- if (digestCache === undefined) {
1883
- digestCache = digestCaches[cacheKey] = new Map();
1884
- }
1885
-
1886
- const cacheEntry = digestCache.get(buffer);
1887
-
1888
- if (cacheEntry !== undefined) {
1889
- return cacheEntry;
1890
- }
1891
-
1892
- this.hash = this.hashFactory();
1893
- }
1894
-
1895
- if (buffer.length > 0) {
1896
- this.hash.update(buffer);
1897
- }
1898
-
1899
- const digestResult = this.hash.digest(encoding);
1900
-
1901
- if (digestCache !== undefined) {
1902
- digestCache.set(buffer, digestResult);
1903
- }
1904
-
1905
- return digestResult;
1906
- }
1907
- }
1908
-
1909
- BulkUpdateDecorator_1 = BulkUpdateDecorator;
1910
- return BulkUpdateDecorator_1;
1909
+ xxhash64_1 = create.bind(null, xxhash64, [], 32, 16);
1910
+ return xxhash64_1;
1911
1911
  }
1912
1912
 
1913
1913
  const baseEncodeTables = {
@@ -1998,7 +1998,7 @@ function getHashDigest$1(buffer, algorithm, digestType, maxLength) {
1998
1998
  hash = new BatchedHash(createMd4());
1999
1999
  } else if (algorithm === "native-md4") {
2000
2000
  if (typeof crypto === "undefined") {
2001
- crypto = require$$3;
2001
+ crypto = require$$0$2;
2002
2002
 
2003
2003
  if (BulkUpdateDecorator === undefined) {
2004
2004
  BulkUpdateDecorator = requireBulkUpdateDecorator();
@@ -2008,7 +2008,7 @@ function getHashDigest$1(buffer, algorithm, digestType, maxLength) {
2008
2008
  hash = new BulkUpdateDecorator(() => crypto.createHash("md4"), "md4");
2009
2009
  } else {
2010
2010
  if (typeof crypto === "undefined") {
2011
- crypto = require$$3;
2011
+ crypto = require$$0$2;
2012
2012
 
2013
2013
  if (BulkUpdateDecorator === undefined) {
2014
2014
  BulkUpdateDecorator = requireBulkUpdateDecorator();
@@ -3694,7 +3694,7 @@ var attribute$1 = {};
3694
3694
  * For Node.js, simply re-export the core `util.deprecate` function.
3695
3695
  */
3696
3696
 
3697
- var node = require$$0$2.deprecate;
3697
+ var node = require$$0$3.deprecate;
3698
3698
 
3699
3699
  (function (exports) {
3700
3700
 
package/dist/node/cli.js CHANGED
@@ -2,7 +2,7 @@ import path from 'node:path';
2
2
  import fs from 'node:fs';
3
3
  import { performance } from 'node:perf_hooks';
4
4
  import { EventEmitter } from 'events';
5
- import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-73034a1b.js';
5
+ import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-T98iZFpD.js';
6
6
  import { VERSION } from './constants.js';
7
7
  import 'node:fs/promises';
8
8
  import 'node:url';
@@ -13,6 +13,8 @@ import 'esbuild';
13
13
  import 'path';
14
14
  import 'fs';
15
15
  import 'assert';
16
+ import 'node:http';
17
+ import 'node:https';
16
18
  import 'util';
17
19
  import 'net';
18
20
  import 'url';
@@ -31,11 +33,10 @@ import 'node:assert';
31
33
  import 'node:process';
32
34
  import 'node:v8';
33
35
  import 'rollup';
36
+ import 'rollup/parseAst';
34
37
  import 'querystring';
35
38
  import 'node:readline';
36
39
  import 'node:events';
37
- import 'node:http';
38
- import 'node:https';
39
40
  import 'zlib';
40
41
  import 'buffer';
41
42
  import 'https';
@@ -750,7 +751,6 @@ cli
750
751
  .alias('dev') // alias to align with the script name
751
752
  .option('--host [host]', `[string] specify hostname`, { type: [convertHost] })
752
753
  .option('--port <port>', `[number] specify port`)
753
- .option('--https', `[boolean] use TLS + HTTP/2`)
754
754
  .option('--open [path]', `[boolean | string] open browser on startup`)
755
755
  .option('--cors', `[boolean] enable CORS`)
756
756
  .option('--strictPort', `[boolean] exit if specified port is already in use`)
@@ -759,7 +759,7 @@ cli
759
759
  filterDuplicateOptions(options);
760
760
  // output structure is preserved even after bundling so require()
761
761
  // is ok here
762
- const { createServer } = await import('./chunks/dep-73034a1b.js').then(function (n) { return n.C; });
762
+ const { createServer } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.A; });
763
763
  try {
764
764
  const server = await createServer({
765
765
  root,
@@ -780,38 +780,37 @@ cli
780
780
  const startupDurationString = viteStartTime
781
781
  ? colors.dim(`ready in ${colors.reset(colors.bold(Math.ceil(performance.now() - viteStartTime)))} ms`)
782
782
  : '';
783
+ const hasExistingLogs = process.stdout.bytesWritten > 0 || process.stderr.bytesWritten > 0;
783
784
  info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, {
784
- clear: !server.config.logger.hasWarned &&
785
- !globalThis.__vite_cjs_skip_clear_screen,
785
+ clear: !hasExistingLogs,
786
786
  });
787
787
  server.printUrls();
788
- server.bindCLIShortcuts({
789
- print: true,
790
- customShortcuts: [
791
- profileSession && {
792
- key: 'p',
793
- description: 'start/stop the profiler',
794
- async action(server) {
795
- if (profileSession) {
796
- await stopProfiler(server.config.logger.info);
797
- }
798
- else {
799
- const inspector = await import('node:inspector').then((r) => r.default);
800
- await new Promise((res) => {
801
- profileSession = new inspector.Session();
802
- profileSession.connect();
803
- profileSession.post('Profiler.enable', () => {
804
- profileSession.post('Profiler.start', () => {
805
- server.config.logger.info('Profiler started');
806
- res();
807
- });
788
+ const customShortcuts = [];
789
+ if (profileSession) {
790
+ customShortcuts.push({
791
+ key: 'p',
792
+ description: 'start/stop the profiler',
793
+ async action(server) {
794
+ if (profileSession) {
795
+ await stopProfiler(server.config.logger.info);
796
+ }
797
+ else {
798
+ const inspector = await import('node:inspector').then((r) => r.default);
799
+ await new Promise((res) => {
800
+ profileSession = new inspector.Session();
801
+ profileSession.connect();
802
+ profileSession.post('Profiler.enable', () => {
803
+ profileSession.post('Profiler.start', () => {
804
+ server.config.logger.info('Profiler started');
805
+ res();
808
806
  });
809
807
  });
810
- }
811
- },
808
+ });
809
+ }
812
810
  },
813
- ],
814
- });
811
+ });
812
+ }
813
+ server.bindCLIShortcuts({ print: true, customShortcuts });
815
814
  }
816
815
  catch (e) {
817
816
  const logger = createLogger(options.logLevel);
@@ -840,7 +839,7 @@ cli
840
839
  .option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
841
840
  .action(async (root, options) => {
842
841
  filterDuplicateOptions(options);
843
- const { build } = await import('./chunks/dep-73034a1b.js').then(function (n) { return n.B; });
842
+ const { build } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.C; });
844
843
  const buildOptions = cleanOptions(options);
845
844
  try {
846
845
  await build({
@@ -868,7 +867,7 @@ cli
868
867
  .option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
869
868
  .action(async (root, options) => {
870
869
  filterDuplicateOptions(options);
871
- const { optimizeDeps } = await import('./chunks/dep-73034a1b.js').then(function (n) { return n.A; });
870
+ const { optimizeDeps } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.B; });
872
871
  try {
873
872
  const config = await resolveConfig({
874
873
  root,
@@ -890,12 +889,11 @@ cli
890
889
  .option('--host [host]', `[string] specify hostname`, { type: [convertHost] })
891
890
  .option('--port <port>', `[number] specify port`)
892
891
  .option('--strictPort', `[boolean] exit if specified port is already in use`)
893
- .option('--https', `[boolean] use TLS + HTTP/2`)
894
892
  .option('--open [path]', `[boolean | string] open browser on startup`)
895
893
  .option('--outDir <dir>', `[string] output directory (default: dist)`)
896
894
  .action(async (root, options) => {
897
895
  filterDuplicateOptions(options);
898
- const { preview } = await import('./chunks/dep-73034a1b.js').then(function (n) { return n.D; });
896
+ const { preview } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.D; });
899
897
  try {
900
898
  const server = await preview({
901
899
  root,
@@ -910,7 +908,6 @@ cli
910
908
  port: options.port,
911
909
  strictPort: options.strictPort,
912
910
  host: options.host,
913
- https: options.https,
914
911
  open: options.open,
915
912
  },
916
913
  });
@@ -5,6 +5,7 @@ import { readFileSync } from 'node:fs';
5
5
  const { version } = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url)).toString());
6
6
  const VERSION = version;
7
7
  const DEFAULT_MAIN_FIELDS = [
8
+ 'browser',
8
9
  'module',
9
10
  'jsnext:main',
10
11
  'jsnext',