@profullstack/threatcrush 0.13.68 → 0.13.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/daemon.js +139 -73
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +327 -261
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42,9 +42,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
42
42
|
mod
|
|
43
43
|
));
|
|
44
44
|
|
|
45
|
-
//
|
|
45
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/parser.js
|
|
46
46
|
var require_parser = __commonJS({
|
|
47
|
-
"
|
|
47
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/parser.js"(exports2, module2) {
|
|
48
48
|
"use strict";
|
|
49
49
|
var ParserEND = 1114112;
|
|
50
50
|
var ParserError = class _ParserError extends Error {
|
|
@@ -167,9 +167,9 @@ var require_parser = __commonJS({
|
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
169
|
|
|
170
|
-
//
|
|
170
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-datetime.js
|
|
171
171
|
var require_create_datetime = __commonJS({
|
|
172
|
-
"
|
|
172
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-datetime.js"(exports2, module2) {
|
|
173
173
|
"use strict";
|
|
174
174
|
module2.exports = (value) => {
|
|
175
175
|
const date = new Date(value);
|
|
@@ -182,9 +182,9 @@ var require_create_datetime = __commonJS({
|
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
|
|
185
|
-
//
|
|
185
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/format-num.js
|
|
186
186
|
var require_format_num = __commonJS({
|
|
187
|
-
"
|
|
187
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/format-num.js"(exports2, module2) {
|
|
188
188
|
"use strict";
|
|
189
189
|
module2.exports = (d, num) => {
|
|
190
190
|
num = String(num);
|
|
@@ -194,9 +194,9 @@ var require_format_num = __commonJS({
|
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
|
|
197
|
-
//
|
|
197
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-datetime-float.js
|
|
198
198
|
var require_create_datetime_float = __commonJS({
|
|
199
|
-
"
|
|
199
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-datetime-float.js"(exports2, module2) {
|
|
200
200
|
"use strict";
|
|
201
201
|
var f = require_format_num();
|
|
202
202
|
var FloatingDateTime = class extends Date {
|
|
@@ -221,9 +221,9 @@ var require_create_datetime_float = __commonJS({
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
|
|
224
|
-
//
|
|
224
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-date.js
|
|
225
225
|
var require_create_date = __commonJS({
|
|
226
|
-
"
|
|
226
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-date.js"(exports2, module2) {
|
|
227
227
|
"use strict";
|
|
228
228
|
var f = require_format_num();
|
|
229
229
|
var DateTime = global.Date;
|
|
@@ -247,9 +247,9 @@ var require_create_date = __commonJS({
|
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
|
|
250
|
-
//
|
|
250
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-time.js
|
|
251
251
|
var require_create_time = __commonJS({
|
|
252
|
-
"
|
|
252
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/create-time.js"(exports2, module2) {
|
|
253
253
|
"use strict";
|
|
254
254
|
var f = require_format_num();
|
|
255
255
|
var Time = class extends Date {
|
|
@@ -272,9 +272,9 @@ var require_create_time = __commonJS({
|
|
|
272
272
|
}
|
|
273
273
|
});
|
|
274
274
|
|
|
275
|
-
//
|
|
275
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/toml-parser.js
|
|
276
276
|
var require_toml_parser = __commonJS({
|
|
277
|
-
"
|
|
277
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/lib/toml-parser.js"(exports, module) {
|
|
278
278
|
"use strict";
|
|
279
279
|
module.exports = makeParserClass(require_parser());
|
|
280
280
|
module.exports.makeParserClass = makeParserClass;
|
|
@@ -1585,9 +1585,9 @@ var require_toml_parser = __commonJS({
|
|
|
1585
1585
|
}
|
|
1586
1586
|
});
|
|
1587
1587
|
|
|
1588
|
-
//
|
|
1588
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-pretty-error.js
|
|
1589
1589
|
var require_parse_pretty_error = __commonJS({
|
|
1590
|
-
"
|
|
1590
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-pretty-error.js"(exports2, module2) {
|
|
1591
1591
|
"use strict";
|
|
1592
1592
|
module2.exports = prettyError;
|
|
1593
1593
|
function prettyError(err, buf) {
|
|
@@ -1621,9 +1621,9 @@ var require_parse_pretty_error = __commonJS({
|
|
|
1621
1621
|
}
|
|
1622
1622
|
});
|
|
1623
1623
|
|
|
1624
|
-
//
|
|
1624
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-string.js
|
|
1625
1625
|
var require_parse_string = __commonJS({
|
|
1626
|
-
"
|
|
1626
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-string.js"(exports2, module2) {
|
|
1627
1627
|
"use strict";
|
|
1628
1628
|
module2.exports = parseString;
|
|
1629
1629
|
var TOMLParser = require_toml_parser();
|
|
@@ -1643,9 +1643,9 @@ var require_parse_string = __commonJS({
|
|
|
1643
1643
|
}
|
|
1644
1644
|
});
|
|
1645
1645
|
|
|
1646
|
-
//
|
|
1646
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-async.js
|
|
1647
1647
|
var require_parse_async = __commonJS({
|
|
1648
|
-
"
|
|
1648
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-async.js"(exports2, module2) {
|
|
1649
1649
|
"use strict";
|
|
1650
1650
|
module2.exports = parseAsync;
|
|
1651
1651
|
var TOMLParser = require_toml_parser();
|
|
@@ -1677,9 +1677,9 @@ var require_parse_async = __commonJS({
|
|
|
1677
1677
|
}
|
|
1678
1678
|
});
|
|
1679
1679
|
|
|
1680
|
-
//
|
|
1680
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-stream.js
|
|
1681
1681
|
var require_parse_stream = __commonJS({
|
|
1682
|
-
"
|
|
1682
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse-stream.js"(exports2, module2) {
|
|
1683
1683
|
"use strict";
|
|
1684
1684
|
module2.exports = parseStream;
|
|
1685
1685
|
var stream = require("stream");
|
|
@@ -1756,9 +1756,9 @@ var require_parse_stream = __commonJS({
|
|
|
1756
1756
|
}
|
|
1757
1757
|
});
|
|
1758
1758
|
|
|
1759
|
-
//
|
|
1759
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse.js
|
|
1760
1760
|
var require_parse = __commonJS({
|
|
1761
|
-
"
|
|
1761
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/parse.js"(exports2, module2) {
|
|
1762
1762
|
"use strict";
|
|
1763
1763
|
module2.exports = require_parse_string();
|
|
1764
1764
|
module2.exports.async = require_parse_async();
|
|
@@ -1767,9 +1767,9 @@ var require_parse = __commonJS({
|
|
|
1767
1767
|
}
|
|
1768
1768
|
});
|
|
1769
1769
|
|
|
1770
|
-
//
|
|
1770
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/stringify.js
|
|
1771
1771
|
var require_stringify = __commonJS({
|
|
1772
|
-
"
|
|
1772
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/stringify.js"(exports2, module2) {
|
|
1773
1773
|
"use strict";
|
|
1774
1774
|
module2.exports = stringify;
|
|
1775
1775
|
module2.exports.value = stringifyInline;
|
|
@@ -2028,16 +2028,16 @@ var require_stringify = __commonJS({
|
|
|
2028
2028
|
}
|
|
2029
2029
|
});
|
|
2030
2030
|
|
|
2031
|
-
//
|
|
2031
|
+
// ../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/toml.js
|
|
2032
2032
|
var require_toml = __commonJS({
|
|
2033
|
-
"
|
|
2033
|
+
"../../node_modules/.pnpm/@iarna+toml@2.2.5/node_modules/@iarna/toml/toml.js"(exports2) {
|
|
2034
2034
|
"use strict";
|
|
2035
2035
|
exports2.parse = require_parse();
|
|
2036
2036
|
exports2.stringify = require_stringify();
|
|
2037
2037
|
}
|
|
2038
2038
|
});
|
|
2039
2039
|
|
|
2040
|
-
//
|
|
2040
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/color.js
|
|
2041
2041
|
function rgb(r, g, b) {
|
|
2042
2042
|
return RGB_FLAG | (r & 255) << 16 | (g & 255) << 8 | b & 255;
|
|
2043
2043
|
}
|
|
@@ -2151,7 +2151,7 @@ function grayscale(c) {
|
|
|
2151
2151
|
}
|
|
2152
2152
|
var DEFAULT_COLOR, RGB_FLAG, IDX_FLAG, CUBE, BASE16;
|
|
2153
2153
|
var init_color = __esm({
|
|
2154
|
-
"
|
|
2154
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/color.js"() {
|
|
2155
2155
|
"use strict";
|
|
2156
2156
|
DEFAULT_COLOR = 0;
|
|
2157
2157
|
RGB_FLAG = 16777216;
|
|
@@ -2178,7 +2178,7 @@ var init_color = __esm({
|
|
|
2178
2178
|
}
|
|
2179
2179
|
});
|
|
2180
2180
|
|
|
2181
|
-
//
|
|
2181
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/unicode.js
|
|
2182
2182
|
function isLoneSurrogate(cp) {
|
|
2183
2183
|
return cp >= 55296 && cp <= 57343;
|
|
2184
2184
|
}
|
|
@@ -2429,7 +2429,7 @@ function wrap(text, width) {
|
|
|
2429
2429
|
}
|
|
2430
2430
|
var CLUSTER_BASE, CONTINUATION, clusters, clusterIds, REPLACEMENT, UNSAFE, MAX_CLUSTER_CODEPOINTS, MAX_CLUSTERS, ZERO_WIDTH, WIDE, PICTOGRAPHIC, isRegional, isToneModifier, isTag, isKeycapBase, ZWJ;
|
|
2431
2431
|
var init_unicode = __esm({
|
|
2432
|
-
"
|
|
2432
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/unicode.js"() {
|
|
2433
2433
|
"use strict";
|
|
2434
2434
|
CLUSTER_BASE = 1114112;
|
|
2435
2435
|
CONTINUATION = 4294967295;
|
|
@@ -2582,10 +2582,10 @@ var init_unicode = __esm({
|
|
|
2582
2582
|
}
|
|
2583
2583
|
});
|
|
2584
2584
|
|
|
2585
|
-
//
|
|
2585
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/buffer.js
|
|
2586
2586
|
var Attr, FrameBuffer;
|
|
2587
2587
|
var init_buffer = __esm({
|
|
2588
|
-
"
|
|
2588
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/buffer.js"() {
|
|
2589
2589
|
"use strict";
|
|
2590
2590
|
init_color();
|
|
2591
2591
|
init_unicode();
|
|
@@ -2774,7 +2774,7 @@ var init_buffer = __esm({
|
|
|
2774
2774
|
}
|
|
2775
2775
|
});
|
|
2776
2776
|
|
|
2777
|
-
//
|
|
2777
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/ansi.js
|
|
2778
2778
|
function moveTo(x, y) {
|
|
2779
2779
|
return `${CSI}${y + 1};${x + 1}H`;
|
|
2780
2780
|
}
|
|
@@ -2825,7 +2825,7 @@ function stripAnsi(text) {
|
|
|
2825
2825
|
}
|
|
2826
2826
|
var ESC, CSI, ansi, fgDefault, bgDefault, TEXT_UNSAFE;
|
|
2827
2827
|
var init_ansi = __esm({
|
|
2828
|
-
"
|
|
2828
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/ansi.js"() {
|
|
2829
2829
|
"use strict";
|
|
2830
2830
|
init_unicode();
|
|
2831
2831
|
ESC = "\x1B";
|
|
@@ -2861,7 +2861,7 @@ var init_ansi = __esm({
|
|
|
2861
2861
|
}
|
|
2862
2862
|
});
|
|
2863
2863
|
|
|
2864
|
-
//
|
|
2864
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/diff.js
|
|
2865
2865
|
function encodeRows(buffer, options = {}) {
|
|
2866
2866
|
const encoder = new Encoder({ ...options, origin: { x: 0, y: 0 }, relative: false });
|
|
2867
2867
|
const width = buffer.width;
|
|
@@ -2882,7 +2882,7 @@ function encodeRows(buffer, options = {}) {
|
|
|
2882
2882
|
}
|
|
2883
2883
|
var GAP_MERGE, Encoder;
|
|
2884
2884
|
var init_diff = __esm({
|
|
2885
|
-
"
|
|
2885
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/diff.js"() {
|
|
2886
2886
|
"use strict";
|
|
2887
2887
|
init_buffer();
|
|
2888
2888
|
init_buffer();
|
|
@@ -3099,7 +3099,7 @@ var init_diff = __esm({
|
|
|
3099
3099
|
}
|
|
3100
3100
|
});
|
|
3101
3101
|
|
|
3102
|
-
//
|
|
3102
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/capabilities.js
|
|
3103
3103
|
function detectProgram(env3) {
|
|
3104
3104
|
if (env3.TERM_PROGRAM === "hqterm")
|
|
3105
3105
|
return "hqterm";
|
|
@@ -3198,12 +3198,12 @@ function detectCapabilities(overrides = {}, env3 = process.env, stream = process
|
|
|
3198
3198
|
};
|
|
3199
3199
|
}
|
|
3200
3200
|
var init_capabilities = __esm({
|
|
3201
|
-
"
|
|
3201
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/capabilities.js"() {
|
|
3202
3202
|
"use strict";
|
|
3203
3203
|
}
|
|
3204
3204
|
});
|
|
3205
3205
|
|
|
3206
|
-
//
|
|
3206
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/input.js
|
|
3207
3207
|
function decodeModifiers(param) {
|
|
3208
3208
|
const bits2 = Math.max(0, param - 1);
|
|
3209
3209
|
return { shift: (bits2 & 1) !== 0, alt: (bits2 & 2) !== 0, ctrl: (bits2 & 4) !== 0 };
|
|
@@ -3239,7 +3239,7 @@ function matchKey(event, binding) {
|
|
|
3239
3239
|
}
|
|
3240
3240
|
var SPECIAL, PASTE_END, InputParser, SPECIAL_KEYS_SORTED;
|
|
3241
3241
|
var init_input = __esm({
|
|
3242
|
-
"
|
|
3242
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/input.js"() {
|
|
3243
3243
|
"use strict";
|
|
3244
3244
|
SPECIAL = {
|
|
3245
3245
|
"[A": "up",
|
|
@@ -3482,7 +3482,7 @@ var init_input = __esm({
|
|
|
3482
3482
|
}
|
|
3483
3483
|
});
|
|
3484
3484
|
|
|
3485
|
-
//
|
|
3485
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/terminal.js
|
|
3486
3486
|
function anchor() {
|
|
3487
3487
|
return ansi.reset + ansi.cursorSave;
|
|
3488
3488
|
}
|
|
@@ -3491,7 +3491,7 @@ function toAnchor() {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
var Terminal;
|
|
3493
3493
|
var init_terminal = __esm({
|
|
3494
|
-
"
|
|
3494
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/terminal.js"() {
|
|
3495
3495
|
"use strict";
|
|
3496
3496
|
init_ansi();
|
|
3497
3497
|
init_capabilities();
|
|
@@ -3777,7 +3777,7 @@ var init_terminal = __esm({
|
|
|
3777
3777
|
}
|
|
3778
3778
|
});
|
|
3779
3779
|
|
|
3780
|
-
//
|
|
3780
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/theme.js
|
|
3781
3781
|
function variant(base, overrides) {
|
|
3782
3782
|
return { ...base, ...overrides };
|
|
3783
3783
|
}
|
|
@@ -3806,7 +3806,7 @@ function seriesColor(theme, index) {
|
|
|
3806
3806
|
}
|
|
3807
3807
|
var DARK, DRACULA, NORD, TOKYO_NIGHT, GRUVBOX, MATRIX, MONOCHROME, HIGH_CONTRAST, LIGHT, themes, themeList;
|
|
3808
3808
|
var init_theme = __esm({
|
|
3809
|
-
"
|
|
3809
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/theme.js"() {
|
|
3810
3810
|
"use strict";
|
|
3811
3811
|
init_color();
|
|
3812
3812
|
DARK = {
|
|
@@ -4017,7 +4017,7 @@ var init_theme = __esm({
|
|
|
4017
4017
|
}
|
|
4018
4018
|
});
|
|
4019
4019
|
|
|
4020
|
-
//
|
|
4020
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/layout.js
|
|
4021
4021
|
function parse(c, total) {
|
|
4022
4022
|
const min = c.min ?? 0;
|
|
4023
4023
|
const max = c.max ?? Infinity;
|
|
@@ -4191,12 +4191,12 @@ function isEmpty(rect) {
|
|
|
4191
4191
|
return rect.width <= 0 || rect.height <= 0;
|
|
4192
4192
|
}
|
|
4193
4193
|
var init_layout = __esm({
|
|
4194
|
-
"
|
|
4194
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/layout.js"() {
|
|
4195
4195
|
"use strict";
|
|
4196
4196
|
}
|
|
4197
4197
|
});
|
|
4198
4198
|
|
|
4199
|
-
//
|
|
4199
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/richtext.js
|
|
4200
4200
|
function isRich(value) {
|
|
4201
4201
|
return typeof value !== "string";
|
|
4202
4202
|
}
|
|
@@ -4401,14 +4401,14 @@ function wrapRich(value, width) {
|
|
|
4401
4401
|
return out;
|
|
4402
4402
|
}
|
|
4403
4403
|
var init_richtext = __esm({
|
|
4404
|
-
"
|
|
4404
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/richtext.js"() {
|
|
4405
4405
|
"use strict";
|
|
4406
4406
|
init_buffer();
|
|
4407
4407
|
init_unicode();
|
|
4408
4408
|
}
|
|
4409
4409
|
});
|
|
4410
4410
|
|
|
4411
|
-
//
|
|
4411
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/surface.js
|
|
4412
4412
|
function borderGlyph(style, bits2) {
|
|
4413
4413
|
const chars = BORDERS[style];
|
|
4414
4414
|
for (const [part, value] of Object.entries(PART_BITS)) {
|
|
@@ -4447,7 +4447,7 @@ function createSurface(buffer, theme, rect) {
|
|
|
4447
4447
|
}
|
|
4448
4448
|
var BORDERS, EDGE_UP, EDGE_RIGHT, EDGE_DOWN, EDGE_LEFT, PART_BITS, BITS_BY_CODEPOINT, Surface;
|
|
4449
4449
|
var init_surface = __esm({
|
|
4450
|
-
"
|
|
4450
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/surface.js"() {
|
|
4451
4451
|
"use strict";
|
|
4452
4452
|
init_layout();
|
|
4453
4453
|
init_unicode();
|
|
@@ -4758,13 +4758,13 @@ var init_surface = __esm({
|
|
|
4758
4758
|
}
|
|
4759
4759
|
});
|
|
4760
4760
|
|
|
4761
|
-
//
|
|
4761
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/braille.js
|
|
4762
4762
|
function snap(v) {
|
|
4763
4763
|
return Math.round(v + (v >= 0 ? 1e-9 : -1e-9));
|
|
4764
4764
|
}
|
|
4765
4765
|
var BRAILLE_BASE, DOT_BITS, BrailleCanvas;
|
|
4766
4766
|
var init_braille = __esm({
|
|
4767
|
-
"
|
|
4767
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/braille.js"() {
|
|
4768
4768
|
"use strict";
|
|
4769
4769
|
BRAILLE_BASE = 10240;
|
|
4770
4770
|
DOT_BITS = [
|
|
@@ -5018,7 +5018,7 @@ var init_braille = __esm({
|
|
|
5018
5018
|
}
|
|
5019
5019
|
});
|
|
5020
5020
|
|
|
5021
|
-
//
|
|
5021
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/blocks.js
|
|
5022
5022
|
function verticalGlyph(ratio2, mode = "block") {
|
|
5023
5023
|
const r = ratio2 <= 0 ? 0 : ratio2 >= 1 ? 1 : ratio2;
|
|
5024
5024
|
if (mode === "ascii")
|
|
@@ -5037,14 +5037,14 @@ function horizontalGlyph(ratio2, mode = "block") {
|
|
|
5037
5037
|
}
|
|
5038
5038
|
var HORIZONTAL_EIGHTHS, VERTICAL_EIGHTHS;
|
|
5039
5039
|
var init_blocks = __esm({
|
|
5040
|
-
"
|
|
5040
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/blocks.js"() {
|
|
5041
5041
|
"use strict";
|
|
5042
5042
|
HORIZONTAL_EIGHTHS = ["", "\u258F", "\u258E", "\u258D", "\u258C", "\u258B", "\u258A", "\u2589", "\u2588"];
|
|
5043
5043
|
VERTICAL_EIGHTHS = ["", "\u2581", "\u2582", "\u2583", "\u2584", "\u2585", "\u2586", "\u2587", "\u2588"];
|
|
5044
5044
|
}
|
|
5045
5045
|
});
|
|
5046
5046
|
|
|
5047
|
-
//
|
|
5047
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/plot.js
|
|
5048
5048
|
function bound(value) {
|
|
5049
5049
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
5050
5050
|
}
|
|
@@ -5333,7 +5333,7 @@ function donut(surface, options) {
|
|
|
5333
5333
|
blit(surface, canvas, (col, row) => colorFor.get(`${col},${row}`) ?? theme.muted, options.background);
|
|
5334
5334
|
}
|
|
5335
5335
|
var init_plot = __esm({
|
|
5336
|
-
"
|
|
5336
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/plot.js"() {
|
|
5337
5337
|
"use strict";
|
|
5338
5338
|
init_color();
|
|
5339
5339
|
init_braille();
|
|
@@ -5342,7 +5342,7 @@ var init_plot = __esm({
|
|
|
5342
5342
|
}
|
|
5343
5343
|
});
|
|
5344
5344
|
|
|
5345
|
-
//
|
|
5345
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/canvas.js
|
|
5346
5346
|
function span(bounds) {
|
|
5347
5347
|
if (!bounds)
|
|
5348
5348
|
return UNIT;
|
|
@@ -5438,7 +5438,7 @@ function drawCanvas(surface, options) {
|
|
|
5438
5438
|
}
|
|
5439
5439
|
var UNIT;
|
|
5440
5440
|
var init_canvas = __esm({
|
|
5441
|
-
"
|
|
5441
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/canvas.js"() {
|
|
5442
5442
|
"use strict";
|
|
5443
5443
|
init_color();
|
|
5444
5444
|
init_braille();
|
|
@@ -5447,7 +5447,7 @@ var init_canvas = __esm({
|
|
|
5447
5447
|
}
|
|
5448
5448
|
});
|
|
5449
5449
|
|
|
5450
|
-
//
|
|
5450
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/text.js
|
|
5451
5451
|
function attrsOf(o) {
|
|
5452
5452
|
let a = o.attrs ?? 0;
|
|
5453
5453
|
if (o.bold)
|
|
@@ -5576,7 +5576,7 @@ function drawStatusBar(surface, options) {
|
|
|
5576
5576
|
return spans;
|
|
5577
5577
|
}
|
|
5578
5578
|
var init_text = __esm({
|
|
5579
|
-
"
|
|
5579
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/text.js"() {
|
|
5580
5580
|
"use strict";
|
|
5581
5581
|
init_buffer();
|
|
5582
5582
|
init_color();
|
|
@@ -5586,7 +5586,7 @@ var init_text = __esm({
|
|
|
5586
5586
|
}
|
|
5587
5587
|
});
|
|
5588
5588
|
|
|
5589
|
-
//
|
|
5589
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/calendar.js
|
|
5590
5590
|
function daysInMonth(year, month) {
|
|
5591
5591
|
if (month === 2)
|
|
5592
5592
|
return isLeapYear(year) ? 29 : 28;
|
|
@@ -5666,7 +5666,7 @@ function calendarHeight(options) {
|
|
|
5666
5666
|
}
|
|
5667
5667
|
var MONTH_NAMES, WEEKDAY_NAMES, DAY_WIDTH, GRID_WIDTH;
|
|
5668
5668
|
var init_calendar = __esm({
|
|
5669
|
-
"
|
|
5669
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/calendar.js"() {
|
|
5670
5670
|
"use strict";
|
|
5671
5671
|
init_buffer();
|
|
5672
5672
|
init_unicode();
|
|
@@ -5690,7 +5690,7 @@ var init_calendar = __esm({
|
|
|
5690
5690
|
}
|
|
5691
5691
|
});
|
|
5692
5692
|
|
|
5693
|
-
//
|
|
5693
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/chart.js
|
|
5694
5694
|
function bound2(value) {
|
|
5695
5695
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
5696
5696
|
}
|
|
@@ -5890,7 +5890,7 @@ function plotCells(surface, series, o) {
|
|
|
5890
5890
|
});
|
|
5891
5891
|
}
|
|
5892
5892
|
var init_chart = __esm({
|
|
5893
|
-
"
|
|
5893
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/chart.js"() {
|
|
5894
5894
|
"use strict";
|
|
5895
5895
|
init_color();
|
|
5896
5896
|
init_braille();
|
|
@@ -5900,7 +5900,7 @@ var init_chart = __esm({
|
|
|
5900
5900
|
}
|
|
5901
5901
|
});
|
|
5902
5902
|
|
|
5903
|
-
//
|
|
5903
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/chart.js
|
|
5904
5904
|
function niceLabel(value) {
|
|
5905
5905
|
if (!Number.isFinite(value))
|
|
5906
5906
|
return "";
|
|
@@ -5962,7 +5962,7 @@ function drawChart(surface, options) {
|
|
|
5962
5962
|
}
|
|
5963
5963
|
}
|
|
5964
5964
|
var init_chart2 = __esm({
|
|
5965
|
-
"
|
|
5965
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/chart.js"() {
|
|
5966
5966
|
"use strict";
|
|
5967
5967
|
init_unicode();
|
|
5968
5968
|
init_theme();
|
|
@@ -5970,14 +5970,14 @@ var init_chart2 = __esm({
|
|
|
5970
5970
|
}
|
|
5971
5971
|
});
|
|
5972
5972
|
|
|
5973
|
-
//
|
|
5973
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/shadow.js
|
|
5974
5974
|
var init_shadow = __esm({
|
|
5975
|
-
"
|
|
5975
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/shadow.js"() {
|
|
5976
5976
|
"use strict";
|
|
5977
5977
|
}
|
|
5978
5978
|
});
|
|
5979
5979
|
|
|
5980
|
-
//
|
|
5980
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/surface.js
|
|
5981
5981
|
function drawClear(surface, options = {}) {
|
|
5982
5982
|
if (surface.empty)
|
|
5983
5983
|
return;
|
|
@@ -6001,16 +6001,16 @@ function drawFill(surface, options = {}) {
|
|
|
6001
6001
|
}
|
|
6002
6002
|
}
|
|
6003
6003
|
var init_surface2 = __esm({
|
|
6004
|
-
"
|
|
6004
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/surface.js"() {
|
|
6005
6005
|
"use strict";
|
|
6006
6006
|
init_unicode();
|
|
6007
6007
|
}
|
|
6008
6008
|
});
|
|
6009
6009
|
|
|
6010
|
-
//
|
|
6010
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/world-data.js
|
|
6011
6011
|
var WORLD_COUNTRIES;
|
|
6012
6012
|
var init_world_data = __esm({
|
|
6013
|
-
"
|
|
6013
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/world-data.js"() {
|
|
6014
6014
|
"use strict";
|
|
6015
6015
|
WORLD_COUNTRIES = [
|
|
6016
6016
|
{
|
|
@@ -7301,7 +7301,7 @@ var init_world_data = __esm({
|
|
|
7301
7301
|
}
|
|
7302
7302
|
});
|
|
7303
7303
|
|
|
7304
|
-
//
|
|
7304
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/world.js
|
|
7305
7305
|
function matches(country, keys) {
|
|
7306
7306
|
for (const key of keys) {
|
|
7307
7307
|
if (key.length === 0)
|
|
@@ -7366,7 +7366,7 @@ function degreesAt(column, row, width, height, x = WORLD_X, y = WORLD_Y) {
|
|
|
7366
7366
|
}
|
|
7367
7367
|
var WORLD_X, WORLD_Y;
|
|
7368
7368
|
var init_world = __esm({
|
|
7369
|
-
"
|
|
7369
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/graphics/world.js"() {
|
|
7370
7370
|
"use strict";
|
|
7371
7371
|
init_world_data();
|
|
7372
7372
|
WORLD_X = { min: -180, max: 180 };
|
|
@@ -7374,7 +7374,7 @@ var init_world = __esm({
|
|
|
7374
7374
|
}
|
|
7375
7375
|
});
|
|
7376
7376
|
|
|
7377
|
-
//
|
|
7377
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/world.js
|
|
7378
7378
|
function drawWorldMap(surface, options = {}) {
|
|
7379
7379
|
if (surface.empty)
|
|
7380
7380
|
return;
|
|
@@ -7398,14 +7398,14 @@ function countryAtCell(column, row, width, height, options = {}) {
|
|
|
7398
7398
|
return countryAt(at.lon, at.lat);
|
|
7399
7399
|
}
|
|
7400
7400
|
var init_world2 = __esm({
|
|
7401
|
-
"
|
|
7401
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/world.js"() {
|
|
7402
7402
|
"use strict";
|
|
7403
7403
|
init_canvas();
|
|
7404
7404
|
init_world();
|
|
7405
7405
|
}
|
|
7406
7406
|
});
|
|
7407
7407
|
|
|
7408
|
-
//
|
|
7408
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/scrollbar.js
|
|
7409
7409
|
function isVertical(orientation) {
|
|
7410
7410
|
return orientation === "right" || orientation === "left";
|
|
7411
7411
|
}
|
|
@@ -7461,13 +7461,13 @@ function offsetForPosition(position, track, total, viewport) {
|
|
|
7461
7461
|
return Math.round(at / usable2 * (total - visible));
|
|
7462
7462
|
}
|
|
7463
7463
|
var init_scrollbar = __esm({
|
|
7464
|
-
"
|
|
7464
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/scrollbar.js"() {
|
|
7465
7465
|
"use strict";
|
|
7466
7466
|
init_color();
|
|
7467
7467
|
}
|
|
7468
7468
|
});
|
|
7469
7469
|
|
|
7470
|
-
//
|
|
7470
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/table.js
|
|
7471
7471
|
function cellValue(row, column, index) {
|
|
7472
7472
|
if (column.render)
|
|
7473
7473
|
return column.render(row, index);
|
|
@@ -7698,7 +7698,7 @@ function drawLog(surface, options) {
|
|
|
7698
7698
|
}
|
|
7699
7699
|
}
|
|
7700
7700
|
var init_table = __esm({
|
|
7701
|
-
"
|
|
7701
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/table.js"() {
|
|
7702
7702
|
"use strict";
|
|
7703
7703
|
init_buffer();
|
|
7704
7704
|
init_color();
|
|
@@ -7709,7 +7709,7 @@ var init_table = __esm({
|
|
|
7709
7709
|
}
|
|
7710
7710
|
});
|
|
7711
7711
|
|
|
7712
|
-
//
|
|
7712
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/meters.js
|
|
7713
7713
|
function clampRatio(value) {
|
|
7714
7714
|
return value > 1 ? 1 : value > 0 ? value : 0;
|
|
7715
7715
|
}
|
|
@@ -7902,7 +7902,7 @@ function drawColumns(surface, options) {
|
|
|
7902
7902
|
}
|
|
7903
7903
|
}
|
|
7904
7904
|
var init_meters = __esm({
|
|
7905
|
-
"
|
|
7905
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/meters.js"() {
|
|
7906
7906
|
"use strict";
|
|
7907
7907
|
init_buffer();
|
|
7908
7908
|
init_color();
|
|
@@ -7913,7 +7913,7 @@ var init_meters = __esm({
|
|
|
7913
7913
|
}
|
|
7914
7914
|
});
|
|
7915
7915
|
|
|
7916
|
-
//
|
|
7916
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/controls.js
|
|
7917
7917
|
function variantColor(surface, options) {
|
|
7918
7918
|
const t = surface.theme;
|
|
7919
7919
|
if (options.color)
|
|
@@ -8137,7 +8137,7 @@ function drawTooltip(root, options) {
|
|
|
8137
8137
|
inner.text(0, 0, truncate(options.text, inner.width), { fg: theme.foreground });
|
|
8138
8138
|
}
|
|
8139
8139
|
var init_controls = __esm({
|
|
8140
|
-
"
|
|
8140
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/controls.js"() {
|
|
8141
8141
|
"use strict";
|
|
8142
8142
|
init_buffer();
|
|
8143
8143
|
init_color();
|
|
@@ -8146,7 +8146,7 @@ var init_controls = __esm({
|
|
|
8146
8146
|
}
|
|
8147
8147
|
});
|
|
8148
8148
|
|
|
8149
|
-
//
|
|
8149
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/spinner.js
|
|
8150
8150
|
function spinnerFrame(elapsed, frames, interval = 80) {
|
|
8151
8151
|
if (frames.length === 0)
|
|
8152
8152
|
return "";
|
|
@@ -8188,7 +8188,7 @@ function drawSpinner(surface, options) {
|
|
|
8188
8188
|
}
|
|
8189
8189
|
var SPINNER_FRAMES;
|
|
8190
8190
|
var init_spinner = __esm({
|
|
8191
|
-
"
|
|
8191
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/spinner.js"() {
|
|
8192
8192
|
"use strict";
|
|
8193
8193
|
init_buffer();
|
|
8194
8194
|
init_unicode();
|
|
@@ -8201,10 +8201,10 @@ var init_spinner = __esm({
|
|
|
8201
8201
|
}
|
|
8202
8202
|
});
|
|
8203
8203
|
|
|
8204
|
-
//
|
|
8204
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/emoji-data.js
|
|
8205
8205
|
var OPENEMOJI_GROUPS, OPENEMOJI_ROWS, OPENEMOJI_ORDER, OPENEMOJI_TONED, OPENEMOJI_ALIASES, OPENEMOJI_EMOTICONS;
|
|
8206
8206
|
var init_emoji_data = __esm({
|
|
8207
|
-
"
|
|
8207
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/emoji-data.js"() {
|
|
8208
8208
|
"use strict";
|
|
8209
8209
|
OPENEMOJI_GROUPS = ["Smileys & Emotion", "People & Body", "Animals & Nature", "Food & Drink", "Travel & Places", "Activities", "Objects", "Symbols", "Flags"];
|
|
8210
8210
|
OPENEMOJI_ROWS = [
|
|
@@ -14530,7 +14530,7 @@ var init_emoji_data = __esm({
|
|
|
14530
14530
|
}
|
|
14531
14531
|
});
|
|
14532
14532
|
|
|
14533
|
-
//
|
|
14533
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/emoji.js
|
|
14534
14534
|
function load() {
|
|
14535
14535
|
if (table)
|
|
14536
14536
|
return table;
|
|
@@ -14624,7 +14624,7 @@ function emojiByGroup(group) {
|
|
|
14624
14624
|
}
|
|
14625
14625
|
var TONES, TONE_NAMES, slugOf, charOf, table, emoticons;
|
|
14626
14626
|
var init_emoji = __esm({
|
|
14627
|
-
"
|
|
14627
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/emoji.js"() {
|
|
14628
14628
|
"use strict";
|
|
14629
14629
|
init_emoji_data();
|
|
14630
14630
|
TONES = ["1f3fb", "1f3fc", "1f3fd", "1f3fe", "1f3ff"];
|
|
@@ -14635,10 +14635,10 @@ var init_emoji = __esm({
|
|
|
14635
14635
|
}
|
|
14636
14636
|
});
|
|
14637
14637
|
|
|
14638
|
-
//
|
|
14638
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/icons-data.js
|
|
14639
14639
|
var OPENICON_VERSION, OPENICON_GLYPHS, OPENICON_ALIASES;
|
|
14640
14640
|
var init_icons_data = __esm({
|
|
14641
|
-
"
|
|
14641
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/icons-data.js"() {
|
|
14642
14642
|
"use strict";
|
|
14643
14643
|
OPENICON_VERSION = "2026-09-24";
|
|
14644
14644
|
OPENICON_GLYPHS = [
|
|
@@ -15176,7 +15176,7 @@ var init_icons_data = __esm({
|
|
|
15176
15176
|
}
|
|
15177
15177
|
});
|
|
15178
15178
|
|
|
15179
|
-
//
|
|
15179
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/icons.js
|
|
15180
15180
|
function iconMode(env3 = process.env) {
|
|
15181
15181
|
if (chosen)
|
|
15182
15182
|
return chosen;
|
|
@@ -15201,7 +15201,7 @@ function icon(name, options = {}) {
|
|
|
15201
15201
|
}
|
|
15202
15202
|
var openIcon, pack, chosen, detected, isMode;
|
|
15203
15203
|
var init_icons = __esm({
|
|
15204
|
-
"
|
|
15204
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/icons.js"() {
|
|
15205
15205
|
"use strict";
|
|
15206
15206
|
init_capabilities();
|
|
15207
15207
|
init_icons_data();
|
|
@@ -15216,7 +15216,7 @@ var init_icons = __esm({
|
|
|
15216
15216
|
}
|
|
15217
15217
|
});
|
|
15218
15218
|
|
|
15219
|
-
//
|
|
15219
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/emoji-picker.js
|
|
15220
15220
|
function emojiPickerItems(state, recent = []) {
|
|
15221
15221
|
if (state.query.trim())
|
|
15222
15222
|
return emojiSearch(state.query, 400).filter((e) => !TONED.test(e.key));
|
|
@@ -15381,7 +15381,7 @@ function emojiPickerIndexAt(state, layout, x, y) {
|
|
|
15381
15381
|
}
|
|
15382
15382
|
var EMOJI_RECENT, TONED, GROUP_ICONS;
|
|
15383
15383
|
var init_emoji_picker = __esm({
|
|
15384
|
-
"
|
|
15384
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/emoji-picker.js"() {
|
|
15385
15385
|
"use strict";
|
|
15386
15386
|
init_buffer();
|
|
15387
15387
|
init_color();
|
|
@@ -15395,7 +15395,7 @@ var init_emoji_picker = __esm({
|
|
|
15395
15395
|
}
|
|
15396
15396
|
});
|
|
15397
15397
|
|
|
15398
|
-
//
|
|
15398
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/data-grid.js
|
|
15399
15399
|
function dataGridWidths(columns, rows2, options = {}) {
|
|
15400
15400
|
const cap = options.maxColumnWidth ?? 40;
|
|
15401
15401
|
const sample = options.sample ?? 1e3;
|
|
@@ -15542,7 +15542,7 @@ function drawDataGrid(surface, options) {
|
|
|
15542
15542
|
}
|
|
15543
15543
|
var SEPARATOR, widthCache, firstLine;
|
|
15544
15544
|
var init_data_grid = __esm({
|
|
15545
|
-
"
|
|
15545
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/data-grid.js"() {
|
|
15546
15546
|
"use strict";
|
|
15547
15547
|
init_buffer();
|
|
15548
15548
|
init_color();
|
|
@@ -15559,9 +15559,9 @@ var init_data_grid = __esm({
|
|
|
15559
15559
|
}
|
|
15560
15560
|
});
|
|
15561
15561
|
|
|
15562
|
-
//
|
|
15562
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/index.js
|
|
15563
15563
|
var init_widgets = __esm({
|
|
15564
|
-
"
|
|
15564
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/widgets/index.js"() {
|
|
15565
15565
|
"use strict";
|
|
15566
15566
|
init_text();
|
|
15567
15567
|
init_calendar();
|
|
@@ -15579,7 +15579,7 @@ var init_widgets = __esm({
|
|
|
15579
15579
|
}
|
|
15580
15580
|
});
|
|
15581
15581
|
|
|
15582
|
-
//
|
|
15582
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/markdown.js
|
|
15583
15583
|
function markdownText(value) {
|
|
15584
15584
|
return stripAnsi(value).replace(/[\u0000-\u0008\u000b-\u001f\u007f]/g, "").replace(/([\\`*_{}\[\]<>#|!])/g, "\\$1");
|
|
15585
15585
|
}
|
|
@@ -15592,7 +15592,7 @@ function clipboardSequence(text, tmux = false) {
|
|
|
15592
15592
|
}
|
|
15593
15593
|
var MarkdownSummary;
|
|
15594
15594
|
var init_markdown = __esm({
|
|
15595
|
-
"
|
|
15595
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/markdown.js"() {
|
|
15596
15596
|
"use strict";
|
|
15597
15597
|
init_ansi();
|
|
15598
15598
|
init_richtext();
|
|
@@ -15643,7 +15643,7 @@ var init_markdown = __esm({
|
|
|
15643
15643
|
}
|
|
15644
15644
|
});
|
|
15645
15645
|
|
|
15646
|
-
//
|
|
15646
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/ui.js
|
|
15647
15647
|
function dispatchHit(regions, event) {
|
|
15648
15648
|
for (let i = regions.length - 1; i >= 0; i--) {
|
|
15649
15649
|
const hit = regions[i];
|
|
@@ -15673,7 +15673,7 @@ function countClicks(previous, press) {
|
|
|
15673
15673
|
}
|
|
15674
15674
|
var DOUBLE_CLICK_MS, Container, GridContainer;
|
|
15675
15675
|
var init_ui = __esm({
|
|
15676
|
-
"
|
|
15676
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/ui.js"() {
|
|
15677
15677
|
"use strict";
|
|
15678
15678
|
init_layout();
|
|
15679
15679
|
init_unicode();
|
|
@@ -16505,13 +16505,13 @@ var init_ui = __esm({
|
|
|
16505
16505
|
}
|
|
16506
16506
|
});
|
|
16507
16507
|
|
|
16508
|
-
//
|
|
16508
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/app.js
|
|
16509
16509
|
async function createApp(options = {}) {
|
|
16510
16510
|
return new App(options);
|
|
16511
16511
|
}
|
|
16512
16512
|
var App;
|
|
16513
16513
|
var init_app = __esm({
|
|
16514
|
-
"
|
|
16514
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/app.js"() {
|
|
16515
16515
|
"use strict";
|
|
16516
16516
|
init_buffer();
|
|
16517
16517
|
init_diff();
|
|
@@ -16987,7 +16987,7 @@ var init_app = __esm({
|
|
|
16987
16987
|
}
|
|
16988
16988
|
});
|
|
16989
16989
|
|
|
16990
|
-
//
|
|
16990
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/images.js
|
|
16991
16991
|
function imageSupport(env3 = process.env) {
|
|
16992
16992
|
const setting = (env3.HQTUI_IMAGES ?? "").toLowerCase();
|
|
16993
16993
|
if (setting === "0" || setting === "off" || setting === "false")
|
|
@@ -17078,7 +17078,7 @@ function placeholderCell(row, col) {
|
|
|
17078
17078
|
}
|
|
17079
17079
|
var import_node_path5, PLACEHOLDER, DIACRITICS, builtin, moshCache;
|
|
17080
17080
|
var init_images = __esm({
|
|
17081
|
-
"
|
|
17081
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/images.js"() {
|
|
17082
17082
|
"use strict";
|
|
17083
17083
|
import_node_path5 = require("path");
|
|
17084
17084
|
init_capabilities();
|
|
@@ -17091,9 +17091,9 @@ var init_images = __esm({
|
|
|
17091
17091
|
}
|
|
17092
17092
|
});
|
|
17093
17093
|
|
|
17094
|
-
//
|
|
17094
|
+
// ../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/index.js
|
|
17095
17095
|
var init_dist = __esm({
|
|
17096
|
-
"
|
|
17096
|
+
"../../node_modules/.pnpm/@profullstack+hqtui@0.11.0/node_modules/@profullstack/hqtui/dist/index.js"() {
|
|
17097
17097
|
"use strict";
|
|
17098
17098
|
init_app();
|
|
17099
17099
|
init_buffer();
|
|
@@ -19854,7 +19854,7 @@ var init_action_center = __esm({
|
|
|
19854
19854
|
}
|
|
19855
19855
|
});
|
|
19856
19856
|
|
|
19857
|
-
//
|
|
19857
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/error.js
|
|
19858
19858
|
var CommanderError = class extends Error {
|
|
19859
19859
|
/**
|
|
19860
19860
|
* Constructs the CommanderError class
|
|
@@ -19883,7 +19883,7 @@ var InvalidArgumentError = class extends CommanderError {
|
|
|
19883
19883
|
}
|
|
19884
19884
|
};
|
|
19885
19885
|
|
|
19886
|
-
//
|
|
19886
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/argument.js
|
|
19887
19887
|
var Argument = class {
|
|
19888
19888
|
/**
|
|
19889
19889
|
* Initialize a new command argument with the given name and description.
|
|
@@ -20004,7 +20004,7 @@ function humanReadableArgName(arg) {
|
|
|
20004
20004
|
return arg.required ? "<" + nameOutput + ">" : "[" + nameOutput + "]";
|
|
20005
20005
|
}
|
|
20006
20006
|
|
|
20007
|
-
//
|
|
20007
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/command.js
|
|
20008
20008
|
var import_node_events = require("events");
|
|
20009
20009
|
var import_node_child_process = __toESM(require("child_process"), 1);
|
|
20010
20010
|
var import_node_path = __toESM(require("path"), 1);
|
|
@@ -20012,7 +20012,7 @@ var import_node_fs = __toESM(require("fs"), 1);
|
|
|
20012
20012
|
var import_node_process = __toESM(require("process"), 1);
|
|
20013
20013
|
var import_node_util2 = require("util");
|
|
20014
20014
|
|
|
20015
|
-
//
|
|
20015
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/help.js
|
|
20016
20016
|
var import_node_util = require("util");
|
|
20017
20017
|
var Help = class {
|
|
20018
20018
|
constructor() {
|
|
@@ -20604,7 +20604,7 @@ ${itemIndentStr}`);
|
|
|
20604
20604
|
}
|
|
20605
20605
|
};
|
|
20606
20606
|
|
|
20607
|
-
//
|
|
20607
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/option.js
|
|
20608
20608
|
var Option = class {
|
|
20609
20609
|
/**
|
|
20610
20610
|
* Initialize a new `Option` with the given `flags` and `description`.
|
|
@@ -20910,7 +20910,7 @@ function splitOptionFlags(flags) {
|
|
|
20910
20910
|
return { shortFlag, longFlag };
|
|
20911
20911
|
}
|
|
20912
20912
|
|
|
20913
|
-
//
|
|
20913
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/suggestSimilar.js
|
|
20914
20914
|
var maxDistance = 3;
|
|
20915
20915
|
function editDistance(a, b) {
|
|
20916
20916
|
if (Math.abs(a.length - b.length) > maxDistance)
|
|
@@ -20985,7 +20985,7 @@ function suggestSimilar(word, candidates) {
|
|
|
20985
20985
|
return "";
|
|
20986
20986
|
}
|
|
20987
20987
|
|
|
20988
|
-
//
|
|
20988
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/command.js
|
|
20989
20989
|
var Command = class _Command extends import_node_events.EventEmitter {
|
|
20990
20990
|
/**
|
|
20991
20991
|
* Initialize a new `Command`.
|
|
@@ -23219,10 +23219,10 @@ function useColor() {
|
|
|
23219
23219
|
return void 0;
|
|
23220
23220
|
}
|
|
23221
23221
|
|
|
23222
|
-
//
|
|
23222
|
+
// ../../node_modules/.pnpm/commander@15.0.0/node_modules/commander/index.js
|
|
23223
23223
|
var program = new Command();
|
|
23224
23224
|
|
|
23225
|
-
//
|
|
23225
|
+
// ../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/utilities.js
|
|
23226
23226
|
function stringReplaceAll(string, substring, postfix) {
|
|
23227
23227
|
let index = string.indexOf(substring);
|
|
23228
23228
|
if (index === -1) {
|
|
@@ -23252,7 +23252,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
23252
23252
|
return returnValue;
|
|
23253
23253
|
}
|
|
23254
23254
|
|
|
23255
|
-
//
|
|
23255
|
+
// ../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
23256
23256
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
23257
23257
|
var ANSI_UNDERLINE_OFFSET = 20;
|
|
23258
23258
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
@@ -23474,7 +23474,7 @@ function assembleStyles() {
|
|
|
23474
23474
|
var ansiStyles = assembleStyles();
|
|
23475
23475
|
var ansi_styles_default = ansiStyles;
|
|
23476
23476
|
|
|
23477
|
-
//
|
|
23477
|
+
// ../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/vendor/supports-color/index.js
|
|
23478
23478
|
var import_node_process2 = __toESM(require("process"), 1);
|
|
23479
23479
|
var import_node_os = __toESM(require("os"), 1);
|
|
23480
23480
|
var import_node_tty = __toESM(require("tty"), 1);
|
|
@@ -23616,7 +23616,7 @@ var supportsColor = {
|
|
|
23616
23616
|
};
|
|
23617
23617
|
var supports_color_default = supportsColor;
|
|
23618
23618
|
|
|
23619
|
-
//
|
|
23619
|
+
// ../../node_modules/.pnpm/chalk@6.0.1/node_modules/chalk/source/index.js
|
|
23620
23620
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
23621
23621
|
var GENERATOR = /* @__PURE__ */ Symbol("GENERATOR");
|
|
23622
23622
|
var STYLER = /* @__PURE__ */ Symbol("STYLER");
|
|
@@ -23787,7 +23787,7 @@ var source_default = chalk;
|
|
|
23787
23787
|
// src/index.ts
|
|
23788
23788
|
var import_readline = __toESM(require("readline"));
|
|
23789
23789
|
var import_node_child_process28 = require("child_process");
|
|
23790
|
-
var
|
|
23790
|
+
var import_node_fs68 = require("fs");
|
|
23791
23791
|
var import_node_path51 = require("path");
|
|
23792
23792
|
var import_node_os19 = require("os");
|
|
23793
23793
|
|
|
@@ -31786,11 +31786,11 @@ function watchdogPathCommand(opts) {
|
|
|
31786
31786
|
var import_node_fs16 = require("fs");
|
|
31787
31787
|
var import_node_path15 = require("path");
|
|
31788
31788
|
|
|
31789
|
-
//
|
|
31789
|
+
// ../../node_modules/.pnpm/ora@9.4.1/node_modules/ora/index.js
|
|
31790
31790
|
var import_node_process8 = __toESM(require("process"), 1);
|
|
31791
31791
|
var import_node_util3 = require("util");
|
|
31792
31792
|
|
|
31793
|
-
//
|
|
31793
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
31794
31794
|
var ANSI_BACKGROUND_OFFSET2 = 10;
|
|
31795
31795
|
var wrapAnsi162 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
31796
31796
|
var wrapAnsi2562 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -31976,7 +31976,7 @@ function assembleStyles2() {
|
|
|
31976
31976
|
var ansiStyles2 = assembleStyles2();
|
|
31977
31977
|
var ansi_styles_default2 = ansiStyles2;
|
|
31978
31978
|
|
|
31979
|
-
//
|
|
31979
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.js
|
|
31980
31980
|
var import_node_process3 = __toESM(require("process"), 1);
|
|
31981
31981
|
var import_node_os6 = __toESM(require("os"), 1);
|
|
31982
31982
|
var import_node_tty2 = __toESM(require("tty"), 1);
|
|
@@ -32108,7 +32108,7 @@ var supportsColor2 = {
|
|
|
32108
32108
|
};
|
|
32109
32109
|
var supports_color_default2 = supportsColor2;
|
|
32110
32110
|
|
|
32111
|
-
//
|
|
32111
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js
|
|
32112
32112
|
function stringReplaceAll2(string, substring, replacer) {
|
|
32113
32113
|
let index = string.indexOf(substring);
|
|
32114
32114
|
if (index === -1) {
|
|
@@ -32138,7 +32138,7 @@ function stringEncaseCRLFWithFirstIndex2(string, prefix, postfix, index) {
|
|
|
32138
32138
|
return returnValue;
|
|
32139
32139
|
}
|
|
32140
32140
|
|
|
32141
|
-
//
|
|
32141
|
+
// ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js
|
|
32142
32142
|
var { stdout: stdoutColor2, stderr: stderrColor2 } = supports_color_default2;
|
|
32143
32143
|
var GENERATOR2 = /* @__PURE__ */ Symbol("GENERATOR");
|
|
32144
32144
|
var STYLER2 = /* @__PURE__ */ Symbol("STYLER");
|
|
@@ -32285,13 +32285,13 @@ var chalk2 = createChalk2();
|
|
|
32285
32285
|
var chalkStderr2 = createChalk2({ level: stderrColor2 ? stderrColor2.level : 0 });
|
|
32286
32286
|
var source_default2 = chalk2;
|
|
32287
32287
|
|
|
32288
|
-
//
|
|
32288
|
+
// ../../node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js
|
|
32289
32289
|
var import_node_process5 = __toESM(require("process"), 1);
|
|
32290
32290
|
|
|
32291
|
-
//
|
|
32291
|
+
// ../../node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js
|
|
32292
32292
|
var import_node_process4 = __toESM(require("process"), 1);
|
|
32293
32293
|
|
|
32294
|
-
//
|
|
32294
|
+
// ../../node_modules/.pnpm/mimic-function@5.0.1/node_modules/mimic-function/index.js
|
|
32295
32295
|
var copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
32296
32296
|
if (property === "length" || property === "prototype") {
|
|
32297
32297
|
return;
|
|
@@ -32337,7 +32337,7 @@ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
|
32337
32337
|
return to;
|
|
32338
32338
|
}
|
|
32339
32339
|
|
|
32340
|
-
//
|
|
32340
|
+
// ../../node_modules/.pnpm/onetime@7.0.0/node_modules/onetime/index.js
|
|
32341
32341
|
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
32342
32342
|
var onetime = (function_, options = {}) => {
|
|
32343
32343
|
if (typeof function_ !== "function") {
|
|
@@ -32368,7 +32368,7 @@ onetime.callCount = (function_) => {
|
|
|
32368
32368
|
};
|
|
32369
32369
|
var onetime_default = onetime;
|
|
32370
32370
|
|
|
32371
|
-
//
|
|
32371
|
+
// ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
|
|
32372
32372
|
var signals = [];
|
|
32373
32373
|
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
32374
32374
|
if (process.platform !== "win32") {
|
|
@@ -32392,7 +32392,7 @@ if (process.platform === "linux") {
|
|
|
32392
32392
|
signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
|
|
32393
32393
|
}
|
|
32394
32394
|
|
|
32395
|
-
//
|
|
32395
|
+
// ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
|
|
32396
32396
|
var processOk = (process11) => !!process11 && typeof process11 === "object" && typeof process11.removeListener === "function" && typeof process11.emit === "function" && typeof process11.reallyExit === "function" && typeof process11.listeners === "function" && typeof process11.kill === "function" && typeof process11.pid === "number" && typeof process11.on === "function";
|
|
32397
32397
|
var kExitEmitter = /* @__PURE__ */ Symbol.for("signal-exit emitter");
|
|
32398
32398
|
var global2 = globalThis;
|
|
@@ -32619,7 +32619,7 @@ var {
|
|
|
32619
32619
|
unload
|
|
32620
32620
|
} = signalExitWrap(processOk(process5) ? new SignalExit(process5) : new SignalExitFallback());
|
|
32621
32621
|
|
|
32622
|
-
//
|
|
32622
|
+
// ../../node_modules/.pnpm/restore-cursor@5.1.0/node_modules/restore-cursor/index.js
|
|
32623
32623
|
var terminal = import_node_process4.default.stderr.isTTY ? import_node_process4.default.stderr : import_node_process4.default.stdout.isTTY ? import_node_process4.default.stdout : void 0;
|
|
32624
32624
|
var restoreCursor = terminal ? onetime_default(() => {
|
|
32625
32625
|
onExit(() => {
|
|
@@ -32629,7 +32629,7 @@ var restoreCursor = terminal ? onetime_default(() => {
|
|
|
32629
32629
|
};
|
|
32630
32630
|
var restore_cursor_default = restoreCursor;
|
|
32631
32631
|
|
|
32632
|
-
//
|
|
32632
|
+
// ../../node_modules/.pnpm/cli-cursor@5.0.0/node_modules/cli-cursor/index.js
|
|
32633
32633
|
var isHidden = false;
|
|
32634
32634
|
var cliCursor = {};
|
|
32635
32635
|
cliCursor.show = (writableStream = import_node_process5.default.stderr) => {
|
|
@@ -32659,7 +32659,7 @@ cliCursor.toggle = (force, writableStream) => {
|
|
|
32659
32659
|
};
|
|
32660
32660
|
var cli_cursor_default = cliCursor;
|
|
32661
32661
|
|
|
32662
|
-
//
|
|
32662
|
+
// ../../node_modules/.pnpm/cli-spinners@3.4.0/node_modules/cli-spinners/spinners.json
|
|
32663
32663
|
var spinners_default = {
|
|
32664
32664
|
dots: {
|
|
32665
32665
|
interval: 80,
|
|
@@ -34358,11 +34358,11 @@ var spinners_default = {
|
|
|
34358
34358
|
}
|
|
34359
34359
|
};
|
|
34360
34360
|
|
|
34361
|
-
//
|
|
34361
|
+
// ../../node_modules/.pnpm/cli-spinners@3.4.0/node_modules/cli-spinners/index.js
|
|
34362
34362
|
var cli_spinners_default = spinners_default;
|
|
34363
34363
|
var spinnersList = Object.keys(spinners_default);
|
|
34364
34364
|
|
|
34365
|
-
//
|
|
34365
|
+
// ../../node_modules/.pnpm/log-symbols@7.0.1/node_modules/log-symbols/symbols.js
|
|
34366
34366
|
var symbols_exports = {};
|
|
34367
34367
|
__export(symbols_exports, {
|
|
34368
34368
|
error: () => error,
|
|
@@ -34371,7 +34371,7 @@ __export(symbols_exports, {
|
|
|
34371
34371
|
warning: () => warning
|
|
34372
34372
|
});
|
|
34373
34373
|
|
|
34374
|
-
//
|
|
34374
|
+
// ../../node_modules/.pnpm/yoctocolors@2.2.0/node_modules/yoctocolors/base.js
|
|
34375
34375
|
var import_node_tty3 = __toESM(require("tty"), 1);
|
|
34376
34376
|
var hasColors = import_node_tty3.default?.WriteStream?.prototype?.hasColors?.() ?? false;
|
|
34377
34377
|
var format = (open2, close) => {
|
|
@@ -34461,7 +34461,7 @@ var underlineMagentaBright = format("58;5;13", 59);
|
|
|
34461
34461
|
var underlineCyanBright = format("58;5;14", 59);
|
|
34462
34462
|
var underlineWhiteBright = format("58;5;15", 59);
|
|
34463
34463
|
|
|
34464
|
-
//
|
|
34464
|
+
// ../../node_modules/.pnpm/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
34465
34465
|
var import_node_process6 = __toESM(require("process"), 1);
|
|
34466
34466
|
function isUnicodeSupported() {
|
|
34467
34467
|
const { env: env3 } = import_node_process6.default;
|
|
@@ -34472,14 +34472,14 @@ function isUnicodeSupported() {
|
|
|
34472
34472
|
return Boolean(env3.WT_SESSION) || Boolean(env3.TERMINUS_SUBLIME) || env3.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env3.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
34473
34473
|
}
|
|
34474
34474
|
|
|
34475
|
-
//
|
|
34475
|
+
// ../../node_modules/.pnpm/log-symbols@7.0.1/node_modules/log-symbols/symbols.js
|
|
34476
34476
|
var _isUnicodeSupported = isUnicodeSupported();
|
|
34477
34477
|
var info = blue2(_isUnicodeSupported ? "\u2139" : "i");
|
|
34478
34478
|
var success = green2(_isUnicodeSupported ? "\u2714" : "\u221A");
|
|
34479
34479
|
var warning = yellow(_isUnicodeSupported ? "\u26A0" : "\u203C");
|
|
34480
34480
|
var error = red2(_isUnicodeSupported ? "\u2716" : "\xD7");
|
|
34481
34481
|
|
|
34482
|
-
//
|
|
34482
|
+
// ../../node_modules/.pnpm/ansi-regex@6.4.0/node_modules/ansi-regex/index.js
|
|
34483
34483
|
function ansiRegex({ onlyFirst = false } = {}) {
|
|
34484
34484
|
const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)";
|
|
34485
34485
|
const osc = `(?:(?:\\u001B\\]|\\u009D)[^\\u0007\\u001B\\u009C\\u009D]*${ST})`;
|
|
@@ -34488,7 +34488,7 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
34488
34488
|
return new RegExp(pattern, onlyFirst ? void 0 : "g");
|
|
34489
34489
|
}
|
|
34490
34490
|
|
|
34491
|
-
//
|
|
34491
|
+
// ../../node_modules/.pnpm/strip-ansi@7.2.0/node_modules/strip-ansi/index.js
|
|
34492
34492
|
var regex = ansiRegex();
|
|
34493
34493
|
function stripAnsi2(string) {
|
|
34494
34494
|
if (typeof string !== "string") {
|
|
@@ -34500,7 +34500,7 @@ function stripAnsi2(string) {
|
|
|
34500
34500
|
return string.replace(regex, "");
|
|
34501
34501
|
}
|
|
34502
34502
|
|
|
34503
|
-
//
|
|
34503
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup-data.js
|
|
34504
34504
|
var ambiguousMinimalCodePoint = 161;
|
|
34505
34505
|
var ambiguousMaximumCodePoint = 1114109;
|
|
34506
34506
|
var ambiguousRanges = [161, 161, 164, 164, 167, 168, 170, 170, 173, 174, 176, 180, 182, 186, 188, 191, 198, 198, 208, 208, 215, 216, 222, 225, 230, 230, 232, 234, 236, 237, 240, 240, 242, 243, 247, 250, 252, 252, 254, 254, 257, 257, 273, 273, 275, 275, 283, 283, 294, 295, 299, 299, 305, 307, 312, 312, 319, 322, 324, 324, 328, 331, 333, 333, 338, 339, 358, 359, 363, 363, 462, 462, 464, 464, 466, 466, 468, 468, 470, 470, 472, 472, 474, 474, 476, 476, 593, 593, 609, 609, 708, 708, 711, 711, 713, 715, 717, 717, 720, 720, 728, 731, 733, 733, 735, 735, 768, 879, 913, 929, 931, 937, 945, 961, 963, 969, 1025, 1025, 1040, 1103, 1105, 1105, 8208, 8208, 8211, 8214, 8216, 8217, 8220, 8221, 8224, 8226, 8228, 8231, 8240, 8240, 8242, 8243, 8245, 8245, 8251, 8251, 8254, 8254, 8308, 8308, 8319, 8319, 8321, 8324, 8364, 8364, 8451, 8451, 8453, 8453, 8457, 8457, 8467, 8467, 8470, 8470, 8481, 8482, 8486, 8486, 8491, 8491, 8531, 8532, 8539, 8542, 8544, 8555, 8560, 8569, 8585, 8585, 8592, 8601, 8632, 8633, 8658, 8658, 8660, 8660, 8679, 8679, 8704, 8704, 8706, 8707, 8711, 8712, 8715, 8715, 8719, 8719, 8721, 8721, 8725, 8725, 8730, 8730, 8733, 8736, 8739, 8739, 8741, 8741, 8743, 8748, 8750, 8750, 8756, 8759, 8764, 8765, 8776, 8776, 8780, 8780, 8786, 8786, 8800, 8801, 8804, 8807, 8810, 8811, 8814, 8815, 8834, 8835, 8838, 8839, 8853, 8853, 8857, 8857, 8869, 8869, 8895, 8895, 8978, 8978, 9312, 9449, 9451, 9547, 9552, 9587, 9600, 9615, 9618, 9621, 9632, 9633, 9635, 9641, 9650, 9651, 9654, 9655, 9660, 9661, 9664, 9665, 9670, 9672, 9675, 9675, 9678, 9681, 9698, 9701, 9711, 9711, 9733, 9734, 9737, 9737, 9742, 9743, 9756, 9756, 9758, 9758, 9792, 9792, 9794, 9794, 9824, 9825, 9827, 9829, 9831, 9834, 9836, 9837, 9839, 9839, 9886, 9887, 9919, 9919, 9926, 9933, 9935, 9939, 9941, 9953, 9955, 9955, 9960, 9961, 9963, 9969, 9972, 9972, 9974, 9977, 9979, 9980, 9982, 9983, 10045, 10045, 10102, 10111, 11094, 11097, 12872, 12879, 57344, 63743, 65024, 65039, 65533, 65533, 127232, 127242, 127248, 127277, 127280, 127337, 127344, 127373, 127375, 127376, 127387, 127404, 917760, 917999, 983040, 1048573, 1048576, 1114109];
|
|
@@ -34511,7 +34511,7 @@ var wideMinimalCodePoint = 4352;
|
|
|
34511
34511
|
var wideMaximumCodePoint = 262141;
|
|
34512
34512
|
var wideRanges = [4352, 4447, 8986, 8987, 9001, 9002, 9193, 9196, 9200, 9200, 9203, 9203, 9725, 9726, 9748, 9749, 9776, 9783, 9800, 9811, 9855, 9855, 9866, 9871, 9875, 9875, 9889, 9889, 9898, 9899, 9917, 9918, 9924, 9925, 9934, 9934, 9940, 9940, 9962, 9962, 9970, 9971, 9973, 9973, 9978, 9978, 9981, 9981, 9989, 9989, 9994, 9995, 10024, 10024, 10060, 10060, 10062, 10062, 10067, 10069, 10071, 10071, 10133, 10135, 10160, 10160, 10175, 10175, 11035, 11036, 11088, 11088, 11093, 11093, 11904, 11929, 11931, 12019, 12032, 12245, 12272, 12287, 12289, 12350, 12353, 12438, 12441, 12543, 12549, 12591, 12593, 12686, 12688, 12773, 12783, 12830, 12832, 12871, 12880, 42124, 42128, 42182, 43360, 43388, 44032, 55203, 63744, 64255, 65040, 65049, 65072, 65106, 65108, 65126, 65128, 65131, 94176, 94180, 94192, 94198, 94208, 101594, 101631, 101664, 101760, 101874, 101888, 102801, 102816, 102866, 110576, 110579, 110581, 110587, 110589, 110590, 110592, 110888, 110898, 110898, 110928, 110930, 110933, 110933, 110948, 110952, 110960, 111355, 119552, 119638, 119648, 119670, 126980, 126980, 127183, 127183, 127374, 127374, 127377, 127386, 127406, 127406, 127488, 127490, 127504, 127547, 127552, 127560, 127568, 127569, 127584, 127589, 127744, 127776, 127789, 127797, 127799, 127868, 127870, 127891, 127904, 127946, 127951, 127955, 127968, 127984, 127988, 127988, 127992, 128062, 128064, 128064, 128066, 128252, 128255, 128317, 128331, 128334, 128336, 128359, 128378, 128378, 128405, 128406, 128420, 128420, 128507, 128591, 128640, 128709, 128716, 128716, 128720, 128722, 128725, 128729, 128732, 128735, 128747, 128748, 128756, 128764, 128986, 128986, 128992, 129003, 129008, 129008, 129292, 129338, 129340, 129349, 129351, 129535, 129648, 129660, 129664, 129734, 129736, 129736, 129740, 129757, 129759, 129771, 129775, 129786, 131072, 196605, 196608, 262141];
|
|
34513
34513
|
|
|
34514
|
-
//
|
|
34514
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/utilities.js
|
|
34515
34515
|
var isInRange = (ranges, codePoint) => {
|
|
34516
34516
|
let low = 0;
|
|
34517
34517
|
let high = Math.floor(ranges.length / 2) - 1;
|
|
@@ -34529,7 +34529,7 @@ var isInRange = (ranges, codePoint) => {
|
|
|
34529
34529
|
return false;
|
|
34530
34530
|
};
|
|
34531
34531
|
|
|
34532
|
-
//
|
|
34532
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/lookup.js
|
|
34533
34533
|
var commonCjkCodePoint = 19968;
|
|
34534
34534
|
var [wideFastPathStart, wideFastPathEnd] = /* @__PURE__ */ findWideFastPathRange(wideRanges);
|
|
34535
34535
|
function findWideFastPathRange(ranges) {
|
|
@@ -34570,7 +34570,7 @@ var isWide = (codePoint) => {
|
|
|
34570
34570
|
return isInRange(wideRanges, codePoint);
|
|
34571
34571
|
};
|
|
34572
34572
|
|
|
34573
|
-
//
|
|
34573
|
+
// ../../node_modules/.pnpm/get-east-asian-width@1.7.0/node_modules/get-east-asian-width/index.js
|
|
34574
34574
|
function validate(codePoint) {
|
|
34575
34575
|
if (!Number.isSafeInteger(codePoint)) {
|
|
34576
34576
|
throw new TypeError(`Expected a code point, got \`${typeof codePoint}\`.`);
|
|
@@ -34584,7 +34584,7 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
|
34584
34584
|
return 1;
|
|
34585
34585
|
}
|
|
34586
34586
|
|
|
34587
|
-
//
|
|
34587
|
+
// ../../node_modules/.pnpm/string-width@8.3.0/node_modules/string-width/index.js
|
|
34588
34588
|
var segmenter = new Intl.Segmenter();
|
|
34589
34589
|
var visibleCharacterRegex = new RegExp("[^\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Nonspacing_Mark}\\p{Enclosing_Mark}\\p{Surrogate}]", "v");
|
|
34590
34590
|
var spacingMarkRegex = new RegExp("\\p{Spacing_Mark}", "v");
|
|
@@ -34707,14 +34707,14 @@ function stringWidth2(input, options = {}) {
|
|
|
34707
34707
|
return width;
|
|
34708
34708
|
}
|
|
34709
34709
|
|
|
34710
|
-
//
|
|
34710
|
+
// ../../node_modules/.pnpm/is-interactive@2.0.0/node_modules/is-interactive/index.js
|
|
34711
34711
|
function isInteractive({ stream = process.stdout } = {}) {
|
|
34712
34712
|
return Boolean(
|
|
34713
34713
|
stream && stream.isTTY && process.env.TERM !== "dumb" && !("CI" in process.env)
|
|
34714
34714
|
);
|
|
34715
34715
|
}
|
|
34716
34716
|
|
|
34717
|
-
//
|
|
34717
|
+
// ../../node_modules/.pnpm/stdin-discarder@0.3.2/node_modules/stdin-discarder/index.js
|
|
34718
34718
|
var import_node_process7 = __toESM(require("process"), 1);
|
|
34719
34719
|
var ASCII_ETX_CODE = 3;
|
|
34720
34720
|
var StdinDiscarder = class {
|
|
@@ -34780,7 +34780,7 @@ var StdinDiscarder = class {
|
|
|
34780
34780
|
var stdinDiscarder = new StdinDiscarder();
|
|
34781
34781
|
var stdin_discarder_default = Object.freeze(stdinDiscarder);
|
|
34782
34782
|
|
|
34783
|
-
//
|
|
34783
|
+
// ../../node_modules/.pnpm/ora@9.4.1/node_modules/ora/index.js
|
|
34784
34784
|
var RENDER_DEFERRAL_TIMEOUT = 200;
|
|
34785
34785
|
var SYNCHRONIZED_OUTPUT_ENABLE = "\x1B[?2026h";
|
|
34786
34786
|
var SYNCHRONIZED_OUTPUT_DISABLE = "\x1B[?2026l";
|
|
@@ -41890,12 +41890,12 @@ async function sshConnect(options) {
|
|
|
41890
41890
|
|
|
41891
41891
|
// src/commands/daemon.ts
|
|
41892
41892
|
var import_node_child_process20 = require("child_process");
|
|
41893
|
-
var import_node_fs51 = require("fs");
|
|
41894
|
-
var import_node_path40 = require("path");
|
|
41895
41893
|
var import_node_fs52 = require("fs");
|
|
41894
|
+
var import_node_path40 = require("path");
|
|
41895
|
+
var import_node_fs53 = require("fs");
|
|
41896
41896
|
|
|
41897
41897
|
// src/daemon/index.ts
|
|
41898
|
-
var
|
|
41898
|
+
var import_node_fs51 = require("fs");
|
|
41899
41899
|
var import_node_child_process19 = require("child_process");
|
|
41900
41900
|
var import_node_os14 = require("os");
|
|
41901
41901
|
var import_node_path39 = require("path");
|
|
@@ -48089,8 +48089,68 @@ var SshIntrusionWatch = class {
|
|
|
48089
48089
|
}
|
|
48090
48090
|
};
|
|
48091
48091
|
|
|
48092
|
-
// src/daemon/
|
|
48092
|
+
// src/daemon/key-directory.ts
|
|
48093
48093
|
var import_node_fs44 = require("fs");
|
|
48094
|
+
var fsIO3 = {
|
|
48095
|
+
readFile: (p) => {
|
|
48096
|
+
try {
|
|
48097
|
+
return (0, import_node_fs44.readFileSync)(p, "utf-8");
|
|
48098
|
+
} catch {
|
|
48099
|
+
return null;
|
|
48100
|
+
}
|
|
48101
|
+
},
|
|
48102
|
+
readDir: (p) => {
|
|
48103
|
+
try {
|
|
48104
|
+
return (0, import_node_fs44.readdirSync)(p);
|
|
48105
|
+
} catch {
|
|
48106
|
+
return null;
|
|
48107
|
+
}
|
|
48108
|
+
},
|
|
48109
|
+
exists: (p) => (0, import_node_fs44.existsSync)(p)
|
|
48110
|
+
};
|
|
48111
|
+
var KeyDirectory = class {
|
|
48112
|
+
constructor(io = fsIO3, now = Date.now, ttlMs = 3e5) {
|
|
48113
|
+
this.io = io;
|
|
48114
|
+
this.now = now;
|
|
48115
|
+
this.ttlMs = ttlMs;
|
|
48116
|
+
}
|
|
48117
|
+
io;
|
|
48118
|
+
now;
|
|
48119
|
+
ttlMs;
|
|
48120
|
+
cache = { at: -Infinity, byFp: /* @__PURE__ */ new Map() };
|
|
48121
|
+
lookup(fingerprint) {
|
|
48122
|
+
if (this.now() - this.cache.at > this.ttlMs) {
|
|
48123
|
+
const byFp = /* @__PURE__ */ new Map();
|
|
48124
|
+
for (const [account, keys] of Object.entries(takeSnapshot(this.io).keys)) {
|
|
48125
|
+
for (const [fp, k] of Object.entries(keys)) if (!byFp.has(fp)) byFp.set(fp, { account, comment: k.comment });
|
|
48126
|
+
}
|
|
48127
|
+
this.cache = { at: this.now(), byFp };
|
|
48128
|
+
}
|
|
48129
|
+
return this.cache.byFp.get(fingerprint) ?? null;
|
|
48130
|
+
}
|
|
48131
|
+
};
|
|
48132
|
+
function enrichLoginEvent(event, keys) {
|
|
48133
|
+
if (event.module !== "ssh-guard") return;
|
|
48134
|
+
const details = event.details;
|
|
48135
|
+
const fp = details?.fingerprint;
|
|
48136
|
+
if (!details || typeof fp !== "string" || !fp.startsWith("SHA256:") || "key_kind" in details) return;
|
|
48137
|
+
let entry = null;
|
|
48138
|
+
try {
|
|
48139
|
+
entry = keys.lookup(fp);
|
|
48140
|
+
} catch {
|
|
48141
|
+
entry = null;
|
|
48142
|
+
}
|
|
48143
|
+
if (!entry) {
|
|
48144
|
+
details.key_kind = "unknown";
|
|
48145
|
+
return;
|
|
48146
|
+
}
|
|
48147
|
+
details.key_account = entry.account;
|
|
48148
|
+
if (entry.comment) details.key_comment = entry.comment;
|
|
48149
|
+
details.key_kind = isAutomationKeyComment(entry.comment) ? "automation" : "person";
|
|
48150
|
+
}
|
|
48151
|
+
|
|
48152
|
+
// src/daemon/workers/lightning-watch.ts
|
|
48153
|
+
var import_node_fs45 = require("fs");
|
|
48094
48154
|
var DEFAULT_CLN_LOGS = [
|
|
48095
48155
|
"/home/lightning/.lightning/cln.log",
|
|
48096
48156
|
"/root/.lightning/cln.log",
|
|
@@ -48146,9 +48206,9 @@ var LightningWatch = class {
|
|
|
48146
48206
|
if (this.opts.enabled === false) return [];
|
|
48147
48207
|
const found = [];
|
|
48148
48208
|
for (const path2 of this.opts.paths?.length ? this.opts.paths : DEFAULT_CLN_LOGS) {
|
|
48149
|
-
if (!(0,
|
|
48209
|
+
if (!(0, import_node_fs45.existsSync)(path2)) continue;
|
|
48150
48210
|
try {
|
|
48151
|
-
(0,
|
|
48211
|
+
(0, import_node_fs45.accessSync)(path2, import_node_fs45.constants.R_OK);
|
|
48152
48212
|
} catch {
|
|
48153
48213
|
continue;
|
|
48154
48214
|
}
|
|
@@ -48183,7 +48243,7 @@ var LightningWatch = class {
|
|
|
48183
48243
|
};
|
|
48184
48244
|
|
|
48185
48245
|
// src/core/tor-exits.ts
|
|
48186
|
-
var
|
|
48246
|
+
var import_node_fs46 = require("fs");
|
|
48187
48247
|
var import_node_path35 = require("path");
|
|
48188
48248
|
var import_node_net15 = require("net");
|
|
48189
48249
|
var TOR_BULK_EXIT_LIST_URL = "https://check.torproject.org/torbulkexitlist";
|
|
@@ -48252,10 +48312,10 @@ var TorExitList = class _TorExitList {
|
|
|
48252
48312
|
}
|
|
48253
48313
|
loadCache() {
|
|
48254
48314
|
try {
|
|
48255
|
-
if (!(0,
|
|
48256
|
-
const parsed = parseTorExitList((0,
|
|
48315
|
+
if (!(0, import_node_fs46.existsSync)(this.opts.cachePath)) return false;
|
|
48316
|
+
const parsed = parseTorExitList((0, import_node_fs46.readFileSync)(this.opts.cachePath, "utf-8"));
|
|
48257
48317
|
if (parsed.size === 0) return false;
|
|
48258
|
-
this.load(parsed, (0,
|
|
48318
|
+
this.load(parsed, (0, import_node_fs46.statSync)(this.opts.cachePath).mtimeMs);
|
|
48259
48319
|
this.log(`[tor] loaded ${parsed.size} Tor exit addresses from cache (${new Date(this.updatedAt).toISOString()})`);
|
|
48260
48320
|
return true;
|
|
48261
48321
|
} catch (err) {
|
|
@@ -48287,9 +48347,9 @@ var TorExitList = class _TorExitList {
|
|
|
48287
48347
|
const before2 = this.exits.size;
|
|
48288
48348
|
this.load(parsed);
|
|
48289
48349
|
try {
|
|
48290
|
-
(0,
|
|
48291
|
-
(0,
|
|
48292
|
-
(0,
|
|
48350
|
+
(0, import_node_fs46.mkdirSync)((0, import_node_path35.dirname)(this.opts.cachePath), { recursive: true });
|
|
48351
|
+
(0, import_node_fs46.writeFileSync)(`${this.opts.cachePath}.tmp`, [...parsed].join("\n") + "\n");
|
|
48352
|
+
(0, import_node_fs46.renameSync)(`${this.opts.cachePath}.tmp`, this.opts.cachePath);
|
|
48293
48353
|
} catch (err) {
|
|
48294
48354
|
this.log(`[tor] could not save the exit list cache: ${err.message}`);
|
|
48295
48355
|
}
|
|
@@ -48330,6 +48390,9 @@ var EVIDENCE_FIELDS = [
|
|
|
48330
48390
|
"system_uid",
|
|
48331
48391
|
"fingerprint",
|
|
48332
48392
|
"key_type",
|
|
48393
|
+
"key_comment",
|
|
48394
|
+
"key_kind",
|
|
48395
|
+
"key_account",
|
|
48333
48396
|
"auth_method",
|
|
48334
48397
|
"port",
|
|
48335
48398
|
"path",
|
|
@@ -48507,7 +48570,7 @@ var RuleEngine = class {
|
|
|
48507
48570
|
};
|
|
48508
48571
|
|
|
48509
48572
|
// src/daemon/rules/loader.ts
|
|
48510
|
-
var
|
|
48573
|
+
var import_node_fs47 = require("fs");
|
|
48511
48574
|
var import_node_path36 = require("path");
|
|
48512
48575
|
|
|
48513
48576
|
// src/daemon/rules/default-rules.ts
|
|
@@ -49099,11 +49162,11 @@ var RULES_DIR = "/etc/threatcrush/rules.d";
|
|
|
49099
49162
|
function loadAllRules(customDir) {
|
|
49100
49163
|
const rules = [...DEFAULT_RULES];
|
|
49101
49164
|
const dir = customDir || RULES_DIR;
|
|
49102
|
-
if ((0,
|
|
49103
|
-
const files = (0,
|
|
49165
|
+
if ((0, import_node_fs47.existsSync)(dir)) {
|
|
49166
|
+
const files = (0, import_node_fs47.readdirSync)(dir).filter((f) => f.endsWith(".json"));
|
|
49104
49167
|
for (const file of files) {
|
|
49105
49168
|
try {
|
|
49106
|
-
const raw = (0,
|
|
49169
|
+
const raw = (0, import_node_fs47.readFileSync)((0, import_node_path36.join)(dir, file), "utf-8");
|
|
49107
49170
|
const parsed = JSON.parse(raw);
|
|
49108
49171
|
const customRules = Array.isArray(parsed) ? parsed : [parsed];
|
|
49109
49172
|
for (const rule of customRules) {
|
|
@@ -49135,7 +49198,7 @@ function loadAllRules(customDir) {
|
|
|
49135
49198
|
|
|
49136
49199
|
// src/daemon/firewall/adapters.ts
|
|
49137
49200
|
var import_node_child_process16 = require("child_process");
|
|
49138
|
-
var
|
|
49201
|
+
var import_node_fs48 = require("fs");
|
|
49139
49202
|
var import_node_path37 = require("path");
|
|
49140
49203
|
var import_node_net16 = require("net");
|
|
49141
49204
|
function assertValidFirewallIp(ip) {
|
|
@@ -49149,9 +49212,9 @@ function assertBannableIp(ip) {
|
|
|
49149
49212
|
}
|
|
49150
49213
|
}
|
|
49151
49214
|
function writeIfAbsent(path2, contents) {
|
|
49152
|
-
(0,
|
|
49215
|
+
(0, import_node_fs48.mkdirSync)((0, import_node_path37.dirname)(path2), { recursive: true });
|
|
49153
49216
|
try {
|
|
49154
|
-
(0,
|
|
49217
|
+
(0, import_node_fs48.writeFileSync)(path2, contents, { flag: "wx" });
|
|
49155
49218
|
} catch (err) {
|
|
49156
49219
|
if (err.code !== "EEXIST") throw err;
|
|
49157
49220
|
}
|
|
@@ -49410,7 +49473,7 @@ function detectFirewallAdapter(backend = "auto") {
|
|
|
49410
49473
|
}
|
|
49411
49474
|
|
|
49412
49475
|
// src/daemon/firewall/remediation.ts
|
|
49413
|
-
var
|
|
49476
|
+
var import_node_fs49 = require("fs");
|
|
49414
49477
|
var import_node_child_process17 = require("child_process");
|
|
49415
49478
|
var import_node_net17 = require("net");
|
|
49416
49479
|
init_paths();
|
|
@@ -49482,19 +49545,19 @@ var defaultDiscovery = {
|
|
|
49482
49545
|
const snapshot = takeSnapshot({
|
|
49483
49546
|
readFile: (p) => {
|
|
49484
49547
|
try {
|
|
49485
|
-
return (0,
|
|
49548
|
+
return (0, import_node_fs49.readFileSync)(p, "utf-8");
|
|
49486
49549
|
} catch {
|
|
49487
49550
|
return null;
|
|
49488
49551
|
}
|
|
49489
49552
|
},
|
|
49490
49553
|
readDir: (p) => {
|
|
49491
49554
|
try {
|
|
49492
|
-
return (0,
|
|
49555
|
+
return (0, import_node_fs49.readdirSync)(p);
|
|
49493
49556
|
} catch {
|
|
49494
49557
|
return null;
|
|
49495
49558
|
}
|
|
49496
49559
|
},
|
|
49497
|
-
exists: (p) => (0,
|
|
49560
|
+
exists: (p) => (0, import_node_fs49.existsSync)(p)
|
|
49498
49561
|
});
|
|
49499
49562
|
const out = /* @__PURE__ */ new Set();
|
|
49500
49563
|
for (const keys of Object.values(snapshot.keys)) {
|
|
@@ -50007,7 +50070,7 @@ var RemediationManager = class {
|
|
|
50007
50070
|
}
|
|
50008
50071
|
logLine(line2) {
|
|
50009
50072
|
try {
|
|
50010
|
-
(0,
|
|
50073
|
+
(0, import_node_fs49.appendFileSync)(PATHS.logFile, `${(/* @__PURE__ */ new Date()).toISOString()} ${line2}
|
|
50011
50074
|
`);
|
|
50012
50075
|
} catch {
|
|
50013
50076
|
}
|
|
@@ -50051,13 +50114,13 @@ function remediationSettings(section) {
|
|
|
50051
50114
|
init_backoff();
|
|
50052
50115
|
|
|
50053
50116
|
// src/daemon/watchdog-service.ts
|
|
50054
|
-
var
|
|
50117
|
+
var import_node_fs50 = require("fs");
|
|
50055
50118
|
var import_node_path38 = require("path");
|
|
50056
50119
|
function defaultShareGid() {
|
|
50057
50120
|
const isRoot4 = process.platform === "linux" && typeof process.getuid === "function" && process.getuid() === 0;
|
|
50058
50121
|
if (!isRoot4) return void 0;
|
|
50059
50122
|
try {
|
|
50060
|
-
return (0,
|
|
50123
|
+
return (0, import_node_fs50.statSync)("/var/log/auth.log").gid;
|
|
50061
50124
|
} catch {
|
|
50062
50125
|
return void 0;
|
|
50063
50126
|
}
|
|
@@ -50178,7 +50241,7 @@ function versionOfNode(path2) {
|
|
|
50178
50241
|
// src/daemon/index.ts
|
|
50179
50242
|
function readVersion2() {
|
|
50180
50243
|
try {
|
|
50181
|
-
const pkg = JSON.parse((0,
|
|
50244
|
+
const pkg = JSON.parse((0, import_node_fs51.readFileSync)((0, import_node_path39.join)(__dirname, "..", "package.json"), "utf-8"));
|
|
50182
50245
|
return pkg.version || "0.0.0";
|
|
50183
50246
|
} catch {
|
|
50184
50247
|
return "0.0.0";
|
|
@@ -50209,7 +50272,7 @@ async function runPatchCheck() {
|
|
|
50209
50272
|
}
|
|
50210
50273
|
function logLine(line2) {
|
|
50211
50274
|
try {
|
|
50212
|
-
(0,
|
|
50275
|
+
(0, import_node_fs51.appendFileSync)(PATHS.logFile, `${(/* @__PURE__ */ new Date()).toISOString()} ${line2}
|
|
50213
50276
|
`);
|
|
50214
50277
|
} catch {
|
|
50215
50278
|
}
|
|
@@ -50292,8 +50355,11 @@ async function runDaemon() {
|
|
|
50292
50355
|
bus.publish(event);
|
|
50293
50356
|
});
|
|
50294
50357
|
ruleEngine.loadRules(loadAllRules());
|
|
50358
|
+
const keyDirectory = new KeyDirectory();
|
|
50295
50359
|
bus.on("event", (event) => {
|
|
50296
|
-
if (event.module
|
|
50360
|
+
if (event.module === "rule-engine") return;
|
|
50361
|
+
enrichLoginEvent(event, keyDirectory);
|
|
50362
|
+
ruleEngine.evaluate(event);
|
|
50297
50363
|
});
|
|
50298
50364
|
logLine(`[daemon] rule engine loaded ${ruleEngine.getRules().length} rules`);
|
|
50299
50365
|
setInterval(() => ruleEngine.cleanup(), 6e4);
|
|
@@ -50576,7 +50642,7 @@ async function daemonStart() {
|
|
|
50576
50642
|
return;
|
|
50577
50643
|
}
|
|
50578
50644
|
ensureRuntimeDirs();
|
|
50579
|
-
if (!(0,
|
|
50645
|
+
if (!(0, import_node_fs52.existsSync)(DAEMON_ENTRY)) {
|
|
50580
50646
|
console.log(source_default.red(` Daemon entry not found at ${DAEMON_ENTRY}.`));
|
|
50581
50647
|
console.log(source_default.dim(" Reinstall with `threatcrush update` or `pnpm run build` in the cli package."));
|
|
50582
50648
|
return;
|
|
@@ -50584,8 +50650,8 @@ async function daemonStart() {
|
|
|
50584
50650
|
let out;
|
|
50585
50651
|
let err;
|
|
50586
50652
|
try {
|
|
50587
|
-
out = (0,
|
|
50588
|
-
err = (0,
|
|
50653
|
+
out = (0, import_node_fs53.openSync)(PATHS.logFile, "a");
|
|
50654
|
+
err = (0, import_node_fs53.openSync)(PATHS.logFile, "a");
|
|
50589
50655
|
} catch (e) {
|
|
50590
50656
|
const code = e.code;
|
|
50591
50657
|
console.log(source_default.red(` \u2717 Cannot write daemon log at ${PATHS.logFile} (${code ?? "error"}).`));
|
|
@@ -50673,12 +50739,12 @@ async function waitForExit(pid, timeoutMs) {
|
|
|
50673
50739
|
}
|
|
50674
50740
|
async function releaseStaleSocket() {
|
|
50675
50741
|
const deadline = Date.now() + 2e3;
|
|
50676
|
-
while ((0,
|
|
50742
|
+
while ((0, import_node_fs52.existsSync)(PATHS.socket) && Date.now() < deadline) {
|
|
50677
50743
|
await new Promise((r) => setTimeout(r, 50));
|
|
50678
50744
|
}
|
|
50679
|
-
if ((0,
|
|
50745
|
+
if ((0, import_node_fs52.existsSync)(PATHS.socket)) {
|
|
50680
50746
|
try {
|
|
50681
|
-
(0,
|
|
50747
|
+
(0, import_node_fs52.unlinkSync)(PATHS.socket);
|
|
50682
50748
|
} catch {
|
|
50683
50749
|
}
|
|
50684
50750
|
}
|
|
@@ -50686,26 +50752,26 @@ async function releaseStaleSocket() {
|
|
|
50686
50752
|
|
|
50687
50753
|
// src/commands/service.ts
|
|
50688
50754
|
var import_node_child_process21 = require("child_process");
|
|
50689
|
-
var
|
|
50755
|
+
var import_node_fs54 = require("fs");
|
|
50690
50756
|
var import_node_path41 = require("path");
|
|
50691
50757
|
var import_node_os15 = require("os");
|
|
50692
50758
|
var UNIT_PATH = "/etc/systemd/system/threatcrushd.service";
|
|
50693
50759
|
var DAEMON_UNIT_NAME = "threatcrushd.service";
|
|
50694
50760
|
function resolveTemplate() {
|
|
50695
50761
|
const templatePath = (0, import_node_path41.join)(__dirname, "systemd", "threatcrushd.service");
|
|
50696
|
-
if (!(0,
|
|
50762
|
+
if (!(0, import_node_fs54.existsSync)(templatePath)) {
|
|
50697
50763
|
throw new Error(`systemd unit template not found at ${templatePath}`);
|
|
50698
50764
|
}
|
|
50699
|
-
return (0,
|
|
50765
|
+
return (0, import_node_fs54.readFileSync)(templatePath, "utf-8");
|
|
50700
50766
|
}
|
|
50701
50767
|
function stableBinPath(binPath) {
|
|
50702
50768
|
const stable = binPath.replace(/\/\.pnpm\/[^/]+\/node_modules\//, "/node_modules/");
|
|
50703
50769
|
if (stable === binPath) return binPath;
|
|
50704
|
-
return (0,
|
|
50770
|
+
return (0, import_node_fs54.existsSync)(stable) ? stable : binPath;
|
|
50705
50771
|
}
|
|
50706
50772
|
function resolveBinPath() {
|
|
50707
50773
|
const arg = process.argv[1];
|
|
50708
|
-
if (arg && (0,
|
|
50774
|
+
if (arg && (0, import_node_fs54.existsSync)(arg)) return stableBinPath(arg);
|
|
50709
50775
|
try {
|
|
50710
50776
|
return (0, import_node_child_process21.execSync)("command -v threatcrush", { encoding: "utf-8" }).trim();
|
|
50711
50777
|
} catch {
|
|
@@ -50715,11 +50781,11 @@ function resolveBinPath() {
|
|
|
50715
50781
|
function stableNodePath(execPath) {
|
|
50716
50782
|
const stable = execPath.replace(/(\/installs\/node\/)[^/]+\//, "$1latest/");
|
|
50717
50783
|
if (stable === execPath) return execPath;
|
|
50718
|
-
return (0,
|
|
50784
|
+
return (0, import_node_fs54.existsSync)(stable) ? stable : execPath;
|
|
50719
50785
|
}
|
|
50720
50786
|
function looksLikeNodeScript(path2) {
|
|
50721
50787
|
try {
|
|
50722
|
-
const head = (0,
|
|
50788
|
+
const head = (0, import_node_fs54.readFileSync)(path2, "utf-8").slice(0, 120);
|
|
50723
50789
|
return /^#!.*\bnode\b/.test(head);
|
|
50724
50790
|
} catch {
|
|
50725
50791
|
return false;
|
|
@@ -50759,7 +50825,7 @@ function callerHome() {
|
|
|
50759
50825
|
try {
|
|
50760
50826
|
const line2 = (0, import_node_child_process21.execSync)(`getent passwd ${user}`, { encoding: "utf-8" }).trim();
|
|
50761
50827
|
const home = line2.split(":")[5];
|
|
50762
|
-
return home && (0,
|
|
50828
|
+
return home && (0, import_node_fs54.existsSync)(home) ? home : null;
|
|
50763
50829
|
} catch {
|
|
50764
50830
|
return null;
|
|
50765
50831
|
}
|
|
@@ -50770,10 +50836,10 @@ function stopUserModeDaemon() {
|
|
|
50770
50836
|
const runDir = (0, import_node_path41.join)(home, ".threatcrush", "run");
|
|
50771
50837
|
const pidFile = (0, import_node_path41.join)(runDir, "threatcrushd.pid");
|
|
50772
50838
|
const socket = (0, import_node_path41.join)(runDir, "threatcrushd.sock");
|
|
50773
|
-
if (!(0,
|
|
50839
|
+
if (!(0, import_node_fs54.existsSync)(pidFile) && !(0, import_node_fs54.existsSync)(socket)) return;
|
|
50774
50840
|
let pid = null;
|
|
50775
50841
|
try {
|
|
50776
|
-
pid = Number.parseInt((0,
|
|
50842
|
+
pid = Number.parseInt((0, import_node_fs54.readFileSync)(pidFile, "utf-8").trim(), 10);
|
|
50777
50843
|
} catch {
|
|
50778
50844
|
pid = null;
|
|
50779
50845
|
}
|
|
@@ -50786,7 +50852,7 @@ function stopUserModeDaemon() {
|
|
|
50786
50852
|
}
|
|
50787
50853
|
for (const path2 of [socket, pidFile]) {
|
|
50788
50854
|
try {
|
|
50789
|
-
if ((0,
|
|
50855
|
+
if ((0, import_node_fs54.existsSync)(path2)) (0, import_node_fs54.rmSync)(path2);
|
|
50790
50856
|
} catch {
|
|
50791
50857
|
}
|
|
50792
50858
|
}
|
|
@@ -50804,7 +50870,7 @@ async function installServiceCommand() {
|
|
|
50804
50870
|
}
|
|
50805
50871
|
const noSystemd = systemdUnavailableReason({
|
|
50806
50872
|
hasSystemctl: (0, import_node_child_process21.spawnSync)("sh", ["-c", "command -v systemctl"], { stdio: "ignore" }).status === 0,
|
|
50807
|
-
booted: (0,
|
|
50873
|
+
booted: (0, import_node_fs54.existsSync)("/run/systemd/system")
|
|
50808
50874
|
});
|
|
50809
50875
|
if (noSystemd) {
|
|
50810
50876
|
console.log(source_default.red(` \u2717 systemd isn't available here: ${noSystemd}.`));
|
|
@@ -50826,7 +50892,7 @@ async function installServiceCommand() {
|
|
|
50826
50892
|
const isNodeScript = looksLikeNodeScript(binPath);
|
|
50827
50893
|
let nodePath = stableNodePath(process.execPath);
|
|
50828
50894
|
if (isNodeScript && nodeVersionDir(binPath)) {
|
|
50829
|
-
binPath = (0,
|
|
50895
|
+
binPath = (0, import_node_fs54.realpathSync)(binPath);
|
|
50830
50896
|
nodePath = process.execPath;
|
|
50831
50897
|
}
|
|
50832
50898
|
if (isNodeScript) {
|
|
@@ -50843,7 +50909,7 @@ async function installServiceCommand() {
|
|
|
50843
50909
|
const commandHistoryEnabled = commandHistorySettings(loadConfig().command_history).enabled;
|
|
50844
50910
|
const historyPaths = commandHistoryEnabled ? historyWritableHomes() : [];
|
|
50845
50911
|
const unit = renderUnit(resolveTemplate(), { exec, binPath, configDir, historyPaths });
|
|
50846
|
-
(0,
|
|
50912
|
+
(0, import_node_fs54.writeFileSync)(UNIT_PATH, unit, { mode: 420 });
|
|
50847
50913
|
console.log(source_default.green(` \u2713 Installed unit file: ${UNIT_PATH}`));
|
|
50848
50914
|
console.log(source_default.dim(` ExecStart=${exec}`));
|
|
50849
50915
|
const nodeDir = nodeVersionDir(nodePath);
|
|
@@ -50896,9 +50962,9 @@ function renderLogrotate(logDir = "/var/log/threatcrush") {
|
|
|
50896
50962
|
].join("\n");
|
|
50897
50963
|
}
|
|
50898
50964
|
function installLogrotate() {
|
|
50899
|
-
if (!(0,
|
|
50965
|
+
if (!(0, import_node_fs54.existsSync)((0, import_node_path41.dirname)(LOGROTATE_PATH))) return;
|
|
50900
50966
|
try {
|
|
50901
|
-
(0,
|
|
50967
|
+
(0, import_node_fs54.writeFileSync)(LOGROTATE_PATH, renderLogrotate(), { mode: 420 });
|
|
50902
50968
|
console.log(source_default.green(` \u2713 Log rotation: ${LOGROTATE_PATH} (daily or 200M, keeps 7)`));
|
|
50903
50969
|
} catch (err) {
|
|
50904
50970
|
console.log(source_default.yellow(` ! Could not install log rotation: ${err.message}`));
|
|
@@ -50920,20 +50986,20 @@ function ensureSystemDirs(configDir) {
|
|
|
50920
50986
|
];
|
|
50921
50987
|
let admGid2 = null;
|
|
50922
50988
|
try {
|
|
50923
|
-
admGid2 = (0,
|
|
50989
|
+
admGid2 = (0, import_node_fs54.statSync)("/var/log/auth.log").gid;
|
|
50924
50990
|
} catch {
|
|
50925
50991
|
}
|
|
50926
50992
|
for (const { path: path2, groupWritable, sticky } of dirs) {
|
|
50927
50993
|
try {
|
|
50928
|
-
(0,
|
|
50994
|
+
(0, import_node_fs54.mkdirSync)(path2, { recursive: true });
|
|
50929
50995
|
} catch {
|
|
50930
50996
|
}
|
|
50931
50997
|
try {
|
|
50932
50998
|
if (groupWritable && admGid2 !== null) {
|
|
50933
|
-
(0,
|
|
50999
|
+
(0, import_node_fs54.chmodSync)(path2, sticky ? 1533 : 509);
|
|
50934
51000
|
(0, import_node_child_process21.execSync)(`chgrp adm ${path2}`, { stdio: "ignore" });
|
|
50935
51001
|
} else {
|
|
50936
|
-
(0,
|
|
51002
|
+
(0, import_node_fs54.chmodSync)(path2, 493);
|
|
50937
51003
|
}
|
|
50938
51004
|
} catch {
|
|
50939
51005
|
}
|
|
@@ -50961,7 +51027,7 @@ async function uninstallServiceCommand() {
|
|
|
50961
51027
|
} catch {
|
|
50962
51028
|
}
|
|
50963
51029
|
try {
|
|
50964
|
-
if ((0,
|
|
51030
|
+
if ((0, import_node_fs54.existsSync)(UNIT_PATH)) {
|
|
50965
51031
|
(0, import_node_child_process21.execSync)(`rm -f ${UNIT_PATH}`);
|
|
50966
51032
|
console.log(source_default.green(` \u2713 Removed unit file: ${UNIT_PATH}`));
|
|
50967
51033
|
}
|
|
@@ -50975,7 +51041,7 @@ async function uninstallServiceCommand() {
|
|
|
50975
51041
|
}
|
|
50976
51042
|
|
|
50977
51043
|
// src/commands/save.ts
|
|
50978
|
-
var
|
|
51044
|
+
var import_node_fs55 = require("fs");
|
|
50979
51045
|
var import_toml5 = __toESM(require_toml());
|
|
50980
51046
|
init_cli_config();
|
|
50981
51047
|
init_paths();
|
|
@@ -51014,9 +51080,9 @@ async function saveCommand(opts = {}) {
|
|
|
51014
51080
|
}
|
|
51015
51081
|
const path2 = opts.config ?? PATHS.configFile;
|
|
51016
51082
|
let config = {};
|
|
51017
|
-
if ((0,
|
|
51083
|
+
if ((0, import_node_fs55.existsSync)(path2)) {
|
|
51018
51084
|
try {
|
|
51019
|
-
config = import_toml5.default.parse((0,
|
|
51085
|
+
config = import_toml5.default.parse((0, import_node_fs55.readFileSync)(path2, "utf-8"));
|
|
51020
51086
|
} catch (err) {
|
|
51021
51087
|
console.log(source_default.red(` \u2717 ${path2} is not valid TOML: ${err.message}
|
|
51022
51088
|
`));
|
|
@@ -51129,7 +51195,7 @@ function welcomeCommand() {
|
|
|
51129
51195
|
}
|
|
51130
51196
|
|
|
51131
51197
|
// src/commands/properties.ts
|
|
51132
|
-
var
|
|
51198
|
+
var import_node_fs56 = require("fs");
|
|
51133
51199
|
var import_node_path42 = require("path");
|
|
51134
51200
|
var import_node_readline4 = __toESM(require("readline"));
|
|
51135
51201
|
init_cli_config();
|
|
@@ -51461,7 +51527,7 @@ async function propertiesRunsCommand(opts) {
|
|
|
51461
51527
|
}
|
|
51462
51528
|
function parseImportFile(path2) {
|
|
51463
51529
|
const ext = (0, import_node_path42.extname)(path2).toLowerCase();
|
|
51464
|
-
const raw = (0,
|
|
51530
|
+
const raw = (0, import_node_fs56.readFileSync)(path2, "utf-8");
|
|
51465
51531
|
if (ext === ".json") {
|
|
51466
51532
|
const parsed = JSON.parse(raw);
|
|
51467
51533
|
if (!Array.isArray(parsed)) throw new Error("JSON must be an array of objects");
|
|
@@ -51656,13 +51722,13 @@ async function rulesCommand(opts) {
|
|
|
51656
51722
|
}
|
|
51657
51723
|
|
|
51658
51724
|
// src/commands/harden.ts
|
|
51659
|
-
var
|
|
51725
|
+
var import_node_fs58 = require("fs");
|
|
51660
51726
|
var import_node_child_process22 = require("child_process");
|
|
51661
51727
|
init_cli_config();
|
|
51662
51728
|
|
|
51663
51729
|
// src/commands/cis-report.ts
|
|
51664
51730
|
var import_node_os16 = require("os");
|
|
51665
|
-
var
|
|
51731
|
+
var import_node_fs57 = require("fs");
|
|
51666
51732
|
var CIS_UBUNTU_URL = "https://www.cisecurity.org/benchmark/ubuntu_linux";
|
|
51667
51733
|
var CIS_DEBIAN_URL = "https://www.cisecurity.org/benchmark/debian_linux";
|
|
51668
51734
|
var UBUNTU_2404_CIS_CONTROL_SOURCE = "https://github.com/ComplianceAsCode/content/blob/v0.1.78/controls/cis_ubuntu2404.yml";
|
|
@@ -51682,7 +51748,7 @@ var EDITIONS = {
|
|
|
51682
51748
|
function osRelease() {
|
|
51683
51749
|
let raw = "";
|
|
51684
51750
|
try {
|
|
51685
|
-
raw = (0,
|
|
51751
|
+
raw = (0, import_node_fs57.readFileSync)("/etc/os-release", "utf8");
|
|
51686
51752
|
} catch {
|
|
51687
51753
|
return {};
|
|
51688
51754
|
}
|
|
@@ -51862,7 +51928,7 @@ function writeCisReport(path2, format2, report) {
|
|
|
51862
51928
|
const markdown = renderCisMarkdown(report);
|
|
51863
51929
|
const content = format2 === "json" ? `${JSON.stringify(report, null, 2)}
|
|
51864
51930
|
` : format2 === "pdf" ? renderCisPdf(markdown) : markdown;
|
|
51865
|
-
(0,
|
|
51931
|
+
(0, import_node_fs57.writeFileSync)(path2, content);
|
|
51866
51932
|
}
|
|
51867
51933
|
|
|
51868
51934
|
// src/commands/harden.ts
|
|
@@ -51875,7 +51941,7 @@ function tryExec(cmd) {
|
|
|
51875
51941
|
}
|
|
51876
51942
|
function tryRead(path2) {
|
|
51877
51943
|
try {
|
|
51878
|
-
return (0,
|
|
51944
|
+
return (0, import_node_fs58.readFileSync)(path2, "utf-8");
|
|
51879
51945
|
} catch {
|
|
51880
51946
|
return null;
|
|
51881
51947
|
}
|
|
@@ -51989,8 +52055,8 @@ function checkSshWeakConfig() {
|
|
|
51989
52055
|
};
|
|
51990
52056
|
}
|
|
51991
52057
|
function checkAutoUpdates() {
|
|
51992
|
-
const unattended = (0,
|
|
51993
|
-
const dnfAuto = (0,
|
|
52058
|
+
const unattended = (0, import_node_fs58.existsSync)("/etc/apt/apt.conf.d/20auto-upgrades") || (0, import_node_fs58.existsSync)("/etc/apt/apt.conf.d/50unattended-upgrades");
|
|
52059
|
+
const dnfAuto = (0, import_node_fs58.existsSync)("/etc/dnf/automatic.conf");
|
|
51994
52060
|
if (unattended || dnfAuto) {
|
|
51995
52061
|
return {
|
|
51996
52062
|
key: "auto-updates",
|
|
@@ -52116,7 +52182,7 @@ function checkFail2ban() {
|
|
|
52116
52182
|
explanation: "fail2ban is installed and running."
|
|
52117
52183
|
};
|
|
52118
52184
|
}
|
|
52119
|
-
if ((0,
|
|
52185
|
+
if ((0, import_node_fs58.existsSync)("/etc/fail2ban/fail2ban.conf")) {
|
|
52120
52186
|
return {
|
|
52121
52187
|
key: checkKey,
|
|
52122
52188
|
status: "warn",
|
|
@@ -52336,7 +52402,7 @@ async function hardenCommand(opts) {
|
|
|
52336
52402
|
}
|
|
52337
52403
|
|
|
52338
52404
|
// src/core/patches/index.ts
|
|
52339
|
-
var
|
|
52405
|
+
var import_node_fs59 = require("fs");
|
|
52340
52406
|
var import_node_path43 = require("path");
|
|
52341
52407
|
var import_node_child_process23 = require("child_process");
|
|
52342
52408
|
var import_node_util5 = require("util");
|
|
@@ -52497,9 +52563,9 @@ async function osvRecords(doFetch, ecosystem, source, version) {
|
|
|
52497
52563
|
function newestReleaseMtime(dir) {
|
|
52498
52564
|
try {
|
|
52499
52565
|
let newest = 0;
|
|
52500
|
-
for (const name of (0,
|
|
52566
|
+
for (const name of (0, import_node_fs59.readdirSync)(dir)) {
|
|
52501
52567
|
if (!/Release$/.test(name)) continue;
|
|
52502
|
-
newest = Math.max(newest, (0,
|
|
52568
|
+
newest = Math.max(newest, (0, import_node_fs59.statSync)((0, import_node_path43.join)(dir, name)).mtimeMs);
|
|
52503
52569
|
}
|
|
52504
52570
|
return newest > 0 ? new Date(newest) : null;
|
|
52505
52571
|
} catch {
|
|
@@ -52516,7 +52582,7 @@ async function checkPatches(opts = {}) {
|
|
|
52516
52582
|
let osText = opts.osRelease;
|
|
52517
52583
|
if (osText === void 0) {
|
|
52518
52584
|
try {
|
|
52519
|
-
osText = (0,
|
|
52585
|
+
osText = (0, import_node_fs59.readFileSync)("/etc/os-release", "utf-8");
|
|
52520
52586
|
} catch {
|
|
52521
52587
|
osText = "";
|
|
52522
52588
|
}
|
|
@@ -52748,19 +52814,19 @@ init_paths();
|
|
|
52748
52814
|
|
|
52749
52815
|
// src/commands/feeds-resolver.ts
|
|
52750
52816
|
var import_node_child_process24 = require("child_process");
|
|
52751
|
-
var
|
|
52817
|
+
var import_node_fs60 = require("fs");
|
|
52752
52818
|
var import_node_path44 = require("path");
|
|
52753
52819
|
var realIO = {
|
|
52754
|
-
exists: (p) => (0,
|
|
52820
|
+
exists: (p) => (0, import_node_fs60.existsSync)(p),
|
|
52755
52821
|
read: (p) => {
|
|
52756
52822
|
try {
|
|
52757
|
-
return (0,
|
|
52823
|
+
return (0, import_node_fs60.readFileSync)(p, "utf-8");
|
|
52758
52824
|
} catch {
|
|
52759
52825
|
return null;
|
|
52760
52826
|
}
|
|
52761
52827
|
},
|
|
52762
|
-
write: (p, c) => (0,
|
|
52763
|
-
remove: (p) => (0,
|
|
52828
|
+
write: (p, c) => (0, import_node_fs60.writeFileSync)(p, c),
|
|
52829
|
+
remove: (p) => (0, import_node_fs60.rmSync)(p, { force: true }),
|
|
52764
52830
|
run: (cmd, args) => {
|
|
52765
52831
|
const r = (0, import_node_child_process24.spawnSync)(cmd, args, { encoding: "utf-8", timeout: 3e4 });
|
|
52766
52832
|
return { code: r.status ?? 1, out: `${r.stdout ?? ""}${r.stderr ?? ""}`.trim() };
|
|
@@ -52915,7 +52981,7 @@ async function feedsCommand(action, value, opts) {
|
|
|
52915
52981
|
}
|
|
52916
52982
|
|
|
52917
52983
|
// src/commands/tor.ts
|
|
52918
|
-
var
|
|
52984
|
+
var import_node_fs61 = require("fs");
|
|
52919
52985
|
var import_node_net19 = require("net");
|
|
52920
52986
|
var import_node_path46 = require("path");
|
|
52921
52987
|
init_paths();
|
|
@@ -52926,10 +52992,10 @@ async function torCommand(action, value, opts) {
|
|
|
52926
52992
|
for (const dir of [SYSTEM_PATHS.stateDir, USER_PATHS.stateDir]) {
|
|
52927
52993
|
const path2 = (0, import_node_path46.join)(dir, "tor-exits.txt");
|
|
52928
52994
|
try {
|
|
52929
|
-
if (!(0,
|
|
52930
|
-
exits = parseTorExitList((0,
|
|
52995
|
+
if (!(0, import_node_fs61.existsSync)(path2)) continue;
|
|
52996
|
+
exits = parseTorExitList((0, import_node_fs61.readFileSync)(path2, "utf-8"));
|
|
52931
52997
|
from = path2;
|
|
52932
|
-
updated = (0,
|
|
52998
|
+
updated = (0, import_node_fs61.statSync)(path2).mtime;
|
|
52933
52999
|
break;
|
|
52934
53000
|
} catch {
|
|
52935
53001
|
}
|
|
@@ -52977,13 +53043,13 @@ async function torCommand(action, value, opts) {
|
|
|
52977
53043
|
|
|
52978
53044
|
// src/commands/reputation.ts
|
|
52979
53045
|
var import_node_os17 = require("os");
|
|
52980
|
-
var
|
|
53046
|
+
var import_node_fs62 = require("fs");
|
|
52981
53047
|
var import_node_path47 = require("path");
|
|
52982
53048
|
var API_URL7 = process.env.THREATCRUSH_API_URL || "https://threatcrush.com";
|
|
52983
53049
|
var CONFIG_PATH4 = (0, import_node_path47.join)((0, import_node_os17.homedir)(), ".threatcrush", "config.json");
|
|
52984
53050
|
function readConfig3() {
|
|
52985
53051
|
try {
|
|
52986
|
-
return JSON.parse((0,
|
|
53052
|
+
return JSON.parse((0, import_node_fs62.readFileSync)(CONFIG_PATH4, "utf-8"));
|
|
52987
53053
|
} catch {
|
|
52988
53054
|
return {};
|
|
52989
53055
|
}
|
|
@@ -53171,7 +53237,7 @@ async function reputationSubscribeCommand(opts) {
|
|
|
53171
53237
|
}
|
|
53172
53238
|
|
|
53173
53239
|
// src/commands/privileged.ts
|
|
53174
|
-
var
|
|
53240
|
+
var import_node_fs63 = require("fs");
|
|
53175
53241
|
init_paths();
|
|
53176
53242
|
var SEV2 = {
|
|
53177
53243
|
critical: source_default.red.bold,
|
|
@@ -53184,19 +53250,19 @@ async function privilegedCommand(opts) {
|
|
|
53184
53250
|
const snapshot = takeSnapshot({
|
|
53185
53251
|
readFile: (p) => {
|
|
53186
53252
|
try {
|
|
53187
|
-
return (0,
|
|
53253
|
+
return (0, import_node_fs63.readFileSync)(p, "utf-8");
|
|
53188
53254
|
} catch {
|
|
53189
53255
|
return null;
|
|
53190
53256
|
}
|
|
53191
53257
|
},
|
|
53192
53258
|
readDir: (p) => {
|
|
53193
53259
|
try {
|
|
53194
|
-
return (0,
|
|
53260
|
+
return (0, import_node_fs63.readdirSync)(p);
|
|
53195
53261
|
} catch {
|
|
53196
53262
|
return null;
|
|
53197
53263
|
}
|
|
53198
53264
|
},
|
|
53199
|
-
exists: (p) => (0,
|
|
53265
|
+
exists: (p) => (0, import_node_fs63.existsSync)(p)
|
|
53200
53266
|
});
|
|
53201
53267
|
let events = [];
|
|
53202
53268
|
let ledgerNote = "";
|
|
@@ -53238,12 +53304,12 @@ async function privilegedCommand(opts) {
|
|
|
53238
53304
|
}
|
|
53239
53305
|
|
|
53240
53306
|
// src/commands/integrity.ts
|
|
53241
|
-
var
|
|
53307
|
+
var import_node_fs64 = require("fs");
|
|
53242
53308
|
var import_node_path48 = require("path");
|
|
53243
53309
|
init_paths();
|
|
53244
53310
|
function readState2(path2) {
|
|
53245
53311
|
try {
|
|
53246
|
-
return JSON.parse((0,
|
|
53312
|
+
return JSON.parse((0, import_node_fs64.readFileSync)(path2, "utf8"));
|
|
53247
53313
|
} catch {
|
|
53248
53314
|
return null;
|
|
53249
53315
|
}
|
|
@@ -53264,7 +53330,7 @@ async function integrityCommand(action = "status", opts = {}) {
|
|
|
53264
53330
|
const config = loadConfig();
|
|
53265
53331
|
const settings = fileIntegritySettings(config.file_integrity);
|
|
53266
53332
|
const systemBaseline = (0, import_node_path48.join)(SYSTEM_PATHS.stateDir, "file-integrity-baseline.json");
|
|
53267
|
-
const useSystemState = PATHS.mode === "system" || systemDaemonPresent() || (0,
|
|
53333
|
+
const useSystemState = PATHS.mode === "system" || systemDaemonPresent() || (0, import_node_fs64.existsSync)(systemBaseline);
|
|
53268
53334
|
const stateDir = useSystemState ? SYSTEM_PATHS.stateDir : PATHS.stateDir;
|
|
53269
53335
|
const baselinePath = (0, import_node_path48.join)(stateDir, "file-integrity-baseline.json");
|
|
53270
53336
|
const observedPath = (0, import_node_path48.join)(stateDir, "file-integrity-observed.json");
|
|
@@ -53335,11 +53401,11 @@ async function integrityCommand(action = "status", opts = {}) {
|
|
|
53335
53401
|
}
|
|
53336
53402
|
|
|
53337
53403
|
// src/commands/edr.ts
|
|
53338
|
-
var
|
|
53404
|
+
var import_node_fs66 = require("fs");
|
|
53339
53405
|
init_paths();
|
|
53340
53406
|
|
|
53341
53407
|
// src/daemon/auditd/rules.ts
|
|
53342
|
-
var
|
|
53408
|
+
var import_node_fs65 = require("fs");
|
|
53343
53409
|
var import_node_child_process25 = require("child_process");
|
|
53344
53410
|
var import_node_path49 = require("path");
|
|
53345
53411
|
var WEB_TOOLS = ["sh", "bash", "dash", "zsh", "curl", "wget"];
|
|
@@ -53352,7 +53418,7 @@ function passwdByName() {
|
|
|
53352
53418
|
raw = (0, import_node_child_process25.execFileSync)("getent", ["passwd"], { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] });
|
|
53353
53419
|
} catch {
|
|
53354
53420
|
try {
|
|
53355
|
-
raw = (0,
|
|
53421
|
+
raw = (0, import_node_fs65.readFileSync)("/etc/passwd", "utf8");
|
|
53356
53422
|
} catch {
|
|
53357
53423
|
return /* @__PURE__ */ new Map();
|
|
53358
53424
|
}
|
|
@@ -53371,8 +53437,8 @@ function existingExecutables(names) {
|
|
|
53371
53437
|
for (const prefix of ["/bin", "/usr/bin", "/usr/local/bin"]) {
|
|
53372
53438
|
const candidate = `${prefix}/${name}`;
|
|
53373
53439
|
try {
|
|
53374
|
-
if (!(0,
|
|
53375
|
-
paths.add((0,
|
|
53440
|
+
if (!(0, import_node_fs65.existsSync)(candidate) || !(0, import_node_fs65.statSync)(candidate).isFile()) continue;
|
|
53441
|
+
paths.add((0, import_node_fs65.realpathSync)(candidate));
|
|
53376
53442
|
} catch {
|
|
53377
53443
|
}
|
|
53378
53444
|
}
|
|
@@ -53383,7 +53449,7 @@ function existingDirectories(paths) {
|
|
|
53383
53449
|
return [...new Set(paths)].filter((path2) => {
|
|
53384
53450
|
if (!(0, import_node_path49.isAbsolute)(path2) || /[\s\r\n]/.test(path2)) return false;
|
|
53385
53451
|
try {
|
|
53386
|
-
return (0,
|
|
53452
|
+
return (0, import_node_fs65.statSync)(path2).isDirectory();
|
|
53387
53453
|
} catch {
|
|
53388
53454
|
return false;
|
|
53389
53455
|
}
|
|
@@ -53444,8 +53510,8 @@ async function edrCommand(action = "status", opts = {}) {
|
|
|
53444
53510
|
}
|
|
53445
53511
|
let readable = false;
|
|
53446
53512
|
try {
|
|
53447
|
-
if ((0,
|
|
53448
|
-
readable = (0,
|
|
53513
|
+
if ((0, import_node_fs66.existsSync)(settings.auditLogPath)) (0, import_node_fs66.accessSync)(settings.auditLogPath, import_node_fs66.constants.R_OK);
|
|
53514
|
+
readable = (0, import_node_fs66.existsSync)(settings.auditLogPath);
|
|
53449
53515
|
} catch {
|
|
53450
53516
|
}
|
|
53451
53517
|
let events = [];
|
|
@@ -53631,7 +53697,7 @@ async function allowlistCommand(opts) {
|
|
|
53631
53697
|
}
|
|
53632
53698
|
|
|
53633
53699
|
// src/commands/abuse.ts
|
|
53634
|
-
var
|
|
53700
|
+
var import_node_fs67 = require("fs");
|
|
53635
53701
|
init_paths();
|
|
53636
53702
|
function rows(records) {
|
|
53637
53703
|
if (records.length === 0) {
|
|
@@ -53691,7 +53757,7 @@ function abuseRetractCommand(id, opts = {}) {
|
|
|
53691
53757
|
);
|
|
53692
53758
|
}
|
|
53693
53759
|
function abuseStatusCommand(opts = {}) {
|
|
53694
|
-
const config = loadConfig((0,
|
|
53760
|
+
const config = loadConfig((0, import_node_fs67.existsSync)(PATHS.configFile) ? PATHS.configFile : void 0);
|
|
53695
53761
|
const cfg = resolveConfig(config.abuse_reporter);
|
|
53696
53762
|
const hasKey2 = Boolean(cfg.keys.abuseipdb || cfg.keys.stopforumspam);
|
|
53697
53763
|
const active2 = cfg.enabled && (cfg.dryRun || hasKey2);
|
|
@@ -54279,7 +54345,7 @@ function detectPackageManager() {
|
|
|
54279
54345
|
}
|
|
54280
54346
|
function readInstallConfig() {
|
|
54281
54347
|
try {
|
|
54282
|
-
return JSON.parse((0,
|
|
54348
|
+
return JSON.parse((0, import_node_fs68.readFileSync)(INSTALL_CONFIG_PATH, "utf-8"));
|
|
54283
54349
|
} catch {
|
|
54284
54350
|
return {};
|
|
54285
54351
|
}
|
|
@@ -54702,7 +54768,7 @@ program2.command("uninstall-service").description("Remove the threatcrushd syste
|
|
|
54702
54768
|
program2.command("logs").description("Tail daemon logs").action(async () => {
|
|
54703
54769
|
console.log(LOGO2);
|
|
54704
54770
|
const logPath2 = PATHS.logFile;
|
|
54705
|
-
if (!(0,
|
|
54771
|
+
if (!(0, import_node_fs68.existsSync)(logPath2)) {
|
|
54706
54772
|
console.log(source_default.yellow(` No log file found at ${logPath2}`));
|
|
54707
54773
|
console.log(source_default.dim(" Start the daemon first with `threatcrush start`\n"));
|
|
54708
54774
|
return;
|
|
@@ -54878,7 +54944,7 @@ storeCmd.command("publish <url>").description("Publish a module from a git URL o
|
|
|
54878
54944
|
const configPath = (0, import_node_path51.join)((0, import_node_os19.homedir)(), ".threatcrush", "config.json");
|
|
54879
54945
|
let email = "";
|
|
54880
54946
|
try {
|
|
54881
|
-
const config = JSON.parse((0,
|
|
54947
|
+
const config = JSON.parse((0, import_node_fs68.readFileSync)(configPath, "utf-8"));
|
|
54882
54948
|
email = config.email || "";
|
|
54883
54949
|
} catch {
|
|
54884
54950
|
}
|
|
@@ -54896,8 +54962,8 @@ storeCmd.command("publish <url>").description("Publish a module from a git URL o
|
|
|
54896
54962
|
}
|
|
54897
54963
|
try {
|
|
54898
54964
|
const dir = (0, import_node_path51.join)((0, import_node_os19.homedir)(), ".threatcrush");
|
|
54899
|
-
if (!(0,
|
|
54900
|
-
(0,
|
|
54965
|
+
if (!(0, import_node_fs68.existsSync)(dir)) (0, import_node_fs68.mkdirSync)(dir, { recursive: true });
|
|
54966
|
+
(0, import_node_fs68.writeFileSync)(configPath, JSON.stringify({ email }, null, 2));
|
|
54901
54967
|
console.log(source_default.dim(` Saved email to ${configPath}`));
|
|
54902
54968
|
} catch {
|
|
54903
54969
|
}
|