@schorts/shared-kernel 5.2.4 → 5.2.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/dist/cjs/cqrs/in-memory/async-in-memory-command-bus.js +19 -0
- package/dist/cjs/cqrs/in-memory/async-in-memory-command-bus.js.map +1 -0
- package/dist/cjs/cqrs/in-memory/async-in-memory-query-bus.js +19 -0
- package/dist/cjs/cqrs/in-memory/async-in-memory-query-bus.js.map +1 -0
- package/dist/cjs/cqrs/in-memory/index.js +5 -5
- package/dist/cjs/cqrs/in-memory/index.js.map +1 -1
- package/dist/esm/cqrs/in-memory/async-in-memory-command-bus.js +19 -0
- package/dist/esm/cqrs/in-memory/async-in-memory-command-bus.js.map +1 -0
- package/dist/esm/cqrs/in-memory/async-in-memory-query-bus.js +19 -0
- package/dist/esm/cqrs/in-memory/async-in-memory-query-bus.js.map +1 -0
- package/dist/esm/cqrs/in-memory/index.js +5 -5
- package/dist/esm/cqrs/in-memory/index.js.map +1 -1
- package/dist/types/cqrs/in-memory/async-in-memory-command-bus.d.ts +7 -0
- package/dist/types/cqrs/in-memory/async-in-memory-command-bus.d.ts.map +1 -0
- package/dist/types/cqrs/in-memory/async-in-memory-query-bus.d.ts +7 -0
- package/dist/types/cqrs/in-memory/async-in-memory-query-bus.d.ts.map +1 -0
- package/dist/types/cqrs/in-memory/index.d.ts +2 -2
- package/dist/types/cqrs/in-memory/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncInMemoryCommandBus = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
class AsyncInMemoryCommandBus {
|
|
6
|
+
handlers = new Map();
|
|
7
|
+
register(type, handler) {
|
|
8
|
+
this.handlers.set(type, handler);
|
|
9
|
+
}
|
|
10
|
+
async dispatch(command) {
|
|
11
|
+
const handler = this.handlers.get(command.getType());
|
|
12
|
+
if (!handler) {
|
|
13
|
+
throw new __1.CommandNotRegistered(command.getType());
|
|
14
|
+
}
|
|
15
|
+
await handler.handle(command);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AsyncInMemoryCommandBus = AsyncInMemoryCommandBus;
|
|
19
|
+
//# sourceMappingURL=async-in-memory-command-bus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-in-memory-command-bus.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/async-in-memory-command-bus.ts"],"names":[],"mappings":";;;AAAA,0BAA+E;AAE/E,MAAa,uBAAuB;IACjB,QAAQ,GAAG,IAAI,GAAG,EAA0B,CAAC;IAE9D,QAAQ,CAAoB,IAAY,EAAE,OAA0B;QAClE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAoB,OAAU;QAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAErD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,wBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;CACF;AAhBD,0DAgBC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncInMemoryQueryBus = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
class AsyncInMemoryQueryBus {
|
|
6
|
+
handlers = new Map();
|
|
7
|
+
register(type, handler) {
|
|
8
|
+
this.handlers.set(type, handler);
|
|
9
|
+
}
|
|
10
|
+
async dispatch(query) {
|
|
11
|
+
const handler = this.handlers.get(query.getType());
|
|
12
|
+
if (!handler) {
|
|
13
|
+
throw new __1.QueryNotRegistered(query.getType());
|
|
14
|
+
}
|
|
15
|
+
return await handler.handle(query);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AsyncInMemoryQueryBus = AsyncInMemoryQueryBus;
|
|
19
|
+
//# sourceMappingURL=async-in-memory-query-bus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-in-memory-query-bus.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/async-in-memory-query-bus.ts"],"names":[],"mappings":";;;AAAA,0BAAuE;AAEvE,MAAa,qBAAqB;IACf,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC;IAE5D,QAAQ,CAAqB,IAAY,EAAE,OAA2B;QACpE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAqB,KAAQ;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,CAAmC,CAAC;QAErF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,sBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,MAAM,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;CACF;AAhBD,sDAgBC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "
|
|
3
|
+
exports.AsyncInMemoryQueryBus = exports.AsyncInMemoryCommandBus = void 0;
|
|
4
|
+
var async_in_memory_command_bus_1 = require("./async-in-memory-command-bus");
|
|
5
|
+
Object.defineProperty(exports, "AsyncInMemoryCommandBus", { enumerable: true, get: function () { return async_in_memory_command_bus_1.AsyncInMemoryCommandBus; } });
|
|
6
|
+
var async_in_memory_query_bus_1 = require("./async-in-memory-query-bus");
|
|
7
|
+
Object.defineProperty(exports, "AsyncInMemoryQueryBus", { enumerable: true, get: function () { return async_in_memory_query_bus_1.AsyncInMemoryQueryBus; } });
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/index.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,yEAAoE;AAA3D,kIAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncInMemoryCommandBus = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
class AsyncInMemoryCommandBus {
|
|
6
|
+
handlers = new Map();
|
|
7
|
+
register(type, handler) {
|
|
8
|
+
this.handlers.set(type, handler);
|
|
9
|
+
}
|
|
10
|
+
async dispatch(command) {
|
|
11
|
+
const handler = this.handlers.get(command.getType());
|
|
12
|
+
if (!handler) {
|
|
13
|
+
throw new __1.CommandNotRegistered(command.getType());
|
|
14
|
+
}
|
|
15
|
+
await handler.handle(command);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AsyncInMemoryCommandBus = AsyncInMemoryCommandBus;
|
|
19
|
+
//# sourceMappingURL=async-in-memory-command-bus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-in-memory-command-bus.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/async-in-memory-command-bus.ts"],"names":[],"mappings":";;;AAAA,0BAA+E;AAE/E,MAAa,uBAAuB;IACjB,QAAQ,GAAG,IAAI,GAAG,EAA0B,CAAC;IAE9D,QAAQ,CAAoB,IAAY,EAAE,OAA0B;QAClE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAoB,OAAU;QAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QAErD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,wBAAoB,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAChC,CAAC;CACF;AAhBD,0DAgBC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncInMemoryQueryBus = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
class AsyncInMemoryQueryBus {
|
|
6
|
+
handlers = new Map();
|
|
7
|
+
register(type, handler) {
|
|
8
|
+
this.handlers.set(type, handler);
|
|
9
|
+
}
|
|
10
|
+
async dispatch(query) {
|
|
11
|
+
const handler = this.handlers.get(query.getType());
|
|
12
|
+
if (!handler) {
|
|
13
|
+
throw new __1.QueryNotRegistered(query.getType());
|
|
14
|
+
}
|
|
15
|
+
return await handler.handle(query);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AsyncInMemoryQueryBus = AsyncInMemoryQueryBus;
|
|
19
|
+
//# sourceMappingURL=async-in-memory-query-bus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-in-memory-query-bus.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/async-in-memory-query-bus.ts"],"names":[],"mappings":";;;AAAA,0BAAuE;AAEvE,MAAa,qBAAqB;IACf,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC;IAE5D,QAAQ,CAAqB,IAAY,EAAE,OAA2B;QACpE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAqB,KAAQ;QACzC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,CAAmC,CAAC;QAErF,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,sBAAkB,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,MAAM,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;CACF;AAhBD,sDAgBC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "
|
|
3
|
+
exports.AsyncInMemoryQueryBus = exports.AsyncInMemoryCommandBus = void 0;
|
|
4
|
+
var async_in_memory_command_bus_1 = require("./async-in-memory-command-bus");
|
|
5
|
+
Object.defineProperty(exports, "AsyncInMemoryCommandBus", { enumerable: true, get: function () { return async_in_memory_command_bus_1.AsyncInMemoryCommandBus; } });
|
|
6
|
+
var async_in_memory_query_bus_1 = require("./async-in-memory-query-bus");
|
|
7
|
+
Object.defineProperty(exports, "AsyncInMemoryQueryBus", { enumerable: true, get: function () { return async_in_memory_query_bus_1.AsyncInMemoryQueryBus; } });
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/index.ts"],"names":[],"mappings":";;;AAAA,6EAAwE;AAA/D,sIAAA,uBAAuB,OAAA;AAChC,yEAAoE;AAA3D,kIAAA,qBAAqB,OAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CommandBus, Command, CommandHandler } from "..";
|
|
2
|
+
export declare class AsyncInMemoryCommandBus implements CommandBus {
|
|
3
|
+
private readonly handlers;
|
|
4
|
+
register<C extends Command>(type: string, handler: CommandHandler<C>): void;
|
|
5
|
+
dispatch<C extends Command>(command: C): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=async-in-memory-command-bus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-in-memory-command-bus.d.ts","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/async-in-memory-command-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,cAAc,EAAwB,MAAM,IAAI,CAAC;AAE/E,qBAAa,uBAAwB,YAAW,UAAU;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAE9D,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;IAIrE,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAS7D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Query, QueryBus, QueryHandler } from "..";
|
|
2
|
+
export declare class AsyncInMemoryQueryBus implements QueryBus {
|
|
3
|
+
private readonly handlers;
|
|
4
|
+
register<Q extends Query, R>(type: string, handler: QueryHandler<Q, R>): void;
|
|
5
|
+
dispatch<Q extends Query, R>(query: Q): Promise<R>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=async-in-memory-query-bus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"async-in-memory-query-bus.d.ts","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/async-in-memory-query-bus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAsB,MAAM,IAAI,CAAC;AAEvE,qBAAa,qBAAsB,YAAW,QAAQ;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmC;IAE5D,QAAQ,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI;IAIvE,QAAQ,CAAC,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CASzD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { AsyncInMemoryCommandBus } from "./async-in-memory-command-bus";
|
|
2
|
+
export { AsyncInMemoryQueryBus } from "./async-in-memory-query-bus";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cqrs/in-memory/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schorts/shared-kernel",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.5",
|
|
4
4
|
"description": "A modular, type-safe foundation for building expressive, maintainable applications. This package provides core abstractions for domain modeling, HTTP integration, authentication, state management, and more — designed to be framework-agnostic and highly extensible.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|