@wirestate/core 0.6.1 → 0.7.0-experimental.1
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/CHANGELOG.md +29 -1
- package/README.md +186 -232
- package/cjs/development/index.js +325 -91
- package/cjs/development/index.js.map +1 -1
- package/cjs/development/lib.js +1033 -248
- package/cjs/development/lib.js.map +1 -1
- package/cjs/development/test-utils.js +95 -32
- package/cjs/development/test-utils.js.map +1 -1
- package/cjs/production/index.js +1 -1
- package/cjs/production/index.js.map +1 -1
- package/cjs/production/lib.js +1 -1
- package/cjs/production/lib.js.map +1 -1
- package/cjs/production/test-utils.js +1 -1
- package/cjs/production/test-utils.js.map +1 -1
- package/esm/development/alias.js +10 -1
- package/esm/development/alias.js.map +1 -1
- package/esm/development/bind/bind-constant.js +25 -4
- package/esm/development/bind/bind-constant.js.map +1 -1
- package/esm/development/bind/bind-dynamic-value.js +27 -7
- package/esm/development/bind/bind-dynamic-value.js.map +1 -1
- package/esm/development/bind/bind-entry.js +50 -17
- package/esm/development/bind/bind-entry.js.map +1 -1
- package/esm/development/bind/bind-service.js +71 -19
- package/esm/development/bind/bind-service.js.map +1 -1
- package/esm/development/bind/get-entry-token.js +21 -5
- package/esm/development/bind/get-entry-token.js.map +1 -1
- package/esm/development/commands/command-bus.js +93 -46
- package/esm/development/commands/command-bus.js.map +1 -1
- package/esm/development/commands/command-optional.js +28 -5
- package/esm/development/commands/command-optional.js.map +1 -1
- package/esm/development/commands/command.js +26 -5
- package/esm/development/commands/command.js.map +1 -1
- package/esm/development/commands/get-command-handler-metadata.js +8 -3
- package/esm/development/commands/get-command-handler-metadata.js.map +1 -1
- package/esm/development/commands/on-command.js +19 -3
- package/esm/development/commands/on-command.js.map +1 -1
- package/esm/development/container/create-base-container.js +57 -0
- package/esm/development/container/create-base-container.js.map +1 -0
- package/esm/development/container/create-container.js +78 -0
- package/esm/development/container/create-container.js.map +1 -0
- package/esm/development/container/wire-scope.js +236 -54
- package/esm/development/container/wire-scope.js.map +1 -1
- package/esm/development/error/error-code.js +2 -1
- package/esm/development/error/error-code.js.map +1 -1
- package/esm/development/error/wirestate-error.js +25 -4
- package/esm/development/error/wirestate-error.js.map +1 -1
- package/esm/development/events/build-event-dispatcher.js +20 -2
- package/esm/development/events/build-event-dispatcher.js.map +1 -1
- package/esm/development/events/emit-event.js +18 -5
- package/esm/development/events/emit-event.js.map +1 -1
- package/esm/development/events/event-bus.js +58 -9
- package/esm/development/events/event-bus.js.map +1 -1
- package/esm/development/events/get-event-handler-metadata.js +19 -4
- package/esm/development/events/get-event-handler-metadata.js.map +1 -1
- package/esm/development/events/on-event.js +31 -2
- package/esm/development/events/on-event.js.map +1 -1
- package/esm/development/index.js +5 -4
- package/esm/development/index.js.map +1 -1
- package/esm/development/queries/get-query-handler-metadata.js +20 -4
- package/esm/development/queries/get-query-handler-metadata.js.map +1 -1
- package/esm/development/queries/on-query.js +24 -2
- package/esm/development/queries/on-query.js.map +1 -1
- package/esm/development/queries/query-bus.js +82 -31
- package/esm/development/queries/query-bus.js.map +1 -1
- package/esm/development/queries/query-optional.js +19 -5
- package/esm/development/queries/query-optional.js.map +1 -1
- package/esm/development/queries/query.js +25 -5
- package/esm/development/queries/query.js.map +1 -1
- package/esm/development/registry.js +81 -24
- package/esm/development/registry.js.map +1 -1
- package/esm/development/seeds/apply-seeds.js +19 -5
- package/esm/development/seeds/apply-seeds.js.map +1 -1
- package/esm/development/seeds/apply-shared-seed.js +16 -4
- package/esm/development/seeds/apply-shared-seed.js.map +1 -1
- package/esm/development/seeds/tokens.js +31 -0
- package/esm/development/seeds/tokens.js.map +1 -0
- package/esm/development/seeds/unapply-seeds.js +16 -5
- package/esm/development/seeds/unapply-seeds.js.map +1 -1
- package/esm/development/service/get-activated-handler-metadata.js +16 -4
- package/esm/development/service/get-activated-handler-metadata.js.map +1 -1
- package/esm/development/service/get-deactivation-handler-metadata.js +16 -4
- package/esm/development/service/get-deactivation-handler-metadata.js.map +1 -1
- package/esm/development/service/on-activated.js +22 -2
- package/esm/development/service/on-activated.js.map +1 -1
- package/esm/development/service/on-deactivation.js +22 -2
- package/esm/development/service/on-deactivation.js.map +1 -1
- package/esm/development/test-utils/mock-bind-entry.js +17 -7
- package/esm/development/test-utils/mock-bind-entry.js.map +1 -1
- package/esm/development/test-utils/mock-bind-service.js +17 -7
- package/esm/development/test-utils/mock-bind-service.js.map +1 -1
- package/esm/development/test-utils/mock-container.js +25 -8
- package/esm/development/test-utils/mock-container.js.map +1 -1
- package/esm/development/test-utils/mock-service.js +18 -5
- package/esm/development/test-utils/mock-service.js.map +1 -1
- package/esm/development/test-utils/mock-unbind-service.js +16 -3
- package/esm/development/test-utils/mock-unbind-service.js.map +1 -1
- package/esm/development/types/commands.js +6 -1
- package/esm/development/types/commands.js.map +1 -1
- package/esm/production/alias.js +1 -1
- package/esm/production/alias.js.map +1 -1
- package/esm/production/bind/bind-constant.js +1 -1
- package/esm/production/bind/bind-constant.js.map +1 -1
- package/esm/production/bind/bind-dynamic-value.js +1 -1
- package/esm/production/bind/bind-dynamic-value.js.map +1 -1
- package/esm/production/bind/bind-entry.js +1 -1
- package/esm/production/bind/bind-entry.js.map +1 -1
- package/esm/production/bind/bind-service.js.map +1 -1
- package/esm/production/bind/get-entry-token.js.map +1 -1
- package/esm/production/commands/command-bus.js +1 -1
- package/esm/production/commands/command-bus.js.map +1 -1
- package/esm/production/commands/command-optional.js.map +1 -1
- package/esm/production/commands/command.js.map +1 -1
- package/esm/production/commands/get-command-handler-metadata.js.map +1 -1
- package/esm/production/commands/on-command.js.map +1 -1
- package/esm/production/container/create-base-container.js +1 -0
- package/esm/production/container/create-base-container.js.map +1 -0
- package/esm/production/container/create-container.js +1 -0
- package/esm/production/container/create-container.js.map +1 -0
- package/esm/production/container/wire-scope.js +1 -1
- package/esm/production/container/wire-scope.js.map +1 -1
- package/esm/production/error/error-code.js +1 -1
- package/esm/production/error/error-code.js.map +1 -1
- package/esm/production/error/wirestate-error.js.map +1 -1
- package/esm/production/events/build-event-dispatcher.js.map +1 -1
- package/esm/production/events/emit-event.js.map +1 -1
- package/esm/production/events/event-bus.js +1 -1
- package/esm/production/events/event-bus.js.map +1 -1
- package/esm/production/events/get-event-handler-metadata.js.map +1 -1
- package/esm/production/events/on-event.js.map +1 -1
- package/esm/production/index.js +1 -1
- package/esm/production/queries/get-query-handler-metadata.js.map +1 -1
- package/esm/production/queries/on-query.js.map +1 -1
- package/esm/production/queries/query-bus.js +1 -1
- package/esm/production/queries/query-bus.js.map +1 -1
- package/esm/production/queries/query-optional.js.map +1 -1
- package/esm/production/queries/query.js.map +1 -1
- package/esm/production/registry.js +1 -1
- package/esm/production/registry.js.map +1 -1
- package/esm/production/seeds/apply-seeds.js +1 -1
- package/esm/production/seeds/apply-seeds.js.map +1 -1
- package/esm/production/seeds/apply-shared-seed.js +1 -1
- package/esm/production/seeds/apply-shared-seed.js.map +1 -1
- package/esm/production/seeds/tokens.js +1 -0
- package/esm/production/seeds/tokens.js.map +1 -0
- package/esm/production/seeds/unapply-seeds.js +1 -1
- package/esm/production/seeds/unapply-seeds.js.map +1 -1
- package/esm/production/service/get-activated-handler-metadata.js.map +1 -1
- package/esm/production/service/get-deactivation-handler-metadata.js.map +1 -1
- package/esm/production/service/on-activated.js.map +1 -1
- package/esm/production/service/on-deactivation.js.map +1 -1
- package/esm/production/test-utils/mock-bind-entry.js +1 -1
- package/esm/production/test-utils/mock-bind-entry.js.map +1 -1
- package/esm/production/test-utils/mock-bind-service.js +1 -1
- package/esm/production/test-utils/mock-bind-service.js.map +1 -1
- package/esm/production/test-utils/mock-container.js +1 -1
- package/esm/production/test-utils/mock-container.js.map +1 -1
- package/esm/production/test-utils/mock-service.js.map +1 -1
- package/esm/production/test-utils/mock-unbind-service.js.map +1 -1
- package/esm/production/types/commands.js.map +1 -1
- package/index.d.ts +1159 -229
- package/lib.d.ts +128 -9
- package/package.json +1 -2
- package/test-utils.d.ts +140 -40
- package/esm/development/container/create-ioc-container.js +0 -35
- package/esm/development/container/create-ioc-container.js.map +0 -1
- package/esm/production/container/create-ioc-container.js +0 -1
- package/esm/production/container/create-ioc-container.js.map +0 -1
package/cjs/development/index.js
CHANGED
|
@@ -1,50 +1,119 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var inversify = require('inversify');
|
|
4
|
-
var
|
|
4
|
+
var createContainer = require('./lib.js');
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Util to resolve circular dependencies by wrapping the service identifier in a lazy identifier.
|
|
9
|
+
*
|
|
10
|
+
* @group External-inversify
|
|
11
|
+
* @see {@link https://inversify.io/}
|
|
12
|
+
*
|
|
13
|
+
* @param forward - A function that returns the service identifier.
|
|
14
|
+
* @returns A lazy service identifier.
|
|
15
|
+
*/
|
|
7
16
|
function forwardRef(forward) {
|
|
8
17
|
return new inversify.LazyServiceIdentifier(forward);
|
|
9
18
|
}
|
|
10
19
|
|
|
11
20
|
/**
|
|
12
|
-
* Dispatches a command
|
|
21
|
+
* Dispatches a command through the {@link CommandBus} resolved from the container.
|
|
22
|
+
*
|
|
23
|
+
* @remarks
|
|
24
|
+
* This is a convenience wrapper around the `CommandBus.command` method.
|
|
25
|
+
* Commands allow for decoupled communication between services.
|
|
26
|
+
*
|
|
27
|
+
* @group Commands
|
|
28
|
+
*
|
|
29
|
+
* @template R - Type of the expected result from the command execution.
|
|
30
|
+
* @template D - Type of the data (payload) passed to the command.
|
|
31
|
+
* @template T - Type of the command identifier.
|
|
32
|
+
*
|
|
33
|
+
* @param container - Inversify {@link Container} to resolve the {@link CommandBus} from.
|
|
34
|
+
* @param type - Unique identifier of the command to dispatch.
|
|
35
|
+
* @param data - Optional payload for the command handler.
|
|
36
|
+
* @returns A descriptor to track the command execution and result.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```typescript
|
|
40
|
+
* const descriptor = command<User, UserFindParameters>(
|
|
41
|
+
* container,
|
|
42
|
+
* "FIND_USER",
|
|
43
|
+
* { id: "123" }
|
|
44
|
+
* );
|
|
13
45
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @param data - command data
|
|
17
|
-
* @returns command descriptor
|
|
46
|
+
* const user: User = await descriptor.task;
|
|
47
|
+
* ```
|
|
18
48
|
*/
|
|
19
49
|
function command(container, type, data) {
|
|
20
|
-
return container.get(
|
|
50
|
+
return container.get(createContainer.CommandBus).command(type, data);
|
|
21
51
|
}
|
|
22
52
|
|
|
23
53
|
/**
|
|
24
|
-
* Dispatches a command
|
|
54
|
+
* Dispatches a command through the {@link CommandBus} resolved from the container, returning null if no handler exists.
|
|
25
55
|
*
|
|
26
|
-
* @
|
|
27
|
-
*
|
|
28
|
-
* @
|
|
29
|
-
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* This is a convenience wrapper around the `CommandBus.commandOptional` method.
|
|
58
|
+
* Unlike {@link command}, it does not throw if no handler is registered.
|
|
59
|
+
*
|
|
60
|
+
* @group Commands
|
|
61
|
+
*
|
|
62
|
+
* @template R - Type of the expected result from the command execution.
|
|
63
|
+
* @template D - Type of the data (payload) passed to the command.
|
|
64
|
+
* @template T - Type of the command identifier.
|
|
65
|
+
*
|
|
66
|
+
* @param container - Inversify {@link Container} to resolve the {@link CommandBus} from.
|
|
67
|
+
* @param type - Unique identifier of the command to dispatch.
|
|
68
|
+
* @param data - Optional payload for the command handler.
|
|
69
|
+
* @returns A {@link CommandDescriptor} if a handler was found, or `null` otherwise.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* const descriptor = commandOptional<User, FindUserOptions>(
|
|
74
|
+
* container,
|
|
75
|
+
* "FIND_USER",
|
|
76
|
+
* { id: "123" }
|
|
77
|
+
* );
|
|
78
|
+
*
|
|
79
|
+
* if (descriptor) {
|
|
80
|
+
* const user: User = await descriptor.task;
|
|
81
|
+
* }
|
|
82
|
+
* ```
|
|
30
83
|
*/
|
|
31
84
|
function commandOptional(container, type, data) {
|
|
32
|
-
return container.get(
|
|
85
|
+
return container.get(createContainer.CommandBus).commandOptional(type, data);
|
|
33
86
|
}
|
|
34
87
|
|
|
35
88
|
/**
|
|
36
|
-
* Decorator for service methods that handle a command.
|
|
89
|
+
* Decorator for service methods that handle a specific command.
|
|
37
90
|
*
|
|
38
|
-
* @
|
|
39
|
-
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* Methods decorated with `@OnCommand` are automatically registered as command handlers
|
|
93
|
+
* when the service is bound via {@link bindService}.
|
|
94
|
+
*
|
|
95
|
+
* @group Commands
|
|
96
|
+
*
|
|
97
|
+
* @param type - Unique identifier of the command to handle.
|
|
98
|
+
* @returns A method decorator function.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* class UserService {
|
|
103
|
+
* @OnCommand("USER_LOGIN")
|
|
104
|
+
* private onUserLogin(credentials: Credentials): Promise<Session> {
|
|
105
|
+
* return auth.login(credentials);
|
|
106
|
+
* }
|
|
107
|
+
* }
|
|
108
|
+
* ```
|
|
40
109
|
*/
|
|
41
110
|
function OnCommand(type) {
|
|
42
111
|
return function (target, propertyKey) {
|
|
43
112
|
var constructor = target.constructor;
|
|
44
|
-
var list =
|
|
113
|
+
var list = createContainer.COMMAND_HANDLER_METADATA.get(constructor);
|
|
45
114
|
if (!list) {
|
|
46
115
|
list = [];
|
|
47
|
-
|
|
116
|
+
createContainer.COMMAND_HANDLER_METADATA.set(constructor, list);
|
|
48
117
|
}
|
|
49
118
|
// Register handler metadata for prototype-based retrieval.
|
|
50
119
|
list.push({
|
|
@@ -55,15 +124,28 @@ function OnCommand(type) {
|
|
|
55
124
|
}
|
|
56
125
|
|
|
57
126
|
/**
|
|
58
|
-
*
|
|
127
|
+
* Broadcasts an event to all subscribers via the {@link EventBus} resolved from the container.
|
|
128
|
+
*
|
|
129
|
+
* @remarks
|
|
130
|
+
* Use this utility to emit events from outside a service's {@link WireScope} (e.g., from a bootstrap script or external controller).
|
|
59
131
|
*
|
|
60
|
-
* @
|
|
61
|
-
*
|
|
62
|
-
* @
|
|
63
|
-
* @
|
|
132
|
+
* @group Events
|
|
133
|
+
*
|
|
134
|
+
* @template P - Type of the event payload.
|
|
135
|
+
* @template T - Type of the event identifier.
|
|
136
|
+
*
|
|
137
|
+
* @param container - Inversify {@link Container} to resolve the {@link EventBus} from.
|
|
138
|
+
* @param type - Unique event identifier.
|
|
139
|
+
* @param payload - Optional data associated with the event.
|
|
140
|
+
* @param from - Optional source identifier.
|
|
141
|
+
*
|
|
142
|
+
* @example
|
|
143
|
+
* ```typescript
|
|
144
|
+
* emitEvent(container, "SYSTEM_READY", { version: "1.0.0" });
|
|
145
|
+
* ```
|
|
64
146
|
*/
|
|
65
147
|
function emitEvent(container, type, payload, from) {
|
|
66
|
-
container.get(
|
|
148
|
+
container.get(createContainer.EventBus).emit({
|
|
67
149
|
type: type,
|
|
68
150
|
payload: payload,
|
|
69
151
|
from: from
|
|
@@ -73,18 +155,47 @@ function emitEvent(container, type, payload, from) {
|
|
|
73
155
|
/**
|
|
74
156
|
* Decorator for service methods that respond to events.
|
|
75
157
|
*
|
|
76
|
-
* @
|
|
77
|
-
*
|
|
158
|
+
* @remarks
|
|
159
|
+
* Methods decorated with `@OnEvent` are automatically registered as subscribers
|
|
160
|
+
* when the service is bound via {@link bindService}.
|
|
161
|
+
*
|
|
162
|
+
* You can specify one or more event types to handle. If `types` is omitted,
|
|
163
|
+
* the method acts as a catch-all handler for all events broadcasted to the {@link EventBus}.
|
|
164
|
+
*
|
|
165
|
+
* @group Events
|
|
166
|
+
*
|
|
167
|
+
* @param types - Event identifier(s) to handle. If omitted, handles all events.
|
|
168
|
+
* @returns Method decorator.
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* class MyService {
|
|
173
|
+
* @OnEvent("USER_LOGGED_IN")
|
|
174
|
+
* private onLogin(event: Event<User>): void {
|
|
175
|
+
* console.log("User logged in:", event);
|
|
176
|
+
* }
|
|
177
|
+
*
|
|
178
|
+
* @OnEvent(["LOGOUT", "SESSION_EXPIRED"])
|
|
179
|
+
* private onSessionEnd(event: Event): void {
|
|
180
|
+
* console.log("Specific event received:", event);
|
|
181
|
+
* }
|
|
182
|
+
*
|
|
183
|
+
* @OnEvent()
|
|
184
|
+
* private onAnyEvent(event: Event): void {
|
|
185
|
+
* // Catch-all handler
|
|
186
|
+
* }
|
|
187
|
+
* }
|
|
188
|
+
* ```
|
|
78
189
|
*/
|
|
79
190
|
function OnEvent(types) {
|
|
80
191
|
// Normalize types to an array or null for catch-all.
|
|
81
192
|
var normalized = types === undefined ? null : Array.isArray(types) ? tslib.__spreadArray([], types, true) : [types];
|
|
82
193
|
return function (target, propertyKey) {
|
|
83
194
|
var constructor = target.constructor;
|
|
84
|
-
var list =
|
|
195
|
+
var list = createContainer.EVENT_HANDLER_METADATA.get(constructor);
|
|
85
196
|
if (!list) {
|
|
86
197
|
list = [];
|
|
87
|
-
|
|
198
|
+
createContainer.EVENT_HANDLER_METADATA.set(constructor, list);
|
|
88
199
|
}
|
|
89
200
|
// Register handler metadata for prototype-based retrieval.
|
|
90
201
|
list.push({
|
|
@@ -95,42 +206,98 @@ function OnEvent(types) {
|
|
|
95
206
|
}
|
|
96
207
|
|
|
97
208
|
/**
|
|
98
|
-
* Dispatches a query
|
|
209
|
+
* Dispatches a query through the {@link QueryBus} resolved from the container.
|
|
99
210
|
*
|
|
100
|
-
* @
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
211
|
+
* @remarks
|
|
212
|
+
* This is a convenience wrapper around the `QueryBus.query` method.
|
|
213
|
+
* Queries allow for decoupled request-response communication between services.
|
|
214
|
+
*
|
|
215
|
+
* @group Queries
|
|
216
|
+
*
|
|
217
|
+
* @template R - Type of the expected query result.
|
|
218
|
+
* @template D - Type of the input data (payload).
|
|
219
|
+
*
|
|
220
|
+
* @param container - Inversify {@link Container} to resolve the {@link QueryBus} from.
|
|
221
|
+
* @param type - Unique query identifier.
|
|
222
|
+
* @param data - Optional input data for the query handler.
|
|
223
|
+
* @returns The query result (can be a Promise).
|
|
224
|
+
*
|
|
225
|
+
* @throws {@link WirestateError} If no query handler is registered.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```typescript
|
|
229
|
+
* const result: string = await query<string, FindUserParameters>(
|
|
230
|
+
* container,
|
|
231
|
+
* "GET_USER_NAME",
|
|
232
|
+
* { id: 123 }
|
|
233
|
+
* );
|
|
234
|
+
* ```
|
|
104
235
|
*/
|
|
105
236
|
function query(container, type, data) {
|
|
106
|
-
return container.get(
|
|
237
|
+
return container.get(createContainer.QueryBus).query(type, data);
|
|
107
238
|
}
|
|
108
239
|
|
|
109
240
|
/**
|
|
110
|
-
* Dispatches a query
|
|
241
|
+
* Dispatches a query through the {@link QueryBus}, returning null if no handler is registered.
|
|
242
|
+
*
|
|
243
|
+
* @remarks
|
|
244
|
+
* This is a convenience wrapper around the `QueryBus.queryOptional` method.
|
|
245
|
+
* Use this when the query resolution is optional and you want to avoid catching errors.
|
|
246
|
+
*
|
|
247
|
+
* @group Queries
|
|
248
|
+
*
|
|
249
|
+
* @template R - Type of the expected query result.
|
|
250
|
+
* @template D - Type of the input data (payload).
|
|
251
|
+
*
|
|
252
|
+
* @param container - Inversify {@link Container} to resolve the {@link QueryBus} from.
|
|
253
|
+
* @param type - Unique query identifier.
|
|
254
|
+
* @param data - Optional input data for the query handler.
|
|
255
|
+
* @returns The query result or `null` if no handler exists.
|
|
111
256
|
*
|
|
112
|
-
* @
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
257
|
+
* @example
|
|
258
|
+
* ```typescript
|
|
259
|
+
* const config: Config | null = await queryOptional<Config>(container, "GET_OPTIONAL_CONFIG");
|
|
260
|
+
* ```
|
|
116
261
|
*/
|
|
117
262
|
function queryOptional(container, type, data) {
|
|
118
|
-
return container.get(
|
|
263
|
+
return container.get(createContainer.QueryBus).queryOptional(type, data);
|
|
119
264
|
}
|
|
120
265
|
|
|
121
266
|
/**
|
|
122
267
|
* Decorator for service methods that respond to a query.
|
|
123
268
|
*
|
|
124
|
-
* @
|
|
125
|
-
*
|
|
269
|
+
* @remarks
|
|
270
|
+
* Methods decorated with `@OnQuery` are automatically registered as query handlers
|
|
271
|
+
* when the service is bound via {@link bindService}.
|
|
272
|
+
*
|
|
273
|
+
* Unlike events, queries MUST be handled by exactly one handler. If multiple handlers
|
|
274
|
+
* are registered for the same query type, the most recent one (usually the most
|
|
275
|
+
* specific in terms of class hierarchy or registration order) will shadow the others.
|
|
276
|
+
*
|
|
277
|
+
* @group Queries
|
|
278
|
+
*
|
|
279
|
+
* @param type - Unique query identifier to handle.
|
|
280
|
+
* @returns Method decorator.
|
|
281
|
+
*
|
|
282
|
+
* @example
|
|
283
|
+
* ```typescript
|
|
284
|
+
* class UserProfileService {
|
|
285
|
+
* @OnQuery("GET_USER_AVATAR")
|
|
286
|
+
* private async onGetUserAvatar(userId: string): Promise<string> {
|
|
287
|
+
* const user: User = await this.userRepository.findById(userId);
|
|
288
|
+
*
|
|
289
|
+
* return user.avatarUrl;
|
|
290
|
+
* }
|
|
291
|
+
* }
|
|
292
|
+
* ```
|
|
126
293
|
*/
|
|
127
294
|
function OnQuery(type) {
|
|
128
295
|
return function (target, propertyKey) {
|
|
129
296
|
var constructor = target.constructor;
|
|
130
|
-
var list =
|
|
297
|
+
var list = createContainer.QUERY_HANDLER_METADATA.get(constructor);
|
|
131
298
|
if (!list) {
|
|
132
299
|
list = [];
|
|
133
|
-
|
|
300
|
+
createContainer.QUERY_HANDLER_METADATA.set(constructor, list);
|
|
134
301
|
}
|
|
135
302
|
// Register handler metadata for prototype-based retrieval.
|
|
136
303
|
list.push({
|
|
@@ -141,41 +308,47 @@ function OnQuery(type) {
|
|
|
141
308
|
}
|
|
142
309
|
|
|
143
310
|
/**
|
|
144
|
-
*
|
|
145
|
-
* This allows multiple providers to co-exist without wiping each other's seeds.
|
|
311
|
+
* Rebinds the global shared seed object in the container.
|
|
146
312
|
*
|
|
147
|
-
* @
|
|
148
|
-
*
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
var _a = seeds_1[_i],
|
|
154
|
-
key = _a[0],
|
|
155
|
-
state = _a[1];
|
|
156
|
-
existing.set(key, state);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Applies shared seed to the container.
|
|
313
|
+
* @remarks
|
|
314
|
+
* Unlike targeted seeds, there is only one shared seed object per container.
|
|
315
|
+
* This function uses `rebind` to ensure the new shared seed replaces the previous one.
|
|
316
|
+
* The shared seed is typically used for global configuration or common state.
|
|
317
|
+
*
|
|
318
|
+
* @group Seeds
|
|
162
319
|
*
|
|
163
|
-
* @param container -
|
|
164
|
-
* @param seed - shared seed object
|
|
320
|
+
* @param container - The Inversify {@link Container} to update.
|
|
321
|
+
* @param seed - The new shared seed object.
|
|
322
|
+
*
|
|
323
|
+
* @example
|
|
324
|
+
* ```typescript
|
|
325
|
+
* applySharedSeed(container, { theme: "dark", lang: "en" });
|
|
326
|
+
* ```
|
|
165
327
|
*/
|
|
166
328
|
function applySharedSeed(container, seed) {
|
|
167
|
-
container.rebind(
|
|
329
|
+
container.rebind(createContainer.SEED_TOKEN).toConstantValue(seed);
|
|
168
330
|
}
|
|
169
331
|
|
|
170
332
|
/**
|
|
171
|
-
* Removes specific seeds from the container.
|
|
172
|
-
*
|
|
333
|
+
* Removes specific targeted seeds from the container's internal seed map.
|
|
334
|
+
*
|
|
335
|
+
* @remarks
|
|
336
|
+
* This is typically called during provider unmounting to ensure that only
|
|
337
|
+
* the seeds owned by that specific provider are removed, leaving other
|
|
338
|
+
* providers' seeds intact.
|
|
173
339
|
*
|
|
174
|
-
* @
|
|
175
|
-
*
|
|
340
|
+
* @group Seeds
|
|
341
|
+
*
|
|
342
|
+
* @param container - The Inversify {@link Container} to clean up.
|
|
343
|
+
* @param seeds - The targeted {@link SeedEntries} to remove.
|
|
344
|
+
*
|
|
345
|
+
* @example
|
|
346
|
+
* ```typescript
|
|
347
|
+
* unapplySeeds(container, [[UserService, { initialUser: "admin" }]]);
|
|
348
|
+
* ```
|
|
176
349
|
*/
|
|
177
350
|
function unapplySeeds(container, seeds) {
|
|
178
|
-
var existing = container.get(
|
|
351
|
+
var existing = container.get(createContainer.SEEDS_TOKEN);
|
|
179
352
|
for (var _i = 0, seeds_1 = seeds; _i < seeds_1.length; _i++) {
|
|
180
353
|
var key = seeds_1[_i][0];
|
|
181
354
|
existing.delete(key);
|
|
@@ -183,34 +356,74 @@ function unapplySeeds(container, seeds) {
|
|
|
183
356
|
}
|
|
184
357
|
|
|
185
358
|
/**
|
|
186
|
-
* Decorator for service methods that
|
|
359
|
+
* Decorator for service methods that should be executed after the service instance is activated.
|
|
360
|
+
*
|
|
361
|
+
* @remarks
|
|
362
|
+
* Methods decorated with `@OnActivated` are automatically invoked when the service
|
|
363
|
+
* is resolved from the container and its activation lifecycle hook is triggered.
|
|
364
|
+
*
|
|
365
|
+
* It is commonly used for initial setup, subscribing to events, or starting background tasks.
|
|
366
|
+
* Multiple `@OnActivated` methods can exist in the same class hierarchy; they are executed
|
|
367
|
+
* in parent-to-child order.
|
|
187
368
|
*
|
|
188
|
-
* @
|
|
369
|
+
* @group Service
|
|
370
|
+
*
|
|
371
|
+
* @returns A method decorator function.
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```typescript
|
|
375
|
+
* class MyService {
|
|
376
|
+
* @OnActivated()
|
|
377
|
+
* public onActivated(): void {
|
|
378
|
+
* console.log("Service activated!");
|
|
379
|
+
* }
|
|
380
|
+
* }
|
|
381
|
+
* ```
|
|
189
382
|
*/
|
|
190
383
|
function OnActivated() {
|
|
191
384
|
return function (target, propertyKey) {
|
|
192
385
|
var constructor = target.constructor;
|
|
193
|
-
var list =
|
|
386
|
+
var list = createContainer.ACTIVATED_HANDLER_METADATA.get(constructor);
|
|
194
387
|
if (!list) {
|
|
195
388
|
list = [];
|
|
196
|
-
|
|
389
|
+
createContainer.ACTIVATED_HANDLER_METADATA.set(constructor, list);
|
|
197
390
|
}
|
|
198
391
|
list.push(propertyKey);
|
|
199
392
|
};
|
|
200
393
|
}
|
|
201
394
|
|
|
202
395
|
/**
|
|
203
|
-
* Decorator for service methods that
|
|
396
|
+
* Decorator for service methods that should be executed before the service instance is deactivated.
|
|
397
|
+
*
|
|
398
|
+
* @remarks
|
|
399
|
+
* Methods decorated with `@OnDeactivation` are automatically invoked when the service
|
|
400
|
+
* is being removed from the container or when the container itself is being disposed.
|
|
401
|
+
*
|
|
402
|
+
* It is commonly used for cleanup, unsubscribing from events, or stopping background tasks.
|
|
403
|
+
* Multiple `@OnDeactivation` methods can exist in the same class hierarchy; they are executed
|
|
404
|
+
* in parent-to-child order.
|
|
405
|
+
*
|
|
406
|
+
* @group Service
|
|
204
407
|
*
|
|
205
|
-
* @returns decorator function
|
|
408
|
+
* @returns A method decorator function.
|
|
409
|
+
*
|
|
410
|
+
* @example
|
|
411
|
+
* ```typescript
|
|
412
|
+
* class MyService {
|
|
413
|
+
* @OnDeactivation()
|
|
414
|
+
* public onDeactivation(): void {
|
|
415
|
+
* console.log("Service deactivating!");
|
|
416
|
+
* }
|
|
417
|
+
* }
|
|
418
|
+
* ```
|
|
206
419
|
*/
|
|
207
420
|
function OnDeactivation() {
|
|
208
421
|
return function (target, propertyKey) {
|
|
209
422
|
var constructor = target.constructor;
|
|
210
|
-
var list =
|
|
423
|
+
var list = createContainer.DEACTIVATION_HANDLER_METADATA.get(constructor);
|
|
211
424
|
if (!list) {
|
|
212
425
|
list = [];
|
|
213
|
-
|
|
426
|
+
createContainer.DEACTIVATION_HANDLER_METADATA.set(constructor, list);
|
|
214
427
|
}
|
|
215
428
|
list.push(propertyKey);
|
|
216
429
|
};
|
|
@@ -232,6 +445,14 @@ Object.defineProperty(exports, "Inject", {
|
|
|
232
445
|
enumerable: true,
|
|
233
446
|
get: function () { return inversify.inject; }
|
|
234
447
|
});
|
|
448
|
+
Object.defineProperty(exports, "InjectFromBase", {
|
|
449
|
+
enumerable: true,
|
|
450
|
+
get: function () { return inversify.injectFromBase; }
|
|
451
|
+
});
|
|
452
|
+
Object.defineProperty(exports, "InjectFromHierarchy", {
|
|
453
|
+
enumerable: true,
|
|
454
|
+
get: function () { return inversify.injectFromHierarchy; }
|
|
455
|
+
});
|
|
235
456
|
Object.defineProperty(exports, "Injectable", {
|
|
236
457
|
enumerable: true,
|
|
237
458
|
get: function () { return inversify.injectable; }
|
|
@@ -268,28 +489,41 @@ Object.defineProperty(exports, "Tagged", {
|
|
|
268
489
|
enumerable: true,
|
|
269
490
|
get: function () { return inversify.tagged; }
|
|
270
491
|
});
|
|
271
|
-
exports
|
|
492
|
+
Object.defineProperty(exports, "Unmanaged", {
|
|
493
|
+
enumerable: true,
|
|
494
|
+
get: function () { return inversify.unmanaged; }
|
|
495
|
+
});
|
|
496
|
+
Object.defineProperty(exports, "bindingScopeValues", {
|
|
497
|
+
enumerable: true,
|
|
498
|
+
get: function () { return inversify.bindingScopeValues; }
|
|
499
|
+
});
|
|
500
|
+
Object.defineProperty(exports, "bindingTypeValues", {
|
|
501
|
+
enumerable: true,
|
|
502
|
+
get: function () { return inversify.bindingTypeValues; }
|
|
503
|
+
});
|
|
504
|
+
exports.CommandBus = createContainer.CommandBus;
|
|
272
505
|
Object.defineProperty(exports, "CommandStatus", {
|
|
273
506
|
enumerable: true,
|
|
274
|
-
get: function () { return
|
|
507
|
+
get: function () { return createContainer.CommandStatus; }
|
|
275
508
|
});
|
|
276
|
-
exports.EventBus =
|
|
277
|
-
exports.QueryBus =
|
|
278
|
-
exports.SEED =
|
|
279
|
-
exports.SEEDS =
|
|
280
|
-
exports.WireScope =
|
|
281
|
-
exports.WirestateError =
|
|
282
|
-
exports.
|
|
283
|
-
exports.
|
|
284
|
-
exports.
|
|
285
|
-
exports.
|
|
286
|
-
exports.
|
|
509
|
+
exports.EventBus = createContainer.EventBus;
|
|
510
|
+
exports.QueryBus = createContainer.QueryBus;
|
|
511
|
+
exports.SEED = createContainer.SEED_TOKEN;
|
|
512
|
+
exports.SEEDS = createContainer.SEEDS_TOKEN;
|
|
513
|
+
exports.WireScope = createContainer.WireScope;
|
|
514
|
+
exports.WirestateError = createContainer.WirestateError;
|
|
515
|
+
exports.applySeeds = createContainer.applySeeds;
|
|
516
|
+
exports.bindConstant = createContainer.bindConstant;
|
|
517
|
+
exports.bindDynamicValue = createContainer.bindDynamicValue;
|
|
518
|
+
exports.bindEntry = createContainer.bindEntry;
|
|
519
|
+
exports.bindService = createContainer.bindService;
|
|
520
|
+
exports.createContainer = createContainer.createContainer;
|
|
521
|
+
exports.getEntryToken = createContainer.getEntryToken;
|
|
287
522
|
exports.OnActivated = OnActivated;
|
|
288
523
|
exports.OnCommand = OnCommand;
|
|
289
524
|
exports.OnDeactivation = OnDeactivation;
|
|
290
525
|
exports.OnEvent = OnEvent;
|
|
291
526
|
exports.OnQuery = OnQuery;
|
|
292
|
-
exports.applySeeds = applySeeds;
|
|
293
527
|
exports.applySharedSeed = applySharedSeed;
|
|
294
528
|
exports.command = command;
|
|
295
529
|
exports.commandOptional = commandOptional;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../src/wirestate-core/alias.ts","../../../../../../../src/wirestate-core/commands/command.ts","../../../../../../../src/wirestate-core/commands/command-optional.ts","../../../../../../../src/wirestate-core/commands/on-command.ts","../../../../../../../src/wirestate-core/events/emit-event.ts","../../../../../../../src/wirestate-core/events/on-event.ts","../../../../../../../src/wirestate-core/queries/query.ts","../../../../../../../src/wirestate-core/queries/query-optional.ts","../../../../../../../src/wirestate-core/queries/on-query.ts","../../../../../../../src/wirestate-core/seeds/apply-
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../src/wirestate-core/alias.ts","../../../../../../../src/wirestate-core/commands/command.ts","../../../../../../../src/wirestate-core/commands/command-optional.ts","../../../../../../../src/wirestate-core/commands/on-command.ts","../../../../../../../src/wirestate-core/events/emit-event.ts","../../../../../../../src/wirestate-core/events/on-event.ts","../../../../../../../src/wirestate-core/queries/query.ts","../../../../../../../src/wirestate-core/queries/query-optional.ts","../../../../../../../src/wirestate-core/queries/on-query.ts","../../../../../../../src/wirestate-core/seeds/apply-shared-seed.ts","../../../../../../../src/wirestate-core/seeds/unapply-seeds.ts","../../../../../../../src/wirestate-core/service/on-activated.ts","../../../../../../../src/wirestate-core/service/on-deactivation.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["forwardRef","forward","LazyServiceIdentifier","command","container","type","data","get","CommandBus","commandOptional","OnCommand","target","propertyKey","constructor","list","COMMAND_HANDLER_METADATA","set","push","methodName","emitEvent","payload","from","EventBus","emit","OnEvent","types","normalized","undefined","Array","isArray","__spreadArray","EVENT_HANDLER_METADATA","query","QueryBus","queryOptional","OnQuery","QUERY_HANDLER_METADATA","applySharedSeed","seed","rebind","SEED_TOKEN","toConstantValue","unapplySeeds","seeds","existing","SEEDS_TOKEN","_i","seeds_1","key","delete","OnActivated","ACTIVATED_HANDLER_METADATA","OnDeactivation","DEACTIVATION_HANDLER_METADATA"],"mappings":";;;;;;AAgFA;;;;;;;;AAQG;AACG,SAAUA,UAAUA,CACxBC,OAA2C,EAAA;AAE3C,EAAA,OAAO,IAAIC,+BAAqB,CAACD,OAAO,CAAC;AAC3C;;ACpFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;SACaE,OAAOA,CACrBC,SAAoB,EACpBC,IAAO,EACPC,IAAQ,EAAA;AAIR,EAAA,OAAOF,SAAS,CAACG,GAAG,CAACC,0BAAU,CAAC,CAACL,OAAO,CAAOE,IAAI,EAAEC,IAAI,CAAC;AAC5D;;ACpCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;SACaG,eAAeA,CAC7BL,SAAoB,EACpBC,IAAO,EACP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