jsf.js_next_gen 4.0.1-beta.6 → 4.0.1-beta.8
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/docs/assets/style.css +4 -5
- package/dist/window/faces-development.js +43 -54
- package/dist/window/faces-development.js.br +0 -0
- package/dist/window/faces-development.js.gz +0 -0
- package/dist/window/faces-development.js.map +1 -1
- package/dist/window/faces.js +1 -1
- package/dist/window/faces.js.br +0 -0
- package/dist/window/faces.js.gz +0 -0
- package/dist/window/faces.js.map +1 -1
- package/dist/window/jsf-development.js +43 -54
- package/dist/window/jsf-development.js.br +0 -0
- package/dist/window/jsf-development.js.gz +0 -0
- package/dist/window/jsf-development.js.map +1 -1
- package/dist/window/jsf.js +1 -1
- package/dist/window/jsf.js.br +0 -0
- package/dist/window/jsf.js.gz +0 -0
- package/dist/window/jsf.js.map +1 -1
- package/package.json +10 -10
- package/src/main/typescript/impl/AjaxImpl.ts +5 -5
- package/src/main/typescript/impl/util/ExtDomQuery.ts +17 -22
- package/src/main/typescript/impl/xhrCore/RequestDataResolver.ts +2 -2
- package/src/main/typescript/impl/xhrCore/XhrRequest.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.ts +1 -1
- package/src/main/typescript/test/frameworkBase/_ext/shared/StandardInits.ts +86 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.ts +53 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/css/bootstrap-icons.css +15 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/css/tobago.css +15 -0
- package/src/main/typescript/test/frameworkBase/_ext/shared/fixtures/js/tobago.js +15 -0
- package/src/main/typescript/test/xhrCore/ErrorChainTest.spec.ts +23 -0
- package/src/main/typescript/test/xhrCore/RequestParamsTest.spec.ts +1 -1
- package/src/main/typescript/test/xhrCore/ResponseTest23.spec.ts +19 -0
- package/target/AssocArray.js +281 -0
- package/target/AssocArray.js.map +1 -0
- package/target/Config.js +235 -0
- package/target/Config.js.map +1 -0
- package/target/CryptoExtensions.js +112 -0
- package/target/CryptoExtensions.js.map +1 -0
- package/target/DomQuery.js +1963 -0
- package/target/DomQuery.js.map +1 -0
- package/target/Es2019Array.js +117 -0
- package/target/Es2019Array.js.map +1 -0
- package/target/Global.js +38 -0
- package/target/Global.js.map +1 -0
- package/target/IDomQuery.js +3 -0
- package/target/IDomQuery.js.map +1 -0
- package/target/Lang.js +183 -0
- package/target/Lang.js.map +1 -0
- package/target/Messaging.js +645 -0
- package/target/Messaging.js.map +1 -0
- package/target/Monad.js +330 -0
- package/target/Monad.js.map +1 -0
- package/target/Promise.js +296 -0
- package/target/Promise.js.map +1 -0
- package/target/PromiseShim.js +30 -0
- package/target/PromiseShim.js.map +1 -0
- package/target/SourcesCollectors.js +444 -0
- package/target/SourcesCollectors.js.map +1 -0
- package/target/Stream.js +562 -0
- package/target/Stream.js.map +1 -0
- package/target/TagBuilder.js +178 -0
- package/target/TagBuilder.js.map +1 -0
- package/target/XmlQuery.js +84 -0
- package/target/XmlQuery.js.map +1 -0
- package/target/impl/AjaxImpl.js +4 -4
- package/target/impl/AjaxImpl.js.map +1 -1
- package/target/impl/util/ExtDomQuery.js +13 -19
- package/target/impl/util/ExtDomQuery.js.map +1 -1
- package/target/impl/xhrCore/RequestDataResolver.js +1 -1
- package/target/impl/xhrCore/RequestDataResolver.js.map +1 -1
- package/target/index.js +80 -0
- package/target/index.js.map +1 -0
- package/target/index_core.js +76 -0
- package/target/index_core.js.map +1 -0
- package/target/test/frameworkBase/_ext/monadish/DomQueryTest.spec.js +1 -1
- package/target/test/frameworkBase/_ext/shared/StandardInits.js +85 -0
- package/target/test/frameworkBase/_ext/shared/StandardInits.js.map +1 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js +53 -1
- package/target/test/frameworkBase/_ext/shared/XmlResponses.js.map +1 -1
- package/target/test/xhrCore/ErrorChainTest.spec.js +21 -0
- package/target/test/xhrCore/ErrorChainTest.spec.js.map +1 -1
- package/target/test/xhrCore/RequestParamsTest.spec.js.map +1 -1
- package/target/test/xhrCore/ResponseTest23.spec.js +14 -0
- package/target/test/xhrCore/ResponseTest23.spec.js.map +1 -1
- package/target/types/main/typescript/AssocArray.d.ts +86 -0
- package/target/types/main/typescript/Config.d.ts +94 -0
- package/target/types/main/typescript/CryptoExtensions.d.ts +87 -0
- package/target/types/main/typescript/DomQuery.d.ts +587 -0
- package/target/types/main/typescript/Es2019Array.d.ts +30 -0
- package/target/types/main/typescript/Global.d.ts +23 -0
- package/target/types/main/typescript/IDomQuery.d.ts +480 -0
- package/target/types/main/typescript/Lang.d.ts +97 -0
- package/target/types/main/typescript/Messaging.d.ts +285 -0
- package/target/types/main/typescript/Monad.d.ts +161 -0
- package/target/types/main/typescript/Promise.d.ts +58 -0
- package/target/types/main/typescript/PromiseShim.d.ts +22 -0
- package/target/types/main/typescript/SourcesCollectors.d.ts +280 -0
- package/target/types/main/typescript/Stream.d.ts +284 -0
- package/target/types/main/typescript/TagBuilder.d.ts +50 -0
- package/target/types/main/typescript/XmlQuery.d.ts +31 -0
- package/target/types/main/typescript/api/_api.d.ts +182 -0
- package/target/types/main/typescript/api/faces.d.ts +17 -0
- package/target/types/main/typescript/api/jsf.d.ts +17 -0
- package/target/types/main/typescript/impl/AjaxImpl.d.ts +164 -0
- package/target/types/main/typescript/impl/PushImpl.d.ts +38 -0
- package/target/types/main/typescript/impl/core/Const.d.ts +138 -0
- package/target/types/main/typescript/impl/core/ImplTypes.d.ts +16 -0
- package/target/types/main/typescript/impl/i18n/Messages.d.ts +102 -0
- package/target/types/main/typescript/impl/util/Assertions.d.ts +46 -0
- package/target/types/main/typescript/impl/util/AsyncRunnable.d.ts +112 -0
- package/target/types/main/typescript/impl/util/ExtDomQuery.d.ts +100 -0
- package/target/types/main/typescript/impl/util/FileUtils.d.ts +25 -0
- package/target/types/main/typescript/impl/util/HiddenInputBuilder.d.ts +37 -0
- package/target/types/main/typescript/impl/util/IListener.d.ts +18 -0
- package/target/types/main/typescript/impl/util/Lang.d.ts +138 -0
- package/target/types/main/typescript/impl/util/XhrQueueController.d.ts +51 -0
- package/target/types/main/typescript/impl/xhrCore/ErrorData.d.ts +37 -0
- package/target/types/main/typescript/impl/xhrCore/EventData.d.ts +25 -0
- package/target/types/main/typescript/impl/xhrCore/IResponseProcessor.d.ts +136 -0
- package/target/types/main/typescript/impl/xhrCore/RequestDataResolver.d.ts +84 -0
- package/target/types/main/typescript/impl/xhrCore/ResonseDataResolver.d.ts +60 -0
- package/target/types/main/typescript/impl/xhrCore/Response.d.ts +29 -0
- package/target/types/main/typescript/impl/xhrCore/ResponseProcessor.d.ts +208 -0
- package/target/types/main/typescript/impl/xhrCore/XhrFormData.d.ts +83 -0
- package/target/types/main/typescript/impl/xhrCore/XhrRequest.d.ts +102 -0
- package/target/types/main/typescript/index.d.ts +34 -0
- package/target/types/main/typescript/index_core.d.ts +29 -0
- package/target/types/main/typescript/myfaces/OamSubmit.d.ts +53 -0
- package/target/types/main/typescript/test/frameworkBase/LangTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/DomQueryTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/LangTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingProbes.d.ts +39 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MappingTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/MonadTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/XmlQueryTest.spec.d.ts +0 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-with-header.d.ts +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/monadish/markups/tobago-without-header.d.ts +1 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/shared/StandardInits.d.ts +63 -0
- package/target/types/main/typescript/test/frameworkBase/_ext/shared/XmlResponses.d.ts +23 -0
- package/target/types/main/typescript/test/impl/ImplTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/impl/ImplTest_23.spec.d.ts +16 -0
- package/target/types/main/typescript/test/impl/SeparatorCharsTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/myfaces/OamSubmit.spec.d.ts +16 -0
- package/target/types/main/typescript/test/myfaces/OnLoad.spec.d.ts +16 -0
- package/target/types/main/typescript/test/queue/AsynchronousProbe.d.ts +38 -0
- package/target/types/main/typescript/test/queue/AsynchronousQueueTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ClientWindow.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/ErrorChainTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/EventTests.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/FakeWebsocket.d.ts +24 -0
- package/target/types/main/typescript/test/xhrCore/FileUploadTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/NamespacesRequestTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/OamSubmitTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/RequestParamsTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/RequestTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/RequestTest_23.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ResponseTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ResponseTest23.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/ShadowDomTest.spec.d.ts +16 -0
- package/target/types/main/typescript/test/xhrCore/TobagoFileUploadTest.spec.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/WebsocketTest.d.ts +1 -0
- package/target/types/main/typescript/test/xhrCore/XhrFormDataTest.spec.d.ts +16 -0
- package/target/types/test/typescript/AssocArrayTest.spec.d.ts +1 -0
- package/target/types/test/typescript/DomQueryTest.spec.d.ts +1 -0
- package/target/types/test/typescript/ExtendedArrayTest.spec.d.ts +1 -0
- package/target/types/test/typescript/LangTest.spec.d.ts +1 -0
- package/target/types/test/typescript/MappingProbes.d.ts +24 -0
- package/target/types/test/typescript/MappingTest.spec.d.ts +1 -0
- package/target/types/test/typescript/MessagingTest.spec.d.ts +1 -0
- package/target/types/test/typescript/MonadTest.spec.d.ts +16 -0
- package/target/types/test/typescript/PromiseTest.spec.d.ts +1 -0
- package/target/types/test/typescript/StreamTest.spec.d.ts +1 -0
- package/target/types/test/typescript/XmlQueryTest.spec.d.ts +1 -0
- package/target/types/test/typescript/markups/tobago-with-header.d.ts +1 -0
- package/target/types/test/typescript/markups/tobago-without-header.d.ts +1 -0
- package/webpack.config.js +1 -1
- package/webpack.config.js.map +1 -1
- package/.nyc_output/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +0 -1
- package/.nyc_output/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +0 -1
- package/.nyc_output/processinfo/09ca9ebc-2305-4357-8db9-48ddfc7dfde2.json +0 -1
- package/.nyc_output/processinfo/7c496a14-166e-4aa5-85b9-47b22b055ad8.json +0 -1
- package/.nyc_output/processinfo/index.json +0 -1
- package/src/test.html +0 -75
- package/src/tmp/test.html +0 -16
- package/tmp.xml +0 -36
|
@@ -0,0 +1,645 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BrokerBuilder = exports.Broker = exports.BroadcastChannelBrokerBuilder = exports.BroadcastChannelBroker = exports.Message = exports.NoCrypto = void 0;
|
|
4
|
+
/*!
|
|
5
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
6
|
+
* or more contributor license agreements. See the NOTICE file
|
|
7
|
+
* distributed with this work for additional information
|
|
8
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
9
|
+
* to you under the Apache License, Version 2.0 (the
|
|
10
|
+
* "License"); you may not use this file except in compliance
|
|
11
|
+
* with the License. You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing,
|
|
16
|
+
* software distributed under the License is distributed on an
|
|
17
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
18
|
+
* KIND, either express or implied. See the License for the
|
|
19
|
+
* specific language governing permissions and limitations
|
|
20
|
+
* under the License.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* a standardized message to be sent over the message bus
|
|
24
|
+
*/
|
|
25
|
+
const rxjs_1 = require("rxjs");
|
|
26
|
+
const Stream_1 = require("./Stream");
|
|
27
|
+
const Global_1 = require("./Global");
|
|
28
|
+
/**
|
|
29
|
+
* Default implementation = no encryption
|
|
30
|
+
*/
|
|
31
|
+
class NoCrypto {
|
|
32
|
+
decode(data) {
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
encode(data) {
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.NoCrypto = NoCrypto;
|
|
40
|
+
//TODO dynamic encryptor which flushes the messages before changing the keys
|
|
41
|
+
//that way we can rotate and change internal crypto keys on the fly
|
|
42
|
+
let noEncryption = new NoCrypto();
|
|
43
|
+
class Message {
|
|
44
|
+
constructor(message = {}, targetOrigin = "*") {
|
|
45
|
+
this.message = message;
|
|
46
|
+
this.encoded = false;
|
|
47
|
+
this.targetOrigin = targetOrigin;
|
|
48
|
+
this.creationDate = new Date().getMilliseconds();
|
|
49
|
+
this.identifier = new Date().getMilliseconds() + "_" + Math.random() + "_" + Math.random();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.Message = Message;
|
|
53
|
+
/**
|
|
54
|
+
* custom dom event wrapping our messages
|
|
55
|
+
*/
|
|
56
|
+
class MessageWrapper {
|
|
57
|
+
constructor(channel, message) {
|
|
58
|
+
this.detail = message;
|
|
59
|
+
this.bubbles = true;
|
|
60
|
+
this.cancelable = true;
|
|
61
|
+
this.composed = true;
|
|
62
|
+
this.channel = channel;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* abstract broker class
|
|
67
|
+
* (The broker is the central distribution unit of messages)
|
|
68
|
+
*/
|
|
69
|
+
class BaseBroker {
|
|
70
|
+
constructor() {
|
|
71
|
+
/**
|
|
72
|
+
* we can split the listeners with the system
|
|
73
|
+
* namespace... and type (aka identifier criteria)
|
|
74
|
+
*/
|
|
75
|
+
this.messageListeners = {};
|
|
76
|
+
this.subjects = {};
|
|
77
|
+
this.processedMessages = {};
|
|
78
|
+
this.cleanupCnt = 0;
|
|
79
|
+
this.TIMEOUT_IN_MS = 1000;
|
|
80
|
+
this.MSG_EVENT = "message";
|
|
81
|
+
//must be public because we also must have the option
|
|
82
|
+
//to set it outside of the constructor
|
|
83
|
+
this.crypto = noEncryption;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* registers a listener on a channel
|
|
87
|
+
* @param channel the channel to register the listeners for
|
|
88
|
+
* @param listener the listener to register
|
|
89
|
+
*/
|
|
90
|
+
registerListener(channel, listener) {
|
|
91
|
+
this.reserveListenerNS(channel);
|
|
92
|
+
//we skip the processed messages, because they originated here
|
|
93
|
+
//and already are processed
|
|
94
|
+
this.messageListeners[channel].push((msg) => {
|
|
95
|
+
var _a;
|
|
96
|
+
if (msg.identifier in this.processedMessages) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if ((msg === null || msg === void 0 ? void 0 : msg.encoded) || ((_a = msg === null || msg === void 0 ? void 0 : msg["detail"]) === null || _a === void 0 ? void 0 : _a.encoded)) {
|
|
100
|
+
if (msg === null || msg === void 0 ? void 0 : msg["detail"]) {
|
|
101
|
+
msg["detail"].message = this.crypto.decode(msg["detail"].message);
|
|
102
|
+
msg["detail"].encoded = false;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
msg.message = this.crypto.decode(msg.message);
|
|
106
|
+
msg.encoded = false;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
listener(msg);
|
|
110
|
+
});
|
|
111
|
+
return this;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* binding into rxjs
|
|
115
|
+
* produces a subject which can be used via next calls to send messages
|
|
116
|
+
* on the other hand we
|
|
117
|
+
* @param channel
|
|
118
|
+
*/
|
|
119
|
+
asSubject(channel) {
|
|
120
|
+
this.reserveSubjectNS(channel);
|
|
121
|
+
let subject = this.subjects[channel];
|
|
122
|
+
let oldNext = subject.next;
|
|
123
|
+
subject.next = (msg) => {
|
|
124
|
+
//We use a recursive call to let the broadcaster handle
|
|
125
|
+
//The wrapper conversion and then again call us here
|
|
126
|
+
//that way both directions are handled.. next calls the broker
|
|
127
|
+
//and a broadcast calls next
|
|
128
|
+
if (msg === null || msg === void 0 ? void 0 : msg.detail) {
|
|
129
|
+
oldNext.call(subject, msg === null || msg === void 0 ? void 0 : msg.detail);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
this.broadcast(channel, msg);
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
return subject;
|
|
136
|
+
}
|
|
137
|
+
// noinspection JSUnusedGlobalSymbols
|
|
138
|
+
/**
|
|
139
|
+
* returns an observable on the baseBroker
|
|
140
|
+
* @param channel
|
|
141
|
+
*/
|
|
142
|
+
asObservable(channel) {
|
|
143
|
+
return this.asSubject(channel).asObservable();
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* reserves the listener namespace and wildcard namespace for the given identifier
|
|
147
|
+
* @param identifier
|
|
148
|
+
* @private
|
|
149
|
+
*/
|
|
150
|
+
reserveListenerNS(identifier) {
|
|
151
|
+
if (!this.messageListeners[identifier]) {
|
|
152
|
+
this.messageListeners[identifier] = [];
|
|
153
|
+
}
|
|
154
|
+
if (!this.messageListeners["*"]) {
|
|
155
|
+
this.messageListeners["*"] = [];
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
reserveSubjectNS(identifier) {
|
|
159
|
+
if (!this.subjects[identifier]) {
|
|
160
|
+
this.subjects[identifier] = new rxjs_1.Subject();
|
|
161
|
+
}
|
|
162
|
+
if (!this.subjects["*"]) {
|
|
163
|
+
this.subjects["*"] = new rxjs_1.Subject();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* unregisters a listener from this channel
|
|
168
|
+
*
|
|
169
|
+
* @param channel the channel to unregister from
|
|
170
|
+
* @param listener the listener to unregister the channel from
|
|
171
|
+
*/
|
|
172
|
+
unregisterListener(channel, listener) {
|
|
173
|
+
this.messageListeners[channel] = (this.messageListeners[channel] || []).filter((item) => item !== listener);
|
|
174
|
+
return this;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* answers a bidirectional message received
|
|
178
|
+
* usage, the client can use this method, to answer an incoming message in a precise manner
|
|
179
|
+
* so that the caller sending the bidirectional message knows how to deal with it
|
|
180
|
+
* this mechanism can be used for global storages where we have one answering entity per channel delivering the
|
|
181
|
+
* requested data, the request can be done asynchronously via promises waiting for answers
|
|
182
|
+
*
|
|
183
|
+
* @param channel the channel the originating message
|
|
184
|
+
* @param request the requesting message
|
|
185
|
+
* @param answer the answer to the request
|
|
186
|
+
*/
|
|
187
|
+
answer(channel, request, answer) {
|
|
188
|
+
if ('string' == typeof request) {
|
|
189
|
+
request = new Message(request);
|
|
190
|
+
}
|
|
191
|
+
if (BaseBroker.isAnswer(request)) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
answer.identifier = BaseBroker.getAnswerId(request);
|
|
195
|
+
this.broadcast(channel, answer);
|
|
196
|
+
return this;
|
|
197
|
+
}
|
|
198
|
+
static getAnswerId(request) {
|
|
199
|
+
return "_r_" + request.identifier;
|
|
200
|
+
}
|
|
201
|
+
static isAnswer(request) {
|
|
202
|
+
return request.identifier.indexOf("_r_") == 0;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* idea... a bidirectional broadcast
|
|
206
|
+
* sends a message and waits for the first answer coming in from one of the receivers
|
|
207
|
+
* sending the message back with a messageIdentifier_broadCastId answer
|
|
208
|
+
*
|
|
209
|
+
* @param channel
|
|
210
|
+
* @param message
|
|
211
|
+
*/
|
|
212
|
+
request(channel, message) {
|
|
213
|
+
if ('string' == typeof message) {
|
|
214
|
+
message = new Message(message);
|
|
215
|
+
}
|
|
216
|
+
let messageId = message.identifier;
|
|
217
|
+
let ret = new Promise((resolve, reject) => {
|
|
218
|
+
let timeout = null;
|
|
219
|
+
let listener = (message2) => {
|
|
220
|
+
if (message2.identifier == messageId) {
|
|
221
|
+
//broadcast from same source, we do not want
|
|
222
|
+
//to deal with it now
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
if (message2.identifier == "_r_" + messageId) {
|
|
226
|
+
clearTimeout(timeout);
|
|
227
|
+
this.unregisterListener(channel, listener);
|
|
228
|
+
resolve(message2);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
timeout = setTimeout(() => {
|
|
232
|
+
this.unregisterListener(channel, listener);
|
|
233
|
+
reject("request message performed, timeout, no return value");
|
|
234
|
+
}, 3000);
|
|
235
|
+
this.registerListener(channel, listener);
|
|
236
|
+
});
|
|
237
|
+
this.broadcast(channel, message);
|
|
238
|
+
return ret;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* garbage collects the processed messages queue
|
|
242
|
+
* usually after one second
|
|
243
|
+
*/
|
|
244
|
+
gcProcessedMessages() {
|
|
245
|
+
if ((++this.cleanupCnt) % 10 != 0) {
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
let newProcessedMessages = {};
|
|
249
|
+
Object.keys(this.processedMessages).forEach(key => {
|
|
250
|
+
if (this.messageStillActive(key))
|
|
251
|
+
return;
|
|
252
|
+
newProcessedMessages[key] = this.processedMessages[key];
|
|
253
|
+
});
|
|
254
|
+
this.processedMessages = newProcessedMessages;
|
|
255
|
+
}
|
|
256
|
+
messageStillActive(key) {
|
|
257
|
+
return this.processedMessages[key] > ((new Date()).getMilliseconds() - this.TIMEOUT_IN_MS);
|
|
258
|
+
}
|
|
259
|
+
markMessageAsProcessed(message) {
|
|
260
|
+
this.processedMessages[message.identifier] = message.creationDate;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
BaseBroker.EVENT_TYPE = "brokerEvent";
|
|
264
|
+
let broadCastChannelBrokerGenerator = (name) => {
|
|
265
|
+
var _a;
|
|
266
|
+
if ((_a = (0, Global_1._global$)()) === null || _a === void 0 ? void 0 : _a.BroadcastChannel) {
|
|
267
|
+
return new ((0, Global_1._global$)()).BroadcastChannel(name);
|
|
268
|
+
}
|
|
269
|
+
throw Error("No Broadcast channel in the system, use a shim or provide a factory function" +
|
|
270
|
+
"in the constructor");
|
|
271
|
+
};
|
|
272
|
+
const DEFAULT_CHANNEL_GROUP = "brokr";
|
|
273
|
+
/**
|
|
274
|
+
* a broker which hooks into the Broadcast Channel
|
|
275
|
+
* either via shim or substitute lib
|
|
276
|
+
*
|
|
277
|
+
* The broadcast channels are a standardized messaging library
|
|
278
|
+
* The broker mechanism sets a layer on top to make it more manageable!
|
|
279
|
+
*
|
|
280
|
+
*/
|
|
281
|
+
class BroadcastChannelBroker extends BaseBroker {
|
|
282
|
+
/**
|
|
283
|
+
* @param brokerFactory a factory generating a broker
|
|
284
|
+
* @param channelGroup a group to combine a set of channels
|
|
285
|
+
* @param crypto a crypto class
|
|
286
|
+
*/
|
|
287
|
+
constructor(brokerFactory = broadCastChannelBrokerGenerator, channelGroup = DEFAULT_CHANNEL_GROUP, crypto = noEncryption) {
|
|
288
|
+
super();
|
|
289
|
+
this.brokerFactory = brokerFactory;
|
|
290
|
+
this.channelGroup = channelGroup;
|
|
291
|
+
this.crypto = crypto;
|
|
292
|
+
this.openChannels = {};
|
|
293
|
+
this.msgListener = (messageData) => {
|
|
294
|
+
var _a, _b;
|
|
295
|
+
if (messageData.detail.encoded) {
|
|
296
|
+
messageData.detail.message = this.crypto.decode(messageData.detail.message);
|
|
297
|
+
messageData.detail.encoded = false;
|
|
298
|
+
}
|
|
299
|
+
let coreMessage = messageData.detail;
|
|
300
|
+
let channel = messageData.channel;
|
|
301
|
+
if ((_a = this.messageListeners) === null || _a === void 0 ? void 0 : _a[channel]) {
|
|
302
|
+
(_b = this.messageListeners) === null || _b === void 0 ? void 0 : _b[channel].forEach(listener => {
|
|
303
|
+
listener(coreMessage);
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
this.markMessageAsProcessed(coreMessage);
|
|
307
|
+
return true;
|
|
308
|
+
};
|
|
309
|
+
this.crypto = crypto;
|
|
310
|
+
this.register();
|
|
311
|
+
}
|
|
312
|
+
broadcast(channel, message, includeOrigin = true) {
|
|
313
|
+
try {
|
|
314
|
+
if ('string' == typeof message) {
|
|
315
|
+
message = new Message(message);
|
|
316
|
+
}
|
|
317
|
+
//we now run a quick remapping to avoid
|
|
318
|
+
//serialisation errors
|
|
319
|
+
let msgString = JSON.stringify(message);
|
|
320
|
+
message = JSON.parse(msgString);
|
|
321
|
+
let messageWrapper = new MessageWrapper(channel, message);
|
|
322
|
+
messageWrapper.detail.message = this.crypto.encode(messageWrapper.detail.message);
|
|
323
|
+
messageWrapper.detail.encoded = true;
|
|
324
|
+
if (this === null || this === void 0 ? void 0 : this.subjects[channel]) {
|
|
325
|
+
this.subjects[channel].next(messageWrapper);
|
|
326
|
+
}
|
|
327
|
+
this.openChannels[this.channelGroup].postMessage(messageWrapper);
|
|
328
|
+
if (includeOrigin) {
|
|
329
|
+
this.msgListener(messageWrapper);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
finally {
|
|
333
|
+
this.gcProcessedMessages();
|
|
334
|
+
}
|
|
335
|
+
return this;
|
|
336
|
+
}
|
|
337
|
+
registerListener(channel, listener) {
|
|
338
|
+
super.registerListener(channel, listener);
|
|
339
|
+
return this;
|
|
340
|
+
}
|
|
341
|
+
register() {
|
|
342
|
+
if (!this.openChannels[this.channelGroup]) {
|
|
343
|
+
this.openChannels[this.channelGroup] = this.brokerFactory(this.channelGroup);
|
|
344
|
+
}
|
|
345
|
+
this.openChannels[this.channelGroup].addEventListener("message", this.msgListener);
|
|
346
|
+
return this;
|
|
347
|
+
}
|
|
348
|
+
unregister() {
|
|
349
|
+
this.openChannels[this.channelGroup].close();
|
|
350
|
+
return this;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
exports.BroadcastChannelBroker = BroadcastChannelBroker;
|
|
354
|
+
// noinspection JSUnusedGlobalSymbols
|
|
355
|
+
/**
|
|
356
|
+
* Helper factory to create a broadcast channel broker
|
|
357
|
+
*/
|
|
358
|
+
class BroadcastChannelBrokerBuilder {
|
|
359
|
+
constructor() {
|
|
360
|
+
this.broadCastChannelGenerator = broadCastChannelBrokerGenerator;
|
|
361
|
+
this.channelGroup = DEFAULT_CHANNEL_GROUP;
|
|
362
|
+
this.crypto = noEncryption;
|
|
363
|
+
this.listeners = [];
|
|
364
|
+
}
|
|
365
|
+
withGeneratorFunc(generatorFunc) {
|
|
366
|
+
this.broadCastChannelGenerator = generatorFunc;
|
|
367
|
+
return this;
|
|
368
|
+
}
|
|
369
|
+
withListener(channel, ...listeners) {
|
|
370
|
+
Stream_1.Stream.of(...listeners).each(listener => {
|
|
371
|
+
this.listeners.push({
|
|
372
|
+
channel: channel,
|
|
373
|
+
listener: listener
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
return this;
|
|
377
|
+
}
|
|
378
|
+
withChannelGroup(channelGroup) {
|
|
379
|
+
this.channelGroup = channelGroup;
|
|
380
|
+
return this;
|
|
381
|
+
}
|
|
382
|
+
withCrypto(crypto) {
|
|
383
|
+
this.crypto = crypto;
|
|
384
|
+
return this;
|
|
385
|
+
}
|
|
386
|
+
build() {
|
|
387
|
+
let broker = new BroadcastChannelBroker(this.broadCastChannelGenerator, this.channelGroup, this.crypto);
|
|
388
|
+
Stream_1.Stream.of(...this.listeners).each(listenerItem => {
|
|
389
|
+
broker.registerListener(listenerItem.channel, listenerItem.listener);
|
|
390
|
+
});
|
|
391
|
+
return broker;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
exports.BroadcastChannelBrokerBuilder = BroadcastChannelBrokerBuilder;
|
|
395
|
+
/**
|
|
396
|
+
* implementation of a messaging based transport
|
|
397
|
+
*/
|
|
398
|
+
/**
|
|
399
|
+
* central message broker which uses various dom constructs
|
|
400
|
+
* to broadcast messages into subelements
|
|
401
|
+
*
|
|
402
|
+
* we use the dom event system as transport and iframe and shadow dom mechanisms in a transparent way to
|
|
403
|
+
* pull this off
|
|
404
|
+
*
|
|
405
|
+
* usage
|
|
406
|
+
*
|
|
407
|
+
* broker = new Broker(optional rootElement)
|
|
408
|
+
*
|
|
409
|
+
* defines a message broker within a scope of rootElement (without it is window aka the current isolation level)
|
|
410
|
+
*
|
|
411
|
+
* broker.registerListener(channel, listener) registers a new listener to the current broker and channel
|
|
412
|
+
* broker.unregisterListener(channel, listener) unregisters the given listener
|
|
413
|
+
*
|
|
414
|
+
* broker.broadcast(message, optional direction, optional callBrokerListeners)
|
|
415
|
+
* sends a message (channel included in the message object) in a direction (up, down, both)
|
|
416
|
+
* and also optionally calls the listeners on the same broker (default off)
|
|
417
|
+
*
|
|
418
|
+
* the flow is like
|
|
419
|
+
* up messages are propagated upwards only until it reaches the outer top of the dom
|
|
420
|
+
* downwards, the messages are propagated downwards only
|
|
421
|
+
* both the message is propagated into both directions
|
|
422
|
+
*
|
|
423
|
+
* Usually messages sent from the same broker are not processed within... however by setting
|
|
424
|
+
* callBrokerListeners to true the listeners on the same broker also are called
|
|
425
|
+
* brokers on the same level will get the message and process it automatically no matter what.
|
|
426
|
+
* That way you can exclude the source from message processing (and it is done that way automatically)
|
|
427
|
+
*
|
|
428
|
+
* Isolation levels. Usually every isolation level needs its own broker object registering
|
|
429
|
+
* on the outer bounds
|
|
430
|
+
*
|
|
431
|
+
* aka documents will register on window
|
|
432
|
+
* iframes on the iframe windowObject
|
|
433
|
+
* isolated shadow doms... document
|
|
434
|
+
*
|
|
435
|
+
*
|
|
436
|
+
*
|
|
437
|
+
*/
|
|
438
|
+
class Broker extends BaseBroker {
|
|
439
|
+
/**
|
|
440
|
+
* constructor has an optional root element
|
|
441
|
+
* and an internal name
|
|
442
|
+
*
|
|
443
|
+
* @param scopeElement
|
|
444
|
+
* @param brokerGroup
|
|
445
|
+
* @param crypto
|
|
446
|
+
*/
|
|
447
|
+
constructor(scopeElement = window, brokerGroup = "brokr", crypto = noEncryption) {
|
|
448
|
+
super();
|
|
449
|
+
this.brokerGroup = brokerGroup;
|
|
450
|
+
/**
|
|
451
|
+
* message relay.. identifies message events and relays them to the listeners
|
|
452
|
+
* @param event
|
|
453
|
+
*/
|
|
454
|
+
let evtHandler = (event) => {
|
|
455
|
+
var _a, _b, _c, _d;
|
|
456
|
+
let details = (_a = event === null || event === void 0 ? void 0 : event.detail) !== null && _a !== void 0 ? _a : (_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.detail;
|
|
457
|
+
//TODO possible crypto hook, needs unit testing
|
|
458
|
+
let channel = (_d = ((_c = event === null || event === void 0 ? void 0 : event.data) === null || _c === void 0 ? void 0 : _c.channel)) !== null && _d !== void 0 ? _d : (event === null || event === void 0 ? void 0 : event.channel);
|
|
459
|
+
//javascript loses the type info in certain module types
|
|
460
|
+
if ((details === null || details === void 0 ? void 0 : details.identifier) && (details === null || details === void 0 ? void 0 : details.message)) {
|
|
461
|
+
let msg = details;
|
|
462
|
+
if (msg.identifier in this.processedMessages) {
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
//coming in from up... we need to send it down
|
|
466
|
+
//a relayed message always has to trigger the listeners as well
|
|
467
|
+
if (event === null || event === void 0 ? void 0 : event.detail) {
|
|
468
|
+
this.broadcast(channel, msg);
|
|
469
|
+
}
|
|
470
|
+
else {
|
|
471
|
+
this.broadcast(channel, msg);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
this.msgHandler = (evt) => evtHandler(evt);
|
|
476
|
+
this.crypto = crypto;
|
|
477
|
+
this.register(scopeElement);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* register the current broker into a scope defined by wnd
|
|
481
|
+
* @param scopeElement
|
|
482
|
+
*/
|
|
483
|
+
register(scopeElement) {
|
|
484
|
+
this.rootElem = scopeElement.host ? scopeElement.host : scopeElement;
|
|
485
|
+
if (scopeElement.host) {
|
|
486
|
+
let host = scopeElement.host;
|
|
487
|
+
host.setAttribute("data-broker", "1");
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
if (scopeElement === null || scopeElement === void 0 ? void 0 : scopeElement["setAttribute"])
|
|
491
|
+
scopeElement.setAttribute("data-broker", "1");
|
|
492
|
+
}
|
|
493
|
+
this.rootElem.addEventListener(this.brokerGroup + "__||__" + Broker.EVENT_TYPE, this.msgHandler, { capture: true });
|
|
494
|
+
/*dom message usable by iframes*/
|
|
495
|
+
this.rootElem.addEventListener(this.brokerGroup + "__||__" + Broker.EVENT_TYPE + this.MSG_EVENT, this.msgHandler, { capture: true });
|
|
496
|
+
return this;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* manual unregister function, to unregister as broker from the current
|
|
500
|
+
* scope
|
|
501
|
+
*/
|
|
502
|
+
unregister() {
|
|
503
|
+
this.rootElem.removeEventListener(this.brokerGroup + "__||__" + Broker.EVENT_TYPE, this.msgHandler);
|
|
504
|
+
this.rootElem.removeEventListener(this.brokerGroup + "__||__" + this.MSG_EVENT, this.msgHandler);
|
|
505
|
+
return this;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* broadcast a message
|
|
509
|
+
* the message contains the channel and the data and some internal bookkeeping data
|
|
510
|
+
*
|
|
511
|
+
* @param channel the channel to broadcast to
|
|
512
|
+
* @param message the message dot send
|
|
513
|
+
* (for instance 2 iframes within the same parent broker)
|
|
514
|
+
*/
|
|
515
|
+
broadcast(channel, message) {
|
|
516
|
+
if ('string' == typeof message) {
|
|
517
|
+
message = new Message(message);
|
|
518
|
+
}
|
|
519
|
+
//message.message = this.crypto.encode(message);
|
|
520
|
+
//message.encoded = true;
|
|
521
|
+
if (this === null || this === void 0 ? void 0 : this.subjects[channel]) {
|
|
522
|
+
let messageWrapper = new MessageWrapper(channel, message);
|
|
523
|
+
if (!messageWrapper.detail.encoded) {
|
|
524
|
+
messageWrapper.detail.message = this.crypto.encode(messageWrapper.detail.message);
|
|
525
|
+
messageWrapper.detail.encoded = true;
|
|
526
|
+
}
|
|
527
|
+
this.subjects[channel].next(messageWrapper);
|
|
528
|
+
}
|
|
529
|
+
try {
|
|
530
|
+
this.dispatchUp(channel, message, false, true);
|
|
531
|
+
//listeners already called
|
|
532
|
+
this.dispatchDown(channel, message, true, false);
|
|
533
|
+
}
|
|
534
|
+
finally {
|
|
535
|
+
this.gcProcessedMessages();
|
|
536
|
+
}
|
|
537
|
+
return this;
|
|
538
|
+
}
|
|
539
|
+
dispatchUp(channel, message, ignoreListeners = true, callBrokerListeners = true) {
|
|
540
|
+
if (!ignoreListeners) {
|
|
541
|
+
this.msgCallListeners(channel, message);
|
|
542
|
+
}
|
|
543
|
+
this.markMessageAsProcessed(message);
|
|
544
|
+
if ((0, Global_1._global$)().parent != null) {
|
|
545
|
+
let messageWrapper = new MessageWrapper(channel, message);
|
|
546
|
+
(0, Global_1._global$)().parent.postMessage(JSON.parse(JSON.stringify(messageWrapper)), message.targetOrigin);
|
|
547
|
+
}
|
|
548
|
+
if (callBrokerListeners) {
|
|
549
|
+
this.dispatchSameLevel(channel, message);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
dispatchSameLevel(channel, message) {
|
|
553
|
+
let event = this.transformToEvent(channel, message, true);
|
|
554
|
+
//we also dispatch sideways
|
|
555
|
+
(0, Global_1._global$)().dispatchEvent(event);
|
|
556
|
+
}
|
|
557
|
+
//a dispatch of our own should never trigger the listeners hence the default true
|
|
558
|
+
dispatchDown(channel, message, ignoreListeners = true, callBrokerListeners = true) {
|
|
559
|
+
if (!ignoreListeners) {
|
|
560
|
+
this.msgCallListeners(channel, message);
|
|
561
|
+
}
|
|
562
|
+
this.processedMessages[message.identifier] = message.creationDate;
|
|
563
|
+
let evt = this.transformToEvent(channel, message);
|
|
564
|
+
/*we now notify all iframes lying underneath */
|
|
565
|
+
Array.prototype.slice.call(document.querySelectorAll("iframe")).forEach((element) => {
|
|
566
|
+
let messageWrapper = new MessageWrapper(channel, message);
|
|
567
|
+
element.contentWindow.postMessage(JSON.parse(JSON.stringify(messageWrapper)), message.targetOrigin);
|
|
568
|
+
});
|
|
569
|
+
Array.prototype.slice.call(document.querySelectorAll("[data-broker='1']")).forEach((element) => element.dispatchEvent(evt));
|
|
570
|
+
if (callBrokerListeners) {
|
|
571
|
+
this.dispatchSameLevel(channel, message);
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
msgCallListeners(channel, message) {
|
|
575
|
+
let listeners = this.messageListeners[channel];
|
|
576
|
+
if (listeners === null || listeners === void 0 ? void 0 : listeners.length) {
|
|
577
|
+
let callElement = (element) => {
|
|
578
|
+
element(message);
|
|
579
|
+
};
|
|
580
|
+
listeners.forEach(callElement);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
transformToEvent(channel, message, bubbles = false) {
|
|
584
|
+
let messageWrapper = new MessageWrapper(channel, message);
|
|
585
|
+
messageWrapper.bubbles = bubbles;
|
|
586
|
+
return Broker.createCustomEvent(this.brokerGroup + "__||__" + Broker.EVENT_TYPE, messageWrapper);
|
|
587
|
+
}
|
|
588
|
+
static createCustomEvent(name, wrapper) {
|
|
589
|
+
if ('function' != typeof (0, Global_1._global$)().CustomEvent) {
|
|
590
|
+
let e = document.createEvent('HTMLEvents');
|
|
591
|
+
e.detail = wrapper.detail;
|
|
592
|
+
e.channel = wrapper.channel;
|
|
593
|
+
e.initEvent(name, wrapper.bubbles, wrapper.cancelable);
|
|
594
|
+
return e;
|
|
595
|
+
}
|
|
596
|
+
else {
|
|
597
|
+
let customEvent = new ((0, Global_1._global$)()).CustomEvent(name, wrapper);
|
|
598
|
+
customEvent.channel = wrapper.channel;
|
|
599
|
+
return customEvent;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
exports.Broker = Broker;
|
|
604
|
+
// noinspection JSUnusedGlobalSymbols
|
|
605
|
+
/**
|
|
606
|
+
* Helper factory to create a dom broker
|
|
607
|
+
*/
|
|
608
|
+
class BrokerBuilder {
|
|
609
|
+
constructor() {
|
|
610
|
+
this.scopeElement = window;
|
|
611
|
+
this.channelGroup = DEFAULT_CHANNEL_GROUP;
|
|
612
|
+
this.crypto = noEncryption;
|
|
613
|
+
this.listeners = [];
|
|
614
|
+
}
|
|
615
|
+
withScopeElement(scopeElement) {
|
|
616
|
+
this.scopeElement = scopeElement;
|
|
617
|
+
return this;
|
|
618
|
+
}
|
|
619
|
+
withListener(channel, ...listeners) {
|
|
620
|
+
Stream_1.Stream.of(...listeners).each(listener => {
|
|
621
|
+
this.listeners.push({
|
|
622
|
+
channel: channel,
|
|
623
|
+
listener: listener
|
|
624
|
+
});
|
|
625
|
+
});
|
|
626
|
+
return this;
|
|
627
|
+
}
|
|
628
|
+
withChannelGroup(channelGroup) {
|
|
629
|
+
this.channelGroup = channelGroup;
|
|
630
|
+
return this;
|
|
631
|
+
}
|
|
632
|
+
withCrypto(crypto) {
|
|
633
|
+
this.crypto = crypto;
|
|
634
|
+
return this;
|
|
635
|
+
}
|
|
636
|
+
build() {
|
|
637
|
+
let broker = new Broker(this.scopeElement, this.channelGroup, this.crypto);
|
|
638
|
+
Stream_1.Stream.of(...this.listeners).each(listenerItem => {
|
|
639
|
+
broker.registerListener(listenerItem.channel, listenerItem.listener);
|
|
640
|
+
});
|
|
641
|
+
return broker;
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
exports.BrokerBuilder = BrokerBuilder;
|
|
645
|
+
//# sourceMappingURL=Messaging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Messaging.js","sourceRoot":"","sources":["../src/main/typescript/Messaging.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH;;GAEG;AACH,+BAAyC;AACzC,qCAAgC;AAChC,qCAAkC;AAoClC;;GAEG;AACH,MAAa,QAAQ;IACjB,MAAM,CAAC,IAAS;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,IAAS;QACZ,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AARD,4BAQC;AAED,4EAA4E;AAC5E,mEAAmE;AAEnE,IAAI,YAAY,GAAG,IAAI,QAAQ,EAAE,CAAC;AAElC,MAAa,OAAO;IAOhB,YAAmB,UAAe,EAAE,EAAE,YAAY,GAAG,GAAG;QAArC,YAAO,GAAP,OAAO,CAAU;QAFpC,YAAO,GAAY,KAAK,CAAC;QAGrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,IAAI,IAAI,EAAE,CAAC,eAAe,EAAE,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC,eAAe,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IAC/F,CAAC;CACJ;AAZD,0BAYC;AAED;;GAEG;AACH,MAAM,cAAc;IAQhB,YAAY,OAAe,EAAE,OAAgB;QACzC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC;QACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;CACJ;AAED;;;GA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