@artstesh/postboy 3.3.1 → 3.4.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.cjs +2 -0
- package/lib/index.cjs.map +1 -0
- package/lib/index.d.mts +701 -0
- package/lib/index.d.ts +701 -13
- package/lib/index.mjs +2 -0
- package/lib/index.mjs.map +1 -0
- package/package.json +52 -19
- package/lib/i-postboy-depending.service.d.ts +0 -5
- package/lib/i-postboy-depending.service.d.ts.map +0 -1
- package/lib/i-postboy-depending.service.js +0 -3
- package/lib/i-postboy-depending.service.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -32
- package/lib/index.js.map +0 -1
- package/lib/locker.store.d.ts +0 -9
- package/lib/locker.store.d.ts.map +0 -1
- package/lib/locker.store.js +0 -27
- package/lib/locker.store.js.map +0 -1
- package/lib/messages/add-middleware.executor.d.ts +0 -19
- package/lib/messages/add-middleware.executor.d.ts.map +0 -1
- package/lib/messages/add-middleware.executor.js +0 -24
- package/lib/messages/add-middleware.executor.js.map +0 -1
- package/lib/messages/add-namespace.executor.d.ts +0 -19
- package/lib/messages/add-namespace.executor.d.ts.map +0 -1
- package/lib/messages/add-namespace.executor.js +0 -24
- package/lib/messages/add-namespace.executor.js.map +0 -1
- package/lib/messages/connect-executor.executor.d.ts +0 -25
- package/lib/messages/connect-executor.executor.d.ts.map +0 -1
- package/lib/messages/connect-executor.executor.js +0 -30
- package/lib/messages/connect-executor.executor.js.map +0 -1
- package/lib/messages/connect-handler.executor.d.ts +0 -25
- package/lib/messages/connect-handler.executor.d.ts.map +0 -1
- package/lib/messages/connect-handler.executor.js +0 -30
- package/lib/messages/connect-handler.executor.js.map +0 -1
- package/lib/messages/connect-message.executor.d.ts +0 -28
- package/lib/messages/connect-message.executor.d.ts.map +0 -1
- package/lib/messages/connect-message.executor.js +0 -31
- package/lib/messages/connect-message.executor.js.map +0 -1
- package/lib/messages/connect.message.executor.d.ts +0 -28
- package/lib/messages/connect.message.executor.d.ts.map +0 -1
- package/lib/messages/connect.message.executor.js +0 -31
- package/lib/messages/connect.message.executor.js.map +0 -1
- package/lib/messages/disconnect-message.executor.d.ts +0 -19
- package/lib/messages/disconnect-message.executor.d.ts.map +0 -1
- package/lib/messages/disconnect-message.executor.js +0 -25
- package/lib/messages/disconnect-message.executor.js.map +0 -1
- package/lib/messages/eliminate-namespace.executor.d.ts +0 -16
- package/lib/messages/eliminate-namespace.executor.d.ts.map +0 -1
- package/lib/messages/eliminate-namespace.executor.js +0 -22
- package/lib/messages/eliminate-namespace.executor.js.map +0 -1
- package/lib/messages/index.d.ts +0 -11
- package/lib/messages/index.d.ts.map +0 -1
- package/lib/messages/index.js +0 -24
- package/lib/messages/index.js.map +0 -1
- package/lib/messages/lock-message.executor.d.ts +0 -22
- package/lib/messages/lock-message.executor.d.ts.map +0 -1
- package/lib/messages/lock-message.executor.js +0 -26
- package/lib/messages/lock-message.executor.js.map +0 -1
- package/lib/messages/remove-middleware.executor.d.ts +0 -17
- package/lib/messages/remove-middleware.executor.d.ts.map +0 -1
- package/lib/messages/remove-middleware.executor.js +0 -22
- package/lib/messages/remove-middleware.executor.js.map +0 -1
- package/lib/messages/unlock-message.executor.d.ts +0 -21
- package/lib/messages/unlock-message.executor.d.ts.map +0 -1
- package/lib/messages/unlock-message.executor.js +0 -25
- package/lib/messages/unlock-message.executor.js.map +0 -1
- package/lib/mocks/message-history-item-mock.d.ts +0 -10
- package/lib/mocks/message-history-item-mock.d.ts.map +0 -1
- package/lib/mocks/message-history-item-mock.js +0 -26
- package/lib/mocks/message-history-item-mock.js.map +0 -1
- package/lib/mocks/message-history-mock.d.ts +0 -9
- package/lib/mocks/message-history-mock.d.ts.map +0 -1
- package/lib/mocks/message-history-mock.js +0 -23
- package/lib/mocks/message-history-mock.js.map +0 -1
- package/lib/mocks/postboy-service-mock.d.ts +0 -22
- package/lib/mocks/postboy-service-mock.d.ts.map +0 -1
- package/lib/mocks/postboy-service-mock.js +0 -51
- package/lib/mocks/postboy-service-mock.js.map +0 -1
- package/lib/models/cancel-details.d.ts +0 -9
- package/lib/models/cancel-details.d.ts.map +0 -1
- package/lib/models/cancel-details.js +0 -3
- package/lib/models/cancel-details.js.map +0 -1
- package/lib/models/cancel-error.d.ts +0 -7
- package/lib/models/cancel-error.d.ts.map +0 -1
- package/lib/models/cancel-error.js +0 -18
- package/lib/models/cancel-error.js.map +0 -1
- package/lib/models/message-queue.model.d.ts +0 -44
- package/lib/models/message-queue.model.d.ts.map +0 -1
- package/lib/models/message-queue.model.js +0 -66
- package/lib/models/middleware-decision.enum.d.ts +0 -5
- package/lib/models/middleware-decision.enum.d.ts.map +0 -1
- package/lib/models/middleware-decision.enum.js +0 -9
- package/lib/models/middleware-decision.enum.js.map +0 -1
- package/lib/models/middleware-stage.enum.d.ts +0 -6
- package/lib/models/middleware-stage.enum.d.ts.map +0 -1
- package/lib/models/middleware-stage.enum.js +0 -10
- package/lib/models/middleware-stage.enum.js.map +0 -1
- package/lib/models/pipeline-context.d.ts +0 -7
- package/lib/models/pipeline-context.d.ts.map +0 -1
- package/lib/models/pipeline-context.js +0 -3
- package/lib/models/pipeline-context.js.map +0 -1
- package/lib/models/pipeline-result.d.ts +0 -6
- package/lib/models/pipeline-result.d.ts.map +0 -1
- package/lib/models/pipeline-result.js +0 -3
- package/lib/models/pipeline-result.js.map +0 -1
- package/lib/models/postboy-callback.message.d.ts +0 -48
- package/lib/models/postboy-callback.message.d.ts.map +0 -1
- package/lib/models/postboy-callback.message.js +0 -60
- package/lib/models/postboy-callback.message.js.map +0 -1
- package/lib/models/postboy-execution.handler.d.ts +0 -21
- package/lib/models/postboy-execution.handler.d.ts.map +0 -1
- package/lib/models/postboy-execution.handler.js +0 -17
- package/lib/models/postboy-execution.handler.js.map +0 -1
- package/lib/models/postboy-executor.d.ts +0 -5
- package/lib/models/postboy-executor.d.ts.map +0 -1
- package/lib/models/postboy-executor.js +0 -8
- package/lib/models/postboy-executor.js.map +0 -1
- package/lib/models/postboy-generic-message.d.ts +0 -8
- package/lib/models/postboy-generic-message.d.ts.map +0 -1
- package/lib/models/postboy-generic-message.js +0 -17
- package/lib/models/postboy-generic-message.js.map +0 -1
- package/lib/models/postboy-message-metadata.d.ts +0 -26
- package/lib/models/postboy-message-metadata.d.ts.map +0 -1
- package/lib/models/postboy-message-metadata.js +0 -3
- package/lib/models/postboy-message-metadata.js.map +0 -1
- package/lib/models/postboy-message.context.d.ts +0 -9
- package/lib/models/postboy-message.context.d.ts.map +0 -1
- package/lib/models/postboy-message.context.js +0 -3
- package/lib/models/postboy-message.context.js.map +0 -1
- package/lib/models/postboy-middleware.d.ts +0 -5
- package/lib/models/postboy-middleware.d.ts.map +0 -1
- package/lib/models/postboy-middleware.js +0 -3
- package/lib/models/postboy-middleware.js.map +0 -1
- package/lib/models/postboy-subscription.d.ts +0 -39
- package/lib/models/postboy-subscription.d.ts.map +0 -1
- package/lib/models/postboy-subscription.js +0 -49
- package/lib/models/postboy-subscription.js.map +0 -1
- package/lib/models/postboy.locker.d.ts +0 -6
- package/lib/models/postboy.locker.d.ts.map +0 -1
- package/lib/models/postboy.locker.js +0 -3
- package/lib/models/postboy.locker.js.map +0 -1
- package/lib/models/postboy.message.d.ts +0 -7
- package/lib/models/postboy.message.d.ts.map +0 -1
- package/lib/models/postboy.message.js +0 -17
- package/lib/models/postboy.message.js.map +0 -1
- package/lib/models/postboy.settings.d.ts +0 -13
- package/lib/models/postboy.settings.d.ts.map +0 -1
- package/lib/models/postboy.settings.js +0 -20
- package/lib/models/postboy.settings.js.map +0 -1
- package/lib/postboy-abstract.registrator.d.ts +0 -97
- package/lib/postboy-abstract.registrator.d.ts.map +0 -1
- package/lib/postboy-abstract.registrator.js +0 -138
- package/lib/postboy-abstract.registrator.js.map +0 -1
- package/lib/postboy.service.d.ts +0 -157
- package/lib/postboy.service.d.ts.map +0 -1
- package/lib/postboy.service.js +0 -242
- package/lib/postboy.service.js.map +0 -1
- package/lib/services/namespace-registrator.d.ts +0 -14
- package/lib/services/namespace-registrator.d.ts.map +0 -1
- package/lib/services/namespace-registrator.js +0 -21
- package/lib/services/namespace-registrator.js.map +0 -1
- package/lib/services/postboy-context.service.d.ts +0 -13
- package/lib/services/postboy-context.service.d.ts.map +0 -1
- package/lib/services/postboy-context.service.js +0 -50
- package/lib/services/postboy-context.service.js.map +0 -1
- package/lib/services/postboy-dependency.resolver.d.ts +0 -32
- package/lib/services/postboy-dependency.resolver.d.ts.map +0 -1
- package/lib/services/postboy-dependency.resolver.js +0 -38
- package/lib/services/postboy-dependency.resolver.js.map +0 -1
- package/lib/services/postboy-message.store.d.ts +0 -20
- package/lib/services/postboy-message.store.d.ts.map +0 -1
- package/lib/services/postboy-message.store.js +0 -61
- package/lib/services/postboy-message.store.js.map +0 -1
- package/lib/services/postboy-middleware.d.ts +0 -35
- package/lib/services/postboy-middleware.d.ts.map +0 -1
- package/lib/services/postboy-middleware.js +0 -47
- package/lib/services/postboy-middleware.js.map +0 -1
- package/lib/services/postboy-middleware.service.d.ts +0 -37
- package/lib/services/postboy-middleware.service.d.ts.map +0 -1
- package/lib/services/postboy-middleware.service.js +0 -50
- package/lib/services/postboy-middleware.service.js.map +0 -1
- package/lib/services/postboy-namespace.store.d.ts +0 -34
- package/lib/services/postboy-namespace.store.d.ts.map +0 -1
- package/lib/services/postboy-namespace.store.js +0 -54
- package/lib/services/postboy-namespace.store.js.map +0 -1
- package/lib/tests/integration/models/test-callback-message.d.ts +0 -6
- package/lib/tests/integration/models/test-callback-message.d.ts.map +0 -1
- package/lib/tests/integration/models/test-callback-message.js +0 -13
- package/lib/tests/integration/models/test-callback-message.js.map +0 -1
- package/lib/tests/integration/models/test-executor.d.ts +0 -7
- package/lib/tests/integration/models/test-executor.d.ts.map +0 -1
- package/lib/tests/integration/models/test-executor.js +0 -13
- package/lib/tests/integration/models/test-executor.js.map +0 -1
- package/lib/tests/integration/models/test-handler.d.ts +0 -8
- package/lib/tests/integration/models/test-handler.d.ts.map +0 -1
- package/lib/tests/integration/models/test-handler.js +0 -15
- package/lib/tests/integration/models/test-handler.js.map +0 -1
- package/lib/tests/integration/models/test-message.d.ts +0 -6
- package/lib/tests/integration/models/test-message.d.ts.map +0 -1
- package/lib/tests/integration/models/test-message.js +0 -13
- package/lib/tests/integration/models/test-message.js.map +0 -1
- package/lib/tests/integration/models/test-postboy.d.ts +0 -4
- package/lib/tests/integration/models/test-postboy.d.ts.map +0 -1
- package/lib/tests/integration/models/test-postboy.js +0 -8
- package/lib/tests/integration/models/test-postboy.js.map +0 -1
- package/lib/tests/integration/models/test-registry.d.ts +0 -8
- package/lib/tests/integration/models/test-registry.d.ts.map +0 -1
- package/lib/tests/integration/models/test-registry.js +0 -15
- package/lib/tests/integration/models/test-registry.js.map +0 -1
- package/lib/utils/id.generator.d.ts +0 -5
- package/lib/utils/id.generator.d.ts.map +0 -1
- package/lib/utils/id.generator.js +0 -18
- package/lib/utils/id.generator.js.map +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { PostboyMiddleware } from '../models/postboy-middleware';
|
|
2
|
-
import { PostboyMessage } from '../models/postboy.message';
|
|
3
|
-
/**
|
|
4
|
-
* A service class that manages middleware functions for processing PostboyMessage objects.
|
|
5
|
-
* It provides methods to add, remove, and execute middlewares in sequence.
|
|
6
|
-
*/
|
|
7
|
-
export declare class PostboyMiddlewareService {
|
|
8
|
-
protected middlewares: PostboyMiddleware[];
|
|
9
|
-
/**
|
|
10
|
-
* Adds a middleware function to the collection of middlewares.
|
|
11
|
-
*
|
|
12
|
-
* @param {PostboyMiddleware} middleware - The middleware function to be added.
|
|
13
|
-
* @return {void}
|
|
14
|
-
*/
|
|
15
|
-
addMiddleware(middleware: PostboyMiddleware): void;
|
|
16
|
-
/**
|
|
17
|
-
* Removes a middleware from the list of registered middlewares.
|
|
18
|
-
*
|
|
19
|
-
* @param {PostboyMiddleware} middleware - The middleware instance to be removed.
|
|
20
|
-
* @return {void} No return value.
|
|
21
|
-
*/
|
|
22
|
-
removeMiddleware(middleware: PostboyMiddleware): void;
|
|
23
|
-
/**
|
|
24
|
-
* Manages the processing of a PostboyMessage by sequentially applying all middlewares.
|
|
25
|
-
*
|
|
26
|
-
* @param {PostboyMessage} msg - The message object to be processed by the middlewares.
|
|
27
|
-
* @return {void} - This method does not return any value.
|
|
28
|
-
*/
|
|
29
|
-
manage(msg: PostboyMessage): void;
|
|
30
|
-
/**
|
|
31
|
-
* Disposes of the current object by clearing its middlewares array.
|
|
32
|
-
*
|
|
33
|
-
* @return {void} This method does not return a value.
|
|
34
|
-
*/
|
|
35
|
-
dispose(): void;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=postboy-middleware.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-middleware.service.d.ts","sourceRoot":"","sources":["../../src/services/postboy-middleware.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D;;;GAGG;AACH,qBAAa,wBAAwB;IACnC,SAAS,CAAC,WAAW,EAAE,iBAAiB,EAAE,CAAM;IAEhD;;;;;OAKG;IACI,aAAa,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAIzD;;;;;OAKG;IACI,gBAAgB,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI;IAI5D;;;;;OAKG;IACI,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;IAIxC;;;;OAIG;IACI,OAAO,IAAI,IAAI;CAGvB"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboyMiddlewareService = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* A service class that manages middleware functions for processing PostboyMessage objects.
|
|
6
|
-
* It provides methods to add, remove, and execute middlewares in sequence.
|
|
7
|
-
*/
|
|
8
|
-
class PostboyMiddlewareService {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.middlewares = [];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Adds a middleware function to the collection of middlewares.
|
|
14
|
-
*
|
|
15
|
-
* @param {PostboyMiddleware} middleware - The middleware function to be added.
|
|
16
|
-
* @return {void}
|
|
17
|
-
*/
|
|
18
|
-
addMiddleware(middleware) {
|
|
19
|
-
this.middlewares.push(middleware);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Removes a middleware from the list of registered middlewares.
|
|
23
|
-
*
|
|
24
|
-
* @param {PostboyMiddleware} middleware - The middleware instance to be removed.
|
|
25
|
-
* @return {void} No return value.
|
|
26
|
-
*/
|
|
27
|
-
removeMiddleware(middleware) {
|
|
28
|
-
this.middlewares = this.middlewares.filter((m) => m !== middleware);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Manages the processing of a PostboyMessage by sequentially applying all middlewares.
|
|
32
|
-
*
|
|
33
|
-
* @param {PostboyMessage} msg - The message object to be processed by the middlewares.
|
|
34
|
-
* @return {void} - This method does not return any value.
|
|
35
|
-
*/
|
|
36
|
-
manage(msg) {
|
|
37
|
-
for (const item of this.middlewares)
|
|
38
|
-
item.handle(msg);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Disposes of the current object by clearing its middlewares array.
|
|
42
|
-
*
|
|
43
|
-
* @return {void} This method does not return a value.
|
|
44
|
-
*/
|
|
45
|
-
dispose() {
|
|
46
|
-
this.middlewares = [];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
exports.PostboyMiddlewareService = PostboyMiddlewareService;
|
|
50
|
-
//# sourceMappingURL=postboy-middleware.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postboy-middleware.service.js","sourceRoot":"","sources":["../../src/services/postboy-middleware.service.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH,MAAa,wBAAwB;IAArC;QACY,gBAAW,GAAwB,EAAE,CAAC;IAwClD,CAAC;IAtCC;;;;;OAKG;IACI,aAAa,CAAC,UAA6B;QAChD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,gBAAgB,CAAC,UAA6B;QACnD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC;IACtE,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,GAAmB;QAC/B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACI,OAAO;QACZ,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;IACxB,CAAC;CACF;AAzCD,4DAyCC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { PostboyAbstractRegistrator } from '../postboy-abstract.registrator';
|
|
2
|
-
import { PostboyService } from '../postboy.service';
|
|
3
|
-
/**
|
|
4
|
-
* Represents a store for managing namespaces in the Postboy system.
|
|
5
|
-
* Provides functionality to add, eliminate, and dispose namespaces.
|
|
6
|
-
*/
|
|
7
|
-
export declare class PostboyNamespaceStore {
|
|
8
|
-
private spaces;
|
|
9
|
-
/**
|
|
10
|
-
* Adds a new space or retrieves an existing one if it already exists.
|
|
11
|
-
*
|
|
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.
|
|
15
|
-
*/
|
|
16
|
-
addSpace(space: string, postboy: PostboyService): PostboyAbstractRegistrator;
|
|
17
|
-
/**
|
|
18
|
-
* Removes a specified space from the spaces collection if it exists.
|
|
19
|
-
* If the space exists, it will be deleted after invoking its down method.
|
|
20
|
-
*
|
|
21
|
-
* @param {string} space - The name of the space to be removed.
|
|
22
|
-
* @return {void} This method does not return a value.
|
|
23
|
-
*/
|
|
24
|
-
eliminateSpace(space: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Disposes of the current instance by performing cleanup operations.
|
|
27
|
-
* Iterates through all spaces, performs a "down" operation on each,
|
|
28
|
-
* and then clears the collection of spaces.
|
|
29
|
-
*
|
|
30
|
-
* @return {void} No return value.
|
|
31
|
-
*/
|
|
32
|
-
dispose(): void;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=postboy-namespace.store.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PostboyNamespaceStore = void 0;
|
|
4
|
-
const namespace_registrator_1 = require("./namespace-registrator");
|
|
5
|
-
/**
|
|
6
|
-
* Represents a store for managing namespaces in the Postboy system.
|
|
7
|
-
* Provides functionality to add, eliminate, and dispose namespaces.
|
|
8
|
-
*/
|
|
9
|
-
class PostboyNamespaceStore {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.spaces = new Map();
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Adds a new space or retrieves an existing one if it already exists.
|
|
15
|
-
*
|
|
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
|
-
*/
|
|
20
|
-
addSpace(space, postboy) {
|
|
21
|
-
if (this.spaces.has(space))
|
|
22
|
-
return this.spaces.get(space);
|
|
23
|
-
const registrator = new namespace_registrator_1.NamespaceRegistrator(postboy);
|
|
24
|
-
this.spaces.set(space, registrator);
|
|
25
|
-
return registrator;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Removes a specified space from the spaces collection if it exists.
|
|
29
|
-
* If the space exists, it will be deleted after invoking its down method.
|
|
30
|
-
*
|
|
31
|
-
* @param {string} space - The name of the space to be removed.
|
|
32
|
-
* @return {void} This method does not return a value.
|
|
33
|
-
*/
|
|
34
|
-
eliminateSpace(space) {
|
|
35
|
-
var _a;
|
|
36
|
-
if (!this.spaces.has(space))
|
|
37
|
-
return;
|
|
38
|
-
(_a = this.spaces.get(space)) === null || _a === void 0 ? void 0 : _a.down();
|
|
39
|
-
this.spaces.delete(space);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Disposes of the current instance by performing cleanup operations.
|
|
43
|
-
* Iterates through all spaces, performs a "down" operation on each,
|
|
44
|
-
* and then clears the collection of spaces.
|
|
45
|
-
*
|
|
46
|
-
* @return {void} No return value.
|
|
47
|
-
*/
|
|
48
|
-
dispose() {
|
|
49
|
-
this.spaces.forEach((space) => space.down());
|
|
50
|
-
this.spaces.clear();
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.PostboyNamespaceStore = PostboyNamespaceStore;
|
|
54
|
-
//# sourceMappingURL=postboy-namespace.store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { PostboyCallbackMessage } from '../../../models/postboy-callback.message';
|
|
2
|
-
export declare class TestCallbackMessage extends PostboyCallbackMessage<string> {
|
|
3
|
-
static ID: string;
|
|
4
|
-
type: typeof TestCallbackMessage;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=test-callback-message.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-callback-message.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-callback-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAElF,qBAAa,mBAAoB,SAAQ,sBAAsB,CAAC,MAAM,CAAC;IACrE,MAAM,CAAC,EAAE,SAA2B;IACpC,IAAI,6BAAuB;CAC5B"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestCallbackMessage = void 0;
|
|
4
|
-
const postboy_callback_message_1 = require("../../../models/postboy-callback.message");
|
|
5
|
-
class TestCallbackMessage extends postboy_callback_message_1.PostboyCallbackMessage {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = TestCallbackMessage;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.TestCallbackMessage = TestCallbackMessage;
|
|
12
|
-
TestCallbackMessage.ID = 'test-callback-message';
|
|
13
|
-
//# sourceMappingURL=test-callback-message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-callback-message.js","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-callback-message.ts"],"names":[],"mappings":";;;AAAA,uFAAkF;AAElF,MAAa,mBAAoB,SAAQ,iDAA8B;IAAvE;;QAEE,SAAI,GAAG,mBAAmB,CAAC;IAC7B,CAAC;;AAHD,kDAGC;AAFQ,sBAAE,GAAG,uBAAuB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PostboyGenericMessage } from '../../../models/postboy-generic-message';
|
|
2
|
-
export declare class TestExecutor extends PostboyGenericMessage {
|
|
3
|
-
value: string;
|
|
4
|
-
static readonly ID = "TestExecutor";
|
|
5
|
-
constructor(value: string);
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=test-executor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-executor.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,qBAAa,YAAa,SAAQ,qBAAqB;IAGlC,KAAK,EAAE,MAAM;IAFhC,MAAM,CAAC,QAAQ,CAAC,EAAE,kBAAkB;gBAEjB,KAAK,EAAE,MAAM;CAGjC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestExecutor = void 0;
|
|
4
|
-
const postboy_generic_message_1 = require("../../../models/postboy-generic-message");
|
|
5
|
-
class TestExecutor extends postboy_generic_message_1.PostboyGenericMessage {
|
|
6
|
-
constructor(value) {
|
|
7
|
-
super();
|
|
8
|
-
this.value = value;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.TestExecutor = TestExecutor;
|
|
12
|
-
TestExecutor.ID = 'TestExecutor';
|
|
13
|
-
//# sourceMappingURL=test-executor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-executor.js","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-executor.ts"],"names":[],"mappings":";;;AAAA,qFAAgF;AAEhF,MAAa,YAAa,SAAQ,+CAAqB;IAGrD,YAAmB,KAAa;QAC9B,KAAK,EAAE,CAAC;QADS,UAAK,GAAL,KAAK,CAAQ;IAEhC,CAAC;;AALH,oCAMC;AALiB,eAAE,GAAG,cAAc,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PostboyExecutionHandler } from '../../../models/postboy-execution.handler';
|
|
2
|
-
import { TestExecutor } from './test-executor';
|
|
3
|
-
export declare class TestHandler extends PostboyExecutionHandler<string, TestExecutor> {
|
|
4
|
-
toReturn: string;
|
|
5
|
-
constructor(toReturn: string);
|
|
6
|
-
handle(executor: TestExecutor): string;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=test-handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-handler.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,qBAAa,WAAY,SAAQ,uBAAuB,CAAC,MAAM,EAAE,YAAY,CAAC;IACzD,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM;IAInC,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM;CAGvC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestHandler = void 0;
|
|
4
|
-
const postboy_execution_handler_1 = require("../../../models/postboy-execution.handler");
|
|
5
|
-
class TestHandler extends postboy_execution_handler_1.PostboyExecutionHandler {
|
|
6
|
-
constructor(toReturn) {
|
|
7
|
-
super();
|
|
8
|
-
this.toReturn = toReturn;
|
|
9
|
-
}
|
|
10
|
-
handle(executor) {
|
|
11
|
-
return this.toReturn;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.TestHandler = TestHandler;
|
|
15
|
-
//# sourceMappingURL=test-handler.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-handler.js","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-handler.ts"],"names":[],"mappings":";;;AAAA,yFAAoF;AAGpF,MAAa,WAAY,SAAQ,mDAA6C;IAC5E,YAAmB,QAAgB;QACjC,KAAK,EAAE,CAAC;QADS,aAAQ,GAAR,QAAQ,CAAQ;IAEnC,CAAC;IAED,MAAM,CAAC,QAAsB;QAC3B,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;CACF;AARD,kCAQC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-message.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,qBAAa,WAAY,SAAQ,qBAAqB;IACpD,MAAM,CAAC,EAAE,SAAkB;IAC3B,IAAI,qBAAe;CACpB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestMessage = void 0;
|
|
4
|
-
const postboy_generic_message_1 = require("../../../models/postboy-generic-message");
|
|
5
|
-
class TestMessage extends postboy_generic_message_1.PostboyGenericMessage {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.type = TestMessage;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.TestMessage = TestMessage;
|
|
12
|
-
TestMessage.ID = 'test-message';
|
|
13
|
-
//# sourceMappingURL=test-message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-message.js","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-message.ts"],"names":[],"mappings":";;;AAAA,qFAAgF;AAEhF,MAAa,WAAY,SAAQ,+CAAqB;IAAtD;;QAEE,SAAI,GAAG,WAAW,CAAC;IACrB,CAAC;;AAHD,kCAGC;AAFQ,cAAE,GAAG,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-postboy.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-postboy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,qBAAa,WAAY,SAAQ,cAAc;CAAG"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestPostboy = void 0;
|
|
4
|
-
const postboy_service_1 = require("../../../postboy.service");
|
|
5
|
-
class TestPostboy extends postboy_service_1.PostboyService {
|
|
6
|
-
}
|
|
7
|
-
exports.TestPostboy = TestPostboy;
|
|
8
|
-
//# sourceMappingURL=test-postboy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-postboy.js","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-postboy.ts"],"names":[],"mappings":";;;AAAA,8DAA0D;AAE1D,MAAa,WAAY,SAAQ,gCAAc;CAAG;AAAlD,kCAAkD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PostboyAbstractRegistrator } from '../../../postboy-abstract.registrator';
|
|
2
|
-
import { TestPostboy } from './test-postboy';
|
|
3
|
-
export declare class TestReg extends PostboyAbstractRegistrator {
|
|
4
|
-
ups: ((r: this) => void)[];
|
|
5
|
-
constructor(postboy: TestPostboy);
|
|
6
|
-
protected _up(): void;
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=test-registry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-registry.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,qBAAa,OAAQ,SAAQ,0BAA0B;IACrD,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAC,EAAE,CAAM;gBAEpB,OAAO,EAAE,WAAW;IAIhC,SAAS,CAAC,GAAG,IAAI,IAAI;CAGtB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TestReg = void 0;
|
|
4
|
-
const postboy_abstract_registrator_1 = require("../../../postboy-abstract.registrator");
|
|
5
|
-
class TestReg extends postboy_abstract_registrator_1.PostboyAbstractRegistrator {
|
|
6
|
-
constructor(postboy) {
|
|
7
|
-
super(postboy);
|
|
8
|
-
this.ups = [];
|
|
9
|
-
}
|
|
10
|
-
_up() {
|
|
11
|
-
this.ups.forEach((up) => up(this));
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.TestReg = TestReg;
|
|
15
|
-
//# sourceMappingURL=test-registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test-registry.js","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-registry.ts"],"names":[],"mappings":";;;AAAA,wFAAmF;AAGnF,MAAa,OAAQ,SAAQ,yDAA0B;IAGrD,YAAY,OAAoB;QAC9B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHjB,QAAG,GAA0B,EAAE,CAAC;IAIhC,CAAC;IAES,GAAG;QACX,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACrC,CAAC;CACF;AAVD,0BAUC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id.generator.d.ts","sourceRoot":"","sources":["../../src/utils/id.generator.ts"],"names":[],"mappings":"AAAA,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,UAAU,CAAoD;WAE/D,GAAG,IAAI,MAAM;CAY5B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IdGenerator = void 0;
|
|
4
|
-
class IdGenerator {
|
|
5
|
-
static get() {
|
|
6
|
-
const result = [];
|
|
7
|
-
for (let i = 0; i < 7; i++) {
|
|
8
|
-
result.push(IdGenerator.collection
|
|
9
|
-
.sort(() => 0.5 - Math.random())
|
|
10
|
-
.slice(0, 5)
|
|
11
|
-
.join(''));
|
|
12
|
-
}
|
|
13
|
-
return result.join('-');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.IdGenerator = IdGenerator;
|
|
17
|
-
IdGenerator.collection = 'ABCDEFGHIJKLMNOPQRSTUVWXTZ0123456789'.split('');
|
|
18
|
-
//# sourceMappingURL=id.generator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id.generator.js","sourceRoot":"","sources":["../../src/utils/id.generator.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;IAGf,MAAM,CAAC,GAAG;QACf,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3B,MAAM,CAAC,IAAI,CACT,WAAW,CAAC,UAAU;iBACnB,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;iBAC/B,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;iBACX,IAAI,CAAC,EAAE,CAAC,CACZ,CAAC;QACJ,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;;AAdH,kCAeC;AAdgB,sBAAU,GAAG,sCAAsC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC"}
|