@rolldown/browser 1.0.0-beta.29-commit.fe1bea3 → 1.0.0-beta.30
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/dist/cli.cjs +8 -8
- package/dist/cli.mjs +8 -8
- package/dist/config.cjs +3 -3
- package/dist/config.d.cts +2 -2
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +3 -3
- package/dist/experimental-index.browser.mjs +2 -2
- package/dist/experimental-index.cjs +2 -3
- package/dist/experimental-index.d.cts +3 -3
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +3 -3
- package/dist/filter-index.d.cts +2 -2
- package/dist/filter-index.d.mts +2 -2
- package/dist/index.browser.mjs +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/parallel-plugin-worker.cjs +2 -2
- package/dist/parallel-plugin-worker.mjs +2 -2
- package/dist/parallel-plugin.d.cts +2 -2
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.cjs +1 -1
- package/dist/parse-ast-index.d.cts +1 -1
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -1
- package/dist/rolldown-binding.wasi-browser.js +0 -1
- package/dist/rolldown-binding.wasi.cjs +0 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-BO7hG1pA.d.mts → binding-BAyrv67G.d.cts} +29 -45
- package/dist/shared/{binding-D1lW862e.d.cts → binding-DUz1Q2JW.d.mts} +29 -45
- package/dist/shared/{define-config-CKxZwWu_.d.mts → define-config-5ALh7WDx.d.mts} +67 -9
- package/dist/shared/{define-config-O6TCZLYU.d.cts → define-config-CMH1jWhX.d.cts} +67 -9
- package/dist/shared/{load-config-C2Df0pqb.mjs → load-config-Uk19Sezh.mjs} +2 -2
- package/dist/shared/{load-config-CPJ15pW3.cjs → load-config-XQT0YfAt.cjs} +2 -2
- package/dist/shared/{parse-ast-index-rwZvDBjW.mjs → parse-ast-index-Z-sG_A0I.mjs} +2 -2
- package/dist/shared/{parse-ast-index-CLjgl4c8.cjs → parse-ast-index-ZiMOspE_.cjs} +2 -2
- package/dist/shared/{src-BLxfrK6S.cjs → src-CXCXfLrc.cjs} +88 -136
- package/dist/shared/{src-BWVOVy_u.mjs → src-CkG0t1KT.mjs} +89 -131
- package/dist/{src-CVDDqNxL.js → src-DGzv-S-Z.js} +57 -46
- package/package.json +2 -2
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-DDkG_k5U.cjs');
|
|
2
2
|
const require_dist = require('./dist-BVAp8sOm.cjs');
|
|
3
|
-
const require_parse_ast_index = require('./parse-ast-index-
|
|
3
|
+
const require_parse_ast_index = require('./parse-ast-index-ZiMOspE_.cjs');
|
|
4
4
|
const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("../rolldown-binding.wasi.cjs"));
|
|
5
5
|
const node_path = require_chunk.__toESM(require("node:path"));
|
|
6
6
|
const node_url = require_chunk.__toESM(require("node:url"));
|
|
7
|
+
const node_fs_promises = require_chunk.__toESM(require("node:fs/promises"));
|
|
7
8
|
const node_os = require_chunk.__toESM(require("node:os"));
|
|
8
9
|
const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
|
|
9
10
|
|
|
10
11
|
//#region package.json
|
|
11
|
-
var version = "1.0.0-beta.
|
|
12
|
+
var version = "1.0.0-beta.30";
|
|
12
13
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
13
14
|
|
|
14
15
|
//#endregion
|
|
@@ -87,27 +88,6 @@ function viteResolvePlugin(config) {
|
|
|
87
88
|
const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", config);
|
|
88
89
|
return makeBuiltinPluginCallable(builtinPlugin);
|
|
89
90
|
}
|
|
90
|
-
function moduleFederationPlugin(config) {
|
|
91
|
-
return new BuiltinPlugin("builtin:module-federation", {
|
|
92
|
-
...config,
|
|
93
|
-
remotes: config.remotes && Object.entries(config.remotes).map(([name, remote]) => {
|
|
94
|
-
if (typeof remote === "string") {
|
|
95
|
-
const [entryGlobalName] = remote.split("@");
|
|
96
|
-
const entry = remote.replace(entryGlobalName + "@", "");
|
|
97
|
-
return {
|
|
98
|
-
entry,
|
|
99
|
-
name,
|
|
100
|
-
entryGlobalName
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
return {
|
|
104
|
-
...remote,
|
|
105
|
-
name: remote.name ?? name
|
|
106
|
-
};
|
|
107
|
-
}),
|
|
108
|
-
manifest: config.manifest === false ? void 0 : config.manifest === true ? {} : config.manifest
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
91
|
function isolatedDeclarationPlugin(config) {
|
|
112
92
|
return new BuiltinPlugin("builtin:isolated-declaration", config);
|
|
113
93
|
}
|
|
@@ -1451,10 +1431,9 @@ function addError(errors, message) {
|
|
|
1451
1431
|
function handleError(message, config) {
|
|
1452
1432
|
switch (config?.errorMode) {
|
|
1453
1433
|
case "ignore": break;
|
|
1454
|
-
case "warn":
|
|
1434
|
+
case "warn":
|
|
1455
1435
|
console.warn(message);
|
|
1456
1436
|
break;
|
|
1457
|
-
}
|
|
1458
1437
|
default: throw new Error(message);
|
|
1459
1438
|
}
|
|
1460
1439
|
}
|
|
@@ -1471,10 +1450,9 @@ function convertAction(jsonSchema, valibotAction, config) {
|
|
|
1471
1450
|
if (config?.ignoreActions?.includes(valibotAction.type)) return jsonSchema;
|
|
1472
1451
|
let errors;
|
|
1473
1452
|
switch (valibotAction.type) {
|
|
1474
|
-
case "base64":
|
|
1453
|
+
case "base64":
|
|
1475
1454
|
jsonSchema.contentEncoding = "base64";
|
|
1476
1455
|
break;
|
|
1477
|
-
}
|
|
1478
1456
|
case "bic":
|
|
1479
1457
|
case "cuid2":
|
|
1480
1458
|
case "decimal":
|
|
@@ -1484,57 +1462,46 @@ function convertAction(jsonSchema, valibotAction, config) {
|
|
|
1484
1462
|
case "hex_color":
|
|
1485
1463
|
case "nanoid":
|
|
1486
1464
|
case "octal":
|
|
1487
|
-
case "ulid":
|
|
1465
|
+
case "ulid":
|
|
1488
1466
|
jsonSchema.pattern = valibotAction.requirement.source;
|
|
1489
1467
|
break;
|
|
1490
|
-
|
|
1491
|
-
case "description": {
|
|
1468
|
+
case "description":
|
|
1492
1469
|
jsonSchema.description = valibotAction.description;
|
|
1493
1470
|
break;
|
|
1494
|
-
|
|
1495
|
-
case "email": {
|
|
1471
|
+
case "email":
|
|
1496
1472
|
jsonSchema.format = "email";
|
|
1497
1473
|
break;
|
|
1498
|
-
|
|
1499
|
-
case "empty": {
|
|
1474
|
+
case "empty":
|
|
1500
1475
|
if (jsonSchema.type === "array") jsonSchema.maxItems = 0;
|
|
1501
1476
|
else {
|
|
1502
1477
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1503
1478
|
jsonSchema.maxLength = 0;
|
|
1504
1479
|
}
|
|
1505
1480
|
break;
|
|
1506
|
-
|
|
1507
|
-
case "entries": {
|
|
1481
|
+
case "entries":
|
|
1508
1482
|
jsonSchema.minProperties = valibotAction.requirement;
|
|
1509
1483
|
jsonSchema.maxProperties = valibotAction.requirement;
|
|
1510
1484
|
break;
|
|
1511
|
-
|
|
1512
|
-
case "integer": {
|
|
1485
|
+
case "integer":
|
|
1513
1486
|
jsonSchema.type = "integer";
|
|
1514
1487
|
break;
|
|
1515
|
-
|
|
1516
|
-
case "ipv4": {
|
|
1488
|
+
case "ipv4":
|
|
1517
1489
|
jsonSchema.format = "ipv4";
|
|
1518
1490
|
break;
|
|
1519
|
-
|
|
1520
|
-
case "ipv6": {
|
|
1491
|
+
case "ipv6":
|
|
1521
1492
|
jsonSchema.format = "ipv6";
|
|
1522
1493
|
break;
|
|
1523
|
-
|
|
1524
|
-
case "iso_date": {
|
|
1494
|
+
case "iso_date":
|
|
1525
1495
|
jsonSchema.format = "date";
|
|
1526
1496
|
break;
|
|
1527
|
-
}
|
|
1528
1497
|
case "iso_date_time":
|
|
1529
|
-
case "iso_timestamp":
|
|
1498
|
+
case "iso_timestamp":
|
|
1530
1499
|
jsonSchema.format = "date-time";
|
|
1531
1500
|
break;
|
|
1532
|
-
|
|
1533
|
-
case "iso_time": {
|
|
1501
|
+
case "iso_time":
|
|
1534
1502
|
jsonSchema.format = "time";
|
|
1535
1503
|
break;
|
|
1536
|
-
|
|
1537
|
-
case "length": {
|
|
1504
|
+
case "length":
|
|
1538
1505
|
if (jsonSchema.type === "array") {
|
|
1539
1506
|
jsonSchema.minItems = valibotAction.requirement;
|
|
1540
1507
|
jsonSchema.maxItems = valibotAction.requirement;
|
|
@@ -1544,80 +1511,65 @@ function convertAction(jsonSchema, valibotAction, config) {
|
|
|
1544
1511
|
jsonSchema.maxLength = valibotAction.requirement;
|
|
1545
1512
|
}
|
|
1546
1513
|
break;
|
|
1547
|
-
|
|
1548
|
-
case "max_entries": {
|
|
1514
|
+
case "max_entries":
|
|
1549
1515
|
jsonSchema.maxProperties = valibotAction.requirement;
|
|
1550
1516
|
break;
|
|
1551
|
-
|
|
1552
|
-
case "max_length": {
|
|
1517
|
+
case "max_length":
|
|
1553
1518
|
if (jsonSchema.type === "array") jsonSchema.maxItems = valibotAction.requirement;
|
|
1554
1519
|
else {
|
|
1555
1520
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1556
1521
|
jsonSchema.maxLength = valibotAction.requirement;
|
|
1557
1522
|
}
|
|
1558
1523
|
break;
|
|
1559
|
-
|
|
1560
|
-
case "max_value": {
|
|
1524
|
+
case "max_value":
|
|
1561
1525
|
if (jsonSchema.type !== "number") errors = addError(errors, `The "max_value" action is not supported on type "${jsonSchema.type}".`);
|
|
1562
1526
|
jsonSchema.maximum = valibotAction.requirement;
|
|
1563
1527
|
break;
|
|
1564
|
-
|
|
1565
|
-
case "metadata": {
|
|
1528
|
+
case "metadata":
|
|
1566
1529
|
if (typeof valibotAction.metadata.title === "string") jsonSchema.title = valibotAction.metadata.title;
|
|
1567
1530
|
if (typeof valibotAction.metadata.description === "string") jsonSchema.description = valibotAction.metadata.description;
|
|
1568
1531
|
if (Array.isArray(valibotAction.metadata.examples)) jsonSchema.examples = valibotAction.metadata.examples;
|
|
1569
1532
|
break;
|
|
1570
|
-
|
|
1571
|
-
case "min_entries": {
|
|
1533
|
+
case "min_entries":
|
|
1572
1534
|
jsonSchema.minProperties = valibotAction.requirement;
|
|
1573
1535
|
break;
|
|
1574
|
-
|
|
1575
|
-
case "min_length": {
|
|
1536
|
+
case "min_length":
|
|
1576
1537
|
if (jsonSchema.type === "array") jsonSchema.minItems = valibotAction.requirement;
|
|
1577
1538
|
else {
|
|
1578
1539
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1579
1540
|
jsonSchema.minLength = valibotAction.requirement;
|
|
1580
1541
|
}
|
|
1581
1542
|
break;
|
|
1582
|
-
|
|
1583
|
-
case "min_value": {
|
|
1543
|
+
case "min_value":
|
|
1584
1544
|
if (jsonSchema.type !== "number") errors = addError(errors, `The "min_value" action is not supported on type "${jsonSchema.type}".`);
|
|
1585
1545
|
jsonSchema.minimum = valibotAction.requirement;
|
|
1586
1546
|
break;
|
|
1587
|
-
|
|
1588
|
-
case "multiple_of": {
|
|
1547
|
+
case "multiple_of":
|
|
1589
1548
|
jsonSchema.multipleOf = valibotAction.requirement;
|
|
1590
1549
|
break;
|
|
1591
|
-
|
|
1592
|
-
case "non_empty": {
|
|
1550
|
+
case "non_empty":
|
|
1593
1551
|
if (jsonSchema.type === "array") jsonSchema.minItems = 1;
|
|
1594
1552
|
else {
|
|
1595
1553
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1596
1554
|
jsonSchema.minLength = 1;
|
|
1597
1555
|
}
|
|
1598
1556
|
break;
|
|
1599
|
-
|
|
1600
|
-
case "regex": {
|
|
1557
|
+
case "regex":
|
|
1601
1558
|
if (valibotAction.requirement.flags) errors = addError(errors, "RegExp flags are not supported by JSON Schema.");
|
|
1602
1559
|
jsonSchema.pattern = valibotAction.requirement.source;
|
|
1603
1560
|
break;
|
|
1604
|
-
|
|
1605
|
-
case "title": {
|
|
1561
|
+
case "title":
|
|
1606
1562
|
jsonSchema.title = valibotAction.title;
|
|
1607
1563
|
break;
|
|
1608
|
-
|
|
1609
|
-
case "url": {
|
|
1564
|
+
case "url":
|
|
1610
1565
|
jsonSchema.format = "uri";
|
|
1611
1566
|
break;
|
|
1612
|
-
|
|
1613
|
-
case "uuid": {
|
|
1567
|
+
case "uuid":
|
|
1614
1568
|
jsonSchema.format = "uuid";
|
|
1615
1569
|
break;
|
|
1616
|
-
|
|
1617
|
-
case "value": {
|
|
1570
|
+
case "value":
|
|
1618
1571
|
jsonSchema.const = valibotAction.requirement;
|
|
1619
1572
|
break;
|
|
1620
|
-
}
|
|
1621
1573
|
default: errors = addError(errors, `The "${valibotAction.type}" action cannot be converted to JSON Schema.`);
|
|
1622
1574
|
}
|
|
1623
1575
|
if (config?.overrideAction) {
|
|
@@ -1692,31 +1644,26 @@ function convertSchema(jsonSchema, valibotSchema, config, context, skipRef = fal
|
|
|
1692
1644
|
}
|
|
1693
1645
|
let errors;
|
|
1694
1646
|
switch (valibotSchema.type) {
|
|
1695
|
-
case "boolean":
|
|
1647
|
+
case "boolean":
|
|
1696
1648
|
jsonSchema.type = "boolean";
|
|
1697
1649
|
break;
|
|
1698
|
-
|
|
1699
|
-
case "null": {
|
|
1650
|
+
case "null":
|
|
1700
1651
|
jsonSchema.type = "null";
|
|
1701
1652
|
break;
|
|
1702
|
-
|
|
1703
|
-
case "number": {
|
|
1653
|
+
case "number":
|
|
1704
1654
|
jsonSchema.type = "number";
|
|
1705
1655
|
break;
|
|
1706
|
-
|
|
1707
|
-
case "string": {
|
|
1656
|
+
case "string":
|
|
1708
1657
|
jsonSchema.type = "string";
|
|
1709
1658
|
break;
|
|
1710
|
-
|
|
1711
|
-
case "array": {
|
|
1659
|
+
case "array":
|
|
1712
1660
|
jsonSchema.type = "array";
|
|
1713
1661
|
jsonSchema.items = convertSchema({}, valibotSchema.item, config, context);
|
|
1714
1662
|
break;
|
|
1715
|
-
}
|
|
1716
1663
|
case "tuple":
|
|
1717
1664
|
case "tuple_with_rest":
|
|
1718
1665
|
case "loose_tuple":
|
|
1719
|
-
case "strict_tuple":
|
|
1666
|
+
case "strict_tuple":
|
|
1720
1667
|
jsonSchema.type = "array";
|
|
1721
1668
|
jsonSchema.items = [];
|
|
1722
1669
|
jsonSchema.minItems = valibotSchema.items.length;
|
|
@@ -1724,11 +1671,10 @@ function convertSchema(jsonSchema, valibotSchema, config, context, skipRef = fal
|
|
|
1724
1671
|
if (valibotSchema.type === "tuple_with_rest") jsonSchema.additionalItems = convertSchema({}, valibotSchema.rest, config, context);
|
|
1725
1672
|
else if (valibotSchema.type === "strict_tuple") jsonSchema.additionalItems = false;
|
|
1726
1673
|
break;
|
|
1727
|
-
}
|
|
1728
1674
|
case "object":
|
|
1729
1675
|
case "object_with_rest":
|
|
1730
1676
|
case "loose_object":
|
|
1731
|
-
case "strict_object":
|
|
1677
|
+
case "strict_object":
|
|
1732
1678
|
jsonSchema.type = "object";
|
|
1733
1679
|
jsonSchema.properties = {};
|
|
1734
1680
|
jsonSchema.required = [];
|
|
@@ -1740,52 +1686,43 @@ function convertSchema(jsonSchema, valibotSchema, config, context, skipRef = fal
|
|
|
1740
1686
|
if (valibotSchema.type === "object_with_rest") jsonSchema.additionalProperties = convertSchema({}, valibotSchema.rest, config, context);
|
|
1741
1687
|
else if (valibotSchema.type === "strict_object") jsonSchema.additionalProperties = false;
|
|
1742
1688
|
break;
|
|
1743
|
-
|
|
1744
|
-
case "record": {
|
|
1689
|
+
case "record":
|
|
1745
1690
|
if ("pipe" in valibotSchema.key) errors = addError(errors, "The \"record\" schema with a schema for the key that contains a \"pipe\" cannot be converted to JSON Schema.");
|
|
1746
1691
|
if (valibotSchema.key.type !== "string") errors = addError(errors, `The "record" schema with the "${valibotSchema.key.type}" schema for the key cannot be converted to JSON Schema.`);
|
|
1747
1692
|
jsonSchema.type = "object";
|
|
1748
1693
|
jsonSchema.additionalProperties = convertSchema({}, valibotSchema.value, config, context);
|
|
1749
1694
|
break;
|
|
1750
|
-
}
|
|
1751
1695
|
case "any":
|
|
1752
1696
|
case "unknown": break;
|
|
1753
1697
|
case "nullable":
|
|
1754
|
-
case "nullish":
|
|
1698
|
+
case "nullish":
|
|
1755
1699
|
jsonSchema.anyOf = [convertSchema({}, valibotSchema.wrapped, config, context), { type: "null" }];
|
|
1756
1700
|
if (valibotSchema.default !== void 0) jsonSchema.default = getDefault(valibotSchema);
|
|
1757
1701
|
break;
|
|
1758
|
-
}
|
|
1759
1702
|
case "exact_optional":
|
|
1760
1703
|
case "optional":
|
|
1761
|
-
case "undefinedable":
|
|
1704
|
+
case "undefinedable":
|
|
1762
1705
|
jsonSchema = convertSchema(jsonSchema, valibotSchema.wrapped, config, context);
|
|
1763
1706
|
if (valibotSchema.default !== void 0) jsonSchema.default = getDefault(valibotSchema);
|
|
1764
1707
|
break;
|
|
1765
|
-
|
|
1766
|
-
case "literal": {
|
|
1708
|
+
case "literal":
|
|
1767
1709
|
if (typeof valibotSchema.literal !== "boolean" && typeof valibotSchema.literal !== "number" && typeof valibotSchema.literal !== "string") errors = addError(errors, "The value of the \"literal\" schema is not JSON compatible.");
|
|
1768
1710
|
jsonSchema.const = valibotSchema.literal;
|
|
1769
1711
|
break;
|
|
1770
|
-
|
|
1771
|
-
case "enum": {
|
|
1712
|
+
case "enum":
|
|
1772
1713
|
jsonSchema.enum = valibotSchema.options;
|
|
1773
1714
|
break;
|
|
1774
|
-
|
|
1775
|
-
case "picklist": {
|
|
1715
|
+
case "picklist":
|
|
1776
1716
|
if (valibotSchema.options.some((option) => typeof option !== "number" && typeof option !== "string")) errors = addError(errors, "An option of the \"picklist\" schema is not JSON compatible.");
|
|
1777
1717
|
jsonSchema.enum = valibotSchema.options;
|
|
1778
1718
|
break;
|
|
1779
|
-
}
|
|
1780
1719
|
case "union":
|
|
1781
|
-
case "variant":
|
|
1720
|
+
case "variant":
|
|
1782
1721
|
jsonSchema.anyOf = valibotSchema.options.map((option) => convertSchema({}, option, config, context));
|
|
1783
1722
|
break;
|
|
1784
|
-
|
|
1785
|
-
case "intersect": {
|
|
1723
|
+
case "intersect":
|
|
1786
1724
|
jsonSchema.allOf = valibotSchema.options.map((option) => convertSchema({}, option, config, context));
|
|
1787
1725
|
break;
|
|
1788
|
-
}
|
|
1789
1726
|
case "lazy": {
|
|
1790
1727
|
let wrappedValibotSchema = context.getterMap.get(valibotSchema.getter);
|
|
1791
1728
|
if (!wrappedValibotSchema) {
|
|
@@ -1862,7 +1799,7 @@ function toJsonSchema(schema, config) {
|
|
|
1862
1799
|
|
|
1863
1800
|
//#endregion
|
|
1864
1801
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs
|
|
1865
|
-
var require_ansis = require_chunk.__commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs"(exports, module) {
|
|
1802
|
+
var require_ansis = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs": ((exports, module) => {
|
|
1866
1803
|
let e, t, r, { defineProperty: n, setPrototypeOf: l, create: o, keys: s } = Object, i$1 = "", { round: c, max: a$1 } = Math, p = (e$1) => {
|
|
1867
1804
|
let t$1 = /([a-f\d]{3,6})/i.exec(e$1)?.[1], r$1 = t$1?.length, n$1 = parseInt(6 ^ r$1 ? 3 ^ r$1 ? "0" : t$1[0] + t$1[0] + t$1[1] + t$1[1] + t$1[2] + t$1[2] : t$1, 16);
|
|
1868
1805
|
return [
|
|
@@ -1963,11 +1900,11 @@ var require_ansis = require_chunk.__commonJS({ "../../node_modules/.pnpm/ansis@4
|
|
|
1963
1900
|
})), t$1.extend(M);
|
|
1964
1901
|
}, y = new w();
|
|
1965
1902
|
module.exports = y, y.default = y;
|
|
1966
|
-
} });
|
|
1903
|
+
}) });
|
|
1967
1904
|
|
|
1968
1905
|
//#endregion
|
|
1969
1906
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.mjs
|
|
1970
|
-
var import_ansis = require_chunk.__toESM(require_ansis(), 1);
|
|
1907
|
+
var import_ansis = /* @__PURE__ */ require_chunk.__toESM(require_ansis(), 1);
|
|
1971
1908
|
var ansis_default = import_ansis.default;
|
|
1972
1909
|
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_ansis.default;
|
|
1973
1910
|
|
|
@@ -2119,7 +2056,10 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
|
2119
2056
|
unknownGlobalSideEffects: optional(boolean()),
|
|
2120
2057
|
commonjs: optional(boolean())
|
|
2121
2058
|
})]);
|
|
2122
|
-
const OptimizationOptionsSchema = strictObject({
|
|
2059
|
+
const OptimizationOptionsSchema = strictObject({
|
|
2060
|
+
inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")),
|
|
2061
|
+
pifeForModuleWrappers: pipe(optional(boolean()), description("Use PIFE pattern for module wrappers"))
|
|
2062
|
+
});
|
|
2123
2063
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
2124
2064
|
LogLevelSchema,
|
|
2125
2065
|
RollupLogSchema,
|
|
@@ -2274,6 +2214,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2274
2214
|
literal("inline"),
|
|
2275
2215
|
literal("hidden")
|
|
2276
2216
|
])), description(`Generate sourcemap (\`-s inline\` for inline, or ${ansis_default.bold("pass the `-s` on the last argument if you want to generate `.map` file")})`)),
|
|
2217
|
+
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2277
2218
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2278
2219
|
sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
|
|
2279
2220
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
@@ -2591,44 +2532,38 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2591
2532
|
});
|
|
2592
2533
|
break;
|
|
2593
2534
|
}
|
|
2594
|
-
case "not":
|
|
2535
|
+
case "not":
|
|
2595
2536
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2596
2537
|
list.push({ kind: "Not" });
|
|
2597
2538
|
break;
|
|
2598
|
-
|
|
2599
|
-
case "id": {
|
|
2539
|
+
case "id":
|
|
2600
2540
|
list.push({
|
|
2601
2541
|
kind: "Id",
|
|
2602
2542
|
payload: expr.pattern
|
|
2603
2543
|
});
|
|
2604
2544
|
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
2605
2545
|
break;
|
|
2606
|
-
|
|
2607
|
-
case "moduleType": {
|
|
2546
|
+
case "moduleType":
|
|
2608
2547
|
list.push({
|
|
2609
2548
|
kind: "ModuleType",
|
|
2610
2549
|
payload: expr.pattern
|
|
2611
2550
|
});
|
|
2612
2551
|
break;
|
|
2613
|
-
|
|
2614
|
-
case "code": {
|
|
2552
|
+
case "code":
|
|
2615
2553
|
list.push({
|
|
2616
2554
|
kind: "Code",
|
|
2617
2555
|
payload: expr.pattern
|
|
2618
2556
|
});
|
|
2619
2557
|
break;
|
|
2620
|
-
|
|
2621
|
-
case "include": {
|
|
2558
|
+
case "include":
|
|
2622
2559
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2623
2560
|
list.push({ kind: "Include" });
|
|
2624
2561
|
break;
|
|
2625
|
-
|
|
2626
|
-
case "exclude": {
|
|
2562
|
+
case "exclude":
|
|
2627
2563
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2628
2564
|
list.push({ kind: "Exclude" });
|
|
2629
2565
|
break;
|
|
2630
|
-
|
|
2631
|
-
case "query": {
|
|
2566
|
+
case "query":
|
|
2632
2567
|
list.push({
|
|
2633
2568
|
kind: "QueryKey",
|
|
2634
2569
|
payload: expr.key
|
|
@@ -2638,7 +2573,6 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2638
2573
|
payload: expr.pattern
|
|
2639
2574
|
});
|
|
2640
2575
|
break;
|
|
2641
|
-
}
|
|
2642
2576
|
default: throw new Error(`Unknown filter expression: ${expr}`);
|
|
2643
2577
|
}
|
|
2644
2578
|
}
|
|
@@ -2689,9 +2623,28 @@ function bindingAssetSource(source) {
|
|
|
2689
2623
|
return { inner: source };
|
|
2690
2624
|
}
|
|
2691
2625
|
|
|
2626
|
+
//#endregion
|
|
2627
|
+
//#region src/plugin/fs.ts
|
|
2628
|
+
const fsModule = {
|
|
2629
|
+
appendFile: node_fs_promises.default.appendFile,
|
|
2630
|
+
copyFile: node_fs_promises.default.copyFile,
|
|
2631
|
+
mkdir: node_fs_promises.default.mkdir,
|
|
2632
|
+
mkdtemp: node_fs_promises.default.mkdtemp,
|
|
2633
|
+
readdir: node_fs_promises.default.readdir,
|
|
2634
|
+
readFile: node_fs_promises.default.readFile,
|
|
2635
|
+
realpath: node_fs_promises.default.realpath,
|
|
2636
|
+
rename: node_fs_promises.default.rename,
|
|
2637
|
+
rmdir: node_fs_promises.default.rmdir,
|
|
2638
|
+
stat: node_fs_promises.default.stat,
|
|
2639
|
+
lstat: node_fs_promises.default.lstat,
|
|
2640
|
+
unlink: node_fs_promises.default.unlink,
|
|
2641
|
+
writeFile: node_fs_promises.default.writeFile
|
|
2642
|
+
};
|
|
2643
|
+
|
|
2692
2644
|
//#endregion
|
|
2693
2645
|
//#region src/plugin/plugin-context.ts
|
|
2694
2646
|
var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
2647
|
+
fs = fsModule;
|
|
2695
2648
|
getModuleInfo;
|
|
2696
2649
|
constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
|
|
2697
2650
|
super(onLog, logLevel, plugin.name, watchMode);
|
|
@@ -3609,7 +3562,7 @@ var ChunkingContextImpl = class {
|
|
|
3609
3562
|
//#endregion
|
|
3610
3563
|
//#region src/utils/bindingify-output-options.ts
|
|
3611
3564
|
function bindingifyOutputOptions(outputOptions) {
|
|
3612
|
-
const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
|
|
3565
|
+
const { dir, format, exports: exports$1, hashCharacters, sourcemap, sourcemapBaseUrl, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName, preserveModules, virtualDirname, legalComments, preserveModulesRoot, manualChunks, topLevelVar } = outputOptions;
|
|
3613
3566
|
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3614
3567
|
return {
|
|
3615
3568
|
dir,
|
|
@@ -3618,6 +3571,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
3618
3571
|
exports: exports$1,
|
|
3619
3572
|
hashCharacters,
|
|
3620
3573
|
sourcemap: bindingifySourcemap(sourcemap),
|
|
3574
|
+
sourcemapBaseUrl,
|
|
3621
3575
|
sourcemapDebugIds,
|
|
3622
3576
|
sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
|
|
3623
3577
|
sourcemapPathTransform,
|
|
@@ -4352,8 +4306,12 @@ var RolldownBuild = class {
|
|
|
4352
4306
|
await this.close();
|
|
4353
4307
|
}
|
|
4354
4308
|
async generateHmrPatch(changedFiles) {
|
|
4355
|
-
const
|
|
4356
|
-
|
|
4309
|
+
const ret = await this.#bundlerImpl.impl.generateHmrPatch(changedFiles);
|
|
4310
|
+
switch (ret.type) {
|
|
4311
|
+
case "Ok": return ret.field0;
|
|
4312
|
+
case "Error": throw normalizeErrors(ret.field0);
|
|
4313
|
+
default: throw new Error("Unknown error");
|
|
4314
|
+
}
|
|
4357
4315
|
}
|
|
4358
4316
|
async hmrInvalidate(file, firstInvalidatedBy) {
|
|
4359
4317
|
const output = await this.#bundlerImpl.impl.hmrInvalidate(file, firstInvalidatedBy);
|
|
@@ -4663,12 +4621,6 @@ Object.defineProperty(exports, 'manifestPlugin', {
|
|
|
4663
4621
|
return manifestPlugin;
|
|
4664
4622
|
}
|
|
4665
4623
|
});
|
|
4666
|
-
Object.defineProperty(exports, 'moduleFederationPlugin', {
|
|
4667
|
-
enumerable: true,
|
|
4668
|
-
get: function () {
|
|
4669
|
-
return moduleFederationPlugin;
|
|
4670
|
-
}
|
|
4671
|
-
});
|
|
4672
4624
|
Object.defineProperty(exports, 'modulePreloadPolyfillPlugin', {
|
|
4673
4625
|
enumerable: true,
|
|
4674
4626
|
get: function () {
|