@artstesh/postboy 1.4.3 → 1.4.5
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/i-postboy-depending.service.d.ts +5 -0
- package/lib/i-postboy-depending.service.d.ts.map +1 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +10 -701
- package/lib/index.d.ts.map +1 -0
- package/lib/index.mjs +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-namespace.executor.d.ts +19 -0
- package/lib/messages/add-namespace.executor.d.ts.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-handler.executor.d.ts +25 -0
- package/lib/messages/connect-handler.executor.d.ts.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/disconnect-message.executor.d.ts +19 -0
- package/lib/messages/disconnect-message.executor.d.ts.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/index.d.ts +11 -0
- package/lib/messages/index.d.ts.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/remove-middleware.executor.d.ts +17 -0
- package/lib/messages/remove-middleware.executor.d.ts.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/models/index.d.ts +8 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/models/postboy-callback.message.d.ts +48 -0
- package/lib/models/postboy-callback.message.d.ts.map +1 -0
- package/lib/models/postboy-execution.handler.d.ts +21 -0
- package/lib/models/postboy-execution.handler.d.ts.map +1 -0
- package/lib/models/postboy-executor.d.ts +5 -0
- package/lib/models/postboy-executor.d.ts.map +1 -0
- package/lib/models/postboy-generic-message.d.ts +8 -0
- package/lib/models/postboy-generic-message.d.ts.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.context.d.ts +9 -0
- package/lib/models/postboy-message.context.d.ts.map +1 -0
- package/lib/models/postboy-middleware.d.ts +5 -0
- package/lib/models/postboy-middleware.d.ts.map +1 -0
- package/lib/models/postboy-subscription.d.ts +39 -0
- package/lib/models/postboy-subscription.d.ts.map +1 -0
- package/lib/models/postboy.message.d.ts +7 -0
- package/lib/models/postboy.message.d.ts.map +1 -0
- package/lib/models/postboy.settings.d.ts +13 -0
- package/lib/models/postboy.settings.d.ts.map +1 -0
- package/lib/postboy-abstract.registrator.d.ts +97 -0
- package/lib/postboy-abstract.registrator.d.ts.map +1 -0
- package/lib/postboy.service.d.ts +157 -0
- package/lib/postboy.service.d.ts.map +1 -0
- package/lib/services/index.d.ts +4 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/namespace-registrator.d.ts +14 -0
- package/lib/services/namespace-registrator.d.ts.map +1 -0
- 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-dependency.resolver.d.ts +32 -0
- package/lib/services/postboy-dependency.resolver.d.ts.map +1 -0
- package/lib/services/postboy-message.store.d.ts +20 -0
- package/lib/services/postboy-message.store.d.ts.map +1 -0
- package/lib/services/postboy-middleware.service.d.ts +37 -0
- package/lib/services/postboy-middleware.service.d.ts.map +1 -0
- package/lib/services/postboy-namespace.store.d.ts +34 -0
- package/lib/services/postboy-namespace.store.d.ts.map +1 -0
- package/lib/tests/integration/models/test-callback-message.d.ts +6 -0
- package/lib/tests/integration/models/test-callback-message.d.ts.map +1 -0
- package/lib/tests/integration/models/test-executor.d.ts +7 -0
- package/lib/tests/integration/models/test-executor.d.ts.map +1 -0
- package/lib/tests/integration/models/test-handler.d.ts +8 -0
- package/lib/tests/integration/models/test-handler.d.ts.map +1 -0
- package/lib/tests/integration/models/test-message.d.ts +6 -0
- package/lib/tests/integration/models/test-message.d.ts.map +1 -0
- package/lib/tests/integration/models/test-middleware.d.ts +7 -0
- package/lib/tests/integration/models/test-middleware.d.ts.map +1 -0
- package/lib/tests/integration/models/test-postboy.d.ts +4 -0
- package/lib/tests/integration/models/test-postboy.d.ts.map +1 -0
- package/lib/tests/integration/models/test-registry.d.ts +8 -0
- package/lib/tests/integration/models/test-registry.d.ts.map +1 -0
- package/lib/utils/id.generator.d.ts +5 -0
- package/lib/utils/id.generator.d.ts.map +1 -0
- package/package.json +2 -2
- package/lib/index.d.mts +0 -701
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { PostboyService } from './postboy.service';
|
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
|
3
|
+
import { IPostboyDependingService } from './i-postboy-depending.service';
|
|
4
|
+
import { PostboyExecutor } from './models/postboy-executor';
|
|
5
|
+
import { PostboyGenericMessage } from './models/postboy-generic-message';
|
|
6
|
+
import { PostboyExecutionHandler } from './models/postboy-execution.handler';
|
|
7
|
+
export type MessageType<T extends PostboyGenericMessage> = new (...args: any[]) => T;
|
|
8
|
+
export declare abstract class PostboyAbstractRegistrator {
|
|
9
|
+
protected postboy: PostboyService;
|
|
10
|
+
get namespace(): string;
|
|
11
|
+
private ids;
|
|
12
|
+
private services;
|
|
13
|
+
private readonly _namespace;
|
|
14
|
+
constructor(postboy: PostboyService, namespace?: string | null);
|
|
15
|
+
/**
|
|
16
|
+
* Registers a list of services to be used by the application.
|
|
17
|
+
*
|
|
18
|
+
* @param {IPostboyDependingService[]} services - An array of services to register.
|
|
19
|
+
* @return {void} This method does not return a value.
|
|
20
|
+
*/
|
|
21
|
+
registerServices(services: IPostboyDependingService[]): void;
|
|
22
|
+
/**
|
|
23
|
+
* Initiates the 'up' process for the current instance and all associated services.
|
|
24
|
+
*
|
|
25
|
+
* @return {void} Does not return a value.
|
|
26
|
+
*/
|
|
27
|
+
up(): void;
|
|
28
|
+
protected abstract _up(): void;
|
|
29
|
+
down(): void;
|
|
30
|
+
/**
|
|
31
|
+
* Records a type and its corresponding Subject<T> into the Postboy system and updates the internal identifiers.
|
|
32
|
+
*
|
|
33
|
+
* @param {MessageType<T>} type - A constructor for the generic message type T.
|
|
34
|
+
* @param {Subject<T>} sub - The subject associated with the generic message type.
|
|
35
|
+
* @return {this} Returns the current instance for method chaining.
|
|
36
|
+
*/
|
|
37
|
+
record<T extends PostboyGenericMessage>(type: MessageType<T>, sub: Subject<T>): PostboyAbstractRegistrator;
|
|
38
|
+
/**
|
|
39
|
+
* Records a message type with a specific subject and applies a transformation pipe to the subject.
|
|
40
|
+
*
|
|
41
|
+
* @param {MessageType<T>} type - The constructor of the message type to record, which extends PostboyGenericMessage.
|
|
42
|
+
* @param {Subject<T>} sub - The Subject instance to associate with the message type.
|
|
43
|
+
* @param {(s: Subject<T>) => Observable<T>} pipe - A function that takes the subject as input and returns an Observable with transformations applied.
|
|
44
|
+
* @return {this} The current instance of the class for chaining.
|
|
45
|
+
*/
|
|
46
|
+
recordWithPipe<T extends PostboyGenericMessage>(type: MessageType<T>, sub: Subject<T>, pipe: (s: Subject<T>) => Observable<T>): PostboyAbstractRegistrator;
|
|
47
|
+
/**
|
|
48
|
+
* Records an executor associated with a specific type and execution logic.
|
|
49
|
+
*
|
|
50
|
+
* @param type The class constructor of the executor type to be recorded, which extends PostboyExecutor.
|
|
51
|
+
* @param exec A callback function that executes the logic using an instance of the specified executor type.
|
|
52
|
+
* @return void
|
|
53
|
+
*/
|
|
54
|
+
recordExecutor<E extends PostboyExecutor<T>, T>(type: new (...args: any[]) => E, exec: (e: E) => T): PostboyAbstractRegistrator;
|
|
55
|
+
/**
|
|
56
|
+
* Records a handler for a specific executor type.
|
|
57
|
+
*
|
|
58
|
+
* @param executor The constructor of the executor type, which extends `PostboyExecutor`.
|
|
59
|
+
* @param handler The execution handler associated with the given executor type.
|
|
60
|
+
* @return void
|
|
61
|
+
*/
|
|
62
|
+
recordHandler<E extends PostboyExecutor<R>, R>(executor: new (...args: any[]) => E, handler: PostboyExecutionHandler<R, E>): PostboyAbstractRegistrator;
|
|
63
|
+
/**
|
|
64
|
+
* A utility function that facilitates the recording and replaying of messages
|
|
65
|
+
* using a ReplaySubject. This function is designed to handle messages of a
|
|
66
|
+
* specific type and allows specifying a buffer size to determine how many
|
|
67
|
+
* of the most recent messages should be replayed.
|
|
68
|
+
*
|
|
69
|
+
* @template T Extends the PostboyGenericMessage type, representing the type of message
|
|
70
|
+
* to be recorded and replayed.
|
|
71
|
+
* @param {MessageType<T>} type The constructor of the message type to be recorded and replayed.
|
|
72
|
+
* @param {number} [bufferSize=1] The number of recent messages to retain in the ReplaySubject's buffer.
|
|
73
|
+
* Defaults to 1 if not specified.
|
|
74
|
+
* @returns The result of invoking the `record` method with the given message type and configured ReplaySubject.
|
|
75
|
+
*/
|
|
76
|
+
recordReplay<T extends PostboyGenericMessage>(type: MessageType<T>, bufferSize?: number): PostboyAbstractRegistrator;
|
|
77
|
+
/**
|
|
78
|
+
* Represents a method that records a specific behavior associated with a message type.
|
|
79
|
+
* It creates a `BehaviorSubject` initialized with the provided initial message
|
|
80
|
+
* and associates it with the given message type using the `record` method.
|
|
81
|
+
*
|
|
82
|
+
* @template T - A type parameter extending `PostboyGenericMessage` that defines the message structure.
|
|
83
|
+
* @param {MessageType<T>} type - The constructor function of the message type to be recorded.
|
|
84
|
+
* @param {T} initial - The initial value of the message that will be set in the `BehaviorSubject`.
|
|
85
|
+
* @returns {void} - This function does not return a value; instead, it modifies the internal state.
|
|
86
|
+
*/
|
|
87
|
+
recordBehavior<T extends PostboyGenericMessage>(type: MessageType<T>, initial: T): PostboyAbstractRegistrator;
|
|
88
|
+
/**
|
|
89
|
+
* A function that creates and returns a new generic message recorder for a specific message type.
|
|
90
|
+
*
|
|
91
|
+
* @template T - A type parameter extending from `PostboyGenericMessage`.
|
|
92
|
+
* @param {MessageType<T>} type - The constructor for the message type being recorded.
|
|
93
|
+
* @returns {Subject<T>} A new instance of `Subject<T>` bound to the specified message type.
|
|
94
|
+
*/
|
|
95
|
+
recordSubject<T extends PostboyGenericMessage>(type: MessageType<T>): this;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=postboy-abstract.registrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postboy-abstract.registrator.d.ts","sourceRoot":"","sources":["../src/postboy-abstract.registrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAmB,UAAU,EAAuB,OAAO,EAAE,MAAM,MAAM,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAW,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAO7E,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,qBAAqB,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAErF,8BAAsB,0BAA0B;IAS5C,SAAS,CAAC,OAAO,EAAE,cAAc;IARnC,IAAI,SAAS,IAAI,MAAM,CAEtB;IACD,OAAO,CAAC,GAAG,CAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAGxB,OAAO,EAAE,cAAc,EACjC,SAAS,GAAE,MAAM,GAAG,IAAW;IAKjC;;;;;OAKG;IACI,gBAAgB,CAAC,QAAQ,EAAE,wBAAwB,EAAE,GAAG,IAAI;IAInE;;;;OAIG;IACI,EAAE,IAAI,IAAI;IAKjB,SAAS,CAAC,QAAQ,CAAC,GAAG,IAAI,IAAI;IAEvB,IAAI,IAAI,IAAI;IAMnB;;;;;;OAMG;IACI,MAAM,CAAC,CAAC,SAAS,qBAAqB,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,0BAA0B;IAMjH;;;;;;;OAOG;IACI,cAAc,CAAC,CAAC,SAAS,qBAAqB,EACnD,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EACpB,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,EACf,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,GACrC,0BAA0B;IAM7B;;;;;;OAMG;IACI,cAAc,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EACnD,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EAC/B,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAChB,0BAA0B;IAM7B;;;;;;OAMG;IACI,aAAa,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,EAClD,QAAQ,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,EACnC,OAAO,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,GACrC,0BAA0B;IAM7B;;;;;;;;;;;;OAYG;IACI,YAAY,CAAC,CAAC,SAAS,qBAAqB,EACjD,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EACpB,UAAU,SAAI,GACb,0BAA0B;IAK7B;;;;;;;;;OASG;IACI,cAAc,CAAC,CAAC,SAAS,qBAAqB,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,0BAA0B;IAKpH;;;;;;OAMG;IACI,aAAa,CAAC,CAAC,SAAS,qBAAqB,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;CAI3E"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import { PostboyGenericMessage } from './models/postboy-generic-message';
|
|
3
|
+
import { PostboyExecutor } from './models/postboy-executor';
|
|
4
|
+
import { PostboyCallbackMessage } from './models/postboy-callback.message';
|
|
5
|
+
import { MessageType, PostboyAbstractRegistrator } from './postboy-abstract.registrator';
|
|
6
|
+
import { PostboyExecutionHandler } from './models/postboy-execution.handler';
|
|
7
|
+
import { PostboyMiddleware } from './models/postboy-middleware';
|
|
8
|
+
import { PostboyDependencyResolver } from './services/postboy-dependency.resolver';
|
|
9
|
+
export declare class PostboyService {
|
|
10
|
+
protected locked: Set<string>;
|
|
11
|
+
private middleware;
|
|
12
|
+
private store;
|
|
13
|
+
private namespaceStore;
|
|
14
|
+
private dependencyResolver;
|
|
15
|
+
constructor(resolver?: PostboyDependencyResolver);
|
|
16
|
+
private registerInfrastructureMessages;
|
|
17
|
+
/**
|
|
18
|
+
* Locks a specific message type to prevent further modifications or actions.
|
|
19
|
+
*
|
|
20
|
+
* @deprecated The method should be replaced with firing {@link LockMessage} message.
|
|
21
|
+
* @param {MessageType<T>} type - The message type to be locked. It must extend from the `PostboyGenericMessage`.
|
|
22
|
+
* @return {void} This method does not return a value.
|
|
23
|
+
*/
|
|
24
|
+
lock<T extends PostboyGenericMessage>(type: MessageType<T>): void;
|
|
25
|
+
/**
|
|
26
|
+
* Unlocks a previously locked message type by removing its ID from the locked set.
|
|
27
|
+
*
|
|
28
|
+
* @deprecated The method should be replaced with firing {@link UnlockMessage} message.
|
|
29
|
+
* @param {MessageType<T>} type - The message type to unlock, which is a generic type extending PostboyGenericMessage.
|
|
30
|
+
* @return {void} This method does not return any value.
|
|
31
|
+
*/
|
|
32
|
+
unlock<T extends PostboyGenericMessage>(type: MessageType<T>): void;
|
|
33
|
+
/**
|
|
34
|
+
* Adds a middleware to the middleware stack.
|
|
35
|
+
*
|
|
36
|
+
* @deprecated The method should be replaced with firing {@link AddMiddleware} message.
|
|
37
|
+
* @param {PostboyMiddleware} middleware - The middleware instance to be added.
|
|
38
|
+
* @return {void}
|
|
39
|
+
*/
|
|
40
|
+
addMiddleware(middleware: PostboyMiddleware): void;
|
|
41
|
+
/**
|
|
42
|
+
* Removes a middleware from the current middleware stack.
|
|
43
|
+
*
|
|
44
|
+
* @deprecated The method should be replaced with firing {@link RemoveMiddleware} message.
|
|
45
|
+
* @param {PostboyMiddleware} middleware - The middleware instance to be removed.
|
|
46
|
+
* @return {void} No return value.
|
|
47
|
+
*/
|
|
48
|
+
removeMiddleware(middleware: PostboyMiddleware): void;
|
|
49
|
+
/**
|
|
50
|
+
* Unregisters a message identified by the given ID from the store.
|
|
51
|
+
*
|
|
52
|
+
* @deprecated The method should be replaced with firing {@link DisconnectMessage} message.
|
|
53
|
+
* @param {string} id - The unique identifier of the item to unregister.
|
|
54
|
+
* @return {void} No value is returned.
|
|
55
|
+
*/
|
|
56
|
+
unregister(id: string): void;
|
|
57
|
+
/**
|
|
58
|
+
* Fires a registered event and passes the message to its subscribers.
|
|
59
|
+
*
|
|
60
|
+
* @param {PostboyGenericMessage} message - The message object containing the event data.
|
|
61
|
+
* @return {void} This method does not return a value.
|
|
62
|
+
* @throws {Error} Throws an error if no registered event is found for the provided message ID.
|
|
63
|
+
*/
|
|
64
|
+
fire(message: PostboyGenericMessage): void;
|
|
65
|
+
/**
|
|
66
|
+
* Triggers a callback function associated with a given message.
|
|
67
|
+
*
|
|
68
|
+
* @param {PostboyCallbackMessage<T>} message - The message object used to trigger the callback.
|
|
69
|
+
* It contains details about the event and result subscription.
|
|
70
|
+
* @param {(e: T) => void} [action] - Optional callback function to execute when the result of the message is emitted.
|
|
71
|
+
* @return {void} This method does not return any value.
|
|
72
|
+
*/
|
|
73
|
+
fireCallback<T>(message: PostboyCallbackMessage<T>, action?: (e: T) => void): Observable<T>;
|
|
74
|
+
/**
|
|
75
|
+
* Executes the provided executor function and returns its result.
|
|
76
|
+
*
|
|
77
|
+
* @param {PostboyExecutor<T>} executor The executor to be executed, which includes its identifier and logic.
|
|
78
|
+
* @return {T} The resulting output from the executed executor function.
|
|
79
|
+
* @throws {Error} If the specified executor is not registered.
|
|
80
|
+
*/
|
|
81
|
+
exec<T>(executor: PostboyExecutor<T>): T;
|
|
82
|
+
/**
|
|
83
|
+
* Subscribes to a specific message type and returns an observable of that type.
|
|
84
|
+
*
|
|
85
|
+
* @param type The constructor function of the type that extends PostboyGenericMessage.
|
|
86
|
+
* @return An Observable of the specified generic message type.
|
|
87
|
+
*/
|
|
88
|
+
sub<T extends PostboyGenericMessage>(type: MessageType<T>): Observable<T>;
|
|
89
|
+
/**
|
|
90
|
+
* Subscribes to a specific message type and automatically unsubscribes after receiving the first message.
|
|
91
|
+
*
|
|
92
|
+
* @param type The type of message to subscribe to.
|
|
93
|
+
* @return An observable that emits the first message of the specified type and then completes.
|
|
94
|
+
*/
|
|
95
|
+
once<T extends PostboyGenericMessage>(type: MessageType<T>): Observable<T>;
|
|
96
|
+
/**
|
|
97
|
+
* Registers a given message type and its associated subject subscription with the system.
|
|
98
|
+
*
|
|
99
|
+
* @deprecated The method should be replaced with firing {@link ConnectMessage} message.
|
|
100
|
+
* @param type The constructor function of the message type that extends the PostboyGenericMessage.
|
|
101
|
+
* @param sub The Subject instance for the provided message type, used for managing subscriptions.
|
|
102
|
+
* @return {void} No return value.
|
|
103
|
+
*/
|
|
104
|
+
record<T extends PostboyGenericMessage>(type: MessageType<T>, sub: Subject<T>): void;
|
|
105
|
+
/**
|
|
106
|
+
* Registers a generic message type with a Subject and a transformation pipe.
|
|
107
|
+
*
|
|
108
|
+
* @deprecated The method should be replaced with firing {@link ConnectMessage} message.
|
|
109
|
+
* @param {MessageType<T>} type - The constructor of the message type being registered.
|
|
110
|
+
* @param {Subject<T>} sub - The Subject instance used to handle incoming messages of the specified type.
|
|
111
|
+
* @param {(s: Subject<T>) => Observable<T>} pipe - A function that applies a transformation or processing logic to the Subject and returns an Observable.
|
|
112
|
+
* @return {void} No return value.
|
|
113
|
+
*/
|
|
114
|
+
recordWithPipe<T extends PostboyGenericMessage>(type: MessageType<T>, sub: Subject<T>, pipe: (s: Subject<T>) => Observable<T>): void;
|
|
115
|
+
/**
|
|
116
|
+
* Registers an executor for a specified message type.
|
|
117
|
+
*
|
|
118
|
+
* @deprecated The method should be replaced with firing {@link ConnectExecutor} message.
|
|
119
|
+
* @param {MessageType<E>} type - The message type for which the executor is being registered.
|
|
120
|
+
* @param {(e: E) => T} exec - The executor function that will handle messages of the specified type.
|
|
121
|
+
* @return {void} This method does not return any value.
|
|
122
|
+
*/
|
|
123
|
+
recordExecutor<E extends PostboyExecutor<T>, T>(type: MessageType<E>, exec: (e: E) => T): void;
|
|
124
|
+
/**
|
|
125
|
+
* Registers a handler for a specific executor type.
|
|
126
|
+
*
|
|
127
|
+
* @deprecated The method should be replaced with firing {@link ConnectHandler} message.
|
|
128
|
+
* @param executor The constructor of the executor class that extends `PostboyExecutor<R>`.
|
|
129
|
+
* @param handler An instance of `PostboyExecutionHandler<R, E>` that defines the logic for handling the executor.
|
|
130
|
+
* @return void
|
|
131
|
+
*/
|
|
132
|
+
recordHandler<E extends PostboyExecutor<R>, R>(executor: new (...args: any[]) => E, handler: PostboyExecutionHandler<R, E>): void;
|
|
133
|
+
/**
|
|
134
|
+
* Adds a namespace to the namespace store.
|
|
135
|
+
*
|
|
136
|
+
* @deprecated The method should be replaced with firing {@link AddNamespace} message.
|
|
137
|
+
* @param {string} space - The name of the namespace to be added.
|
|
138
|
+
* @return {PostboyAbstractRegistrator} The instance of the namespace after adding the specified namespace.
|
|
139
|
+
*/
|
|
140
|
+
addNamespace(space: string): PostboyAbstractRegistrator;
|
|
141
|
+
/**
|
|
142
|
+
* Removes the specified namespace from the namespace store.
|
|
143
|
+
*
|
|
144
|
+
* @deprecated The method should be replaced with firing {@link EliminateNamespace} message.
|
|
145
|
+
* @param {string} space - The name of the namespace to be removed.
|
|
146
|
+
* @return {void} This method does not return a value.
|
|
147
|
+
*/
|
|
148
|
+
eliminateNamespace(space: string): void;
|
|
149
|
+
/**
|
|
150
|
+
* Disposes of resources and cleans up any internal components or stores associated with the instance.
|
|
151
|
+
* This method ensures that all resources are properly released to avoid memory leaks.
|
|
152
|
+
*
|
|
153
|
+
* @return {void} This method does not return a value.
|
|
154
|
+
*/
|
|
155
|
+
dispose(): void;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=postboy.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postboy.service.d.ts","sourceRoot":"","sources":["../src/postboy.service.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PostboyAbstractRegistrator } from '../postboy-abstract.registrator';
|
|
2
|
+
import { PostboyService } from '../postboy.service';
|
|
3
|
+
/**
|
|
4
|
+
* NamespaceRegistrator is a specialized class that extends PostboyAbstractRegistrator.
|
|
5
|
+
*
|
|
6
|
+
* @class NamespaceRegistrator
|
|
7
|
+
* @extends PostboyAbstractRegistrator
|
|
8
|
+
* @param {PostboyService} postboy - An instance of the PostboyService, used for managing registrations.
|
|
9
|
+
*/
|
|
10
|
+
export declare class NamespaceRegistrator extends PostboyAbstractRegistrator {
|
|
11
|
+
constructor(postboy: PostboyService);
|
|
12
|
+
protected _up(): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=namespace-registrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace-registrator.d.ts","sourceRoot":"","sources":["../../src/services/namespace-registrator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;GAMG;AACH,qBAAa,oBAAqB,SAAQ,0BAA0B;gBACtD,OAAO,EAAE,cAAc;IAInC,SAAS,CAAC,GAAG,IAAI,IAAI;CAGtB"}
|
|
@@ -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,32 @@
|
|
|
1
|
+
import { PostboyMiddlewareService } from './postboy-middleware.service';
|
|
2
|
+
import { PostboyMessageStore } from './postboy-message.store';
|
|
3
|
+
import { PostboyNamespaceStore } from './postboy-namespace.store';
|
|
4
|
+
export declare class PostboyDependencyResolver {
|
|
5
|
+
/**
|
|
6
|
+
* Retrieves an instance of the PostboyMiddlewareService.
|
|
7
|
+
*
|
|
8
|
+
* This function initializes and returns a new instance of the
|
|
9
|
+
* PostboyMiddlewareService, which can be used to configure and manage
|
|
10
|
+
* middleware for a specific module or application.
|
|
11
|
+
*
|
|
12
|
+
* @returns {PostboyMiddlewareService} A new instance of PostboyMiddlewareService.
|
|
13
|
+
*/
|
|
14
|
+
getMiddlewareService: () => PostboyMiddlewareService;
|
|
15
|
+
/**
|
|
16
|
+
* A function that instantiates and returns a new instance of PostboyMessageStore.
|
|
17
|
+
*
|
|
18
|
+
* This function serves as a factory method for creating instances
|
|
19
|
+
* of the PostboyMessageStore class.
|
|
20
|
+
*
|
|
21
|
+
* @returns {PostboyMessageStore} A new instance of the PostboyMessageStore class.
|
|
22
|
+
*/
|
|
23
|
+
getMessageStore: () => PostboyMessageStore;
|
|
24
|
+
/**
|
|
25
|
+
* Creates and initializes a new instance of PostboyNamespaceStore using the provided PostboyService instance.
|
|
26
|
+
*
|
|
27
|
+
* @function getNamespaceStore
|
|
28
|
+
* @returns {PostboyNamespaceStore} A new instance of PostboyNamespaceStore associated with the given PostboyService.
|
|
29
|
+
*/
|
|
30
|
+
getNamespaceStore: () => PostboyNamespaceStore;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=postboy-dependency.resolver.d.ts.map
|
|
@@ -0,0 +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;AAElE,qBAAa,yBAAyB;IACpC;;;;;;;;OAQG;IACH,oBAAoB,iCAAwC;IAC5D;;;;;;;OAOG;IACH,eAAe,4BAAmC;IAClD;;;;;OAKG;IACH,iBAAiB,8BAAqC;CACvD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PostboySubscription } from '../models/postboy-subscription';
|
|
2
|
+
import { PostboyExecutor } from '../models/postboy-executor';
|
|
3
|
+
import { PostboyCallbackMessage } from '../models/postboy-callback.message';
|
|
4
|
+
/**
|
|
5
|
+
* The PostboyMessageStore is a utility class for managing message subscriptions and executors.
|
|
6
|
+
* It provides functionality to register, retrieve, and unregister subscription-based messages and executors.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PostboyMessageStore {
|
|
9
|
+
protected messages: Map<string, PostboySubscription<any>>;
|
|
10
|
+
protected executors: Map<string, (e: PostboyExecutor<any>) => any>;
|
|
11
|
+
protected callbacks: Map<string, (() => void)[]>;
|
|
12
|
+
registerMessage(id: string, sub: PostboySubscription<any>): void;
|
|
13
|
+
registerExecutor(id: string, executor: (e: PostboyExecutor<any>) => any): void;
|
|
14
|
+
callbackFired(message: PostboyCallbackMessage<any>): void;
|
|
15
|
+
getMessage(id: string, name: string): PostboySubscription<any>;
|
|
16
|
+
getExecutor<T>(id: string): (e: PostboyExecutor<T>) => T;
|
|
17
|
+
unregister(id: string): void;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=postboy-message.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postboy-message.store.d.ts","sourceRoot":"","sources":["../../src/services/postboy-message.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,QAAQ,wCAA+C;IACjE,SAAS,CAAC,SAAS,kBAAuB,gBAAgB,GAAG,CAAC,KAAK,GAAG,EAAI;IAC1E,SAAS,CAAC,SAAS,qBAA0B,IAAI,KAAO;IAEjD,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAAG,IAAI;IAMhE,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,IAAI;IAMrF,aAAa,CAAC,OAAO,EAAE,sBAAsB,CAAC,GAAG,CAAC,GAAG,IAAI;IAOlD,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC;IAM9D,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,CAAC;IAMxD,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAQ5B,OAAO,IAAI,IAAI;CAOvB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PostboyExecutor } from '../../../models/postboy-executor';
|
|
2
|
+
export declare class TestExecutor<T> extends PostboyExecutor<T> {
|
|
3
|
+
value: string;
|
|
4
|
+
static readonly ID = "test-executor";
|
|
5
|
+
constructor(value: string);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=test-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-executor.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAEnE,qBAAa,YAAY,CAAC,CAAC,CAAE,SAAQ,eAAe,CAAC,CAAC,CAAC;IAGlC,KAAK,EAAE,MAAM;IAFhC,MAAM,CAAC,QAAQ,CAAC,EAAE,mBAAmB;gBAElB,KAAK,EAAE,MAAM;CAGjC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PostboyExecutionHandler } from '../../../models/postboy-execution.handler';
|
|
2
|
+
import { TestExecutor } from './test-executor';
|
|
3
|
+
export declare class TestHandler extends PostboyExecutionHandler<string, TestExecutor<any>> {
|
|
4
|
+
toReturn: string;
|
|
5
|
+
constructor(toReturn: string);
|
|
6
|
+
handle(executor: TestExecutor<any>): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=test-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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,GAAG,CAAC,CAAC;IAC9D,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM;IAInC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,GAAG,MAAM;CAG5C"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PostboyMiddleware } from '../../../models/postboy-middleware';
|
|
2
|
+
import { PostboyMessage } from '../../../models/postboy.message';
|
|
3
|
+
export declare class TestMiddleware implements PostboyMiddleware {
|
|
4
|
+
fired?: PostboyMessage;
|
|
5
|
+
handle(message: PostboyMessage): void;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=test-middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-middleware.d.ts","sourceRoot":"","sources":["../../../../src/tests/integration/models/test-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,qBAAa,cAAe,YAAW,iBAAiB;IACtD,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,MAAM,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CAGtC"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artstesh/postboy",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"author": "artstesh",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"version": "npm run format && git add -A src",
|
|
31
31
|
"postversion": "git push && git push --tags",
|
|
32
32
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
33
|
-
"typecheck": "tsc -p tsconfig.json
|
|
33
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
34
34
|
"lint": "eslint \"src/**/*.ts\" --fix",
|
|
35
35
|
"test": "jest --config jest.config.js",
|
|
36
36
|
"build": "tsup",
|