@l-etabli/events 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventQueries.cjs +54 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventQueries.cjs.map +1 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventQueries.d.cts +10 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventQueries.d.ts +10 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventQueries.mjs +30 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventQueries.mjs.map +1 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventRepository.cjs +85 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventRepository.cjs.map +1 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventRepository.d.cts +9 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventRepository.d.ts +9 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventRepository.mjs +61 -0
- package/dist/adapters/effect-kysely/EffectKyselyEventRepository.mjs.map +1 -0
- package/dist/adapters/effect-kysely/index.cjs +32 -0
- package/dist/adapters/effect-kysely/index.cjs.map +1 -0
- package/dist/adapters/effect-kysely/index.d.cts +9 -0
- package/dist/adapters/effect-kysely/index.d.ts +9 -0
- package/dist/adapters/effect-kysely/index.mjs +7 -0
- package/dist/adapters/effect-kysely/index.mjs.map +1 -0
- package/dist/adapters/in-memory/InMemoryEventBus.cjs +3 -17
- package/dist/adapters/in-memory/InMemoryEventBus.cjs.map +1 -1
- package/dist/adapters/in-memory/InMemoryEventBus.mjs +2 -16
- package/dist/adapters/in-memory/InMemoryEventBus.mjs.map +1 -1
- package/dist/adapters/in-memory/InMemoryEventQueries.cjs +2 -20
- package/dist/adapters/in-memory/InMemoryEventQueries.cjs.map +1 -1
- package/dist/adapters/in-memory/InMemoryEventQueries.mjs +2 -20
- package/dist/adapters/in-memory/InMemoryEventQueries.mjs.map +1 -1
- package/dist/adapters/kysely/KyselyEventQueries.cjs +2 -9
- package/dist/adapters/kysely/KyselyEventQueries.cjs.map +1 -1
- package/dist/adapters/kysely/KyselyEventQueries.mjs +2 -9
- package/dist/adapters/kysely/KyselyEventQueries.mjs.map +1 -1
- package/dist/adapters/kysely/KyselyEventRepository.cjs +13 -14
- package/dist/adapters/kysely/KyselyEventRepository.cjs.map +1 -1
- package/dist/adapters/kysely/KyselyEventRepository.mjs +1 -2
- package/dist/adapters/kysely/KyselyEventRepository.mjs.map +1 -1
- package/dist/adapters/kysely/jsonb.cjs +30 -0
- package/dist/adapters/kysely/jsonb.cjs.map +1 -0
- package/dist/adapters/kysely/jsonb.d.cts +5 -0
- package/dist/adapters/kysely/jsonb.d.ts +5 -0
- package/dist/adapters/kysely/jsonb.mjs +6 -0
- package/dist/adapters/kysely/jsonb.mjs.map +1 -0
- package/dist/adapters/kysely/mapEventRow.cjs +35 -0
- package/dist/adapters/kysely/mapEventRow.cjs.map +1 -0
- package/dist/adapters/kysely/mapEventRow.d.cts +6 -0
- package/dist/adapters/kysely/mapEventRow.d.ts +6 -0
- package/dist/adapters/kysely/mapEventRow.mjs +11 -0
- package/dist/adapters/kysely/mapEventRow.mjs.map +1 -0
- package/dist/createEventCrawler.cjs +2 -8
- package/dist/createEventCrawler.cjs.map +1 -1
- package/dist/createEventCrawler.mjs +1 -7
- package/dist/createEventCrawler.mjs.map +1 -1
- package/dist/effect/EffectEventCrawler.cjs +111 -0
- package/dist/effect/EffectEventCrawler.cjs.map +1 -0
- package/dist/effect/EffectEventCrawler.d.cts +26 -0
- package/dist/effect/EffectEventCrawler.d.ts +26 -0
- package/dist/effect/EffectEventCrawler.mjs +87 -0
- package/dist/effect/EffectEventCrawler.mjs.map +1 -0
- package/dist/effect/EffectInMemoryEventBus.cjs +131 -0
- package/dist/effect/EffectInMemoryEventBus.cjs.map +1 -0
- package/dist/effect/EffectInMemoryEventBus.d.cts +31 -0
- package/dist/effect/EffectInMemoryEventBus.d.ts +31 -0
- package/dist/effect/EffectInMemoryEventBus.mjs +112 -0
- package/dist/effect/EffectInMemoryEventBus.mjs.map +1 -0
- package/dist/effect/EffectInMemoryEventQueries.cjs +35 -0
- package/dist/effect/EffectInMemoryEventQueries.cjs.map +1 -0
- package/dist/effect/EffectInMemoryEventQueries.d.cts +12 -0
- package/dist/effect/EffectInMemoryEventQueries.d.ts +12 -0
- package/dist/effect/EffectInMemoryEventQueries.mjs +11 -0
- package/dist/effect/EffectInMemoryEventQueries.mjs.map +1 -0
- package/dist/effect/EffectInMemoryEventRepository.cjs +73 -0
- package/dist/effect/EffectInMemoryEventRepository.cjs.map +1 -0
- package/dist/effect/EffectInMemoryEventRepository.d.cts +15 -0
- package/dist/effect/EffectInMemoryEventRepository.d.ts +15 -0
- package/dist/effect/EffectInMemoryEventRepository.mjs +48 -0
- package/dist/effect/EffectInMemoryEventRepository.mjs.map +1 -0
- package/dist/effect/EffectSubscriptions.cjs +61 -0
- package/dist/effect/EffectSubscriptions.cjs.map +1 -0
- package/dist/effect/EffectSubscriptions.d.cts +22 -0
- package/dist/effect/EffectSubscriptions.d.ts +22 -0
- package/dist/effect/EffectSubscriptions.mjs +36 -0
- package/dist/effect/EffectSubscriptions.mjs.map +1 -0
- package/dist/effect/index.cjs +47 -0
- package/dist/effect/index.cjs.map +1 -0
- package/dist/effect/index.d.cts +27 -0
- package/dist/effect/index.d.ts +27 -0
- package/dist/effect/index.mjs +20 -0
- package/dist/effect/index.mjs.map +1 -0
- package/dist/effect/ports/EffectEventBus.cjs +17 -0
- package/dist/effect/ports/EffectEventBus.cjs.map +1 -0
- package/dist/effect/ports/EffectEventBus.d.cts +13 -0
- package/dist/effect/ports/EffectEventBus.d.ts +13 -0
- package/dist/effect/ports/EffectEventBus.mjs +1 -0
- package/dist/effect/ports/EffectEventBus.mjs.map +1 -0
- package/dist/effect/ports/EffectEventQueries.cjs +17 -0
- package/dist/effect/ports/EffectEventQueries.cjs.map +1 -0
- package/dist/effect/ports/EffectEventQueries.d.cts +9 -0
- package/dist/effect/ports/EffectEventQueries.d.ts +9 -0
- package/dist/effect/ports/EffectEventQueries.mjs +1 -0
- package/dist/effect/ports/EffectEventQueries.mjs.map +1 -0
- package/dist/effect/ports/EffectEventRepository.cjs +17 -0
- package/dist/effect/ports/EffectEventRepository.cjs.map +1 -0
- package/dist/effect/ports/EffectEventRepository.d.cts +17 -0
- package/dist/effect/ports/EffectEventRepository.d.ts +17 -0
- package/dist/effect/ports/EffectEventRepository.mjs +1 -0
- package/dist/effect/ports/EffectEventRepository.mjs.map +1 -0
- package/dist/filterEvents.cjs +48 -0
- package/dist/filterEvents.cjs.map +1 -0
- package/dist/filterEvents.d.cts +6 -0
- package/dist/filterEvents.d.ts +6 -0
- package/dist/filterEvents.mjs +24 -0
- package/dist/filterEvents.mjs.map +1 -0
- package/dist/getSubscriptionIdsToPublish.cjs +40 -0
- package/dist/getSubscriptionIdsToPublish.cjs.map +1 -0
- package/dist/getSubscriptionIdsToPublish.d.cts +5 -0
- package/dist/getSubscriptionIdsToPublish.d.ts +5 -0
- package/dist/getSubscriptionIdsToPublish.mjs +16 -0
- package/dist/getSubscriptionIdsToPublish.mjs.map +1 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/ports/EventQueries.cjs.map +1 -1
- package/dist/ports/EventQueries.d.cts +1 -1
- package/dist/ports/EventQueries.d.ts +1 -1
- package/dist/splitIntoChunks.cjs +35 -0
- package/dist/splitIntoChunks.cjs.map +1 -0
- package/dist/splitIntoChunks.d.cts +3 -0
- package/dist/splitIntoChunks.d.ts +3 -0
- package/dist/splitIntoChunks.mjs +11 -0
- package/dist/splitIntoChunks.mjs.map +1 -0
- package/package.json +17 -2
- package/src/adapters/effect-kysely/EffectKyselyEventQueries.ts +45 -0
- package/src/adapters/effect-kysely/EffectKyselyEventRepository.ts +90 -0
- package/src/adapters/effect-kysely/index.ts +3 -0
- package/src/adapters/in-memory/InMemoryEventBus.ts +2 -23
- package/src/adapters/in-memory/InMemoryEventQueries.ts +2 -32
- package/src/adapters/kysely/KyselyEventQueries.ts +2 -10
- package/src/adapters/kysely/KyselyEventRepository.ts +2 -4
- package/src/adapters/kysely/jsonb.ts +4 -0
- package/src/adapters/kysely/mapEventRow.ts +15 -0
- package/src/createEventCrawler.ts +1 -8
- package/src/effect/EffectEventCrawler.ts +124 -0
- package/src/effect/EffectInMemoryEventBus.ts +231 -0
- package/src/effect/EffectInMemoryEventQueries.ts +16 -0
- package/src/effect/EffectInMemoryEventRepository.ts +68 -0
- package/src/effect/EffectSubscriptions.ts +74 -0
- package/src/effect/index.ts +26 -0
- package/src/effect/ports/EffectEventBus.ts +17 -0
- package/src/effect/ports/EffectEventQueries.ts +9 -0
- package/src/effect/ports/EffectEventRepository.ts +27 -0
- package/src/filterEvents.ts +39 -0
- package/src/getSubscriptionIdsToPublish.ts +21 -0
- package/src/ports/EventQueries.ts +1 -1
- package/src/splitIntoChunks.ts +7 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var EffectInMemoryEventQueries_exports = {};
|
|
20
|
+
__export(EffectInMemoryEventQueries_exports, {
|
|
21
|
+
createEffectInMemoryEventQueries: () => createEffectInMemoryEventQueries
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(EffectInMemoryEventQueries_exports);
|
|
24
|
+
var import_effect = require("effect");
|
|
25
|
+
var import_filterEvents = require("../filterEvents.ts");
|
|
26
|
+
const createEffectInMemoryEventQueries = (helpers) => ({
|
|
27
|
+
eventQueries: {
|
|
28
|
+
getEvents: (params) => import_effect.Effect.sync(() => (0, import_filterEvents.filterEvents)(helpers.getAllEvents(), params))
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
+
0 && (module.exports = {
|
|
33
|
+
createEffectInMemoryEventQueries
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=EffectInMemoryEventQueries.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/EffectInMemoryEventQueries.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport { filterEvents } from \"../filterEvents.ts\";\nimport type { DefaultContext, GenericEvent } from \"../types.ts\";\nimport type { InMemoryEventRepositoryHelpers } from \"./EffectInMemoryEventRepository.ts\";\nimport type { EventQueries } from \"./ports/EffectEventQueries.ts\";\n\nexport const createEffectInMemoryEventQueries = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>(\n helpers: InMemoryEventRepositoryHelpers<Event>,\n): { eventQueries: EventQueries<Event> } => ({\n eventQueries: {\n getEvents: (params) =>\n Effect.sync(() => filterEvents(helpers.getAllEvents(), params)),\n },\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AACvB,0BAA6B;AAKtB,MAAM,mCAAmC,CAG9C,aAC2C;AAAA,EAC3C,cAAc;AAAA,IACZ,WAAW,CAAC,WACV,qBAAO,KAAK,UAAM,kCAAa,QAAQ,aAAa,GAAG,MAAM,CAAC;AAAA,EAClE;AACF;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GenericEvent, DefaultContext } from '../types.cjs';
|
|
2
|
+
import { InMemoryEventRepositoryHelpers } from '../adapters/in-memory/InMemoryEventRepository.cjs';
|
|
3
|
+
import { EventQueries } from './ports/EffectEventQueries.cjs';
|
|
4
|
+
import '../ports/EventRepository.cjs';
|
|
5
|
+
import 'effect';
|
|
6
|
+
import '../ports/EventQueries.cjs';
|
|
7
|
+
|
|
8
|
+
declare const createEffectInMemoryEventQueries: <Event extends GenericEvent<string, unknown, DefaultContext>>(helpers: InMemoryEventRepositoryHelpers<Event>) => {
|
|
9
|
+
eventQueries: EventQueries<Event>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { createEffectInMemoryEventQueries };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GenericEvent, DefaultContext } from '../types.js';
|
|
2
|
+
import { InMemoryEventRepositoryHelpers } from '../adapters/in-memory/InMemoryEventRepository.js';
|
|
3
|
+
import { EventQueries } from './ports/EffectEventQueries.js';
|
|
4
|
+
import '../ports/EventRepository.js';
|
|
5
|
+
import 'effect';
|
|
6
|
+
import '../ports/EventQueries.js';
|
|
7
|
+
|
|
8
|
+
declare const createEffectInMemoryEventQueries: <Event extends GenericEvent<string, unknown, DefaultContext>>(helpers: InMemoryEventRepositoryHelpers<Event>) => {
|
|
9
|
+
eventQueries: EventQueries<Event>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { createEffectInMemoryEventQueries };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { filterEvents } from "../filterEvents.mjs";
|
|
3
|
+
const createEffectInMemoryEventQueries = (helpers) => ({
|
|
4
|
+
eventQueries: {
|
|
5
|
+
getEvents: (params) => Effect.sync(() => filterEvents(helpers.getAllEvents(), params))
|
|
6
|
+
}
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
createEffectInMemoryEventQueries
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=EffectInMemoryEventQueries.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/EffectInMemoryEventQueries.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport { filterEvents } from '../filterEvents.mjs';\nimport type { DefaultContext, GenericEvent } from '../types.mjs';\nimport type { InMemoryEventRepositoryHelpers } from './EffectInMemoryEventRepository.mjs';\nimport type { EventQueries } from './ports/EffectEventQueries.mjs';\n\nexport const createEffectInMemoryEventQueries = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>(\n helpers: InMemoryEventRepositoryHelpers<Event>,\n): { eventQueries: EventQueries<Event> } => ({\n eventQueries: {\n getEvents: (params) =>\n Effect.sync(() => filterEvents(helpers.getAllEvents(), params)),\n },\n});\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAKtB,MAAM,mCAAmC,CAG9C,aAC2C;AAAA,EAC3C,cAAc;AAAA,IACZ,WAAW,CAAC,WACV,OAAO,KAAK,MAAM,aAAa,QAAQ,aAAa,GAAG,MAAM,CAAC;AAAA,EAClE;AACF;","names":[]}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var EffectInMemoryEventRepository_exports = {};
|
|
20
|
+
__export(EffectInMemoryEventRepository_exports, {
|
|
21
|
+
createEffectInMemoryEventRepository: () => createEffectInMemoryEventRepository,
|
|
22
|
+
createEffectInMemoryWithUow: () => createEffectInMemoryWithUow
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(EffectInMemoryEventRepository_exports);
|
|
25
|
+
var import_effect = require("effect");
|
|
26
|
+
const createEffectInMemoryEventRepository = () => {
|
|
27
|
+
const eventById = {};
|
|
28
|
+
const eventRepository = {
|
|
29
|
+
save: (event) => import_effect.Effect.sync(() => {
|
|
30
|
+
eventById[event.id] = event;
|
|
31
|
+
}),
|
|
32
|
+
saveNewEventsBatch: (events) => import_effect.Effect.sync(() => {
|
|
33
|
+
for (const event of events) {
|
|
34
|
+
eventById[event.id] = event;
|
|
35
|
+
}
|
|
36
|
+
}),
|
|
37
|
+
markEventsAsInProcess: (events) => import_effect.Effect.sync(() => {
|
|
38
|
+
for (const event of events) {
|
|
39
|
+
eventById[event.id] = { ...event, status: "in-process" };
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
eventRepository,
|
|
45
|
+
helpers: {
|
|
46
|
+
getAllEvents: () => Object.values(eventById),
|
|
47
|
+
setEvents: (events) => {
|
|
48
|
+
for (const key of Object.keys(eventById)) {
|
|
49
|
+
delete eventById[key];
|
|
50
|
+
}
|
|
51
|
+
for (const event of events) {
|
|
52
|
+
eventById[event.id] = event;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
const createEffectInMemoryWithUow = (eventRepository) => {
|
|
59
|
+
const withUow = (fn, options) => import_effect.Effect.gen(function* () {
|
|
60
|
+
const result = yield* fn({ eventRepository });
|
|
61
|
+
if (options?.afterCommit) {
|
|
62
|
+
yield* options.afterCommit();
|
|
63
|
+
}
|
|
64
|
+
return result;
|
|
65
|
+
});
|
|
66
|
+
return { withUow };
|
|
67
|
+
};
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
createEffectInMemoryEventRepository,
|
|
71
|
+
createEffectInMemoryWithUow
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=EffectInMemoryEventRepository.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/EffectInMemoryEventRepository.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport type { InMemoryEventRepositoryHelpers } from \"../adapters/in-memory/InMemoryEventRepository.ts\";\nimport type { DefaultContext, GenericEvent } from \"../types.ts\";\nimport type {\n EventRepository,\n WithEventsUow,\n} from \"./ports/EffectEventRepository.ts\";\n\nexport type { InMemoryEventRepositoryHelpers };\n\nexport const createEffectInMemoryEventRepository = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>(): {\n eventRepository: EventRepository<Event>;\n helpers: InMemoryEventRepositoryHelpers<Event>;\n} => {\n const eventById: Record<string, Event> = {};\n\n const eventRepository: EventRepository<Event> = {\n save: (event) =>\n Effect.sync(() => {\n eventById[event.id] = event;\n }),\n saveNewEventsBatch: (events) =>\n Effect.sync(() => {\n for (const event of events) {\n eventById[event.id] = event;\n }\n }),\n markEventsAsInProcess: (events) =>\n Effect.sync(() => {\n for (const event of events) {\n eventById[event.id] = { ...event, status: \"in-process\" };\n }\n }),\n };\n\n return {\n eventRepository,\n helpers: {\n getAllEvents: () => Object.values(eventById),\n setEvents: (events) => {\n for (const key of Object.keys(eventById)) {\n delete eventById[key];\n }\n for (const event of events) {\n eventById[event.id] = event;\n }\n },\n },\n };\n};\n\nexport const createEffectInMemoryWithUow = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>(\n eventRepository: EventRepository<Event>,\n): { withUow: WithEventsUow<Event> } => {\n const withUow: WithEventsUow<Event> = (fn, options) =>\n Effect.gen(function* () {\n const result = yield* fn({ eventRepository });\n if (options?.afterCommit) {\n yield* options.afterCommit();\n }\n return result;\n });\n return { withUow };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAuB;AAUhB,MAAM,sCAAsC,MAK9C;AACH,QAAM,YAAmC,CAAC;AAE1C,QAAM,kBAA0C;AAAA,IAC9C,MAAM,CAAC,UACL,qBAAO,KAAK,MAAM;AAChB,gBAAU,MAAM,EAAE,IAAI;AAAA,IACxB,CAAC;AAAA,IACH,oBAAoB,CAAC,WACnB,qBAAO,KAAK,MAAM;AAChB,iBAAW,SAAS,QAAQ;AAC1B,kBAAU,MAAM,EAAE,IAAI;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACH,uBAAuB,CAAC,WACtB,qBAAO,KAAK,MAAM;AAChB,iBAAW,SAAS,QAAQ;AAC1B,kBAAU,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,QAAQ,aAAa;AAAA,MACzD;AAAA,IACF,CAAC;AAAA,EACL;AAEA,SAAO;AAAA,IACL;AAAA,IACA,SAAS;AAAA,MACP,cAAc,MAAM,OAAO,OAAO,SAAS;AAAA,MAC3C,WAAW,CAAC,WAAW;AACrB,mBAAW,OAAO,OAAO,KAAK,SAAS,GAAG;AACxC,iBAAO,UAAU,GAAG;AAAA,QACtB;AACA,mBAAW,SAAS,QAAQ;AAC1B,oBAAU,MAAM,EAAE,IAAI;AAAA,QACxB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,8BAA8B,CAGzC,oBACsC;AACtC,QAAM,UAAgC,CAAC,IAAI,YACzC,qBAAO,IAAI,aAAa;AACtB,UAAM,SAAS,OAAO,GAAG,EAAE,gBAAgB,CAAC;AAC5C,QAAI,SAAS,aAAa;AACxB,aAAO,QAAQ,YAAY;AAAA,IAC7B;AACA,WAAO;AAAA,EACT,CAAC;AACH,SAAO,EAAE,QAAQ;AACnB;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InMemoryEventRepositoryHelpers } from '../adapters/in-memory/InMemoryEventRepository.cjs';
|
|
2
|
+
import { GenericEvent, DefaultContext } from '../types.cjs';
|
|
3
|
+
import { EventRepository, WithEventsUow } from './ports/EffectEventRepository.cjs';
|
|
4
|
+
import '../ports/EventRepository.cjs';
|
|
5
|
+
import 'effect';
|
|
6
|
+
|
|
7
|
+
declare const createEffectInMemoryEventRepository: <Event extends GenericEvent<string, unknown, DefaultContext>>() => {
|
|
8
|
+
eventRepository: EventRepository<Event>;
|
|
9
|
+
helpers: InMemoryEventRepositoryHelpers<Event>;
|
|
10
|
+
};
|
|
11
|
+
declare const createEffectInMemoryWithUow: <Event extends GenericEvent<string, unknown, DefaultContext>>(eventRepository: EventRepository<Event>) => {
|
|
12
|
+
withUow: WithEventsUow<Event>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { InMemoryEventRepositoryHelpers, createEffectInMemoryEventRepository, createEffectInMemoryWithUow };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InMemoryEventRepositoryHelpers } from '../adapters/in-memory/InMemoryEventRepository.js';
|
|
2
|
+
import { GenericEvent, DefaultContext } from '../types.js';
|
|
3
|
+
import { EventRepository, WithEventsUow } from './ports/EffectEventRepository.js';
|
|
4
|
+
import '../ports/EventRepository.js';
|
|
5
|
+
import 'effect';
|
|
6
|
+
|
|
7
|
+
declare const createEffectInMemoryEventRepository: <Event extends GenericEvent<string, unknown, DefaultContext>>() => {
|
|
8
|
+
eventRepository: EventRepository<Event>;
|
|
9
|
+
helpers: InMemoryEventRepositoryHelpers<Event>;
|
|
10
|
+
};
|
|
11
|
+
declare const createEffectInMemoryWithUow: <Event extends GenericEvent<string, unknown, DefaultContext>>(eventRepository: EventRepository<Event>) => {
|
|
12
|
+
withUow: WithEventsUow<Event>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { InMemoryEventRepositoryHelpers, createEffectInMemoryEventRepository, createEffectInMemoryWithUow };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
const createEffectInMemoryEventRepository = () => {
|
|
3
|
+
const eventById = {};
|
|
4
|
+
const eventRepository = {
|
|
5
|
+
save: (event) => Effect.sync(() => {
|
|
6
|
+
eventById[event.id] = event;
|
|
7
|
+
}),
|
|
8
|
+
saveNewEventsBatch: (events) => Effect.sync(() => {
|
|
9
|
+
for (const event of events) {
|
|
10
|
+
eventById[event.id] = event;
|
|
11
|
+
}
|
|
12
|
+
}),
|
|
13
|
+
markEventsAsInProcess: (events) => Effect.sync(() => {
|
|
14
|
+
for (const event of events) {
|
|
15
|
+
eventById[event.id] = { ...event, status: "in-process" };
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
eventRepository,
|
|
21
|
+
helpers: {
|
|
22
|
+
getAllEvents: () => Object.values(eventById),
|
|
23
|
+
setEvents: (events) => {
|
|
24
|
+
for (const key of Object.keys(eventById)) {
|
|
25
|
+
delete eventById[key];
|
|
26
|
+
}
|
|
27
|
+
for (const event of events) {
|
|
28
|
+
eventById[event.id] = event;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
const createEffectInMemoryWithUow = (eventRepository) => {
|
|
35
|
+
const withUow = (fn, options) => Effect.gen(function* () {
|
|
36
|
+
const result = yield* fn({ eventRepository });
|
|
37
|
+
if (options?.afterCommit) {
|
|
38
|
+
yield* options.afterCommit();
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
});
|
|
42
|
+
return { withUow };
|
|
43
|
+
};
|
|
44
|
+
export {
|
|
45
|
+
createEffectInMemoryEventRepository,
|
|
46
|
+
createEffectInMemoryWithUow
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=EffectInMemoryEventRepository.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/EffectInMemoryEventRepository.ts"],"sourcesContent":["import { Effect } from \"effect\";\nimport type { InMemoryEventRepositoryHelpers } from '../adapters/in-memory/InMemoryEventRepository.mjs';\nimport type { DefaultContext, GenericEvent } from '../types.mjs';\nimport type {\n EventRepository,\n WithEventsUow,\n} from './ports/EffectEventRepository.mjs';\n\nexport type { InMemoryEventRepositoryHelpers };\n\nexport const createEffectInMemoryEventRepository = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>(): {\n eventRepository: EventRepository<Event>;\n helpers: InMemoryEventRepositoryHelpers<Event>;\n} => {\n const eventById: Record<string, Event> = {};\n\n const eventRepository: EventRepository<Event> = {\n save: (event) =>\n Effect.sync(() => {\n eventById[event.id] = event;\n }),\n saveNewEventsBatch: (events) =>\n Effect.sync(() => {\n for (const event of events) {\n eventById[event.id] = event;\n }\n }),\n markEventsAsInProcess: (events) =>\n Effect.sync(() => {\n for (const event of events) {\n eventById[event.id] = { ...event, status: \"in-process\" };\n }\n }),\n };\n\n return {\n eventRepository,\n helpers: {\n getAllEvents: () => Object.values(eventById),\n setEvents: (events) => {\n for (const key of Object.keys(eventById)) {\n delete eventById[key];\n }\n for (const event of events) {\n eventById[event.id] = event;\n }\n },\n },\n };\n};\n\nexport const createEffectInMemoryWithUow = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>(\n eventRepository: EventRepository<Event>,\n): { withUow: WithEventsUow<Event> } => {\n const withUow: WithEventsUow<Event> = (fn, options) =>\n Effect.gen(function* () {\n const result = yield* fn({ eventRepository });\n if (options?.afterCommit) {\n yield* options.afterCommit();\n }\n return result;\n });\n return { withUow };\n};\n"],"mappings":"AAAA,SAAS,cAAc;AAUhB,MAAM,sCAAsC,MAK9C;AACH,QAAM,YAAmC,CAAC;AAE1C,QAAM,kBAA0C;AAAA,IAC9C,MAAM,CAAC,UACL,OAAO,KAAK,MAAM;AAChB,gBAAU,MAAM,EAAE,IAAI;AAAA,IACxB,CAAC;AAAA,IACH,oBAAoB,CAAC,WACnB,OAAO,KAAK,MAAM;AAChB,iBAAW,SAAS,QAAQ;AAC1B,kBAAU,MAAM,EAAE,IAAI;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACH,uBAAuB,CAAC,WACtB,OAAO,KAAK,MAAM;AAChB,iBAAW,SAAS,QAAQ;AAC1B,kBAAU,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,QAAQ,aAAa;AAAA,MACzD;AAAA,IACF,CAAC;AAAA,EACL;AAEA,SAAO;AAAA,IACL;AAAA,IACA,SAAS;AAAA,MACP,cAAc,MAAM,OAAO,OAAO,SAAS;AAAA,MAC3C,WAAW,CAAC,WAAW;AACrB,mBAAW,OAAO,OAAO,KAAK,SAAS,GAAG;AACxC,iBAAO,UAAU,GAAG;AAAA,QACtB;AACA,mBAAW,SAAS,QAAQ;AAC1B,oBAAU,MAAM,EAAE,IAAI;AAAA,QACxB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;AAEO,MAAM,8BAA8B,CAGzC,oBACsC;AACtC,QAAM,UAAgC,CAAC,IAAI,YACzC,OAAO,IAAI,aAAa;AACtB,UAAM,SAAS,OAAO,GAAG,EAAE,gBAAgB,CAAC;AAC5C,QAAI,SAAS,aAAa;AACxB,aAAO,QAAQ,YAAY;AAAA,IAC7B;AACA,WAAO;AAAA,EACT,CAAC;AACH,SAAO,EAAE,QAAQ;AACnB;","names":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var EffectSubscriptions_exports = {};
|
|
20
|
+
__export(EffectSubscriptions_exports, {
|
|
21
|
+
subscribeByTopic: () => subscribeByTopic,
|
|
22
|
+
subscribeGlobalToTopics: () => subscribeGlobalToTopics
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(EffectSubscriptions_exports);
|
|
25
|
+
function subscribeByTopic(eventBus, subscriptions) {
|
|
26
|
+
for (const topic of Object.keys(subscriptions)) {
|
|
27
|
+
const handlers = subscriptions[topic];
|
|
28
|
+
for (const { subscriptionId, handler } of handlers) {
|
|
29
|
+
eventBus.subscribe({
|
|
30
|
+
topic,
|
|
31
|
+
subscriptionId,
|
|
32
|
+
callBack: handler
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function subscribeGlobalToTopics(eventBus, subscriptions, config) {
|
|
38
|
+
const allTopics = Object.keys(subscriptions);
|
|
39
|
+
let topicsToSubscribe;
|
|
40
|
+
const filter = config.filter;
|
|
41
|
+
if (!filter) {
|
|
42
|
+
topicsToSubscribe = allTopics;
|
|
43
|
+
} else if ("include" in filter) {
|
|
44
|
+
topicsToSubscribe = filter.include;
|
|
45
|
+
} else {
|
|
46
|
+
topicsToSubscribe = allTopics.filter((t) => !filter.exclude.includes(t));
|
|
47
|
+
}
|
|
48
|
+
for (const topic of topicsToSubscribe) {
|
|
49
|
+
eventBus.subscribe({
|
|
50
|
+
topic,
|
|
51
|
+
subscriptionId: config.subscriptionId,
|
|
52
|
+
callBack: config.handler
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
subscribeByTopic,
|
|
59
|
+
subscribeGlobalToTopics
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=EffectSubscriptions.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/EffectSubscriptions.ts"],"sourcesContent":["import type { Effect } from \"effect\";\nimport type { NarrowEvent, TopicFilter } from \"../subscriptions.ts\";\nimport type { DefaultContext, GenericEvent, SubscriptionId } from \"../types.ts\";\nimport type { EventBus } from \"./ports/EffectEventBus.ts\";\n\nexport type { NarrowEvent, TopicFilter };\n\nexport type TopicSubscriber<\n E extends GenericEvent<string, unknown, DefaultContext>,\n> = {\n subscriptionId: SubscriptionId;\n handler: (event: E) => Effect.Effect<void>;\n};\n\nexport type TopicSubscriptions<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n> = {\n [K in AllEvents[\"topic\"]]: Array<TopicSubscriber<NarrowEvent<AllEvents, K>>>;\n};\n\nexport type GlobalSubscriberConfig<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n> = {\n subscriptionId: SubscriptionId;\n handler: (event: AllEvents) => Effect.Effect<void>;\n filter?: TopicFilter<AllEvents[\"topic\"]>;\n};\n\nexport function subscribeByTopic<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n>(\n eventBus: EventBus<AllEvents>,\n subscriptions: TopicSubscriptions<AllEvents>,\n): void {\n for (const topic of Object.keys(subscriptions) as AllEvents[\"topic\"][]) {\n const handlers = subscriptions[topic];\n for (const { subscriptionId, handler } of handlers) {\n eventBus.subscribe({\n topic,\n subscriptionId,\n callBack: handler,\n });\n }\n }\n}\n\nexport function subscribeGlobalToTopics<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n>(\n eventBus: EventBus<AllEvents>,\n subscriptions: TopicSubscriptions<AllEvents>,\n config: GlobalSubscriberConfig<AllEvents>,\n): void {\n const allTopics = Object.keys(subscriptions) as AllEvents[\"topic\"][];\n\n let topicsToSubscribe: AllEvents[\"topic\"][];\n\n const filter = config.filter;\n if (!filter) {\n topicsToSubscribe = allTopics;\n } else if (\"include\" in filter) {\n topicsToSubscribe = filter.include;\n } else {\n topicsToSubscribe = allTopics.filter((t) => !filter.exclude.includes(t));\n }\n\n for (const topic of topicsToSubscribe) {\n eventBus.subscribe({\n topic,\n subscriptionId: config.subscriptionId,\n callBack: config.handler,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BO,SAAS,iBAGd,UACA,eACM;AACN,aAAW,SAAS,OAAO,KAAK,aAAa,GAA2B;AACtE,UAAM,WAAW,cAAc,KAAK;AACpC,eAAW,EAAE,gBAAgB,QAAQ,KAAK,UAAU;AAClD,eAAS,UAAU;AAAA,QACjB;AAAA,QACA;AAAA,QACA,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEO,SAAS,wBAGd,UACA,eACA,QACM;AACN,QAAM,YAAY,OAAO,KAAK,aAAa;AAE3C,MAAI;AAEJ,QAAM,SAAS,OAAO;AACtB,MAAI,CAAC,QAAQ;AACX,wBAAoB;AAAA,EACtB,WAAW,aAAa,QAAQ;AAC9B,wBAAoB,OAAO;AAAA,EAC7B,OAAO;AACL,wBAAoB,UAAU,OAAO,CAAC,MAAM,CAAC,OAAO,QAAQ,SAAS,CAAC,CAAC;AAAA,EACzE;AAEA,aAAW,SAAS,mBAAmB;AACrC,aAAS,UAAU;AAAA,MACjB;AAAA,MACA,gBAAgB,OAAO;AAAA,MACvB,UAAU,OAAO;AAAA,IACnB,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { NarrowEvent, TopicFilter } from '../subscriptions.cjs';
|
|
3
|
+
import { GenericEvent, DefaultContext, SubscriptionId } from '../types.cjs';
|
|
4
|
+
import { EventBus } from './ports/EffectEventBus.cjs';
|
|
5
|
+
import '../ports/EventBus.cjs';
|
|
6
|
+
|
|
7
|
+
type TopicSubscriber<E extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
8
|
+
subscriptionId: SubscriptionId;
|
|
9
|
+
handler: (event: E) => Effect.Effect<void>;
|
|
10
|
+
};
|
|
11
|
+
type TopicSubscriptions<AllEvents extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
12
|
+
[K in AllEvents["topic"]]: Array<TopicSubscriber<NarrowEvent<AllEvents, K>>>;
|
|
13
|
+
};
|
|
14
|
+
type GlobalSubscriberConfig<AllEvents extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
15
|
+
subscriptionId: SubscriptionId;
|
|
16
|
+
handler: (event: AllEvents) => Effect.Effect<void>;
|
|
17
|
+
filter?: TopicFilter<AllEvents["topic"]>;
|
|
18
|
+
};
|
|
19
|
+
declare function subscribeByTopic<AllEvents extends GenericEvent<string, unknown, DefaultContext>>(eventBus: EventBus<AllEvents>, subscriptions: TopicSubscriptions<AllEvents>): void;
|
|
20
|
+
declare function subscribeGlobalToTopics<AllEvents extends GenericEvent<string, unknown, DefaultContext>>(eventBus: EventBus<AllEvents>, subscriptions: TopicSubscriptions<AllEvents>, config: GlobalSubscriberConfig<AllEvents>): void;
|
|
21
|
+
|
|
22
|
+
export { type GlobalSubscriberConfig, NarrowEvent, TopicFilter, type TopicSubscriber, type TopicSubscriptions, subscribeByTopic, subscribeGlobalToTopics };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { NarrowEvent, TopicFilter } from '../subscriptions.js';
|
|
3
|
+
import { GenericEvent, DefaultContext, SubscriptionId } from '../types.js';
|
|
4
|
+
import { EventBus } from './ports/EffectEventBus.js';
|
|
5
|
+
import '../ports/EventBus.js';
|
|
6
|
+
|
|
7
|
+
type TopicSubscriber<E extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
8
|
+
subscriptionId: SubscriptionId;
|
|
9
|
+
handler: (event: E) => Effect.Effect<void>;
|
|
10
|
+
};
|
|
11
|
+
type TopicSubscriptions<AllEvents extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
12
|
+
[K in AllEvents["topic"]]: Array<TopicSubscriber<NarrowEvent<AllEvents, K>>>;
|
|
13
|
+
};
|
|
14
|
+
type GlobalSubscriberConfig<AllEvents extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
15
|
+
subscriptionId: SubscriptionId;
|
|
16
|
+
handler: (event: AllEvents) => Effect.Effect<void>;
|
|
17
|
+
filter?: TopicFilter<AllEvents["topic"]>;
|
|
18
|
+
};
|
|
19
|
+
declare function subscribeByTopic<AllEvents extends GenericEvent<string, unknown, DefaultContext>>(eventBus: EventBus<AllEvents>, subscriptions: TopicSubscriptions<AllEvents>): void;
|
|
20
|
+
declare function subscribeGlobalToTopics<AllEvents extends GenericEvent<string, unknown, DefaultContext>>(eventBus: EventBus<AllEvents>, subscriptions: TopicSubscriptions<AllEvents>, config: GlobalSubscriberConfig<AllEvents>): void;
|
|
21
|
+
|
|
22
|
+
export { type GlobalSubscriberConfig, NarrowEvent, TopicFilter, type TopicSubscriber, type TopicSubscriptions, subscribeByTopic, subscribeGlobalToTopics };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
function subscribeByTopic(eventBus, subscriptions) {
|
|
2
|
+
for (const topic of Object.keys(subscriptions)) {
|
|
3
|
+
const handlers = subscriptions[topic];
|
|
4
|
+
for (const { subscriptionId, handler } of handlers) {
|
|
5
|
+
eventBus.subscribe({
|
|
6
|
+
topic,
|
|
7
|
+
subscriptionId,
|
|
8
|
+
callBack: handler
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
function subscribeGlobalToTopics(eventBus, subscriptions, config) {
|
|
14
|
+
const allTopics = Object.keys(subscriptions);
|
|
15
|
+
let topicsToSubscribe;
|
|
16
|
+
const filter = config.filter;
|
|
17
|
+
if (!filter) {
|
|
18
|
+
topicsToSubscribe = allTopics;
|
|
19
|
+
} else if ("include" in filter) {
|
|
20
|
+
topicsToSubscribe = filter.include;
|
|
21
|
+
} else {
|
|
22
|
+
topicsToSubscribe = allTopics.filter((t) => !filter.exclude.includes(t));
|
|
23
|
+
}
|
|
24
|
+
for (const topic of topicsToSubscribe) {
|
|
25
|
+
eventBus.subscribe({
|
|
26
|
+
topic,
|
|
27
|
+
subscriptionId: config.subscriptionId,
|
|
28
|
+
callBack: config.handler
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
subscribeByTopic,
|
|
34
|
+
subscribeGlobalToTopics
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=EffectSubscriptions.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/EffectSubscriptions.ts"],"sourcesContent":["import type { Effect } from \"effect\";\nimport type { NarrowEvent, TopicFilter } from '../subscriptions.mjs';\nimport type { DefaultContext, GenericEvent, SubscriptionId } from '../types.mjs';\nimport type { EventBus } from './ports/EffectEventBus.mjs';\n\nexport type { NarrowEvent, TopicFilter };\n\nexport type TopicSubscriber<\n E extends GenericEvent<string, unknown, DefaultContext>,\n> = {\n subscriptionId: SubscriptionId;\n handler: (event: E) => Effect.Effect<void>;\n};\n\nexport type TopicSubscriptions<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n> = {\n [K in AllEvents[\"topic\"]]: Array<TopicSubscriber<NarrowEvent<AllEvents, K>>>;\n};\n\nexport type GlobalSubscriberConfig<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n> = {\n subscriptionId: SubscriptionId;\n handler: (event: AllEvents) => Effect.Effect<void>;\n filter?: TopicFilter<AllEvents[\"topic\"]>;\n};\n\nexport function subscribeByTopic<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n>(\n eventBus: EventBus<AllEvents>,\n subscriptions: TopicSubscriptions<AllEvents>,\n): void {\n for (const topic of Object.keys(subscriptions) as AllEvents[\"topic\"][]) {\n const handlers = subscriptions[topic];\n for (const { subscriptionId, handler } of handlers) {\n eventBus.subscribe({\n topic,\n subscriptionId,\n callBack: handler,\n });\n }\n }\n}\n\nexport function subscribeGlobalToTopics<\n AllEvents extends GenericEvent<string, unknown, DefaultContext>,\n>(\n eventBus: EventBus<AllEvents>,\n subscriptions: TopicSubscriptions<AllEvents>,\n config: GlobalSubscriberConfig<AllEvents>,\n): void {\n const allTopics = Object.keys(subscriptions) as AllEvents[\"topic\"][];\n\n let topicsToSubscribe: AllEvents[\"topic\"][];\n\n const filter = config.filter;\n if (!filter) {\n topicsToSubscribe = allTopics;\n } else if (\"include\" in filter) {\n topicsToSubscribe = filter.include;\n } else {\n topicsToSubscribe = allTopics.filter((t) => !filter.exclude.includes(t));\n }\n\n for (const topic of topicsToSubscribe) {\n eventBus.subscribe({\n topic,\n subscriptionId: config.subscriptionId,\n callBack: config.handler,\n });\n }\n}\n"],"mappings":"AA4BO,SAAS,iBAGd,UACA,eACM;AACN,aAAW,SAAS,OAAO,KAAK,aAAa,GAA2B;AACtE,UAAM,WAAW,cAAc,KAAK;AACpC,eAAW,EAAE,gBAAgB,QAAQ,KAAK,UAAU;AAClD,eAAS,UAAU;AAAA,QACjB;AAAA,QACA;AAAA,QACA,UAAU;AAAA,MACZ,CAAC;AAAA,IACH;AAAA,EACF;AACF;AAEO,SAAS,wBAGd,UACA,eACA,QACM;AACN,QAAM,YAAY,OAAO,KAAK,aAAa;AAE3C,MAAI;AAEJ,QAAM,SAAS,OAAO;AACtB,MAAI,CAAC,QAAQ;AACX,wBAAoB;AAAA,EACtB,WAAW,aAAa,QAAQ;AAC9B,wBAAoB,OAAO;AAAA,EAC7B,OAAO;AACL,wBAAoB,UAAU,OAAO,CAAC,MAAM,CAAC,OAAO,QAAQ,SAAS,CAAC,CAAC;AAAA,EACzE;AAEA,aAAW,SAAS,mBAAmB;AACrC,aAAS,UAAU;AAAA,MACjB;AAAA,MACA,gBAAgB,OAAO;AAAA,MACvB,UAAU,OAAO;AAAA,IACnB,CAAC;AAAA,EACH;AACF;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var effect_exports = {};
|
|
21
|
+
__export(effect_exports, {
|
|
22
|
+
createEffectInMemoryEventRepositoryAndQueries: () => createEffectInMemoryEventRepositoryAndQueries
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(effect_exports);
|
|
25
|
+
var import_EffectInMemoryEventQueries = require("./EffectInMemoryEventQueries.ts");
|
|
26
|
+
var import_EffectInMemoryEventRepository = require("./EffectInMemoryEventRepository.ts");
|
|
27
|
+
__reExport(effect_exports, require("./EffectEventCrawler.ts"), module.exports);
|
|
28
|
+
__reExport(effect_exports, require("./EffectInMemoryEventBus.ts"), module.exports);
|
|
29
|
+
__reExport(effect_exports, require("./EffectInMemoryEventQueries.ts"), module.exports);
|
|
30
|
+
__reExport(effect_exports, require("./EffectInMemoryEventRepository.ts"), module.exports);
|
|
31
|
+
__reExport(effect_exports, require("./EffectSubscriptions.ts"), module.exports);
|
|
32
|
+
const createEffectInMemoryEventRepositoryAndQueries = () => {
|
|
33
|
+
const { eventRepository, helpers } = (0, import_EffectInMemoryEventRepository.createEffectInMemoryEventRepository)();
|
|
34
|
+
const { eventQueries } = (0, import_EffectInMemoryEventQueries.createEffectInMemoryEventQueries)(helpers);
|
|
35
|
+
const { withUow } = (0, import_EffectInMemoryEventRepository.createEffectInMemoryWithUow)(eventRepository);
|
|
36
|
+
return { eventRepository, eventQueries, helpers, withUow };
|
|
37
|
+
};
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
createEffectInMemoryEventRepositoryAndQueries,
|
|
41
|
+
...require("./EffectEventCrawler.ts"),
|
|
42
|
+
...require("./EffectInMemoryEventBus.ts"),
|
|
43
|
+
...require("./EffectInMemoryEventQueries.ts"),
|
|
44
|
+
...require("./EffectInMemoryEventRepository.ts"),
|
|
45
|
+
...require("./EffectSubscriptions.ts")
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/index.ts"],"sourcesContent":["import type { DefaultContext, GenericEvent } from \"../types.ts\";\nimport { createEffectInMemoryEventQueries } from \"./EffectInMemoryEventQueries.ts\";\nimport {\n createEffectInMemoryEventRepository,\n createEffectInMemoryWithUow,\n} from \"./EffectInMemoryEventRepository.ts\";\n\nexport type { GetEventsParams } from \"../ports/EventQueries.ts\";\nexport * from \"./EffectEventCrawler.ts\";\nexport * from \"./EffectInMemoryEventBus.ts\";\nexport * from \"./EffectInMemoryEventQueries.ts\";\nexport * from \"./EffectInMemoryEventRepository.ts\";\nexport * from \"./EffectSubscriptions.ts\";\nexport type * from \"./ports/EffectEventBus.ts\";\nexport type * from \"./ports/EffectEventQueries.ts\";\nexport type * from \"./ports/EffectEventRepository.ts\";\n\nexport const createEffectInMemoryEventRepositoryAndQueries = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>() => {\n const { eventRepository, helpers } =\n createEffectInMemoryEventRepository<Event>();\n const { eventQueries } = createEffectInMemoryEventQueries<Event>(helpers);\n const { withUow } = createEffectInMemoryWithUow<Event>(eventRepository);\n return { eventRepository, eventQueries, helpers, withUow };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,wCAAiD;AACjD,2CAGO;AAGP,2BAAc,oCARd;AASA,2BAAc,wCATd;AAUA,2BAAc,4CAVd;AAWA,2BAAc,+CAXd;AAYA,2BAAc,qCAZd;AAiBO,MAAM,gDAAgD,MAEtD;AACL,QAAM,EAAE,iBAAiB,QAAQ,QAC/B,0EAA2C;AAC7C,QAAM,EAAE,aAAa,QAAI,oEAAwC,OAAO;AACxE,QAAM,EAAE,QAAQ,QAAI,kEAAmC,eAAe;AACtE,SAAO,EAAE,iBAAiB,cAAc,SAAS,QAAQ;AAC3D;","names":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { createEffectInMemoryEventRepository, createEffectInMemoryWithUow } from './EffectInMemoryEventRepository.cjs';
|
|
2
|
+
import { GenericEvent, DefaultContext } from '../types.cjs';
|
|
3
|
+
export { GetEventsParams } from '../ports/EventQueries.cjs';
|
|
4
|
+
export { createEffectEventCrawler } from './EffectEventCrawler.cjs';
|
|
5
|
+
export { createEffectInMemoryEventBus } from './EffectInMemoryEventBus.cjs';
|
|
6
|
+
export { createEffectInMemoryEventQueries } from './EffectInMemoryEventQueries.cjs';
|
|
7
|
+
export { GlobalSubscriberConfig, TopicSubscriber, TopicSubscriptions, subscribeByTopic, subscribeGlobalToTopics } from './EffectSubscriptions.cjs';
|
|
8
|
+
export { EventBus } from './ports/EffectEventBus.cjs';
|
|
9
|
+
import { EventQueries } from './ports/EffectEventQueries.cjs';
|
|
10
|
+
import { EventRepository, WithEventsUow } from './ports/EffectEventRepository.cjs';
|
|
11
|
+
export { EventsUnitOfWork, WithEventsUowOptions } from './ports/EffectEventRepository.cjs';
|
|
12
|
+
import { InMemoryEventRepositoryHelpers } from '../adapters/in-memory/InMemoryEventRepository.cjs';
|
|
13
|
+
export { NarrowEvent, TopicFilter } from '../subscriptions.cjs';
|
|
14
|
+
import 'effect';
|
|
15
|
+
import '../createNewEvent.cjs';
|
|
16
|
+
import '../eventDefinitions.cjs';
|
|
17
|
+
import '../ports/EventRepository.cjs';
|
|
18
|
+
import '../ports/EventBus.cjs';
|
|
19
|
+
|
|
20
|
+
declare const createEffectInMemoryEventRepositoryAndQueries: <Event extends GenericEvent<string, unknown, DefaultContext>>() => {
|
|
21
|
+
eventRepository: EventRepository<Event>;
|
|
22
|
+
eventQueries: EventQueries<Event>;
|
|
23
|
+
helpers: InMemoryEventRepositoryHelpers<Event>;
|
|
24
|
+
withUow: WithEventsUow<Event>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { EventQueries, EventRepository, InMemoryEventRepositoryHelpers, WithEventsUow, createEffectInMemoryEventRepositoryAndQueries };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { createEffectInMemoryEventRepository, createEffectInMemoryWithUow } from './EffectInMemoryEventRepository.js';
|
|
2
|
+
import { GenericEvent, DefaultContext } from '../types.js';
|
|
3
|
+
export { GetEventsParams } from '../ports/EventQueries.js';
|
|
4
|
+
export { createEffectEventCrawler } from './EffectEventCrawler.js';
|
|
5
|
+
export { createEffectInMemoryEventBus } from './EffectInMemoryEventBus.js';
|
|
6
|
+
export { createEffectInMemoryEventQueries } from './EffectInMemoryEventQueries.js';
|
|
7
|
+
export { GlobalSubscriberConfig, TopicSubscriber, TopicSubscriptions, subscribeByTopic, subscribeGlobalToTopics } from './EffectSubscriptions.js';
|
|
8
|
+
export { EventBus } from './ports/EffectEventBus.js';
|
|
9
|
+
import { EventQueries } from './ports/EffectEventQueries.js';
|
|
10
|
+
import { EventRepository, WithEventsUow } from './ports/EffectEventRepository.js';
|
|
11
|
+
export { EventsUnitOfWork, WithEventsUowOptions } from './ports/EffectEventRepository.js';
|
|
12
|
+
import { InMemoryEventRepositoryHelpers } from '../adapters/in-memory/InMemoryEventRepository.js';
|
|
13
|
+
export { NarrowEvent, TopicFilter } from '../subscriptions.js';
|
|
14
|
+
import 'effect';
|
|
15
|
+
import '../createNewEvent.js';
|
|
16
|
+
import '../eventDefinitions.js';
|
|
17
|
+
import '../ports/EventRepository.js';
|
|
18
|
+
import '../ports/EventBus.js';
|
|
19
|
+
|
|
20
|
+
declare const createEffectInMemoryEventRepositoryAndQueries: <Event extends GenericEvent<string, unknown, DefaultContext>>() => {
|
|
21
|
+
eventRepository: EventRepository<Event>;
|
|
22
|
+
eventQueries: EventQueries<Event>;
|
|
23
|
+
helpers: InMemoryEventRepositoryHelpers<Event>;
|
|
24
|
+
withUow: WithEventsUow<Event>;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { EventQueries, EventRepository, InMemoryEventRepositoryHelpers, WithEventsUow, createEffectInMemoryEventRepositoryAndQueries };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createEffectInMemoryEventQueries } from "./EffectInMemoryEventQueries.mjs";
|
|
2
|
+
import {
|
|
3
|
+
createEffectInMemoryEventRepository,
|
|
4
|
+
createEffectInMemoryWithUow
|
|
5
|
+
} from "./EffectInMemoryEventRepository.mjs";
|
|
6
|
+
export * from "./EffectEventCrawler.mjs";
|
|
7
|
+
export * from "./EffectInMemoryEventBus.mjs";
|
|
8
|
+
export * from "./EffectInMemoryEventQueries.mjs";
|
|
9
|
+
export * from "./EffectInMemoryEventRepository.mjs";
|
|
10
|
+
export * from "./EffectSubscriptions.mjs";
|
|
11
|
+
const createEffectInMemoryEventRepositoryAndQueries = () => {
|
|
12
|
+
const { eventRepository, helpers } = createEffectInMemoryEventRepository();
|
|
13
|
+
const { eventQueries } = createEffectInMemoryEventQueries(helpers);
|
|
14
|
+
const { withUow } = createEffectInMemoryWithUow(eventRepository);
|
|
15
|
+
return { eventRepository, eventQueries, helpers, withUow };
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
createEffectInMemoryEventRepositoryAndQueries
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/effect/index.ts"],"sourcesContent":["import type { DefaultContext, GenericEvent } from '../types.mjs';\nimport { createEffectInMemoryEventQueries } from './EffectInMemoryEventQueries.mjs';\nimport {\n createEffectInMemoryEventRepository,\n createEffectInMemoryWithUow,\n} from './EffectInMemoryEventRepository.mjs';\n\nexport type { GetEventsParams } from '../ports/EventQueries.mjs';\nexport * from './EffectEventCrawler.mjs';\nexport * from './EffectInMemoryEventBus.mjs';\nexport * from './EffectInMemoryEventQueries.mjs';\nexport * from './EffectInMemoryEventRepository.mjs';\nexport * from './EffectSubscriptions.mjs';\nexport type * from './ports/EffectEventBus.mjs';\nexport type * from './ports/EffectEventQueries.mjs';\nexport type * from './ports/EffectEventRepository.mjs';\n\nexport const createEffectInMemoryEventRepositoryAndQueries = <\n Event extends GenericEvent<string, unknown, DefaultContext>,\n>() => {\n const { eventRepository, helpers } =\n createEffectInMemoryEventRepository<Event>();\n const { eventQueries } = createEffectInMemoryEventQueries<Event>(helpers);\n const { withUow } = createEffectInMemoryWithUow<Event>(eventRepository);\n return { eventRepository, eventQueries, helpers, withUow };\n};\n"],"mappings":"AACA,SAAS,wCAAwC;AACjD;AAAA,EACE;AAAA,EACA;AAAA,OACK;AAGP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAKP,MAAM,gDAAgD,MAEtD;AACL,QAAM,EAAE,iBAAiB,QAAQ,IAC/B,oCAA2C;AAC7C,QAAM,EAAE,aAAa,IAAI,iCAAwC,OAAO;AACxE,QAAM,EAAE,QAAQ,IAAI,4BAAmC,eAAe;AACtE,SAAO,EAAE,iBAAiB,cAAc,SAAS,QAAQ;AAC3D;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var EffectEventBus_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(EffectEventBus_exports);
|
|
17
|
+
//# sourceMappingURL=EffectEventBus.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/effect/ports/EffectEventBus.ts"],"sourcesContent":["import type { Effect } from \"effect\";\nimport type {\n DefaultContext,\n GenericEvent,\n SubscriptionId,\n} from \"../../types.ts\";\n\nexport type EventBus<\n Event extends GenericEvent<string, unknown, DefaultContext>,\n> = {\n publish: (event: Event) => Effect.Effect<void>;\n subscribe: <E extends GenericEvent<string, unknown, DefaultContext>>(params: {\n topic: E[\"topic\"];\n subscriptionId: SubscriptionId;\n callBack: (e: E) => Effect.Effect<void>;\n }) => void;\n};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { GenericEvent, DefaultContext, SubscriptionId } from '../../types.cjs';
|
|
3
|
+
|
|
4
|
+
type EventBus<Event extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
5
|
+
publish: (event: Event) => Effect.Effect<void>;
|
|
6
|
+
subscribe: <E extends GenericEvent<string, unknown, DefaultContext>>(params: {
|
|
7
|
+
topic: E["topic"];
|
|
8
|
+
subscriptionId: SubscriptionId;
|
|
9
|
+
callBack: (e: E) => Effect.Effect<void>;
|
|
10
|
+
}) => void;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type { EventBus };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Effect } from 'effect';
|
|
2
|
+
import { GenericEvent, DefaultContext, SubscriptionId } from '../../types.js';
|
|
3
|
+
|
|
4
|
+
type EventBus<Event extends GenericEvent<string, unknown, DefaultContext>> = {
|
|
5
|
+
publish: (event: Event) => Effect.Effect<void>;
|
|
6
|
+
subscribe: <E extends GenericEvent<string, unknown, DefaultContext>>(params: {
|
|
7
|
+
topic: E["topic"];
|
|
8
|
+
subscriptionId: SubscriptionId;
|
|
9
|
+
callBack: (e: E) => Effect.Effect<void>;
|
|
10
|
+
}) => void;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type { EventBus };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=EffectEventBus.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|