@nu-art/build-and-install 0.204.61 → 0.204.62
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/package.json
CHANGED
|
@@ -8,6 +8,7 @@ export declare class RunningProcessLogs extends ConsoleScreen<{
|
|
|
8
8
|
}> {
|
|
9
9
|
private onTerminateCallbacks;
|
|
10
10
|
constructor();
|
|
11
|
+
scrollFocusedLog(direction: number): void;
|
|
11
12
|
protected createContent(): void;
|
|
12
13
|
registerApp(appKey: string, logClient: LogClient_MemBuffer): void;
|
|
13
14
|
unregisterApp(appKey: string): void;
|
|
@@ -20,7 +20,15 @@ class RunningProcessLogs extends ConsoleScreen_1.ConsoleScreen {
|
|
|
20
20
|
await Promise.all(this.onTerminateCallbacks.map(callback => callback()));
|
|
21
21
|
process.exit(0);
|
|
22
22
|
}
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
keys: ['up'],
|
|
26
|
+
callback: () => this.scrollFocusedLog(-1),
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
keys: ['down'],
|
|
30
|
+
callback: () => this.scrollFocusedLog(1),
|
|
31
|
+
},
|
|
24
32
|
]);
|
|
25
33
|
this.onTerminateCallbacks = [];
|
|
26
34
|
this.addOnTerminateCallback = (callback) => {
|
|
@@ -28,6 +36,11 @@ class RunningProcessLogs extends ConsoleScreen_1.ConsoleScreen {
|
|
|
28
36
|
};
|
|
29
37
|
this.state = { logs: [] };
|
|
30
38
|
}
|
|
39
|
+
scrollFocusedLog(direction) {
|
|
40
|
+
const focusedWidget = this.getFocusedWidget();
|
|
41
|
+
focusedWidget.scroll(direction);
|
|
42
|
+
focusedWidget.setLabel(`scroll pos: ${focusedWidget.getScroll()}`);
|
|
43
|
+
}
|
|
31
44
|
createContent() {
|
|
32
45
|
const logs = this.state.logs;
|
|
33
46
|
const fittingGrid = gridPreset[logs.length - 1];
|
|
@@ -50,6 +63,9 @@ class RunningProcessLogs extends ConsoleScreen_1.ConsoleScreen {
|
|
|
50
63
|
height: `${height}%`,
|
|
51
64
|
label: ` Log for ${logs[index++].key} `,
|
|
52
65
|
border: { type: 'line' },
|
|
66
|
+
style: {
|
|
67
|
+
focus: { border: { fg: 'blue' } }, border: { fg: 'green' }, hover: { border: { fg: 'red' } }
|
|
68
|
+
},
|
|
53
69
|
scrollable: true,
|
|
54
70
|
scrollbar: {
|
|
55
71
|
ch: ' ',
|
|
@@ -60,7 +76,6 @@ class RunningProcessLogs extends ConsoleScreen_1.ConsoleScreen {
|
|
|
60
76
|
inverse: true
|
|
61
77
|
}
|
|
62
78
|
},
|
|
63
|
-
mouse: true
|
|
64
79
|
});
|
|
65
80
|
yPos += height; // Assumes all cells in a column have the same height
|
|
66
81
|
});
|