@rolldown/browser 1.0.0-beta.29-commit.fe1bea3 → 1.0.0-beta.31
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 +23 -8
- package/dist/cli.mjs +23 -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/experimental-runtime-types.d.ts +2 -0
- 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-B2f_h9DF.d.mts} +42 -44
- package/dist/shared/{binding-D1lW862e.d.cts → binding-CCkTRaSB.d.cts} +42 -44
- package/dist/shared/{define-config-CKxZwWu_.d.mts → define-config-BzVT47Bj.d.cts} +73 -11
- package/dist/shared/{define-config-O6TCZLYU.d.cts → define-config-xzVj_WrD.d.mts} +73 -11
- package/dist/shared/{load-config-CPJ15pW3.cjs → load-config-9KWiC1Y_.cjs} +2 -2
- package/dist/shared/{load-config-C2Df0pqb.mjs → load-config-DCz6MK3j.mjs} +2 -2
- package/dist/shared/{parse-ast-index-CLjgl4c8.cjs → parse-ast-index-DZ5uPSgP.cjs} +2 -2
- package/dist/shared/{parse-ast-index-rwZvDBjW.mjs → parse-ast-index-r9XO-GhB.mjs} +2 -2
- package/dist/shared/{src-BWVOVy_u.mjs → src-BSeUgDdv.mjs} +115 -150
- package/dist/shared/{src-BLxfrK6S.cjs → src-gD0LmYxq.cjs} +114 -155
- package/dist/{src-CVDDqNxL.js → src-C8_hb_FH.js} +82 -64
- 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-DZ5uPSgP.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.31";
|
|
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
|
}
|
|
@@ -437,7 +417,7 @@ function getSortedPlugins(hookName, plugins) {
|
|
|
437
417
|
}
|
|
438
418
|
|
|
439
419
|
//#endregion
|
|
440
|
-
//#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.
|
|
420
|
+
//#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.9.2/node_modules/valibot/dist/index.js
|
|
441
421
|
var store$1;
|
|
442
422
|
/* @__NO_SIDE_EFFECTS__ */
|
|
443
423
|
function getGlobalConfig(config2) {
|
|
@@ -1426,7 +1406,7 @@ function safeParse(schema, input, config2) {
|
|
|
1426
1406
|
}
|
|
1427
1407
|
|
|
1428
1408
|
//#endregion
|
|
1429
|
-
//#region ../../node_modules/.pnpm/@valibot+to-json-schema@1.3.0_valibot@1.1.0_typescript@5.
|
|
1409
|
+
//#region ../../node_modules/.pnpm/@valibot+to-json-schema@1.3.0_valibot@1.1.0_typescript@5.9.2_/node_modules/@valibot/to-json-schema/dist/index.js
|
|
1430
1410
|
/**
|
|
1431
1411
|
* Adds an error message to the errors array.
|
|
1432
1412
|
*
|
|
@@ -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
|
|
|
@@ -2078,7 +2015,9 @@ const WatchOptionsSchema = strictObject({
|
|
|
2078
2015
|
pollInterval: optional(number())
|
|
2079
2016
|
})), description("Notify options")),
|
|
2080
2017
|
skipWrite: pipe(optional(boolean()), description("Skip the bundle.write() step")),
|
|
2081
|
-
buildDelay: pipe(optional(number()), description("Throttle watch rebuilds"))
|
|
2018
|
+
buildDelay: pipe(optional(number()), description("Throttle watch rebuilds")),
|
|
2019
|
+
clearScreen: pipe(optional(boolean()), description("Whether to clear the screen when a rebuild is triggered")),
|
|
2020
|
+
onInvalidate: pipe(optional(pipe(function_(), args(tuple([string()])))), description("An optional function that will be called immediately every time a module changes that is part of the build."))
|
|
2082
2021
|
});
|
|
2083
2022
|
const ChecksOptionsSchema = strictObject({
|
|
2084
2023
|
circularDependency: pipe(optional(boolean()), description("Whether to emit warning when detecting circular dependency")),
|
|
@@ -2119,7 +2058,10 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
|
2119
2058
|
unknownGlobalSideEffects: optional(boolean()),
|
|
2120
2059
|
commonjs: optional(boolean())
|
|
2121
2060
|
})]);
|
|
2122
|
-
const OptimizationOptionsSchema = strictObject({
|
|
2061
|
+
const OptimizationOptionsSchema = strictObject({
|
|
2062
|
+
inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")),
|
|
2063
|
+
pifeForModuleWrappers: pipe(optional(boolean()), description("Use PIFE pattern for module wrappers"))
|
|
2064
|
+
});
|
|
2123
2065
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
2124
2066
|
LogLevelSchema,
|
|
2125
2067
|
RollupLogSchema,
|
|
@@ -2274,6 +2216,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2274
2216
|
literal("inline"),
|
|
2275
2217
|
literal("hidden")
|
|
2276
2218
|
])), 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")})`)),
|
|
2219
|
+
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2277
2220
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2278
2221
|
sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
|
|
2279
2222
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
@@ -2495,7 +2438,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
|
2495
2438
|
}
|
|
2496
2439
|
|
|
2497
2440
|
//#endregion
|
|
2498
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2441
|
+
//#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-D6FCK2GA.js
|
|
2499
2442
|
function u$1(o$1, n$1, a$2) {
|
|
2500
2443
|
let t$1 = (r$1) => o$1(r$1, ...n$1);
|
|
2501
2444
|
return a$2 === void 0 ? t$1 : Object.assign(t$1, {
|
|
@@ -2505,7 +2448,7 @@ function u$1(o$1, n$1, a$2) {
|
|
|
2505
2448
|
}
|
|
2506
2449
|
|
|
2507
2450
|
//#endregion
|
|
2508
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2451
|
+
//#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-WIMGWYZL.js
|
|
2509
2452
|
function u(r$1, n$1, o$1) {
|
|
2510
2453
|
let a$2 = r$1.length - n$1.length;
|
|
2511
2454
|
if (a$2 === 0) return r$1(...n$1);
|
|
@@ -2514,7 +2457,7 @@ function u(r$1, n$1, o$1) {
|
|
|
2514
2457
|
}
|
|
2515
2458
|
|
|
2516
2459
|
//#endregion
|
|
2517
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2460
|
+
//#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-3IFJP4R5.js
|
|
2518
2461
|
function d(...r$1) {
|
|
2519
2462
|
return u(i, r$1);
|
|
2520
2463
|
}
|
|
@@ -2591,44 +2534,38 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2591
2534
|
});
|
|
2592
2535
|
break;
|
|
2593
2536
|
}
|
|
2594
|
-
case "not":
|
|
2537
|
+
case "not":
|
|
2595
2538
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2596
2539
|
list.push({ kind: "Not" });
|
|
2597
2540
|
break;
|
|
2598
|
-
|
|
2599
|
-
case "id": {
|
|
2541
|
+
case "id":
|
|
2600
2542
|
list.push({
|
|
2601
2543
|
kind: "Id",
|
|
2602
2544
|
payload: expr.pattern
|
|
2603
2545
|
});
|
|
2604
2546
|
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
2605
2547
|
break;
|
|
2606
|
-
|
|
2607
|
-
case "moduleType": {
|
|
2548
|
+
case "moduleType":
|
|
2608
2549
|
list.push({
|
|
2609
2550
|
kind: "ModuleType",
|
|
2610
2551
|
payload: expr.pattern
|
|
2611
2552
|
});
|
|
2612
2553
|
break;
|
|
2613
|
-
|
|
2614
|
-
case "code": {
|
|
2554
|
+
case "code":
|
|
2615
2555
|
list.push({
|
|
2616
2556
|
kind: "Code",
|
|
2617
2557
|
payload: expr.pattern
|
|
2618
2558
|
});
|
|
2619
2559
|
break;
|
|
2620
|
-
|
|
2621
|
-
case "include": {
|
|
2560
|
+
case "include":
|
|
2622
2561
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2623
2562
|
list.push({ kind: "Include" });
|
|
2624
2563
|
break;
|
|
2625
|
-
|
|
2626
|
-
case "exclude": {
|
|
2564
|
+
case "exclude":
|
|
2627
2565
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2628
2566
|
list.push({ kind: "Exclude" });
|
|
2629
2567
|
break;
|
|
2630
|
-
|
|
2631
|
-
case "query": {
|
|
2568
|
+
case "query":
|
|
2632
2569
|
list.push({
|
|
2633
2570
|
kind: "QueryKey",
|
|
2634
2571
|
payload: expr.key
|
|
@@ -2638,7 +2575,6 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2638
2575
|
payload: expr.pattern
|
|
2639
2576
|
});
|
|
2640
2577
|
break;
|
|
2641
|
-
}
|
|
2642
2578
|
default: throw new Error(`Unknown filter expression: ${expr}`);
|
|
2643
2579
|
}
|
|
2644
2580
|
}
|
|
@@ -2689,9 +2625,28 @@ function bindingAssetSource(source) {
|
|
|
2689
2625
|
return { inner: source };
|
|
2690
2626
|
}
|
|
2691
2627
|
|
|
2628
|
+
//#endregion
|
|
2629
|
+
//#region src/plugin/fs.ts
|
|
2630
|
+
const fsModule = {
|
|
2631
|
+
appendFile: node_fs_promises.default.appendFile,
|
|
2632
|
+
copyFile: node_fs_promises.default.copyFile,
|
|
2633
|
+
mkdir: node_fs_promises.default.mkdir,
|
|
2634
|
+
mkdtemp: node_fs_promises.default.mkdtemp,
|
|
2635
|
+
readdir: node_fs_promises.default.readdir,
|
|
2636
|
+
readFile: node_fs_promises.default.readFile,
|
|
2637
|
+
realpath: node_fs_promises.default.realpath,
|
|
2638
|
+
rename: node_fs_promises.default.rename,
|
|
2639
|
+
rmdir: node_fs_promises.default.rmdir,
|
|
2640
|
+
stat: node_fs_promises.default.stat,
|
|
2641
|
+
lstat: node_fs_promises.default.lstat,
|
|
2642
|
+
unlink: node_fs_promises.default.unlink,
|
|
2643
|
+
writeFile: node_fs_promises.default.writeFile
|
|
2644
|
+
};
|
|
2645
|
+
|
|
2692
2646
|
//#endregion
|
|
2693
2647
|
//#region src/plugin/plugin-context.ts
|
|
2694
2648
|
var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
2649
|
+
fs = fsModule;
|
|
2695
2650
|
getModuleInfo;
|
|
2696
2651
|
constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
|
|
2697
2652
|
super(onLog, logLevel, plugin.name, watchMode);
|
|
@@ -2771,10 +2726,12 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2771
2726
|
};
|
|
2772
2727
|
getAssetFileNames(file) {
|
|
2773
2728
|
if (typeof this.outputOptions.assetFileNames === "function") return this.outputOptions.assetFileNames({
|
|
2729
|
+
type: "asset",
|
|
2730
|
+
name: file.name,
|
|
2774
2731
|
names: file.name ? [file.name] : [],
|
|
2732
|
+
originalFileName: file.originalFileName,
|
|
2775
2733
|
originalFileNames: file.originalFileName ? [file.originalFileName] : [],
|
|
2776
|
-
source: file.source
|
|
2777
|
-
type: "asset"
|
|
2734
|
+
source: file.source
|
|
2778
2735
|
});
|
|
2779
2736
|
}
|
|
2780
2737
|
getFileName(referenceId) {
|
|
@@ -3102,7 +3059,7 @@ function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
|
3102
3059
|
cache[p$1] = value;
|
|
3103
3060
|
return value;
|
|
3104
3061
|
},
|
|
3105
|
-
set(
|
|
3062
|
+
set(_target, p$1, newValue) {
|
|
3106
3063
|
cache[p$1] = newValue;
|
|
3107
3064
|
changed?.updated.add(bindingChunk.fileName);
|
|
3108
3065
|
return true;
|
|
@@ -3133,7 +3090,7 @@ function transformToRollupOutputAsset(bindingAsset, changed) {
|
|
|
3133
3090
|
cache[p$1] = value;
|
|
3134
3091
|
return value;
|
|
3135
3092
|
},
|
|
3136
|
-
set(
|
|
3093
|
+
set(_target, p$1, newValue) {
|
|
3137
3094
|
cache[p$1] = newValue;
|
|
3138
3095
|
changed?.updated.add(bindingAsset.fileName);
|
|
3139
3096
|
return true;
|
|
@@ -3171,18 +3128,17 @@ function transformToOutputBundle(context, output, changed) {
|
|
|
3171
3128
|
});
|
|
3172
3129
|
}
|
|
3173
3130
|
function collectChangedBundle(changed, bundle) {
|
|
3174
|
-
const
|
|
3175
|
-
const chunks = [];
|
|
3131
|
+
const changes = {};
|
|
3176
3132
|
for (const key in bundle) {
|
|
3177
3133
|
if (changed.deleted.has(key) || !changed.updated.has(key)) continue;
|
|
3178
3134
|
const item = bundle[key];
|
|
3179
|
-
if (item.type === "asset")
|
|
3135
|
+
if (item.type === "asset") changes[key] = {
|
|
3180
3136
|
filename: item.fileName,
|
|
3181
3137
|
originalFileNames: item.originalFileNames,
|
|
3182
3138
|
source: bindingAssetSource(item.source),
|
|
3183
3139
|
names: item.names
|
|
3184
|
-
}
|
|
3185
|
-
else
|
|
3140
|
+
};
|
|
3141
|
+
else changes[key] = {
|
|
3186
3142
|
code: item.code,
|
|
3187
3143
|
filename: item.fileName,
|
|
3188
3144
|
name: item.name,
|
|
@@ -3197,12 +3153,11 @@ function collectChangedBundle(changed, bundle) {
|
|
|
3197
3153
|
map: bindingifySourcemap$1(item.map),
|
|
3198
3154
|
sourcemapFilename: item.sourcemapFileName || void 0,
|
|
3199
3155
|
preliminaryFilename: item.preliminaryFileName
|
|
3200
|
-
}
|
|
3156
|
+
};
|
|
3201
3157
|
}
|
|
3202
3158
|
return {
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
deleted: Array.from(changed.deleted)
|
|
3159
|
+
changes,
|
|
3160
|
+
deleted: changed.deleted
|
|
3206
3161
|
};
|
|
3207
3162
|
}
|
|
3208
3163
|
|
|
@@ -3609,7 +3564,7 @@ var ChunkingContextImpl = class {
|
|
|
3609
3564
|
//#endregion
|
|
3610
3565
|
//#region src/utils/bindingify-output-options.ts
|
|
3611
3566
|
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;
|
|
3567
|
+
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
3568
|
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3614
3569
|
return {
|
|
3615
3570
|
dir,
|
|
@@ -3618,6 +3573,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
3618
3573
|
exports: exports$1,
|
|
3619
3574
|
hashCharacters,
|
|
3620
3575
|
sourcemap: bindingifySourcemap(sourcemap),
|
|
3576
|
+
sourcemapBaseUrl,
|
|
3621
3577
|
sourcemapDebugIds,
|
|
3622
3578
|
sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
|
|
3623
3579
|
sourcemapPathTransform,
|
|
@@ -3684,7 +3640,9 @@ function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
|
|
|
3684
3640
|
function bindingifyAssetFilenames(assetFileNames) {
|
|
3685
3641
|
if (typeof assetFileNames === "function") return (asset) => {
|
|
3686
3642
|
return assetFileNames({
|
|
3643
|
+
name: asset.name,
|
|
3687
3644
|
names: asset.names,
|
|
3645
|
+
originalFileName: asset.originalFileName,
|
|
3688
3646
|
originalFileNames: asset.originalFileNames,
|
|
3689
3647
|
source: transformAssetSource(asset.source),
|
|
3690
3648
|
type: "asset"
|
|
@@ -3740,6 +3698,9 @@ var NormalizedOutputOptionsImpl = class {
|
|
|
3740
3698
|
get sourcemap() {
|
|
3741
3699
|
return this.inner.sourcemap;
|
|
3742
3700
|
}
|
|
3701
|
+
get sourcemapBaseUrl() {
|
|
3702
|
+
return this.inner.sourcemapBaseUrl ?? void 0;
|
|
3703
|
+
}
|
|
3743
3704
|
get cssEntryFileNames() {
|
|
3744
3705
|
return this.inner.cssEntryFilenames || this.outputOptions.cssEntryFileNames;
|
|
3745
3706
|
}
|
|
@@ -4352,8 +4313,12 @@ var RolldownBuild = class {
|
|
|
4352
4313
|
await this.close();
|
|
4353
4314
|
}
|
|
4354
4315
|
async generateHmrPatch(changedFiles) {
|
|
4355
|
-
const
|
|
4356
|
-
|
|
4316
|
+
const ret = await this.#bundlerImpl.impl.generateHmrPatch(changedFiles);
|
|
4317
|
+
switch (ret.type) {
|
|
4318
|
+
case "Ok": return ret.field0;
|
|
4319
|
+
case "Error": throw normalizeErrors(ret.field0);
|
|
4320
|
+
default: throw new Error("Unknown error");
|
|
4321
|
+
}
|
|
4357
4322
|
}
|
|
4358
4323
|
async hmrInvalidate(file, firstInvalidatedBy) {
|
|
4359
4324
|
const output = await this.#bundlerImpl.impl.hmrInvalidate(file, firstInvalidatedBy);
|
|
@@ -4663,12 +4628,6 @@ Object.defineProperty(exports, 'manifestPlugin', {
|
|
|
4663
4628
|
return manifestPlugin;
|
|
4664
4629
|
}
|
|
4665
4630
|
});
|
|
4666
|
-
Object.defineProperty(exports, 'moduleFederationPlugin', {
|
|
4667
|
-
enumerable: true,
|
|
4668
|
-
get: function () {
|
|
4669
|
-
return moduleFederationPlugin;
|
|
4670
|
-
}
|
|
4671
|
-
});
|
|
4672
4631
|
Object.defineProperty(exports, 'modulePreloadPolyfillPlugin', {
|
|
4673
4632
|
enumerable: true,
|
|
4674
4633
|
get: function () {
|