@bgord/bun 0.18.24 → 0.18.25
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/modules/history/event-handlers/onHistoryClearedEvent.d.ts +2 -2
- package/dist/modules/history/event-handlers/onHistoryClearedEvent.d.ts.map +1 -1
- package/dist/modules/history/event-handlers/onHistoryClearedEvent.js +2 -2
- package/dist/modules/history/event-handlers/onHistoryPopulatedEvent.d.ts +2 -2
- package/dist/modules/history/event-handlers/onHistoryPopulatedEvent.d.ts.map +1 -1
- package/dist/modules/history/event-handlers/onHistoryPopulatedEvent.js +2 -2
- package/dist/modules/history/index.d.ts +1 -1
- package/dist/modules/history/index.d.ts.map +1 -1
- package/dist/modules/history/index.js +1 -1
- package/dist/modules/history/index.js.map +1 -1
- package/dist/modules/history/{repositories/history-repository.d.ts → ports/history-projection.d.ts} +2 -2
- package/dist/modules/history/ports/history-projection.d.ts.map +1 -0
- package/dist/modules/history/ports/history-projection.js +2 -0
- package/dist/modules/history/ports/history-projection.js.map +1 -0
- package/dist/modules/history/ports/index.d.ts +2 -0
- package/dist/modules/history/ports/index.d.ts.map +1 -0
- package/dist/modules/history/ports/index.js +2 -0
- package/dist/modules/history/ports/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/readme.md +2 -2
- package/src/modules/history/event-handlers/onHistoryClearedEvent.ts +3 -3
- package/src/modules/history/event-handlers/onHistoryPopulatedEvent.ts +3 -3
- package/src/modules/history/index.ts +1 -1
- package/src/modules/history/{repositories/history-repository.ts → ports/history-projection.ts} +1 -1
- package/src/modules/history/ports/index.ts +1 -0
- package/dist/modules/history/repositories/history-repository.d.ts.map +0 -1
- package/dist/modules/history/repositories/history-repository.js +0 -2
- package/dist/modules/history/repositories/history-repository.js.map +0 -1
- package/dist/modules/history/repositories/index.d.ts +0 -2
- package/dist/modules/history/repositories/index.d.ts.map +0 -1
- package/dist/modules/history/repositories/index.js +0 -2
- package/dist/modules/history/repositories/index.js.map +0 -1
- package/src/modules/history/repositories/index.ts +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as Events from "../events";
|
|
2
|
-
import * as
|
|
3
|
-
export declare const onHistoryClearedEvent: (
|
|
2
|
+
import * as Ports from "../ports";
|
|
3
|
+
export declare const onHistoryClearedEvent: (projection: Ports.HistoryProjectionPort) => (event: Events.HistoryClearedEventType) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=onHistoryClearedEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onHistoryClearedEvent.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/event-handlers/onHistoryClearedEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"onHistoryClearedEvent.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/event-handlers/onHistoryClearedEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAElC,eAAO,MAAM,qBAAqB,GAC/B,YAAY,KAAK,CAAC,qBAAqB,MAAY,OAAO,MAAM,CAAC,uBAAuB,kBAExF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const onHistoryClearedEvent = (
|
|
2
|
-
await
|
|
1
|
+
export const onHistoryClearedEvent = (projection) => async (event) => {
|
|
2
|
+
await projection.clear(event.payload.subject);
|
|
3
3
|
};
|
|
4
4
|
//# sourceMappingURL=onHistoryClearedEvent.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as Events from "../events";
|
|
2
|
-
import * as
|
|
3
|
-
export declare const onHistoryPopulatedEvent: (
|
|
2
|
+
import * as Ports from "../ports";
|
|
3
|
+
export declare const onHistoryPopulatedEvent: (projection: Ports.HistoryProjectionPort) => (event: Events.HistoryPopulatedEventType) => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=onHistoryPopulatedEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onHistoryPopulatedEvent.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/event-handlers/onHistoryPopulatedEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"onHistoryPopulatedEvent.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/event-handlers/onHistoryPopulatedEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,UAAU,CAAC;AAGlC,eAAO,MAAM,uBAAuB,GACjC,YAAY,KAAK,CAAC,qBAAqB,MAAY,OAAO,MAAM,CAAC,yBAAyB,kBAG1F,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as VO from "../value-objects";
|
|
2
|
-
export const onHistoryPopulatedEvent = (
|
|
2
|
+
export const onHistoryPopulatedEvent = (projection) => async (event) => {
|
|
3
3
|
const data = VO.HistoryParsed.parse(event.payload);
|
|
4
|
-
await
|
|
4
|
+
await projection.append(data, event.createdAt);
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=onHistoryPopulatedEvent.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * as EventHandlers from "./event-handlers";
|
|
2
2
|
export * as Events from "./events";
|
|
3
|
-
export * as
|
|
3
|
+
export * as Ports from "./ports";
|
|
4
4
|
export * as Services from "./services";
|
|
5
5
|
export * as VO from "./value-objects";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/history/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/history/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// TODO: tests
|
|
2
2
|
export * as EventHandlers from "./event-handlers";
|
|
3
3
|
export * as Events from "./events";
|
|
4
|
-
export * as
|
|
4
|
+
export * as Ports from "./ports";
|
|
5
5
|
export * as Services from "./services";
|
|
6
6
|
export * as VO from "./value-objects";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/history/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/history/index.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,KAAK,aAAa,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/modules/history/{repositories/history-repository.d.ts → ports/history-projection.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as tools from "@bgord/tools";
|
|
2
2
|
import * as VO from "../value-objects";
|
|
3
|
-
export interface
|
|
3
|
+
export interface HistoryProjectionPort {
|
|
4
4
|
append(data: VO.HistoryParsedType, createdAt: tools.TimestampType): Promise<void>;
|
|
5
5
|
clear(subject: VO.HistoryParsedType["subject"]): Promise<void>;
|
|
6
6
|
}
|
|
7
|
-
//# sourceMappingURL=history-
|
|
7
|
+
//# sourceMappingURL=history-projection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-projection.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/ports/history-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEvC,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAElF,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"history-projection.js","sourceRoot":"","sources":["../../../../src/modules/history/ports/history-projection.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/history/ports/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/history/ports/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|