@artstesh/postboy 3.1.5 → 3.3.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/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/messages/add-middleware.executor.d.ts +19 -0
- package/lib/messages/add-middleware.executor.d.ts.map +1 -0
- package/lib/messages/add-middleware.executor.js +24 -0
- package/lib/messages/add-middleware.executor.js.map +1 -0
- package/lib/messages/add-namespace.executor.d.ts +19 -0
- package/lib/messages/add-namespace.executor.d.ts.map +1 -0
- package/lib/messages/add-namespace.executor.js +24 -0
- package/lib/messages/add-namespace.executor.js.map +1 -0
- package/lib/messages/connect-executor.executor.d.ts +25 -0
- package/lib/messages/connect-executor.executor.d.ts.map +1 -0
- package/lib/messages/connect-executor.executor.js +30 -0
- package/lib/messages/connect-executor.executor.js.map +1 -0
- package/lib/messages/connect-handler.executor.d.ts +25 -0
- package/lib/messages/connect-handler.executor.d.ts.map +1 -0
- package/lib/messages/connect-handler.executor.js +30 -0
- package/lib/messages/connect-handler.executor.js.map +1 -0
- package/lib/messages/connect-message.executor.d.ts +28 -0
- package/lib/messages/connect-message.executor.d.ts.map +1 -0
- package/lib/messages/connect-message.executor.js +31 -0
- package/lib/messages/connect-message.executor.js.map +1 -0
- package/lib/messages/connect.message.executor.d.ts +28 -0
- package/lib/messages/connect.message.executor.d.ts.map +1 -0
- package/lib/messages/connect.message.executor.js +31 -0
- package/lib/messages/connect.message.executor.js.map +1 -0
- package/lib/messages/disconnect-message.executor.d.ts +19 -0
- package/lib/messages/disconnect-message.executor.d.ts.map +1 -0
- package/lib/messages/disconnect-message.executor.js +25 -0
- package/lib/messages/disconnect-message.executor.js.map +1 -0
- package/lib/messages/eliminate-namespace.executor.d.ts +16 -0
- package/lib/messages/eliminate-namespace.executor.d.ts.map +1 -0
- package/lib/messages/eliminate-namespace.executor.js +22 -0
- package/lib/messages/eliminate-namespace.executor.js.map +1 -0
- package/lib/messages/index.d.ts +11 -0
- package/lib/messages/index.d.ts.map +1 -0
- package/lib/messages/index.js +24 -0
- package/lib/messages/index.js.map +1 -0
- package/lib/messages/lock-message.executor.d.ts +22 -0
- package/lib/messages/lock-message.executor.d.ts.map +1 -0
- package/lib/messages/lock-message.executor.js +26 -0
- package/lib/messages/lock-message.executor.js.map +1 -0
- package/lib/messages/remove-middleware.executor.d.ts +17 -0
- package/lib/messages/remove-middleware.executor.d.ts.map +1 -0
- package/lib/messages/remove-middleware.executor.js +22 -0
- package/lib/messages/remove-middleware.executor.js.map +1 -0
- package/lib/messages/unlock-message.executor.d.ts +21 -0
- package/lib/messages/unlock-message.executor.d.ts.map +1 -0
- package/lib/messages/unlock-message.executor.js +25 -0
- package/lib/messages/unlock-message.executor.js.map +1 -0
- package/lib/models/postboy-message-metadata.d.ts +26 -0
- package/lib/models/postboy-message-metadata.d.ts.map +1 -0
- package/lib/models/postboy-message-metadata.js +3 -0
- package/lib/models/postboy-message-metadata.js.map +1 -0
- package/lib/models/postboy-message.context.d.ts +9 -0
- package/lib/models/postboy-message.context.d.ts.map +1 -0
- package/lib/models/postboy-message.context.js +3 -0
- package/lib/models/postboy-message.context.js.map +1 -0
- package/lib/models/postboy-subscription.d.ts +1 -1
- package/lib/models/postboy-subscription.d.ts.map +1 -1
- package/lib/models/postboy-subscription.js +1 -1
- package/lib/models/postboy-subscription.js.map +1 -1
- package/lib/models/postboy.message.d.ts +3 -0
- package/lib/models/postboy.message.d.ts.map +1 -1
- package/lib/models/postboy.message.js +7 -0
- package/lib/models/postboy.message.js.map +1 -1
- package/lib/models/postboy.settings.d.ts +13 -0
- package/lib/models/postboy.settings.d.ts.map +1 -0
- package/lib/models/postboy.settings.js +20 -0
- package/lib/models/postboy.settings.js.map +1 -0
- package/lib/postboy-abstract.registrator.d.ts.map +1 -1
- package/lib/postboy-abstract.registrator.js +11 -5
- package/lib/postboy-abstract.registrator.js.map +1 -1
- package/lib/postboy.service.d.ts +20 -1
- package/lib/postboy.service.d.ts.map +1 -1
- package/lib/postboy.service.js +55 -3
- package/lib/postboy.service.js.map +1 -1
- package/lib/services/postboy-context.service.d.ts +13 -0
- package/lib/services/postboy-context.service.d.ts.map +1 -0
- package/lib/services/postboy-context.service.js +50 -0
- package/lib/services/postboy-context.service.js.map +1 -0
- package/lib/services/postboy-dependency.resolver.d.ts +1 -3
- package/lib/services/postboy-dependency.resolver.d.ts.map +1 -1
- package/lib/services/postboy-dependency.resolver.js +1 -2
- package/lib/services/postboy-dependency.resolver.js.map +1 -1
- package/lib/services/postboy-namespace.store.d.ts +5 -6
- package/lib/services/postboy-namespace.store.d.ts.map +1 -1
- package/lib/services/postboy-namespace.store.js +7 -7
- package/lib/services/postboy-namespace.store.js.map +1 -1
- package/package.json +2 -1
package/lib/postboy.service.js
CHANGED
|
@@ -1,19 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PostboyService = void 0;
|
|
4
|
+
const rxjs_1 = require("rxjs");
|
|
4
5
|
const postboy_generic_message_1 = require("./models/postboy-generic-message");
|
|
5
6
|
const postboy_subscription_1 = require("./models/postboy-subscription");
|
|
6
7
|
const postboy_dependency_resolver_1 = require("./services/postboy-dependency.resolver");
|
|
8
|
+
const add_namespace_executor_1 = require("./messages/add-namespace.executor");
|
|
9
|
+
const eliminate_namespace_executor_1 = require("./messages/eliminate-namespace.executor");
|
|
10
|
+
const add_middleware_executor_1 = require("./messages/add-middleware.executor");
|
|
11
|
+
const remove_middleware_executor_1 = require("./messages/remove-middleware.executor");
|
|
12
|
+
const lock_message_executor_1 = require("./messages/lock-message.executor");
|
|
13
|
+
const unlock_message_executor_1 = require("./messages/unlock-message.executor");
|
|
14
|
+
const disconnect_message_executor_1 = require("./messages/disconnect-message.executor");
|
|
15
|
+
const connect_message_executor_1 = require("./messages/connect-message.executor");
|
|
16
|
+
const connect_executor_executor_1 = require("./messages/connect-executor.executor");
|
|
17
|
+
const connect_handler_executor_1 = require("./messages/connect-handler.executor");
|
|
7
18
|
class PostboyService {
|
|
8
19
|
constructor(resolver) {
|
|
9
20
|
this.locked = new Set();
|
|
10
21
|
this.dependencyResolver = resolver || new postboy_dependency_resolver_1.PostboyDependencyResolver();
|
|
11
22
|
this.middleware = this.dependencyResolver.getMiddlewareService();
|
|
12
23
|
this.store = this.dependencyResolver.getMessageStore();
|
|
24
|
+
this.namespaceStore = this.dependencyResolver.getNamespaceStore();
|
|
25
|
+
this.registerInfrastructureMessages();
|
|
26
|
+
}
|
|
27
|
+
registerInfrastructureMessages() {
|
|
28
|
+
this.store.registerExecutor(disconnect_message_executor_1.DisconnectMessage.ID, (e) => this.store.unregister(e.messageId));
|
|
29
|
+
this.store.registerExecutor(unlock_message_executor_1.UnlockMessage.ID, (e) => this.locked.delete((0, postboy_generic_message_1.checkId)(e.type)));
|
|
30
|
+
this.store.registerExecutor(lock_message_executor_1.LockMessage.ID, (e) => this.locked.add((0, postboy_generic_message_1.checkId)(e.type)));
|
|
31
|
+
this.store.registerExecutor(add_middleware_executor_1.AddMiddleware.ID, (e) => this.middleware.addMiddleware(e.middleware));
|
|
32
|
+
this.store.registerExecutor(remove_middleware_executor_1.RemoveMiddleware.ID, (e) => this.middleware.removeMiddleware(e.middleware));
|
|
33
|
+
this.store.registerExecutor(add_namespace_executor_1.AddNamespace.ID, (e) => this.namespaceStore.addSpace(e.space, this));
|
|
34
|
+
this.store.registerExecutor(eliminate_namespace_executor_1.EliminateNamespace.ID, (e) => this.namespaceStore.eliminateSpace(e.space));
|
|
35
|
+
this.store.registerExecutor(connect_message_executor_1.ConnectMessage.ID, (e) => {
|
|
36
|
+
const { type, sub, pipe } = e;
|
|
37
|
+
this.store.registerMessage((0, postboy_generic_message_1.checkId)(type), new postboy_subscription_1.PostboySubscription(sub, pipe));
|
|
38
|
+
});
|
|
39
|
+
this.store.registerExecutor(connect_executor_executor_1.ConnectExecutor.ID, (e) => {
|
|
40
|
+
const { type, exec } = e;
|
|
41
|
+
this.store.registerExecutor((0, postboy_generic_message_1.checkId)(type), exec);
|
|
42
|
+
});
|
|
43
|
+
this.store.registerExecutor(connect_handler_executor_1.ConnectHandler.ID, (e) => {
|
|
44
|
+
const { executor, handler } = e;
|
|
45
|
+
this.store.registerExecutor((0, postboy_generic_message_1.checkId)(executor), (e) => handler.handle(e));
|
|
46
|
+
});
|
|
13
47
|
}
|
|
14
48
|
/**
|
|
15
49
|
* Locks a specific message type to prevent further modifications or actions.
|
|
16
50
|
*
|
|
51
|
+
* @deprecated The method should be replaced with firing {@link LockMessage} message.
|
|
17
52
|
* @param {MessageType<T>} type - The message type to be locked. It must extend from the `PostboyGenericMessage`.
|
|
18
53
|
* @return {void} This method does not return a value.
|
|
19
54
|
*/
|
|
@@ -23,6 +58,7 @@ class PostboyService {
|
|
|
23
58
|
/**
|
|
24
59
|
* Unlocks a previously locked message type by removing its ID from the locked set.
|
|
25
60
|
*
|
|
61
|
+
* @deprecated The method should be replaced with firing {@link UnlockMessage} message.
|
|
26
62
|
* @param {MessageType<T>} type - The message type to unlock, which is a generic type extending PostboyGenericMessage.
|
|
27
63
|
* @return {void} This method does not return any value.
|
|
28
64
|
*/
|
|
@@ -32,6 +68,7 @@ class PostboyService {
|
|
|
32
68
|
/**
|
|
33
69
|
* Adds a middleware to the middleware stack.
|
|
34
70
|
*
|
|
71
|
+
* @deprecated The method should be replaced with firing {@link AddMiddleware} message.
|
|
35
72
|
* @param {PostboyMiddleware} middleware - The middleware instance to be added.
|
|
36
73
|
* @return {void}
|
|
37
74
|
*/
|
|
@@ -41,6 +78,7 @@ class PostboyService {
|
|
|
41
78
|
/**
|
|
42
79
|
* Removes a middleware from the current middleware stack.
|
|
43
80
|
*
|
|
81
|
+
* @deprecated The method should be replaced with firing {@link RemoveMiddleware} message.
|
|
44
82
|
* @param {PostboyMiddleware} middleware - The middleware instance to be removed.
|
|
45
83
|
* @return {void} No return value.
|
|
46
84
|
*/
|
|
@@ -50,6 +88,7 @@ class PostboyService {
|
|
|
50
88
|
/**
|
|
51
89
|
* Unregisters a message identified by the given ID from the store.
|
|
52
90
|
*
|
|
91
|
+
* @deprecated The method should be replaced with firing {@link DisconnectMessage} message.
|
|
53
92
|
* @param {string} id - The unique identifier of the item to unregister.
|
|
54
93
|
* @return {void} No value is returned.
|
|
55
94
|
*/
|
|
@@ -104,9 +143,19 @@ class PostboyService {
|
|
|
104
143
|
sub(type) {
|
|
105
144
|
return this.store.getMessage((0, postboy_generic_message_1.checkId)(type), type.name).sub();
|
|
106
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Subscribes to a specific message type and automatically unsubscribes after receiving the first message.
|
|
148
|
+
*
|
|
149
|
+
* @param type The type of message to subscribe to.
|
|
150
|
+
* @return An observable that emits the first message of the specified type and then completes.
|
|
151
|
+
*/
|
|
152
|
+
once(type) {
|
|
153
|
+
return this.sub(type).pipe((0, rxjs_1.first)());
|
|
154
|
+
}
|
|
107
155
|
/**
|
|
108
156
|
* Registers a given message type and its associated subject subscription with the system.
|
|
109
157
|
*
|
|
158
|
+
* @deprecated The method should be replaced with firing {@link ConnectMessage} message.
|
|
110
159
|
* @param type The constructor function of the message type that extends the PostboyGenericMessage.
|
|
111
160
|
* @param sub The Subject instance for the provided message type, used for managing subscriptions.
|
|
112
161
|
* @return {void} No return value.
|
|
@@ -117,6 +166,7 @@ class PostboyService {
|
|
|
117
166
|
/**
|
|
118
167
|
* Registers a generic message type with a Subject and a transformation pipe.
|
|
119
168
|
*
|
|
169
|
+
* @deprecated The method should be replaced with firing {@link ConnectMessage} message.
|
|
120
170
|
* @param {MessageType<T>} type - The constructor of the message type being registered.
|
|
121
171
|
* @param {Subject<T>} sub - The Subject instance used to handle incoming messages of the specified type.
|
|
122
172
|
* @param {(s: Subject<T>) => Observable<T>} pipe - A function that applies a transformation or processing logic to the Subject and returns an Observable.
|
|
@@ -128,6 +178,7 @@ class PostboyService {
|
|
|
128
178
|
/**
|
|
129
179
|
* Registers an executor for a specified message type.
|
|
130
180
|
*
|
|
181
|
+
* @deprecated The method should be replaced with firing {@link ConnectExecutor} message.
|
|
131
182
|
* @param {MessageType<E>} type - The message type for which the executor is being registered.
|
|
132
183
|
* @param {(e: E) => T} exec - The executor function that will handle messages of the specified type.
|
|
133
184
|
* @return {void} This method does not return any value.
|
|
@@ -138,6 +189,7 @@ class PostboyService {
|
|
|
138
189
|
/**
|
|
139
190
|
* Registers a handler for a specific executor type.
|
|
140
191
|
*
|
|
192
|
+
* @deprecated The method should be replaced with firing {@link ConnectHandler} message.
|
|
141
193
|
* @param executor The constructor of the executor class that extends `PostboyExecutor<R>`.
|
|
142
194
|
* @param handler An instance of `PostboyExecutionHandler<R, E>` that defines the logic for handling the executor.
|
|
143
195
|
* @return void
|
|
@@ -148,17 +200,17 @@ class PostboyService {
|
|
|
148
200
|
/**
|
|
149
201
|
* Adds a namespace to the namespace store.
|
|
150
202
|
*
|
|
203
|
+
* @deprecated The method should be replaced with firing {@link AddNamespace} message.
|
|
151
204
|
* @param {string} space - The name of the namespace to be added.
|
|
152
205
|
* @return {PostboyAbstractRegistrator} The instance of the namespace after adding the specified namespace.
|
|
153
206
|
*/
|
|
154
207
|
addNamespace(space) {
|
|
155
|
-
|
|
156
|
-
this.namespaceStore = this.dependencyResolver.getNamespaceStore(this);
|
|
157
|
-
return this.namespaceStore.addSpace(space);
|
|
208
|
+
return this.namespaceStore.addSpace(space, this);
|
|
158
209
|
}
|
|
159
210
|
/**
|
|
160
211
|
* Removes the specified namespace from the namespace store.
|
|
161
212
|
*
|
|
213
|
+
* @deprecated The method should be replaced with firing {@link EliminateNamespace} message.
|
|
162
214
|
* @param {string} space - The name of the namespace to be removed.
|
|
163
215
|
* @return {void} This method does not return a value.
|
|
164
216
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postboy.service.js","sourceRoot":"","sources":["../src/postboy.service.ts"],"names":[],"mappings":";;;
|
|
1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AAC;IAED;;;;;OAKG;IACI,OAAO;;QACZ,MAAA,IAAI,CAAC,cAAc,0CAAE,OAAO,EAAE,CAAC;QAC/B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC5B,CAAC;CACF;AAxPD,wCAwPC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PostboyMessageContext } from '../models/postboy-message.context';
|
|
2
|
+
import { PostboyMessage } from '../models/postboy.message';
|
|
3
|
+
export declare class PostboyContextService {
|
|
4
|
+
active: boolean;
|
|
5
|
+
private readonly storage;
|
|
6
|
+
constructor(active?: boolean);
|
|
7
|
+
private get current();
|
|
8
|
+
run<T>(context: PostboyMessageContext, action: () => T): T;
|
|
9
|
+
private createRoot;
|
|
10
|
+
createChild(message: PostboyMessage): PostboyMessageContext;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=postboy-context.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postboy-context.service.d.ts","sourceRoot":"","sources":["../../src/services/postboy-context.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qBAAa,qBAAqB;IAGb,MAAM,EAAE,OAAO;IAFlC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkD;gBAEvD,MAAM,GAAE,OAAc;IAEzC,OAAO,KAAK,OAAO,GAElB;IAEM,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC;IAIjE,OAAO,CAAC,UAAU;IAUX,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,qBAAqB;IAmB3D,OAAO,IAAI,IAAI;CAGvB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PostboyContextService = void 0;
|
|
4
|
+
const node_async_hooks_1 = require("node:async_hooks");
|
|
5
|
+
class PostboyContextService {
|
|
6
|
+
constructor(active = true) {
|
|
7
|
+
this.active = active;
|
|
8
|
+
this.storage = new node_async_hooks_1.AsyncLocalStorage();
|
|
9
|
+
}
|
|
10
|
+
get current() {
|
|
11
|
+
return this.storage.getStore();
|
|
12
|
+
}
|
|
13
|
+
run(context, action) {
|
|
14
|
+
return this.active ? this.storage.run(context, action) : action();
|
|
15
|
+
}
|
|
16
|
+
createRoot(message) {
|
|
17
|
+
return {
|
|
18
|
+
correlationId: message.id,
|
|
19
|
+
currentMessageId: message.id,
|
|
20
|
+
depth: 0,
|
|
21
|
+
startedAt: new Date(),
|
|
22
|
+
tags: new Set(),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
createChild(message) {
|
|
26
|
+
var _a, _b, _c, _d;
|
|
27
|
+
if (!this.active)
|
|
28
|
+
return this.createRoot(message);
|
|
29
|
+
const parent = this.current;
|
|
30
|
+
const tags = (_b = (_a = this.current) === null || _a === void 0 ? void 0 : _a.tags) !== null && _b !== void 0 ? _b : new Set();
|
|
31
|
+
(_d = (_c = message.metadata) === null || _c === void 0 ? void 0 : _c.tags) === null || _d === void 0 ? void 0 : _d.forEach((tag) => tags.add(tag));
|
|
32
|
+
const data = !parent
|
|
33
|
+
? this.createRoot(message)
|
|
34
|
+
: {
|
|
35
|
+
correlationId: parent.correlationId,
|
|
36
|
+
currentMessageId: message.id,
|
|
37
|
+
parentMessageId: parent.currentMessageId,
|
|
38
|
+
depth: parent.depth + 1,
|
|
39
|
+
startedAt: parent.startedAt,
|
|
40
|
+
tags,
|
|
41
|
+
};
|
|
42
|
+
message.setMetadata({ correlationId: data.correlationId, causationId: data.parentMessageId, tags: data.tags });
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
dispose() {
|
|
46
|
+
this.storage.disable();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.PostboyContextService = PostboyContextService;
|
|
50
|
+
//# sourceMappingURL=postboy-context.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postboy-context.service.js","sourceRoot":"","sources":["../../src/services/postboy-context.service.ts"],"names":[],"mappings":";;;AAAA,uDAAqD;AAIrD,MAAa,qBAAqB;IAGhC,YAAmB,SAAkB,IAAI;QAAtB,WAAM,GAAN,MAAM,CAAgB;QAFxB,YAAO,GAAG,IAAI,oCAAiB,EAAyB,CAAC;IAE9B,CAAC;IAE7C,IAAY,OAAO;QACjB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IACjC,CAAC;IAEM,GAAG,CAAI,OAA8B,EAAE,MAAe;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpE,CAAC;IAEO,UAAU,CAAC,OAAuB;QACxC,OAAO;YACL,aAAa,EAAE,OAAO,CAAC,EAAE;YACzB,gBAAgB,EAAE,OAAO,CAAC,EAAE;YAC5B,KAAK,EAAE,CAAC;YACR,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,IAAI,EAAE,IAAI,GAAG,EAAE;SAChB,CAAC;IACJ,CAAC;IAEM,WAAW,CAAC,OAAuB;;QACxC,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,MAAM,IAAI,GAAG,MAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,mCAAI,IAAI,GAAG,EAAE,CAAC;QAC7C,MAAA,MAAA,OAAO,CAAC,QAAQ,0CAAE,IAAI,0CAAE,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QACxD,MAAM,IAAI,GAAG,CAAC,MAAM;YAClB,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;YAC1B,CAAC,CAAC;gBACE,aAAa,EAAE,MAAM,CAAC,aAAa;gBACnC,gBAAgB,EAAE,OAAO,CAAC,EAAE;gBAC5B,eAAe,EAAE,MAAM,CAAC,gBAAgB;gBACxC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAG,CAAC;gBACvB,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,IAAI;aACL,CAAC;QACN,OAAO,CAAC,WAAW,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/G,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,OAAO;QACZ,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;CACF;AA7CD,sDA6CC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PostboyMiddlewareService } from './postboy-middleware.service';
|
|
2
2
|
import { PostboyMessageStore } from './postboy-message.store';
|
|
3
3
|
import { PostboyNamespaceStore } from './postboy-namespace.store';
|
|
4
|
-
import { PostboyService } from '../postboy.service';
|
|
5
4
|
export declare class PostboyDependencyResolver {
|
|
6
5
|
/**
|
|
7
6
|
* Retrieves an instance of the PostboyMiddlewareService.
|
|
@@ -26,9 +25,8 @@ export declare class PostboyDependencyResolver {
|
|
|
26
25
|
* Creates and initializes a new instance of PostboyNamespaceStore using the provided PostboyService instance.
|
|
27
26
|
*
|
|
28
27
|
* @function getNamespaceStore
|
|
29
|
-
* @param {PostboyService} postboy - An instance of the PostboyService used to create the namespace store.
|
|
30
28
|
* @returns {PostboyNamespaceStore} A new instance of PostboyNamespaceStore associated with the given PostboyService.
|
|
31
29
|
*/
|
|
32
|
-
getNamespaceStore: (
|
|
30
|
+
getNamespaceStore: () => PostboyNamespaceStore;
|
|
33
31
|
}
|
|
34
32
|
//# sourceMappingURL=postboy-dependency.resolver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-dependency.resolver.d.ts","sourceRoot":"","sources":["../../src/services/postboy-dependency.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"postboy-dependency.resolver.d.ts","sourceRoot":"","sources":["../../src/services/postboy-dependency.resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,qBAAa,yBAAyB;IACpC;;;;;;;;OAQG;IACH,oBAAoB,iCAAwC;IAC5D;;;;;;;OAOG;IACH,eAAe,4BAAmC;IAClD;;;;;OAKG;IACH,iBAAiB,8BAAqC;CACvD"}
|
|
@@ -29,10 +29,9 @@ class PostboyDependencyResolver {
|
|
|
29
29
|
* Creates and initializes a new instance of PostboyNamespaceStore using the provided PostboyService instance.
|
|
30
30
|
*
|
|
31
31
|
* @function getNamespaceStore
|
|
32
|
-
* @param {PostboyService} postboy - An instance of the PostboyService used to create the namespace store.
|
|
33
32
|
* @returns {PostboyNamespaceStore} A new instance of PostboyNamespaceStore associated with the given PostboyService.
|
|
34
33
|
*/
|
|
35
|
-
this.getNamespaceStore = (
|
|
34
|
+
this.getNamespaceStore = () => new postboy_namespace_store_1.PostboyNamespaceStore();
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
exports.PostboyDependencyResolver = PostboyDependencyResolver;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-dependency.resolver.js","sourceRoot":"","sources":["../../src/services/postboy-dependency.resolver.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AACxE,mEAA8D;AAC9D,uEAAkE;
|
|
1
|
+
{"version":3,"file":"postboy-dependency.resolver.js","sourceRoot":"","sources":["../../src/services/postboy-dependency.resolver.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AACxE,mEAA8D;AAC9D,uEAAkE;AAElE,MAAa,yBAAyB;IAAtC;QACE;;;;;;;;WAQG;QACH,yBAAoB,GAAG,GAAG,EAAE,CAAC,IAAI,qDAAwB,EAAE,CAAC;QAC5D;;;;;;;WAOG;QACH,oBAAe,GAAG,GAAG,EAAE,CAAC,IAAI,2CAAmB,EAAE,CAAC;QAClD;;;;;WAKG;QACH,sBAAiB,GAAG,GAAG,EAAE,CAAC,IAAI,+CAAqB,EAAE,CAAC;IACxD,CAAC;CAAA;AA3BD,8DA2BC"}
|
|
@@ -5,16 +5,15 @@ import { PostboyService } from '../postboy.service';
|
|
|
5
5
|
* Provides functionality to add, eliminate, and dispose namespaces.
|
|
6
6
|
*/
|
|
7
7
|
export declare class PostboyNamespaceStore {
|
|
8
|
-
private postboy;
|
|
9
8
|
private spaces;
|
|
10
|
-
constructor(postboy: PostboyService);
|
|
11
9
|
/**
|
|
12
|
-
* Adds a new
|
|
10
|
+
* Adds a new space or retrieves an existing one if it already exists.
|
|
13
11
|
*
|
|
14
|
-
* @param {string} space - The name of the
|
|
15
|
-
* @
|
|
12
|
+
* @param {string} space - The name of the space to add or retrieve.
|
|
13
|
+
* @param {PostboyService} postboy - The PostboyService instance used to create a namespace registrator.
|
|
14
|
+
* @return {PostboyAbstractRegistrator} The registrator associated with the specified space.
|
|
16
15
|
*/
|
|
17
|
-
addSpace(space: string): PostboyAbstractRegistrator;
|
|
16
|
+
addSpace(space: string, postboy: PostboyService): PostboyAbstractRegistrator;
|
|
18
17
|
/**
|
|
19
18
|
* Removes a specified space from the spaces collection if it exists.
|
|
20
19
|
* If the space exists, it will be deleted after invoking its down method.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-namespace.store.d.ts","sourceRoot":"","sources":["../../src/services/postboy-namespace.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;GAGG;AACH,qBAAa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"postboy-namespace.store.d.ts","sourceRoot":"","sources":["../../src/services/postboy-namespace.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAAsD;IAEpE;;;;;;OAMG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,0BAA0B;IAOnF;;;;;;OAMG;IACI,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM1C;;;;;;OAMG;IACI,OAAO,IAAI,IAAI;CAIvB"}
|
|
@@ -7,20 +7,20 @@ const namespace_registrator_1 = require("./namespace-registrator");
|
|
|
7
7
|
* Provides functionality to add, eliminate, and dispose namespaces.
|
|
8
8
|
*/
|
|
9
9
|
class PostboyNamespaceStore {
|
|
10
|
-
constructor(
|
|
11
|
-
this.postboy = postboy;
|
|
10
|
+
constructor() {
|
|
12
11
|
this.spaces = new Map();
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
15
|
-
* Adds a new
|
|
14
|
+
* Adds a new space or retrieves an existing one if it already exists.
|
|
16
15
|
*
|
|
17
|
-
* @param {string} space - The name of the
|
|
18
|
-
* @
|
|
16
|
+
* @param {string} space - The name of the space to add or retrieve.
|
|
17
|
+
* @param {PostboyService} postboy - The PostboyService instance used to create a namespace registrator.
|
|
18
|
+
* @return {PostboyAbstractRegistrator} The registrator associated with the specified space.
|
|
19
19
|
*/
|
|
20
|
-
addSpace(space) {
|
|
20
|
+
addSpace(space, postboy) {
|
|
21
21
|
if (this.spaces.has(space))
|
|
22
22
|
return this.spaces.get(space);
|
|
23
|
-
const registrator = new namespace_registrator_1.NamespaceRegistrator(
|
|
23
|
+
const registrator = new namespace_registrator_1.NamespaceRegistrator(postboy);
|
|
24
24
|
this.spaces.set(space, registrator);
|
|
25
25
|
return registrator;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-namespace.store.js","sourceRoot":"","sources":["../../src/services/postboy-namespace.store.ts"],"names":[],"mappings":";;;AACA,mEAA+D;AAG/D;;;GAGG;AACH,MAAa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"postboy-namespace.store.js","sourceRoot":"","sources":["../../src/services/postboy-namespace.store.ts"],"names":[],"mappings":";;;AACA,mEAA+D;AAG/D;;;GAGG;AACH,MAAa,qBAAqB;IAAlC;QACU,WAAM,GAA4C,IAAI,GAAG,EAAE,CAAC;IAwCtE,CAAC;IAtCC;;;;;;OAMG;IACI,QAAQ,CAAC,KAAa,EAAE,OAAuB;QACpD,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAE,CAAC;QAC3D,MAAM,WAAW,GAAG,IAAI,4CAAoB,CAAC,OAAO,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED;;;;;;OAMG;IACI,cAAc,CAAC,KAAa;;QACjC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,OAAO;QACpC,MAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,0CAAE,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;;OAMG;IACI,OAAO;QACZ,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;CACF;AAzCD,sDAyCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artstesh/postboy",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"author": "artstesh",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@artstesh/forger": "^2.0.0",
|
|
40
40
|
"@artstesh/it-should": "^2.0.0",
|
|
41
|
+
"@artstesh/postboy-testing": "1.2.0",
|
|
41
42
|
"@types/jest": "29.5.12",
|
|
42
43
|
"jest": "29.7.0",
|
|
43
44
|
"prettier": "^3.1.1",
|