vite 5.0.0-beta.0 → 5.0.0-beta.10
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 +74 -3
- package/client.d.ts +8 -56
- package/dist/client/client.mjs +17 -0
- package/dist/client/client.mjs.map +1 -1
- package/dist/node/chunks/{dep-4033fb3a.js → dep-RTfXXG9P.js} +3583 -4035
- package/dist/node/chunks/{dep-3d0847ee.js → dep-pNoMh5ox.js} +145 -145
- package/dist/node/chunks/{dep-1d1f72b4.js → dep-s3v9f2KI.js} +2 -2
- package/dist/node/cli.js +29 -13
- package/dist/node/index.d.ts +3261 -3405
- package/dist/node/index.js +8 -6
- package/dist/node-cjs/publicUtils.cjs +807 -513
- package/index.cjs +13 -9
- package/index.d.cts +6 -0
- package/package.json +43 -37
- package/types/hot.d.ts +4 -0
- package/types/import-meta.d.ts +5 -0
- /package/dist/node/chunks/{dep-c423598f.js → dep-8a-6Quh6.js} +0 -0
- /package/dist/node/chunks/{dep-f0c7dae0.js → dep-kjUoH5nk.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-RTfXXG9P.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$$
|
|
6
|
-
import require$$0$
|
|
7
|
-
import { l as lib } from './dep-
|
|
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
|
|
1674
|
-
var
|
|
1789
|
+
var md4_1;
|
|
1790
|
+
var hasRequiredMd4;
|
|
1675
1791
|
|
|
1676
|
-
function
|
|
1677
|
-
if (
|
|
1678
|
-
|
|
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:
|
|
1683
|
-
const
|
|
1798
|
+
//#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1
|
|
1799
|
+
const md4 = new WebAssembly.Module(
|
|
1684
1800
|
Buffer.from(
|
|
1685
|
-
//
|
|
1686
|
-
"
|
|
1801
|
+
// 2150 bytes
|
|
1802
|
+
"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",
|
|
1687
1803
|
"base64"
|
|
1688
1804
|
)
|
|
1689
1805
|
);
|
|
1690
1806
|
//#endregion
|
|
1691
1807
|
|
|
1692
|
-
|
|
1693
|
-
return
|
|
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
|
|
1775
|
-
var
|
|
1890
|
+
var xxhash64_1;
|
|
1891
|
+
var hasRequiredXxhash64;
|
|
1776
1892
|
|
|
1777
|
-
function
|
|
1778
|
-
if (
|
|
1779
|
-
|
|
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:
|
|
1784
|
-
const
|
|
1899
|
+
//#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1
|
|
1900
|
+
const xxhash64 = new WebAssembly.Module(
|
|
1785
1901
|
Buffer.from(
|
|
1786
|
-
//
|
|
1787
|
-
"
|
|
1902
|
+
// 1173 bytes
|
|
1903
|
+
"AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/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
|
-
|
|
1794
|
-
return
|
|
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$$
|
|
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$$
|
|
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$
|
|
3697
|
+
var node = require$$0$3.deprecate;
|
|
3698
3698
|
|
|
3699
3699
|
(function (exports) {
|
|
3700
3700
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as getDefaultExportFromCjs } from './dep-RTfXXG9P.js';
|
|
2
2
|
import require$$0 from 'path';
|
|
3
3
|
import require$$0__default from 'fs';
|
|
4
|
-
import { l as lib } from './dep-
|
|
4
|
+
import { l as lib } from './dep-8a-6Quh6.js';
|
|
5
5
|
|
|
6
6
|
import { fileURLToPath as __cjs_fileURLToPath } from 'node:url';
|
|
7
7
|
import { dirname as __cjs_dirname } from 'node:path';
|
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 {
|
|
5
|
+
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-RTfXXG9P.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -13,6 +13,7 @@ import 'esbuild';
|
|
|
13
13
|
import 'path';
|
|
14
14
|
import 'fs';
|
|
15
15
|
import 'assert';
|
|
16
|
+
import 'node:http';
|
|
16
17
|
import 'util';
|
|
17
18
|
import 'net';
|
|
18
19
|
import 'url';
|
|
@@ -31,16 +32,17 @@ import 'node:assert';
|
|
|
31
32
|
import 'node:process';
|
|
32
33
|
import 'node:v8';
|
|
33
34
|
import 'rollup';
|
|
34
|
-
import '
|
|
35
|
-
import '
|
|
35
|
+
import 'rollup/parseAst';
|
|
36
|
+
import 'querystring';
|
|
37
|
+
import 'node:readline';
|
|
38
|
+
import 'node:events';
|
|
36
39
|
import 'node:https';
|
|
37
40
|
import 'zlib';
|
|
38
41
|
import 'buffer';
|
|
39
42
|
import 'https';
|
|
40
43
|
import 'tls';
|
|
41
|
-
import 'querystring';
|
|
42
|
-
import 'node:readline';
|
|
43
44
|
import 'node:zlib';
|
|
45
|
+
import 'worker_threads';
|
|
44
46
|
|
|
45
47
|
function toArr(any) {
|
|
46
48
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
@@ -723,9 +725,20 @@ const convertHost = (v) => {
|
|
|
723
725
|
}
|
|
724
726
|
return v;
|
|
725
727
|
};
|
|
728
|
+
/**
|
|
729
|
+
* base may be a number (like 0), should convert to empty string
|
|
730
|
+
*/
|
|
731
|
+
const convertBase = (v) => {
|
|
732
|
+
if (v === 0) {
|
|
733
|
+
return '';
|
|
734
|
+
}
|
|
735
|
+
return v;
|
|
736
|
+
};
|
|
726
737
|
cli
|
|
727
738
|
.option('-c, --config <file>', `[string] use specified config file`)
|
|
728
|
-
.option('--base <path>', `[string] public base path (default: /)
|
|
739
|
+
.option('--base <path>', `[string] public base path (default: /)`, {
|
|
740
|
+
type: [convertBase],
|
|
741
|
+
})
|
|
729
742
|
.option('-l, --logLevel <level>', `[string] info | warn | error | silent`)
|
|
730
743
|
.option('--clearScreen', `[boolean] allow/disable clear screen when logging`)
|
|
731
744
|
.option('-d, --debug [feat]', `[string | boolean] show debug logs`)
|
|
@@ -747,7 +760,7 @@ cli
|
|
|
747
760
|
filterDuplicateOptions(options);
|
|
748
761
|
// output structure is preserved even after bundling so require()
|
|
749
762
|
// is ok here
|
|
750
|
-
const { createServer } = await import('./chunks/dep-
|
|
763
|
+
const { createServer } = await import('./chunks/dep-RTfXXG9P.js').then(function (n) { return n.C; });
|
|
751
764
|
try {
|
|
752
765
|
const server = await createServer({
|
|
753
766
|
root,
|
|
@@ -768,9 +781,12 @@ cli
|
|
|
768
781
|
const startupDurationString = viteStartTime
|
|
769
782
|
? colors.dim(`ready in ${colors.reset(colors.bold(Math.ceil(performance.now() - viteStartTime)))} ms`)
|
|
770
783
|
: '';
|
|
771
|
-
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, {
|
|
784
|
+
info(`\n ${colors.green(`${colors.bold('VITE')} v${VERSION}`)} ${startupDurationString}\n`, {
|
|
785
|
+
clear: !server.config.logger.hasWarned &&
|
|
786
|
+
!globalThis.__vite_cjs_skip_clear_screen,
|
|
787
|
+
});
|
|
772
788
|
server.printUrls();
|
|
773
|
-
|
|
789
|
+
server.bindCLIShortcuts({
|
|
774
790
|
print: true,
|
|
775
791
|
customShortcuts: [
|
|
776
792
|
profileSession && {
|
|
@@ -825,7 +841,7 @@ cli
|
|
|
825
841
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
826
842
|
.action(async (root, options) => {
|
|
827
843
|
filterDuplicateOptions(options);
|
|
828
|
-
const { build } = await import('./chunks/dep-
|
|
844
|
+
const { build } = await import('./chunks/dep-RTfXXG9P.js').then(function (n) { return n.B; });
|
|
829
845
|
const buildOptions = cleanOptions(options);
|
|
830
846
|
try {
|
|
831
847
|
await build({
|
|
@@ -853,7 +869,7 @@ cli
|
|
|
853
869
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
854
870
|
.action(async (root, options) => {
|
|
855
871
|
filterDuplicateOptions(options);
|
|
856
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
872
|
+
const { optimizeDeps } = await import('./chunks/dep-RTfXXG9P.js').then(function (n) { return n.A; });
|
|
857
873
|
try {
|
|
858
874
|
const config = await resolveConfig({
|
|
859
875
|
root,
|
|
@@ -880,7 +896,7 @@ cli
|
|
|
880
896
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
881
897
|
.action(async (root, options) => {
|
|
882
898
|
filterDuplicateOptions(options);
|
|
883
|
-
const { preview } = await import('./chunks/dep-
|
|
899
|
+
const { preview } = await import('./chunks/dep-RTfXXG9P.js').then(function (n) { return n.D; });
|
|
884
900
|
try {
|
|
885
901
|
const server = await preview({
|
|
886
902
|
root,
|
|
@@ -900,7 +916,7 @@ cli
|
|
|
900
916
|
},
|
|
901
917
|
});
|
|
902
918
|
server.printUrls();
|
|
903
|
-
|
|
919
|
+
server.bindCLIShortcuts({ print: true });
|
|
904
920
|
}
|
|
905
921
|
catch (e) {
|
|
906
922
|
createLogger(options.logLevel).error(colors.red(`error when starting preview server:\n${e.stack}`), { error: e });
|