@stryke/capnp 0.12.96 → 0.12.98
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/bin/capnpc.cjs +405 -304
- package/bin/capnpc.d.cts +909 -4
- package/bin/capnpc.d.cts.map +1 -1
- package/bin/capnpc.d.mts +909 -4
- package/bin/capnpc.d.mts.map +1 -1
- package/bin/capnpc.mjs +368 -268
- package/bin/capnpc.mjs.map +1 -1
- package/dist/capnp-es.BHkXHvyK-B3-d8RNu.d.mts +2991 -0
- package/dist/capnp-es.BHkXHvyK-B3-d8RNu.d.mts.map +1 -0
- package/dist/capnp-es.BHkXHvyK-CQWXOqvU.d.cts +2991 -0
- package/dist/capnp-es.BHkXHvyK-CQWXOqvU.d.cts.map +1 -0
- package/dist/{capnp-es.GpvEvMIK-C4q8I6qy.mjs → capnp-es.GpvEvMIK-CH8kq1KS.mjs} +13 -6
- package/dist/{capnp-es.GpvEvMIK-C4q8I6qy.mjs.map → capnp-es.GpvEvMIK-CH8kq1KS.mjs.map} +1 -1
- package/dist/{capnp-es.GpvEvMIK-BcYm5JyH.cjs → capnp-es.GpvEvMIK-CZ5ZimCD.cjs} +12 -5
- package/dist/{compile-Cx88xgqJ.mjs → compile-D_BOc0dD.mjs} +109 -15
- package/dist/compile-D_BOc0dD.mjs.map +1 -0
- package/dist/{compile-SmxAaHxW.cjs → compile-Yq1zhccM.cjs} +113 -19
- package/dist/compile.cjs +2 -2
- package/dist/compile.d.cts +38 -3
- package/dist/compile.d.cts.map +1 -0
- package/dist/compile.d.mts +38 -3
- package/dist/compile.d.mts.map +1 -0
- package/dist/compile.mjs +1 -2
- package/dist/{dist-BlvFBzSi.mjs → dist-DQ7xmzRT.mjs} +385 -16
- package/dist/dist-DQ7xmzRT.mjs.map +1 -0
- package/dist/{dist-YywzZL3Q.cjs → dist-VMGxvENY.cjs} +381 -12
- package/dist/{helpers-BoYAadSB.mjs → helpers-2TldkyGG.mjs} +136 -137
- package/dist/helpers-2TldkyGG.mjs.map +1 -0
- package/dist/{helpers-gxlsFdP8.cjs → helpers-Dn4nWOb7.cjs} +164 -165
- package/dist/helpers.cjs +2 -1
- package/dist/helpers.d.cts +1 -2
- package/dist/helpers.d.cts.map +1 -1
- package/dist/helpers.d.mts +1 -2
- package/dist/helpers.d.mts.map +1 -1
- package/dist/helpers.mjs +1 -1
- package/dist/index-63Za7yNc.d.cts +736 -0
- package/dist/index-63Za7yNc.d.cts.map +1 -0
- package/dist/index-LYXu6eWz.d.mts +736 -0
- package/dist/index-LYXu6eWz.d.mts.map +1 -0
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +4 -5
- package/dist/rpc-helpers.cjs +4 -3
- package/dist/rpc-helpers.d.cts +3 -4
- package/dist/rpc-helpers.d.cts.map +1 -1
- package/dist/rpc-helpers.d.mts +3 -4
- package/dist/rpc-helpers.d.mts.map +1 -1
- package/dist/rpc-helpers.mjs +2 -2
- package/dist/types-BjCOVfgj.d.cts +1506 -0
- package/dist/types-BjCOVfgj.d.cts.map +1 -0
- package/dist/types-CVzMn-TI.d.mts +1506 -0
- package/dist/types-CVzMn-TI.d.mts.map +1 -0
- package/dist/types.cjs +8 -2
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +7 -2
- package/dist/types.mjs.map +1 -0
- package/package.json +5 -5
- package/schemas/cpp.cjs +1 -0
- package/schemas/cpp.d.cts.map +1 -1
- package/schemas/cpp.d.mts.map +1 -1
- package/schemas/index-BB47pUzp.d.cts +742 -0
- package/schemas/index-BB47pUzp.d.cts.map +1 -0
- package/schemas/index-DprjZUdT.d.mts +742 -0
- package/schemas/index-DprjZUdT.d.mts.map +1 -0
- package/schemas/persistent.cjs +2 -1
- package/schemas/persistent.d.cts +48 -21
- package/schemas/persistent.d.cts.map +1 -1
- package/schemas/persistent.d.mts +48 -21
- package/schemas/persistent.d.mts.map +1 -1
- package/schemas/persistent.mjs +1 -1
- package/schemas/persistent.mjs.map +1 -1
- package/schemas/rpc-twoparty.cjs +20 -1
- package/schemas/rpc-twoparty.d.cts +17 -17
- package/schemas/rpc-twoparty.d.cts.map +1 -1
- package/schemas/rpc-twoparty.d.mts +17 -17
- package/schemas/rpc-twoparty.d.mts.map +1 -1
- package/schemas/rpc-twoparty.mjs +19 -1
- package/schemas/rpc-twoparty.mjs.map +1 -1
- package/schemas/rpc.cjs +371 -1
- package/schemas/rpc.d.cts +141 -141
- package/schemas/rpc.d.cts.map +1 -1
- package/schemas/rpc.d.mts +141 -141
- package/schemas/rpc.d.mts.map +1 -1
- package/schemas/rpc.mjs +370 -1
- package/schemas/rpc.mjs.map +1 -1
- package/schemas/schema.cjs +96 -1
- package/schemas/schema.d.cts +286 -228
- package/schemas/schema.d.cts.map +1 -1
- package/schemas/schema.d.mts +286 -228
- package/schemas/schema.d.mts.map +1 -1
- package/schemas/schema.mjs +95 -1
- package/schemas/schema.mjs.map +1 -1
- package/schemas/{src-2eLj6yCr.cjs → src-B6FhDNiV.cjs} +19 -12
- package/schemas/{src-s2pCu2mc.mjs → src-B97sIXSw.mjs} +19 -13
- package/schemas/src-B97sIXSw.mjs.map +1 -0
- package/schemas/ts.cjs +1 -0
- package/schemas/ts.d.cts.map +1 -1
- package/schemas/ts.d.mts.map +1 -1
- package/dist/compile-Cx88xgqJ.mjs.map +0 -1
- package/dist/compile-DccxA7WZ.d.cts +0 -40
- package/dist/compile-DccxA7WZ.d.cts.map +0 -1
- package/dist/compile-UkKIpqrK.d.mts +0 -40
- package/dist/compile-UkKIpqrK.d.mts.map +0 -1
- package/dist/dist-BlvFBzSi.mjs.map +0 -1
- package/dist/helpers-BoYAadSB.mjs.map +0 -1
- package/dist/types-Cuj2daUE.mjs +0 -8
- package/dist/types-Cuj2daUE.mjs.map +0 -1
- package/dist/types-D03SjfBL.d.mts +0 -55
- package/dist/types-D03SjfBL.d.mts.map +0 -1
- package/dist/types-D52qMMoK.d.cts +0 -55
- package/dist/types-D52qMMoK.d.cts.map +0 -1
- package/dist/types-DHrjS-69.cjs +0 -13
- package/schemas/index-BAJMwFip.d.mts +0 -96
- package/schemas/index-BAJMwFip.d.mts.map +0 -1
- package/schemas/index-b7dam4EA.d.cts +0 -96
- package/schemas/index-b7dam4EA.d.cts.map +0 -1
- package/schemas/src-s2pCu2mc.mjs.map +0 -1
package/bin/capnpc.mjs
CHANGED
|
@@ -15,14 +15,14 @@ import { readJsonFile } from "@stryke/fs/json";
|
|
|
15
15
|
import { listFiles, listSync } from "@stryke/fs/list-files";
|
|
16
16
|
import { appendPath } from "@stryke/path/append";
|
|
17
17
|
|
|
18
|
-
//#region
|
|
18
|
+
//#region \0rolldown/runtime.js
|
|
19
19
|
var __create = Object.create;
|
|
20
20
|
var __defProp = Object.defineProperty;
|
|
21
21
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
22
22
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
23
23
|
var __getProtoOf = Object.getPrototypeOf;
|
|
24
24
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
25
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
25
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
26
26
|
var __copyProps = (to, from, except, desc) => {
|
|
27
27
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
28
|
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -44,7 +44,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
44
44
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
45
45
|
|
|
46
46
|
//#endregion
|
|
47
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
47
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-5DQF4GNF.js
|
|
48
48
|
var DEFAULT_COLOR_CONFIG = {
|
|
49
49
|
light: {
|
|
50
50
|
background: "#fafafa",
|
|
@@ -862,7 +862,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
862
862
|
const cssKeywords = require_color_name();
|
|
863
863
|
const reverseKeywords = {};
|
|
864
864
|
for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
|
|
865
|
-
const convert
|
|
865
|
+
const convert = {
|
|
866
866
|
rgb: {
|
|
867
867
|
channels: 3,
|
|
868
868
|
labels: "rgb"
|
|
@@ -932,18 +932,18 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
932
932
|
labels: ["gray"]
|
|
933
933
|
}
|
|
934
934
|
};
|
|
935
|
-
module.exports = convert
|
|
936
|
-
for (const model of Object.keys(convert
|
|
937
|
-
if (!("channels" in convert
|
|
938
|
-
if (!("labels" in convert
|
|
939
|
-
if (convert
|
|
940
|
-
const { channels, labels } = convert
|
|
941
|
-
delete convert
|
|
942
|
-
delete convert
|
|
943
|
-
Object.defineProperty(convert
|
|
944
|
-
Object.defineProperty(convert
|
|
945
|
-
}
|
|
946
|
-
convert
|
|
935
|
+
module.exports = convert;
|
|
936
|
+
for (const model of Object.keys(convert)) {
|
|
937
|
+
if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
|
|
938
|
+
if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
|
|
939
|
+
if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
|
|
940
|
+
const { channels, labels } = convert[model];
|
|
941
|
+
delete convert[model].channels;
|
|
942
|
+
delete convert[model].labels;
|
|
943
|
+
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
944
|
+
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
945
|
+
}
|
|
946
|
+
convert.rgb.hsl = function(rgb) {
|
|
947
947
|
const r = rgb[0] / 255;
|
|
948
948
|
const g = rgb[1] / 255;
|
|
949
949
|
const b = rgb[2] / 255;
|
|
@@ -968,7 +968,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
968
968
|
l * 100
|
|
969
969
|
];
|
|
970
970
|
};
|
|
971
|
-
convert
|
|
971
|
+
convert.rgb.hsv = function(rgb) {
|
|
972
972
|
let rdif;
|
|
973
973
|
let gdif;
|
|
974
974
|
let bdif;
|
|
@@ -1002,11 +1002,11 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1002
1002
|
v * 100
|
|
1003
1003
|
];
|
|
1004
1004
|
};
|
|
1005
|
-
convert
|
|
1005
|
+
convert.rgb.hwb = function(rgb) {
|
|
1006
1006
|
const r = rgb[0];
|
|
1007
1007
|
const g = rgb[1];
|
|
1008
1008
|
let b = rgb[2];
|
|
1009
|
-
const h = convert
|
|
1009
|
+
const h = convert.rgb.hsl(rgb)[0];
|
|
1010
1010
|
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
1011
1011
|
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
1012
1012
|
return [
|
|
@@ -1015,7 +1015,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1015
1015
|
b * 100
|
|
1016
1016
|
];
|
|
1017
1017
|
};
|
|
1018
|
-
convert
|
|
1018
|
+
convert.rgb.cmyk = function(rgb) {
|
|
1019
1019
|
const r = rgb[0] / 255;
|
|
1020
1020
|
const g = rgb[1] / 255;
|
|
1021
1021
|
const b = rgb[2] / 255;
|
|
@@ -1033,7 +1033,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1033
1033
|
function comparativeDistance(x, y) {
|
|
1034
1034
|
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
1035
1035
|
}
|
|
1036
|
-
convert
|
|
1036
|
+
convert.rgb.keyword = function(rgb) {
|
|
1037
1037
|
const reversed = reverseKeywords[rgb];
|
|
1038
1038
|
if (reversed) return reversed;
|
|
1039
1039
|
let currentClosestDistance = Infinity;
|
|
@@ -1048,10 +1048,10 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
return currentClosestKeyword;
|
|
1050
1050
|
};
|
|
1051
|
-
convert
|
|
1051
|
+
convert.keyword.rgb = function(keyword) {
|
|
1052
1052
|
return cssKeywords[keyword];
|
|
1053
1053
|
};
|
|
1054
|
-
convert
|
|
1054
|
+
convert.rgb.xyz = function(rgb) {
|
|
1055
1055
|
let r = rgb[0] / 255;
|
|
1056
1056
|
let g = rgb[1] / 255;
|
|
1057
1057
|
let b = rgb[2] / 255;
|
|
@@ -1067,8 +1067,8 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1067
1067
|
z * 100
|
|
1068
1068
|
];
|
|
1069
1069
|
};
|
|
1070
|
-
convert
|
|
1071
|
-
const xyz = convert
|
|
1070
|
+
convert.rgb.lab = function(rgb) {
|
|
1071
|
+
const xyz = convert.rgb.xyz(rgb);
|
|
1072
1072
|
let x = xyz[0];
|
|
1073
1073
|
let y = xyz[1];
|
|
1074
1074
|
let z = xyz[2];
|
|
@@ -1084,7 +1084,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1084
1084
|
200 * (y - z)
|
|
1085
1085
|
];
|
|
1086
1086
|
};
|
|
1087
|
-
convert
|
|
1087
|
+
convert.hsl.rgb = function(hsl) {
|
|
1088
1088
|
const h = hsl[0] / 360;
|
|
1089
1089
|
const s = hsl[1] / 100;
|
|
1090
1090
|
const l = hsl[2] / 100;
|
|
@@ -1119,7 +1119,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
return rgb;
|
|
1121
1121
|
};
|
|
1122
|
-
convert
|
|
1122
|
+
convert.hsl.hsv = function(hsl) {
|
|
1123
1123
|
const h = hsl[0];
|
|
1124
1124
|
let s = hsl[1] / 100;
|
|
1125
1125
|
let l = hsl[2] / 100;
|
|
@@ -1135,7 +1135,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1135
1135
|
v * 100
|
|
1136
1136
|
];
|
|
1137
1137
|
};
|
|
1138
|
-
convert
|
|
1138
|
+
convert.hsv.rgb = function(hsv) {
|
|
1139
1139
|
const h = hsv[0] / 60;
|
|
1140
1140
|
const s = hsv[1] / 100;
|
|
1141
1141
|
let v = hsv[2] / 100;
|
|
@@ -1178,7 +1178,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1178
1178
|
];
|
|
1179
1179
|
}
|
|
1180
1180
|
};
|
|
1181
|
-
convert
|
|
1181
|
+
convert.hsv.hsl = function(hsv) {
|
|
1182
1182
|
const h = hsv[0];
|
|
1183
1183
|
const s = hsv[1] / 100;
|
|
1184
1184
|
const v = hsv[2] / 100;
|
|
@@ -1197,7 +1197,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1197
1197
|
l * 100
|
|
1198
1198
|
];
|
|
1199
1199
|
};
|
|
1200
|
-
convert
|
|
1200
|
+
convert.hwb.rgb = function(hwb) {
|
|
1201
1201
|
const h = hwb[0] / 360;
|
|
1202
1202
|
let wh = hwb[1] / 100;
|
|
1203
1203
|
let bl = hwb[2] / 100;
|
|
@@ -1255,7 +1255,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1255
1255
|
b * 255
|
|
1256
1256
|
];
|
|
1257
1257
|
};
|
|
1258
|
-
convert
|
|
1258
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
1259
1259
|
const c = cmyk[0] / 100;
|
|
1260
1260
|
const m = cmyk[1] / 100;
|
|
1261
1261
|
const y = cmyk[2] / 100;
|
|
@@ -1269,7 +1269,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1269
1269
|
b * 255
|
|
1270
1270
|
];
|
|
1271
1271
|
};
|
|
1272
|
-
convert
|
|
1272
|
+
convert.xyz.rgb = function(xyz) {
|
|
1273
1273
|
const x = xyz[0] / 100;
|
|
1274
1274
|
const y = xyz[1] / 100;
|
|
1275
1275
|
const z = xyz[2] / 100;
|
|
@@ -1291,7 +1291,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1291
1291
|
b * 255
|
|
1292
1292
|
];
|
|
1293
1293
|
};
|
|
1294
|
-
convert
|
|
1294
|
+
convert.xyz.lab = function(xyz) {
|
|
1295
1295
|
let x = xyz[0];
|
|
1296
1296
|
let y = xyz[1];
|
|
1297
1297
|
let z = xyz[2];
|
|
@@ -1307,7 +1307,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1307
1307
|
200 * (y - z)
|
|
1308
1308
|
];
|
|
1309
1309
|
};
|
|
1310
|
-
convert
|
|
1310
|
+
convert.lab.xyz = function(lab) {
|
|
1311
1311
|
const l = lab[0];
|
|
1312
1312
|
const a = lab[1];
|
|
1313
1313
|
const b = lab[2];
|
|
@@ -1332,7 +1332,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1332
1332
|
z
|
|
1333
1333
|
];
|
|
1334
1334
|
};
|
|
1335
|
-
convert
|
|
1335
|
+
convert.lab.lch = function(lab) {
|
|
1336
1336
|
const l = lab[0];
|
|
1337
1337
|
const a = lab[1];
|
|
1338
1338
|
const b = lab[2];
|
|
@@ -1345,7 +1345,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1345
1345
|
h
|
|
1346
1346
|
];
|
|
1347
1347
|
};
|
|
1348
|
-
convert
|
|
1348
|
+
convert.lch.lab = function(lch) {
|
|
1349
1349
|
const l = lch[0];
|
|
1350
1350
|
const c = lch[1];
|
|
1351
1351
|
const hr = lch[2] / 360 * 2 * Math.PI;
|
|
@@ -1355,19 +1355,19 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1355
1355
|
c * Math.sin(hr)
|
|
1356
1356
|
];
|
|
1357
1357
|
};
|
|
1358
|
-
convert
|
|
1358
|
+
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
1359
1359
|
const [r, g, b] = args;
|
|
1360
|
-
let value = saturation === null ? convert
|
|
1360
|
+
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
1361
1361
|
value = Math.round(value / 50);
|
|
1362
1362
|
if (value === 0) return 30;
|
|
1363
1363
|
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
1364
1364
|
if (value === 2) ansi += 60;
|
|
1365
1365
|
return ansi;
|
|
1366
1366
|
};
|
|
1367
|
-
convert
|
|
1368
|
-
return convert
|
|
1367
|
+
convert.hsv.ansi16 = function(args) {
|
|
1368
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
1369
1369
|
};
|
|
1370
|
-
convert
|
|
1370
|
+
convert.rgb.ansi256 = function(args) {
|
|
1371
1371
|
const r = args[0];
|
|
1372
1372
|
const g = args[1];
|
|
1373
1373
|
const b = args[2];
|
|
@@ -1378,7 +1378,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
1380
1380
|
};
|
|
1381
|
-
convert
|
|
1381
|
+
convert.ansi16.rgb = function(args) {
|
|
1382
1382
|
let color = args % 10;
|
|
1383
1383
|
if (color === 0 || color === 7) {
|
|
1384
1384
|
if (args > 50) color += 3.5;
|
|
@@ -1396,7 +1396,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1396
1396
|
(color >> 2 & 1) * mult * 255
|
|
1397
1397
|
];
|
|
1398
1398
|
};
|
|
1399
|
-
convert
|
|
1399
|
+
convert.ansi256.rgb = function(args) {
|
|
1400
1400
|
if (args >= 232) {
|
|
1401
1401
|
const c = (args - 232) * 10 + 8;
|
|
1402
1402
|
return [
|
|
@@ -1413,11 +1413,11 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1413
1413
|
rem % 6 / 5 * 255
|
|
1414
1414
|
];
|
|
1415
1415
|
};
|
|
1416
|
-
convert
|
|
1416
|
+
convert.rgb.hex = function(args) {
|
|
1417
1417
|
const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
|
|
1418
1418
|
return "000000".substring(string.length) + string;
|
|
1419
1419
|
};
|
|
1420
|
-
convert
|
|
1420
|
+
convert.hex.rgb = function(args) {
|
|
1421
1421
|
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
1422
1422
|
if (!match) return [
|
|
1423
1423
|
0,
|
|
@@ -1435,7 +1435,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1435
1435
|
integer & 255
|
|
1436
1436
|
];
|
|
1437
1437
|
};
|
|
1438
|
-
convert
|
|
1438
|
+
convert.rgb.hcg = function(rgb) {
|
|
1439
1439
|
const r = rgb[0] / 255;
|
|
1440
1440
|
const g = rgb[1] / 255;
|
|
1441
1441
|
const b = rgb[2] / 255;
|
|
@@ -1458,7 +1458,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1458
1458
|
grayscale * 100
|
|
1459
1459
|
];
|
|
1460
1460
|
};
|
|
1461
|
-
convert
|
|
1461
|
+
convert.hsl.hcg = function(hsl) {
|
|
1462
1462
|
const s = hsl[1] / 100;
|
|
1463
1463
|
const l = hsl[2] / 100;
|
|
1464
1464
|
const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
|
|
@@ -1470,7 +1470,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1470
1470
|
f * 100
|
|
1471
1471
|
];
|
|
1472
1472
|
};
|
|
1473
|
-
convert
|
|
1473
|
+
convert.hsv.hcg = function(hsv) {
|
|
1474
1474
|
const s = hsv[1] / 100;
|
|
1475
1475
|
const v = hsv[2] / 100;
|
|
1476
1476
|
const c = s * v;
|
|
@@ -1482,7 +1482,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1482
1482
|
f * 100
|
|
1483
1483
|
];
|
|
1484
1484
|
};
|
|
1485
|
-
convert
|
|
1485
|
+
convert.hcg.rgb = function(hcg) {
|
|
1486
1486
|
const h = hcg[0] / 360;
|
|
1487
1487
|
const c = hcg[1] / 100;
|
|
1488
1488
|
const g = hcg[2] / 100;
|
|
@@ -1538,7 +1538,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1538
1538
|
(c * pure[2] + mg) * 255
|
|
1539
1539
|
];
|
|
1540
1540
|
};
|
|
1541
|
-
convert
|
|
1541
|
+
convert.hcg.hsv = function(hcg) {
|
|
1542
1542
|
const c = hcg[1] / 100;
|
|
1543
1543
|
const v = c + hcg[2] / 100 * (1 - c);
|
|
1544
1544
|
let f = 0;
|
|
@@ -1549,7 +1549,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1549
1549
|
v * 100
|
|
1550
1550
|
];
|
|
1551
1551
|
};
|
|
1552
|
-
convert
|
|
1552
|
+
convert.hcg.hsl = function(hcg) {
|
|
1553
1553
|
const c = hcg[1] / 100;
|
|
1554
1554
|
const l = hcg[2] / 100 * (1 - c) + .5 * c;
|
|
1555
1555
|
let s = 0;
|
|
@@ -1561,7 +1561,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1561
1561
|
l * 100
|
|
1562
1562
|
];
|
|
1563
1563
|
};
|
|
1564
|
-
convert
|
|
1564
|
+
convert.hcg.hwb = function(hcg) {
|
|
1565
1565
|
const c = hcg[1] / 100;
|
|
1566
1566
|
const v = c + hcg[2] / 100 * (1 - c);
|
|
1567
1567
|
return [
|
|
@@ -1570,7 +1570,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1570
1570
|
(1 - v) * 100
|
|
1571
1571
|
];
|
|
1572
1572
|
};
|
|
1573
|
-
convert
|
|
1573
|
+
convert.hwb.hcg = function(hwb) {
|
|
1574
1574
|
const w = hwb[1] / 100;
|
|
1575
1575
|
const v = 1 - hwb[2] / 100;
|
|
1576
1576
|
const c = v - w;
|
|
@@ -1582,43 +1582,43 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1582
1582
|
g * 100
|
|
1583
1583
|
];
|
|
1584
1584
|
};
|
|
1585
|
-
convert
|
|
1585
|
+
convert.apple.rgb = function(apple) {
|
|
1586
1586
|
return [
|
|
1587
1587
|
apple[0] / 65535 * 255,
|
|
1588
1588
|
apple[1] / 65535 * 255,
|
|
1589
1589
|
apple[2] / 65535 * 255
|
|
1590
1590
|
];
|
|
1591
1591
|
};
|
|
1592
|
-
convert
|
|
1592
|
+
convert.rgb.apple = function(rgb) {
|
|
1593
1593
|
return [
|
|
1594
1594
|
rgb[0] / 255 * 65535,
|
|
1595
1595
|
rgb[1] / 255 * 65535,
|
|
1596
1596
|
rgb[2] / 255 * 65535
|
|
1597
1597
|
];
|
|
1598
1598
|
};
|
|
1599
|
-
convert
|
|
1599
|
+
convert.gray.rgb = function(args) {
|
|
1600
1600
|
return [
|
|
1601
1601
|
args[0] / 100 * 255,
|
|
1602
1602
|
args[0] / 100 * 255,
|
|
1603
1603
|
args[0] / 100 * 255
|
|
1604
1604
|
];
|
|
1605
1605
|
};
|
|
1606
|
-
convert
|
|
1606
|
+
convert.gray.hsl = function(args) {
|
|
1607
1607
|
return [
|
|
1608
1608
|
0,
|
|
1609
1609
|
0,
|
|
1610
1610
|
args[0]
|
|
1611
1611
|
];
|
|
1612
1612
|
};
|
|
1613
|
-
convert
|
|
1614
|
-
convert
|
|
1613
|
+
convert.gray.hsv = convert.gray.hsl;
|
|
1614
|
+
convert.gray.hwb = function(gray) {
|
|
1615
1615
|
return [
|
|
1616
1616
|
0,
|
|
1617
1617
|
100,
|
|
1618
1618
|
gray[0]
|
|
1619
1619
|
];
|
|
1620
1620
|
};
|
|
1621
|
-
convert
|
|
1621
|
+
convert.gray.cmyk = function(gray) {
|
|
1622
1622
|
return [
|
|
1623
1623
|
0,
|
|
1624
1624
|
0,
|
|
@@ -1626,19 +1626,19 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1626
1626
|
gray[0]
|
|
1627
1627
|
];
|
|
1628
1628
|
};
|
|
1629
|
-
convert
|
|
1629
|
+
convert.gray.lab = function(gray) {
|
|
1630
1630
|
return [
|
|
1631
1631
|
gray[0],
|
|
1632
1632
|
0,
|
|
1633
1633
|
0
|
|
1634
1634
|
];
|
|
1635
1635
|
};
|
|
1636
|
-
convert
|
|
1636
|
+
convert.gray.hex = function(gray) {
|
|
1637
1637
|
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
1638
1638
|
const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
|
|
1639
1639
|
return "000000".substring(string.length) + string;
|
|
1640
1640
|
};
|
|
1641
|
-
convert
|
|
1641
|
+
convert.rgb.gray = function(rgb) {
|
|
1642
1642
|
return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
|
|
1643
1643
|
};
|
|
1644
1644
|
}));
|
|
@@ -1646,11 +1646,11 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1646
1646
|
//#endregion
|
|
1647
1647
|
//#region ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
|
|
1648
1648
|
var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1649
|
-
const conversions
|
|
1649
|
+
const conversions = require_conversions();
|
|
1650
1650
|
function buildGraph() {
|
|
1651
1651
|
const graph = {};
|
|
1652
|
-
const models
|
|
1653
|
-
for (let len = models
|
|
1652
|
+
const models = Object.keys(conversions);
|
|
1653
|
+
for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
|
|
1654
1654
|
distance: -1,
|
|
1655
1655
|
parent: null
|
|
1656
1656
|
};
|
|
@@ -1662,7 +1662,7 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1662
1662
|
graph[fromModel].distance = 0;
|
|
1663
1663
|
while (queue.length) {
|
|
1664
1664
|
const current = queue.pop();
|
|
1665
|
-
const adjacents = Object.keys(conversions
|
|
1665
|
+
const adjacents = Object.keys(conversions[current]);
|
|
1666
1666
|
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
1667
1667
|
const adjacent = adjacents[i];
|
|
1668
1668
|
const node = graph[adjacent];
|
|
@@ -1681,23 +1681,23 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1681
1681
|
};
|
|
1682
1682
|
}
|
|
1683
1683
|
function wrapConversion(toModel, graph) {
|
|
1684
|
-
const path
|
|
1685
|
-
let fn = conversions
|
|
1684
|
+
const path = [graph[toModel].parent, toModel];
|
|
1685
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
|
1686
1686
|
let cur = graph[toModel].parent;
|
|
1687
1687
|
while (graph[cur].parent) {
|
|
1688
|
-
path
|
|
1689
|
-
fn = link(conversions
|
|
1688
|
+
path.unshift(graph[cur].parent);
|
|
1689
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
1690
1690
|
cur = graph[cur].parent;
|
|
1691
1691
|
}
|
|
1692
|
-
fn.conversion = path
|
|
1692
|
+
fn.conversion = path;
|
|
1693
1693
|
return fn;
|
|
1694
1694
|
}
|
|
1695
1695
|
module.exports = function(fromModel) {
|
|
1696
1696
|
const graph = deriveBFS(fromModel);
|
|
1697
1697
|
const conversion = {};
|
|
1698
|
-
const models
|
|
1699
|
-
for (let len = models
|
|
1700
|
-
const toModel = models
|
|
1698
|
+
const models = Object.keys(graph);
|
|
1699
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
1700
|
+
const toModel = models[i];
|
|
1701
1701
|
if (graph[toModel].parent === null) continue;
|
|
1702
1702
|
conversion[toModel] = wrapConversion(toModel, graph);
|
|
1703
1703
|
}
|
|
@@ -1788,17 +1788,17 @@ var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1788
1788
|
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
1789
1789
|
if (colorConvert === void 0) colorConvert = require_color_convert();
|
|
1790
1790
|
const offset = isBackground ? 10 : 0;
|
|
1791
|
-
const styles
|
|
1791
|
+
const styles = {};
|
|
1792
1792
|
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
1793
1793
|
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
1794
|
-
if (sourceSpace === targetSpace) styles
|
|
1795
|
-
else if (typeof suite === "object") styles
|
|
1794
|
+
if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
|
|
1795
|
+
else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
|
|
1796
1796
|
}
|
|
1797
|
-
return styles
|
|
1797
|
+
return styles;
|
|
1798
1798
|
};
|
|
1799
1799
|
function assembleStyles() {
|
|
1800
1800
|
const codes = /* @__PURE__ */ new Map();
|
|
1801
|
-
const styles
|
|
1801
|
+
const styles = {
|
|
1802
1802
|
modifier: {
|
|
1803
1803
|
reset: [0, 0],
|
|
1804
1804
|
bold: [1, 22],
|
|
@@ -1846,37 +1846,37 @@ var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1846
1846
|
bgWhiteBright: [107, 49]
|
|
1847
1847
|
}
|
|
1848
1848
|
};
|
|
1849
|
-
styles
|
|
1850
|
-
styles
|
|
1851
|
-
styles
|
|
1852
|
-
styles
|
|
1853
|
-
for (const [groupName, group] of Object.entries(styles
|
|
1849
|
+
styles.color.gray = styles.color.blackBright;
|
|
1850
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
1851
|
+
styles.color.grey = styles.color.blackBright;
|
|
1852
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
1853
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
1854
1854
|
for (const [styleName, style] of Object.entries(group)) {
|
|
1855
|
-
styles
|
|
1855
|
+
styles[styleName] = {
|
|
1856
1856
|
open: `\u001B[${style[0]}m`,
|
|
1857
1857
|
close: `\u001B[${style[1]}m`
|
|
1858
1858
|
};
|
|
1859
|
-
group[styleName] = styles
|
|
1859
|
+
group[styleName] = styles[styleName];
|
|
1860
1860
|
codes.set(style[0], style[1]);
|
|
1861
1861
|
}
|
|
1862
|
-
Object.defineProperty(styles
|
|
1862
|
+
Object.defineProperty(styles, groupName, {
|
|
1863
1863
|
value: group,
|
|
1864
1864
|
enumerable: false
|
|
1865
1865
|
});
|
|
1866
1866
|
}
|
|
1867
|
-
Object.defineProperty(styles
|
|
1867
|
+
Object.defineProperty(styles, "codes", {
|
|
1868
1868
|
value: codes,
|
|
1869
1869
|
enumerable: false
|
|
1870
1870
|
});
|
|
1871
|
-
styles
|
|
1872
|
-
styles
|
|
1873
|
-
setLazyProperty(styles
|
|
1874
|
-
setLazyProperty(styles
|
|
1875
|
-
setLazyProperty(styles
|
|
1876
|
-
setLazyProperty(styles
|
|
1877
|
-
setLazyProperty(styles
|
|
1878
|
-
setLazyProperty(styles
|
|
1879
|
-
return styles
|
|
1871
|
+
styles.color.close = "\x1B[39m";
|
|
1872
|
+
styles.bgColor.close = "\x1B[49m";
|
|
1873
|
+
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
1874
|
+
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
1875
|
+
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
1876
|
+
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
1877
|
+
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
1878
|
+
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
1879
|
+
return styles;
|
|
1880
1880
|
}
|
|
1881
1881
|
Object.defineProperty(module, "exports", {
|
|
1882
1882
|
enumerable: true,
|
|
@@ -1967,7 +1967,7 @@ var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1967
1967
|
//#endregion
|
|
1968
1968
|
//#region ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
|
|
1969
1969
|
var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1970
|
-
const stringReplaceAll
|
|
1970
|
+
const stringReplaceAll = (string, substring, replacer) => {
|
|
1971
1971
|
let index = string.indexOf(substring);
|
|
1972
1972
|
if (index === -1) return string;
|
|
1973
1973
|
const substringLength = substring.length;
|
|
@@ -1981,7 +1981,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1981
1981
|
returnValue += string.substr(endIndex);
|
|
1982
1982
|
return returnValue;
|
|
1983
1983
|
};
|
|
1984
|
-
const stringEncaseCRLFWithFirstIndex
|
|
1984
|
+
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
1985
1985
|
let endIndex = 0;
|
|
1986
1986
|
let returnValue = "";
|
|
1987
1987
|
do {
|
|
@@ -1994,8 +1994,8 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1994
1994
|
return returnValue;
|
|
1995
1995
|
};
|
|
1996
1996
|
module.exports = {
|
|
1997
|
-
stringReplaceAll
|
|
1998
|
-
stringEncaseCRLFWithFirstIndex
|
|
1997
|
+
stringReplaceAll,
|
|
1998
|
+
stringEncaseCRLFWithFirstIndex
|
|
1999
1999
|
};
|
|
2000
2000
|
}));
|
|
2001
2001
|
|
|
@@ -2050,19 +2050,19 @@ var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2050
2050
|
}
|
|
2051
2051
|
return results;
|
|
2052
2052
|
}
|
|
2053
|
-
function buildStyle(chalk
|
|
2053
|
+
function buildStyle(chalk, styles) {
|
|
2054
2054
|
const enabled = {};
|
|
2055
|
-
for (const layer of styles
|
|
2056
|
-
let current = chalk
|
|
2057
|
-
for (const [styleName, styles
|
|
2058
|
-
if (!Array.isArray(styles
|
|
2055
|
+
for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
2056
|
+
let current = chalk;
|
|
2057
|
+
for (const [styleName, styles] of Object.entries(enabled)) {
|
|
2058
|
+
if (!Array.isArray(styles)) continue;
|
|
2059
2059
|
if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
2060
|
-
current = styles
|
|
2060
|
+
current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
|
|
2061
2061
|
}
|
|
2062
2062
|
return current;
|
|
2063
2063
|
}
|
|
2064
|
-
module.exports = (chalk
|
|
2065
|
-
const styles
|
|
2064
|
+
module.exports = (chalk, temporary) => {
|
|
2065
|
+
const styles = [];
|
|
2066
2066
|
const chunks = [];
|
|
2067
2067
|
let chunk = [];
|
|
2068
2068
|
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
@@ -2070,21 +2070,21 @@ var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2070
2070
|
else if (style) {
|
|
2071
2071
|
const string = chunk.join("");
|
|
2072
2072
|
chunk = [];
|
|
2073
|
-
chunks.push(styles
|
|
2074
|
-
styles
|
|
2073
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
|
|
2074
|
+
styles.push({
|
|
2075
2075
|
inverse,
|
|
2076
2076
|
styles: parseStyle(style)
|
|
2077
2077
|
});
|
|
2078
2078
|
} else if (close) {
|
|
2079
|
-
if (styles
|
|
2080
|
-
chunks.push(buildStyle(chalk
|
|
2079
|
+
if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
|
|
2080
|
+
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
2081
2081
|
chunk = [];
|
|
2082
|
-
styles
|
|
2082
|
+
styles.pop();
|
|
2083
2083
|
} else chunk.push(character);
|
|
2084
2084
|
});
|
|
2085
2085
|
chunks.push(chunk.join(""));
|
|
2086
|
-
if (styles
|
|
2087
|
-
const errMessage = `Chalk template literal is missing ${styles
|
|
2086
|
+
if (styles.length > 0) {
|
|
2087
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
2088
2088
|
throw new Error(errMessage);
|
|
2089
2089
|
}
|
|
2090
2090
|
return chunks.join("");
|
|
@@ -2116,16 +2116,16 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2116
2116
|
}
|
|
2117
2117
|
};
|
|
2118
2118
|
const chalkFactory = (options) => {
|
|
2119
|
-
const chalk
|
|
2120
|
-
applyOptions(chalk
|
|
2121
|
-
chalk
|
|
2122
|
-
Object.setPrototypeOf(chalk
|
|
2123
|
-
Object.setPrototypeOf(chalk
|
|
2124
|
-
chalk
|
|
2119
|
+
const chalk = {};
|
|
2120
|
+
applyOptions(chalk, options);
|
|
2121
|
+
chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
|
|
2122
|
+
Object.setPrototypeOf(chalk, Chalk.prototype);
|
|
2123
|
+
Object.setPrototypeOf(chalk.template, chalk);
|
|
2124
|
+
chalk.template.constructor = () => {
|
|
2125
2125
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
2126
2126
|
};
|
|
2127
|
-
chalk
|
|
2128
|
-
return chalk
|
|
2127
|
+
chalk.template.Instance = ChalkClass;
|
|
2128
|
+
return chalk.template;
|
|
2129
2129
|
};
|
|
2130
2130
|
function Chalk(options) {
|
|
2131
2131
|
return chalkFactory(options);
|
|
@@ -2222,25 +2222,25 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2222
2222
|
return openAll + string + closeAll;
|
|
2223
2223
|
};
|
|
2224
2224
|
let template;
|
|
2225
|
-
const chalkTag = (chalk
|
|
2225
|
+
const chalkTag = (chalk, ...strings) => {
|
|
2226
2226
|
const [firstString] = strings;
|
|
2227
2227
|
if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
|
|
2228
2228
|
const arguments_ = strings.slice(1);
|
|
2229
2229
|
const parts = [firstString.raw[0]];
|
|
2230
2230
|
for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
|
|
2231
2231
|
if (template === void 0) template = require_templates();
|
|
2232
|
-
return template(chalk
|
|
2232
|
+
return template(chalk, parts.join(""));
|
|
2233
2233
|
};
|
|
2234
2234
|
Object.defineProperties(Chalk.prototype, styles);
|
|
2235
|
-
const chalk
|
|
2236
|
-
chalk
|
|
2237
|
-
chalk
|
|
2238
|
-
chalk
|
|
2239
|
-
module.exports = chalk
|
|
2235
|
+
const chalk = Chalk();
|
|
2236
|
+
chalk.supportsColor = stdoutColor;
|
|
2237
|
+
chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
2238
|
+
chalk.stderr.supportsColor = stderrColor;
|
|
2239
|
+
module.exports = chalk;
|
|
2240
2240
|
}));
|
|
2241
2241
|
|
|
2242
2242
|
//#endregion
|
|
2243
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2243
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-HVVJHTFS.js
|
|
2244
2244
|
var import_source = /* @__PURE__ */ __toESM(require_source(), 1);
|
|
2245
2245
|
var chalkDefault = {
|
|
2246
2246
|
hex: (_) => (message) => message,
|
|
@@ -2272,14 +2272,14 @@ var getChalk = () => {
|
|
|
2272
2272
|
};
|
|
2273
2273
|
|
|
2274
2274
|
//#endregion
|
|
2275
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2275
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-G2MK47WL.js
|
|
2276
2276
|
function isUnicodeSupported() {
|
|
2277
2277
|
if (process.platform !== "win32") return process.env.TERM !== "linux";
|
|
2278
2278
|
return Boolean(process.env.WT_SESSION) || Boolean(process.env.TERMINUS_SUBLIME) || process.env.ConEmuTask === "{cmd::Cmder}" || process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERM === "rxvt-unicode" || process.env.TERM === "rxvt-unicode-256color" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
2279
2279
|
}
|
|
2280
2280
|
|
|
2281
2281
|
//#endregion
|
|
2282
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2282
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-RALMUN5C.js
|
|
2283
2283
|
var LogLevel = {
|
|
2284
2284
|
SILENT: 0,
|
|
2285
2285
|
FATAL: 10,
|
|
@@ -2306,7 +2306,7 @@ var LogLevelLabel = {
|
|
|
2306
2306
|
};
|
|
2307
2307
|
|
|
2308
2308
|
//#endregion
|
|
2309
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2309
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-ZFNAUMQS.js
|
|
2310
2310
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
2311
2311
|
var CONSOLE_ICONS = {
|
|
2312
2312
|
[LogLevelLabel.ERROR]: useIcon("✘", "×"),
|
|
@@ -2321,13 +2321,13 @@ var CONSOLE_ICONS = {
|
|
|
2321
2321
|
};
|
|
2322
2322
|
|
|
2323
2323
|
//#endregion
|
|
2324
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2324
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-JZAYHDV3.js
|
|
2325
2325
|
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
2326
2326
|
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
2327
2327
|
};
|
|
2328
2328
|
|
|
2329
2329
|
//#endregion
|
|
2330
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2330
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-SXPH7ILL.js
|
|
2331
2331
|
var getLogLevel = (label) => {
|
|
2332
2332
|
switch (label) {
|
|
2333
2333
|
case "all": return LogLevel.ALL;
|
|
@@ -2344,13 +2344,12 @@ var getLogLevel = (label) => {
|
|
|
2344
2344
|
};
|
|
2345
2345
|
|
|
2346
2346
|
//#endregion
|
|
2347
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2347
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-TOMKPXJE.js
|
|
2348
2348
|
var daysInYear = 365.2425;
|
|
2349
2349
|
-(Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
|
|
2350
2350
|
var secondsInDay = 3600 * 24;
|
|
2351
2351
|
secondsInDay * 7;
|
|
2352
2352
|
secondsInDay * daysInYear / 12 * 3;
|
|
2353
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
2354
2353
|
var formatDistanceLocale = {
|
|
2355
2354
|
lessThanXSeconds: {
|
|
2356
2355
|
one: "less than a second",
|
|
@@ -2922,19 +2921,19 @@ var writeInfo = (message, config) => getLogFn(LogLevel.INFO, config)(message);
|
|
|
2922
2921
|
var writeSuccess = (message, config) => getLogFn(LogLevel.SUCCESS, config)(message);
|
|
2923
2922
|
var writeTrace = (message, config) => getLogFn(LogLevel.TRACE, config)(message);
|
|
2924
2923
|
var MAX_DEPTH$1 = 6;
|
|
2925
|
-
var formatLogMessage = (message, options = {}, depth
|
|
2926
|
-
if (depth
|
|
2924
|
+
var formatLogMessage = (message, options = {}, depth = 0) => {
|
|
2925
|
+
if (depth > MAX_DEPTH$1) return "<max depth>";
|
|
2927
2926
|
const prefix = options.prefix ?? "-";
|
|
2928
2927
|
const skip = options.skip ?? [];
|
|
2929
2928
|
return typeof message === "undefined" || message === null || !message && typeof message !== "boolean" ? "<none>" : typeof message === "string" ? message : Array.isArray(message) ? `
|
|
2930
2929
|
${message.map((item, index) => ` ${prefix}> #${index} = ${formatLogMessage(item, {
|
|
2931
2930
|
prefix: `${prefix}-`,
|
|
2932
2931
|
skip
|
|
2933
|
-
}, depth
|
|
2932
|
+
}, depth + 1)}`).join("\n")}` : typeof message === "object" ? `
|
|
2934
2933
|
${Object.keys(message).filter((key) => !skip.includes(key)).map((key) => ` ${prefix}> ${key} = ${_isFunction(message[key]) ? "<function>" : typeof message[key] === "object" ? formatLogMessage(message[key], {
|
|
2935
2934
|
prefix: `${prefix}-`,
|
|
2936
2935
|
skip
|
|
2937
|
-
}, depth
|
|
2936
|
+
}, depth + 1) : message[key]}`).join("\n")}` : message;
|
|
2938
2937
|
};
|
|
2939
2938
|
var _isFunction = (value) => {
|
|
2940
2939
|
try {
|
|
@@ -2946,7 +2945,7 @@ var _isFunction = (value) => {
|
|
|
2946
2945
|
var brandIcon = (config = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config))("🗲");
|
|
2947
2946
|
|
|
2948
2947
|
//#endregion
|
|
2949
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2948
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-PN7H7GUE.js
|
|
2950
2949
|
var exitWithError = (config) => {
|
|
2951
2950
|
writeFatal("Exiting script with an error status...", config);
|
|
2952
2951
|
process.exit(1);
|
|
@@ -2981,7 +2980,7 @@ Stacktrace: ${error.stack}`, config);
|
|
|
2981
2980
|
};
|
|
2982
2981
|
|
|
2983
2982
|
//#endregion
|
|
2984
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2983
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-RUKM6FCF.js
|
|
2985
2984
|
var MAX_PATH_SEARCH_DEPTH = 30;
|
|
2986
2985
|
var depth = 0;
|
|
2987
2986
|
function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
@@ -2992,7 +2991,7 @@ function findFolderUp(startPath, endFileNames = [], endDirectoryNames = []) {
|
|
|
2992
2991
|
}
|
|
2993
2992
|
|
|
2994
2993
|
//#endregion
|
|
2995
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
2994
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-V3GMJ4TX.js
|
|
2996
2995
|
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
2997
2996
|
function normalizeWindowsPath(input = "") {
|
|
2998
2997
|
if (!input) return input;
|
|
@@ -3001,33 +3000,33 @@ function normalizeWindowsPath(input = "") {
|
|
|
3001
3000
|
var _UNC_REGEX = /^[/\\]{2}/;
|
|
3002
3001
|
var _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
3003
3002
|
var _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
3004
|
-
var correctPaths = function(path
|
|
3005
|
-
if (!path
|
|
3006
|
-
path
|
|
3007
|
-
const isUNCPath = path
|
|
3008
|
-
const isPathAbsolute = isAbsolute(path
|
|
3009
|
-
const trailingSeparator = path
|
|
3010
|
-
path
|
|
3011
|
-
if (path
|
|
3003
|
+
var correctPaths = function(path) {
|
|
3004
|
+
if (!path || path.length === 0) return ".";
|
|
3005
|
+
path = normalizeWindowsPath(path);
|
|
3006
|
+
const isUNCPath = path?.match(_UNC_REGEX);
|
|
3007
|
+
const isPathAbsolute = isAbsolute(path);
|
|
3008
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
3009
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
3010
|
+
if (path.length === 0) {
|
|
3012
3011
|
if (isPathAbsolute) return "/";
|
|
3013
3012
|
return trailingSeparator ? "./" : ".";
|
|
3014
3013
|
}
|
|
3015
|
-
if (trailingSeparator) path
|
|
3016
|
-
if (_DRIVE_LETTER_RE.test(path
|
|
3014
|
+
if (trailingSeparator) path += "/";
|
|
3015
|
+
if (_DRIVE_LETTER_RE.test(path)) path += "/";
|
|
3017
3016
|
if (isUNCPath) {
|
|
3018
|
-
if (!isPathAbsolute) return `//./${path
|
|
3019
|
-
return `//${path
|
|
3017
|
+
if (!isPathAbsolute) return `//./${path}`;
|
|
3018
|
+
return `//${path}`;
|
|
3020
3019
|
}
|
|
3021
|
-
return isPathAbsolute && !isAbsolute(path
|
|
3020
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
3022
3021
|
};
|
|
3023
|
-
function normalizeString(path
|
|
3022
|
+
function normalizeString(path, allowAboveRoot) {
|
|
3024
3023
|
let res = "";
|
|
3025
3024
|
let lastSegmentLength = 0;
|
|
3026
3025
|
let lastSlash = -1;
|
|
3027
3026
|
let dots = 0;
|
|
3028
3027
|
let char = null;
|
|
3029
|
-
for (let index = 0; index <= path
|
|
3030
|
-
if (index < path
|
|
3028
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
3029
|
+
if (index < path.length) char = path[index];
|
|
3031
3030
|
else if (char === "/") break;
|
|
3032
3031
|
else char = "/";
|
|
3033
3032
|
if (char === "/") {
|
|
@@ -3058,8 +3057,8 @@ function normalizeString(path$1, allowAboveRoot) {
|
|
|
3058
3057
|
lastSegmentLength = 2;
|
|
3059
3058
|
}
|
|
3060
3059
|
} else {
|
|
3061
|
-
if (res.length > 0) res += `/${path
|
|
3062
|
-
else res = path
|
|
3060
|
+
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
3061
|
+
else res = path.slice(lastSlash + 1, index);
|
|
3063
3062
|
lastSegmentLength = index - lastSlash - 1;
|
|
3064
3063
|
}
|
|
3065
3064
|
lastSlash = index;
|
|
@@ -3074,7 +3073,7 @@ var isAbsolute = function(p) {
|
|
|
3074
3073
|
};
|
|
3075
3074
|
|
|
3076
3075
|
//#endregion
|
|
3077
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.
|
|
3076
|
+
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.190.1_zod@4.4.3/node_modules/@storm-software/config-tools/dist/chunk-LF3SAK2O.js
|
|
3078
3077
|
var rootFiles = [
|
|
3079
3078
|
"storm-workspace.json",
|
|
3080
3079
|
"storm-workspace.yaml",
|
|
@@ -3128,7 +3127,7 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3128
3127
|
/**
|
|
3129
3128
|
* CommanderError class
|
|
3130
3129
|
*/
|
|
3131
|
-
var CommanderError
|
|
3130
|
+
var CommanderError = class extends Error {
|
|
3132
3131
|
/**
|
|
3133
3132
|
* Constructs the CommanderError class
|
|
3134
3133
|
* @param {number} exitCode suggested exit code which could be used with process.exit
|
|
@@ -3147,7 +3146,7 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3147
3146
|
/**
|
|
3148
3147
|
* InvalidArgumentError class
|
|
3149
3148
|
*/
|
|
3150
|
-
var InvalidArgumentError
|
|
3149
|
+
var InvalidArgumentError = class extends CommanderError {
|
|
3151
3150
|
/**
|
|
3152
3151
|
* Constructs the InvalidArgumentError class
|
|
3153
3152
|
* @param {string} [message] explanation of why argument is invalid
|
|
@@ -3158,15 +3157,15 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3158
3157
|
this.name = this.constructor.name;
|
|
3159
3158
|
}
|
|
3160
3159
|
};
|
|
3161
|
-
exports.CommanderError = CommanderError
|
|
3162
|
-
exports.InvalidArgumentError = InvalidArgumentError
|
|
3160
|
+
exports.CommanderError = CommanderError;
|
|
3161
|
+
exports.InvalidArgumentError = InvalidArgumentError;
|
|
3163
3162
|
}));
|
|
3164
3163
|
|
|
3165
3164
|
//#endregion
|
|
3166
3165
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/argument.js
|
|
3167
3166
|
var require_argument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3168
|
-
const { InvalidArgumentError
|
|
3169
|
-
var Argument
|
|
3167
|
+
const { InvalidArgumentError } = require_error();
|
|
3168
|
+
var Argument = class {
|
|
3170
3169
|
/**
|
|
3171
3170
|
* Initialize a new command argument with the given name and description.
|
|
3172
3171
|
* The default is that the argument is required, and you can explicitly
|
|
@@ -3248,7 +3247,7 @@ var require_argument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3248
3247
|
choices(values) {
|
|
3249
3248
|
this.argChoices = values.slice();
|
|
3250
3249
|
this.parseArg = (arg, previous) => {
|
|
3251
|
-
if (!this.argChoices.includes(arg)) throw new InvalidArgumentError
|
|
3250
|
+
if (!this.argChoices.includes(arg)) throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
3252
3251
|
if (this.variadic) return this._collectValue(arg, previous);
|
|
3253
3252
|
return arg;
|
|
3254
3253
|
};
|
|
@@ -3280,18 +3279,18 @@ var require_argument = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3280
3279
|
* @return {string}
|
|
3281
3280
|
* @private
|
|
3282
3281
|
*/
|
|
3283
|
-
function humanReadableArgName
|
|
3282
|
+
function humanReadableArgName(arg) {
|
|
3284
3283
|
const nameOutput = arg.name() + (arg.variadic === true ? "..." : "");
|
|
3285
3284
|
return arg.required ? "<" + nameOutput + ">" : "[" + nameOutput + "]";
|
|
3286
3285
|
}
|
|
3287
|
-
exports.Argument = Argument
|
|
3288
|
-
exports.humanReadableArgName = humanReadableArgName
|
|
3286
|
+
exports.Argument = Argument;
|
|
3287
|
+
exports.humanReadableArgName = humanReadableArgName;
|
|
3289
3288
|
}));
|
|
3290
3289
|
|
|
3291
3290
|
//#endregion
|
|
3292
3291
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/help.js
|
|
3293
3292
|
var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3294
|
-
const { humanReadableArgName
|
|
3293
|
+
const { humanReadableArgName } = require_argument();
|
|
3295
3294
|
/**
|
|
3296
3295
|
* TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`
|
|
3297
3296
|
* https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types
|
|
@@ -3299,7 +3298,7 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3299
3298
|
* @typedef { import("./command.js").Command } Command
|
|
3300
3299
|
* @typedef { import("./option.js").Option } Option
|
|
3301
3300
|
*/
|
|
3302
|
-
var Help
|
|
3301
|
+
var Help = class {
|
|
3303
3302
|
constructor() {
|
|
3304
3303
|
this.helpWidth = void 0;
|
|
3305
3304
|
this.minWidthToWrap = 40;
|
|
@@ -3325,7 +3324,7 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3325
3324
|
* @returns {Command[]}
|
|
3326
3325
|
*/
|
|
3327
3326
|
visibleCommands(cmd) {
|
|
3328
|
-
const visibleCommands = cmd.commands.filter((cmd
|
|
3327
|
+
const visibleCommands = cmd.commands.filter((cmd) => !cmd._hidden);
|
|
3329
3328
|
const helpCommand = cmd._getHelpCommand();
|
|
3330
3329
|
if (helpCommand && !helpCommand._hidden) visibleCommands.push(helpCommand);
|
|
3331
3330
|
if (this.sortSubcommands) visibleCommands.sort((a, b) => {
|
|
@@ -3401,7 +3400,7 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3401
3400
|
* @returns {string}
|
|
3402
3401
|
*/
|
|
3403
3402
|
subcommandTerm(cmd) {
|
|
3404
|
-
const args = cmd.registeredArguments.map((arg) => humanReadableArgName
|
|
3403
|
+
const args = cmd.registeredArguments.map((arg) => humanReadableArgName(arg)).join(" ");
|
|
3405
3404
|
return cmd._name + (cmd._aliases[0] ? "|" + cmd._aliases[0] : "") + (cmd.options.length ? " [options]" : "") + (args ? " " + args : "");
|
|
3406
3405
|
}
|
|
3407
3406
|
/**
|
|
@@ -3624,7 +3623,7 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3624
3623
|
* @returns {number}
|
|
3625
3624
|
*/
|
|
3626
3625
|
displayWidth(str) {
|
|
3627
|
-
return stripColor
|
|
3626
|
+
return stripColor(str).length;
|
|
3628
3627
|
}
|
|
3629
3628
|
/**
|
|
3630
3629
|
* Style the title for displaying in the help. Called with 'Usage:', 'Options:', etc.
|
|
@@ -3772,18 +3771,18 @@ var require_help = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3772
3771
|
* @returns {string}
|
|
3773
3772
|
* @package
|
|
3774
3773
|
*/
|
|
3775
|
-
function stripColor
|
|
3774
|
+
function stripColor(str) {
|
|
3776
3775
|
return str.replace(/\x1b\[\d*(;\d*)*m/g, "");
|
|
3777
3776
|
}
|
|
3778
|
-
exports.Help = Help
|
|
3779
|
-
exports.stripColor = stripColor
|
|
3777
|
+
exports.Help = Help;
|
|
3778
|
+
exports.stripColor = stripColor;
|
|
3780
3779
|
}));
|
|
3781
3780
|
|
|
3782
3781
|
//#endregion
|
|
3783
3782
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/lib/option.js
|
|
3784
3783
|
var require_option = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3785
|
-
const { InvalidArgumentError
|
|
3786
|
-
var Option
|
|
3784
|
+
const { InvalidArgumentError } = require_error();
|
|
3785
|
+
var Option = class {
|
|
3787
3786
|
/**
|
|
3788
3787
|
* Initialize a new `Option` with the given `flags` and `description`.
|
|
3789
3788
|
*
|
|
@@ -3934,7 +3933,7 @@ var require_option = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3934
3933
|
choices(values) {
|
|
3935
3934
|
this.argChoices = values.slice();
|
|
3936
3935
|
this.parseArg = (arg, previous) => {
|
|
3937
|
-
if (!this.argChoices.includes(arg)) throw new InvalidArgumentError
|
|
3936
|
+
if (!this.argChoices.includes(arg)) throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
3938
3937
|
if (this.variadic) return this._collectValue(arg, previous);
|
|
3939
3938
|
return arg;
|
|
3940
3939
|
};
|
|
@@ -3998,7 +3997,7 @@ var require_option = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3998
3997
|
* use cases, but is tricky for others where we want separate behaviours despite
|
|
3999
3998
|
* the single shared option value.
|
|
4000
3999
|
*/
|
|
4001
|
-
var DualOptions
|
|
4000
|
+
var DualOptions = class {
|
|
4002
4001
|
/**
|
|
4003
4002
|
* @param {Option[]} options
|
|
4004
4003
|
*/
|
|
@@ -4037,8 +4036,8 @@ var require_option = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4037
4036
|
* @private
|
|
4038
4037
|
*/
|
|
4039
4038
|
function camelcase(str) {
|
|
4040
|
-
return str.split("-").reduce((str
|
|
4041
|
-
return str
|
|
4039
|
+
return str.split("-").reduce((str, word) => {
|
|
4040
|
+
return str + word[0].toUpperCase() + word.slice(1);
|
|
4042
4041
|
});
|
|
4043
4042
|
}
|
|
4044
4043
|
/**
|
|
@@ -4079,8 +4078,8 @@ var require_option = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4079
4078
|
longFlag
|
|
4080
4079
|
};
|
|
4081
4080
|
}
|
|
4082
|
-
exports.Option = Option
|
|
4083
|
-
exports.DualOptions = DualOptions
|
|
4081
|
+
exports.Option = Option;
|
|
4082
|
+
exports.DualOptions = DualOptions;
|
|
4084
4083
|
}));
|
|
4085
4084
|
|
|
4086
4085
|
//#endregion
|
|
@@ -4108,7 +4107,7 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4108
4107
|
* @param {string[]} candidates
|
|
4109
4108
|
* @returns {string}
|
|
4110
4109
|
*/
|
|
4111
|
-
function suggestSimilar
|
|
4110
|
+
function suggestSimilar(word, candidates) {
|
|
4112
4111
|
if (!candidates || candidates.length === 0) return "";
|
|
4113
4112
|
candidates = Array.from(new Set(candidates));
|
|
4114
4113
|
const searchingOptions = word.startsWith("--");
|
|
@@ -4136,7 +4135,7 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4136
4135
|
if (similar.length === 1) return `\n(Did you mean ${similar[0]}?)`;
|
|
4137
4136
|
return "";
|
|
4138
4137
|
}
|
|
4139
|
-
exports.suggestSimilar = suggestSimilar
|
|
4138
|
+
exports.suggestSimilar = suggestSimilar;
|
|
4140
4139
|
}));
|
|
4141
4140
|
|
|
4142
4141
|
//#endregion
|
|
@@ -4147,12 +4146,12 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4147
4146
|
const path = __require("node:path");
|
|
4148
4147
|
const fs = __require("node:fs");
|
|
4149
4148
|
const process$1 = __require("node:process");
|
|
4150
|
-
const { Argument
|
|
4151
|
-
const { CommanderError
|
|
4152
|
-
const { Help
|
|
4153
|
-
const { Option
|
|
4149
|
+
const { Argument, humanReadableArgName } = require_argument();
|
|
4150
|
+
const { CommanderError } = require_error();
|
|
4151
|
+
const { Help, stripColor } = require_help();
|
|
4152
|
+
const { Option, DualOptions } = require_option();
|
|
4154
4153
|
const { suggestSimilar } = require_suggestSimilar();
|
|
4155
|
-
var Command
|
|
4154
|
+
var Command = class Command extends EventEmitter {
|
|
4156
4155
|
/**
|
|
4157
4156
|
* Initialize a new `Command`.
|
|
4158
4157
|
*
|
|
@@ -4310,7 +4309,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4310
4309
|
* @return {Command} new command
|
|
4311
4310
|
*/
|
|
4312
4311
|
createCommand(name) {
|
|
4313
|
-
return new Command
|
|
4312
|
+
return new Command(name);
|
|
4314
4313
|
}
|
|
4315
4314
|
/**
|
|
4316
4315
|
* You can customise the help with a subclass of Help by overriding createHelp,
|
|
@@ -4319,7 +4318,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4319
4318
|
* @return {Help}
|
|
4320
4319
|
*/
|
|
4321
4320
|
createHelp() {
|
|
4322
|
-
return Object.assign(new Help
|
|
4321
|
+
return Object.assign(new Help(), this.configureHelp());
|
|
4323
4322
|
}
|
|
4324
4323
|
/**
|
|
4325
4324
|
* You can customise the help by overriding Help properties using configureHelp(),
|
|
@@ -4415,7 +4414,7 @@ var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4415
4414
|
* @return {Argument} new argument
|
|
4416
4415
|
*/
|
|
4417
4416
|
createArgument(name, description) {
|
|
4418
|
-
return new Argument
|
|
4417
|
+
return new Argument(name, description);
|
|
4419
4418
|
}
|
|
4420
4419
|
/**
|
|
4421
4420
|
* Define argument syntax for command.
|
|
@@ -4572,7 +4571,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
4572
4571
|
* @private
|
|
4573
4572
|
*/
|
|
4574
4573
|
_exit(exitCode, code, message) {
|
|
4575
|
-
if (this._exitCallback) this._exitCallback(new CommanderError
|
|
4574
|
+
if (this._exitCallback) this._exitCallback(new CommanderError(exitCode, code, message));
|
|
4576
4575
|
process$1.exit(exitCode);
|
|
4577
4576
|
}
|
|
4578
4577
|
/**
|
|
@@ -4612,7 +4611,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
4612
4611
|
* @return {Option} new option
|
|
4613
4612
|
*/
|
|
4614
4613
|
createOption(flags, description) {
|
|
4615
|
-
return new Option
|
|
4614
|
+
return new Option(flags, description);
|
|
4616
4615
|
}
|
|
4617
4616
|
/**
|
|
4618
4617
|
* Wrap parseArgs to catch 'commander.invalidArgument'.
|
|
@@ -4713,7 +4712,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
4713
4712
|
* @private
|
|
4714
4713
|
*/
|
|
4715
4714
|
_optionEx(config, flags, description, fn, defaultValue) {
|
|
4716
|
-
if (typeof flags === "object" && flags instanceof Option
|
|
4715
|
+
if (typeof flags === "object" && flags instanceof Option) throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");
|
|
4717
4716
|
const option = this.createOption(flags, description);
|
|
4718
4717
|
option.makeOptionMandatory(!!config.mandatory);
|
|
4719
4718
|
if (typeof fn === "function") option.default(defaultValue).argParser(fn);
|
|
@@ -5119,14 +5118,14 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
5119
5118
|
proc.on("close", (code) => {
|
|
5120
5119
|
code = code ?? 1;
|
|
5121
5120
|
if (!exitCallback) process$1.exit(code);
|
|
5122
|
-
else exitCallback(new CommanderError
|
|
5121
|
+
else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
5123
5122
|
});
|
|
5124
5123
|
proc.on("error", (err) => {
|
|
5125
5124
|
if (err.code === "ENOENT") this._checkForMissingExecutable(executableFile, executableDir, subcommand._name);
|
|
5126
5125
|
else if (err.code === "EACCES") throw new Error(`'${executableFile}' not executable`);
|
|
5127
5126
|
if (!exitCallback) process$1.exit(1);
|
|
5128
5127
|
else {
|
|
5129
|
-
const wrappedError = new CommanderError
|
|
5128
|
+
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
5130
5129
|
wrappedError.nestedError = err;
|
|
5131
5130
|
exitCallback(wrappedError);
|
|
5132
5131
|
}
|
|
@@ -5601,16 +5600,16 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
5601
5600
|
* @private
|
|
5602
5601
|
*/
|
|
5603
5602
|
_conflictingOption(option, conflictingOption) {
|
|
5604
|
-
const findBestOptionFromValue = (option
|
|
5605
|
-
const optionKey = option
|
|
5603
|
+
const findBestOptionFromValue = (option) => {
|
|
5604
|
+
const optionKey = option.attributeName();
|
|
5606
5605
|
const optionValue = this.getOptionValue(optionKey);
|
|
5607
5606
|
const negativeOption = this.options.find((target) => target.negate && optionKey === target.attributeName());
|
|
5608
5607
|
const positiveOption = this.options.find((target) => !target.negate && optionKey === target.attributeName());
|
|
5609
5608
|
if (negativeOption && (negativeOption.presetArg === void 0 && optionValue === false || negativeOption.presetArg !== void 0 && optionValue === negativeOption.presetArg)) return negativeOption;
|
|
5610
|
-
return positiveOption || option
|
|
5609
|
+
return positiveOption || option;
|
|
5611
5610
|
};
|
|
5612
|
-
const getErrorMessage = (option
|
|
5613
|
-
const bestOption = findBestOptionFromValue(option
|
|
5611
|
+
const getErrorMessage = (option) => {
|
|
5612
|
+
const bestOption = findBestOptionFromValue(option);
|
|
5614
5613
|
const optionKey = bestOption.attributeName();
|
|
5615
5614
|
if (this.getOptionValueSource(optionKey) === "env") return `environment variable '${bestOption.envVar}'`;
|
|
5616
5615
|
return `option '${bestOption.flags}'`;
|
|
@@ -5873,9 +5872,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
5873
5872
|
* @param {string} [path]
|
|
5874
5873
|
* @return {(string|null|Command)}
|
|
5875
5874
|
*/
|
|
5876
|
-
executableDir(path
|
|
5877
|
-
if (path
|
|
5878
|
-
this._executableDir = path
|
|
5875
|
+
executableDir(path) {
|
|
5876
|
+
if (path === void 0) return this._executableDir;
|
|
5877
|
+
this._executableDir = path;
|
|
5879
5878
|
return this;
|
|
5880
5879
|
}
|
|
5881
5880
|
/**
|
|
@@ -6114,32 +6113,32 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
6114
6113
|
if (process$1.env.NO_COLOR || process$1.env.FORCE_COLOR === "0" || process$1.env.FORCE_COLOR === "false") return false;
|
|
6115
6114
|
if (process$1.env.FORCE_COLOR || process$1.env.CLICOLOR_FORCE !== void 0) return true;
|
|
6116
6115
|
}
|
|
6117
|
-
exports.Command = Command
|
|
6116
|
+
exports.Command = Command;
|
|
6118
6117
|
exports.useColor = useColor;
|
|
6119
6118
|
}));
|
|
6120
6119
|
|
|
6121
6120
|
//#endregion
|
|
6122
6121
|
//#region ../../node_modules/.pnpm/commander@14.0.3/node_modules/commander/index.js
|
|
6123
6122
|
var require_commander = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
6124
|
-
const { Argument
|
|
6125
|
-
const { Command
|
|
6126
|
-
const { CommanderError
|
|
6127
|
-
const { Help
|
|
6128
|
-
const { Option
|
|
6129
|
-
exports.program = new Command
|
|
6130
|
-
exports.createCommand = (name) => new Command
|
|
6131
|
-
exports.createOption = (flags, description) => new Option
|
|
6132
|
-
exports.createArgument = (name, description) => new Argument
|
|
6123
|
+
const { Argument } = require_argument();
|
|
6124
|
+
const { Command } = require_command();
|
|
6125
|
+
const { CommanderError, InvalidArgumentError } = require_error();
|
|
6126
|
+
const { Help } = require_help();
|
|
6127
|
+
const { Option } = require_option();
|
|
6128
|
+
exports.program = new Command();
|
|
6129
|
+
exports.createCommand = (name) => new Command(name);
|
|
6130
|
+
exports.createOption = (flags, description) => new Option(flags, description);
|
|
6131
|
+
exports.createArgument = (name, description) => new Argument(name, description);
|
|
6133
6132
|
/**
|
|
6134
6133
|
* Expose classes
|
|
6135
6134
|
*/
|
|
6136
|
-
exports.Command = Command
|
|
6137
|
-
exports.Option = Option
|
|
6138
|
-
exports.Argument = Argument
|
|
6139
|
-
exports.Help = Help
|
|
6140
|
-
exports.CommanderError = CommanderError
|
|
6141
|
-
exports.InvalidArgumentError = InvalidArgumentError
|
|
6142
|
-
exports.InvalidOptionArgumentError = InvalidArgumentError
|
|
6135
|
+
exports.Command = Command;
|
|
6136
|
+
exports.Option = Option;
|
|
6137
|
+
exports.Argument = Argument;
|
|
6138
|
+
exports.Help = Help;
|
|
6139
|
+
exports.CommanderError = CommanderError;
|
|
6140
|
+
exports.InvalidArgumentError = InvalidArgumentError;
|
|
6141
|
+
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
6143
6142
|
}));
|
|
6144
6143
|
|
|
6145
6144
|
//#endregion
|
|
@@ -6170,7 +6169,6 @@ const MAX_INT32 = 2147483647;
|
|
|
6170
6169
|
const MAX_UINT32 = 4294967295;
|
|
6171
6170
|
const MIN_SINGLE_SEGMENT_GROWTH = 4096;
|
|
6172
6171
|
const NATIVE_LITTLE_ENDIAN = tmpWord.getUint8(0) === 2;
|
|
6173
|
-
const PACK_SPAN_THRESHOLD = 2;
|
|
6174
6172
|
const POINTER_DOUBLE_FAR_MASK = 4;
|
|
6175
6173
|
const POINTER_TYPE_MASK = 3;
|
|
6176
6174
|
const MAX_DEPTH = MAX_INT32;
|
|
@@ -6393,6 +6391,7 @@ var Orphan = class {
|
|
|
6393
6391
|
case PointerType.OTHER:
|
|
6394
6392
|
setInterfacePointer(this._capnp.capId, res.pointer);
|
|
6395
6393
|
break;
|
|
6394
|
+
/* istanbul ignore next */
|
|
6396
6395
|
default: throw new Error(PTR_INVALID_POINTER_TYPE);
|
|
6397
6396
|
}
|
|
6398
6397
|
this._capnp = void 0;
|
|
@@ -6433,22 +6432,28 @@ function getListByteLength(elementSize, length, compositeSize) {
|
|
|
6433
6432
|
case ListElementSize.BYTE_8:
|
|
6434
6433
|
case ListElementSize.POINTER:
|
|
6435
6434
|
case ListElementSize.VOID: return padToWord$1(getListElementByteLength(elementSize) * length);
|
|
6435
|
+
/* istanbul ignore next */
|
|
6436
6436
|
case ListElementSize.COMPOSITE:
|
|
6437
6437
|
if (compositeSize === void 0) throw new Error(format(PTR_INVALID_LIST_SIZE, NaN));
|
|
6438
6438
|
return length * padToWord$1(getByteLength(compositeSize));
|
|
6439
|
+
/* istanbul ignore next */
|
|
6439
6440
|
default: throw new Error(PTR_INVALID_LIST_SIZE);
|
|
6440
6441
|
}
|
|
6441
6442
|
}
|
|
6442
6443
|
function getListElementByteLength(elementSize) {
|
|
6443
6444
|
switch (elementSize) {
|
|
6445
|
+
/* istanbul ignore next */
|
|
6444
6446
|
case ListElementSize.BIT: return NaN;
|
|
6445
6447
|
case ListElementSize.BYTE: return 1;
|
|
6446
6448
|
case ListElementSize.BYTE_2: return 2;
|
|
6447
6449
|
case ListElementSize.BYTE_4: return 4;
|
|
6448
6450
|
case ListElementSize.BYTE_8:
|
|
6449
6451
|
case ListElementSize.POINTER: return 8;
|
|
6452
|
+
/* istanbul ignore next */
|
|
6450
6453
|
case ListElementSize.COMPOSITE: return NaN;
|
|
6454
|
+
/* istanbul ignore next */
|
|
6451
6455
|
case ListElementSize.VOID: return 0;
|
|
6456
|
+
/* istanbul ignore next */
|
|
6452
6457
|
default: throw new Error(format(PTR_INVALID_LIST_SIZE, elementSize));
|
|
6453
6458
|
}
|
|
6454
6459
|
}
|
|
@@ -6469,6 +6474,7 @@ function copyFrom(src, p) {
|
|
|
6469
6474
|
case PointerType.OTHER:
|
|
6470
6475
|
copyFromInterface(src, p);
|
|
6471
6476
|
break;
|
|
6477
|
+
/* istanbul ignore next */
|
|
6472
6478
|
default: throw new Error(format(PTR_INVALID_POINTER_TYPE, getTargetPointerType(p)));
|
|
6473
6479
|
}
|
|
6474
6480
|
}
|
|
@@ -6914,8 +6920,8 @@ var List = class List extends Pointer {
|
|
|
6914
6920
|
entries() {
|
|
6915
6921
|
return this.toArray().entries();
|
|
6916
6922
|
}
|
|
6917
|
-
flat(depth
|
|
6918
|
-
return this.toArray().flat(depth
|
|
6923
|
+
flat(depth) {
|
|
6924
|
+
return this.toArray().flat(depth);
|
|
6919
6925
|
}
|
|
6920
6926
|
with(index, value) {
|
|
6921
6927
|
return this.toArray().with(index, value);
|
|
@@ -7377,8 +7383,8 @@ function getStruct(index, StructClass, s, defaultValue) {
|
|
|
7377
7383
|
else initStruct(StructClass._capnp.size, t);
|
|
7378
7384
|
else {
|
|
7379
7385
|
validate(PointerType.STRUCT, t);
|
|
7380
|
-
const ts
|
|
7381
|
-
if (ts
|
|
7386
|
+
const ts = getTargetStructSize(t);
|
|
7387
|
+
if (ts.dataByteLength < StructClass._capnp.size.dataByteLength || ts.pointerLength < StructClass._capnp.size.pointerLength) resize(StructClass._capnp.size, t);
|
|
7382
7388
|
}
|
|
7383
7389
|
return t;
|
|
7384
7390
|
}
|
|
@@ -8082,10 +8088,38 @@ var Node_Annotation = class extends Struct {
|
|
|
8082
8088
|
};
|
|
8083
8089
|
const Node_Which = {
|
|
8084
8090
|
FILE: 0,
|
|
8091
|
+
/**
|
|
8092
|
+
* Name to present to humans to identify this Node. You should not attempt to parse this. Its
|
|
8093
|
+
* format could change. It is not guaranteed to be unique.
|
|
8094
|
+
*
|
|
8095
|
+
* (On Zooko's triangle, this is the node's nickname.)
|
|
8096
|
+
*
|
|
8097
|
+
*/
|
|
8085
8098
|
STRUCT: 1,
|
|
8099
|
+
/**
|
|
8100
|
+
* If you want a shorter version of `displayName` (just naming this node, without its surrounding
|
|
8101
|
+
* scope), chop off this many characters from the beginning of `displayName`.
|
|
8102
|
+
*
|
|
8103
|
+
*/
|
|
8086
8104
|
ENUM: 2,
|
|
8105
|
+
/**
|
|
8106
|
+
* ID of the lexical parent node. Typically, the scope node will have a NestedNode pointing back
|
|
8107
|
+
* at this node, but robust code should avoid relying on this (and, in fact, group nodes are not
|
|
8108
|
+
* listed in the outer struct's nestedNodes, since they are listed in the fields). `scopeId` is
|
|
8109
|
+
* zero if the node has no parent, which is normally only the case with files, but should be
|
|
8110
|
+
* allowed for any kind of node (in order to make runtime type generation easier).
|
|
8111
|
+
*
|
|
8112
|
+
*/
|
|
8087
8113
|
INTERFACE: 3,
|
|
8114
|
+
/**
|
|
8115
|
+
* List of nodes nested within this node, along with the names under which they were declared.
|
|
8116
|
+
*
|
|
8117
|
+
*/
|
|
8088
8118
|
CONST: 4,
|
|
8119
|
+
/**
|
|
8120
|
+
* Annotations applied to this node.
|
|
8121
|
+
*
|
|
8122
|
+
*/
|
|
8089
8123
|
ANNOTATION: 5
|
|
8090
8124
|
};
|
|
8091
8125
|
var Node = class Node extends Struct {
|
|
@@ -8403,6 +8437,13 @@ var Field_Group = class extends Struct {
|
|
|
8403
8437
|
};
|
|
8404
8438
|
const Field_Ordinal_Which = {
|
|
8405
8439
|
IMPLICIT: 0,
|
|
8440
|
+
/**
|
|
8441
|
+
* The original ordinal number given to the field. You probably should NOT use this; if you need
|
|
8442
|
+
* a numeric identifier for a field, use its position within the field array for its scope.
|
|
8443
|
+
* The ordinal is given here mainly just so that the original schema text can be reproduced given
|
|
8444
|
+
* the compiled version -- i.e. so that `capnp compile -ocapnp` can do its job.
|
|
8445
|
+
*
|
|
8446
|
+
*/
|
|
8406
8447
|
EXPLICIT: 1
|
|
8407
8448
|
};
|
|
8408
8449
|
var Field_Ordinal = class extends Struct {
|
|
@@ -8446,6 +8487,15 @@ var Field_Ordinal = class extends Struct {
|
|
|
8446
8487
|
};
|
|
8447
8488
|
const Field_Which = {
|
|
8448
8489
|
SLOT: 0,
|
|
8490
|
+
/**
|
|
8491
|
+
* Indicates where this member appeared in the code, relative to other members.
|
|
8492
|
+
* Code ordering may have semantic relevance -- programmers tend to place related fields
|
|
8493
|
+
* together. So, using code ordering makes sense in human-readable formats where ordering is
|
|
8494
|
+
* otherwise irrelevant, like JSON. The values of codeOrder are tightly-packed, so the maximum
|
|
8495
|
+
* value is count(members) - 1. Fields that are members of a union are only ordered relative to
|
|
8496
|
+
* the other members of that union, so the maximum value there is count(union.members).
|
|
8497
|
+
*
|
|
8498
|
+
*/
|
|
8449
8499
|
GROUP: 1
|
|
8450
8500
|
};
|
|
8451
8501
|
var Field = class Field extends Struct {
|
|
@@ -8909,9 +8959,25 @@ var Type_Interface = class extends Struct {
|
|
|
8909
8959
|
}
|
|
8910
8960
|
};
|
|
8911
8961
|
const Type_AnyPointer_Unconstrained_Which = {
|
|
8962
|
+
/**
|
|
8963
|
+
* truly AnyPointer
|
|
8964
|
+
*
|
|
8965
|
+
*/
|
|
8912
8966
|
ANY_KIND: 0,
|
|
8967
|
+
/**
|
|
8968
|
+
* AnyStruct
|
|
8969
|
+
*
|
|
8970
|
+
*/
|
|
8913
8971
|
STRUCT: 1,
|
|
8972
|
+
/**
|
|
8973
|
+
* AnyList
|
|
8974
|
+
*
|
|
8975
|
+
*/
|
|
8914
8976
|
LIST: 2,
|
|
8977
|
+
/**
|
|
8978
|
+
* Capability
|
|
8979
|
+
*
|
|
8980
|
+
*/
|
|
8915
8981
|
CAPABILITY: 3
|
|
8916
8982
|
};
|
|
8917
8983
|
var Type_AnyPointer_Unconstrained = class extends Struct {
|
|
@@ -9003,8 +9069,25 @@ var Type_AnyPointer_ImplicitMethodParameter = class extends Struct {
|
|
|
9003
9069
|
}
|
|
9004
9070
|
};
|
|
9005
9071
|
const Type_AnyPointer_Which = {
|
|
9072
|
+
/**
|
|
9073
|
+
* A regular AnyPointer.
|
|
9074
|
+
*
|
|
9075
|
+
* The name "unconstrained" means as opposed to constraining it to match a type parameter.
|
|
9076
|
+
* In retrospect this name is probably a poor choice given that it may still be constrained
|
|
9077
|
+
* to be a struct, list, or capability.
|
|
9078
|
+
*
|
|
9079
|
+
*/
|
|
9006
9080
|
UNCONSTRAINED: 0,
|
|
9081
|
+
/**
|
|
9082
|
+
* This is actually a reference to a type parameter defined within this scope.
|
|
9083
|
+
*
|
|
9084
|
+
*/
|
|
9007
9085
|
PARAMETER: 1,
|
|
9086
|
+
/**
|
|
9087
|
+
* This is actually a reference to an implicit (generic) parameter of a method. The only
|
|
9088
|
+
* legal context for this type to appear is inside Method.paramBrand or Method.resultBrand.
|
|
9089
|
+
*
|
|
9090
|
+
*/
|
|
9008
9091
|
IMPLICIT_METHOD_PARAMETER: 2
|
|
9009
9092
|
};
|
|
9010
9093
|
var Type_AnyPointer = class extends Struct {
|
|
@@ -9290,7 +9373,15 @@ var Type = class extends Struct {
|
|
|
9290
9373
|
}
|
|
9291
9374
|
};
|
|
9292
9375
|
const Brand_Scope_Which = {
|
|
9376
|
+
/**
|
|
9377
|
+
* ID of the scope to which these params apply.
|
|
9378
|
+
*
|
|
9379
|
+
*/
|
|
9293
9380
|
BIND: 0,
|
|
9381
|
+
/**
|
|
9382
|
+
* List of parameter bindings.
|
|
9383
|
+
*
|
|
9384
|
+
*/
|
|
9294
9385
|
INHERIT: 1
|
|
9295
9386
|
};
|
|
9296
9387
|
var Brand_Scope = class Brand_Scope extends Struct {
|
|
@@ -9459,6 +9550,11 @@ const Value_Which = {
|
|
|
9459
9550
|
LIST: 14,
|
|
9460
9551
|
ENUM: 15,
|
|
9461
9552
|
STRUCT: 16,
|
|
9553
|
+
/**
|
|
9554
|
+
* The only interface value that can be represented statically is "null", whose methods always
|
|
9555
|
+
* throw exceptions.
|
|
9556
|
+
*
|
|
9557
|
+
*/
|
|
9462
9558
|
INTERFACE: 17,
|
|
9463
9559
|
ANY_POINTER: 18
|
|
9464
9560
|
};
|
|
@@ -9800,6 +9896,10 @@ var Annotation = class extends Struct {
|
|
|
9800
9896
|
}
|
|
9801
9897
|
};
|
|
9802
9898
|
const ElementSize = {
|
|
9899
|
+
/**
|
|
9900
|
+
* aka "void", but that's a keyword.
|
|
9901
|
+
*
|
|
9902
|
+
*/
|
|
9803
9903
|
EMPTY: 0,
|
|
9804
9904
|
BIT: 1,
|
|
9805
9905
|
BYTE: 2,
|
|
@@ -10118,7 +10218,7 @@ var SingleSegmentArena = class {
|
|
|
10118
10218
|
};
|
|
10119
10219
|
function allocate$1(minSize, segments, s) {
|
|
10120
10220
|
const srcBuffer = segments.length > 0 ? segments[0].buffer : s.buffer;
|
|
10121
|
-
minSize = minSize <
|
|
10221
|
+
minSize = minSize < 4096 ? MIN_SINGLE_SEGMENT_GROWTH : padToWord$1(minSize);
|
|
10122
10222
|
s.buffer = new ArrayBuffer(srcBuffer.byteLength + minSize);
|
|
10123
10223
|
new Float64Array(s.buffer).set(new Float64Array(srcBuffer));
|
|
10124
10224
|
return new ArenaAllocationResult(0, s.buffer);
|
|
@@ -10229,7 +10329,7 @@ function pack(unpacked, byteOffset = 0, byteLength) {
|
|
|
10229
10329
|
} else rangeWordCount++;
|
|
10230
10330
|
break;
|
|
10231
10331
|
case 255:
|
|
10232
|
-
if (getZeroByteCount(a, b, c, d, e, f, g, h) >=
|
|
10332
|
+
if (getZeroByteCount(a, b, c, d, e, f, g, h) >= 2 || rangeWordCount >= 255) {
|
|
10233
10333
|
dst[spanWordCountOffset] = rangeWordCount;
|
|
10234
10334
|
rangeWordCount = 0;
|
|
10235
10335
|
skipWriteWord = false;
|
|
@@ -10321,7 +10421,7 @@ var Segment = class {
|
|
|
10321
10421
|
allocate(byteLength) {
|
|
10322
10422
|
let segment = this;
|
|
10323
10423
|
byteLength = padToWord$1(byteLength);
|
|
10324
|
-
if (byteLength >
|
|
10424
|
+
if (byteLength > 4294967295 - 8) throw new Error(format(SEG_SIZE_OVERFLOW, byteLength));
|
|
10325
10425
|
if (!segment.hasCapacity(byteLength)) segment = segment.message.allocateSegment(byteLength);
|
|
10326
10426
|
const byteOffset = segment.byteLength;
|
|
10327
10427
|
segment.byteLength += byteLength;
|
|
@@ -10821,8 +10921,8 @@ Segment #${i}
|
|
|
10821
10921
|
function getRoot(RootStruct, m) {
|
|
10822
10922
|
const root = new RootStruct(m.getSegment(0), 0);
|
|
10823
10923
|
validate(PointerType.STRUCT, root);
|
|
10824
|
-
const ts
|
|
10825
|
-
if (ts
|
|
10924
|
+
const ts = getTargetStructSize(root);
|
|
10925
|
+
if (ts.dataByteLength < RootStruct._capnp.size.dataByteLength || ts.pointerLength < RootStruct._capnp.size.pointerLength) resize(RootStruct._capnp.size, root);
|
|
10826
10926
|
return root;
|
|
10827
10927
|
}
|
|
10828
10928
|
function getSegment(id, m) {
|
|
@@ -11031,7 +11131,7 @@ var hasRequiredHex2dec;
|
|
|
11031
11131
|
function requireHex2dec() {
|
|
11032
11132
|
if (hasRequiredHex2dec) return hex2dec;
|
|
11033
11133
|
hasRequiredHex2dec = 1;
|
|
11034
|
-
function add
|
|
11134
|
+
function add(x, y, base) {
|
|
11035
11135
|
var z = [];
|
|
11036
11136
|
var n = Math.max(x.length, y.length);
|
|
11037
11137
|
var carry = 0;
|
|
@@ -11052,10 +11152,10 @@ function requireHex2dec() {
|
|
|
11052
11152
|
var result = [];
|
|
11053
11153
|
var power = x;
|
|
11054
11154
|
while (true) {
|
|
11055
|
-
if (num & 1) result = add
|
|
11155
|
+
if (num & 1) result = add(result, power, base);
|
|
11056
11156
|
num = num >> 1;
|
|
11057
11157
|
if (num === 0) break;
|
|
11058
|
-
power = add
|
|
11158
|
+
power = add(power, power, base);
|
|
11059
11159
|
}
|
|
11060
11160
|
return result;
|
|
11061
11161
|
}
|
|
@@ -11075,7 +11175,7 @@ function requireHex2dec() {
|
|
|
11075
11175
|
var outArray = [];
|
|
11076
11176
|
var power = [1];
|
|
11077
11177
|
for (var i = 0; i < digits.length; i++) {
|
|
11078
|
-
if (digits[i]) outArray = add
|
|
11178
|
+
if (digits[i]) outArray = add(outArray, multiplyByNumber(digits[i], power, toBase), toBase);
|
|
11079
11179
|
power = multiplyByNumber(fromBase, power, toBase);
|
|
11080
11180
|
}
|
|
11081
11181
|
var out = "";
|
|
@@ -11470,16 +11570,16 @@ function generateStructFieldMethods(ctx, members, node, field, fieldIndex) {
|
|
|
11470
11570
|
const maybeDefaultArg = hadExplicitDefault ? `, ${fullClassName}._capnp.default${capitalizedName}` : "";
|
|
11471
11571
|
const union = discriminantValue !== Field.NO_DISCRIMINANT;
|
|
11472
11572
|
const offset = field._isSlot ? field.slot.offset : 0;
|
|
11473
|
-
let adopt
|
|
11474
|
-
let disown
|
|
11573
|
+
let adopt = false;
|
|
11574
|
+
let disown = false;
|
|
11475
11575
|
let has = false;
|
|
11476
11576
|
let init;
|
|
11477
11577
|
let get;
|
|
11478
11578
|
let set;
|
|
11479
11579
|
switch (whichType) {
|
|
11480
11580
|
case Type.ANY_POINTER:
|
|
11481
|
-
adopt
|
|
11482
|
-
disown
|
|
11581
|
+
adopt = true;
|
|
11582
|
+
disown = true;
|
|
11483
11583
|
has = true;
|
|
11484
11584
|
get = `$.utils.getPointer(${offset}, this${maybeDefaultArg})`;
|
|
11485
11585
|
set = `$.utils.copyFrom(value, ${get})`;
|
|
@@ -11504,8 +11604,8 @@ function generateStructFieldMethods(ctx, members, node, field, fieldIndex) {
|
|
|
11504
11604
|
break;
|
|
11505
11605
|
}
|
|
11506
11606
|
case Type.DATA:
|
|
11507
|
-
adopt
|
|
11508
|
-
disown
|
|
11607
|
+
adopt = true;
|
|
11608
|
+
disown = true;
|
|
11509
11609
|
has = true;
|
|
11510
11610
|
get = `$.utils.getData(${offset}, this${maybeDefaultArg})`;
|
|
11511
11611
|
set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;
|
|
@@ -11520,8 +11620,8 @@ function generateStructFieldMethods(ctx, members, node, field, fieldIndex) {
|
|
|
11520
11620
|
let listClass = ConcreteListType[elementType];
|
|
11521
11621
|
if (elementType === Type.LIST || elementType === Type.STRUCT) listClass = `${fullClassName}._${capitalizedName}`;
|
|
11522
11622
|
else if (listClass === void 0) throw new Error(format(GEN_UNSUPPORTED_LIST_ELEMENT_TYPE, elementType));
|
|
11523
|
-
adopt
|
|
11524
|
-
disown
|
|
11623
|
+
adopt = true;
|
|
11624
|
+
disown = true;
|
|
11525
11625
|
has = true;
|
|
11526
11626
|
get = `$.utils.getList(${offset}, ${listClass}, this${maybeDefaultArg})`;
|
|
11527
11627
|
set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;
|
|
@@ -11533,8 +11633,8 @@ function generateStructFieldMethods(ctx, members, node, field, fieldIndex) {
|
|
|
11533
11633
|
break;
|
|
11534
11634
|
}
|
|
11535
11635
|
case Type.STRUCT:
|
|
11536
|
-
adopt
|
|
11537
|
-
disown
|
|
11636
|
+
adopt = true;
|
|
11637
|
+
disown = true;
|
|
11538
11638
|
has = true;
|
|
11539
11639
|
get = `$.utils.getStruct(${offset}, ${jsType}, this${maybeDefaultArg})`;
|
|
11540
11640
|
set = `$.utils.copyFrom(value, $.utils.getPointer(${offset}, this))`;
|
|
@@ -11551,13 +11651,13 @@ function generateStructFieldMethods(ctx, members, node, field, fieldIndex) {
|
|
|
11551
11651
|
init = get;
|
|
11552
11652
|
break;
|
|
11553
11653
|
}
|
|
11554
|
-
if (adopt
|
|
11654
|
+
if (adopt) members.push(`
|
|
11555
11655
|
_adopt${capitalizedName}(value: $.Orphan<${jsType}>): void {
|
|
11556
11656
|
${union ? `$.utils.setUint16(${discriminantOffset * 2}, ${discriminantValue}, this);` : ""}
|
|
11557
11657
|
$.utils.adopt(value, $.utils.getPointer(${offset}, this));
|
|
11558
11658
|
}
|
|
11559
11659
|
`);
|
|
11560
|
-
if (disown
|
|
11660
|
+
if (disown) members.push(`
|
|
11561
11661
|
_disown${capitalizedName}(): $.Orphan<${jsType}> {
|
|
11562
11662
|
return $.utils.disown(this.${name === "constructor" ? `$${name}` : name});
|
|
11563
11663
|
}
|
|
@@ -11859,9 +11959,9 @@ function tsCompile(files, dts, js, tsconfig) {
|
|
|
11859
11959
|
if (files.has(filename)) return files.get(filename);
|
|
11860
11960
|
return _readFile(filename);
|
|
11861
11961
|
};
|
|
11862
|
-
const program
|
|
11863
|
-
const emitResult = program
|
|
11864
|
-
const allDiagnostics = [...ts.getPreEmitDiagnostics(program
|
|
11962
|
+
const program = ts.createProgram([...files.keys()], compileOptions, compilerHost);
|
|
11963
|
+
const emitResult = program.emit();
|
|
11964
|
+
const allDiagnostics = [...ts.getPreEmitDiagnostics(program), ...emitResult.diagnostics];
|
|
11865
11965
|
if (allDiagnostics.length > 0) {
|
|
11866
11966
|
for (const diagnostic of allDiagnostics) {
|
|
11867
11967
|
const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
|
|
@@ -11916,7 +12016,7 @@ async function resolveOptions(options) {
|
|
|
11916
12016
|
joinPaths(options.workspaceRoot, "tsconfig.app.json"),
|
|
11917
12017
|
joinPaths(options.workspaceRoot, "tsconfig.capnp.json"),
|
|
11918
12018
|
joinPaths(options.workspaceRoot, "tsconfig.schema.json")
|
|
11919
|
-
].find((path
|
|
12019
|
+
].find((path) => existsSync$1(path));
|
|
11920
12020
|
if (found) resolvedTsconfigPath = found;
|
|
11921
12021
|
}
|
|
11922
12022
|
if (!resolvedTsconfigPath || !existsSync$1(resolvedTsconfigPath)) {
|
|
@@ -11979,9 +12079,9 @@ async function resolveOptions(options) {
|
|
|
11979
12079
|
* @returns A promise that resolves to the compilation result.
|
|
11980
12080
|
*/
|
|
11981
12081
|
async function capnpc(options) {
|
|
11982
|
-
const { output, tsconfig, schemas = [], tty
|
|
12082
|
+
const { output, tsconfig, schemas = [], tty } = options;
|
|
11983
12083
|
let dataBuf = Buffer$1.alloc(0);
|
|
11984
|
-
if (tty
|
|
12084
|
+
if (tty) {
|
|
11985
12085
|
const chunks = [];
|
|
11986
12086
|
process.stdin.on("data", (chunk) => {
|
|
11987
12087
|
chunks.push(chunk);
|
|
@@ -12069,10 +12169,10 @@ function createProgram() {
|
|
|
12069
12169
|
const workspaceRoot = findWorkspaceRootSafe(process.cwd());
|
|
12070
12170
|
process.env.STORM_WORKSPACE_ROOT ??= workspaceRoot;
|
|
12071
12171
|
process.env.NX_WORKSPACE_ROOT_PATH ??= workspaceRoot;
|
|
12072
|
-
const program
|
|
12073
|
-
program
|
|
12074
|
-
program
|
|
12075
|
-
return program
|
|
12172
|
+
const program = new Command();
|
|
12173
|
+
program.name("storm-capnpc").description("Run the Storm Cap'n Proto compiler").version("1.0.0", "-v --version", "display CLI version");
|
|
12174
|
+
program.command("compile", { isDefault: true }).option("-p --project-root <path>", "The path to the project root directory").option("-s --schema <path>", "The directory (or a glob to the directory) containing the Cap'n Proto schema files to compile (default: current working directory)").option("-o --output <path>", "The directory to output the generated files to").option("--tsconfig <path>", "The path to the TypeScript configuration file to use for compilation").option("--skip-generating-id", "Skip generating a new 64-bit unique ID for use in a Cap'n Proto schema").option("--no-standard-imports", "Skip adding default import paths; use only those specified by -I").option("--no-ts", "An indicator to disable generation of TypeScript files").option("--js", "An indicator to generate JavaScript files").option("--dts", "An indicator to generate TypeScript declaration files").option("--no-dts", "An indicator to disable generation of TypeScript declaration files").option("-w --workspace-root <path>", "The path to the workspace root directory", workspaceRoot).option("--tty", "An indicator to enable TTY mode for the compiler").action(compileAction(workspaceRoot));
|
|
12175
|
+
return program;
|
|
12076
12176
|
}
|
|
12077
12177
|
(async () => {
|
|
12078
12178
|
try {
|