agl 43.0.4 → 43.0.5
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/changelog.md +7 -0
- package/dist_serve/bundle.js +1 -1
- package/dist_serve/bundle.js.map +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/classes.flexservice.d.ts +6 -7
- package/dist_ts/classes.flexservice.js +12 -45
- package/dist_ts/classes.flexsupervisor.d.ts +37 -3
- package/dist_ts/classes.flexsupervisor.js +164 -37
- package/dist_ts/flexharness.child.js +9 -4
- package/dist_ts/functions.flexchildshutdown.d.ts +7 -0
- package/dist_ts/functions.flexchildshutdown.js +18 -1
- package/dist_ts_migration/index.d.ts +0 -2
- package/dist_ts_migration/index.js +1 -3
- package/dist_ts_migration/v43_flexpostharnessmigrationmarkers.d.ts +6 -17
- package/dist_ts_migration/v43_flexpostharnessmigrationmarkers.js +6 -36
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/classes.flexservice.ts +10 -66
- package/ts/classes.flexsupervisor.ts +214 -37
- package/ts/flexharness.child.ts +8 -3
- package/ts/functions.flexchildshutdown.ts +22 -0
- package/ts_migration/index.ts +0 -2
- package/ts_migration/v43_flexpostharnessmigrationmarkers.ts +6 -49
- package/ts_web/00_commitinfo_data.ts +1 -1
- package/dist_ts_migration/classes.flexpostharnessmigrationrunner.d.ts +0 -19
- package/dist_ts_migration/classes.flexpostharnessmigrationrunner.js +0 -34
- package/dist_ts_migration/v19_flexprojectmanagement.d.ts +0 -14
- package/dist_ts_migration/v19_flexprojectmanagement.js +0 -23
- package/ts_migration/classes.flexpostharnessmigrationrunner.ts +0 -54
- package/ts_migration/v19_flexprojectmanagement.ts +0 -32
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlexIpcNotSentError } from './classes.flexframedtransport.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type IFailureDescription } from './functions.failuredescription.js';
|
|
3
3
|
import { type IFlexServiceConfiguration, type IFlexServiceStatus, type TFlexChildEvent, type TFlexHostRequestMethod, type TFlexHostRequest, type TFlexHostResponse, type TFlexRequest, type TFlexRequestMethod, type TFlexResponse } from './interfaces.flexipc.js';
|
|
4
4
|
export interface IFlexSupervisorStatus {
|
|
5
5
|
state: IFlexServiceStatus['state'];
|
|
@@ -26,10 +26,18 @@ export interface IFlexSupervisorLogEntry {
|
|
|
26
26
|
/** An error of a child's log pipe, or of a started child process, the supervisor recorded and ignored. */
|
|
27
27
|
export interface IFlexSupervisorIgnoredError {
|
|
28
28
|
source: 'stdout' | 'stderr' | 'process';
|
|
29
|
+
/** The child generation, counted from 1 per supervisor, whose pipe or process the error came from. */
|
|
30
|
+
generation: number;
|
|
29
31
|
code?: string;
|
|
30
32
|
timestamp: number;
|
|
31
33
|
}
|
|
32
34
|
export interface IFlexSupervisorOptions {
|
|
35
|
+
/**
|
|
36
|
+
* Writes one record to the controller log; the controller's stderr (`console.error`) unless a test
|
|
37
|
+
* captures it. Each child stdout and stderr line arrives here as it is read, tagged with its child
|
|
38
|
+
* generation, credential-redacted and bounded, and so does every abnormal child exit.
|
|
39
|
+
*/
|
|
40
|
+
writeControllerLog?: (lineArg: string) => void;
|
|
33
41
|
onChildExitObserved?: (exitArg: IFlexSupervisorExit) => void;
|
|
34
42
|
onChildExit?: (exitArg: IFlexSupervisorExit) => void;
|
|
35
43
|
cancellationGraceTimeoutMs?: number;
|
|
@@ -94,8 +102,9 @@ export declare class FlexSupervisor {
|
|
|
94
102
|
private readonly eventListeners;
|
|
95
103
|
private readonly logs;
|
|
96
104
|
private readonly ignoredChildErrors;
|
|
97
|
-
|
|
98
|
-
private
|
|
105
|
+
/** Child generations observed so far; the controller log names each child by its number. */
|
|
106
|
+
private childGenerations;
|
|
107
|
+
private readonly writeControllerLog;
|
|
99
108
|
private readonly cancellationGraceTimeoutMs;
|
|
100
109
|
private readonly childTaskDrainTimeoutMs;
|
|
101
110
|
/** The writer identity of the current child generation, until its exit is confirmed. */
|
|
@@ -133,6 +142,13 @@ export declare class FlexSupervisor {
|
|
|
133
142
|
private performStop;
|
|
134
143
|
private terminateOwnedChild;
|
|
135
144
|
private observeChild;
|
|
145
|
+
/**
|
|
146
|
+
* Writes an exit the supervisor did not ask for, or one with a failure code or a signal, to the
|
|
147
|
+
* controller log: the generation, its exit code and signal or why it never started, and the pipe
|
|
148
|
+
* and process errors of that generation the supervisor ignored so far.
|
|
149
|
+
*/
|
|
150
|
+
private logAbnormalExit;
|
|
151
|
+
private describeChildGeneration;
|
|
136
152
|
private recordIgnoredChildError;
|
|
137
153
|
private reapOrphanedGroup;
|
|
138
154
|
private reapRetainedProcessGroup;
|
|
@@ -154,6 +170,24 @@ export declare class FlexSupervisor {
|
|
|
154
170
|
private rememberSettledHostRequest;
|
|
155
171
|
private normalizeDeadline;
|
|
156
172
|
private consumeLog;
|
|
173
|
+
private consumeLogText;
|
|
157
174
|
private flushLog;
|
|
158
175
|
private addLog;
|
|
176
|
+
/**
|
|
177
|
+
* Writes a child line to the controller log as it arrives, within the generation's rate window.
|
|
178
|
+
* Lines over the window's budget are counted and the last `supervisorControllerLogSuppressedTailLines`
|
|
179
|
+
* of each stream kept as buffered, not redacted; they are reported when the next window opens or
|
|
180
|
+
* the generation's pipes closed.
|
|
181
|
+
*/
|
|
182
|
+
private writeChildLine;
|
|
183
|
+
/**
|
|
184
|
+
* Writes one child line to the controller log, live or from a suppression tail: at most
|
|
185
|
+
* `supervisorControllerLogLineBytes`, control characters spaced out and every credential hidden
|
|
186
|
+
* before the cut (`sanitizeFailureText`, then `redactAndBound`), so the cut never keeps part of a
|
|
187
|
+
* credential. The input is the buffered line, at most 8 KiB, whose unread rest lies far beyond the
|
|
188
|
+
* kept head.
|
|
189
|
+
*/
|
|
190
|
+
private emitChildLine;
|
|
191
|
+
/** Writes the rate window's suppression record, then its stdout tail and its stderr tail, and empties them. */
|
|
192
|
+
private reportSuppressedLines;
|
|
159
193
|
}
|