@stryke/capnp 0.12.95 → 0.12.97
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 +418 -316
- 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 +381 -280
- 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-ySRLGi2G.mjs → compile-D_BOc0dD.mjs} +109 -15
- package/dist/compile-D_BOc0dD.mjs.map +1 -0
- package/dist/{compile-DgmKft8T.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-B1zJTrkG.mjs → helpers-2TldkyGG.mjs} +149 -149
- package/dist/helpers-2TldkyGG.mjs.map +1 -0
- package/dist/{helpers-B7aznH9v.cjs → helpers-Dn4nWOb7.cjs} +177 -177
- 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 +8 -8
- 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-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/compile-ySRLGi2G.mjs.map +0 -1
- package/dist/dist-BlvFBzSi.mjs.map +0 -1
- package/dist/helpers-B1zJTrkG.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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
8
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
9
|
var __copyProps = (to, from, except, desc) => {
|
|
10
10
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
11
|
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
}) : target, mod));
|
|
27
27
|
|
|
28
28
|
//#endregion
|
|
29
|
-
let
|
|
29
|
+
let _stryke_fs_exists = require("@stryke/fs/exists");
|
|
30
30
|
let typescript = require("typescript");
|
|
31
|
-
let
|
|
32
|
-
let
|
|
33
|
-
let
|
|
34
|
-
let
|
|
35
|
-
let
|
|
36
|
-
let
|
|
31
|
+
let _stryke_fs = require("@stryke/fs");
|
|
32
|
+
let _stryke_fs_json = require("@stryke/fs/json");
|
|
33
|
+
let _stryke_fs_list_files = require("@stryke/fs/list-files");
|
|
34
|
+
let _stryke_path_append = require("@stryke/path/append");
|
|
35
|
+
let _stryke_path_file_path_fns = require("@stryke/path/file-path-fns");
|
|
36
|
+
let _stryke_path_join_paths = require("@stryke/path/join-paths");
|
|
37
37
|
|
|
38
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
38
|
+
//#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
|
|
39
39
|
var DEFAULT_COLOR_CONFIG = {
|
|
40
40
|
light: {
|
|
41
41
|
background: "#fafafa",
|
|
@@ -836,7 +836,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
836
836
|
const cssKeywords = require_color_name();
|
|
837
837
|
const reverseKeywords = {};
|
|
838
838
|
for (const key of Object.keys(cssKeywords)) reverseKeywords[cssKeywords[key]] = key;
|
|
839
|
-
const convert
|
|
839
|
+
const convert = {
|
|
840
840
|
rgb: {
|
|
841
841
|
channels: 3,
|
|
842
842
|
labels: "rgb"
|
|
@@ -906,18 +906,18 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
906
906
|
labels: ["gray"]
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
|
-
module.exports = convert
|
|
910
|
-
for (const model of Object.keys(convert
|
|
911
|
-
if (!("channels" in convert
|
|
912
|
-
if (!("labels" in convert
|
|
913
|
-
if (convert
|
|
914
|
-
const { channels, labels } = convert
|
|
915
|
-
delete convert
|
|
916
|
-
delete convert
|
|
917
|
-
Object.defineProperty(convert
|
|
918
|
-
Object.defineProperty(convert
|
|
909
|
+
module.exports = convert;
|
|
910
|
+
for (const model of Object.keys(convert)) {
|
|
911
|
+
if (!("channels" in convert[model])) throw new Error("missing channels property: " + model);
|
|
912
|
+
if (!("labels" in convert[model])) throw new Error("missing channel labels property: " + model);
|
|
913
|
+
if (convert[model].labels.length !== convert[model].channels) throw new Error("channel and label counts mismatch: " + model);
|
|
914
|
+
const { channels, labels } = convert[model];
|
|
915
|
+
delete convert[model].channels;
|
|
916
|
+
delete convert[model].labels;
|
|
917
|
+
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
918
|
+
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
919
919
|
}
|
|
920
|
-
convert
|
|
920
|
+
convert.rgb.hsl = function(rgb) {
|
|
921
921
|
const r = rgb[0] / 255;
|
|
922
922
|
const g = rgb[1] / 255;
|
|
923
923
|
const b = rgb[2] / 255;
|
|
@@ -942,7 +942,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
942
942
|
l * 100
|
|
943
943
|
];
|
|
944
944
|
};
|
|
945
|
-
convert
|
|
945
|
+
convert.rgb.hsv = function(rgb) {
|
|
946
946
|
let rdif;
|
|
947
947
|
let gdif;
|
|
948
948
|
let bdif;
|
|
@@ -976,11 +976,11 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
976
976
|
v * 100
|
|
977
977
|
];
|
|
978
978
|
};
|
|
979
|
-
convert
|
|
979
|
+
convert.rgb.hwb = function(rgb) {
|
|
980
980
|
const r = rgb[0];
|
|
981
981
|
const g = rgb[1];
|
|
982
982
|
let b = rgb[2];
|
|
983
|
-
const h = convert
|
|
983
|
+
const h = convert.rgb.hsl(rgb)[0];
|
|
984
984
|
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
985
985
|
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
986
986
|
return [
|
|
@@ -989,7 +989,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
989
989
|
b * 100
|
|
990
990
|
];
|
|
991
991
|
};
|
|
992
|
-
convert
|
|
992
|
+
convert.rgb.cmyk = function(rgb) {
|
|
993
993
|
const r = rgb[0] / 255;
|
|
994
994
|
const g = rgb[1] / 255;
|
|
995
995
|
const b = rgb[2] / 255;
|
|
@@ -1007,7 +1007,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1007
1007
|
function comparativeDistance(x, y) {
|
|
1008
1008
|
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
1009
1009
|
}
|
|
1010
|
-
convert
|
|
1010
|
+
convert.rgb.keyword = function(rgb) {
|
|
1011
1011
|
const reversed = reverseKeywords[rgb];
|
|
1012
1012
|
if (reversed) return reversed;
|
|
1013
1013
|
let currentClosestDistance = Infinity;
|
|
@@ -1022,10 +1022,10 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
return currentClosestKeyword;
|
|
1024
1024
|
};
|
|
1025
|
-
convert
|
|
1025
|
+
convert.keyword.rgb = function(keyword) {
|
|
1026
1026
|
return cssKeywords[keyword];
|
|
1027
1027
|
};
|
|
1028
|
-
convert
|
|
1028
|
+
convert.rgb.xyz = function(rgb) {
|
|
1029
1029
|
let r = rgb[0] / 255;
|
|
1030
1030
|
let g = rgb[1] / 255;
|
|
1031
1031
|
let b = rgb[2] / 255;
|
|
@@ -1041,8 +1041,8 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1041
1041
|
z * 100
|
|
1042
1042
|
];
|
|
1043
1043
|
};
|
|
1044
|
-
convert
|
|
1045
|
-
const xyz = convert
|
|
1044
|
+
convert.rgb.lab = function(rgb) {
|
|
1045
|
+
const xyz = convert.rgb.xyz(rgb);
|
|
1046
1046
|
let x = xyz[0];
|
|
1047
1047
|
let y = xyz[1];
|
|
1048
1048
|
let z = xyz[2];
|
|
@@ -1058,7 +1058,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1058
1058
|
200 * (y - z)
|
|
1059
1059
|
];
|
|
1060
1060
|
};
|
|
1061
|
-
convert
|
|
1061
|
+
convert.hsl.rgb = function(hsl) {
|
|
1062
1062
|
const h = hsl[0] / 360;
|
|
1063
1063
|
const s = hsl[1] / 100;
|
|
1064
1064
|
const l = hsl[2] / 100;
|
|
@@ -1093,7 +1093,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1093
1093
|
}
|
|
1094
1094
|
return rgb;
|
|
1095
1095
|
};
|
|
1096
|
-
convert
|
|
1096
|
+
convert.hsl.hsv = function(hsl) {
|
|
1097
1097
|
const h = hsl[0];
|
|
1098
1098
|
let s = hsl[1] / 100;
|
|
1099
1099
|
let l = hsl[2] / 100;
|
|
@@ -1109,7 +1109,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1109
1109
|
v * 100
|
|
1110
1110
|
];
|
|
1111
1111
|
};
|
|
1112
|
-
convert
|
|
1112
|
+
convert.hsv.rgb = function(hsv) {
|
|
1113
1113
|
const h = hsv[0] / 60;
|
|
1114
1114
|
const s = hsv[1] / 100;
|
|
1115
1115
|
let v = hsv[2] / 100;
|
|
@@ -1152,7 +1152,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1152
1152
|
];
|
|
1153
1153
|
}
|
|
1154
1154
|
};
|
|
1155
|
-
convert
|
|
1155
|
+
convert.hsv.hsl = function(hsv) {
|
|
1156
1156
|
const h = hsv[0];
|
|
1157
1157
|
const s = hsv[1] / 100;
|
|
1158
1158
|
const v = hsv[2] / 100;
|
|
@@ -1171,7 +1171,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1171
1171
|
l * 100
|
|
1172
1172
|
];
|
|
1173
1173
|
};
|
|
1174
|
-
convert
|
|
1174
|
+
convert.hwb.rgb = function(hwb) {
|
|
1175
1175
|
const h = hwb[0] / 360;
|
|
1176
1176
|
let wh = hwb[1] / 100;
|
|
1177
1177
|
let bl = hwb[2] / 100;
|
|
@@ -1229,7 +1229,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1229
1229
|
b * 255
|
|
1230
1230
|
];
|
|
1231
1231
|
};
|
|
1232
|
-
convert
|
|
1232
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
1233
1233
|
const c = cmyk[0] / 100;
|
|
1234
1234
|
const m = cmyk[1] / 100;
|
|
1235
1235
|
const y = cmyk[2] / 100;
|
|
@@ -1243,7 +1243,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1243
1243
|
b * 255
|
|
1244
1244
|
];
|
|
1245
1245
|
};
|
|
1246
|
-
convert
|
|
1246
|
+
convert.xyz.rgb = function(xyz) {
|
|
1247
1247
|
const x = xyz[0] / 100;
|
|
1248
1248
|
const y = xyz[1] / 100;
|
|
1249
1249
|
const z = xyz[2] / 100;
|
|
@@ -1265,7 +1265,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1265
1265
|
b * 255
|
|
1266
1266
|
];
|
|
1267
1267
|
};
|
|
1268
|
-
convert
|
|
1268
|
+
convert.xyz.lab = function(xyz) {
|
|
1269
1269
|
let x = xyz[0];
|
|
1270
1270
|
let y = xyz[1];
|
|
1271
1271
|
let z = xyz[2];
|
|
@@ -1281,7 +1281,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1281
1281
|
200 * (y - z)
|
|
1282
1282
|
];
|
|
1283
1283
|
};
|
|
1284
|
-
convert
|
|
1284
|
+
convert.lab.xyz = function(lab) {
|
|
1285
1285
|
const l = lab[0];
|
|
1286
1286
|
const a = lab[1];
|
|
1287
1287
|
const b = lab[2];
|
|
@@ -1306,7 +1306,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1306
1306
|
z
|
|
1307
1307
|
];
|
|
1308
1308
|
};
|
|
1309
|
-
convert
|
|
1309
|
+
convert.lab.lch = function(lab) {
|
|
1310
1310
|
const l = lab[0];
|
|
1311
1311
|
const a = lab[1];
|
|
1312
1312
|
const b = lab[2];
|
|
@@ -1319,7 +1319,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1319
1319
|
h
|
|
1320
1320
|
];
|
|
1321
1321
|
};
|
|
1322
|
-
convert
|
|
1322
|
+
convert.lch.lab = function(lch) {
|
|
1323
1323
|
const l = lch[0];
|
|
1324
1324
|
const c = lch[1];
|
|
1325
1325
|
const hr = lch[2] / 360 * 2 * Math.PI;
|
|
@@ -1329,19 +1329,19 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1329
1329
|
c * Math.sin(hr)
|
|
1330
1330
|
];
|
|
1331
1331
|
};
|
|
1332
|
-
convert
|
|
1332
|
+
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
1333
1333
|
const [r, g, b] = args;
|
|
1334
|
-
let value = saturation === null ? convert
|
|
1334
|
+
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
1335
1335
|
value = Math.round(value / 50);
|
|
1336
1336
|
if (value === 0) return 30;
|
|
1337
1337
|
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
1338
1338
|
if (value === 2) ansi += 60;
|
|
1339
1339
|
return ansi;
|
|
1340
1340
|
};
|
|
1341
|
-
convert
|
|
1342
|
-
return convert
|
|
1341
|
+
convert.hsv.ansi16 = function(args) {
|
|
1342
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
1343
1343
|
};
|
|
1344
|
-
convert
|
|
1344
|
+
convert.rgb.ansi256 = function(args) {
|
|
1345
1345
|
const r = args[0];
|
|
1346
1346
|
const g = args[1];
|
|
1347
1347
|
const b = args[2];
|
|
@@ -1352,7 +1352,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1352
1352
|
}
|
|
1353
1353
|
return 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
1354
1354
|
};
|
|
1355
|
-
convert
|
|
1355
|
+
convert.ansi16.rgb = function(args) {
|
|
1356
1356
|
let color = args % 10;
|
|
1357
1357
|
if (color === 0 || color === 7) {
|
|
1358
1358
|
if (args > 50) color += 3.5;
|
|
@@ -1370,7 +1370,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1370
1370
|
(color >> 2 & 1) * mult * 255
|
|
1371
1371
|
];
|
|
1372
1372
|
};
|
|
1373
|
-
convert
|
|
1373
|
+
convert.ansi256.rgb = function(args) {
|
|
1374
1374
|
if (args >= 232) {
|
|
1375
1375
|
const c = (args - 232) * 10 + 8;
|
|
1376
1376
|
return [
|
|
@@ -1387,11 +1387,11 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1387
1387
|
rem % 6 / 5 * 255
|
|
1388
1388
|
];
|
|
1389
1389
|
};
|
|
1390
|
-
convert
|
|
1390
|
+
convert.rgb.hex = function(args) {
|
|
1391
1391
|
const string = (((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255)).toString(16).toUpperCase();
|
|
1392
1392
|
return "000000".substring(string.length) + string;
|
|
1393
1393
|
};
|
|
1394
|
-
convert
|
|
1394
|
+
convert.hex.rgb = function(args) {
|
|
1395
1395
|
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
1396
1396
|
if (!match) return [
|
|
1397
1397
|
0,
|
|
@@ -1409,7 +1409,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1409
1409
|
integer & 255
|
|
1410
1410
|
];
|
|
1411
1411
|
};
|
|
1412
|
-
convert
|
|
1412
|
+
convert.rgb.hcg = function(rgb) {
|
|
1413
1413
|
const r = rgb[0] / 255;
|
|
1414
1414
|
const g = rgb[1] / 255;
|
|
1415
1415
|
const b = rgb[2] / 255;
|
|
@@ -1432,7 +1432,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1432
1432
|
grayscale * 100
|
|
1433
1433
|
];
|
|
1434
1434
|
};
|
|
1435
|
-
convert
|
|
1435
|
+
convert.hsl.hcg = function(hsl) {
|
|
1436
1436
|
const s = hsl[1] / 100;
|
|
1437
1437
|
const l = hsl[2] / 100;
|
|
1438
1438
|
const c = l < .5 ? 2 * s * l : 2 * s * (1 - l);
|
|
@@ -1444,7 +1444,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1444
1444
|
f * 100
|
|
1445
1445
|
];
|
|
1446
1446
|
};
|
|
1447
|
-
convert
|
|
1447
|
+
convert.hsv.hcg = function(hsv) {
|
|
1448
1448
|
const s = hsv[1] / 100;
|
|
1449
1449
|
const v = hsv[2] / 100;
|
|
1450
1450
|
const c = s * v;
|
|
@@ -1456,7 +1456,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1456
1456
|
f * 100
|
|
1457
1457
|
];
|
|
1458
1458
|
};
|
|
1459
|
-
convert
|
|
1459
|
+
convert.hcg.rgb = function(hcg) {
|
|
1460
1460
|
const h = hcg[0] / 360;
|
|
1461
1461
|
const c = hcg[1] / 100;
|
|
1462
1462
|
const g = hcg[2] / 100;
|
|
@@ -1512,7 +1512,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1512
1512
|
(c * pure[2] + mg) * 255
|
|
1513
1513
|
];
|
|
1514
1514
|
};
|
|
1515
|
-
convert
|
|
1515
|
+
convert.hcg.hsv = function(hcg) {
|
|
1516
1516
|
const c = hcg[1] / 100;
|
|
1517
1517
|
const v = c + hcg[2] / 100 * (1 - c);
|
|
1518
1518
|
let f = 0;
|
|
@@ -1523,7 +1523,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1523
1523
|
v * 100
|
|
1524
1524
|
];
|
|
1525
1525
|
};
|
|
1526
|
-
convert
|
|
1526
|
+
convert.hcg.hsl = function(hcg) {
|
|
1527
1527
|
const c = hcg[1] / 100;
|
|
1528
1528
|
const l = hcg[2] / 100 * (1 - c) + .5 * c;
|
|
1529
1529
|
let s = 0;
|
|
@@ -1535,7 +1535,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1535
1535
|
l * 100
|
|
1536
1536
|
];
|
|
1537
1537
|
};
|
|
1538
|
-
convert
|
|
1538
|
+
convert.hcg.hwb = function(hcg) {
|
|
1539
1539
|
const c = hcg[1] / 100;
|
|
1540
1540
|
const v = c + hcg[2] / 100 * (1 - c);
|
|
1541
1541
|
return [
|
|
@@ -1544,7 +1544,7 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1544
1544
|
(1 - v) * 100
|
|
1545
1545
|
];
|
|
1546
1546
|
};
|
|
1547
|
-
convert
|
|
1547
|
+
convert.hwb.hcg = function(hwb) {
|
|
1548
1548
|
const w = hwb[1] / 100;
|
|
1549
1549
|
const v = 1 - hwb[2] / 100;
|
|
1550
1550
|
const c = v - w;
|
|
@@ -1556,43 +1556,43 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1556
1556
|
g * 100
|
|
1557
1557
|
];
|
|
1558
1558
|
};
|
|
1559
|
-
convert
|
|
1559
|
+
convert.apple.rgb = function(apple) {
|
|
1560
1560
|
return [
|
|
1561
1561
|
apple[0] / 65535 * 255,
|
|
1562
1562
|
apple[1] / 65535 * 255,
|
|
1563
1563
|
apple[2] / 65535 * 255
|
|
1564
1564
|
];
|
|
1565
1565
|
};
|
|
1566
|
-
convert
|
|
1566
|
+
convert.rgb.apple = function(rgb) {
|
|
1567
1567
|
return [
|
|
1568
1568
|
rgb[0] / 255 * 65535,
|
|
1569
1569
|
rgb[1] / 255 * 65535,
|
|
1570
1570
|
rgb[2] / 255 * 65535
|
|
1571
1571
|
];
|
|
1572
1572
|
};
|
|
1573
|
-
convert
|
|
1573
|
+
convert.gray.rgb = function(args) {
|
|
1574
1574
|
return [
|
|
1575
1575
|
args[0] / 100 * 255,
|
|
1576
1576
|
args[0] / 100 * 255,
|
|
1577
1577
|
args[0] / 100 * 255
|
|
1578
1578
|
];
|
|
1579
1579
|
};
|
|
1580
|
-
convert
|
|
1580
|
+
convert.gray.hsl = function(args) {
|
|
1581
1581
|
return [
|
|
1582
1582
|
0,
|
|
1583
1583
|
0,
|
|
1584
1584
|
args[0]
|
|
1585
1585
|
];
|
|
1586
1586
|
};
|
|
1587
|
-
convert
|
|
1588
|
-
convert
|
|
1587
|
+
convert.gray.hsv = convert.gray.hsl;
|
|
1588
|
+
convert.gray.hwb = function(gray) {
|
|
1589
1589
|
return [
|
|
1590
1590
|
0,
|
|
1591
1591
|
100,
|
|
1592
1592
|
gray[0]
|
|
1593
1593
|
];
|
|
1594
1594
|
};
|
|
1595
|
-
convert
|
|
1595
|
+
convert.gray.cmyk = function(gray) {
|
|
1596
1596
|
return [
|
|
1597
1597
|
0,
|
|
1598
1598
|
0,
|
|
@@ -1600,19 +1600,19 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1600
1600
|
gray[0]
|
|
1601
1601
|
];
|
|
1602
1602
|
};
|
|
1603
|
-
convert
|
|
1603
|
+
convert.gray.lab = function(gray) {
|
|
1604
1604
|
return [
|
|
1605
1605
|
gray[0],
|
|
1606
1606
|
0,
|
|
1607
1607
|
0
|
|
1608
1608
|
];
|
|
1609
1609
|
};
|
|
1610
|
-
convert
|
|
1610
|
+
convert.gray.hex = function(gray) {
|
|
1611
1611
|
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
1612
1612
|
const string = ((val << 16) + (val << 8) + val).toString(16).toUpperCase();
|
|
1613
1613
|
return "000000".substring(string.length) + string;
|
|
1614
1614
|
};
|
|
1615
|
-
convert
|
|
1615
|
+
convert.rgb.gray = function(rgb) {
|
|
1616
1616
|
return [(rgb[0] + rgb[1] + rgb[2]) / 3 / 255 * 100];
|
|
1617
1617
|
};
|
|
1618
1618
|
}));
|
|
@@ -1620,11 +1620,11 @@ var require_conversions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1620
1620
|
//#endregion
|
|
1621
1621
|
//#region ../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js
|
|
1622
1622
|
var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1623
|
-
const conversions
|
|
1623
|
+
const conversions = require_conversions();
|
|
1624
1624
|
function buildGraph() {
|
|
1625
1625
|
const graph = {};
|
|
1626
|
-
const models
|
|
1627
|
-
for (let len = models
|
|
1626
|
+
const models = Object.keys(conversions);
|
|
1627
|
+
for (let len = models.length, i = 0; i < len; i++) graph[models[i]] = {
|
|
1628
1628
|
distance: -1,
|
|
1629
1629
|
parent: null
|
|
1630
1630
|
};
|
|
@@ -1636,7 +1636,7 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1636
1636
|
graph[fromModel].distance = 0;
|
|
1637
1637
|
while (queue.length) {
|
|
1638
1638
|
const current = queue.pop();
|
|
1639
|
-
const adjacents = Object.keys(conversions
|
|
1639
|
+
const adjacents = Object.keys(conversions[current]);
|
|
1640
1640
|
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
1641
1641
|
const adjacent = adjacents[i];
|
|
1642
1642
|
const node = graph[adjacent];
|
|
@@ -1656,11 +1656,11 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1656
1656
|
}
|
|
1657
1657
|
function wrapConversion(toModel, graph) {
|
|
1658
1658
|
const path = [graph[toModel].parent, toModel];
|
|
1659
|
-
let fn = conversions
|
|
1659
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
|
1660
1660
|
let cur = graph[toModel].parent;
|
|
1661
1661
|
while (graph[cur].parent) {
|
|
1662
1662
|
path.unshift(graph[cur].parent);
|
|
1663
|
-
fn = link(conversions
|
|
1663
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
1664
1664
|
cur = graph[cur].parent;
|
|
1665
1665
|
}
|
|
1666
1666
|
fn.conversion = path;
|
|
@@ -1669,9 +1669,9 @@ var require_route = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1669
1669
|
module.exports = function(fromModel) {
|
|
1670
1670
|
const graph = deriveBFS(fromModel);
|
|
1671
1671
|
const conversion = {};
|
|
1672
|
-
const models
|
|
1673
|
-
for (let len = models
|
|
1674
|
-
const toModel = models
|
|
1672
|
+
const models = Object.keys(graph);
|
|
1673
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
1674
|
+
const toModel = models[i];
|
|
1675
1675
|
if (graph[toModel].parent === null) continue;
|
|
1676
1676
|
conversion[toModel] = wrapConversion(toModel, graph);
|
|
1677
1677
|
}
|
|
@@ -1762,17 +1762,17 @@ var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1762
1762
|
const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {
|
|
1763
1763
|
if (colorConvert === void 0) colorConvert = require_color_convert();
|
|
1764
1764
|
const offset = isBackground ? 10 : 0;
|
|
1765
|
-
const styles
|
|
1765
|
+
const styles = {};
|
|
1766
1766
|
for (const [sourceSpace, suite] of Object.entries(colorConvert)) {
|
|
1767
1767
|
const name = sourceSpace === "ansi16" ? "ansi" : sourceSpace;
|
|
1768
|
-
if (sourceSpace === targetSpace) styles
|
|
1769
|
-
else if (typeof suite === "object") styles
|
|
1768
|
+
if (sourceSpace === targetSpace) styles[name] = wrap(identity, offset);
|
|
1769
|
+
else if (typeof suite === "object") styles[name] = wrap(suite[targetSpace], offset);
|
|
1770
1770
|
}
|
|
1771
|
-
return styles
|
|
1771
|
+
return styles;
|
|
1772
1772
|
};
|
|
1773
1773
|
function assembleStyles() {
|
|
1774
1774
|
const codes = /* @__PURE__ */ new Map();
|
|
1775
|
-
const styles
|
|
1775
|
+
const styles = {
|
|
1776
1776
|
modifier: {
|
|
1777
1777
|
reset: [0, 0],
|
|
1778
1778
|
bold: [1, 22],
|
|
@@ -1820,37 +1820,37 @@ var require_ansi_styles = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1820
1820
|
bgWhiteBright: [107, 49]
|
|
1821
1821
|
}
|
|
1822
1822
|
};
|
|
1823
|
-
styles
|
|
1824
|
-
styles
|
|
1825
|
-
styles
|
|
1826
|
-
styles
|
|
1827
|
-
for (const [groupName, group] of Object.entries(styles
|
|
1823
|
+
styles.color.gray = styles.color.blackBright;
|
|
1824
|
+
styles.bgColor.bgGray = styles.bgColor.bgBlackBright;
|
|
1825
|
+
styles.color.grey = styles.color.blackBright;
|
|
1826
|
+
styles.bgColor.bgGrey = styles.bgColor.bgBlackBright;
|
|
1827
|
+
for (const [groupName, group] of Object.entries(styles)) {
|
|
1828
1828
|
for (const [styleName, style] of Object.entries(group)) {
|
|
1829
|
-
styles
|
|
1829
|
+
styles[styleName] = {
|
|
1830
1830
|
open: `\u001B[${style[0]}m`,
|
|
1831
1831
|
close: `\u001B[${style[1]}m`
|
|
1832
1832
|
};
|
|
1833
|
-
group[styleName] = styles
|
|
1833
|
+
group[styleName] = styles[styleName];
|
|
1834
1834
|
codes.set(style[0], style[1]);
|
|
1835
1835
|
}
|
|
1836
|
-
Object.defineProperty(styles
|
|
1836
|
+
Object.defineProperty(styles, groupName, {
|
|
1837
1837
|
value: group,
|
|
1838
1838
|
enumerable: false
|
|
1839
1839
|
});
|
|
1840
1840
|
}
|
|
1841
|
-
Object.defineProperty(styles
|
|
1841
|
+
Object.defineProperty(styles, "codes", {
|
|
1842
1842
|
value: codes,
|
|
1843
1843
|
enumerable: false
|
|
1844
1844
|
});
|
|
1845
|
-
styles
|
|
1846
|
-
styles
|
|
1847
|
-
setLazyProperty(styles
|
|
1848
|
-
setLazyProperty(styles
|
|
1849
|
-
setLazyProperty(styles
|
|
1850
|
-
setLazyProperty(styles
|
|
1851
|
-
setLazyProperty(styles
|
|
1852
|
-
setLazyProperty(styles
|
|
1853
|
-
return styles
|
|
1845
|
+
styles.color.close = "\x1B[39m";
|
|
1846
|
+
styles.bgColor.close = "\x1B[49m";
|
|
1847
|
+
setLazyProperty(styles.color, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, false));
|
|
1848
|
+
setLazyProperty(styles.color, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, false));
|
|
1849
|
+
setLazyProperty(styles.color, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, false));
|
|
1850
|
+
setLazyProperty(styles.bgColor, "ansi", () => makeDynamicStyles(wrapAnsi16, "ansi16", ansi2ansi, true));
|
|
1851
|
+
setLazyProperty(styles.bgColor, "ansi256", () => makeDynamicStyles(wrapAnsi256, "ansi256", ansi2ansi, true));
|
|
1852
|
+
setLazyProperty(styles.bgColor, "ansi16m", () => makeDynamicStyles(wrapAnsi16m, "rgb", rgb2rgb, true));
|
|
1853
|
+
return styles;
|
|
1854
1854
|
}
|
|
1855
1855
|
Object.defineProperty(module, "exports", {
|
|
1856
1856
|
enumerable: true,
|
|
@@ -1941,7 +1941,7 @@ var require_supports_color = /* @__PURE__ */ __commonJSMin(((exports, module) =>
|
|
|
1941
1941
|
//#endregion
|
|
1942
1942
|
//#region ../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js
|
|
1943
1943
|
var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1944
|
-
const stringReplaceAll
|
|
1944
|
+
const stringReplaceAll = (string, substring, replacer) => {
|
|
1945
1945
|
let index = string.indexOf(substring);
|
|
1946
1946
|
if (index === -1) return string;
|
|
1947
1947
|
const substringLength = substring.length;
|
|
@@ -1955,7 +1955,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1955
1955
|
returnValue += string.substr(endIndex);
|
|
1956
1956
|
return returnValue;
|
|
1957
1957
|
};
|
|
1958
|
-
const stringEncaseCRLFWithFirstIndex
|
|
1958
|
+
const stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
1959
1959
|
let endIndex = 0;
|
|
1960
1960
|
let returnValue = "";
|
|
1961
1961
|
do {
|
|
@@ -1968,8 +1968,8 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1968
1968
|
return returnValue;
|
|
1969
1969
|
};
|
|
1970
1970
|
module.exports = {
|
|
1971
|
-
stringReplaceAll
|
|
1972
|
-
stringEncaseCRLFWithFirstIndex
|
|
1971
|
+
stringReplaceAll,
|
|
1972
|
+
stringEncaseCRLFWithFirstIndex
|
|
1973
1973
|
};
|
|
1974
1974
|
}));
|
|
1975
1975
|
|
|
@@ -2024,19 +2024,19 @@ var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
return results;
|
|
2026
2026
|
}
|
|
2027
|
-
function buildStyle(chalk
|
|
2027
|
+
function buildStyle(chalk, styles) {
|
|
2028
2028
|
const enabled = {};
|
|
2029
|
-
for (const layer of styles
|
|
2030
|
-
let current = chalk
|
|
2031
|
-
for (const [styleName, styles
|
|
2032
|
-
if (!Array.isArray(styles
|
|
2029
|
+
for (const layer of styles) for (const style of layer.styles) enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
2030
|
+
let current = chalk;
|
|
2031
|
+
for (const [styleName, styles] of Object.entries(enabled)) {
|
|
2032
|
+
if (!Array.isArray(styles)) continue;
|
|
2033
2033
|
if (!(styleName in current)) throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
2034
|
-
current = styles
|
|
2034
|
+
current = styles.length > 0 ? current[styleName](...styles) : current[styleName];
|
|
2035
2035
|
}
|
|
2036
2036
|
return current;
|
|
2037
2037
|
}
|
|
2038
|
-
module.exports = (chalk
|
|
2039
|
-
const styles
|
|
2038
|
+
module.exports = (chalk, temporary) => {
|
|
2039
|
+
const styles = [];
|
|
2040
2040
|
const chunks = [];
|
|
2041
2041
|
let chunk = [];
|
|
2042
2042
|
temporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {
|
|
@@ -2044,21 +2044,21 @@ var require_templates = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2044
2044
|
else if (style) {
|
|
2045
2045
|
const string = chunk.join("");
|
|
2046
2046
|
chunk = [];
|
|
2047
|
-
chunks.push(styles
|
|
2048
|
-
styles
|
|
2047
|
+
chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
|
|
2048
|
+
styles.push({
|
|
2049
2049
|
inverse,
|
|
2050
2050
|
styles: parseStyle(style)
|
|
2051
2051
|
});
|
|
2052
2052
|
} else if (close) {
|
|
2053
|
-
if (styles
|
|
2054
|
-
chunks.push(buildStyle(chalk
|
|
2053
|
+
if (styles.length === 0) throw new Error("Found extraneous } in Chalk template literal");
|
|
2054
|
+
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
2055
2055
|
chunk = [];
|
|
2056
|
-
styles
|
|
2056
|
+
styles.pop();
|
|
2057
2057
|
} else chunk.push(character);
|
|
2058
2058
|
});
|
|
2059
2059
|
chunks.push(chunk.join(""));
|
|
2060
|
-
if (styles
|
|
2061
|
-
const errMessage = `Chalk template literal is missing ${styles
|
|
2060
|
+
if (styles.length > 0) {
|
|
2061
|
+
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
2062
2062
|
throw new Error(errMessage);
|
|
2063
2063
|
}
|
|
2064
2064
|
return chunks.join("");
|
|
@@ -2090,16 +2090,16 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2090
2090
|
}
|
|
2091
2091
|
};
|
|
2092
2092
|
const chalkFactory = (options) => {
|
|
2093
|
-
const chalk
|
|
2094
|
-
applyOptions(chalk
|
|
2095
|
-
chalk
|
|
2096
|
-
Object.setPrototypeOf(chalk
|
|
2097
|
-
Object.setPrototypeOf(chalk
|
|
2098
|
-
chalk
|
|
2093
|
+
const chalk = {};
|
|
2094
|
+
applyOptions(chalk, options);
|
|
2095
|
+
chalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);
|
|
2096
|
+
Object.setPrototypeOf(chalk, Chalk.prototype);
|
|
2097
|
+
Object.setPrototypeOf(chalk.template, chalk);
|
|
2098
|
+
chalk.template.constructor = () => {
|
|
2099
2099
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
2100
2100
|
};
|
|
2101
|
-
chalk
|
|
2102
|
-
return chalk
|
|
2101
|
+
chalk.template.Instance = ChalkClass;
|
|
2102
|
+
return chalk.template;
|
|
2103
2103
|
};
|
|
2104
2104
|
function Chalk(options) {
|
|
2105
2105
|
return chalkFactory(options);
|
|
@@ -2196,25 +2196,25 @@ var require_source = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2196
2196
|
return openAll + string + closeAll;
|
|
2197
2197
|
};
|
|
2198
2198
|
let template;
|
|
2199
|
-
const chalkTag = (chalk
|
|
2199
|
+
const chalkTag = (chalk, ...strings) => {
|
|
2200
2200
|
const [firstString] = strings;
|
|
2201
2201
|
if (!isArray(firstString) || !isArray(firstString.raw)) return strings.join(" ");
|
|
2202
2202
|
const arguments_ = strings.slice(1);
|
|
2203
2203
|
const parts = [firstString.raw[0]];
|
|
2204
2204
|
for (let i = 1; i < firstString.length; i++) parts.push(String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"), String(firstString.raw[i]));
|
|
2205
2205
|
if (template === void 0) template = require_templates();
|
|
2206
|
-
return template(chalk
|
|
2206
|
+
return template(chalk, parts.join(""));
|
|
2207
2207
|
};
|
|
2208
2208
|
Object.defineProperties(Chalk.prototype, styles);
|
|
2209
|
-
const chalk
|
|
2210
|
-
chalk
|
|
2211
|
-
chalk
|
|
2212
|
-
chalk
|
|
2213
|
-
module.exports = chalk
|
|
2209
|
+
const chalk = Chalk();
|
|
2210
|
+
chalk.supportsColor = stdoutColor;
|
|
2211
|
+
chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
2212
|
+
chalk.stderr.supportsColor = stderrColor;
|
|
2213
|
+
module.exports = chalk;
|
|
2214
2214
|
}));
|
|
2215
2215
|
|
|
2216
2216
|
//#endregion
|
|
2217
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
2217
|
+
//#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
|
|
2218
2218
|
var import_source = /* @__PURE__ */ __toESM(require_source(), 1);
|
|
2219
2219
|
var chalkDefault = {
|
|
2220
2220
|
hex: (_) => (message) => message,
|
|
@@ -2246,14 +2246,14 @@ var getChalk = () => {
|
|
|
2246
2246
|
};
|
|
2247
2247
|
|
|
2248
2248
|
//#endregion
|
|
2249
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
2249
|
+
//#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
|
|
2250
2250
|
function isUnicodeSupported() {
|
|
2251
2251
|
if (process.platform !== "win32") return process.env.TERM !== "linux";
|
|
2252
2252
|
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";
|
|
2253
2253
|
}
|
|
2254
2254
|
|
|
2255
2255
|
//#endregion
|
|
2256
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
2256
|
+
//#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
|
|
2257
2257
|
var LogLevel = {
|
|
2258
2258
|
SILENT: 0,
|
|
2259
2259
|
FATAL: 10,
|
|
@@ -2280,7 +2280,7 @@ var LogLevelLabel = {
|
|
|
2280
2280
|
};
|
|
2281
2281
|
|
|
2282
2282
|
//#endregion
|
|
2283
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
2283
|
+
//#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
|
|
2284
2284
|
var useIcon = (c, fallback) => isUnicodeSupported() ? c : fallback;
|
|
2285
2285
|
var CONSOLE_ICONS = {
|
|
2286
2286
|
[LogLevelLabel.ERROR]: useIcon("✘", "×"),
|
|
@@ -2295,13 +2295,13 @@ var CONSOLE_ICONS = {
|
|
|
2295
2295
|
};
|
|
2296
2296
|
|
|
2297
2297
|
//#endregion
|
|
2298
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
2299
|
-
var formatTimestamp = (date = /* @__PURE__ */ new Date()) => {
|
|
2300
|
-
return `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
2298
|
+
//#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
|
|
2299
|
+
var formatTimestamp = (fullDateTime = false, date = /* @__PURE__ */ new Date()) => {
|
|
2300
|
+
return fullDateTime ? `${date.toLocaleDateString()} ${date.toLocaleTimeString()}` : `${date.toLocaleTimeString()}`;
|
|
2301
2301
|
};
|
|
2302
2302
|
|
|
2303
2303
|
//#endregion
|
|
2304
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
2304
|
+
//#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
|
|
2305
2305
|
var getLogLevel = (label) => {
|
|
2306
2306
|
switch (label) {
|
|
2307
2307
|
case "all": return LogLevel.ALL;
|
|
@@ -2318,13 +2318,12 @@ var getLogLevel = (label) => {
|
|
|
2318
2318
|
};
|
|
2319
2319
|
|
|
2320
2320
|
//#endregion
|
|
2321
|
-
//#region ../../node_modules/.pnpm/@storm-software+config-tools@1.
|
|
2321
|
+
//#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
|
|
2322
2322
|
var daysInYear = 365.2425;
|
|
2323
2323
|
-(Math.pow(10, 8) * 24 * 60 * 60 * 1e3);
|
|
2324
2324
|
var secondsInDay = 3600 * 24;
|
|
2325
2325
|
secondsInDay * 7;
|
|
2326
2326
|
secondsInDay * daysInYear / 12 * 3;
|
|
2327
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
2328
2327
|
var formatDistanceLocale = {
|
|
2329
2328
|
lessThanXSeconds: {
|
|
2330
2329
|
one: "less than a second",
|
|
@@ -2838,53 +2837,54 @@ var enUS = {
|
|
|
2838
2837
|
firstWeekContainsDate: 1
|
|
2839
2838
|
}
|
|
2840
2839
|
};
|
|
2841
|
-
var getLogFn = (logLevel = LogLevel.INFO, config = {},
|
|
2840
|
+
var getLogFn = (logLevel = LogLevel.INFO, config = {}, options = {}) => {
|
|
2841
|
+
const { chalk: _chalk = getChalk(), fullDateTime = false, hideDateTime = false } = options;
|
|
2842
2842
|
const colors = !config.colors?.dark && !config.colors?.["base"] && !config.colors?.["base"]?.dark ? DEFAULT_COLOR_CONFIG : config.colors?.dark && typeof config.colors.dark === "string" ? config.colors : config.colors?.["base"]?.dark && typeof config.colors["base"].dark === "string" ? config.colors["base"].dark : config.colors?.["base"] ? config.colors?.["base"] : DEFAULT_COLOR_CONFIG;
|
|
2843
2843
|
const configLogLevel = config.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
2844
2844
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) return (_) => {};
|
|
2845
2845
|
if (typeof logLevel === "number" && LogLevel.FATAL >= logLevel) return (message) => {
|
|
2846
2846
|
console.error(`
|
|
2847
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2847
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.fatal ?? DEFAULT_COLOR_CONFIG.dark.fatal)(`[${CONSOLE_ICONS[LogLevelLabel.FATAL]} Fatal] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2848
2848
|
`);
|
|
2849
2849
|
};
|
|
2850
2850
|
if (typeof logLevel === "number" && LogLevel.ERROR >= logLevel) return (message) => {
|
|
2851
2851
|
console.error(`
|
|
2852
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2852
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.danger ?? DEFAULT_COLOR_CONFIG.dark.danger)(`[${CONSOLE_ICONS[LogLevelLabel.ERROR]} Error] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2853
2853
|
`);
|
|
2854
2854
|
};
|
|
2855
2855
|
if (typeof logLevel === "number" && LogLevel.WARN >= logLevel) return (message) => {
|
|
2856
2856
|
console.warn(`
|
|
2857
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2857
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.warning ?? DEFAULT_COLOR_CONFIG.dark.warning)(`[${CONSOLE_ICONS[LogLevelLabel.WARN]} Warn] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2858
2858
|
`);
|
|
2859
2859
|
};
|
|
2860
2860
|
if (typeof logLevel === "number" && LogLevel.SUCCESS >= logLevel) return (message) => {
|
|
2861
2861
|
console.info(`
|
|
2862
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2862
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.success ?? DEFAULT_COLOR_CONFIG.dark.success)(`[${CONSOLE_ICONS[LogLevelLabel.SUCCESS]} Success] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2863
2863
|
`);
|
|
2864
2864
|
};
|
|
2865
2865
|
if (typeof logLevel === "number" && LogLevel.INFO >= logLevel) return (message) => {
|
|
2866
2866
|
console.info(`
|
|
2867
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2867
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.info ?? DEFAULT_COLOR_CONFIG.dark.info)(`[${CONSOLE_ICONS[LogLevelLabel.INFO]} Info] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2868
2868
|
`);
|
|
2869
2869
|
};
|
|
2870
2870
|
if (typeof logLevel === "number" && LogLevel.PERFORMANCE >= logLevel) return (message) => {
|
|
2871
2871
|
console.debug(`
|
|
2872
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2872
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.performance ?? DEFAULT_COLOR_CONFIG.dark.performance)(`[${CONSOLE_ICONS[LogLevelLabel.PERFORMANCE]} Performance] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2873
2873
|
`);
|
|
2874
2874
|
};
|
|
2875
2875
|
if (typeof logLevel === "number" && LogLevel.DEBUG >= logLevel) return (message) => {
|
|
2876
2876
|
console.debug(`
|
|
2877
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2877
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.debug ?? DEFAULT_COLOR_CONFIG.dark.debug)(`[${CONSOLE_ICONS[LogLevelLabel.DEBUG]} Debug] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2878
2878
|
`);
|
|
2879
2879
|
};
|
|
2880
2880
|
if (typeof logLevel === "number" && LogLevel.TRACE >= logLevel) return (message) => {
|
|
2881
2881
|
console.debug(`
|
|
2882
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex("#bbbbbb")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2882
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex("#bbbbbb")(`[${CONSOLE_ICONS[LogLevelLabel.TRACE]} Trace] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2883
2883
|
`);
|
|
2884
2884
|
};
|
|
2885
2885
|
return (message) => {
|
|
2886
2886
|
console.log(`
|
|
2887
|
-
${_chalk.gray(formatTimestamp())} ${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2887
|
+
${hideDateTime ? "" : `${_chalk.gray(formatTimestamp(fullDateTime))} `}${_chalk.hex(colors.brand ?? DEFAULT_COLOR_CONFIG.dark.brand)(`[${CONSOLE_ICONS[LogLevelLabel.ALL]} System] `)}${_chalk.bold.whiteBright(formatLogMessage(message))}
|
|
2888
2888
|
`);
|
|
2889
2889
|
};
|
|
2890
2890
|
};
|
|
@@ -2936,35 +2936,35 @@ function toArray(array) {
|
|
|
2936
2936
|
* @returns The resolved options
|
|
2937
2937
|
*/
|
|
2938
2938
|
async function resolveOptions(options) {
|
|
2939
|
-
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : (0,
|
|
2939
|
+
const tsconfigPath = options.tsconfigPath ? options.tsconfigPath.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : (0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.json");
|
|
2940
2940
|
const schemas = [];
|
|
2941
|
-
if (options.schemas) schemas.push(...toArray(options.schemas).filter(Boolean).map((schema) => schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot)).map((schema) => schema.includes("*") || schema.endsWith(".capnp") || (0,
|
|
2942
|
-
else schemas.push((0,
|
|
2941
|
+
if (options.schemas) schemas.push(...toArray(options.schemas).filter(Boolean).map((schema) => schema.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot)).map((schema) => schema.includes("*") || schema.endsWith(".capnp") || (0, _stryke_fs_exists.existsSync)(schema) && (0, _stryke_fs_list_files.listSync)((0, _stryke_path_join_paths.joinPaths)(schema, "**/*.capnp")).length > 0 ? schema : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)(options.projectRoot, schema)) && (0, _stryke_fs_list_files.listSync)((0, _stryke_path_join_paths.joinPaths)(options.projectRoot, schema, "**/*.capnp")).length > 0 ? (0, _stryke_path_join_paths.joinPaths)(options.projectRoot, schema, "**/*.capnp") : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, schema)) && (0, _stryke_fs_list_files.listSync)((0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, schema, "**/*.capnp")).length > 0 ? (0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, schema, "**/*.capnp") : schema));
|
|
2942
|
+
else schemas.push((0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "schemas/**/*.capnp")) && (0, _stryke_fs_list_files.listSync)((0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "schemas/**/*.capnp")).length > 0 ? (0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "schemas/**/*.capnp") : (0, _stryke_fs_exists.existsSync)((0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "schemas/**/*.capnp")) && (0, _stryke_fs_list_files.listSync)((0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "schemas/**/*.capnp")).length > 0 ? (0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "schemas/**/*.capnp") : "schemas/**/*.capnp");
|
|
2943
2943
|
let resolvedTsconfig;
|
|
2944
2944
|
if (options.tsconfig) resolvedTsconfig = options.tsconfig;
|
|
2945
2945
|
else {
|
|
2946
2946
|
let resolvedTsconfigPath = tsconfigPath;
|
|
2947
|
-
if (!(0,
|
|
2947
|
+
if (!(0, _stryke_fs_exists.existsSync)(resolvedTsconfigPath)) {
|
|
2948
2948
|
const found = [
|
|
2949
|
-
(0,
|
|
2950
|
-
(0,
|
|
2951
|
-
(0,
|
|
2952
|
-
(0,
|
|
2953
|
-
(0,
|
|
2954
|
-
(0,
|
|
2955
|
-
(0,
|
|
2956
|
-
(0,
|
|
2957
|
-
(0,
|
|
2958
|
-
(0,
|
|
2959
|
-
].find((path) => (0,
|
|
2949
|
+
(0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.json"),
|
|
2950
|
+
(0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.lib.json"),
|
|
2951
|
+
(0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.app.json"),
|
|
2952
|
+
(0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.capnp.json"),
|
|
2953
|
+
(0, _stryke_path_join_paths.joinPaths)(options.projectRoot, "tsconfig.schema.json"),
|
|
2954
|
+
(0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.json"),
|
|
2955
|
+
(0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.lib.json"),
|
|
2956
|
+
(0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.app.json"),
|
|
2957
|
+
(0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.capnp.json"),
|
|
2958
|
+
(0, _stryke_path_join_paths.joinPaths)(options.workspaceRoot, "tsconfig.schema.json")
|
|
2959
|
+
].find((path) => (0, _stryke_fs_exists.existsSync)(path));
|
|
2960
2960
|
if (found) resolvedTsconfigPath = found;
|
|
2961
2961
|
}
|
|
2962
|
-
if (!resolvedTsconfigPath || !(0,
|
|
2962
|
+
if (!resolvedTsconfigPath || !(0, _stryke_fs_exists.existsSync)(resolvedTsconfigPath)) {
|
|
2963
2963
|
const errorMessage = tsconfigPath ? `✖ The specified TypeScript configuration file "${tsconfigPath}" does not exist. Please provide a valid path.` : "✖ The specified TypeScript configuration file does not exist. Please provide a valid path.";
|
|
2964
2964
|
writeFatal(errorMessage, { logLevel: "all" });
|
|
2965
2965
|
throw new Error(errorMessage);
|
|
2966
2966
|
}
|
|
2967
|
-
resolvedTsconfig = (0, typescript.parseJsonConfigFileContent)(await (0,
|
|
2967
|
+
resolvedTsconfig = (0, typescript.parseJsonConfigFileContent)(await (0, _stryke_fs_json.readJsonFile)(tsconfigPath), typescript.sys, (0, _stryke_path_file_path_fns.findFilePath)(tsconfigPath));
|
|
2968
2968
|
if (!resolvedTsconfig) {
|
|
2969
2969
|
const errorMessage = `✖ The specified TypeScript configuration file "${tsconfigPath}" is invalid. Please provide a valid configuration.`;
|
|
2970
2970
|
writeFatal(errorMessage, { logLevel: "all" });
|
|
@@ -2979,21 +2979,21 @@ async function resolveOptions(options) {
|
|
|
2979
2979
|
for (const schema of schemas) {
|
|
2980
2980
|
let formattedSchema = schema;
|
|
2981
2981
|
if (!schema.endsWith(".capnp") && !schema.includes("*")) formattedSchema = `${schema.replace(/\/$/g, "")}/*.capnp`;
|
|
2982
|
-
resolvedSchemas.push(...await (0,
|
|
2982
|
+
resolvedSchemas.push(...await (0, _stryke_fs_list_files.listFiles)(formattedSchema));
|
|
2983
2983
|
}
|
|
2984
2984
|
if (resolvedSchemas.length === 0 || !resolvedSchemas[0]) {
|
|
2985
2985
|
writeWarning(`✖ No Cap'n Proto schema files found in the specified source paths: ${schemas.join(", ")}. As a result, the Cap'n Proto compiler will not be able to generate any output files. Please ensure that the paths are correct and contain .capnp files.`, { logLevel: "all" });
|
|
2986
2986
|
return null;
|
|
2987
2987
|
}
|
|
2988
|
-
const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : (0,
|
|
2989
|
-
if (!(0,
|
|
2990
|
-
if ((0,
|
|
2988
|
+
const output = options.output ? options.output.replace("{projectRoot}", options.projectRoot).replace("{workspaceRoot}", options.workspaceRoot) : (0, _stryke_path_append.appendPath)((0, _stryke_path_file_path_fns.relativePath)(tsconfigPath ? (0, _stryke_path_file_path_fns.findFilePath)(tsconfigPath) : options.projectRoot, (0, _stryke_path_append.appendPath)(resolvedSchemas[0].endsWith(".capnp") ? (0, _stryke_path_file_path_fns.findFilePath)(resolvedSchemas[0]) : resolvedSchemas[0], options.workspaceRoot)), options.projectRoot);
|
|
2989
|
+
if (!(0, _stryke_fs_exists.existsSync)(output)) {
|
|
2990
|
+
if ((0, _stryke_fs.isFile)(output)) {
|
|
2991
2991
|
const errorMessage = `✖ The specified output path "${output}" is a file. Please provide a valid directory path.`;
|
|
2992
2992
|
writeFatal(errorMessage, { logLevel: "all" });
|
|
2993
2993
|
throw new Error(errorMessage);
|
|
2994
2994
|
}
|
|
2995
2995
|
writeInfo(`Output directory "${output}" does not exist. It will be created automatically.`, { logLevel: "all" });
|
|
2996
|
-
await (0,
|
|
2996
|
+
await (0, _stryke_fs.createDirectory)(output);
|
|
2997
2997
|
}
|
|
2998
2998
|
resolvedTsconfig.options.outDir = output;
|
|
2999
2999
|
return {
|