@fluojs/notifications 1.0.2 → 2.0.0
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/README.ko.md +43 -8
- package/README.md +43 -8
- package/dist/errors.d.ts +7 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +11 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/module.d.ts +4 -2
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +9 -11
- package/dist/service.d.ts +3 -0
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +195 -68
- package/dist/snapshots.d.ts +28 -0
- package/dist/snapshots.d.ts.map +1 -0
- package/dist/snapshots.js +240 -0
- package/dist/status.d.ts +32 -2
- package/dist/status.d.ts.map +1 -1
- package/dist/status.js +37 -13
- package/dist/types.d.ts +91 -12
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copies and freezes one notification envelope at dispatch admission.
|
|
3
|
+
*
|
|
4
|
+
* @param notification Notification envelope supplied by the caller.
|
|
5
|
+
* @returns The immutable dispatch snapshot.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export function createNotificationDispatchSnapshot(notification) {
|
|
9
|
+
return freezeSnapshot(cloneSnapshot(notification, new Map()));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Copies and freezes one lifecycle event before publication.
|
|
14
|
+
*
|
|
15
|
+
* @param event Lifecycle event details captured by the dispatch service.
|
|
16
|
+
* @returns The immutable lifecycle event snapshot.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export function createNotificationLifecycleEventSnapshot(event) {
|
|
20
|
+
return freezeSnapshot(createLifecycleSnapshot(event, new Map()));
|
|
21
|
+
}
|
|
22
|
+
function cloneSnapshot(value, seen) {
|
|
23
|
+
if (value === null || typeof value !== 'object') {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
const existing = seen.get(value);
|
|
27
|
+
if (existing) {
|
|
28
|
+
return existing;
|
|
29
|
+
}
|
|
30
|
+
if (value instanceof Date) {
|
|
31
|
+
const clone = new Date(value.getTime());
|
|
32
|
+
seen.set(value, clone);
|
|
33
|
+
return clone;
|
|
34
|
+
}
|
|
35
|
+
if (value instanceof URL) {
|
|
36
|
+
const clone = new URL(value.href);
|
|
37
|
+
seen.set(value, clone);
|
|
38
|
+
return clone;
|
|
39
|
+
}
|
|
40
|
+
if (value instanceof URLSearchParams) {
|
|
41
|
+
const clone = new URLSearchParams(value);
|
|
42
|
+
seen.set(value, clone);
|
|
43
|
+
return clone;
|
|
44
|
+
}
|
|
45
|
+
if (value instanceof RegExp) {
|
|
46
|
+
const clone = new RegExp(value.source, value.flags);
|
|
47
|
+
clone.lastIndex = value.lastIndex;
|
|
48
|
+
seen.set(value, clone);
|
|
49
|
+
return clone;
|
|
50
|
+
}
|
|
51
|
+
if (value instanceof ArrayBuffer) {
|
|
52
|
+
const clone = value.slice(0);
|
|
53
|
+
seen.set(value, clone);
|
|
54
|
+
return clone;
|
|
55
|
+
}
|
|
56
|
+
if (ArrayBuffer.isView(value)) {
|
|
57
|
+
if (!(value.buffer instanceof ArrayBuffer)) {
|
|
58
|
+
throw new TypeError('Notification snapshots only support ArrayBuffer-backed views.');
|
|
59
|
+
}
|
|
60
|
+
const buffer = cloneSnapshot(value.buffer, seen);
|
|
61
|
+
const clone = cloneArrayBufferView(value, buffer);
|
|
62
|
+
seen.set(value, clone);
|
|
63
|
+
return clone;
|
|
64
|
+
}
|
|
65
|
+
if (value instanceof Map) {
|
|
66
|
+
const clone = new Map();
|
|
67
|
+
seen.set(value, clone);
|
|
68
|
+
for (const [key, entry] of value) {
|
|
69
|
+
clone.set(cloneSnapshot(key, seen), cloneSnapshot(entry, seen));
|
|
70
|
+
}
|
|
71
|
+
return clone;
|
|
72
|
+
}
|
|
73
|
+
if (value instanceof Set) {
|
|
74
|
+
const clone = new Set();
|
|
75
|
+
seen.set(value, clone);
|
|
76
|
+
for (const entry of value) {
|
|
77
|
+
clone.add(cloneSnapshot(entry, seen));
|
|
78
|
+
}
|
|
79
|
+
return clone;
|
|
80
|
+
}
|
|
81
|
+
assertSnapshotObjectIsDataOnly(value);
|
|
82
|
+
const clone = Array.isArray(value) ? [] : Object.create(Object.getPrototypeOf(value));
|
|
83
|
+
seen.set(value, clone);
|
|
84
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
85
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
86
|
+
if (!descriptor) {
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
if ('value' in descriptor) {
|
|
90
|
+
descriptor.value = cloneSnapshot(descriptor.value, seen);
|
|
91
|
+
}
|
|
92
|
+
Object.defineProperty(clone, key, descriptor);
|
|
93
|
+
}
|
|
94
|
+
return clone;
|
|
95
|
+
}
|
|
96
|
+
function createLifecycleSnapshot(value, seen) {
|
|
97
|
+
if (value === null || typeof value !== 'object') {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
const existing = seen.get(value);
|
|
101
|
+
if (existing) {
|
|
102
|
+
return existing;
|
|
103
|
+
}
|
|
104
|
+
if (value instanceof Date) {
|
|
105
|
+
const snapshot = {
|
|
106
|
+
epochMilliseconds: Number.isNaN(value.getTime()) ? null : value.getTime(),
|
|
107
|
+
kind: 'Date'
|
|
108
|
+
};
|
|
109
|
+
seen.set(value, snapshot);
|
|
110
|
+
return snapshot;
|
|
111
|
+
}
|
|
112
|
+
if (value instanceof URL) {
|
|
113
|
+
const snapshot = {
|
|
114
|
+
href: value.href,
|
|
115
|
+
kind: 'URL'
|
|
116
|
+
};
|
|
117
|
+
seen.set(value, snapshot);
|
|
118
|
+
return snapshot;
|
|
119
|
+
}
|
|
120
|
+
if (value instanceof URLSearchParams) {
|
|
121
|
+
const snapshot = {
|
|
122
|
+
kind: 'URLSearchParams',
|
|
123
|
+
query: value.toString()
|
|
124
|
+
};
|
|
125
|
+
seen.set(value, snapshot);
|
|
126
|
+
return snapshot;
|
|
127
|
+
}
|
|
128
|
+
if (value instanceof RegExp) {
|
|
129
|
+
const snapshot = {
|
|
130
|
+
flags: value.flags,
|
|
131
|
+
kind: 'RegExp',
|
|
132
|
+
lastIndex: value.lastIndex,
|
|
133
|
+
source: value.source
|
|
134
|
+
};
|
|
135
|
+
seen.set(value, snapshot);
|
|
136
|
+
return snapshot;
|
|
137
|
+
}
|
|
138
|
+
if (value instanceof ArrayBuffer) {
|
|
139
|
+
const snapshot = {
|
|
140
|
+
byteLength: value.byteLength,
|
|
141
|
+
bytes: Array.from(new Uint8Array(value)),
|
|
142
|
+
kind: 'ArrayBuffer'
|
|
143
|
+
};
|
|
144
|
+
seen.set(value, snapshot);
|
|
145
|
+
return snapshot;
|
|
146
|
+
}
|
|
147
|
+
if (ArrayBuffer.isView(value)) {
|
|
148
|
+
const snapshot = {
|
|
149
|
+
byteLength: value.byteLength,
|
|
150
|
+
byteOffset: value.byteOffset,
|
|
151
|
+
bytes: Array.from(new Uint8Array(value.buffer, value.byteOffset, value.byteLength)),
|
|
152
|
+
kind: 'ArrayBufferView',
|
|
153
|
+
view: Object.prototype.toString.call(value).slice(8, -1)
|
|
154
|
+
};
|
|
155
|
+
seen.set(value, snapshot);
|
|
156
|
+
return snapshot;
|
|
157
|
+
}
|
|
158
|
+
if (value instanceof Map) {
|
|
159
|
+
const snapshot = {
|
|
160
|
+
entries: [],
|
|
161
|
+
kind: 'Map'
|
|
162
|
+
};
|
|
163
|
+
seen.set(value, snapshot);
|
|
164
|
+
for (const [key, entry] of value) {
|
|
165
|
+
snapshot.entries.push([createLifecycleSnapshot(key, seen), createLifecycleSnapshot(entry, seen)]);
|
|
166
|
+
}
|
|
167
|
+
return snapshot;
|
|
168
|
+
}
|
|
169
|
+
if (value instanceof Set) {
|
|
170
|
+
const snapshot = {
|
|
171
|
+
kind: 'Set',
|
|
172
|
+
values: []
|
|
173
|
+
};
|
|
174
|
+
seen.set(value, snapshot);
|
|
175
|
+
for (const entry of value) {
|
|
176
|
+
snapshot.values.push(createLifecycleSnapshot(entry, seen));
|
|
177
|
+
}
|
|
178
|
+
return snapshot;
|
|
179
|
+
}
|
|
180
|
+
assertSnapshotObjectIsDataOnly(value);
|
|
181
|
+
const snapshot = Array.isArray(value) ? [] : Object.create(Object.getPrototypeOf(value));
|
|
182
|
+
seen.set(value, snapshot);
|
|
183
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
184
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
185
|
+
if (!descriptor) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
if ('value' in descriptor) {
|
|
189
|
+
descriptor.value = createLifecycleSnapshot(descriptor.value, seen);
|
|
190
|
+
}
|
|
191
|
+
Object.defineProperty(snapshot, key, descriptor);
|
|
192
|
+
}
|
|
193
|
+
return snapshot;
|
|
194
|
+
}
|
|
195
|
+
function freezeSnapshot(value, seen = new WeakSet()) {
|
|
196
|
+
if (value === null || typeof value !== 'object' || seen.has(value)) {
|
|
197
|
+
return value;
|
|
198
|
+
}
|
|
199
|
+
seen.add(value);
|
|
200
|
+
if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {
|
|
201
|
+
return value;
|
|
202
|
+
}
|
|
203
|
+
if (value instanceof Map) {
|
|
204
|
+
for (const [key, entry] of value) {
|
|
205
|
+
freezeSnapshot(key, seen);
|
|
206
|
+
freezeSnapshot(entry, seen);
|
|
207
|
+
}
|
|
208
|
+
} else if (value instanceof Set) {
|
|
209
|
+
for (const entry of value) {
|
|
210
|
+
freezeSnapshot(entry, seen);
|
|
211
|
+
}
|
|
212
|
+
} else {
|
|
213
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
214
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
215
|
+
if (descriptor && 'value' in descriptor) {
|
|
216
|
+
freezeSnapshot(descriptor.value, seen);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return Object.freeze(value);
|
|
221
|
+
}
|
|
222
|
+
function cloneArrayBufferView(value, buffer) {
|
|
223
|
+
if (value instanceof DataView) {
|
|
224
|
+
return new DataView(buffer, value.byteOffset, value.byteLength);
|
|
225
|
+
}
|
|
226
|
+
const typedArray = value;
|
|
227
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
228
|
+
}
|
|
229
|
+
function assertSnapshotObjectIsDataOnly(value) {
|
|
230
|
+
const prototype = Object.getPrototypeOf(value);
|
|
231
|
+
if (Array.isArray(value) && prototype !== Array.prototype || !Array.isArray(value) && prototype !== null && prototype !== Object.prototype) {
|
|
232
|
+
throw new TypeError('Notification snapshots only support data properties on plain objects.');
|
|
233
|
+
}
|
|
234
|
+
for (const key of Reflect.ownKeys(value)) {
|
|
235
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
236
|
+
if (descriptor && !('value' in descriptor)) {
|
|
237
|
+
throw new TypeError('Notification snapshots only support data properties on plain objects.');
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
package/dist/status.d.ts
CHANGED
|
@@ -5,20 +5,50 @@ export type NotificationsOperationMode = 'direct-only' | 'direct-with-events' |
|
|
|
5
5
|
export interface NotificationsStatusAdapterInput {
|
|
6
6
|
bulkQueueThreshold: number;
|
|
7
7
|
channelsRegistered: number;
|
|
8
|
+
/**
|
|
9
|
+
* Whether lifecycle publication is enabled for the configured publisher. Defaults to
|
|
10
|
+
* `eventPublisherConfigured` when omitted so callers that only know about configuration keep
|
|
11
|
+
* their previous diagnostics.
|
|
12
|
+
*/
|
|
13
|
+
eventPublicationEnabled?: boolean;
|
|
8
14
|
eventPublisherConfigured: boolean;
|
|
9
15
|
queueConfigured: boolean;
|
|
10
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Typed diagnostics published under {@link NotificationsPlatformStatusSnapshot.details}.
|
|
19
|
+
*
|
|
20
|
+
* The index signature keeps the shape assignable to `Record<string, unknown>` consumers while the
|
|
21
|
+
* named members give typed access to the documented diagnostics.
|
|
22
|
+
*/
|
|
23
|
+
export interface NotificationsStatusDetails {
|
|
24
|
+
bulkQueueThreshold: number;
|
|
25
|
+
channelsRegistered: number;
|
|
26
|
+
dependencies: readonly string[];
|
|
27
|
+
/** Whether a configured publisher is actually publishing lifecycle events. */
|
|
28
|
+
eventPublicationEnabled: boolean;
|
|
29
|
+
/** Whether an event publisher is wired, regardless of publication enablement. */
|
|
30
|
+
eventPublisherConfigured: boolean;
|
|
31
|
+
operationMode: NotificationsOperationMode;
|
|
32
|
+
queueConfigured: boolean;
|
|
33
|
+
[detail: string]: unknown;
|
|
34
|
+
}
|
|
11
35
|
/** Structured snapshot returned by {@link createNotificationsPlatformStatusSnapshot}. */
|
|
12
36
|
export interface NotificationsPlatformStatusSnapshot {
|
|
13
37
|
readiness: PlatformReadinessReport;
|
|
14
38
|
health: PlatformHealthReport;
|
|
15
39
|
ownership: PlatformSnapshot['ownership'];
|
|
16
|
-
details:
|
|
40
|
+
details: NotificationsStatusDetails;
|
|
17
41
|
}
|
|
18
42
|
/**
|
|
19
43
|
* Creates a health/readiness snapshot for the notifications orchestration layer.
|
|
20
44
|
*
|
|
21
|
-
*
|
|
45
|
+
* Publisher configuration and lifecycle publication enablement are reported separately:
|
|
46
|
+
* `details.eventPublisherConfigured` records the wiring while `details.eventPublicationEnabled`
|
|
47
|
+
* records whether events are actually published. Operation mode, active dependencies, and external
|
|
48
|
+
* ownership are derived from enablement so a configured-but-disabled publisher is never reported as
|
|
49
|
+
* an active event-backed runtime.
|
|
50
|
+
*
|
|
51
|
+
* @param input Registered-channel and optional-integration state derived from the active module wiring.
|
|
22
52
|
* @returns A structured snapshot suitable for status endpoints and operational diagnostics.
|
|
23
53
|
*/
|
|
24
54
|
export declare function createNotificationsPlatformStatusSnapshot(input: NotificationsStatusAdapterInput): NotificationsPlatformStatusSnapshot;
|
package/dist/status.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEvG,+DAA+D;AAC/D,MAAM,MAAM,0BAA0B,GAClC,aAAa,GACb,oBAAoB,GACpB,cAAc,GACd,0BAA0B,GAC1B,cAAc,CAAC;AAEnB,wEAAwE;AACxE,MAAM,WAAW,+BAA+B;IAC9C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,wBAAwB,EAAE,OAAO,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,yFAAyF;AACzF,MAAM,WAAW,mCAAmC;IAClD,SAAS,EAAE,uBAAuB,CAAC;IACnC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEvG,+DAA+D;AAC/D,MAAM,MAAM,0BAA0B,GAClC,aAAa,GACb,oBAAoB,GACpB,cAAc,GACd,0BAA0B,GAC1B,cAAc,CAAC;AAEnB,wEAAwE;AACxE,MAAM,WAAW,+BAA+B;IAC9C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,0BAA0B;IACzC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,8EAA8E;IAC9E,uBAAuB,EAAE,OAAO,CAAC;IACjC,iFAAiF;IACjF,wBAAwB,EAAE,OAAO,CAAC;IAClC,aAAa,EAAE,0BAA0B,CAAC;IAC1C,eAAe,EAAE,OAAO,CAAC;IACzB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3B;AAED,yFAAyF;AACzF,MAAM,WAAW,mCAAmC;IAClD,SAAS,EAAE,uBAAuB,CAAC;IACnC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,SAAS,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACzC,OAAO,EAAE,0BAA0B,CAAC;CACrC;AA4ED;;;;;;;;;;;GAWG;AACH,wBAAgB,yCAAyC,CACvD,KAAK,EAAE,+BAA+B,GACrC,mCAAmC,CAuBrC"}
|
package/dist/status.js
CHANGED
|
@@ -2,19 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
/** Input required to describe the package health/readiness contract. */
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Typed diagnostics published under {@link NotificationsPlatformStatusSnapshot.details}.
|
|
7
|
+
*
|
|
8
|
+
* The index signature keeps the shape assignable to `Record<string, unknown>` consumers while the
|
|
9
|
+
* named members give typed access to the documented diagnostics.
|
|
10
|
+
*/
|
|
11
|
+
|
|
5
12
|
/** Structured snapshot returned by {@link createNotificationsPlatformStatusSnapshot}. */
|
|
6
13
|
|
|
14
|
+
function resolveStatusInput(input) {
|
|
15
|
+
return {
|
|
16
|
+
bulkQueueThreshold: input.bulkQueueThreshold,
|
|
17
|
+
channelsRegistered: input.channelsRegistered,
|
|
18
|
+
eventPublicationEnabled: input.eventPublisherConfigured && (input.eventPublicationEnabled ?? true),
|
|
19
|
+
eventPublisherConfigured: input.eventPublisherConfigured,
|
|
20
|
+
queueConfigured: input.queueConfigured
|
|
21
|
+
};
|
|
22
|
+
}
|
|
7
23
|
function resolveOperationMode(input) {
|
|
8
|
-
if (input.channelsRegistered === 0 && !input.queueConfigured && !input.
|
|
24
|
+
if (input.channelsRegistered === 0 && !input.queueConfigured && !input.eventPublicationEnabled) {
|
|
9
25
|
return 'unconfigured';
|
|
10
26
|
}
|
|
11
|
-
if (input.queueConfigured && input.
|
|
27
|
+
if (input.queueConfigured && input.eventPublicationEnabled) {
|
|
12
28
|
return 'queue-backed-with-events';
|
|
13
29
|
}
|
|
14
30
|
if (input.queueConfigured) {
|
|
15
31
|
return 'queue-backed';
|
|
16
32
|
}
|
|
17
|
-
if (input.
|
|
33
|
+
if (input.eventPublicationEnabled) {
|
|
18
34
|
return 'direct-with-events';
|
|
19
35
|
}
|
|
20
36
|
return 'direct-only';
|
|
@@ -53,24 +69,32 @@ function createHealth(input) {
|
|
|
53
69
|
/**
|
|
54
70
|
* Creates a health/readiness snapshot for the notifications orchestration layer.
|
|
55
71
|
*
|
|
56
|
-
*
|
|
72
|
+
* Publisher configuration and lifecycle publication enablement are reported separately:
|
|
73
|
+
* `details.eventPublisherConfigured` records the wiring while `details.eventPublicationEnabled`
|
|
74
|
+
* records whether events are actually published. Operation mode, active dependencies, and external
|
|
75
|
+
* ownership are derived from enablement so a configured-but-disabled publisher is never reported as
|
|
76
|
+
* an active event-backed runtime.
|
|
77
|
+
*
|
|
78
|
+
* @param input Registered-channel and optional-integration state derived from the active module wiring.
|
|
57
79
|
* @returns A structured snapshot suitable for status endpoints and operational diagnostics.
|
|
58
80
|
*/
|
|
59
81
|
export function createNotificationsPlatformStatusSnapshot(input) {
|
|
82
|
+
const resolved = resolveStatusInput(input);
|
|
60
83
|
return {
|
|
61
84
|
details: {
|
|
62
|
-
bulkQueueThreshold:
|
|
63
|
-
channelsRegistered:
|
|
64
|
-
dependencies: [...(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
85
|
+
bulkQueueThreshold: resolved.bulkQueueThreshold,
|
|
86
|
+
channelsRegistered: resolved.channelsRegistered,
|
|
87
|
+
dependencies: [...(resolved.queueConfigured ? ['notifications.queue-adapter'] : []), ...(resolved.eventPublicationEnabled ? ['notifications.event-publisher'] : [])],
|
|
88
|
+
eventPublicationEnabled: resolved.eventPublicationEnabled,
|
|
89
|
+
eventPublisherConfigured: resolved.eventPublisherConfigured,
|
|
90
|
+
operationMode: resolveOperationMode(resolved),
|
|
91
|
+
queueConfigured: resolved.queueConfigured
|
|
68
92
|
},
|
|
69
|
-
health: createHealth(
|
|
93
|
+
health: createHealth(resolved),
|
|
70
94
|
ownership: {
|
|
71
|
-
externallyManaged:
|
|
95
|
+
externallyManaged: resolved.queueConfigured || resolved.eventPublicationEnabled,
|
|
72
96
|
ownsResources: false
|
|
73
97
|
},
|
|
74
|
-
readiness: createReadiness(
|
|
98
|
+
readiness: createReadiness(resolved)
|
|
75
99
|
};
|
|
76
100
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -64,6 +64,18 @@ export interface NotificationsQueueJob<TRequest extends NotificationDispatchRequ
|
|
|
64
64
|
notification: TRequest;
|
|
65
65
|
queuedAt: string;
|
|
66
66
|
}
|
|
67
|
+
/** Context passed to an application-owned queue adapter for one enqueue operation. */
|
|
68
|
+
export interface NotificationsQueueContext {
|
|
69
|
+
/**
|
|
70
|
+
* Caller-owned cancellation signal for the queue handoff.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* The notifications foundation checks this signal immediately before every
|
|
74
|
+
* queue handoff and passes the same live signal to the adapter. Queue
|
|
75
|
+
* adapters own any listener cleanup and queue-specific cancellation policy.
|
|
76
|
+
*/
|
|
77
|
+
readonly signal?: AbortSignal;
|
|
78
|
+
}
|
|
67
79
|
/**
|
|
68
80
|
* Queue seam used when applications prefer background delivery for bulk notifications.
|
|
69
81
|
*
|
|
@@ -76,30 +88,96 @@ export interface NotificationsQueueAdapter {
|
|
|
76
88
|
* Enqueues one notification delivery job.
|
|
77
89
|
*
|
|
78
90
|
* @param job Serialized notification envelope ready for background processing.
|
|
79
|
-
* @
|
|
91
|
+
* @param context Optional caller-owned cancellation context for this queue handoff.
|
|
92
|
+
* @returns A non-empty queue-assigned identifier that can be surfaced to callers.
|
|
93
|
+
* @throws {NotificationQueueResultIntegrityError} When the adapter resolves with an empty or non-string identifier.
|
|
80
94
|
*/
|
|
81
|
-
enqueue(job: NotificationsQueueJob): Promise<string>;
|
|
95
|
+
enqueue(job: NotificationsQueueJob, context?: NotificationsQueueContext): Promise<string>;
|
|
82
96
|
/**
|
|
83
97
|
* Enqueues multiple notification delivery jobs in one operation when supported.
|
|
84
98
|
*
|
|
85
99
|
* @param jobs Ordered notification envelopes to enqueue.
|
|
86
|
-
* @
|
|
100
|
+
* @param context Optional caller-owned cancellation context for this queue handoff.
|
|
101
|
+
* @returns A dense array of own-data-property, non-empty queue identifiers aligned with the admitted input order.
|
|
102
|
+
* @throws {NotificationQueueResultIntegrityError} When the adapter resolves with a malformed result or identifiers.
|
|
87
103
|
*/
|
|
88
|
-
enqueueMany?(jobs: readonly NotificationsQueueJob[]): Promise<readonly string[]>;
|
|
104
|
+
enqueueMany?(jobs: readonly NotificationsQueueJob[], context?: NotificationsQueueContext): Promise<readonly string[]>;
|
|
89
105
|
}
|
|
90
106
|
/** Lifecycle event names emitted through the optional event publication seam. */
|
|
91
107
|
export type NotificationLifecycleEventName = 'notification.dispatch.requested' | 'notification.dispatch.queued' | 'notification.dispatch.delivered' | 'notification.dispatch.failed';
|
|
108
|
+
/** Immutable lifecycle representation of a `Date` value. */
|
|
109
|
+
export interface NotificationSnapshotDate {
|
|
110
|
+
readonly epochMilliseconds: number | null;
|
|
111
|
+
readonly kind: 'Date';
|
|
112
|
+
}
|
|
113
|
+
/** Immutable lifecycle representation of an `ArrayBuffer` value. */
|
|
114
|
+
export interface NotificationSnapshotArrayBuffer {
|
|
115
|
+
readonly byteLength: number;
|
|
116
|
+
readonly bytes: readonly number[];
|
|
117
|
+
readonly kind: 'ArrayBuffer';
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Immutable lifecycle representation of an `ArrayBufferView` value.
|
|
121
|
+
*
|
|
122
|
+
* @remarks
|
|
123
|
+
* `view` records the native view kind, such as `DataView` or `Uint8Array`.
|
|
124
|
+
*/
|
|
125
|
+
export interface NotificationSnapshotArrayBufferView {
|
|
126
|
+
readonly byteLength: number;
|
|
127
|
+
readonly byteOffset: number;
|
|
128
|
+
readonly bytes: readonly number[];
|
|
129
|
+
readonly kind: 'ArrayBufferView';
|
|
130
|
+
readonly view: string;
|
|
131
|
+
}
|
|
132
|
+
/** Immutable lifecycle representation of a `Map` value. */
|
|
133
|
+
export interface NotificationSnapshotMap<TKey, TValue> {
|
|
134
|
+
readonly entries: readonly (readonly [NotificationSnapshot<TKey>, NotificationSnapshot<TValue>])[];
|
|
135
|
+
readonly kind: 'Map';
|
|
136
|
+
}
|
|
137
|
+
/** Immutable lifecycle representation of a `RegExp` value. */
|
|
138
|
+
export interface NotificationSnapshotRegExp {
|
|
139
|
+
readonly flags: string;
|
|
140
|
+
readonly kind: 'RegExp';
|
|
141
|
+
readonly lastIndex: number;
|
|
142
|
+
readonly source: string;
|
|
143
|
+
}
|
|
144
|
+
/** Immutable lifecycle representation of a `Set` value. */
|
|
145
|
+
export interface NotificationSnapshotSet<TValue> {
|
|
146
|
+
readonly kind: 'Set';
|
|
147
|
+
readonly values: readonly NotificationSnapshot<TValue>[];
|
|
148
|
+
}
|
|
149
|
+
/** Immutable lifecycle representation of a `URL` value. */
|
|
150
|
+
export interface NotificationSnapshotUrl {
|
|
151
|
+
readonly href: string;
|
|
152
|
+
readonly kind: 'URL';
|
|
153
|
+
}
|
|
154
|
+
/** Immutable lifecycle representation of a `URLSearchParams` value. */
|
|
155
|
+
export interface NotificationSnapshotUrlSearchParams {
|
|
156
|
+
readonly kind: 'URLSearchParams';
|
|
157
|
+
readonly query: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Recursive immutable value view used for notification lifecycle observation snapshots.
|
|
161
|
+
*
|
|
162
|
+
* Native mutable built-ins are converted into the corresponding `NotificationSnapshot*`
|
|
163
|
+
* data representation rather than exposed as live instances.
|
|
164
|
+
*
|
|
165
|
+
* @typeParam T Value captured in a lifecycle event.
|
|
166
|
+
*/
|
|
167
|
+
export type NotificationSnapshot<T> = T extends Date ? NotificationSnapshotDate : T extends ArrayBuffer ? NotificationSnapshotArrayBuffer : T extends ArrayBufferView ? NotificationSnapshotArrayBufferView : T extends RegExp ? NotificationSnapshotRegExp : T extends URL ? NotificationSnapshotUrl : T extends URLSearchParams ? NotificationSnapshotUrlSearchParams : T extends ReadonlyMap<infer TKey, infer TValue> ? NotificationSnapshotMap<TKey, TValue> : T extends ReadonlySet<infer TValue> ? NotificationSnapshotSet<TValue> : T extends readonly (infer TValue)[] ? readonly NotificationSnapshot<TValue>[] : T extends object ? {
|
|
168
|
+
readonly [TKey in keyof T]: NotificationSnapshot<T[TKey]>;
|
|
169
|
+
} : T;
|
|
92
170
|
/** Published event payload emitted around notification lifecycle transitions. */
|
|
93
171
|
export interface NotificationLifecycleEvent<TRequest extends NotificationDispatchRequest = NotificationDispatchRequest> {
|
|
94
|
-
channel: string;
|
|
95
|
-
deliveryId?: string;
|
|
96
|
-
error?: {
|
|
97
|
-
message: string;
|
|
98
|
-
name: string;
|
|
172
|
+
readonly channel: string;
|
|
173
|
+
readonly deliveryId?: string;
|
|
174
|
+
readonly error?: {
|
|
175
|
+
readonly message: string;
|
|
176
|
+
readonly name: string;
|
|
99
177
|
};
|
|
100
|
-
name: NotificationLifecycleEventName;
|
|
101
|
-
notification: TRequest
|
|
102
|
-
occurredAt: string;
|
|
178
|
+
readonly name: NotificationLifecycleEventName;
|
|
179
|
+
readonly notification: NotificationSnapshot<TRequest>;
|
|
180
|
+
readonly occurredAt: string;
|
|
103
181
|
}
|
|
104
182
|
/** Optional event publication seam for notification lifecycle visibility. */
|
|
105
183
|
export interface NotificationsEventPublisher {
|
|
@@ -114,6 +192,7 @@ export interface NotificationsEventPublisher {
|
|
|
114
192
|
/** Queue configuration for optional bulk-delivery offloading. */
|
|
115
193
|
export interface NotificationsQueueOptions {
|
|
116
194
|
adapter: NotificationsQueueAdapter;
|
|
195
|
+
/** Finite positive integer batch size that activates queue-backed bulk delivery. Defaults to `10`. */
|
|
117
196
|
bulkThreshold?: number;
|
|
118
197
|
}
|
|
119
198
|
/** Optional lifecycle publication configuration. */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,6EAA6E;AAC7E,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,2BAA2B,CAAC,QAAQ,SAAS,mBAAmB,GAAG,mBAAmB;IACrG,OAAO,EAAE,MAAM,CAAC;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,QAAQ,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,mFAAmF;AACnF,MAAM,MAAM,0BAA0B,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEhE;;;;GAIG;AACH,MAAM,WAAW,2BAA2B,CAAC,QAAQ,GAAG,OAAO;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,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EAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B;;;;;;;OAOG;IACH,QAAQ,CAAC,QAAQ,SAAS,2BAA2B,EACnD,YAAY,EAAE,QAAQ,EACtB,OAAO,CAAC,EAAE,2BAA2B,GACpC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEvC;;;;;;;OAOG;IACH,YAAY,CAAC,QAAQ,SAAS,2BAA2B,EACvD,aAAa,EAAE,SAAS,QAAQ,EAAE,EAClC,OAAO,CAAC,EAAE,+BAA+B,GACxC,OAAO,CAAC,+BAA+B,CAAC,QAAQ,CAAC,CAAC,CAAC;CACvD;AAED,0FAA0F;AAC1F,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,CAAC,IAAI,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC,GAAG,IAAI,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"event-bus",
|
|
10
10
|
"channels"
|
|
11
11
|
],
|
|
12
|
-
"version": "
|
|
12
|
+
"version": "2.0.0",
|
|
13
13
|
"private": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"directory": "packages/notifications"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=24.0.0 <27"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
@@ -36,12 +36,13 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@fluojs/core": "^
|
|
40
|
-
"@fluojs/di": "^
|
|
41
|
-
"@fluojs/runtime": "^
|
|
39
|
+
"@fluojs/core": "^2.0.0",
|
|
40
|
+
"@fluojs/di": "^3.0.0",
|
|
41
|
+
"@fluojs/runtime": "^3.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"vitest": "^
|
|
44
|
+
"vitest": "^4.1.11",
|
|
45
|
+
"@fluojs/testing": "^3.0.0"
|
|
45
46
|
},
|
|
46
47
|
"scripts": {
|
|
47
48
|
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|