@profullstack/threatcrush 0.13.67 → 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 +141 -74
- package/dist/daemon.js.map +1 -1
- package/dist/index.js +329 -262
- 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");
|
|
@@ -44037,7 +44037,8 @@ var DEDUPE_MS = 10 * 6e4;
|
|
|
44037
44037
|
var MAX_PER_HOUR = 6;
|
|
44038
44038
|
function smshubText(event, host = (0, import_node_os13.hostname)()) {
|
|
44039
44039
|
const evidence = event.details?.evidence?.message;
|
|
44040
|
-
const
|
|
44040
|
+
const ip = event.source_ip && ![event.message, evidence ?? ""].some((t) => t.includes(event.source_ip)) ? ` from ${event.source_ip}` : "";
|
|
44041
|
+
const text = `ThreatCrush ${event.severity.toUpperCase()} on ${host}: ${event.message}${evidence && !event.message.includes(evidence) ? ` | ${evidence}` : ""}${ip}`;
|
|
44041
44042
|
return text.replace(/\s+/g, " ").slice(0, 600);
|
|
44042
44043
|
}
|
|
44043
44044
|
function smshubChannel(config, opts = {}) {
|
|
@@ -48088,8 +48089,68 @@ var SshIntrusionWatch = class {
|
|
|
48088
48089
|
}
|
|
48089
48090
|
};
|
|
48090
48091
|
|
|
48091
|
-
// src/daemon/
|
|
48092
|
+
// src/daemon/key-directory.ts
|
|
48092
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");
|
|
48093
48154
|
var DEFAULT_CLN_LOGS = [
|
|
48094
48155
|
"/home/lightning/.lightning/cln.log",
|
|
48095
48156
|
"/root/.lightning/cln.log",
|
|
@@ -48145,9 +48206,9 @@ var LightningWatch = class {
|
|
|
48145
48206
|
if (this.opts.enabled === false) return [];
|
|
48146
48207
|
const found = [];
|
|
48147
48208
|
for (const path2 of this.opts.paths?.length ? this.opts.paths : DEFAULT_CLN_LOGS) {
|
|
48148
|
-
if (!(0,
|
|
48209
|
+
if (!(0, import_node_fs45.existsSync)(path2)) continue;
|
|
48149
48210
|
try {
|
|
48150
|
-
(0,
|
|
48211
|
+
(0, import_node_fs45.accessSync)(path2, import_node_fs45.constants.R_OK);
|
|
48151
48212
|
} catch {
|
|
48152
48213
|
continue;
|
|
48153
48214
|
}
|
|
@@ -48182,7 +48243,7 @@ var LightningWatch = class {
|
|
|
48182
48243
|
};
|
|
48183
48244
|
|
|
48184
48245
|
// src/core/tor-exits.ts
|
|
48185
|
-
var
|
|
48246
|
+
var import_node_fs46 = require("fs");
|
|
48186
48247
|
var import_node_path35 = require("path");
|
|
48187
48248
|
var import_node_net15 = require("net");
|
|
48188
48249
|
var TOR_BULK_EXIT_LIST_URL = "https://check.torproject.org/torbulkexitlist";
|
|
@@ -48251,10 +48312,10 @@ var TorExitList = class _TorExitList {
|
|
|
48251
48312
|
}
|
|
48252
48313
|
loadCache() {
|
|
48253
48314
|
try {
|
|
48254
|
-
if (!(0,
|
|
48255
|
-
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"));
|
|
48256
48317
|
if (parsed.size === 0) return false;
|
|
48257
|
-
this.load(parsed, (0,
|
|
48318
|
+
this.load(parsed, (0, import_node_fs46.statSync)(this.opts.cachePath).mtimeMs);
|
|
48258
48319
|
this.log(`[tor] loaded ${parsed.size} Tor exit addresses from cache (${new Date(this.updatedAt).toISOString()})`);
|
|
48259
48320
|
return true;
|
|
48260
48321
|
} catch (err) {
|
|
@@ -48286,9 +48347,9 @@ var TorExitList = class _TorExitList {
|
|
|
48286
48347
|
const before2 = this.exits.size;
|
|
48287
48348
|
this.load(parsed);
|
|
48288
48349
|
try {
|
|
48289
|
-
(0,
|
|
48290
|
-
(0,
|
|
48291
|
-
(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);
|
|
48292
48353
|
} catch (err) {
|
|
48293
48354
|
this.log(`[tor] could not save the exit list cache: ${err.message}`);
|
|
48294
48355
|
}
|
|
@@ -48329,6 +48390,9 @@ var EVIDENCE_FIELDS = [
|
|
|
48329
48390
|
"system_uid",
|
|
48330
48391
|
"fingerprint",
|
|
48331
48392
|
"key_type",
|
|
48393
|
+
"key_comment",
|
|
48394
|
+
"key_kind",
|
|
48395
|
+
"key_account",
|
|
48332
48396
|
"auth_method",
|
|
48333
48397
|
"port",
|
|
48334
48398
|
"path",
|
|
@@ -48506,7 +48570,7 @@ var RuleEngine = class {
|
|
|
48506
48570
|
};
|
|
48507
48571
|
|
|
48508
48572
|
// src/daemon/rules/loader.ts
|
|
48509
|
-
var
|
|
48573
|
+
var import_node_fs47 = require("fs");
|
|
48510
48574
|
var import_node_path36 = require("path");
|
|
48511
48575
|
|
|
48512
48576
|
// src/daemon/rules/default-rules.ts
|
|
@@ -49098,11 +49162,11 @@ var RULES_DIR = "/etc/threatcrush/rules.d";
|
|
|
49098
49162
|
function loadAllRules(customDir) {
|
|
49099
49163
|
const rules = [...DEFAULT_RULES];
|
|
49100
49164
|
const dir = customDir || RULES_DIR;
|
|
49101
|
-
if ((0,
|
|
49102
|
-
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"));
|
|
49103
49167
|
for (const file of files) {
|
|
49104
49168
|
try {
|
|
49105
|
-
const raw = (0,
|
|
49169
|
+
const raw = (0, import_node_fs47.readFileSync)((0, import_node_path36.join)(dir, file), "utf-8");
|
|
49106
49170
|
const parsed = JSON.parse(raw);
|
|
49107
49171
|
const customRules = Array.isArray(parsed) ? parsed : [parsed];
|
|
49108
49172
|
for (const rule of customRules) {
|
|
@@ -49134,7 +49198,7 @@ function loadAllRules(customDir) {
|
|
|
49134
49198
|
|
|
49135
49199
|
// src/daemon/firewall/adapters.ts
|
|
49136
49200
|
var import_node_child_process16 = require("child_process");
|
|
49137
|
-
var
|
|
49201
|
+
var import_node_fs48 = require("fs");
|
|
49138
49202
|
var import_node_path37 = require("path");
|
|
49139
49203
|
var import_node_net16 = require("net");
|
|
49140
49204
|
function assertValidFirewallIp(ip) {
|
|
@@ -49148,9 +49212,9 @@ function assertBannableIp(ip) {
|
|
|
49148
49212
|
}
|
|
49149
49213
|
}
|
|
49150
49214
|
function writeIfAbsent(path2, contents) {
|
|
49151
|
-
(0,
|
|
49215
|
+
(0, import_node_fs48.mkdirSync)((0, import_node_path37.dirname)(path2), { recursive: true });
|
|
49152
49216
|
try {
|
|
49153
|
-
(0,
|
|
49217
|
+
(0, import_node_fs48.writeFileSync)(path2, contents, { flag: "wx" });
|
|
49154
49218
|
} catch (err) {
|
|
49155
49219
|
if (err.code !== "EEXIST") throw err;
|
|
49156
49220
|
}
|
|
@@ -49409,7 +49473,7 @@ function detectFirewallAdapter(backend = "auto") {
|
|
|
49409
49473
|
}
|
|
49410
49474
|
|
|
49411
49475
|
// src/daemon/firewall/remediation.ts
|
|
49412
|
-
var
|
|
49476
|
+
var import_node_fs49 = require("fs");
|
|
49413
49477
|
var import_node_child_process17 = require("child_process");
|
|
49414
49478
|
var import_node_net17 = require("net");
|
|
49415
49479
|
init_paths();
|
|
@@ -49481,19 +49545,19 @@ var defaultDiscovery = {
|
|
|
49481
49545
|
const snapshot = takeSnapshot({
|
|
49482
49546
|
readFile: (p) => {
|
|
49483
49547
|
try {
|
|
49484
|
-
return (0,
|
|
49548
|
+
return (0, import_node_fs49.readFileSync)(p, "utf-8");
|
|
49485
49549
|
} catch {
|
|
49486
49550
|
return null;
|
|
49487
49551
|
}
|
|
49488
49552
|
},
|
|
49489
49553
|
readDir: (p) => {
|
|
49490
49554
|
try {
|
|
49491
|
-
return (0,
|
|
49555
|
+
return (0, import_node_fs49.readdirSync)(p);
|
|
49492
49556
|
} catch {
|
|
49493
49557
|
return null;
|
|
49494
49558
|
}
|
|
49495
49559
|
},
|
|
49496
|
-
exists: (p) => (0,
|
|
49560
|
+
exists: (p) => (0, import_node_fs49.existsSync)(p)
|
|
49497
49561
|
});
|
|
49498
49562
|
const out = /* @__PURE__ */ new Set();
|
|
49499
49563
|
for (const keys of Object.values(snapshot.keys)) {
|
|
@@ -50006,7 +50070,7 @@ var RemediationManager = class {
|
|
|
50006
50070
|
}
|
|
50007
50071
|
logLine(line2) {
|
|
50008
50072
|
try {
|
|
50009
|
-
(0,
|
|
50073
|
+
(0, import_node_fs49.appendFileSync)(PATHS.logFile, `${(/* @__PURE__ */ new Date()).toISOString()} ${line2}
|
|
50010
50074
|
`);
|
|
50011
50075
|
} catch {
|
|
50012
50076
|
}
|
|
@@ -50050,13 +50114,13 @@ function remediationSettings(section) {
|
|
|
50050
50114
|
init_backoff();
|
|
50051
50115
|
|
|
50052
50116
|
// src/daemon/watchdog-service.ts
|
|
50053
|
-
var
|
|
50117
|
+
var import_node_fs50 = require("fs");
|
|
50054
50118
|
var import_node_path38 = require("path");
|
|
50055
50119
|
function defaultShareGid() {
|
|
50056
50120
|
const isRoot4 = process.platform === "linux" && typeof process.getuid === "function" && process.getuid() === 0;
|
|
50057
50121
|
if (!isRoot4) return void 0;
|
|
50058
50122
|
try {
|
|
50059
|
-
return (0,
|
|
50123
|
+
return (0, import_node_fs50.statSync)("/var/log/auth.log").gid;
|
|
50060
50124
|
} catch {
|
|
50061
50125
|
return void 0;
|
|
50062
50126
|
}
|
|
@@ -50177,7 +50241,7 @@ function versionOfNode(path2) {
|
|
|
50177
50241
|
// src/daemon/index.ts
|
|
50178
50242
|
function readVersion2() {
|
|
50179
50243
|
try {
|
|
50180
|
-
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"));
|
|
50181
50245
|
return pkg.version || "0.0.0";
|
|
50182
50246
|
} catch {
|
|
50183
50247
|
return "0.0.0";
|
|
@@ -50208,7 +50272,7 @@ async function runPatchCheck() {
|
|
|
50208
50272
|
}
|
|
50209
50273
|
function logLine(line2) {
|
|
50210
50274
|
try {
|
|
50211
|
-
(0,
|
|
50275
|
+
(0, import_node_fs51.appendFileSync)(PATHS.logFile, `${(/* @__PURE__ */ new Date()).toISOString()} ${line2}
|
|
50212
50276
|
`);
|
|
50213
50277
|
} catch {
|
|
50214
50278
|
}
|
|
@@ -50291,8 +50355,11 @@ async function runDaemon() {
|
|
|
50291
50355
|
bus.publish(event);
|
|
50292
50356
|
});
|
|
50293
50357
|
ruleEngine.loadRules(loadAllRules());
|
|
50358
|
+
const keyDirectory = new KeyDirectory();
|
|
50294
50359
|
bus.on("event", (event) => {
|
|
50295
|
-
if (event.module
|
|
50360
|
+
if (event.module === "rule-engine") return;
|
|
50361
|
+
enrichLoginEvent(event, keyDirectory);
|
|
50362
|
+
ruleEngine.evaluate(event);
|
|
50296
50363
|
});
|
|
50297
50364
|
logLine(`[daemon] rule engine loaded ${ruleEngine.getRules().length} rules`);
|
|
50298
50365
|
setInterval(() => ruleEngine.cleanup(), 6e4);
|
|
@@ -50575,7 +50642,7 @@ async function daemonStart() {
|
|
|
50575
50642
|
return;
|
|
50576
50643
|
}
|
|
50577
50644
|
ensureRuntimeDirs();
|
|
50578
|
-
if (!(0,
|
|
50645
|
+
if (!(0, import_node_fs52.existsSync)(DAEMON_ENTRY)) {
|
|
50579
50646
|
console.log(source_default.red(` Daemon entry not found at ${DAEMON_ENTRY}.`));
|
|
50580
50647
|
console.log(source_default.dim(" Reinstall with `threatcrush update` or `pnpm run build` in the cli package."));
|
|
50581
50648
|
return;
|
|
@@ -50583,8 +50650,8 @@ async function daemonStart() {
|
|
|
50583
50650
|
let out;
|
|
50584
50651
|
let err;
|
|
50585
50652
|
try {
|
|
50586
|
-
out = (0,
|
|
50587
|
-
err = (0,
|
|
50653
|
+
out = (0, import_node_fs53.openSync)(PATHS.logFile, "a");
|
|
50654
|
+
err = (0, import_node_fs53.openSync)(PATHS.logFile, "a");
|
|
50588
50655
|
} catch (e) {
|
|
50589
50656
|
const code = e.code;
|
|
50590
50657
|
console.log(source_default.red(` \u2717 Cannot write daemon log at ${PATHS.logFile} (${code ?? "error"}).`));
|
|
@@ -50672,12 +50739,12 @@ async function waitForExit(pid, timeoutMs) {
|
|
|
50672
50739
|
}
|
|
50673
50740
|
async function releaseStaleSocket() {
|
|
50674
50741
|
const deadline = Date.now() + 2e3;
|
|
50675
|
-
while ((0,
|
|
50742
|
+
while ((0, import_node_fs52.existsSync)(PATHS.socket) && Date.now() < deadline) {
|
|
50676
50743
|
await new Promise((r) => setTimeout(r, 50));
|
|
50677
50744
|
}
|
|
50678
|
-
if ((0,
|
|
50745
|
+
if ((0, import_node_fs52.existsSync)(PATHS.socket)) {
|
|
50679
50746
|
try {
|
|
50680
|
-
(0,
|
|
50747
|
+
(0, import_node_fs52.unlinkSync)(PATHS.socket);
|
|
50681
50748
|
} catch {
|
|
50682
50749
|
}
|
|
50683
50750
|
}
|
|
@@ -50685,26 +50752,26 @@ async function releaseStaleSocket() {
|
|
|
50685
50752
|
|
|
50686
50753
|
// src/commands/service.ts
|
|
50687
50754
|
var import_node_child_process21 = require("child_process");
|
|
50688
|
-
var
|
|
50755
|
+
var import_node_fs54 = require("fs");
|
|
50689
50756
|
var import_node_path41 = require("path");
|
|
50690
50757
|
var import_node_os15 = require("os");
|
|
50691
50758
|
var UNIT_PATH = "/etc/systemd/system/threatcrushd.service";
|
|
50692
50759
|
var DAEMON_UNIT_NAME = "threatcrushd.service";
|
|
50693
50760
|
function resolveTemplate() {
|
|
50694
50761
|
const templatePath = (0, import_node_path41.join)(__dirname, "systemd", "threatcrushd.service");
|
|
50695
|
-
if (!(0,
|
|
50762
|
+
if (!(0, import_node_fs54.existsSync)(templatePath)) {
|
|
50696
50763
|
throw new Error(`systemd unit template not found at ${templatePath}`);
|
|
50697
50764
|
}
|
|
50698
|
-
return (0,
|
|
50765
|
+
return (0, import_node_fs54.readFileSync)(templatePath, "utf-8");
|
|
50699
50766
|
}
|
|
50700
50767
|
function stableBinPath(binPath) {
|
|
50701
50768
|
const stable = binPath.replace(/\/\.pnpm\/[^/]+\/node_modules\//, "/node_modules/");
|
|
50702
50769
|
if (stable === binPath) return binPath;
|
|
50703
|
-
return (0,
|
|
50770
|
+
return (0, import_node_fs54.existsSync)(stable) ? stable : binPath;
|
|
50704
50771
|
}
|
|
50705
50772
|
function resolveBinPath() {
|
|
50706
50773
|
const arg = process.argv[1];
|
|
50707
|
-
if (arg && (0,
|
|
50774
|
+
if (arg && (0, import_node_fs54.existsSync)(arg)) return stableBinPath(arg);
|
|
50708
50775
|
try {
|
|
50709
50776
|
return (0, import_node_child_process21.execSync)("command -v threatcrush", { encoding: "utf-8" }).trim();
|
|
50710
50777
|
} catch {
|
|
@@ -50714,11 +50781,11 @@ function resolveBinPath() {
|
|
|
50714
50781
|
function stableNodePath(execPath) {
|
|
50715
50782
|
const stable = execPath.replace(/(\/installs\/node\/)[^/]+\//, "$1latest/");
|
|
50716
50783
|
if (stable === execPath) return execPath;
|
|
50717
|
-
return (0,
|
|
50784
|
+
return (0, import_node_fs54.existsSync)(stable) ? stable : execPath;
|
|
50718
50785
|
}
|
|
50719
50786
|
function looksLikeNodeScript(path2) {
|
|
50720
50787
|
try {
|
|
50721
|
-
const head = (0,
|
|
50788
|
+
const head = (0, import_node_fs54.readFileSync)(path2, "utf-8").slice(0, 120);
|
|
50722
50789
|
return /^#!.*\bnode\b/.test(head);
|
|
50723
50790
|
} catch {
|
|
50724
50791
|
return false;
|
|
@@ -50758,7 +50825,7 @@ function callerHome() {
|
|
|
50758
50825
|
try {
|
|
50759
50826
|
const line2 = (0, import_node_child_process21.execSync)(`getent passwd ${user}`, { encoding: "utf-8" }).trim();
|
|
50760
50827
|
const home = line2.split(":")[5];
|
|
50761
|
-
return home && (0,
|
|
50828
|
+
return home && (0, import_node_fs54.existsSync)(home) ? home : null;
|
|
50762
50829
|
} catch {
|
|
50763
50830
|
return null;
|
|
50764
50831
|
}
|
|
@@ -50769,10 +50836,10 @@ function stopUserModeDaemon() {
|
|
|
50769
50836
|
const runDir = (0, import_node_path41.join)(home, ".threatcrush", "run");
|
|
50770
50837
|
const pidFile = (0, import_node_path41.join)(runDir, "threatcrushd.pid");
|
|
50771
50838
|
const socket = (0, import_node_path41.join)(runDir, "threatcrushd.sock");
|
|
50772
|
-
if (!(0,
|
|
50839
|
+
if (!(0, import_node_fs54.existsSync)(pidFile) && !(0, import_node_fs54.existsSync)(socket)) return;
|
|
50773
50840
|
let pid = null;
|
|
50774
50841
|
try {
|
|
50775
|
-
pid = Number.parseInt((0,
|
|
50842
|
+
pid = Number.parseInt((0, import_node_fs54.readFileSync)(pidFile, "utf-8").trim(), 10);
|
|
50776
50843
|
} catch {
|
|
50777
50844
|
pid = null;
|
|
50778
50845
|
}
|
|
@@ -50785,7 +50852,7 @@ function stopUserModeDaemon() {
|
|
|
50785
50852
|
}
|
|
50786
50853
|
for (const path2 of [socket, pidFile]) {
|
|
50787
50854
|
try {
|
|
50788
|
-
if ((0,
|
|
50855
|
+
if ((0, import_node_fs54.existsSync)(path2)) (0, import_node_fs54.rmSync)(path2);
|
|
50789
50856
|
} catch {
|
|
50790
50857
|
}
|
|
50791
50858
|
}
|
|
@@ -50803,7 +50870,7 @@ async function installServiceCommand() {
|
|
|
50803
50870
|
}
|
|
50804
50871
|
const noSystemd = systemdUnavailableReason({
|
|
50805
50872
|
hasSystemctl: (0, import_node_child_process21.spawnSync)("sh", ["-c", "command -v systemctl"], { stdio: "ignore" }).status === 0,
|
|
50806
|
-
booted: (0,
|
|
50873
|
+
booted: (0, import_node_fs54.existsSync)("/run/systemd/system")
|
|
50807
50874
|
});
|
|
50808
50875
|
if (noSystemd) {
|
|
50809
50876
|
console.log(source_default.red(` \u2717 systemd isn't available here: ${noSystemd}.`));
|
|
@@ -50825,7 +50892,7 @@ async function installServiceCommand() {
|
|
|
50825
50892
|
const isNodeScript = looksLikeNodeScript(binPath);
|
|
50826
50893
|
let nodePath = stableNodePath(process.execPath);
|
|
50827
50894
|
if (isNodeScript && nodeVersionDir(binPath)) {
|
|
50828
|
-
binPath = (0,
|
|
50895
|
+
binPath = (0, import_node_fs54.realpathSync)(binPath);
|
|
50829
50896
|
nodePath = process.execPath;
|
|
50830
50897
|
}
|
|
50831
50898
|
if (isNodeScript) {
|
|
@@ -50842,7 +50909,7 @@ async function installServiceCommand() {
|
|
|
50842
50909
|
const commandHistoryEnabled = commandHistorySettings(loadConfig().command_history).enabled;
|
|
50843
50910
|
const historyPaths = commandHistoryEnabled ? historyWritableHomes() : [];
|
|
50844
50911
|
const unit = renderUnit(resolveTemplate(), { exec, binPath, configDir, historyPaths });
|
|
50845
|
-
(0,
|
|
50912
|
+
(0, import_node_fs54.writeFileSync)(UNIT_PATH, unit, { mode: 420 });
|
|
50846
50913
|
console.log(source_default.green(` \u2713 Installed unit file: ${UNIT_PATH}`));
|
|
50847
50914
|
console.log(source_default.dim(` ExecStart=${exec}`));
|
|
50848
50915
|
const nodeDir = nodeVersionDir(nodePath);
|
|
@@ -50895,9 +50962,9 @@ function renderLogrotate(logDir = "/var/log/threatcrush") {
|
|
|
50895
50962
|
].join("\n");
|
|
50896
50963
|
}
|
|
50897
50964
|
function installLogrotate() {
|
|
50898
|
-
if (!(0,
|
|
50965
|
+
if (!(0, import_node_fs54.existsSync)((0, import_node_path41.dirname)(LOGROTATE_PATH))) return;
|
|
50899
50966
|
try {
|
|
50900
|
-
(0,
|
|
50967
|
+
(0, import_node_fs54.writeFileSync)(LOGROTATE_PATH, renderLogrotate(), { mode: 420 });
|
|
50901
50968
|
console.log(source_default.green(` \u2713 Log rotation: ${LOGROTATE_PATH} (daily or 200M, keeps 7)`));
|
|
50902
50969
|
} catch (err) {
|
|
50903
50970
|
console.log(source_default.yellow(` ! Could not install log rotation: ${err.message}`));
|
|
@@ -50919,20 +50986,20 @@ function ensureSystemDirs(configDir) {
|
|
|
50919
50986
|
];
|
|
50920
50987
|
let admGid2 = null;
|
|
50921
50988
|
try {
|
|
50922
|
-
admGid2 = (0,
|
|
50989
|
+
admGid2 = (0, import_node_fs54.statSync)("/var/log/auth.log").gid;
|
|
50923
50990
|
} catch {
|
|
50924
50991
|
}
|
|
50925
50992
|
for (const { path: path2, groupWritable, sticky } of dirs) {
|
|
50926
50993
|
try {
|
|
50927
|
-
(0,
|
|
50994
|
+
(0, import_node_fs54.mkdirSync)(path2, { recursive: true });
|
|
50928
50995
|
} catch {
|
|
50929
50996
|
}
|
|
50930
50997
|
try {
|
|
50931
50998
|
if (groupWritable && admGid2 !== null) {
|
|
50932
|
-
(0,
|
|
50999
|
+
(0, import_node_fs54.chmodSync)(path2, sticky ? 1533 : 509);
|
|
50933
51000
|
(0, import_node_child_process21.execSync)(`chgrp adm ${path2}`, { stdio: "ignore" });
|
|
50934
51001
|
} else {
|
|
50935
|
-
(0,
|
|
51002
|
+
(0, import_node_fs54.chmodSync)(path2, 493);
|
|
50936
51003
|
}
|
|
50937
51004
|
} catch {
|
|
50938
51005
|
}
|
|
@@ -50960,7 +51027,7 @@ async function uninstallServiceCommand() {
|
|
|
50960
51027
|
} catch {
|
|
50961
51028
|
}
|
|
50962
51029
|
try {
|
|
50963
|
-
if ((0,
|
|
51030
|
+
if ((0, import_node_fs54.existsSync)(UNIT_PATH)) {
|
|
50964
51031
|
(0, import_node_child_process21.execSync)(`rm -f ${UNIT_PATH}`);
|
|
50965
51032
|
console.log(source_default.green(` \u2713 Removed unit file: ${UNIT_PATH}`));
|
|
50966
51033
|
}
|
|
@@ -50974,7 +51041,7 @@ async function uninstallServiceCommand() {
|
|
|
50974
51041
|
}
|
|
50975
51042
|
|
|
50976
51043
|
// src/commands/save.ts
|
|
50977
|
-
var
|
|
51044
|
+
var import_node_fs55 = require("fs");
|
|
50978
51045
|
var import_toml5 = __toESM(require_toml());
|
|
50979
51046
|
init_cli_config();
|
|
50980
51047
|
init_paths();
|
|
@@ -51013,9 +51080,9 @@ async function saveCommand(opts = {}) {
|
|
|
51013
51080
|
}
|
|
51014
51081
|
const path2 = opts.config ?? PATHS.configFile;
|
|
51015
51082
|
let config = {};
|
|
51016
|
-
if ((0,
|
|
51083
|
+
if ((0, import_node_fs55.existsSync)(path2)) {
|
|
51017
51084
|
try {
|
|
51018
|
-
config = import_toml5.default.parse((0,
|
|
51085
|
+
config = import_toml5.default.parse((0, import_node_fs55.readFileSync)(path2, "utf-8"));
|
|
51019
51086
|
} catch (err) {
|
|
51020
51087
|
console.log(source_default.red(` \u2717 ${path2} is not valid TOML: ${err.message}
|
|
51021
51088
|
`));
|
|
@@ -51128,7 +51195,7 @@ function welcomeCommand() {
|
|
|
51128
51195
|
}
|
|
51129
51196
|
|
|
51130
51197
|
// src/commands/properties.ts
|
|
51131
|
-
var
|
|
51198
|
+
var import_node_fs56 = require("fs");
|
|
51132
51199
|
var import_node_path42 = require("path");
|
|
51133
51200
|
var import_node_readline4 = __toESM(require("readline"));
|
|
51134
51201
|
init_cli_config();
|
|
@@ -51460,7 +51527,7 @@ async function propertiesRunsCommand(opts) {
|
|
|
51460
51527
|
}
|
|
51461
51528
|
function parseImportFile(path2) {
|
|
51462
51529
|
const ext = (0, import_node_path42.extname)(path2).toLowerCase();
|
|
51463
|
-
const raw = (0,
|
|
51530
|
+
const raw = (0, import_node_fs56.readFileSync)(path2, "utf-8");
|
|
51464
51531
|
if (ext === ".json") {
|
|
51465
51532
|
const parsed = JSON.parse(raw);
|
|
51466
51533
|
if (!Array.isArray(parsed)) throw new Error("JSON must be an array of objects");
|
|
@@ -51655,13 +51722,13 @@ async function rulesCommand(opts) {
|
|
|
51655
51722
|
}
|
|
51656
51723
|
|
|
51657
51724
|
// src/commands/harden.ts
|
|
51658
|
-
var
|
|
51725
|
+
var import_node_fs58 = require("fs");
|
|
51659
51726
|
var import_node_child_process22 = require("child_process");
|
|
51660
51727
|
init_cli_config();
|
|
51661
51728
|
|
|
51662
51729
|
// src/commands/cis-report.ts
|
|
51663
51730
|
var import_node_os16 = require("os");
|
|
51664
|
-
var
|
|
51731
|
+
var import_node_fs57 = require("fs");
|
|
51665
51732
|
var CIS_UBUNTU_URL = "https://www.cisecurity.org/benchmark/ubuntu_linux";
|
|
51666
51733
|
var CIS_DEBIAN_URL = "https://www.cisecurity.org/benchmark/debian_linux";
|
|
51667
51734
|
var UBUNTU_2404_CIS_CONTROL_SOURCE = "https://github.com/ComplianceAsCode/content/blob/v0.1.78/controls/cis_ubuntu2404.yml";
|
|
@@ -51681,7 +51748,7 @@ var EDITIONS = {
|
|
|
51681
51748
|
function osRelease() {
|
|
51682
51749
|
let raw = "";
|
|
51683
51750
|
try {
|
|
51684
|
-
raw = (0,
|
|
51751
|
+
raw = (0, import_node_fs57.readFileSync)("/etc/os-release", "utf8");
|
|
51685
51752
|
} catch {
|
|
51686
51753
|
return {};
|
|
51687
51754
|
}
|
|
@@ -51861,7 +51928,7 @@ function writeCisReport(path2, format2, report) {
|
|
|
51861
51928
|
const markdown = renderCisMarkdown(report);
|
|
51862
51929
|
const content = format2 === "json" ? `${JSON.stringify(report, null, 2)}
|
|
51863
51930
|
` : format2 === "pdf" ? renderCisPdf(markdown) : markdown;
|
|
51864
|
-
(0,
|
|
51931
|
+
(0, import_node_fs57.writeFileSync)(path2, content);
|
|
51865
51932
|
}
|
|
51866
51933
|
|
|
51867
51934
|
// src/commands/harden.ts
|
|
@@ -51874,7 +51941,7 @@ function tryExec(cmd) {
|
|
|
51874
51941
|
}
|
|
51875
51942
|
function tryRead(path2) {
|
|
51876
51943
|
try {
|
|
51877
|
-
return (0,
|
|
51944
|
+
return (0, import_node_fs58.readFileSync)(path2, "utf-8");
|
|
51878
51945
|
} catch {
|
|
51879
51946
|
return null;
|
|
51880
51947
|
}
|
|
@@ -51988,8 +52055,8 @@ function checkSshWeakConfig() {
|
|
|
51988
52055
|
};
|
|
51989
52056
|
}
|
|
51990
52057
|
function checkAutoUpdates() {
|
|
51991
|
-
const unattended = (0,
|
|
51992
|
-
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");
|
|
51993
52060
|
if (unattended || dnfAuto) {
|
|
51994
52061
|
return {
|
|
51995
52062
|
key: "auto-updates",
|
|
@@ -52115,7 +52182,7 @@ function checkFail2ban() {
|
|
|
52115
52182
|
explanation: "fail2ban is installed and running."
|
|
52116
52183
|
};
|
|
52117
52184
|
}
|
|
52118
|
-
if ((0,
|
|
52185
|
+
if ((0, import_node_fs58.existsSync)("/etc/fail2ban/fail2ban.conf")) {
|
|
52119
52186
|
return {
|
|
52120
52187
|
key: checkKey,
|
|
52121
52188
|
status: "warn",
|
|
@@ -52335,7 +52402,7 @@ async function hardenCommand(opts) {
|
|
|
52335
52402
|
}
|
|
52336
52403
|
|
|
52337
52404
|
// src/core/patches/index.ts
|
|
52338
|
-
var
|
|
52405
|
+
var import_node_fs59 = require("fs");
|
|
52339
52406
|
var import_node_path43 = require("path");
|
|
52340
52407
|
var import_node_child_process23 = require("child_process");
|
|
52341
52408
|
var import_node_util5 = require("util");
|
|
@@ -52496,9 +52563,9 @@ async function osvRecords(doFetch, ecosystem, source, version) {
|
|
|
52496
52563
|
function newestReleaseMtime(dir) {
|
|
52497
52564
|
try {
|
|
52498
52565
|
let newest = 0;
|
|
52499
|
-
for (const name of (0,
|
|
52566
|
+
for (const name of (0, import_node_fs59.readdirSync)(dir)) {
|
|
52500
52567
|
if (!/Release$/.test(name)) continue;
|
|
52501
|
-
newest = Math.max(newest, (0,
|
|
52568
|
+
newest = Math.max(newest, (0, import_node_fs59.statSync)((0, import_node_path43.join)(dir, name)).mtimeMs);
|
|
52502
52569
|
}
|
|
52503
52570
|
return newest > 0 ? new Date(newest) : null;
|
|
52504
52571
|
} catch {
|
|
@@ -52515,7 +52582,7 @@ async function checkPatches(opts = {}) {
|
|
|
52515
52582
|
let osText = opts.osRelease;
|
|
52516
52583
|
if (osText === void 0) {
|
|
52517
52584
|
try {
|
|
52518
|
-
osText = (0,
|
|
52585
|
+
osText = (0, import_node_fs59.readFileSync)("/etc/os-release", "utf-8");
|
|
52519
52586
|
} catch {
|
|
52520
52587
|
osText = "";
|
|
52521
52588
|
}
|
|
@@ -52747,19 +52814,19 @@ init_paths();
|
|
|
52747
52814
|
|
|
52748
52815
|
// src/commands/feeds-resolver.ts
|
|
52749
52816
|
var import_node_child_process24 = require("child_process");
|
|
52750
|
-
var
|
|
52817
|
+
var import_node_fs60 = require("fs");
|
|
52751
52818
|
var import_node_path44 = require("path");
|
|
52752
52819
|
var realIO = {
|
|
52753
|
-
exists: (p) => (0,
|
|
52820
|
+
exists: (p) => (0, import_node_fs60.existsSync)(p),
|
|
52754
52821
|
read: (p) => {
|
|
52755
52822
|
try {
|
|
52756
|
-
return (0,
|
|
52823
|
+
return (0, import_node_fs60.readFileSync)(p, "utf-8");
|
|
52757
52824
|
} catch {
|
|
52758
52825
|
return null;
|
|
52759
52826
|
}
|
|
52760
52827
|
},
|
|
52761
|
-
write: (p, c) => (0,
|
|
52762
|
-
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 }),
|
|
52763
52830
|
run: (cmd, args) => {
|
|
52764
52831
|
const r = (0, import_node_child_process24.spawnSync)(cmd, args, { encoding: "utf-8", timeout: 3e4 });
|
|
52765
52832
|
return { code: r.status ?? 1, out: `${r.stdout ?? ""}${r.stderr ?? ""}`.trim() };
|
|
@@ -52914,7 +52981,7 @@ async function feedsCommand(action, value, opts) {
|
|
|
52914
52981
|
}
|
|
52915
52982
|
|
|
52916
52983
|
// src/commands/tor.ts
|
|
52917
|
-
var
|
|
52984
|
+
var import_node_fs61 = require("fs");
|
|
52918
52985
|
var import_node_net19 = require("net");
|
|
52919
52986
|
var import_node_path46 = require("path");
|
|
52920
52987
|
init_paths();
|
|
@@ -52925,10 +52992,10 @@ async function torCommand(action, value, opts) {
|
|
|
52925
52992
|
for (const dir of [SYSTEM_PATHS.stateDir, USER_PATHS.stateDir]) {
|
|
52926
52993
|
const path2 = (0, import_node_path46.join)(dir, "tor-exits.txt");
|
|
52927
52994
|
try {
|
|
52928
|
-
if (!(0,
|
|
52929
|
-
exits = parseTorExitList((0,
|
|
52995
|
+
if (!(0, import_node_fs61.existsSync)(path2)) continue;
|
|
52996
|
+
exits = parseTorExitList((0, import_node_fs61.readFileSync)(path2, "utf-8"));
|
|
52930
52997
|
from = path2;
|
|
52931
|
-
updated = (0,
|
|
52998
|
+
updated = (0, import_node_fs61.statSync)(path2).mtime;
|
|
52932
52999
|
break;
|
|
52933
53000
|
} catch {
|
|
52934
53001
|
}
|
|
@@ -52976,13 +53043,13 @@ async function torCommand(action, value, opts) {
|
|
|
52976
53043
|
|
|
52977
53044
|
// src/commands/reputation.ts
|
|
52978
53045
|
var import_node_os17 = require("os");
|
|
52979
|
-
var
|
|
53046
|
+
var import_node_fs62 = require("fs");
|
|
52980
53047
|
var import_node_path47 = require("path");
|
|
52981
53048
|
var API_URL7 = process.env.THREATCRUSH_API_URL || "https://threatcrush.com";
|
|
52982
53049
|
var CONFIG_PATH4 = (0, import_node_path47.join)((0, import_node_os17.homedir)(), ".threatcrush", "config.json");
|
|
52983
53050
|
function readConfig3() {
|
|
52984
53051
|
try {
|
|
52985
|
-
return JSON.parse((0,
|
|
53052
|
+
return JSON.parse((0, import_node_fs62.readFileSync)(CONFIG_PATH4, "utf-8"));
|
|
52986
53053
|
} catch {
|
|
52987
53054
|
return {};
|
|
52988
53055
|
}
|
|
@@ -53170,7 +53237,7 @@ async function reputationSubscribeCommand(opts) {
|
|
|
53170
53237
|
}
|
|
53171
53238
|
|
|
53172
53239
|
// src/commands/privileged.ts
|
|
53173
|
-
var
|
|
53240
|
+
var import_node_fs63 = require("fs");
|
|
53174
53241
|
init_paths();
|
|
53175
53242
|
var SEV2 = {
|
|
53176
53243
|
critical: source_default.red.bold,
|
|
@@ -53183,19 +53250,19 @@ async function privilegedCommand(opts) {
|
|
|
53183
53250
|
const snapshot = takeSnapshot({
|
|
53184
53251
|
readFile: (p) => {
|
|
53185
53252
|
try {
|
|
53186
|
-
return (0,
|
|
53253
|
+
return (0, import_node_fs63.readFileSync)(p, "utf-8");
|
|
53187
53254
|
} catch {
|
|
53188
53255
|
return null;
|
|
53189
53256
|
}
|
|
53190
53257
|
},
|
|
53191
53258
|
readDir: (p) => {
|
|
53192
53259
|
try {
|
|
53193
|
-
return (0,
|
|
53260
|
+
return (0, import_node_fs63.readdirSync)(p);
|
|
53194
53261
|
} catch {
|
|
53195
53262
|
return null;
|
|
53196
53263
|
}
|
|
53197
53264
|
},
|
|
53198
|
-
exists: (p) => (0,
|
|
53265
|
+
exists: (p) => (0, import_node_fs63.existsSync)(p)
|
|
53199
53266
|
});
|
|
53200
53267
|
let events = [];
|
|
53201
53268
|
let ledgerNote = "";
|
|
@@ -53237,12 +53304,12 @@ async function privilegedCommand(opts) {
|
|
|
53237
53304
|
}
|
|
53238
53305
|
|
|
53239
53306
|
// src/commands/integrity.ts
|
|
53240
|
-
var
|
|
53307
|
+
var import_node_fs64 = require("fs");
|
|
53241
53308
|
var import_node_path48 = require("path");
|
|
53242
53309
|
init_paths();
|
|
53243
53310
|
function readState2(path2) {
|
|
53244
53311
|
try {
|
|
53245
|
-
return JSON.parse((0,
|
|
53312
|
+
return JSON.parse((0, import_node_fs64.readFileSync)(path2, "utf8"));
|
|
53246
53313
|
} catch {
|
|
53247
53314
|
return null;
|
|
53248
53315
|
}
|
|
@@ -53263,7 +53330,7 @@ async function integrityCommand(action = "status", opts = {}) {
|
|
|
53263
53330
|
const config = loadConfig();
|
|
53264
53331
|
const settings = fileIntegritySettings(config.file_integrity);
|
|
53265
53332
|
const systemBaseline = (0, import_node_path48.join)(SYSTEM_PATHS.stateDir, "file-integrity-baseline.json");
|
|
53266
|
-
const useSystemState = PATHS.mode === "system" || systemDaemonPresent() || (0,
|
|
53333
|
+
const useSystemState = PATHS.mode === "system" || systemDaemonPresent() || (0, import_node_fs64.existsSync)(systemBaseline);
|
|
53267
53334
|
const stateDir = useSystemState ? SYSTEM_PATHS.stateDir : PATHS.stateDir;
|
|
53268
53335
|
const baselinePath = (0, import_node_path48.join)(stateDir, "file-integrity-baseline.json");
|
|
53269
53336
|
const observedPath = (0, import_node_path48.join)(stateDir, "file-integrity-observed.json");
|
|
@@ -53334,11 +53401,11 @@ async function integrityCommand(action = "status", opts = {}) {
|
|
|
53334
53401
|
}
|
|
53335
53402
|
|
|
53336
53403
|
// src/commands/edr.ts
|
|
53337
|
-
var
|
|
53404
|
+
var import_node_fs66 = require("fs");
|
|
53338
53405
|
init_paths();
|
|
53339
53406
|
|
|
53340
53407
|
// src/daemon/auditd/rules.ts
|
|
53341
|
-
var
|
|
53408
|
+
var import_node_fs65 = require("fs");
|
|
53342
53409
|
var import_node_child_process25 = require("child_process");
|
|
53343
53410
|
var import_node_path49 = require("path");
|
|
53344
53411
|
var WEB_TOOLS = ["sh", "bash", "dash", "zsh", "curl", "wget"];
|
|
@@ -53351,7 +53418,7 @@ function passwdByName() {
|
|
|
53351
53418
|
raw = (0, import_node_child_process25.execFileSync)("getent", ["passwd"], { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"] });
|
|
53352
53419
|
} catch {
|
|
53353
53420
|
try {
|
|
53354
|
-
raw = (0,
|
|
53421
|
+
raw = (0, import_node_fs65.readFileSync)("/etc/passwd", "utf8");
|
|
53355
53422
|
} catch {
|
|
53356
53423
|
return /* @__PURE__ */ new Map();
|
|
53357
53424
|
}
|
|
@@ -53370,8 +53437,8 @@ function existingExecutables(names) {
|
|
|
53370
53437
|
for (const prefix of ["/bin", "/usr/bin", "/usr/local/bin"]) {
|
|
53371
53438
|
const candidate = `${prefix}/${name}`;
|
|
53372
53439
|
try {
|
|
53373
|
-
if (!(0,
|
|
53374
|
-
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));
|
|
53375
53442
|
} catch {
|
|
53376
53443
|
}
|
|
53377
53444
|
}
|
|
@@ -53382,7 +53449,7 @@ function existingDirectories(paths) {
|
|
|
53382
53449
|
return [...new Set(paths)].filter((path2) => {
|
|
53383
53450
|
if (!(0, import_node_path49.isAbsolute)(path2) || /[\s\r\n]/.test(path2)) return false;
|
|
53384
53451
|
try {
|
|
53385
|
-
return (0,
|
|
53452
|
+
return (0, import_node_fs65.statSync)(path2).isDirectory();
|
|
53386
53453
|
} catch {
|
|
53387
53454
|
return false;
|
|
53388
53455
|
}
|
|
@@ -53443,8 +53510,8 @@ async function edrCommand(action = "status", opts = {}) {
|
|
|
53443
53510
|
}
|
|
53444
53511
|
let readable = false;
|
|
53445
53512
|
try {
|
|
53446
|
-
if ((0,
|
|
53447
|
-
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);
|
|
53448
53515
|
} catch {
|
|
53449
53516
|
}
|
|
53450
53517
|
let events = [];
|
|
@@ -53630,7 +53697,7 @@ async function allowlistCommand(opts) {
|
|
|
53630
53697
|
}
|
|
53631
53698
|
|
|
53632
53699
|
// src/commands/abuse.ts
|
|
53633
|
-
var
|
|
53700
|
+
var import_node_fs67 = require("fs");
|
|
53634
53701
|
init_paths();
|
|
53635
53702
|
function rows(records) {
|
|
53636
53703
|
if (records.length === 0) {
|
|
@@ -53690,7 +53757,7 @@ function abuseRetractCommand(id, opts = {}) {
|
|
|
53690
53757
|
);
|
|
53691
53758
|
}
|
|
53692
53759
|
function abuseStatusCommand(opts = {}) {
|
|
53693
|
-
const config = loadConfig((0,
|
|
53760
|
+
const config = loadConfig((0, import_node_fs67.existsSync)(PATHS.configFile) ? PATHS.configFile : void 0);
|
|
53694
53761
|
const cfg = resolveConfig(config.abuse_reporter);
|
|
53695
53762
|
const hasKey2 = Boolean(cfg.keys.abuseipdb || cfg.keys.stopforumspam);
|
|
53696
53763
|
const active2 = cfg.enabled && (cfg.dryRun || hasKey2);
|
|
@@ -54278,7 +54345,7 @@ function detectPackageManager() {
|
|
|
54278
54345
|
}
|
|
54279
54346
|
function readInstallConfig() {
|
|
54280
54347
|
try {
|
|
54281
|
-
return JSON.parse((0,
|
|
54348
|
+
return JSON.parse((0, import_node_fs68.readFileSync)(INSTALL_CONFIG_PATH, "utf-8"));
|
|
54282
54349
|
} catch {
|
|
54283
54350
|
return {};
|
|
54284
54351
|
}
|
|
@@ -54701,7 +54768,7 @@ program2.command("uninstall-service").description("Remove the threatcrushd syste
|
|
|
54701
54768
|
program2.command("logs").description("Tail daemon logs").action(async () => {
|
|
54702
54769
|
console.log(LOGO2);
|
|
54703
54770
|
const logPath2 = PATHS.logFile;
|
|
54704
|
-
if (!(0,
|
|
54771
|
+
if (!(0, import_node_fs68.existsSync)(logPath2)) {
|
|
54705
54772
|
console.log(source_default.yellow(` No log file found at ${logPath2}`));
|
|
54706
54773
|
console.log(source_default.dim(" Start the daemon first with `threatcrush start`\n"));
|
|
54707
54774
|
return;
|
|
@@ -54877,7 +54944,7 @@ storeCmd.command("publish <url>").description("Publish a module from a git URL o
|
|
|
54877
54944
|
const configPath = (0, import_node_path51.join)((0, import_node_os19.homedir)(), ".threatcrush", "config.json");
|
|
54878
54945
|
let email = "";
|
|
54879
54946
|
try {
|
|
54880
|
-
const config = JSON.parse((0,
|
|
54947
|
+
const config = JSON.parse((0, import_node_fs68.readFileSync)(configPath, "utf-8"));
|
|
54881
54948
|
email = config.email || "";
|
|
54882
54949
|
} catch {
|
|
54883
54950
|
}
|
|
@@ -54895,8 +54962,8 @@ storeCmd.command("publish <url>").description("Publish a module from a git URL o
|
|
|
54895
54962
|
}
|
|
54896
54963
|
try {
|
|
54897
54964
|
const dir = (0, import_node_path51.join)((0, import_node_os19.homedir)(), ".threatcrush");
|
|
54898
|
-
if (!(0,
|
|
54899
|
-
(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));
|
|
54900
54967
|
console.log(source_default.dim(` Saved email to ${configPath}`));
|
|
54901
54968
|
} catch {
|
|
54902
54969
|
}
|