@telperion/messenger 8.3.1 → 8.4.2
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/.build-manifest.json +416 -0
- package/README.md +35 -4
- package/broadcast/default-channel-name.cjs +6 -4
- package/broadcast/default-channel-name.cjs.map +1 -0
- package/broadcast/default-channel-name.d.cts +3 -0
- package/broadcast/default-channel-name.d.ts +3 -1
- package/broadcast/default-channel-name.js +2 -1
- package/broadcast/default-channel-name.js.map +1 -1
- package/broadcast/index.cjs +16 -13
- package/broadcast/index.cjs.map +1 -0
- package/broadcast/index.d.cts +11 -0
- package/broadcast/index.d.ts +11 -5
- package/broadcast/index.js +5 -6
- package/broadcast/index.js.map +1 -1
- package/broadcast/message-client.cjs +15 -13
- package/broadcast/message-client.cjs.map +1 -0
- package/broadcast/message-client.d.cts +15 -0
- package/broadcast/message-client.d.ts +9 -6
- package/broadcast/message-client.js +7 -5
- package/broadcast/message-client.js.map +1 -1
- package/broadcast/message-host.cjs +14 -12
- package/broadcast/message-host.cjs.map +1 -0
- package/broadcast/message-host.d.cts +14 -0
- package/broadcast/message-host.d.ts +9 -4
- package/broadcast/message-host.js +7 -5
- package/broadcast/message-host.js.map +1 -1
- package/broadcast/message-service.cjs +11 -9
- package/broadcast/message-service.cjs.map +1 -0
- package/broadcast/message-service.d.cts +15 -0
- package/broadcast/message-service.d.ts +10 -3
- package/broadcast/message-service.js +7 -5
- package/broadcast/message-service.js.map +1 -1
- package/chrome/default-connection-name.cjs +6 -4
- package/chrome/default-connection-name.cjs.map +1 -0
- package/chrome/default-connection-name.d.cts +3 -0
- package/chrome/default-connection-name.d.ts +3 -1
- package/chrome/default-connection-name.js +2 -1
- package/chrome/default-connection-name.js.map +1 -1
- package/chrome/index.cjs +14 -11
- package/chrome/index.cjs.map +1 -0
- package/chrome/index.d.cts +10 -0
- package/chrome/index.d.ts +10 -4
- package/chrome/index.js +4 -5
- package/chrome/index.js.map +1 -1
- package/chrome/message-client.cjs +18 -16
- package/chrome/message-client.cjs.map +1 -0
- package/chrome/message-client.d.cts +17 -0
- package/chrome/message-client.d.ts +8 -6
- package/chrome/message-client.js +6 -4
- package/chrome/message-client.js.map +1 -1
- package/chrome/message-host.cjs +15 -13
- package/chrome/message-host.cjs.map +1 -0
- package/chrome/message-host.d.cts +14 -0
- package/chrome/message-host.d.ts +9 -4
- package/chrome/message-host.js +6 -4
- package/chrome/message-host.js.map +1 -1
- package/fesm/messenger.mjs +114 -0
- package/fesm/messenger.mjs.map +1 -0
- package/iframe/channel-path-splitter.cjs +6 -4
- package/iframe/channel-path-splitter.cjs.map +1 -0
- package/iframe/channel-path-splitter.d.cts +3 -0
- package/iframe/channel-path-splitter.d.ts +3 -1
- package/iframe/channel-path-splitter.js +2 -1
- package/iframe/channel-path-splitter.js.map +1 -1
- package/iframe/default-channel-name.cjs +6 -4
- package/iframe/default-channel-name.cjs.map +1 -0
- package/iframe/default-channel-name.d.cts +3 -0
- package/iframe/default-channel-name.d.ts +3 -1
- package/iframe/default-channel-name.js +2 -1
- package/iframe/default-channel-name.js.map +1 -1
- package/iframe/iframe.type.cjs +3 -2
- package/iframe/iframe.type.cjs.map +1 -0
- package/iframe/iframe.type.d.cts +6 -0
- package/iframe/iframe.type.d.ts +6 -4
- package/iframe/iframe.type.js +0 -1
- package/iframe/iframe.type.js.map +1 -1
- package/iframe/index.cjs +16 -13
- package/iframe/index.cjs.map +1 -0
- package/iframe/index.d.cts +13 -0
- package/iframe/index.d.ts +13 -6
- package/iframe/index.js +5 -6
- package/iframe/index.js.map +1 -1
- package/iframe/message-client.cjs +26 -24
- package/iframe/message-client.cjs.map +1 -0
- package/iframe/message-client.d.cts +19 -0
- package/iframe/message-client.d.ts +9 -7
- package/iframe/message-client.js +7 -5
- package/iframe/message-client.js.map +1 -1
- package/iframe/message-host.cjs +30 -28
- package/iframe/message-host.cjs.map +1 -0
- package/iframe/message-host.d.cts +23 -0
- package/iframe/message-host.d.ts +10 -6
- package/iframe/message-host.js +8 -6
- package/iframe/message-host.js.map +1 -1
- package/iframe/message-service.cjs +13 -11
- package/iframe/message-service.cjs.map +1 -0
- package/iframe/message-service.d.cts +18 -0
- package/iframe/message-service.d.ts +11 -4
- package/iframe/message-service.js +7 -5
- package/iframe/message-service.js.map +1 -1
- package/iframe/source-id-splitter.cjs +6 -4
- package/iframe/source-id-splitter.cjs.map +1 -0
- package/iframe/source-id-splitter.d.cts +3 -0
- package/iframe/source-id-splitter.d.ts +3 -1
- package/iframe/source-id-splitter.js +2 -1
- package/iframe/source-id-splitter.js.map +1 -1
- package/iframe/upcoming-message.cjs +3 -2
- package/iframe/upcoming-message.cjs.map +1 -0
- package/iframe/upcoming-message.d.cts +6 -0
- package/iframe/upcoming-message.d.ts +3 -1
- package/iframe/upcoming-message.js +0 -1
- package/iframe/upcoming-message.js.map +1 -1
- package/index.cjs +22 -13
- package/index.cjs.map +1 -0
- package/index.d.cts +8 -0
- package/index.d.ts +8 -7
- package/index.js +5 -6
- package/index.js.map +1 -1
- package/listen.decorator.cjs +11 -8
- package/listen.decorator.cjs.map +1 -0
- package/listen.decorator.d.cts +8 -0
- package/listen.decorator.d.ts +3 -1
- package/listen.decorator.js +4 -2
- package/listen.decorator.js.map +1 -1
- package/listener-storage.type.cjs +3 -2
- package/listener-storage.type.cjs.map +1 -0
- package/listener-storage.type.d.cts +5 -0
- package/listener-storage.type.d.ts +4 -1
- package/listener-storage.type.js +0 -1
- package/listener-storage.type.js.map +1 -1
- package/message-client.cjs +4 -4
- package/message-client.cjs.map +1 -0
- package/message-client.d.cts +26 -0
- package/message-client.d.ts +8 -5
- package/message-client.js +2 -2
- package/message-client.js.map +1 -1
- package/message-host.cjs +20 -18
- package/message-host.cjs.map +1 -0
- package/message-host.d.cts +29 -0
- package/message-host.d.ts +8 -5
- package/message-host.js +5 -3
- package/message-host.js.map +1 -1
- package/message-response.type.cjs +3 -2
- package/message-response.type.cjs.map +1 -0
- package/message-response.type.d.cts +18 -0
- package/message-response.type.d.ts +8 -6
- package/message-response.type.js +0 -1
- package/message-response.type.js.map +1 -1
- package/message.interface.cjs +3 -2
- package/message.interface.cjs.map +1 -0
- package/message.interface.d.cts +8 -0
- package/message.interface.d.ts +3 -1
- package/message.interface.js +0 -1
- package/message.interface.js.map +1 -1
- package/package.json +387 -75
- package/request.decorator.cjs +16 -9
- package/request.decorator.cjs.map +1 -0
- package/request.decorator.d.cts +3 -0
- package/request.decorator.d.ts +3 -1
- package/request.decorator.js +10 -4
- package/request.decorator.js.map +1 -1
- package/rtc/channel-controller.cjs +13 -7
- package/rtc/channel-controller.cjs.map +1 -0
- package/rtc/channel-controller.d.cts +8 -0
- package/rtc/channel-controller.d.ts +4 -3
- package/rtc/channel-controller.js +9 -4
- package/rtc/channel-controller.js.map +1 -1
- package/rtc/default-channel-name.cjs +6 -4
- package/rtc/default-channel-name.cjs.map +1 -0
- package/rtc/default-channel-name.d.cts +4 -0
- package/rtc/default-channel-name.d.ts +3 -1
- package/rtc/default-channel-name.js +2 -1
- package/rtc/default-channel-name.js.map +1 -1
- package/rtc/index.cjs +16 -13
- package/rtc/index.cjs.map +1 -0
- package/rtc/index.d.cts +12 -0
- package/rtc/index.d.ts +12 -5
- package/rtc/index.js +5 -6
- package/rtc/index.js.map +1 -1
- package/rtc/initializer.cjs +52 -0
- package/rtc/initializer.cjs.map +1 -0
- package/rtc/initializer.d.cts +20 -0
- package/rtc/initializer.d.ts +20 -0
- package/rtc/initializer.js +50 -0
- package/rtc/initializer.js.map +1 -0
- package/rtc/message-client.cjs +97 -72
- package/rtc/message-client.cjs.map +1 -0
- package/rtc/message-client.d.cts +75 -0
- package/rtc/message-client.d.ts +42 -19
- package/rtc/message-client.js +82 -59
- package/rtc/message-client.js.map +1 -1
- package/rtc/message-host.cjs +77 -70
- package/rtc/message-host.cjs.map +1 -0
- package/rtc/message-host.d.cts +70 -0
- package/rtc/message-host.d.ts +37 -17
- package/rtc/message-host.js +64 -59
- package/rtc/message-host.js.map +1 -1
- package/rtc/message-service.cjs +28 -16
- package/rtc/message-service.cjs.map +1 -0
- package/rtc/message-service.d.cts +46 -0
- package/rtc/message-service.d.ts +18 -9
- package/rtc/message-service.js +25 -13
- package/rtc/message-service.js.map +1 -1
- package/rtc/rtc.type.cjs +3 -2
- package/rtc/rtc.type.cjs.map +1 -0
- package/rtc/rtc.type.d.cts +14 -0
- package/rtc/rtc.type.d.ts +6 -4
- package/rtc/rtc.type.js +0 -1
- package/rtc/rtc.type.js.map +1 -1
- package/selectors.cjs +18 -10
- package/selectors.cjs.map +1 -0
- package/selectors.d.cts +9 -0
- package/selectors.d.ts +9 -7
- package/selectors.js +8 -7
- package/selectors.js.map +1 -1
- package/worker/index.cjs +16 -13
- package/worker/index.cjs.map +1 -0
- package/worker/index.d.cts +12 -0
- package/worker/index.d.ts +12 -5
- package/worker/index.js +5 -6
- package/worker/index.js.map +1 -1
- package/worker/initializer.cjs +11 -8
- package/worker/initializer.cjs.map +1 -0
- package/worker/initializer.d.cts +15 -0
- package/worker/initializer.d.ts +8 -5
- package/worker/initializer.js +5 -3
- package/worker/initializer.js.map +1 -1
- package/worker/message-client.cjs +19 -17
- package/worker/message-client.cjs.map +1 -0
- package/worker/message-client.d.cts +133 -0
- package/worker/message-client.d.ts +10 -8
- package/worker/message-client.js +9 -7
- package/worker/message-client.js.map +1 -1
- package/worker/message-host.cjs +17 -15
- package/worker/message-host.cjs.map +1 -0
- package/worker/message-host.d.cts +135 -0
- package/worker/message-host.d.ts +10 -6
- package/worker/message-host.js +8 -6
- package/worker/message-host.js.map +1 -1
- package/worker/message-service.cjs +11 -9
- package/worker/message-service.cjs.map +1 -0
- package/worker/message-service.d.cts +124 -0
- package/worker/message-service.d.ts +11 -4
- package/worker/message-service.js +6 -4
- package/worker/message-service.js.map +1 -1
package/worker/message-host.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var rxjs = require('rxjs');
|
|
4
|
+
var messageHost = require('../message-host.cjs');
|
|
5
|
+
var selectors = require('../selectors.cjs');
|
|
6
|
+
var worker_initializer = require('./initializer.cjs');
|
|
7
|
+
var noop = require('@telperion/js-utils/function/noop');
|
|
8
|
+
|
|
9
9
|
const WORKER = Symbol('Host Worker');
|
|
10
10
|
const HANDLER = Symbol('Host Message Handler');
|
|
11
11
|
const REQUESTS$ = Symbol('Host Requests Stream');
|
|
@@ -54,12 +54,12 @@ const REQUESTS$ = Symbol('Host Requests Stream');
|
|
|
54
54
|
* // Later, switch to a different worker
|
|
55
55
|
* host.initialize(new Worker('./different-worker.js'));
|
|
56
56
|
*/
|
|
57
|
-
class WorkerMessageHost extends
|
|
57
|
+
class WorkerMessageHost extends messageHost.MessageHost {
|
|
58
58
|
/**
|
|
59
59
|
* Observable stream of incoming messages from the worker or main thread
|
|
60
60
|
* @private
|
|
61
61
|
*/
|
|
62
|
-
[REQUESTS$] = new
|
|
62
|
+
[REQUESTS$] = new rxjs.Subject();
|
|
63
63
|
/**
|
|
64
64
|
* Promise resolving to the Worker instance or undefined if running in worker context
|
|
65
65
|
* @private
|
|
@@ -78,7 +78,7 @@ class WorkerMessageHost extends message_host_1.MessageHost {
|
|
|
78
78
|
constructor(worker) {
|
|
79
79
|
super();
|
|
80
80
|
this.initialize(worker);
|
|
81
|
-
this[
|
|
81
|
+
this[selectors.LISTEN](this[REQUESTS$]);
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* Initializes or re-initializes the worker connection.
|
|
@@ -113,7 +113,7 @@ class WorkerMessageHost extends message_host_1.MessageHost {
|
|
|
113
113
|
if (!this[WORKER]) {
|
|
114
114
|
this[WORKER] = Promise.resolve(undefined);
|
|
115
115
|
}
|
|
116
|
-
this[WORKER] =
|
|
116
|
+
this[WORKER] = worker_initializer.initializer(this[WORKER], worker, this[HANDLER]);
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
* Sends a response message back to the worker or main thread
|
|
@@ -121,7 +121,7 @@ class WorkerMessageHost extends message_host_1.MessageHost {
|
|
|
121
121
|
* @param message - The response message to send
|
|
122
122
|
* @internal Used by the message handling system to send responses
|
|
123
123
|
*/
|
|
124
|
-
[
|
|
124
|
+
[selectors.RESPONSE](message) {
|
|
125
125
|
this[WORKER].then(worker => {
|
|
126
126
|
if (worker) {
|
|
127
127
|
worker.postMessage(message);
|
|
@@ -129,7 +129,7 @@ class WorkerMessageHost extends message_host_1.MessageHost {
|
|
|
129
129
|
else {
|
|
130
130
|
postMessage(message);
|
|
131
131
|
}
|
|
132
|
-
}).catch(
|
|
132
|
+
}).catch(noop.noop);
|
|
133
133
|
}
|
|
134
134
|
/**
|
|
135
135
|
* Terminates the worker connection and cleans up message listeners.
|
|
@@ -152,7 +152,7 @@ class WorkerMessageHost extends message_host_1.MessageHost {
|
|
|
152
152
|
else {
|
|
153
153
|
removeEventListener('message', this[HANDLER]);
|
|
154
154
|
}
|
|
155
|
-
}).catch(
|
|
155
|
+
}).catch(noop.noop);
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* Handles incoming messages and forwards them to the requests stream
|
|
@@ -162,4 +162,6 @@ class WorkerMessageHost extends message_host_1.MessageHost {
|
|
|
162
162
|
this[REQUESTS$].next(event.data);
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
+
|
|
165
166
|
exports.WorkerMessageHost = WorkerMessageHost;
|
|
167
|
+
//# sourceMappingURL=message-host.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-host.cjs","sources":["../../../../libs/messenger/src/worker/message-host.ts"],"sourcesContent":[null],"names":["MessageHost","Subject","LISTEN","initializer","RESPONSE","noop"],"mappings":";;;;;;;;AAQA,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AACpC,MAAM,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CG;AACG,MAAO,iBAAkB,SAAQA,uBAAW,CAAA;AAChD;;;AAGG;AACK,IAAA,CAAC,SAAS,IAAI,IAAIC,YAAO,EAAW;AAE5C;;;AAGG;IACK,CAAC,MAAM,IAAyB,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;AAElE;;;;;;;;;AASG;AACH,IAAA,WAAA,CAAY,MAAe,EAAA;AACzB,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,CAACC,gBAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACH,IAAA,UAAU,CAAC,MAAuB,EAAA;;AAEhC,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACjB,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;QAC3C;AAEA,QAAA,IAAI,CAAC,MAAM,CAAC,GAAGC,8BAAW,CACxB,IAAI,CAAC,MAAM,CAAC,EACZ,MAAM,EACN,IAAI,CAAC,OAAO,CAAC,CACd;IACH;AAEA;;;;;AAKG;IACO,CAACC,kBAAQ,CAAC,CAAC,OAAwB,EAAA;QAC3C,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,IAAG;YACzB,IAAI,MAAM,EAAE;AACV,gBAAA,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC;YAC7B;iBAAO;gBACJ,WAAmB,CAAC,OAAO,CAAC;YAC/B;AACF,QAAA,CAAC,CAAC,CAAC,KAAK,CAACC,SAAI,CAAC;IAChB;AAEA;;;;;;;;;;;;AAYG;IACI,SAAS,GAAA;QACd,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,IAAG;YACzB,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACtD;iBAAO;gBACL,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC/C;AACF,QAAA,CAAC,CAAC,CAAC,KAAK,CAACA,SAAI,CAAC;IAChB;AAEA;;;AAGG;AACK,IAAA,CAAC,OAAO,IAAI,CAAC,KAA4B,KAAI;QACnD,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AAClC,IAAA,CAAC;AACF;;;;"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { MessageHost } from '../message-host.cjs';
|
|
2
|
+
import { MessageResponse } from '../message-response.type.cjs';
|
|
3
|
+
import { RESPONSE } from '../selectors.cjs';
|
|
4
|
+
import { ClientWorkerArg } from './initializer.cjs';
|
|
5
|
+
import 'rxjs';
|
|
6
|
+
import '../message.interface.cjs';
|
|
7
|
+
|
|
8
|
+
declare const WORKER: unique symbol;
|
|
9
|
+
declare const HANDLER: unique symbol;
|
|
10
|
+
declare const REQUESTS$: unique symbol;
|
|
11
|
+
/**
|
|
12
|
+
* WorkerMessageHost
|
|
13
|
+
*
|
|
14
|
+
* Host implementation for Web Worker communication. Receives messages from and sends
|
|
15
|
+
* responses to Web Workers using the Worker postMessage API.
|
|
16
|
+
*
|
|
17
|
+
* This class can be used in two contexts:
|
|
18
|
+
* - **Main thread**: Provide a Worker instance to receive messages from that specific worker
|
|
19
|
+
* - **Worker thread**: Omit the worker parameter to receive messages from the main thread via self
|
|
20
|
+
*
|
|
21
|
+
* The worker parameter supports multiple types for flexibility:
|
|
22
|
+
* - Direct Worker instance
|
|
23
|
+
* - Promise that resolves to a Worker (for async worker initialization)
|
|
24
|
+
* - Function that returns a Worker (for lazy initialization)
|
|
25
|
+
* - Function that returns a Promise<Worker> (for async lazy initialization)
|
|
26
|
+
*
|
|
27
|
+
* The `initialize()` method allows dynamic worker management, enabling you to switch
|
|
28
|
+
* workers at runtime or re-establish connections after errors.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* // In main thread - receive messages from a specific worker
|
|
32
|
+
* const worker = new Worker('./worker.js');
|
|
33
|
+
* const host = new WorkerMessageHost(worker);
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // In worker thread - receive messages from main thread
|
|
37
|
+
* const host = new WorkerMessageHost();
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // With async worker initialization
|
|
41
|
+
* const workerPromise = import('./worker.js').then(m => new m.MyWorker());
|
|
42
|
+
* const host = new WorkerMessageHost(workerPromise);
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* // With lazy initialization
|
|
46
|
+
* const host = new WorkerMessageHost(() =>
|
|
47
|
+
* document.querySelector('[data-worker]') ? new Worker('./worker.js') : undefined
|
|
48
|
+
* );
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* // Re-initialize with a different worker
|
|
52
|
+
* const host = new WorkerMessageHost();
|
|
53
|
+
* // Later, switch to a different worker
|
|
54
|
+
* host.initialize(new Worker('./different-worker.js'));
|
|
55
|
+
*/
|
|
56
|
+
declare class WorkerMessageHost extends MessageHost {
|
|
57
|
+
/**
|
|
58
|
+
* Observable stream of incoming messages from the worker or main thread
|
|
59
|
+
* @private
|
|
60
|
+
*/
|
|
61
|
+
private [REQUESTS$];
|
|
62
|
+
/**
|
|
63
|
+
* Promise resolving to the Worker instance or undefined if running in worker context
|
|
64
|
+
* @private
|
|
65
|
+
*/
|
|
66
|
+
private [WORKER];
|
|
67
|
+
/**
|
|
68
|
+
* Creates a new WorkerMessageHost instance
|
|
69
|
+
*
|
|
70
|
+
* @param worker - Optional worker configuration:
|
|
71
|
+
* - Worker: Direct worker instance (main thread)
|
|
72
|
+
* - Promise<Worker>: Promise resolving to worker (async initialization)
|
|
73
|
+
* - () => Worker: Function returning worker (lazy initialization)
|
|
74
|
+
* - () => Promise<Worker>: Function returning promise (async lazy initialization)
|
|
75
|
+
* - undefined: Omit for worker thread context (uses self)
|
|
76
|
+
*/
|
|
77
|
+
constructor(worker?: Worker);
|
|
78
|
+
/**
|
|
79
|
+
* Initializes or re-initializes the worker connection.
|
|
80
|
+
*
|
|
81
|
+
* This method sets up message listeners for the provided worker. If a worker
|
|
82
|
+
* was previously initialized, it cleans up the old connection before establishing
|
|
83
|
+
* the new one. This allows for dynamic worker management, such as:
|
|
84
|
+
* - Switching between different workers at runtime
|
|
85
|
+
* - Re-establishing connections after worker errors
|
|
86
|
+
* - Lazy initialization when the worker is conditionally needed
|
|
87
|
+
*
|
|
88
|
+
* @param worker - Optional worker configuration:
|
|
89
|
+
* - Worker: Direct worker instance (main thread)
|
|
90
|
+
* - Promise<Worker>: Promise resolving to worker (async initialization)
|
|
91
|
+
* - () => Worker: Function returning worker (lazy initialization)
|
|
92
|
+
* - () => Promise<Worker>: Function returning promise (async lazy initialization)
|
|
93
|
+
* - undefined: Omit for worker thread context (uses self)
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* // Switch to a different worker dynamically
|
|
97
|
+
* const host = new WorkerMessageHost(oldWorker);
|
|
98
|
+
* host.initialize(newWorker); // Cleans up old listener, sets up new one
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* // Re-initialize after worker error
|
|
102
|
+
* worker.onerror = () => {
|
|
103
|
+
* host.initialize(new Worker('./worker.js'));
|
|
104
|
+
* };
|
|
105
|
+
*/
|
|
106
|
+
initialize(worker: ClientWorkerArg): void;
|
|
107
|
+
/**
|
|
108
|
+
* Sends a response message back to the worker or main thread
|
|
109
|
+
*
|
|
110
|
+
* @param message - The response message to send
|
|
111
|
+
* @internal Used by the message handling system to send responses
|
|
112
|
+
*/
|
|
113
|
+
protected [RESPONSE](message: MessageResponse): void;
|
|
114
|
+
/**
|
|
115
|
+
* Terminates the worker connection and cleans up message listeners.
|
|
116
|
+
*
|
|
117
|
+
* This method should be called when you're done with the host to prevent memory leaks.
|
|
118
|
+
* It removes the message event listener from either the Worker instance (main thread)
|
|
119
|
+
* or the global scope (worker thread).
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* // Clean up when done
|
|
123
|
+
* const host = new WorkerMessageHost(worker);
|
|
124
|
+
* // ... use the host ...
|
|
125
|
+
* host.terminate(); // Clean up listeners
|
|
126
|
+
*/
|
|
127
|
+
terminate(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Handles incoming messages and forwards them to the requests stream
|
|
130
|
+
* @private
|
|
131
|
+
*/
|
|
132
|
+
private [HANDLER];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { WorkerMessageHost };
|
package/worker/message-host.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { MessageHost } from
|
|
2
|
-
import { MessageResponse } from
|
|
3
|
-
import { RESPONSE } from
|
|
4
|
-
import { ClientWorkerArg } from
|
|
1
|
+
import { MessageHost } from '../message-host.js';
|
|
2
|
+
import { MessageResponse } from '../message-response.type.js';
|
|
3
|
+
import { RESPONSE } from '../selectors.js';
|
|
4
|
+
import { ClientWorkerArg } from './initializer.js';
|
|
5
|
+
import 'rxjs';
|
|
6
|
+
import '../message.interface.js';
|
|
7
|
+
|
|
5
8
|
declare const WORKER: unique symbol;
|
|
6
9
|
declare const HANDLER: unique symbol;
|
|
7
10
|
declare const REQUESTS$: unique symbol;
|
|
@@ -50,7 +53,7 @@ declare const REQUESTS$: unique symbol;
|
|
|
50
53
|
* // Later, switch to a different worker
|
|
51
54
|
* host.initialize(new Worker('./different-worker.js'));
|
|
52
55
|
*/
|
|
53
|
-
|
|
56
|
+
declare class WorkerMessageHost extends MessageHost {
|
|
54
57
|
/**
|
|
55
58
|
* Observable stream of incoming messages from the worker or main thread
|
|
56
59
|
* @private
|
|
@@ -128,4 +131,5 @@ export declare class WorkerMessageHost extends MessageHost {
|
|
|
128
131
|
*/
|
|
129
132
|
private [HANDLER];
|
|
130
133
|
}
|
|
131
|
-
|
|
134
|
+
|
|
135
|
+
export { WorkerMessageHost };
|
package/worker/message-host.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Subject } from
|
|
2
|
-
import { MessageHost } from
|
|
3
|
-
import { LISTEN, RESPONSE } from
|
|
4
|
-
import { initializer } from
|
|
5
|
-
import { noop } from
|
|
1
|
+
import { Subject } from 'rxjs';
|
|
2
|
+
import { MessageHost } from '../message-host.js';
|
|
3
|
+
import { LISTEN, RESPONSE } from '../selectors.js';
|
|
4
|
+
import { initializer } from './initializer.js';
|
|
5
|
+
import { noop } from '@telperion/js-utils/function/noop';
|
|
6
|
+
|
|
6
7
|
const WORKER = Symbol('Host Worker');
|
|
7
8
|
const HANDLER = Symbol('Host Message Handler');
|
|
8
9
|
const REQUESTS$ = Symbol('Host Requests Stream');
|
|
@@ -51,7 +52,7 @@ const REQUESTS$ = Symbol('Host Requests Stream');
|
|
|
51
52
|
* // Later, switch to a different worker
|
|
52
53
|
* host.initialize(new Worker('./different-worker.js'));
|
|
53
54
|
*/
|
|
54
|
-
|
|
55
|
+
class WorkerMessageHost extends MessageHost {
|
|
55
56
|
/**
|
|
56
57
|
* Observable stream of incoming messages from the worker or main thread
|
|
57
58
|
* @private
|
|
@@ -160,4 +161,5 @@ export class WorkerMessageHost extends MessageHost {
|
|
|
160
161
|
};
|
|
161
162
|
}
|
|
162
163
|
|
|
164
|
+
export { WorkerMessageHost };
|
|
163
165
|
//# sourceMappingURL=message-host.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"file":"message-host.js","sources":["../../../../libs/messenger/src/worker/message-host.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;AAQA,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;AACpC,MAAM,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CG;AACG,MAAO,iBAAkB,SAAQ,WAAW,CAAA;AAChD;;;AAGG;AACK,IAAA,CAAC,SAAS,IAAI,IAAI,OAAO,EAAW;AAE5C;;;AAGG;IACK,CAAC,MAAM,IAAyB,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;AAElE;;;;;;;;;AASG;AACH,IAAA,WAAA,CAAY,MAAe,EAAA;AACzB,QAAA,KAAK,EAAE;AAEP,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QACvB,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC/B;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;AACH,IAAA,UAAU,CAAC,MAAuB,EAAA;;AAEhC,QAAA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;YACjB,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;QAC3C;AAEA,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,WAAW,CACxB,IAAI,CAAC,MAAM,CAAC,EACZ,MAAM,EACN,IAAI,CAAC,OAAO,CAAC,CACd;IACH;AAEA;;;;;AAKG;IACO,CAAC,QAAQ,CAAC,CAAC,OAAwB,EAAA;QAC3C,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,IAAG;YACzB,IAAI,MAAM,EAAE;AACV,gBAAA,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC;YAC7B;iBAAO;gBACJ,WAAmB,CAAC,OAAO,CAAC;YAC/B;AACF,QAAA,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IAChB;AAEA;;;;;;;;;;;;AAYG;IACI,SAAS,GAAA;QACd,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,IAAG;YACzB,IAAI,MAAM,EAAE;gBACV,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YACtD;iBAAO;gBACL,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;YAC/C;AACF,QAAA,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IAChB;AAEA;;;AAGG;AACK,IAAA,CAAC,OAAO,IAAI,CAAC,KAA4B,KAAI;QACnD,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;AAClC,IAAA,CAAC;AACF;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var mixin = require('@telperion/js-utils/class/mixin');
|
|
4
|
+
var worker_messageClient = require('./message-client.cjs');
|
|
5
|
+
var worker_messageHost = require('./message-host.cjs');
|
|
6
|
+
|
|
7
7
|
/**
|
|
8
8
|
* WorkerMessageService
|
|
9
9
|
*
|
|
@@ -75,7 +75,7 @@ const message_host_1 = require("./message-host");
|
|
|
75
75
|
* // Later, switch to a different worker
|
|
76
76
|
* service.initialize(new Worker('./different-worker.js'));
|
|
77
77
|
*/
|
|
78
|
-
class WorkerMessageService extends
|
|
78
|
+
class WorkerMessageService extends mixin.mixin(worker_messageHost.WorkerMessageHost, worker_messageClient.WorkerMessageClient) {
|
|
79
79
|
/**
|
|
80
80
|
* Creates a new WorkerMessageService instance with bidirectional communication
|
|
81
81
|
*
|
|
@@ -116,8 +116,10 @@ class WorkerMessageService extends (0, mixin_1.mixin)(message_host_1.WorkerMessa
|
|
|
116
116
|
* };
|
|
117
117
|
*/
|
|
118
118
|
initialize = (worker) => {
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
worker_messageHost.WorkerMessageHost.prototype.initialize.call(this, worker);
|
|
120
|
+
worker_messageClient.WorkerMessageClient.prototype.initialize.call(this, worker);
|
|
121
121
|
};
|
|
122
122
|
}
|
|
123
|
+
|
|
123
124
|
exports.WorkerMessageService = WorkerMessageService;
|
|
125
|
+
//# sourceMappingURL=message-service.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message-service.cjs","sources":["../../../../libs/messenger/src/worker/message-service.ts"],"sourcesContent":[null],"names":["mixin","WorkerMessageHost","WorkerMessageClient"],"mappings":";;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEG;AACG,MAAO,oBAAqB,SAAQA,WAAK,CAACC,oCAAiB,EAAEC,wCAAmB,CAAC,CAAA;AACrF;;;;;;;;;AASG;AACH,IAAA,WAAA,CAAY,MAAe,EAAA;QACzB,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAEzB,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IACzB;AAEA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACa,IAAA,UAAU,GAAG,CAAC,MAAuB,KAAU;QAC7DD,oCAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;QACzDC,wCAAmB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;AAC7D,IAAA,CAAC;AACF;;;;"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { WorkerMessageClient } from './message-client.cjs';
|
|
2
|
+
import { ClientWorkerArg } from './initializer.cjs';
|
|
3
|
+
import 'rxjs';
|
|
4
|
+
import '../message-client.cjs';
|
|
5
|
+
import '../message-response.type.cjs';
|
|
6
|
+
import '../message.interface.cjs';
|
|
7
|
+
import '../selectors.cjs';
|
|
8
|
+
|
|
9
|
+
declare const WorkerMessageService_base: new (args_0: [worker?: Worker | undefined], args_1: [worker?: ClientWorkerArg]) => {
|
|
10
|
+
initialize: (worker?: ClientWorkerArg) => void;
|
|
11
|
+
terminate: () => void;
|
|
12
|
+
} & WorkerMessageClient;
|
|
13
|
+
/**
|
|
14
|
+
* WorkerMessageService
|
|
15
|
+
*
|
|
16
|
+
* Bidirectional communication service for Web Workers that combines both client and host
|
|
17
|
+
* capabilities. This class extends both WorkerMessageClient and WorkerMessageHost through
|
|
18
|
+
* mixin composition, enabling full duplex communication - it can both send messages and
|
|
19
|
+
* respond to incoming requests simultaneously.
|
|
20
|
+
*
|
|
21
|
+
* This class is useful when you need a single instance to handle both:
|
|
22
|
+
* - **Sending messages**: Using the @Request decorator to call methods on the other side
|
|
23
|
+
* - **Receiving messages**: Using the @Response decorator to handle incoming requests
|
|
24
|
+
*
|
|
25
|
+
* Like its parent classes, this can be used in two contexts:
|
|
26
|
+
* - **Main thread**: Provide a Worker instance for bidirectional communication with that worker
|
|
27
|
+
* - **Worker thread**: Omit the worker parameter for bidirectional communication with main thread
|
|
28
|
+
*
|
|
29
|
+
* The worker parameter supports multiple types for flexibility:
|
|
30
|
+
* - Direct Worker instance
|
|
31
|
+
* - Promise that resolves to a Worker (for async worker initialization)
|
|
32
|
+
* - Function that returns a Worker (for lazy initialization)
|
|
33
|
+
* - Function that returns a Promise<Worker> (for async lazy initialization)
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // In main thread - full duplex communication with worker
|
|
37
|
+
* const worker = new Worker('./worker.js');
|
|
38
|
+
* const service = new WorkerMessageService(worker);
|
|
39
|
+
*
|
|
40
|
+
* class MainAPI extends WorkerMessageService {
|
|
41
|
+
* // Send messages to worker
|
|
42
|
+
* @Request()
|
|
43
|
+
* fetchData(): Observable<Data> {
|
|
44
|
+
* return null!;
|
|
45
|
+
* }
|
|
46
|
+
*
|
|
47
|
+
* // Respond to worker requests
|
|
48
|
+
* @Listen()
|
|
49
|
+
* saveToLocalStorage(data: any) {
|
|
50
|
+
* localStorage.setItem('data', JSON.stringify(data));
|
|
51
|
+
* return [];
|
|
52
|
+
* }
|
|
53
|
+
* }
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* // In worker thread - full duplex communication with main thread
|
|
57
|
+
* const service = new WorkerMessageService();
|
|
58
|
+
*
|
|
59
|
+
* class WorkerAPI extends WorkerMessageService {
|
|
60
|
+
* // Respond to main thread requests
|
|
61
|
+
* @Listen()
|
|
62
|
+
* fetchData() {
|
|
63
|
+
* return from(fetch('/api/data').then(r => r.json()));
|
|
64
|
+
* }
|
|
65
|
+
*
|
|
66
|
+
* // Send messages to main thread
|
|
67
|
+
* @Request()
|
|
68
|
+
* saveToLocalStorage(data: any): Observable<void> {
|
|
69
|
+
* return null!;
|
|
70
|
+
* }
|
|
71
|
+
* }
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* // With async worker initialization
|
|
75
|
+
* const workerPromise = import('./worker.js').then(m => new m.MyWorker());
|
|
76
|
+
* const service = new WorkerMessageService(workerPromise);
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* // Re-initialize with a different worker
|
|
80
|
+
* const service = new WorkerMessageService();
|
|
81
|
+
* // Later, switch to a different worker
|
|
82
|
+
* service.initialize(new Worker('./different-worker.js'));
|
|
83
|
+
*/
|
|
84
|
+
declare class WorkerMessageService extends WorkerMessageService_base {
|
|
85
|
+
/**
|
|
86
|
+
* Creates a new WorkerMessageService instance with bidirectional communication
|
|
87
|
+
*
|
|
88
|
+
* @param worker - Optional worker configuration:
|
|
89
|
+
* - Worker: Direct worker instance (main thread)
|
|
90
|
+
* - Promise<Worker>: Promise resolving to worker (async initialization)
|
|
91
|
+
* - () => Worker: Function returning worker (lazy initialization)
|
|
92
|
+
* - () => Promise<Worker>: Function returning promise (async lazy initialization)
|
|
93
|
+
* - undefined: Omit for worker thread context (uses self)
|
|
94
|
+
*/
|
|
95
|
+
constructor(worker?: Worker);
|
|
96
|
+
/**
|
|
97
|
+
* Initializes or re-initializes the worker connection for both client and host.
|
|
98
|
+
*
|
|
99
|
+
* This method sets up message listeners for both sending and receiving messages.
|
|
100
|
+
* If a worker was previously initialized, it cleans up the old connections before
|
|
101
|
+
* establishing new ones. This allows for dynamic worker management.
|
|
102
|
+
*
|
|
103
|
+
* @param worker - Optional worker configuration:
|
|
104
|
+
* - Worker: Direct worker instance (main thread)
|
|
105
|
+
* - Promise<Worker>: Promise resolving to worker (async initialization)
|
|
106
|
+
* - () => Worker: Function returning worker (lazy initialization)
|
|
107
|
+
* - () => Promise<Worker>: Function returning promise (async lazy initialization)
|
|
108
|
+
* - undefined: Omit for worker thread context (uses self)
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* // Switch to a different worker dynamically
|
|
112
|
+
* const service = new WorkerMessageService(oldWorker);
|
|
113
|
+
* service.initialize(newWorker); // Cleans up old listeners, sets up new ones
|
|
114
|
+
*
|
|
115
|
+
* @example
|
|
116
|
+
* // Re-initialize after worker error
|
|
117
|
+
* worker.onerror = () => {
|
|
118
|
+
* service.initialize(new Worker('./worker.js'));
|
|
119
|
+
* };
|
|
120
|
+
*/
|
|
121
|
+
initialize: (worker: ClientWorkerArg) => void;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export { WorkerMessageService };
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import { WorkerMessageClient } from
|
|
2
|
-
import { ClientWorkerArg } from
|
|
1
|
+
import { WorkerMessageClient } from './message-client.js';
|
|
2
|
+
import { ClientWorkerArg } from './initializer.js';
|
|
3
|
+
import 'rxjs';
|
|
4
|
+
import '../message-client.js';
|
|
5
|
+
import '../message-response.type.js';
|
|
6
|
+
import '../message.interface.js';
|
|
7
|
+
import '../selectors.js';
|
|
8
|
+
|
|
3
9
|
declare const WorkerMessageService_base: new (args_0: [worker?: Worker | undefined], args_1: [worker?: ClientWorkerArg]) => {
|
|
4
10
|
initialize: (worker?: ClientWorkerArg) => void;
|
|
5
11
|
terminate: () => void;
|
|
@@ -75,7 +81,7 @@ declare const WorkerMessageService_base: new (args_0: [worker?: Worker | undefin
|
|
|
75
81
|
* // Later, switch to a different worker
|
|
76
82
|
* service.initialize(new Worker('./different-worker.js'));
|
|
77
83
|
*/
|
|
78
|
-
|
|
84
|
+
declare class WorkerMessageService extends WorkerMessageService_base {
|
|
79
85
|
/**
|
|
80
86
|
* Creates a new WorkerMessageService instance with bidirectional communication
|
|
81
87
|
*
|
|
@@ -114,4 +120,5 @@ export declare class WorkerMessageService extends WorkerMessageService_base {
|
|
|
114
120
|
*/
|
|
115
121
|
initialize: (worker: ClientWorkerArg) => void;
|
|
116
122
|
}
|
|
117
|
-
|
|
123
|
+
|
|
124
|
+
export { WorkerMessageService };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { mixin } from
|
|
2
|
-
import { WorkerMessageClient } from
|
|
3
|
-
import { WorkerMessageHost } from
|
|
1
|
+
import { mixin } from '@telperion/js-utils/class/mixin';
|
|
2
|
+
import { WorkerMessageClient } from './message-client.js';
|
|
3
|
+
import { WorkerMessageHost } from './message-host.js';
|
|
4
|
+
|
|
4
5
|
/**
|
|
5
6
|
* WorkerMessageService
|
|
6
7
|
*
|
|
@@ -72,7 +73,7 @@ import { WorkerMessageHost } from "./message-host";
|
|
|
72
73
|
* // Later, switch to a different worker
|
|
73
74
|
* service.initialize(new Worker('./different-worker.js'));
|
|
74
75
|
*/
|
|
75
|
-
|
|
76
|
+
class WorkerMessageService extends mixin(WorkerMessageHost, WorkerMessageClient) {
|
|
76
77
|
/**
|
|
77
78
|
* Creates a new WorkerMessageService instance with bidirectional communication
|
|
78
79
|
*
|
|
@@ -118,4 +119,5 @@ export class WorkerMessageService extends mixin(WorkerMessageHost, WorkerMessage
|
|
|
118
119
|
};
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
export { WorkerMessageService };
|
|
121
123
|
//# sourceMappingURL=message-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"file":"message-service.js","sources":["../../../../libs/messenger/src/worker/message-service.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEG;AACG,MAAO,oBAAqB,SAAQ,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAA;AACrF;;;;;;;;;AASG;AACH,IAAA,WAAA,CAAY,MAAe,EAAA;QACzB,KAAK,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAEzB,QAAA,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;IACzB;AAEA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;AACa,IAAA,UAAU,GAAG,CAAC,MAAuB,KAAU;QAC7D,iBAAiB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;QACzD,mBAAmB,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC;AAC7D,IAAA,CAAC;AACF;;;;"}
|