@loglayer/transport-pretty-terminal 3.0.3 → 3.1.1
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/index.cjs +525 -527
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +361 -363
- package/dist/index.js.map +1 -1
- package/package.json +17 -13
package/dist/index.cjs
CHANGED
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
var _transport = require('@loglayer/transport');
|
|
3
3
|
var _chalk = require('chalk'); var chalk8 = _interopRequireWildcard(_chalk);
|
|
4
4
|
|
|
5
|
-
// src/views/
|
|
6
|
-
var _wrapansi = require('wrap-ansi'); var _wrapansi2 = _interopRequireDefault(_wrapansi);
|
|
7
|
-
|
|
8
|
-
// src/views/utils.ts
|
|
5
|
+
// src/views/DetailView.ts
|
|
9
6
|
|
|
10
|
-
var
|
|
7
|
+
var _wrapansi = require('wrap-ansi'); var _wrapansi2 = _interopRequireDefault(_wrapansi);
|
|
11
8
|
|
|
12
9
|
// src/vendor/prettyjson.js
|
|
13
10
|
|
|
@@ -18,7 +15,7 @@ function indent(numSpaces) {
|
|
|
18
15
|
}
|
|
19
16
|
function getMaxIndexLength(input) {
|
|
20
17
|
var maxWidth = 0;
|
|
21
|
-
Object.getOwnPropertyNames(input).forEach(
|
|
18
|
+
Object.getOwnPropertyNames(input).forEach((key) => {
|
|
22
19
|
if (input[key] === void 0) {
|
|
23
20
|
return;
|
|
24
21
|
}
|
|
@@ -38,7 +35,7 @@ function isIsoStringDate(isoString) {
|
|
|
38
35
|
}
|
|
39
36
|
|
|
40
37
|
// src/vendor/prettyjson.js
|
|
41
|
-
var conflictChars = /[^\w\s\n\r\v\t
|
|
38
|
+
var conflictChars = /[^\w\s\n\r\v\t.,]/i;
|
|
42
39
|
var isPrintable = (input, options) => input !== void 0 || options.renderUndefined;
|
|
43
40
|
var isSerializable = (input, onlyPrimitives, options) => {
|
|
44
41
|
if (typeof input === "boolean" || typeof input === "number" || typeof input === "function" || input === null || input === void 0 || input instanceof Date) {
|
|
@@ -125,7 +122,7 @@ var renderToArray = (data, options, indentation) => {
|
|
|
125
122
|
return [indent(indentation) + options.emptyArrayMsg];
|
|
126
123
|
}
|
|
127
124
|
if (options.collapseArrays && data.length > 0) {
|
|
128
|
-
return [indent(indentation)
|
|
125
|
+
return [`${indent(indentation)}[... ${data.length} items]`];
|
|
129
126
|
}
|
|
130
127
|
const outputArray = [];
|
|
131
128
|
data.forEach((element) => {
|
|
@@ -204,6 +201,8 @@ function render(data, options, indentation) {
|
|
|
204
201
|
}
|
|
205
202
|
|
|
206
203
|
// src/views/utils.ts
|
|
204
|
+
|
|
205
|
+
var _clitruncate = require('cli-truncate'); var _clitruncate2 = _interopRequireDefault(_clitruncate);
|
|
207
206
|
function formatTimestamp(timestamp, colorFn) {
|
|
208
207
|
const date = new Date(timestamp);
|
|
209
208
|
return colorFn(
|
|
@@ -245,66 +244,7 @@ function formatInlineData(data, config, maxDepth, maxLength, expanded = false) {
|
|
|
245
244
|
return expanded ? result : _clitruncate2.default.call(void 0, result, maxLength);
|
|
246
245
|
}
|
|
247
246
|
|
|
248
|
-
// src/views/SimpleView.ts
|
|
249
|
-
var SimpleView = class {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
constructor(config) {
|
|
253
|
-
this.config = config;
|
|
254
|
-
this.termWidth = process.stdout.columns || 80;
|
|
255
|
-
}
|
|
256
|
-
updateTerminalWidth(width) {
|
|
257
|
-
this.termWidth = width;
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Renders a single log entry based on the current view mode
|
|
261
|
-
*/
|
|
262
|
-
renderLogLine(entry) {
|
|
263
|
-
const levelColor = getLevelColor(entry.level, this.config.config.colors);
|
|
264
|
-
const chevron = levelColor(`\u25B6 ${entry.level.toUpperCase()} `);
|
|
265
|
-
const message = entry.message || "(no message)";
|
|
266
|
-
const timestamp = formatTimestamp(entry.timestamp, this.config.config.logIdColor);
|
|
267
|
-
switch (this.config.viewMode) {
|
|
268
|
-
case "condensed": {
|
|
269
|
-
const condensedLine = `${timestamp} ${chevron}${message}`;
|
|
270
|
-
console.log(_wrapansi2.default.call(void 0, condensedLine, this.termWidth, { hard: true }));
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
case "full": {
|
|
274
|
-
const logId = this.config.config.logIdColor(`[${entry.id}]`);
|
|
275
|
-
const fullData = entry.data ? formatInlineData(
|
|
276
|
-
JSON.parse(entry.data),
|
|
277
|
-
this.config.config,
|
|
278
|
-
this.config.maxInlineDepth,
|
|
279
|
-
this.config.maxInlineLength,
|
|
280
|
-
true
|
|
281
|
-
) : "";
|
|
282
|
-
const expandedLine = `${timestamp} ${chevron}${logId} ${message}${fullData ? ` ${fullData}` : ""}`;
|
|
283
|
-
console.log(_wrapansi2.default.call(void 0, expandedLine, this.termWidth, { hard: true }));
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
default: {
|
|
287
|
-
const logId = this.config.config.logIdColor(`[${entry.id}]`);
|
|
288
|
-
const normalData = entry.data ? formatInlineData(
|
|
289
|
-
JSON.parse(entry.data),
|
|
290
|
-
this.config.config,
|
|
291
|
-
this.config.maxInlineDepth,
|
|
292
|
-
this.config.maxInlineLength
|
|
293
|
-
) : "";
|
|
294
|
-
const normalLine = `${timestamp} ${chevron}${logId} ${message}${normalData ? ` ${normalData}` : ""}`;
|
|
295
|
-
console.log(_wrapansi2.default.call(void 0, normalLine, this.termWidth, { hard: true }));
|
|
296
|
-
break;
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
render() {
|
|
301
|
-
throw new Error("SimpleView.render() should not be called directly. Use renderLogLine() instead.");
|
|
302
|
-
}
|
|
303
|
-
};
|
|
304
|
-
|
|
305
247
|
// src/views/DetailView.ts
|
|
306
|
-
|
|
307
|
-
|
|
308
248
|
var DetailView = (_class = class {
|
|
309
249
|
|
|
310
250
|
|
|
@@ -522,6 +462,64 @@ var SelectionView = class {
|
|
|
522
462
|
}
|
|
523
463
|
};
|
|
524
464
|
|
|
465
|
+
// src/views/SimpleView.ts
|
|
466
|
+
|
|
467
|
+
var SimpleView = class {
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
constructor(config) {
|
|
471
|
+
this.config = config;
|
|
472
|
+
this.termWidth = process.stdout.columns || 80;
|
|
473
|
+
}
|
|
474
|
+
updateTerminalWidth(width) {
|
|
475
|
+
this.termWidth = width;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Renders a single log entry based on the current view mode
|
|
479
|
+
*/
|
|
480
|
+
renderLogLine(entry) {
|
|
481
|
+
const levelColor = getLevelColor(entry.level, this.config.config.colors);
|
|
482
|
+
const chevron = levelColor(`\u25B6 ${entry.level.toUpperCase()} `);
|
|
483
|
+
const message = entry.message || "(no message)";
|
|
484
|
+
const timestamp = formatTimestamp(entry.timestamp, this.config.config.logIdColor);
|
|
485
|
+
switch (this.config.viewMode) {
|
|
486
|
+
case "condensed": {
|
|
487
|
+
const condensedLine = `${timestamp} ${chevron}${message}`;
|
|
488
|
+
console.log(_wrapansi2.default.call(void 0, condensedLine, this.termWidth, { hard: true }));
|
|
489
|
+
break;
|
|
490
|
+
}
|
|
491
|
+
case "full": {
|
|
492
|
+
const logId = this.config.config.logIdColor(`[${entry.id}]`);
|
|
493
|
+
const fullData = entry.data ? formatInlineData(
|
|
494
|
+
JSON.parse(entry.data),
|
|
495
|
+
this.config.config,
|
|
496
|
+
this.config.maxInlineDepth,
|
|
497
|
+
this.config.maxInlineLength,
|
|
498
|
+
true
|
|
499
|
+
) : "";
|
|
500
|
+
const expandedLine = `${timestamp} ${chevron}${logId} ${message}${fullData ? ` ${fullData}` : ""}`;
|
|
501
|
+
console.log(_wrapansi2.default.call(void 0, expandedLine, this.termWidth, { hard: true }));
|
|
502
|
+
break;
|
|
503
|
+
}
|
|
504
|
+
default: {
|
|
505
|
+
const logId = this.config.config.logIdColor(`[${entry.id}]`);
|
|
506
|
+
const normalData = entry.data ? formatInlineData(
|
|
507
|
+
JSON.parse(entry.data),
|
|
508
|
+
this.config.config,
|
|
509
|
+
this.config.maxInlineDepth,
|
|
510
|
+
this.config.maxInlineLength
|
|
511
|
+
) : "";
|
|
512
|
+
const normalLine = `${timestamp} ${chevron}${logId} ${message}${normalData ? ` ${normalData}` : ""}`;
|
|
513
|
+
console.log(_wrapansi2.default.call(void 0, normalLine, this.termWidth, { hard: true }));
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
render() {
|
|
519
|
+
throw new Error("SimpleView.render() should not be called directly. Use renderLogLine() instead.");
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
|
|
525
523
|
// src/LogRenderer.ts
|
|
526
524
|
var LogRenderer = (_class2 = class {
|
|
527
525
|
/** Current terminal width in characters */
|
|
@@ -839,188 +837,475 @@ var LogStorage = class {
|
|
|
839
837
|
}
|
|
840
838
|
};
|
|
841
839
|
|
|
842
|
-
// src/
|
|
840
|
+
// src/themes.ts
|
|
843
841
|
|
|
844
|
-
var
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
842
|
+
var moonlight = {
|
|
843
|
+
simpleView: {
|
|
844
|
+
colors: {
|
|
845
|
+
trace: chalk8.default.rgb(114, 135, 153),
|
|
846
|
+
// Muted blue-grey for less important info
|
|
847
|
+
debug: chalk8.default.rgb(130, 170, 255),
|
|
848
|
+
// Soft blue that pops but doesn't strain
|
|
849
|
+
info: chalk8.default.rgb(195, 232, 141),
|
|
850
|
+
// Sage green for good readability
|
|
851
|
+
warn: chalk8.default.rgb(255, 203, 107),
|
|
852
|
+
// Warm yellow, less harsh than pure yellow
|
|
853
|
+
error: chalk8.default.rgb(247, 118, 142),
|
|
854
|
+
// Soft red that stands out without being aggressive
|
|
855
|
+
fatal: chalk8.default.bgRgb(247, 118, 142).white
|
|
856
|
+
// Inverted soft red for maximum visibility
|
|
857
|
+
},
|
|
858
|
+
logIdColor: chalk8.default.rgb(84, 98, 117),
|
|
859
|
+
// Darker blue-grey for secondary information
|
|
860
|
+
dataValueColor: chalk8.default.rgb(209, 219, 231),
|
|
861
|
+
// Light grey-blue for primary content
|
|
862
|
+
dataKeyColor: chalk8.default.rgb(130, 170, 255),
|
|
863
|
+
// Matching debug blue for consistency
|
|
864
|
+
selectorColor: chalk8.default.rgb(137, 221, 255)
|
|
865
|
+
// Ice blue for selection indicators
|
|
866
|
+
},
|
|
867
|
+
detailedView: {
|
|
868
|
+
colors: {
|
|
869
|
+
trace: chalk8.default.rgb(114, 135, 153),
|
|
870
|
+
debug: chalk8.default.rgb(130, 170, 255),
|
|
871
|
+
info: chalk8.default.rgb(195, 232, 141),
|
|
872
|
+
warn: chalk8.default.rgb(255, 203, 107),
|
|
873
|
+
error: chalk8.default.rgb(247, 118, 142),
|
|
874
|
+
fatal: chalk8.default.bgRgb(247, 118, 142).white
|
|
875
|
+
},
|
|
876
|
+
logIdColor: chalk8.default.rgb(84, 98, 117),
|
|
877
|
+
dataValueColor: chalk8.default.rgb(209, 219, 231),
|
|
878
|
+
dataKeyColor: chalk8.default.rgb(130, 170, 255),
|
|
879
|
+
selectorColor: chalk8.default.rgb(137, 221, 255),
|
|
880
|
+
// Ice blue for selection indicators
|
|
881
|
+
headerColor: chalk8.default.rgb(137, 221, 255),
|
|
882
|
+
labelColor: chalk8.default.rgb(137, 221, 255).bold,
|
|
883
|
+
separatorColor: chalk8.default.rgb(84, 98, 117),
|
|
884
|
+
jsonColors: {
|
|
885
|
+
keysColor: chalk8.default.rgb(130, 170, 255),
|
|
886
|
+
dashColor: chalk8.default.rgb(209, 219, 231),
|
|
887
|
+
numberColor: chalk8.default.rgb(247, 140, 108),
|
|
888
|
+
stringColor: chalk8.default.rgb(195, 232, 141),
|
|
889
|
+
multilineStringColor: chalk8.default.rgb(195, 232, 141),
|
|
890
|
+
positiveNumberColor: chalk8.default.rgb(195, 232, 141),
|
|
891
|
+
negativeNumberColor: chalk8.default.rgb(247, 118, 142),
|
|
892
|
+
booleanColor: chalk8.default.rgb(255, 203, 107),
|
|
893
|
+
nullUndefinedColor: chalk8.default.rgb(114, 135, 153),
|
|
894
|
+
dateColor: chalk8.default.rgb(199, 146, 234)
|
|
860
895
|
}
|
|
861
|
-
process.stdout.on("resize", () => {
|
|
862
|
-
this.termWidth = process.stdout.columns || 80;
|
|
863
|
-
if (this.isDetailView) {
|
|
864
|
-
const entry = this.logs[this.selectedIndex];
|
|
865
|
-
const prevEntry = this.selectedIndex > 0 ? this.logs[this.selectedIndex - 1] : null;
|
|
866
|
-
const nextEntry = this.selectedIndex < this.logs.length - 1 ? this.logs[this.selectedIndex + 1] : null;
|
|
867
|
-
this.renderer.renderDetailView(entry, prevEntry, nextEntry, this.renderer.getDetailViewScrollPos());
|
|
868
|
-
} else if (this.isSelectionMode) {
|
|
869
|
-
this.renderer.renderSelectionView(this.logs, this.selectedIndex, this.filterText, this.selectionBuffer.length);
|
|
870
|
-
}
|
|
871
|
-
});
|
|
872
896
|
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
* Starts polling for new logs in selection view
|
|
925
|
-
* @private
|
|
926
|
-
*/
|
|
927
|
-
startSelectionViewPolling() {
|
|
928
|
-
if (this.selectionViewPollInterval) {
|
|
929
|
-
clearInterval(this.selectionViewPollInterval);
|
|
897
|
+
};
|
|
898
|
+
var sunlight = {
|
|
899
|
+
simpleView: {
|
|
900
|
+
colors: {
|
|
901
|
+
trace: chalk8.default.rgb(110, 110, 110),
|
|
902
|
+
// Dark grey for subtle information
|
|
903
|
+
debug: chalk8.default.rgb(32, 96, 159),
|
|
904
|
+
// Deep blue for strong contrast on white
|
|
905
|
+
info: chalk8.default.rgb(35, 134, 54),
|
|
906
|
+
// Forest green, easier on the eyes than bright green
|
|
907
|
+
warn: chalk8.default.rgb(176, 95, 0),
|
|
908
|
+
// Brown-orange for natural warning color
|
|
909
|
+
error: chalk8.default.rgb(191, 0, 0),
|
|
910
|
+
// Deep red for clear visibility on light backgrounds
|
|
911
|
+
fatal: chalk8.default.bgRgb(191, 0, 0).white
|
|
912
|
+
// White on deep red for critical issues
|
|
913
|
+
},
|
|
914
|
+
logIdColor: chalk8.default.rgb(110, 110, 110),
|
|
915
|
+
dataValueColor: chalk8.default.rgb(0, 0, 0),
|
|
916
|
+
dataKeyColor: chalk8.default.rgb(32, 96, 159),
|
|
917
|
+
selectorColor: chalk8.default.rgb(0, 91, 129)
|
|
918
|
+
// Deep blue for strong contrast
|
|
919
|
+
},
|
|
920
|
+
detailedView: {
|
|
921
|
+
colors: {
|
|
922
|
+
trace: chalk8.default.rgb(110, 110, 110),
|
|
923
|
+
debug: chalk8.default.rgb(32, 96, 159),
|
|
924
|
+
info: chalk8.default.rgb(35, 134, 54),
|
|
925
|
+
warn: chalk8.default.rgb(176, 95, 0),
|
|
926
|
+
error: chalk8.default.rgb(191, 0, 0),
|
|
927
|
+
fatal: chalk8.default.bgRgb(191, 0, 0).white
|
|
928
|
+
},
|
|
929
|
+
logIdColor: chalk8.default.rgb(110, 110, 110),
|
|
930
|
+
dataValueColor: chalk8.default.rgb(0, 0, 0),
|
|
931
|
+
dataKeyColor: chalk8.default.rgb(32, 96, 159),
|
|
932
|
+
selectorColor: chalk8.default.rgb(0, 91, 129),
|
|
933
|
+
// Deep blue for strong contrast
|
|
934
|
+
headerColor: chalk8.default.rgb(0, 91, 129),
|
|
935
|
+
labelColor: chalk8.default.rgb(0, 91, 129).bold,
|
|
936
|
+
separatorColor: chalk8.default.rgb(110, 110, 110),
|
|
937
|
+
jsonColors: {
|
|
938
|
+
keysColor: chalk8.default.rgb(32, 96, 159),
|
|
939
|
+
dashColor: chalk8.default.rgb(0, 0, 0),
|
|
940
|
+
numberColor: chalk8.default.rgb(170, 55, 49),
|
|
941
|
+
stringColor: chalk8.default.rgb(35, 134, 54),
|
|
942
|
+
multilineStringColor: chalk8.default.rgb(35, 134, 54),
|
|
943
|
+
positiveNumberColor: chalk8.default.rgb(46, 125, 50),
|
|
944
|
+
negativeNumberColor: chalk8.default.rgb(183, 28, 28),
|
|
945
|
+
booleanColor: chalk8.default.rgb(176, 95, 0),
|
|
946
|
+
nullUndefinedColor: chalk8.default.rgb(110, 110, 110),
|
|
947
|
+
dateColor: chalk8.default.rgb(123, 31, 162)
|
|
930
948
|
}
|
|
931
|
-
this.selectionViewPollInterval = setInterval(() => {
|
|
932
|
-
if (!this.isSelectionMode) {
|
|
933
|
-
clearInterval(this.selectionViewPollInterval);
|
|
934
|
-
this.selectionViewPollInterval = null;
|
|
935
|
-
return;
|
|
936
|
-
}
|
|
937
|
-
if (this.selectionBuffer.length > 0) {
|
|
938
|
-
this.renderer.renderSelectionView(this.logs, this.selectedIndex, this.filterText, this.selectionBuffer.length);
|
|
939
|
-
}
|
|
940
|
-
}, 2e3);
|
|
941
949
|
}
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
950
|
+
};
|
|
951
|
+
var neon = {
|
|
952
|
+
simpleView: {
|
|
953
|
+
colors: {
|
|
954
|
+
trace: chalk8.default.rgb(108, 108, 255),
|
|
955
|
+
// Electric blue
|
|
956
|
+
debug: chalk8.default.rgb(255, 82, 246),
|
|
957
|
+
// Hot pink
|
|
958
|
+
info: chalk8.default.rgb(0, 255, 163),
|
|
959
|
+
// Cyber green
|
|
960
|
+
warn: chalk8.default.rgb(255, 231, 46),
|
|
961
|
+
// Electric yellow
|
|
962
|
+
error: chalk8.default.rgb(255, 53, 91),
|
|
963
|
+
// Neon red
|
|
964
|
+
fatal: chalk8.default.bgRgb(255, 53, 91).rgb(0, 255, 163)
|
|
965
|
+
// Neon red bg with cyber green text
|
|
966
|
+
},
|
|
967
|
+
logIdColor: chalk8.default.rgb(187, 134, 252),
|
|
968
|
+
// Bright purple
|
|
969
|
+
dataValueColor: chalk8.default.rgb(255, 255, 255),
|
|
970
|
+
// Pure white
|
|
971
|
+
dataKeyColor: chalk8.default.rgb(0, 255, 240),
|
|
972
|
+
// Cyan
|
|
973
|
+
selectorColor: chalk8.default.rgb(0, 255, 240)
|
|
974
|
+
// Electric cyan for cyberpunk feel
|
|
975
|
+
},
|
|
976
|
+
detailedView: {
|
|
977
|
+
colors: {
|
|
978
|
+
trace: chalk8.default.rgb(108, 108, 255),
|
|
979
|
+
debug: chalk8.default.rgb(255, 82, 246),
|
|
980
|
+
info: chalk8.default.rgb(0, 255, 163),
|
|
981
|
+
warn: chalk8.default.rgb(255, 231, 46),
|
|
982
|
+
error: chalk8.default.rgb(255, 53, 91),
|
|
983
|
+
fatal: chalk8.default.bgRgb(255, 53, 91).rgb(0, 255, 163)
|
|
984
|
+
},
|
|
985
|
+
logIdColor: chalk8.default.rgb(187, 134, 252),
|
|
986
|
+
dataValueColor: chalk8.default.rgb(255, 255, 255),
|
|
987
|
+
dataKeyColor: chalk8.default.rgb(0, 255, 240),
|
|
988
|
+
selectorColor: chalk8.default.rgb(0, 255, 240),
|
|
989
|
+
// Electric cyan for cyberpunk feel
|
|
990
|
+
headerColor: chalk8.default.rgb(255, 82, 246),
|
|
991
|
+
labelColor: chalk8.default.rgb(255, 82, 246).bold,
|
|
992
|
+
separatorColor: chalk8.default.rgb(108, 108, 255),
|
|
993
|
+
jsonColors: {
|
|
994
|
+
keysColor: chalk8.default.rgb(0, 255, 240),
|
|
995
|
+
dashColor: chalk8.default.rgb(255, 255, 255),
|
|
996
|
+
numberColor: chalk8.default.rgb(255, 82, 246),
|
|
997
|
+
stringColor: chalk8.default.rgb(0, 255, 163),
|
|
998
|
+
multilineStringColor: chalk8.default.rgb(0, 255, 163),
|
|
999
|
+
positiveNumberColor: chalk8.default.rgb(0, 255, 163),
|
|
1000
|
+
negativeNumberColor: chalk8.default.rgb(255, 53, 91),
|
|
1001
|
+
booleanColor: chalk8.default.rgb(255, 231, 46),
|
|
1002
|
+
nullUndefinedColor: chalk8.default.rgb(108, 108, 255),
|
|
1003
|
+
dateColor: chalk8.default.rgb(187, 134, 252)
|
|
949
1004
|
}
|
|
950
|
-
this.detailViewPollInterval = setInterval(() => {
|
|
951
|
-
if (!this.isDetailView) {
|
|
952
|
-
clearInterval(this.detailViewPollInterval);
|
|
953
|
-
this.detailViewPollInterval = null;
|
|
954
|
-
return;
|
|
955
|
-
}
|
|
956
|
-
const totalCount = this.filterText ? this.storage.getFilteredLogCount(this.filterText) : this.storage.getLogCount();
|
|
957
|
-
if (totalCount !== this.logs.length) {
|
|
958
|
-
const storedLogs = this.filterText ? this.storage.searchLogs(this.filterText) : this.storage.getAllLogs();
|
|
959
|
-
this.logs = storedLogs;
|
|
960
|
-
const entry = this.logs[this.selectedIndex];
|
|
961
|
-
const prevEntry = this.selectedIndex > 0 ? this.logs[this.selectedIndex - 1] : null;
|
|
962
|
-
const nextEntry = this.selectedIndex < this.logs.length - 1 ? this.logs[this.selectedIndex + 1] : null;
|
|
963
|
-
this.renderer.renderDetailView(
|
|
964
|
-
entry,
|
|
965
|
-
prevEntry,
|
|
966
|
-
nextEntry,
|
|
967
|
-
this.renderer.getDetailViewScrollPos(),
|
|
968
|
-
this.selectedIndex + 1,
|
|
969
|
-
totalCount,
|
|
970
|
-
this.filterText
|
|
971
|
-
);
|
|
972
|
-
}
|
|
973
|
-
}, 2e3);
|
|
974
1005
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1006
|
+
};
|
|
1007
|
+
var nature = {
|
|
1008
|
+
simpleView: {
|
|
1009
|
+
colors: {
|
|
1010
|
+
trace: chalk8.default.rgb(121, 85, 72),
|
|
1011
|
+
// Wooden brown
|
|
1012
|
+
debug: chalk8.default.rgb(46, 125, 50),
|
|
1013
|
+
// Forest green
|
|
1014
|
+
info: chalk8.default.rgb(0, 105, 92),
|
|
1015
|
+
// Deep teal
|
|
1016
|
+
warn: chalk8.default.rgb(175, 115, 0),
|
|
1017
|
+
// Golden amber
|
|
1018
|
+
error: chalk8.default.rgb(183, 28, 28),
|
|
1019
|
+
// Autumn red
|
|
1020
|
+
fatal: chalk8.default.bgRgb(183, 28, 28).rgb(255, 250, 240)
|
|
1021
|
+
// Red bg with soft white
|
|
1022
|
+
},
|
|
1023
|
+
logIdColor: chalk8.default.rgb(93, 64, 55),
|
|
1024
|
+
// Deep bark brown
|
|
1025
|
+
dataValueColor: chalk8.default.rgb(27, 27, 27),
|
|
1026
|
+
// Near black
|
|
1027
|
+
dataKeyColor: chalk8.default.rgb(56, 142, 60),
|
|
1028
|
+
// Leaf green
|
|
1029
|
+
selectorColor: chalk8.default.rgb(0, 105, 92)
|
|
1030
|
+
// Deep teal for natural feel
|
|
1031
|
+
},
|
|
1032
|
+
detailedView: {
|
|
1033
|
+
colors: {
|
|
1034
|
+
trace: chalk8.default.rgb(121, 85, 72),
|
|
1035
|
+
debug: chalk8.default.rgb(46, 125, 50),
|
|
1036
|
+
info: chalk8.default.rgb(0, 105, 92),
|
|
1037
|
+
warn: chalk8.default.rgb(175, 115, 0),
|
|
1038
|
+
error: chalk8.default.rgb(183, 28, 28),
|
|
1039
|
+
fatal: chalk8.default.bgRgb(183, 28, 28).rgb(255, 250, 240)
|
|
1040
|
+
},
|
|
1041
|
+
logIdColor: chalk8.default.rgb(93, 64, 55),
|
|
1042
|
+
dataValueColor: chalk8.default.rgb(27, 27, 27),
|
|
1043
|
+
dataKeyColor: chalk8.default.rgb(56, 142, 60),
|
|
1044
|
+
selectorColor: chalk8.default.rgb(0, 105, 92),
|
|
1045
|
+
// Deep teal for natural feel
|
|
1046
|
+
headerColor: chalk8.default.rgb(0, 77, 64),
|
|
1047
|
+
labelColor: chalk8.default.rgb(0, 77, 64).bold,
|
|
1048
|
+
separatorColor: chalk8.default.rgb(121, 85, 72),
|
|
1049
|
+
jsonColors: {
|
|
1050
|
+
keysColor: chalk8.default.rgb(56, 142, 60),
|
|
1051
|
+
dashColor: chalk8.default.rgb(27, 27, 27),
|
|
1052
|
+
numberColor: chalk8.default.rgb(230, 81, 0),
|
|
1053
|
+
stringColor: chalk8.default.rgb(0, 105, 92),
|
|
1054
|
+
multilineStringColor: chalk8.default.rgb(0, 105, 92),
|
|
1055
|
+
positiveNumberColor: chalk8.default.rgb(46, 125, 50),
|
|
1056
|
+
negativeNumberColor: chalk8.default.rgb(183, 28, 28),
|
|
1057
|
+
booleanColor: chalk8.default.rgb(175, 115, 0),
|
|
1058
|
+
nullUndefinedColor: chalk8.default.rgb(121, 85, 72),
|
|
1059
|
+
dateColor: chalk8.default.rgb(123, 31, 162)
|
|
992
1060
|
}
|
|
993
1061
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1062
|
+
};
|
|
1063
|
+
var pastel = {
|
|
1064
|
+
simpleView: {
|
|
1065
|
+
colors: {
|
|
1066
|
+
trace: chalk8.default.rgb(179, 189, 203),
|
|
1067
|
+
// Soft slate blue
|
|
1068
|
+
debug: chalk8.default.rgb(189, 178, 255),
|
|
1069
|
+
// Gentle lavender
|
|
1070
|
+
info: chalk8.default.rgb(170, 236, 205),
|
|
1071
|
+
// Mint green
|
|
1072
|
+
warn: chalk8.default.rgb(255, 223, 186),
|
|
1073
|
+
// Peach
|
|
1074
|
+
error: chalk8.default.rgb(255, 188, 188),
|
|
1075
|
+
// Soft coral
|
|
1076
|
+
fatal: chalk8.default.bgRgb(255, 188, 188).rgb(76, 40, 40)
|
|
1077
|
+
// Coral bg with deep brown
|
|
1078
|
+
},
|
|
1079
|
+
logIdColor: chalk8.default.rgb(203, 195, 227),
|
|
1080
|
+
// Dusty lavender
|
|
1081
|
+
dataValueColor: chalk8.default.rgb(236, 236, 236),
|
|
1082
|
+
// Soft white
|
|
1083
|
+
dataKeyColor: chalk8.default.rgb(186, 207, 255),
|
|
1084
|
+
// Baby blue
|
|
1085
|
+
selectorColor: chalk8.default.rgb(189, 178, 255)
|
|
1086
|
+
// Soft lavender for gentle highlighting
|
|
1087
|
+
},
|
|
1088
|
+
detailedView: {
|
|
1089
|
+
colors: {
|
|
1090
|
+
trace: chalk8.default.rgb(179, 189, 203),
|
|
1091
|
+
debug: chalk8.default.rgb(189, 178, 255),
|
|
1092
|
+
info: chalk8.default.rgb(170, 236, 205),
|
|
1093
|
+
warn: chalk8.default.rgb(255, 223, 186),
|
|
1094
|
+
error: chalk8.default.rgb(255, 188, 188),
|
|
1095
|
+
fatal: chalk8.default.bgRgb(255, 188, 188).rgb(76, 40, 40)
|
|
1096
|
+
},
|
|
1097
|
+
logIdColor: chalk8.default.rgb(203, 195, 227),
|
|
1098
|
+
dataValueColor: chalk8.default.rgb(236, 236, 236),
|
|
1099
|
+
dataKeyColor: chalk8.default.rgb(186, 207, 255),
|
|
1100
|
+
selectorColor: chalk8.default.rgb(189, 178, 255),
|
|
1101
|
+
// Soft lavender for gentle highlighting
|
|
1102
|
+
headerColor: chalk8.default.rgb(255, 198, 255),
|
|
1103
|
+
// Cotton candy pink
|
|
1104
|
+
labelColor: chalk8.default.rgb(255, 198, 255).bold,
|
|
1105
|
+
separatorColor: chalk8.default.rgb(179, 189, 203),
|
|
1106
|
+
jsonColors: {
|
|
1107
|
+
keysColor: chalk8.default.rgb(186, 207, 255),
|
|
1108
|
+
// Baby blue
|
|
1109
|
+
dashColor: chalk8.default.rgb(236, 236, 236),
|
|
1110
|
+
// Soft white
|
|
1111
|
+
numberColor: chalk8.default.rgb(255, 198, 255),
|
|
1112
|
+
// Cotton candy pink
|
|
1113
|
+
stringColor: chalk8.default.rgb(170, 236, 205),
|
|
1114
|
+
// Mint green
|
|
1115
|
+
multilineStringColor: chalk8.default.rgb(170, 236, 205),
|
|
1116
|
+
positiveNumberColor: chalk8.default.rgb(170, 236, 205),
|
|
1117
|
+
negativeNumberColor: chalk8.default.rgb(255, 188, 188),
|
|
1118
|
+
booleanColor: chalk8.default.rgb(255, 223, 186),
|
|
1119
|
+
// Peach
|
|
1120
|
+
nullUndefinedColor: chalk8.default.rgb(179, 189, 203),
|
|
1121
|
+
dateColor: chalk8.default.rgb(189, 178, 255)
|
|
1122
|
+
// Gentle lavender
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
|
|
1127
|
+
// src/UIManager.ts
|
|
1128
|
+
|
|
1129
|
+
var _keypress = require('keypress'); var _keypress2 = _interopRequireDefault(_keypress);
|
|
1130
|
+
var UIManager = (_class3 = class {
|
|
1131
|
+
/**
|
|
1132
|
+
* Creates a new UIManager instance.
|
|
1133
|
+
* Sets up keyboard handling and cleanup handlers.
|
|
1134
|
+
*
|
|
1135
|
+
* @param renderer - Instance for handling log display
|
|
1136
|
+
* @param storage - Instance for log persistence
|
|
1137
|
+
* @param disableInteractiveMode - Whether to disable interactive mode
|
|
1138
|
+
*/
|
|
1139
|
+
constructor(renderer, storage, disableInteractiveMode = false) {;_class3.prototype.__init8.call(this);_class3.prototype.__init9.call(this);_class3.prototype.__init10.call(this);_class3.prototype.__init11.call(this);_class3.prototype.__init12.call(this);_class3.prototype.__init13.call(this);_class3.prototype.__init14.call(this);_class3.prototype.__init15.call(this);_class3.prototype.__init16.call(this);_class3.prototype.__init17.call(this);_class3.prototype.__init18.call(this);
|
|
1140
|
+
this.renderer = renderer;
|
|
1141
|
+
this.storage = storage;
|
|
1142
|
+
this.isInteractiveDisabled = disableInteractiveMode;
|
|
1143
|
+
if (!this.isInteractiveDisabled) {
|
|
1144
|
+
this.setupKeyboardHandling();
|
|
1145
|
+
}
|
|
1146
|
+
process.stdout.on("resize", () => {
|
|
1147
|
+
this.termWidth = process.stdout.columns || 80;
|
|
1148
|
+
if (this.isDetailView) {
|
|
1149
|
+
const entry = this.logs[this.selectedIndex];
|
|
1150
|
+
const prevEntry = this.selectedIndex > 0 ? this.logs[this.selectedIndex - 1] : null;
|
|
1151
|
+
const nextEntry = this.selectedIndex < this.logs.length - 1 ? this.logs[this.selectedIndex + 1] : null;
|
|
1152
|
+
this.renderer.renderDetailView(entry, prevEntry, nextEntry, this.renderer.getDetailViewScrollPos());
|
|
1153
|
+
} else if (this.isSelectionMode) {
|
|
1154
|
+
this.renderer.renderSelectionView(this.logs, this.selectedIndex, this.filterText, this.selectionBuffer.length);
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
}
|
|
1158
|
+
/** Whether the UI is in log selection mode */
|
|
1159
|
+
__init8() {this.isSelectionMode = false}
|
|
1160
|
+
/** Whether the UI is showing detailed log view */
|
|
1161
|
+
__init9() {this.isDetailView = false}
|
|
1162
|
+
/** Whether log streaming is paused */
|
|
1163
|
+
__init10() {this.isPaused = false}
|
|
1164
|
+
/** Whether interactive mode is disabled */
|
|
1165
|
+
|
|
1166
|
+
/** Buffer for logs received while paused */
|
|
1167
|
+
__init11() {this.pauseBuffer = []}
|
|
1168
|
+
/** Buffer for new logs in selection mode */
|
|
1169
|
+
__init12() {this.selectionBuffer = []}
|
|
1170
|
+
/** Index of currently selected log entry */
|
|
1171
|
+
__init13() {this.selectedIndex = 0}
|
|
1172
|
+
/** Current filter text for log searching */
|
|
1173
|
+
__init14() {this.filterText = ""}
|
|
1174
|
+
/** Cached array of filtered log entries */
|
|
1175
|
+
__init15() {this.logs = []}
|
|
1176
|
+
/** Polling interval for checking new logs in detail view */
|
|
1177
|
+
__init16() {this.detailViewPollInterval = null}
|
|
1178
|
+
/** Polling interval for checking new logs in selection view */
|
|
1179
|
+
__init17() {this.selectionViewPollInterval = null}
|
|
1180
|
+
/** Current terminal width in characters */
|
|
1181
|
+
__init18() {this.termWidth = process.stdout.columns || 80}
|
|
1182
|
+
/**
|
|
1183
|
+
* Sets up keyboard input handling and cleanup.
|
|
1184
|
+
* Configures raw mode for immediate key processing.
|
|
1185
|
+
* Sets up process exit handlers for cleanup.
|
|
1186
|
+
* @private
|
|
1187
|
+
*/
|
|
1188
|
+
setupKeyboardHandling() {
|
|
1189
|
+
_keypress2.default.call(void 0, process.stdin);
|
|
1190
|
+
process.stdin.setRawMode(true);
|
|
1191
|
+
process.stdin.on("keypress", this.handleKeypress.bind(this));
|
|
1192
|
+
const cleanup = () => {
|
|
1193
|
+
if (this.detailViewPollInterval) {
|
|
1194
|
+
clearInterval(this.detailViewPollInterval);
|
|
1195
|
+
}
|
|
1196
|
+
if (this.selectionViewPollInterval) {
|
|
1197
|
+
clearInterval(this.selectionViewPollInterval);
|
|
1198
|
+
}
|
|
1199
|
+
process.stdin.setRawMode(false);
|
|
1200
|
+
process.stdin.removeAllListeners("keypress");
|
|
1201
|
+
console.clear();
|
|
1202
|
+
this.storage.close();
|
|
1203
|
+
process.exit(0);
|
|
1204
|
+
};
|
|
1205
|
+
process.on("SIGINT", cleanup);
|
|
1206
|
+
process.on("SIGTERM", cleanup);
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Starts polling for new logs in selection view
|
|
1210
|
+
* @private
|
|
1211
|
+
*/
|
|
1212
|
+
startSelectionViewPolling() {
|
|
1213
|
+
if (this.selectionViewPollInterval) {
|
|
1214
|
+
clearInterval(this.selectionViewPollInterval);
|
|
1215
|
+
}
|
|
1216
|
+
this.selectionViewPollInterval = setInterval(() => {
|
|
1217
|
+
if (!this.isSelectionMode) {
|
|
1218
|
+
clearInterval(this.selectionViewPollInterval);
|
|
1219
|
+
this.selectionViewPollInterval = null;
|
|
1220
|
+
return;
|
|
1221
|
+
}
|
|
1222
|
+
if (this.selectionBuffer.length > 0) {
|
|
1223
|
+
this.renderer.renderSelectionView(this.logs, this.selectedIndex, this.filterText, this.selectionBuffer.length);
|
|
1224
|
+
}
|
|
1225
|
+
}, 2e3);
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Starts polling for new logs in detail view
|
|
1229
|
+
* @private
|
|
1230
|
+
*/
|
|
1231
|
+
startDetailViewPolling() {
|
|
1232
|
+
if (this.detailViewPollInterval) {
|
|
1233
|
+
clearInterval(this.detailViewPollInterval);
|
|
1234
|
+
}
|
|
1235
|
+
this.detailViewPollInterval = setInterval(() => {
|
|
1236
|
+
if (!this.isDetailView) {
|
|
1237
|
+
clearInterval(this.detailViewPollInterval);
|
|
1238
|
+
this.detailViewPollInterval = null;
|
|
1239
|
+
return;
|
|
1240
|
+
}
|
|
1241
|
+
const totalCount = this.filterText ? this.storage.getFilteredLogCount(this.filterText) : this.storage.getLogCount();
|
|
1242
|
+
if (totalCount !== this.logs.length) {
|
|
1243
|
+
const storedLogs = this.filterText ? this.storage.searchLogs(this.filterText) : this.storage.getAllLogs();
|
|
1244
|
+
this.logs = storedLogs;
|
|
1245
|
+
const entry = this.logs[this.selectedIndex];
|
|
1246
|
+
const prevEntry = this.selectedIndex > 0 ? this.logs[this.selectedIndex - 1] : null;
|
|
1247
|
+
const nextEntry = this.selectedIndex < this.logs.length - 1 ? this.logs[this.selectedIndex + 1] : null;
|
|
1248
|
+
this.renderer.renderDetailView(
|
|
1249
|
+
entry,
|
|
1250
|
+
prevEntry,
|
|
1251
|
+
nextEntry,
|
|
1252
|
+
this.renderer.getDetailViewScrollPos(),
|
|
1253
|
+
this.selectedIndex + 1,
|
|
1254
|
+
totalCount,
|
|
1255
|
+
this.filterText
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1258
|
+
}, 2e3);
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Updates the filtered list of logs based on search text.
|
|
1262
|
+
* Handles both full list and filtered views.
|
|
1263
|
+
* Maintains selection state when filter changes.
|
|
1264
|
+
* @private
|
|
1265
|
+
*/
|
|
1266
|
+
updateFilteredLogs() {
|
|
1267
|
+
const totalCount = this.filterText ? this.storage.getFilteredLogCount(this.filterText) : this.storage.getLogCount();
|
|
1268
|
+
const effectiveCount = totalCount - this.selectionBuffer.length;
|
|
1269
|
+
if (effectiveCount !== this.logs.length) {
|
|
1270
|
+
const storedLogs = this.filterText ? this.storage.searchLogs(this.filterText) : this.storage.getAllLogs();
|
|
1271
|
+
this.logs = storedLogs.slice(0, storedLogs.length - this.selectionBuffer.length);
|
|
1272
|
+
if (this.logs.length > 0) {
|
|
1273
|
+
this.selectedIndex = Math.min(this.selectedIndex, Math.max(0, this.logs.length - 1));
|
|
1274
|
+
} else {
|
|
1275
|
+
this.selectedIndex = 0;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
updateNewLogsNotification() {
|
|
1280
|
+
if (!this.isSelectionMode || !this.selectionBuffer.length) return;
|
|
1281
|
+
process.stdout.write(`\x1B[2A\r${" ".repeat(this.termWidth)}\r`);
|
|
1282
|
+
const notification = chalk8.default.dim(
|
|
1283
|
+
`${this.selectionBuffer.length} new log${this.selectionBuffer.length === 1 ? "" : "s"} available (press \u2193 to view)`
|
|
1284
|
+
);
|
|
1285
|
+
process.stdout.write(`${notification}
|
|
1286
|
+
|
|
1287
|
+
`);
|
|
1288
|
+
}
|
|
1289
|
+
/**
|
|
1290
|
+
* Handles new log entries from the transport.
|
|
1291
|
+
* Stores the log and updates the display if needed.
|
|
1292
|
+
*
|
|
1293
|
+
* @param entry - New log entry to process
|
|
1294
|
+
*/
|
|
1295
|
+
handleNewLog(entry) {
|
|
1296
|
+
this.storage.store(entry);
|
|
1297
|
+
if (this.isInteractiveDisabled) {
|
|
1298
|
+
this.renderer.renderLogLine(entry);
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
if (this.isSelectionMode) {
|
|
1302
|
+
this.selectionBuffer.push(entry);
|
|
1303
|
+
this.renderer.renderSelectionView(this.logs, this.selectedIndex, this.filterText, this.selectionBuffer.length);
|
|
1304
|
+
return;
|
|
1305
|
+
}
|
|
1306
|
+
if (!this.isDetailView) {
|
|
1307
|
+
if (this.isPaused) {
|
|
1308
|
+
this.pauseBuffer.push(entry);
|
|
1024
1309
|
process.stdout.write(`\r${chalk8.default.yellow(`\u23F8 Paused (${this.pauseBuffer.length} new logs)`)}${" ".repeat(20)}`);
|
|
1025
1310
|
} else {
|
|
1026
1311
|
this.renderer.renderLogLine(entry);
|
|
@@ -1373,293 +1658,6 @@ var UIManager = (_class3 = class {
|
|
|
1373
1658
|
}
|
|
1374
1659
|
}, _class3);
|
|
1375
1660
|
|
|
1376
|
-
// src/themes.ts
|
|
1377
|
-
|
|
1378
|
-
var moonlight = {
|
|
1379
|
-
simpleView: {
|
|
1380
|
-
colors: {
|
|
1381
|
-
trace: chalk8.default.rgb(114, 135, 153),
|
|
1382
|
-
// Muted blue-grey for less important info
|
|
1383
|
-
debug: chalk8.default.rgb(130, 170, 255),
|
|
1384
|
-
// Soft blue that pops but doesn't strain
|
|
1385
|
-
info: chalk8.default.rgb(195, 232, 141),
|
|
1386
|
-
// Sage green for good readability
|
|
1387
|
-
warn: chalk8.default.rgb(255, 203, 107),
|
|
1388
|
-
// Warm yellow, less harsh than pure yellow
|
|
1389
|
-
error: chalk8.default.rgb(247, 118, 142),
|
|
1390
|
-
// Soft red that stands out without being aggressive
|
|
1391
|
-
fatal: chalk8.default.bgRgb(247, 118, 142).white
|
|
1392
|
-
// Inverted soft red for maximum visibility
|
|
1393
|
-
},
|
|
1394
|
-
logIdColor: chalk8.default.rgb(84, 98, 117),
|
|
1395
|
-
// Darker blue-grey for secondary information
|
|
1396
|
-
dataValueColor: chalk8.default.rgb(209, 219, 231),
|
|
1397
|
-
// Light grey-blue for primary content
|
|
1398
|
-
dataKeyColor: chalk8.default.rgb(130, 170, 255),
|
|
1399
|
-
// Matching debug blue for consistency
|
|
1400
|
-
selectorColor: chalk8.default.rgb(137, 221, 255)
|
|
1401
|
-
// Ice blue for selection indicators
|
|
1402
|
-
},
|
|
1403
|
-
detailedView: {
|
|
1404
|
-
colors: {
|
|
1405
|
-
trace: chalk8.default.rgb(114, 135, 153),
|
|
1406
|
-
debug: chalk8.default.rgb(130, 170, 255),
|
|
1407
|
-
info: chalk8.default.rgb(195, 232, 141),
|
|
1408
|
-
warn: chalk8.default.rgb(255, 203, 107),
|
|
1409
|
-
error: chalk8.default.rgb(247, 118, 142),
|
|
1410
|
-
fatal: chalk8.default.bgRgb(247, 118, 142).white
|
|
1411
|
-
},
|
|
1412
|
-
logIdColor: chalk8.default.rgb(84, 98, 117),
|
|
1413
|
-
dataValueColor: chalk8.default.rgb(209, 219, 231),
|
|
1414
|
-
dataKeyColor: chalk8.default.rgb(130, 170, 255),
|
|
1415
|
-
selectorColor: chalk8.default.rgb(137, 221, 255),
|
|
1416
|
-
// Ice blue for selection indicators
|
|
1417
|
-
headerColor: chalk8.default.rgb(137, 221, 255),
|
|
1418
|
-
labelColor: chalk8.default.rgb(137, 221, 255).bold,
|
|
1419
|
-
separatorColor: chalk8.default.rgb(84, 98, 117),
|
|
1420
|
-
jsonColors: {
|
|
1421
|
-
keysColor: chalk8.default.rgb(130, 170, 255),
|
|
1422
|
-
dashColor: chalk8.default.rgb(209, 219, 231),
|
|
1423
|
-
numberColor: chalk8.default.rgb(247, 140, 108),
|
|
1424
|
-
stringColor: chalk8.default.rgb(195, 232, 141),
|
|
1425
|
-
multilineStringColor: chalk8.default.rgb(195, 232, 141),
|
|
1426
|
-
positiveNumberColor: chalk8.default.rgb(195, 232, 141),
|
|
1427
|
-
negativeNumberColor: chalk8.default.rgb(247, 118, 142),
|
|
1428
|
-
booleanColor: chalk8.default.rgb(255, 203, 107),
|
|
1429
|
-
nullUndefinedColor: chalk8.default.rgb(114, 135, 153),
|
|
1430
|
-
dateColor: chalk8.default.rgb(199, 146, 234)
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
};
|
|
1434
|
-
var sunlight = {
|
|
1435
|
-
simpleView: {
|
|
1436
|
-
colors: {
|
|
1437
|
-
trace: chalk8.default.rgb(110, 110, 110),
|
|
1438
|
-
// Dark grey for subtle information
|
|
1439
|
-
debug: chalk8.default.rgb(32, 96, 159),
|
|
1440
|
-
// Deep blue for strong contrast on white
|
|
1441
|
-
info: chalk8.default.rgb(35, 134, 54),
|
|
1442
|
-
// Forest green, easier on the eyes than bright green
|
|
1443
|
-
warn: chalk8.default.rgb(176, 95, 0),
|
|
1444
|
-
// Brown-orange for natural warning color
|
|
1445
|
-
error: chalk8.default.rgb(191, 0, 0),
|
|
1446
|
-
// Deep red for clear visibility on light backgrounds
|
|
1447
|
-
fatal: chalk8.default.bgRgb(191, 0, 0).white
|
|
1448
|
-
// White on deep red for critical issues
|
|
1449
|
-
},
|
|
1450
|
-
logIdColor: chalk8.default.rgb(110, 110, 110),
|
|
1451
|
-
dataValueColor: chalk8.default.rgb(0, 0, 0),
|
|
1452
|
-
dataKeyColor: chalk8.default.rgb(32, 96, 159),
|
|
1453
|
-
selectorColor: chalk8.default.rgb(0, 91, 129)
|
|
1454
|
-
// Deep blue for strong contrast
|
|
1455
|
-
},
|
|
1456
|
-
detailedView: {
|
|
1457
|
-
colors: {
|
|
1458
|
-
trace: chalk8.default.rgb(110, 110, 110),
|
|
1459
|
-
debug: chalk8.default.rgb(32, 96, 159),
|
|
1460
|
-
info: chalk8.default.rgb(35, 134, 54),
|
|
1461
|
-
warn: chalk8.default.rgb(176, 95, 0),
|
|
1462
|
-
error: chalk8.default.rgb(191, 0, 0),
|
|
1463
|
-
fatal: chalk8.default.bgRgb(191, 0, 0).white
|
|
1464
|
-
},
|
|
1465
|
-
logIdColor: chalk8.default.rgb(110, 110, 110),
|
|
1466
|
-
dataValueColor: chalk8.default.rgb(0, 0, 0),
|
|
1467
|
-
dataKeyColor: chalk8.default.rgb(32, 96, 159),
|
|
1468
|
-
selectorColor: chalk8.default.rgb(0, 91, 129),
|
|
1469
|
-
// Deep blue for strong contrast
|
|
1470
|
-
headerColor: chalk8.default.rgb(0, 91, 129),
|
|
1471
|
-
labelColor: chalk8.default.rgb(0, 91, 129).bold,
|
|
1472
|
-
separatorColor: chalk8.default.rgb(110, 110, 110),
|
|
1473
|
-
jsonColors: {
|
|
1474
|
-
keysColor: chalk8.default.rgb(32, 96, 159),
|
|
1475
|
-
dashColor: chalk8.default.rgb(0, 0, 0),
|
|
1476
|
-
numberColor: chalk8.default.rgb(170, 55, 49),
|
|
1477
|
-
stringColor: chalk8.default.rgb(35, 134, 54),
|
|
1478
|
-
multilineStringColor: chalk8.default.rgb(35, 134, 54),
|
|
1479
|
-
positiveNumberColor: chalk8.default.rgb(46, 125, 50),
|
|
1480
|
-
negativeNumberColor: chalk8.default.rgb(183, 28, 28),
|
|
1481
|
-
booleanColor: chalk8.default.rgb(176, 95, 0),
|
|
1482
|
-
nullUndefinedColor: chalk8.default.rgb(110, 110, 110),
|
|
1483
|
-
dateColor: chalk8.default.rgb(123, 31, 162)
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
};
|
|
1487
|
-
var neon = {
|
|
1488
|
-
simpleView: {
|
|
1489
|
-
colors: {
|
|
1490
|
-
trace: chalk8.default.rgb(108, 108, 255),
|
|
1491
|
-
// Electric blue
|
|
1492
|
-
debug: chalk8.default.rgb(255, 82, 246),
|
|
1493
|
-
// Hot pink
|
|
1494
|
-
info: chalk8.default.rgb(0, 255, 163),
|
|
1495
|
-
// Cyber green
|
|
1496
|
-
warn: chalk8.default.rgb(255, 231, 46),
|
|
1497
|
-
// Electric yellow
|
|
1498
|
-
error: chalk8.default.rgb(255, 53, 91),
|
|
1499
|
-
// Neon red
|
|
1500
|
-
fatal: chalk8.default.bgRgb(255, 53, 91).rgb(0, 255, 163)
|
|
1501
|
-
// Neon red bg with cyber green text
|
|
1502
|
-
},
|
|
1503
|
-
logIdColor: chalk8.default.rgb(187, 134, 252),
|
|
1504
|
-
// Bright purple
|
|
1505
|
-
dataValueColor: chalk8.default.rgb(255, 255, 255),
|
|
1506
|
-
// Pure white
|
|
1507
|
-
dataKeyColor: chalk8.default.rgb(0, 255, 240),
|
|
1508
|
-
// Cyan
|
|
1509
|
-
selectorColor: chalk8.default.rgb(0, 255, 240)
|
|
1510
|
-
// Electric cyan for cyberpunk feel
|
|
1511
|
-
},
|
|
1512
|
-
detailedView: {
|
|
1513
|
-
colors: {
|
|
1514
|
-
trace: chalk8.default.rgb(108, 108, 255),
|
|
1515
|
-
debug: chalk8.default.rgb(255, 82, 246),
|
|
1516
|
-
info: chalk8.default.rgb(0, 255, 163),
|
|
1517
|
-
warn: chalk8.default.rgb(255, 231, 46),
|
|
1518
|
-
error: chalk8.default.rgb(255, 53, 91),
|
|
1519
|
-
fatal: chalk8.default.bgRgb(255, 53, 91).rgb(0, 255, 163)
|
|
1520
|
-
},
|
|
1521
|
-
logIdColor: chalk8.default.rgb(187, 134, 252),
|
|
1522
|
-
dataValueColor: chalk8.default.rgb(255, 255, 255),
|
|
1523
|
-
dataKeyColor: chalk8.default.rgb(0, 255, 240),
|
|
1524
|
-
selectorColor: chalk8.default.rgb(0, 255, 240),
|
|
1525
|
-
// Electric cyan for cyberpunk feel
|
|
1526
|
-
headerColor: chalk8.default.rgb(255, 82, 246),
|
|
1527
|
-
labelColor: chalk8.default.rgb(255, 82, 246).bold,
|
|
1528
|
-
separatorColor: chalk8.default.rgb(108, 108, 255),
|
|
1529
|
-
jsonColors: {
|
|
1530
|
-
keysColor: chalk8.default.rgb(0, 255, 240),
|
|
1531
|
-
dashColor: chalk8.default.rgb(255, 255, 255),
|
|
1532
|
-
numberColor: chalk8.default.rgb(255, 82, 246),
|
|
1533
|
-
stringColor: chalk8.default.rgb(0, 255, 163),
|
|
1534
|
-
multilineStringColor: chalk8.default.rgb(0, 255, 163),
|
|
1535
|
-
positiveNumberColor: chalk8.default.rgb(0, 255, 163),
|
|
1536
|
-
negativeNumberColor: chalk8.default.rgb(255, 53, 91),
|
|
1537
|
-
booleanColor: chalk8.default.rgb(255, 231, 46),
|
|
1538
|
-
nullUndefinedColor: chalk8.default.rgb(108, 108, 255),
|
|
1539
|
-
dateColor: chalk8.default.rgb(187, 134, 252)
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
};
|
|
1543
|
-
var nature = {
|
|
1544
|
-
simpleView: {
|
|
1545
|
-
colors: {
|
|
1546
|
-
trace: chalk8.default.rgb(121, 85, 72),
|
|
1547
|
-
// Wooden brown
|
|
1548
|
-
debug: chalk8.default.rgb(46, 125, 50),
|
|
1549
|
-
// Forest green
|
|
1550
|
-
info: chalk8.default.rgb(0, 105, 92),
|
|
1551
|
-
// Deep teal
|
|
1552
|
-
warn: chalk8.default.rgb(175, 115, 0),
|
|
1553
|
-
// Golden amber
|
|
1554
|
-
error: chalk8.default.rgb(183, 28, 28),
|
|
1555
|
-
// Autumn red
|
|
1556
|
-
fatal: chalk8.default.bgRgb(183, 28, 28).rgb(255, 250, 240)
|
|
1557
|
-
// Red bg with soft white
|
|
1558
|
-
},
|
|
1559
|
-
logIdColor: chalk8.default.rgb(93, 64, 55),
|
|
1560
|
-
// Deep bark brown
|
|
1561
|
-
dataValueColor: chalk8.default.rgb(27, 27, 27),
|
|
1562
|
-
// Near black
|
|
1563
|
-
dataKeyColor: chalk8.default.rgb(56, 142, 60),
|
|
1564
|
-
// Leaf green
|
|
1565
|
-
selectorColor: chalk8.default.rgb(0, 105, 92)
|
|
1566
|
-
// Deep teal for natural feel
|
|
1567
|
-
},
|
|
1568
|
-
detailedView: {
|
|
1569
|
-
colors: {
|
|
1570
|
-
trace: chalk8.default.rgb(121, 85, 72),
|
|
1571
|
-
debug: chalk8.default.rgb(46, 125, 50),
|
|
1572
|
-
info: chalk8.default.rgb(0, 105, 92),
|
|
1573
|
-
warn: chalk8.default.rgb(175, 115, 0),
|
|
1574
|
-
error: chalk8.default.rgb(183, 28, 28),
|
|
1575
|
-
fatal: chalk8.default.bgRgb(183, 28, 28).rgb(255, 250, 240)
|
|
1576
|
-
},
|
|
1577
|
-
logIdColor: chalk8.default.rgb(93, 64, 55),
|
|
1578
|
-
dataValueColor: chalk8.default.rgb(27, 27, 27),
|
|
1579
|
-
dataKeyColor: chalk8.default.rgb(56, 142, 60),
|
|
1580
|
-
selectorColor: chalk8.default.rgb(0, 105, 92),
|
|
1581
|
-
// Deep teal for natural feel
|
|
1582
|
-
headerColor: chalk8.default.rgb(0, 77, 64),
|
|
1583
|
-
labelColor: chalk8.default.rgb(0, 77, 64).bold,
|
|
1584
|
-
separatorColor: chalk8.default.rgb(121, 85, 72),
|
|
1585
|
-
jsonColors: {
|
|
1586
|
-
keysColor: chalk8.default.rgb(56, 142, 60),
|
|
1587
|
-
dashColor: chalk8.default.rgb(27, 27, 27),
|
|
1588
|
-
numberColor: chalk8.default.rgb(230, 81, 0),
|
|
1589
|
-
stringColor: chalk8.default.rgb(0, 105, 92),
|
|
1590
|
-
multilineStringColor: chalk8.default.rgb(0, 105, 92),
|
|
1591
|
-
positiveNumberColor: chalk8.default.rgb(46, 125, 50),
|
|
1592
|
-
negativeNumberColor: chalk8.default.rgb(183, 28, 28),
|
|
1593
|
-
booleanColor: chalk8.default.rgb(175, 115, 0),
|
|
1594
|
-
nullUndefinedColor: chalk8.default.rgb(121, 85, 72),
|
|
1595
|
-
dateColor: chalk8.default.rgb(123, 31, 162)
|
|
1596
|
-
}
|
|
1597
|
-
}
|
|
1598
|
-
};
|
|
1599
|
-
var pastel = {
|
|
1600
|
-
simpleView: {
|
|
1601
|
-
colors: {
|
|
1602
|
-
trace: chalk8.default.rgb(179, 189, 203),
|
|
1603
|
-
// Soft slate blue
|
|
1604
|
-
debug: chalk8.default.rgb(189, 178, 255),
|
|
1605
|
-
// Gentle lavender
|
|
1606
|
-
info: chalk8.default.rgb(170, 236, 205),
|
|
1607
|
-
// Mint green
|
|
1608
|
-
warn: chalk8.default.rgb(255, 223, 186),
|
|
1609
|
-
// Peach
|
|
1610
|
-
error: chalk8.default.rgb(255, 188, 188),
|
|
1611
|
-
// Soft coral
|
|
1612
|
-
fatal: chalk8.default.bgRgb(255, 188, 188).rgb(76, 40, 40)
|
|
1613
|
-
// Coral bg with deep brown
|
|
1614
|
-
},
|
|
1615
|
-
logIdColor: chalk8.default.rgb(203, 195, 227),
|
|
1616
|
-
// Dusty lavender
|
|
1617
|
-
dataValueColor: chalk8.default.rgb(236, 236, 236),
|
|
1618
|
-
// Soft white
|
|
1619
|
-
dataKeyColor: chalk8.default.rgb(186, 207, 255),
|
|
1620
|
-
// Baby blue
|
|
1621
|
-
selectorColor: chalk8.default.rgb(189, 178, 255)
|
|
1622
|
-
// Soft lavender for gentle highlighting
|
|
1623
|
-
},
|
|
1624
|
-
detailedView: {
|
|
1625
|
-
colors: {
|
|
1626
|
-
trace: chalk8.default.rgb(179, 189, 203),
|
|
1627
|
-
debug: chalk8.default.rgb(189, 178, 255),
|
|
1628
|
-
info: chalk8.default.rgb(170, 236, 205),
|
|
1629
|
-
warn: chalk8.default.rgb(255, 223, 186),
|
|
1630
|
-
error: chalk8.default.rgb(255, 188, 188),
|
|
1631
|
-
fatal: chalk8.default.bgRgb(255, 188, 188).rgb(76, 40, 40)
|
|
1632
|
-
},
|
|
1633
|
-
logIdColor: chalk8.default.rgb(203, 195, 227),
|
|
1634
|
-
dataValueColor: chalk8.default.rgb(236, 236, 236),
|
|
1635
|
-
dataKeyColor: chalk8.default.rgb(186, 207, 255),
|
|
1636
|
-
selectorColor: chalk8.default.rgb(189, 178, 255),
|
|
1637
|
-
// Soft lavender for gentle highlighting
|
|
1638
|
-
headerColor: chalk8.default.rgb(255, 198, 255),
|
|
1639
|
-
// Cotton candy pink
|
|
1640
|
-
labelColor: chalk8.default.rgb(255, 198, 255).bold,
|
|
1641
|
-
separatorColor: chalk8.default.rgb(179, 189, 203),
|
|
1642
|
-
jsonColors: {
|
|
1643
|
-
keysColor: chalk8.default.rgb(186, 207, 255),
|
|
1644
|
-
// Baby blue
|
|
1645
|
-
dashColor: chalk8.default.rgb(236, 236, 236),
|
|
1646
|
-
// Soft white
|
|
1647
|
-
numberColor: chalk8.default.rgb(255, 198, 255),
|
|
1648
|
-
// Cotton candy pink
|
|
1649
|
-
stringColor: chalk8.default.rgb(170, 236, 205),
|
|
1650
|
-
// Mint green
|
|
1651
|
-
multilineStringColor: chalk8.default.rgb(170, 236, 205),
|
|
1652
|
-
positiveNumberColor: chalk8.default.rgb(170, 236, 205),
|
|
1653
|
-
negativeNumberColor: chalk8.default.rgb(255, 188, 188),
|
|
1654
|
-
booleanColor: chalk8.default.rgb(255, 223, 186),
|
|
1655
|
-
// Peach
|
|
1656
|
-
nullUndefinedColor: chalk8.default.rgb(179, 189, 203),
|
|
1657
|
-
dateColor: chalk8.default.rgb(189, 178, 255)
|
|
1658
|
-
// Gentle lavender
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
};
|
|
1662
|
-
|
|
1663
1661
|
// src/PrettyTerminalTransport.ts
|
|
1664
1662
|
var PrettyTerminalTransport = (_class4 = class _PrettyTerminalTransport extends _transport.LoggerlessTransport {
|
|
1665
1663
|
/** Singleton instance of the transport */
|