@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,8 +1,9 @@
|
|
|
1
1
|
import { and, arraify, code, exclude, id, include, moduleType, noop, or, unimplemented, unreachable, unsupported } from "./dist-DvBwroyk.mjs";
|
|
2
|
-
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-
|
|
2
|
+
import { augmentCodeLocation, error, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, parseAst } from "./parse-ast-index-r9XO-GhB.mjs";
|
|
3
3
|
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingJsx, BindingLogLevel, BindingPluginOrder, BindingWatcher, ParallelJsPluginRegistry, shutdownAsyncRuntime, startAsyncRuntime } from "../rolldown-binding.wasi.cjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
|
+
import fsp from "node:fs/promises";
|
|
6
7
|
import os from "node:os";
|
|
7
8
|
import { Worker } from "node:worker_threads";
|
|
8
9
|
|
|
@@ -33,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
34
|
|
|
34
35
|
//#endregion
|
|
35
36
|
//#region package.json
|
|
36
|
-
var version = "1.0.0-beta.
|
|
37
|
+
var version = "1.0.0-beta.31";
|
|
37
38
|
var description$1 = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
|
|
38
39
|
|
|
39
40
|
//#endregion
|
|
@@ -112,27 +113,6 @@ function viteResolvePlugin(config) {
|
|
|
112
113
|
const builtinPlugin = new BuiltinPlugin("builtin:vite-resolve", config);
|
|
113
114
|
return makeBuiltinPluginCallable(builtinPlugin);
|
|
114
115
|
}
|
|
115
|
-
function moduleFederationPlugin(config) {
|
|
116
|
-
return new BuiltinPlugin("builtin:module-federation", {
|
|
117
|
-
...config,
|
|
118
|
-
remotes: config.remotes && Object.entries(config.remotes).map(([name, remote]) => {
|
|
119
|
-
if (typeof remote === "string") {
|
|
120
|
-
const [entryGlobalName] = remote.split("@");
|
|
121
|
-
const entry = remote.replace(entryGlobalName + "@", "");
|
|
122
|
-
return {
|
|
123
|
-
entry,
|
|
124
|
-
name,
|
|
125
|
-
entryGlobalName
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
return {
|
|
129
|
-
...remote,
|
|
130
|
-
name: remote.name ?? name
|
|
131
|
-
};
|
|
132
|
-
}),
|
|
133
|
-
manifest: config.manifest === false ? void 0 : config.manifest === true ? {} : config.manifest
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
116
|
function isolatedDeclarationPlugin(config) {
|
|
137
117
|
return new BuiltinPlugin("builtin:isolated-declaration", config);
|
|
138
118
|
}
|
|
@@ -462,7 +442,7 @@ function getSortedPlugins(hookName, plugins) {
|
|
|
462
442
|
}
|
|
463
443
|
|
|
464
444
|
//#endregion
|
|
465
|
-
//#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.
|
|
445
|
+
//#region ../../node_modules/.pnpm/valibot@1.1.0_typescript@5.9.2/node_modules/valibot/dist/index.js
|
|
466
446
|
var store$1;
|
|
467
447
|
/* @__NO_SIDE_EFFECTS__ */
|
|
468
448
|
function getGlobalConfig(config2) {
|
|
@@ -1451,7 +1431,7 @@ function safeParse(schema, input, config2) {
|
|
|
1451
1431
|
}
|
|
1452
1432
|
|
|
1453
1433
|
//#endregion
|
|
1454
|
-
//#region ../../node_modules/.pnpm/@valibot+to-json-schema@1.3.0_valibot@1.1.0_typescript@5.
|
|
1434
|
+
//#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
|
|
1455
1435
|
/**
|
|
1456
1436
|
* Adds an error message to the errors array.
|
|
1457
1437
|
*
|
|
@@ -1476,10 +1456,9 @@ function addError(errors, message) {
|
|
|
1476
1456
|
function handleError(message, config) {
|
|
1477
1457
|
switch (config?.errorMode) {
|
|
1478
1458
|
case "ignore": break;
|
|
1479
|
-
case "warn":
|
|
1459
|
+
case "warn":
|
|
1480
1460
|
console.warn(message);
|
|
1481
1461
|
break;
|
|
1482
|
-
}
|
|
1483
1462
|
default: throw new Error(message);
|
|
1484
1463
|
}
|
|
1485
1464
|
}
|
|
@@ -1496,10 +1475,9 @@ function convertAction(jsonSchema, valibotAction, config) {
|
|
|
1496
1475
|
if (config?.ignoreActions?.includes(valibotAction.type)) return jsonSchema;
|
|
1497
1476
|
let errors;
|
|
1498
1477
|
switch (valibotAction.type) {
|
|
1499
|
-
case "base64":
|
|
1478
|
+
case "base64":
|
|
1500
1479
|
jsonSchema.contentEncoding = "base64";
|
|
1501
1480
|
break;
|
|
1502
|
-
}
|
|
1503
1481
|
case "bic":
|
|
1504
1482
|
case "cuid2":
|
|
1505
1483
|
case "decimal":
|
|
@@ -1509,57 +1487,46 @@ function convertAction(jsonSchema, valibotAction, config) {
|
|
|
1509
1487
|
case "hex_color":
|
|
1510
1488
|
case "nanoid":
|
|
1511
1489
|
case "octal":
|
|
1512
|
-
case "ulid":
|
|
1490
|
+
case "ulid":
|
|
1513
1491
|
jsonSchema.pattern = valibotAction.requirement.source;
|
|
1514
1492
|
break;
|
|
1515
|
-
|
|
1516
|
-
case "description": {
|
|
1493
|
+
case "description":
|
|
1517
1494
|
jsonSchema.description = valibotAction.description;
|
|
1518
1495
|
break;
|
|
1519
|
-
|
|
1520
|
-
case "email": {
|
|
1496
|
+
case "email":
|
|
1521
1497
|
jsonSchema.format = "email";
|
|
1522
1498
|
break;
|
|
1523
|
-
|
|
1524
|
-
case "empty": {
|
|
1499
|
+
case "empty":
|
|
1525
1500
|
if (jsonSchema.type === "array") jsonSchema.maxItems = 0;
|
|
1526
1501
|
else {
|
|
1527
1502
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1528
1503
|
jsonSchema.maxLength = 0;
|
|
1529
1504
|
}
|
|
1530
1505
|
break;
|
|
1531
|
-
|
|
1532
|
-
case "entries": {
|
|
1506
|
+
case "entries":
|
|
1533
1507
|
jsonSchema.minProperties = valibotAction.requirement;
|
|
1534
1508
|
jsonSchema.maxProperties = valibotAction.requirement;
|
|
1535
1509
|
break;
|
|
1536
|
-
|
|
1537
|
-
case "integer": {
|
|
1510
|
+
case "integer":
|
|
1538
1511
|
jsonSchema.type = "integer";
|
|
1539
1512
|
break;
|
|
1540
|
-
|
|
1541
|
-
case "ipv4": {
|
|
1513
|
+
case "ipv4":
|
|
1542
1514
|
jsonSchema.format = "ipv4";
|
|
1543
1515
|
break;
|
|
1544
|
-
|
|
1545
|
-
case "ipv6": {
|
|
1516
|
+
case "ipv6":
|
|
1546
1517
|
jsonSchema.format = "ipv6";
|
|
1547
1518
|
break;
|
|
1548
|
-
|
|
1549
|
-
case "iso_date": {
|
|
1519
|
+
case "iso_date":
|
|
1550
1520
|
jsonSchema.format = "date";
|
|
1551
1521
|
break;
|
|
1552
|
-
}
|
|
1553
1522
|
case "iso_date_time":
|
|
1554
|
-
case "iso_timestamp":
|
|
1523
|
+
case "iso_timestamp":
|
|
1555
1524
|
jsonSchema.format = "date-time";
|
|
1556
1525
|
break;
|
|
1557
|
-
|
|
1558
|
-
case "iso_time": {
|
|
1526
|
+
case "iso_time":
|
|
1559
1527
|
jsonSchema.format = "time";
|
|
1560
1528
|
break;
|
|
1561
|
-
|
|
1562
|
-
case "length": {
|
|
1529
|
+
case "length":
|
|
1563
1530
|
if (jsonSchema.type === "array") {
|
|
1564
1531
|
jsonSchema.minItems = valibotAction.requirement;
|
|
1565
1532
|
jsonSchema.maxItems = valibotAction.requirement;
|
|
@@ -1569,80 +1536,65 @@ function convertAction(jsonSchema, valibotAction, config) {
|
|
|
1569
1536
|
jsonSchema.maxLength = valibotAction.requirement;
|
|
1570
1537
|
}
|
|
1571
1538
|
break;
|
|
1572
|
-
|
|
1573
|
-
case "max_entries": {
|
|
1539
|
+
case "max_entries":
|
|
1574
1540
|
jsonSchema.maxProperties = valibotAction.requirement;
|
|
1575
1541
|
break;
|
|
1576
|
-
|
|
1577
|
-
case "max_length": {
|
|
1542
|
+
case "max_length":
|
|
1578
1543
|
if (jsonSchema.type === "array") jsonSchema.maxItems = valibotAction.requirement;
|
|
1579
1544
|
else {
|
|
1580
1545
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1581
1546
|
jsonSchema.maxLength = valibotAction.requirement;
|
|
1582
1547
|
}
|
|
1583
1548
|
break;
|
|
1584
|
-
|
|
1585
|
-
case "max_value": {
|
|
1549
|
+
case "max_value":
|
|
1586
1550
|
if (jsonSchema.type !== "number") errors = addError(errors, `The "max_value" action is not supported on type "${jsonSchema.type}".`);
|
|
1587
1551
|
jsonSchema.maximum = valibotAction.requirement;
|
|
1588
1552
|
break;
|
|
1589
|
-
|
|
1590
|
-
case "metadata": {
|
|
1553
|
+
case "metadata":
|
|
1591
1554
|
if (typeof valibotAction.metadata.title === "string") jsonSchema.title = valibotAction.metadata.title;
|
|
1592
1555
|
if (typeof valibotAction.metadata.description === "string") jsonSchema.description = valibotAction.metadata.description;
|
|
1593
1556
|
if (Array.isArray(valibotAction.metadata.examples)) jsonSchema.examples = valibotAction.metadata.examples;
|
|
1594
1557
|
break;
|
|
1595
|
-
|
|
1596
|
-
case "min_entries": {
|
|
1558
|
+
case "min_entries":
|
|
1597
1559
|
jsonSchema.minProperties = valibotAction.requirement;
|
|
1598
1560
|
break;
|
|
1599
|
-
|
|
1600
|
-
case "min_length": {
|
|
1561
|
+
case "min_length":
|
|
1601
1562
|
if (jsonSchema.type === "array") jsonSchema.minItems = valibotAction.requirement;
|
|
1602
1563
|
else {
|
|
1603
1564
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1604
1565
|
jsonSchema.minLength = valibotAction.requirement;
|
|
1605
1566
|
}
|
|
1606
1567
|
break;
|
|
1607
|
-
|
|
1608
|
-
case "min_value": {
|
|
1568
|
+
case "min_value":
|
|
1609
1569
|
if (jsonSchema.type !== "number") errors = addError(errors, `The "min_value" action is not supported on type "${jsonSchema.type}".`);
|
|
1610
1570
|
jsonSchema.minimum = valibotAction.requirement;
|
|
1611
1571
|
break;
|
|
1612
|
-
|
|
1613
|
-
case "multiple_of": {
|
|
1572
|
+
case "multiple_of":
|
|
1614
1573
|
jsonSchema.multipleOf = valibotAction.requirement;
|
|
1615
1574
|
break;
|
|
1616
|
-
|
|
1617
|
-
case "non_empty": {
|
|
1575
|
+
case "non_empty":
|
|
1618
1576
|
if (jsonSchema.type === "array") jsonSchema.minItems = 1;
|
|
1619
1577
|
else {
|
|
1620
1578
|
if (jsonSchema.type !== "string") errors = addError(errors, `The "${valibotAction.type}" action is not supported on type "${jsonSchema.type}".`);
|
|
1621
1579
|
jsonSchema.minLength = 1;
|
|
1622
1580
|
}
|
|
1623
1581
|
break;
|
|
1624
|
-
|
|
1625
|
-
case "regex": {
|
|
1582
|
+
case "regex":
|
|
1626
1583
|
if (valibotAction.requirement.flags) errors = addError(errors, "RegExp flags are not supported by JSON Schema.");
|
|
1627
1584
|
jsonSchema.pattern = valibotAction.requirement.source;
|
|
1628
1585
|
break;
|
|
1629
|
-
|
|
1630
|
-
case "title": {
|
|
1586
|
+
case "title":
|
|
1631
1587
|
jsonSchema.title = valibotAction.title;
|
|
1632
1588
|
break;
|
|
1633
|
-
|
|
1634
|
-
case "url": {
|
|
1589
|
+
case "url":
|
|
1635
1590
|
jsonSchema.format = "uri";
|
|
1636
1591
|
break;
|
|
1637
|
-
|
|
1638
|
-
case "uuid": {
|
|
1592
|
+
case "uuid":
|
|
1639
1593
|
jsonSchema.format = "uuid";
|
|
1640
1594
|
break;
|
|
1641
|
-
|
|
1642
|
-
case "value": {
|
|
1595
|
+
case "value":
|
|
1643
1596
|
jsonSchema.const = valibotAction.requirement;
|
|
1644
1597
|
break;
|
|
1645
|
-
}
|
|
1646
1598
|
default: errors = addError(errors, `The "${valibotAction.type}" action cannot be converted to JSON Schema.`);
|
|
1647
1599
|
}
|
|
1648
1600
|
if (config?.overrideAction) {
|
|
@@ -1717,31 +1669,26 @@ function convertSchema(jsonSchema, valibotSchema, config, context, skipRef = fal
|
|
|
1717
1669
|
}
|
|
1718
1670
|
let errors;
|
|
1719
1671
|
switch (valibotSchema.type) {
|
|
1720
|
-
case "boolean":
|
|
1672
|
+
case "boolean":
|
|
1721
1673
|
jsonSchema.type = "boolean";
|
|
1722
1674
|
break;
|
|
1723
|
-
|
|
1724
|
-
case "null": {
|
|
1675
|
+
case "null":
|
|
1725
1676
|
jsonSchema.type = "null";
|
|
1726
1677
|
break;
|
|
1727
|
-
|
|
1728
|
-
case "number": {
|
|
1678
|
+
case "number":
|
|
1729
1679
|
jsonSchema.type = "number";
|
|
1730
1680
|
break;
|
|
1731
|
-
|
|
1732
|
-
case "string": {
|
|
1681
|
+
case "string":
|
|
1733
1682
|
jsonSchema.type = "string";
|
|
1734
1683
|
break;
|
|
1735
|
-
|
|
1736
|
-
case "array": {
|
|
1684
|
+
case "array":
|
|
1737
1685
|
jsonSchema.type = "array";
|
|
1738
1686
|
jsonSchema.items = convertSchema({}, valibotSchema.item, config, context);
|
|
1739
1687
|
break;
|
|
1740
|
-
}
|
|
1741
1688
|
case "tuple":
|
|
1742
1689
|
case "tuple_with_rest":
|
|
1743
1690
|
case "loose_tuple":
|
|
1744
|
-
case "strict_tuple":
|
|
1691
|
+
case "strict_tuple":
|
|
1745
1692
|
jsonSchema.type = "array";
|
|
1746
1693
|
jsonSchema.items = [];
|
|
1747
1694
|
jsonSchema.minItems = valibotSchema.items.length;
|
|
@@ -1749,11 +1696,10 @@ function convertSchema(jsonSchema, valibotSchema, config, context, skipRef = fal
|
|
|
1749
1696
|
if (valibotSchema.type === "tuple_with_rest") jsonSchema.additionalItems = convertSchema({}, valibotSchema.rest, config, context);
|
|
1750
1697
|
else if (valibotSchema.type === "strict_tuple") jsonSchema.additionalItems = false;
|
|
1751
1698
|
break;
|
|
1752
|
-
}
|
|
1753
1699
|
case "object":
|
|
1754
1700
|
case "object_with_rest":
|
|
1755
1701
|
case "loose_object":
|
|
1756
|
-
case "strict_object":
|
|
1702
|
+
case "strict_object":
|
|
1757
1703
|
jsonSchema.type = "object";
|
|
1758
1704
|
jsonSchema.properties = {};
|
|
1759
1705
|
jsonSchema.required = [];
|
|
@@ -1765,52 +1711,43 @@ function convertSchema(jsonSchema, valibotSchema, config, context, skipRef = fal
|
|
|
1765
1711
|
if (valibotSchema.type === "object_with_rest") jsonSchema.additionalProperties = convertSchema({}, valibotSchema.rest, config, context);
|
|
1766
1712
|
else if (valibotSchema.type === "strict_object") jsonSchema.additionalProperties = false;
|
|
1767
1713
|
break;
|
|
1768
|
-
|
|
1769
|
-
case "record": {
|
|
1714
|
+
case "record":
|
|
1770
1715
|
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.");
|
|
1771
1716
|
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.`);
|
|
1772
1717
|
jsonSchema.type = "object";
|
|
1773
1718
|
jsonSchema.additionalProperties = convertSchema({}, valibotSchema.value, config, context);
|
|
1774
1719
|
break;
|
|
1775
|
-
}
|
|
1776
1720
|
case "any":
|
|
1777
1721
|
case "unknown": break;
|
|
1778
1722
|
case "nullable":
|
|
1779
|
-
case "nullish":
|
|
1723
|
+
case "nullish":
|
|
1780
1724
|
jsonSchema.anyOf = [convertSchema({}, valibotSchema.wrapped, config, context), { type: "null" }];
|
|
1781
1725
|
if (valibotSchema.default !== void 0) jsonSchema.default = getDefault(valibotSchema);
|
|
1782
1726
|
break;
|
|
1783
|
-
}
|
|
1784
1727
|
case "exact_optional":
|
|
1785
1728
|
case "optional":
|
|
1786
|
-
case "undefinedable":
|
|
1729
|
+
case "undefinedable":
|
|
1787
1730
|
jsonSchema = convertSchema(jsonSchema, valibotSchema.wrapped, config, context);
|
|
1788
1731
|
if (valibotSchema.default !== void 0) jsonSchema.default = getDefault(valibotSchema);
|
|
1789
1732
|
break;
|
|
1790
|
-
|
|
1791
|
-
case "literal": {
|
|
1733
|
+
case "literal":
|
|
1792
1734
|
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.");
|
|
1793
1735
|
jsonSchema.const = valibotSchema.literal;
|
|
1794
1736
|
break;
|
|
1795
|
-
|
|
1796
|
-
case "enum": {
|
|
1737
|
+
case "enum":
|
|
1797
1738
|
jsonSchema.enum = valibotSchema.options;
|
|
1798
1739
|
break;
|
|
1799
|
-
|
|
1800
|
-
case "picklist": {
|
|
1740
|
+
case "picklist":
|
|
1801
1741
|
if (valibotSchema.options.some((option) => typeof option !== "number" && typeof option !== "string")) errors = addError(errors, "An option of the \"picklist\" schema is not JSON compatible.");
|
|
1802
1742
|
jsonSchema.enum = valibotSchema.options;
|
|
1803
1743
|
break;
|
|
1804
|
-
}
|
|
1805
1744
|
case "union":
|
|
1806
|
-
case "variant":
|
|
1745
|
+
case "variant":
|
|
1807
1746
|
jsonSchema.anyOf = valibotSchema.options.map((option) => convertSchema({}, option, config, context));
|
|
1808
1747
|
break;
|
|
1809
|
-
|
|
1810
|
-
case "intersect": {
|
|
1748
|
+
case "intersect":
|
|
1811
1749
|
jsonSchema.allOf = valibotSchema.options.map((option) => convertSchema({}, option, config, context));
|
|
1812
1750
|
break;
|
|
1813
|
-
}
|
|
1814
1751
|
case "lazy": {
|
|
1815
1752
|
let wrappedValibotSchema = context.getterMap.get(valibotSchema.getter);
|
|
1816
1753
|
if (!wrappedValibotSchema) {
|
|
@@ -1887,7 +1824,7 @@ function toJsonSchema(schema, config) {
|
|
|
1887
1824
|
|
|
1888
1825
|
//#endregion
|
|
1889
1826
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs
|
|
1890
|
-
var require_ansis = __commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs"(exports, module) {
|
|
1827
|
+
var require_ansis = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.cjs": ((exports, module) => {
|
|
1891
1828
|
let e, t, r, { defineProperty: n, setPrototypeOf: l, create: o, keys: s } = Object, i$1 = "", { round: c, max: a$1 } = Math, p = (e$1) => {
|
|
1892
1829
|
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);
|
|
1893
1830
|
return [
|
|
@@ -1988,11 +1925,11 @@ var require_ansis = __commonJS({ "../../node_modules/.pnpm/ansis@4.1.0/node_modu
|
|
|
1988
1925
|
})), t$1.extend(M);
|
|
1989
1926
|
}, y = new w();
|
|
1990
1927
|
module.exports = y, y.default = y;
|
|
1991
|
-
} });
|
|
1928
|
+
}) });
|
|
1992
1929
|
|
|
1993
1930
|
//#endregion
|
|
1994
1931
|
//#region ../../node_modules/.pnpm/ansis@4.1.0/node_modules/ansis/index.mjs
|
|
1995
|
-
var import_ansis = __toESM(require_ansis(), 1);
|
|
1932
|
+
var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
1996
1933
|
var ansis_default = import_ansis.default;
|
|
1997
1934
|
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;
|
|
1998
1935
|
|
|
@@ -2103,7 +2040,9 @@ const WatchOptionsSchema = strictObject({
|
|
|
2103
2040
|
pollInterval: optional(number())
|
|
2104
2041
|
})), description("Notify options")),
|
|
2105
2042
|
skipWrite: pipe(optional(boolean()), description("Skip the bundle.write() step")),
|
|
2106
|
-
buildDelay: pipe(optional(number()), description("Throttle watch rebuilds"))
|
|
2043
|
+
buildDelay: pipe(optional(number()), description("Throttle watch rebuilds")),
|
|
2044
|
+
clearScreen: pipe(optional(boolean()), description("Whether to clear the screen when a rebuild is triggered")),
|
|
2045
|
+
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."))
|
|
2107
2046
|
});
|
|
2108
2047
|
const ChecksOptionsSchema = strictObject({
|
|
2109
2048
|
circularDependency: pipe(optional(boolean()), description("Whether to emit warning when detecting circular dependency")),
|
|
@@ -2144,7 +2083,10 @@ const TreeshakingOptionsSchema = union([boolean(), looseObject({
|
|
|
2144
2083
|
unknownGlobalSideEffects: optional(boolean()),
|
|
2145
2084
|
commonjs: optional(boolean())
|
|
2146
2085
|
})]);
|
|
2147
|
-
const OptimizationOptionsSchema = strictObject({
|
|
2086
|
+
const OptimizationOptionsSchema = strictObject({
|
|
2087
|
+
inlineConst: pipe(optional(boolean()), description("Enable crossmodule constant inlining")),
|
|
2088
|
+
pifeForModuleWrappers: pipe(optional(boolean()), description("Use PIFE pattern for module wrappers"))
|
|
2089
|
+
});
|
|
2148
2090
|
const OnLogSchema = pipe(function_(), args(tuple([
|
|
2149
2091
|
LogLevelSchema,
|
|
2150
2092
|
RollupLogSchema,
|
|
@@ -2299,6 +2241,7 @@ const OutputOptionsSchema = strictObject({
|
|
|
2299
2241
|
literal("inline"),
|
|
2300
2242
|
literal("hidden")
|
|
2301
2243
|
])), 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")})`)),
|
|
2244
|
+
sourcemapBaseUrl: pipe(optional(string()), description("Base URL used to prefix sourcemap paths")),
|
|
2302
2245
|
sourcemapDebugIds: pipe(optional(boolean()), description("Inject sourcemap debug IDs")),
|
|
2303
2246
|
sourcemapIgnoreList: optional(union([boolean(), custom(() => true)])),
|
|
2304
2247
|
sourcemapPathTransform: optional(custom(() => true)),
|
|
@@ -2520,7 +2463,7 @@ function normalizeTransformHookSourcemap(id$1, originalCode, rawMap) {
|
|
|
2520
2463
|
}
|
|
2521
2464
|
|
|
2522
2465
|
//#endregion
|
|
2523
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2466
|
+
//#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-D6FCK2GA.js
|
|
2524
2467
|
function u$1(o$1, n$1, a$2) {
|
|
2525
2468
|
let t$1 = (r$1) => o$1(r$1, ...n$1);
|
|
2526
2469
|
return a$2 === void 0 ? t$1 : Object.assign(t$1, {
|
|
@@ -2530,7 +2473,7 @@ function u$1(o$1, n$1, a$2) {
|
|
|
2530
2473
|
}
|
|
2531
2474
|
|
|
2532
2475
|
//#endregion
|
|
2533
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2476
|
+
//#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-WIMGWYZL.js
|
|
2534
2477
|
function u(r$1, n$1, o$1) {
|
|
2535
2478
|
let a$2 = r$1.length - n$1.length;
|
|
2536
2479
|
if (a$2 === 0) return r$1(...n$1);
|
|
@@ -2539,7 +2482,7 @@ function u(r$1, n$1, o$1) {
|
|
|
2539
2482
|
}
|
|
2540
2483
|
|
|
2541
2484
|
//#endregion
|
|
2542
|
-
//#region ../../node_modules/.pnpm/remeda@2.
|
|
2485
|
+
//#region ../../node_modules/.pnpm/remeda@2.28.0/node_modules/remeda/dist/chunk-3IFJP4R5.js
|
|
2543
2486
|
function d(...r$1) {
|
|
2544
2487
|
return u(i, r$1);
|
|
2545
2488
|
}
|
|
@@ -2616,44 +2559,38 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2616
2559
|
});
|
|
2617
2560
|
break;
|
|
2618
2561
|
}
|
|
2619
|
-
case "not":
|
|
2562
|
+
case "not":
|
|
2620
2563
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2621
2564
|
list.push({ kind: "Not" });
|
|
2622
2565
|
break;
|
|
2623
|
-
|
|
2624
|
-
case "id": {
|
|
2566
|
+
case "id":
|
|
2625
2567
|
list.push({
|
|
2626
2568
|
kind: "Id",
|
|
2627
2569
|
payload: expr.pattern
|
|
2628
2570
|
});
|
|
2629
2571
|
if (expr.params.cleanUrl) list.push({ kind: "CleanUrl" });
|
|
2630
2572
|
break;
|
|
2631
|
-
|
|
2632
|
-
case "moduleType": {
|
|
2573
|
+
case "moduleType":
|
|
2633
2574
|
list.push({
|
|
2634
2575
|
kind: "ModuleType",
|
|
2635
2576
|
payload: expr.pattern
|
|
2636
2577
|
});
|
|
2637
2578
|
break;
|
|
2638
|
-
|
|
2639
|
-
case "code": {
|
|
2579
|
+
case "code":
|
|
2640
2580
|
list.push({
|
|
2641
2581
|
kind: "Code",
|
|
2642
2582
|
payload: expr.pattern
|
|
2643
2583
|
});
|
|
2644
2584
|
break;
|
|
2645
|
-
|
|
2646
|
-
case "include": {
|
|
2585
|
+
case "include":
|
|
2647
2586
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2648
2587
|
list.push({ kind: "Include" });
|
|
2649
2588
|
break;
|
|
2650
|
-
|
|
2651
|
-
case "exclude": {
|
|
2589
|
+
case "exclude":
|
|
2652
2590
|
bindingifyFilterExprImpl(expr.expr, list);
|
|
2653
2591
|
list.push({ kind: "Exclude" });
|
|
2654
2592
|
break;
|
|
2655
|
-
|
|
2656
|
-
case "query": {
|
|
2593
|
+
case "query":
|
|
2657
2594
|
list.push({
|
|
2658
2595
|
kind: "QueryKey",
|
|
2659
2596
|
payload: expr.key
|
|
@@ -2663,7 +2600,6 @@ function bindingifyFilterExprImpl(expr, list) {
|
|
|
2663
2600
|
payload: expr.pattern
|
|
2664
2601
|
});
|
|
2665
2602
|
break;
|
|
2666
|
-
}
|
|
2667
2603
|
default: throw new Error(`Unknown filter expression: ${expr}`);
|
|
2668
2604
|
}
|
|
2669
2605
|
}
|
|
@@ -2714,9 +2650,28 @@ function bindingAssetSource(source) {
|
|
|
2714
2650
|
return { inner: source };
|
|
2715
2651
|
}
|
|
2716
2652
|
|
|
2653
|
+
//#endregion
|
|
2654
|
+
//#region src/plugin/fs.ts
|
|
2655
|
+
const fsModule = {
|
|
2656
|
+
appendFile: fsp.appendFile,
|
|
2657
|
+
copyFile: fsp.copyFile,
|
|
2658
|
+
mkdir: fsp.mkdir,
|
|
2659
|
+
mkdtemp: fsp.mkdtemp,
|
|
2660
|
+
readdir: fsp.readdir,
|
|
2661
|
+
readFile: fsp.readFile,
|
|
2662
|
+
realpath: fsp.realpath,
|
|
2663
|
+
rename: fsp.rename,
|
|
2664
|
+
rmdir: fsp.rmdir,
|
|
2665
|
+
stat: fsp.stat,
|
|
2666
|
+
lstat: fsp.lstat,
|
|
2667
|
+
unlink: fsp.unlink,
|
|
2668
|
+
writeFile: fsp.writeFile
|
|
2669
|
+
};
|
|
2670
|
+
|
|
2717
2671
|
//#endregion
|
|
2718
2672
|
//#region src/plugin/plugin-context.ts
|
|
2719
2673
|
var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
2674
|
+
fs = fsModule;
|
|
2720
2675
|
getModuleInfo;
|
|
2721
2676
|
constructor(outputOptions, context, plugin, data, onLog, logLevel, watchMode, currentLoadingModule) {
|
|
2722
2677
|
super(onLog, logLevel, plugin.name, watchMode);
|
|
@@ -2796,10 +2751,12 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
|
|
|
2796
2751
|
};
|
|
2797
2752
|
getAssetFileNames(file) {
|
|
2798
2753
|
if (typeof this.outputOptions.assetFileNames === "function") return this.outputOptions.assetFileNames({
|
|
2754
|
+
type: "asset",
|
|
2755
|
+
name: file.name,
|
|
2799
2756
|
names: file.name ? [file.name] : [],
|
|
2757
|
+
originalFileName: file.originalFileName,
|
|
2800
2758
|
originalFileNames: file.originalFileName ? [file.originalFileName] : [],
|
|
2801
|
-
source: file.source
|
|
2802
|
-
type: "asset"
|
|
2759
|
+
source: file.source
|
|
2803
2760
|
});
|
|
2804
2761
|
}
|
|
2805
2762
|
getFileName(referenceId) {
|
|
@@ -3127,7 +3084,7 @@ function transformToRollupOutputChunk(bindingChunk, changed) {
|
|
|
3127
3084
|
cache[p$1] = value;
|
|
3128
3085
|
return value;
|
|
3129
3086
|
},
|
|
3130
|
-
set(
|
|
3087
|
+
set(_target, p$1, newValue) {
|
|
3131
3088
|
cache[p$1] = newValue;
|
|
3132
3089
|
changed?.updated.add(bindingChunk.fileName);
|
|
3133
3090
|
return true;
|
|
@@ -3158,7 +3115,7 @@ function transformToRollupOutputAsset(bindingAsset, changed) {
|
|
|
3158
3115
|
cache[p$1] = value;
|
|
3159
3116
|
return value;
|
|
3160
3117
|
},
|
|
3161
|
-
set(
|
|
3118
|
+
set(_target, p$1, newValue) {
|
|
3162
3119
|
cache[p$1] = newValue;
|
|
3163
3120
|
changed?.updated.add(bindingAsset.fileName);
|
|
3164
3121
|
return true;
|
|
@@ -3196,18 +3153,17 @@ function transformToOutputBundle(context, output, changed) {
|
|
|
3196
3153
|
});
|
|
3197
3154
|
}
|
|
3198
3155
|
function collectChangedBundle(changed, bundle) {
|
|
3199
|
-
const
|
|
3200
|
-
const chunks = [];
|
|
3156
|
+
const changes = {};
|
|
3201
3157
|
for (const key in bundle) {
|
|
3202
3158
|
if (changed.deleted.has(key) || !changed.updated.has(key)) continue;
|
|
3203
3159
|
const item = bundle[key];
|
|
3204
|
-
if (item.type === "asset")
|
|
3160
|
+
if (item.type === "asset") changes[key] = {
|
|
3205
3161
|
filename: item.fileName,
|
|
3206
3162
|
originalFileNames: item.originalFileNames,
|
|
3207
3163
|
source: bindingAssetSource(item.source),
|
|
3208
3164
|
names: item.names
|
|
3209
|
-
}
|
|
3210
|
-
else
|
|
3165
|
+
};
|
|
3166
|
+
else changes[key] = {
|
|
3211
3167
|
code: item.code,
|
|
3212
3168
|
filename: item.fileName,
|
|
3213
3169
|
name: item.name,
|
|
@@ -3222,12 +3178,11 @@ function collectChangedBundle(changed, bundle) {
|
|
|
3222
3178
|
map: bindingifySourcemap$1(item.map),
|
|
3223
3179
|
sourcemapFilename: item.sourcemapFileName || void 0,
|
|
3224
3180
|
preliminaryFilename: item.preliminaryFileName
|
|
3225
|
-
}
|
|
3181
|
+
};
|
|
3226
3182
|
}
|
|
3227
3183
|
return {
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
deleted: Array.from(changed.deleted)
|
|
3184
|
+
changes,
|
|
3185
|
+
deleted: changed.deleted
|
|
3231
3186
|
};
|
|
3232
3187
|
}
|
|
3233
3188
|
|
|
@@ -3634,7 +3589,7 @@ var ChunkingContextImpl = class {
|
|
|
3634
3589
|
//#endregion
|
|
3635
3590
|
//#region src/utils/bindingify-output-options.ts
|
|
3636
3591
|
function bindingifyOutputOptions(outputOptions) {
|
|
3637
|
-
const { dir, format, exports, 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;
|
|
3592
|
+
const { dir, format, exports, 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;
|
|
3638
3593
|
const advancedChunks = bindingifyAdvancedChunks(outputOptions.advancedChunks, manualChunks);
|
|
3639
3594
|
return {
|
|
3640
3595
|
dir,
|
|
@@ -3643,6 +3598,7 @@ function bindingifyOutputOptions(outputOptions) {
|
|
|
3643
3598
|
exports,
|
|
3644
3599
|
hashCharacters,
|
|
3645
3600
|
sourcemap: bindingifySourcemap(sourcemap),
|
|
3601
|
+
sourcemapBaseUrl,
|
|
3646
3602
|
sourcemapDebugIds,
|
|
3647
3603
|
sourcemapIgnoreList: bindingifySourcemapIgnoreList(sourcemapIgnoreList),
|
|
3648
3604
|
sourcemapPathTransform,
|
|
@@ -3709,7 +3665,9 @@ function bindingifySourcemapIgnoreList(sourcemapIgnoreList) {
|
|
|
3709
3665
|
function bindingifyAssetFilenames(assetFileNames) {
|
|
3710
3666
|
if (typeof assetFileNames === "function") return (asset) => {
|
|
3711
3667
|
return assetFileNames({
|
|
3668
|
+
name: asset.name,
|
|
3712
3669
|
names: asset.names,
|
|
3670
|
+
originalFileName: asset.originalFileName,
|
|
3713
3671
|
originalFileNames: asset.originalFileNames,
|
|
3714
3672
|
source: transformAssetSource(asset.source),
|
|
3715
3673
|
type: "asset"
|
|
@@ -3765,6 +3723,9 @@ var NormalizedOutputOptionsImpl = class {
|
|
|
3765
3723
|
get sourcemap() {
|
|
3766
3724
|
return this.inner.sourcemap;
|
|
3767
3725
|
}
|
|
3726
|
+
get sourcemapBaseUrl() {
|
|
3727
|
+
return this.inner.sourcemapBaseUrl ?? void 0;
|
|
3728
|
+
}
|
|
3768
3729
|
get cssEntryFileNames() {
|
|
3769
3730
|
return this.inner.cssEntryFilenames || this.outputOptions.cssEntryFileNames;
|
|
3770
3731
|
}
|
|
@@ -4377,8 +4338,12 @@ var RolldownBuild = class {
|
|
|
4377
4338
|
await this.close();
|
|
4378
4339
|
}
|
|
4379
4340
|
async generateHmrPatch(changedFiles) {
|
|
4380
|
-
const
|
|
4381
|
-
|
|
4341
|
+
const ret = await this.#bundlerImpl.impl.generateHmrPatch(changedFiles);
|
|
4342
|
+
switch (ret.type) {
|
|
4343
|
+
case "Ok": return ret.field0;
|
|
4344
|
+
case "Error": throw normalizeErrors(ret.field0);
|
|
4345
|
+
default: throw new Error("Unknown error");
|
|
4346
|
+
}
|
|
4382
4347
|
}
|
|
4383
4348
|
async hmrInvalidate(file, firstInvalidatedBy) {
|
|
4384
4349
|
const output = await this.#bundlerImpl.impl.hmrInvalidate(file, firstInvalidatedBy);
|
|
@@ -4556,4 +4521,4 @@ function defineConfig(config) {
|
|
|
4556
4521
|
const VERSION = version;
|
|
4557
4522
|
|
|
4558
4523
|
//#endregion
|
|
4559
|
-
export { BuiltinPlugin, PluginContextData, PluginDriver, VERSION, __commonJS, __toESM, ansis_default, assetPlugin, bindingifyPlugin, build, buildImportAnalysisPlugin, createBundlerImpl, defineConfig, description$1 as description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin,
|
|
4524
|
+
export { BuiltinPlugin, PluginContextData, PluginDriver, VERSION, __commonJS, __toESM, ansis_default, assetPlugin, bindingifyPlugin, build, buildImportAnalysisPlugin, createBundlerImpl, defineConfig, description$1 as description, dynamicImportVarsPlugin, getInputCliKeys, getJsonSchema, getOutputCliKeys, handleOutputErrors, importGlobPlugin, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, reporterPlugin, rolldown, validateCliOptions, version, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin, watch, webWorkerPostPlugin };
|