diff --git a/samples/webApi/expressjs-with-esdb/tsup.config.ts b/samples/webApi/expressjs-with-esdb/tsup.config.ts index 4b4a93dc..18811dbb 100644 --- a/samples/webApi/expressjs-with-esdb/tsup.config.ts +++ b/samples/webApi/expressjs-with-esdb/tsup.config.ts @@ -10,6 +10,8 @@ export default defineConfig({ minify: true, //env === 'production', bundle: true, //env === 'production', skipNodeModulesBundle: true, + entryPoints: ['src/index.ts'], + watch: env === 'development', target: 'esnext', outDir: 'dist', //env === 'production' ? 'dist' : 'lib', entry: ['src/index.ts'], diff --git a/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/api.ts b/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/api.ts index c3597cc7..3f7c1c1b 100644 --- a/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/api.ts +++ b/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/api.ts @@ -189,22 +189,6 @@ export const shoppingCartApi = }); }), ); - - // Get Shopping Cart - router.get( - '/clients/:clientId/shopping-carts/summary', - on(async (request: GetShoppingCartRequest) => { - const clientId = assertNotEmptyString(request.params.clientId); - - const result = await getClientShoppingSummary(readStore, clientId); - - if (result === null) return NotFound(); - - return OK({ - body: result, - }); - }), - ); }; // Add Product Item diff --git a/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/getClientShoppingSummary/index.ts b/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/getClientShoppingSummary/index.ts index 51f54ae9..6b30c8ec 100644 --- a/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/getClientShoppingSummary/index.ts +++ b/samples/webApi/expressjs-with-postgresql/src/shoppingCarts/getClientShoppingSummary/index.ts @@ -26,12 +26,6 @@ export type CancelledSummary = ShoppingSummary & { cartsCount: number; }; -const initialSummary = { - cartsCount: 0, - productItemsCount: 0, - totalAmount: 0, -}; - const evolve = ( document: ClientShoppingSummary | null, { type, data: event, metadata }: ShoppingCartEvent, @@ -99,6 +93,12 @@ const evolve = ( } }; +const initialSummary = { + cartsCount: 0, + productItemsCount: 0, + totalAmount: 0, +}; + const withAdjustedTotals = (options: { summary: ShoppingSummary | undefined; with: PricedProductItem | ShoppingSummary; @@ -125,18 +125,18 @@ const withAdjustedTotals = (options: { }; }; -const ClientShoppingSummaryCollectionName = 'ClientShoppingSummary'; +const clientShoppingSummaryCollectionName = 'ClientShoppingSummary'; export const getClientShoppingSummary = ( db: PongoDb, clientId: string, ): Promise => db - .collection(ClientShoppingSummaryCollectionName) + .collection(clientShoppingSummaryCollectionName) .findOne({ _id: clientId }); export const clientShoppingSummaryProjection = pongoMultiStreamProjection({ - collectionName: ClientShoppingSummaryCollectionName, + collectionName: clientShoppingSummaryCollectionName, getDocumentId: (event) => event.metadata.clientId, evolve, canHandle: [ diff --git a/src/package-lock.json b/src/package-lock.json index fd88a885..77bdd026 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -8,6 +8,7 @@ "name": "@event-driven-io/core", "version": "0.19.1", "workspaces": [ + "packages/emmett-shims", "packages/emmett", "packages/emmett-postgresql", "packages/emmett-esdb", @@ -52,7 +53,8 @@ "@types/express": "4.17.21", "@types/node": "^22.4.1", "@types/supertest": "6.0.2", - "supertest": "7.0.0" + "supertest": "7.0.0", + "web-streams-polyfill": "^4.0.0" } }, "node_modules/@algolia/autocomplete-core": { @@ -1012,6 +1014,10 @@ "resolved": "packages/emmett-postgresql", "link": true }, + "node_modules/@event-driven-io/emmett-shims": { + "resolved": "packages/emmett-shims", + "link": true + }, "node_modules/@event-driven-io/emmett-testcontainers": { "resolved": "packages/emmett-testcontainers", "link": true @@ -11027,13 +11033,13 @@ "emmett": "dist/cli.js" }, "peerDependencies": { + "@event-driven-io/emmett-shims": "0.19.1", "@types/async-retry": "^1.4.8", "@types/uuid": "^10.0.0", "async-retry": "^1.3.3", "commander": "^12.1.0", "ts-node": "^10.9.2", - "uuid": "^10.0.0", - "web-streams-polyfill": "^4.0.0" + "uuid": "^10.0.0" } }, "packages/emmett-esdb": { @@ -11086,6 +11092,25 @@ "@event-driven-io/pongo": "0.15.3" } }, + "packages/emmett-shims": { + "name": "@event-driven-io/emmett-shims", + "version": "0.19.1", + "devDependencies": { + "@types/node": "^20.11.30" + }, + "peerDependencies": { + "web-streams-polyfill": "^4.0.0" + } + }, + "packages/emmett-shims/node_modules/@types/node": { + "version": "20.16.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.16.10.tgz", + "integrity": "sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, "packages/emmett-testcontainers": { "name": "@event-driven-io/emmett-testcontainers", "version": "0.19.1", diff --git a/src/package.json b/src/package.json index 6a7ef916..4a6eba4d 100644 --- a/src/package.json +++ b/src/package.json @@ -3,7 +3,6 @@ "type": "module", "version": "0.19.1", "description": "Emmett - Event Sourcing development made simple", - "type": "module", "engines": { "node": ">=20.11.1" }, diff --git a/src/packages/emmett-esdb/package.json b/src/packages/emmett-esdb/package.json index 479656a4..f35595cf 100644 --- a/src/packages/emmett-esdb/package.json +++ b/src/packages/emmett-esdb/package.json @@ -3,7 +3,6 @@ "type": "module", "version": "0.19.1", "description": "Emmett - EventStoreDB - Event Sourcing development made simple", - "type": "module", "scripts": { "build": "tsup", "build:ts": "tsc", @@ -53,7 +52,6 @@ }, "peerDependencies": { "@event-driven-io/emmett": "0.19.1", - "@eventstore/db-client": "^6.2.1", - "web-streams-polyfill": "^4.0.0" + "@eventstore/db-client": "^6.2.1" } } diff --git a/src/packages/emmett-esdb/src/eventStore/eventstoreDBEventStore.ts b/src/packages/emmett-esdb/src/eventStore/eventstoreDBEventStore.ts index b42127f2..49773122 100644 --- a/src/packages/emmett-esdb/src/eventStore/eventstoreDBEventStore.ts +++ b/src/packages/emmett-esdb/src/eventStore/eventstoreDBEventStore.ts @@ -4,7 +4,6 @@ import { STREAM_DOES_NOT_EXIST, STREAM_EXISTS, globalStreamCaughtUp, - restream, streamTransformations, type AggregateStreamOptions, type AggregateStreamResult, @@ -15,7 +14,6 @@ import { type EventStore, type ExpectedStreamVersion, type GlobalStreamCaughtUp, - type GlobalSubscriptionEvent, type ReadEvent, type ReadEventMetadataWithGlobalPosition, type ReadStreamOptions, @@ -26,10 +24,8 @@ import { STREAM_EXISTS as ESDB_STREAM_EXISTS, EventStoreDBClient, NO_STREAM, - START, StreamNotFoundError, WrongExpectedVersionError, - excludeSystemEvents, jsonEvent, type AllStreamResolvedEvent, type AllStreamSubscription, @@ -179,7 +175,7 @@ export const getEventStoreDBEventStore = ( } }, - streamEvents: streamEvents(eventStore), + //streamEvents: streamEvents(eventStore), }; }; @@ -251,6 +247,7 @@ const assertExpectedVersionMatchesCurrent = ( throw new ExpectedVersionConflictError(current, expected); }; +// eslint-disable-next-line @typescript-eslint/no-unused-vars const convertToWebReadableStream = ( allStreamSubscription: AllStreamSubscription, ): ReadableStream => { @@ -289,23 +286,22 @@ const convertToWebReadableStream = ( ); }; -const streamEvents = (eventStore: EventStoreDBClient) => () => { - return restream< - AllStreamResolvedEvent | GlobalSubscriptionEvent, - | ReadEvent - // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents - | GlobalSubscriptionEvent - >( - (): ReadableStream => - convertToWebReadableStream( - eventStore.subscribeToAll({ - fromPosition: START, - filter: excludeSystemEvents(), - }), - ), - ( - resolvedEvent: AllStreamResolvedEvent | GlobalSubscriptionEvent, - ): ReadEvent => - mapFromESDBEvent(resolvedEvent.event as JSONRecordedEvent), - ); -}; +// const streamEvents = (eventStore: EventStoreDBClient) => () => { +// return restream< +// AllStreamResolvedEvent | GlobalSubscriptionEvent, +// | ReadEvent +// | GlobalSubscriptionEvent +// >( +// (): ReadableStream => +// convertToWebReadableStream( +// eventStore.subscribeToAll({ +// fromPosition: START, +// filter: excludeSystemEvents(), +// }), +// ), +// ( +// resolvedEvent: AllStreamResolvedEvent | GlobalSubscriptionEvent, +// ): ReadEvent => +// mapFromESDBEvent(resolvedEvent.event as JSONRecordedEvent), +// ); +// }; diff --git a/src/packages/emmett-expressjs/package.json b/src/packages/emmett-expressjs/package.json index 8f3687db..2760993a 100644 --- a/src/packages/emmett-expressjs/package.json +++ b/src/packages/emmett-expressjs/package.json @@ -55,7 +55,6 @@ "express": "^4.19.2", "express-async-errors": "^3.1.1", "http-problem-details": "^0.1.5", - "supertest": "^7.0.0", - "web-streams-polyfill": "^4.0.0" + "supertest": "^7.0.0" } } diff --git a/src/packages/emmett-fastify/package.json b/src/packages/emmett-fastify/package.json index e3b033a9..d5806e19 100644 --- a/src/packages/emmett-fastify/package.json +++ b/src/packages/emmett-fastify/package.json @@ -3,7 +3,6 @@ "version": "0.19.1", "type": "module", "description": "Emmett - Event Sourcing development made simple", - "type": "module", "scripts": { "build": "tsup", "build:ts": "tsc", diff --git a/src/packages/emmett-shims/package.json b/src/packages/emmett-shims/package.json index 906f8ddd..44f8962d 100644 --- a/src/packages/emmett-shims/package.json +++ b/src/packages/emmett-shims/package.json @@ -1,6 +1,6 @@ { "name": "@event-driven-io/emmett-shims", - "version": "0.11.2", + "version": "0.19.1", "type": "module", "description": "Emmett - Event Sourcing development made simple", "scripts": { diff --git a/src/packages/emmett-shims/src/index.ts b/src/packages/emmett-shims/src/index.ts index fc69c399..e19024a1 100644 --- a/src/packages/emmett-shims/src/index.ts +++ b/src/packages/emmett-shims/src/index.ts @@ -1,4 +1,10 @@ -import streamsPolyfill from 'web-streams-polyfill'; +import { + ReadableStream, + TransformStream, + WritableStream, +} from 'web-streams-polyfill'; + +const streamsPolyfill = { ReadableStream, WritableStream, TransformStream }; // https://github.com/jsdom/jsdom/issues/1537#issuecomment-229405327 @@ -40,18 +46,13 @@ let streams: typeof streamsPolyfill; if ( globalThis && - // @ts-expect-error global object check globalThis.WritableStream && - // @ts-expect-error global object check globalThis.ReadableStream && - // @ts-expect-error global object check globalThis.TransformStream ) { - // @ts-expect-error global object check streams = globalThis as typeof streamsPolyfill; } else { try { - // @ts-expect-error global object check streams = (await import('node:stream/web')) as typeof streamsPolyfill; } catch { // Just falling back to the default polyfill diff --git a/src/packages/emmett-testcontainers/package.json b/src/packages/emmett-testcontainers/package.json index bf91f0dd..14c016a5 100644 --- a/src/packages/emmett-testcontainers/package.json +++ b/src/packages/emmett-testcontainers/package.json @@ -3,7 +3,6 @@ "version": "0.19.1", "type": "module", "description": "Emmett - TestContainers - Event Sourcing development made simple", - "type": "module", "scripts": { "build": "tsup", "build:ts": "tsc", diff --git a/src/packages/emmett-tests/src/eventStore/esdb/eventstoreDBEventStore.e2e.spec.ts b/src/packages/emmett-tests/src/eventStore/esdb/eventstoreDBEventStore.e2e.spec.ts index 91434711..7b954ad6 100644 --- a/src/packages/emmett-tests/src/eventStore/esdb/eventstoreDBEventStore.e2e.spec.ts +++ b/src/packages/emmett-tests/src/eventStore/esdb/eventstoreDBEventStore.e2e.spec.ts @@ -1,21 +1,15 @@ -import { - assertEqual, - collect, - isGlobalStreamCaughtUp, - streamTransformations, - type Event, -} from '@event-driven-io/emmett'; +//import { streamTransformations, type Event } from '@event-driven-io/emmett'; import { getEventStoreDBEventStore } from '@event-driven-io/emmett-esdb'; import { EventStoreDBContainer, StartedEventStoreDBContainer, } from '@event-driven-io/emmett-testcontainers'; -import { after, describe, it } from 'node:test'; +import { describe } from 'node:test'; import { testAggregateStream, type EventStoreFactory } from '../features'; -const { stopOn } = streamTransformations; +// const { stopOn } = streamTransformations; -type MockEvent = Event<'Mocked', { mocked: true }>; +// type MockEvent = Event<'Mocked', { mocked: true }>; void describe('EventStoreDBEventStore', async () => { let esdbContainer: StartedEventStoreDBContainer; @@ -25,35 +19,32 @@ void describe('EventStoreDBEventStore', async () => { return getEventStoreDBEventStore(esdbContainer.getClient()); }; - after(async () => { + const teardownHook = async () => { await esdbContainer.stop(); - }); - - // const teardownHook = async () => { - // await esdbContainer.stop(); - // }; + }; await testAggregateStream(eventStoreFactory, { + teardownHook, getInitialIndex: () => 0n, }); - void it.skip('Successful subscription and processing of events', async () => { - const eventStore = await eventStoreFactory(); - const streamName = 'test-stream'; + // void it.skip('Successful subscription and processing of events', async () => { + // const eventStore = await eventStoreFactory(); + // const streamName = 'test-stream'; - const events: MockEvent[] = [ - { type: 'Mocked', data: { mocked: true } }, - { type: 'Mocked', data: { mocked: true } }, - ]; + // const events: MockEvent[] = [ + // { type: 'Mocked', data: { mocked: true } }, + // { type: 'Mocked', data: { mocked: true } }, + // ]; - await eventStore.appendToStream(streamName, events); + // await eventStore.appendToStream(streamName, events); - const readableStream = eventStore - .streamEvents() - .pipeThrough(stopOn(isGlobalStreamCaughtUp)); + // const readableStream = eventStore + // .streamEvents() + // .pipeThrough(stopOn(isGlobalStreamCaughtUp)); - const receivedEvents = await collect(readableStream); + // const receivedEvents = await collect(readableStream); - assertEqual(receivedEvents.length, events.length); - }); + // assertEqual(receivedEvents.length, events.length); + // }); }); diff --git a/src/packages/emmett-tests/src/eventStore/inMemory/inMemoryEventStore.unit.spec.ts b/src/packages/emmett-tests/src/eventStore/inMemory/inMemoryEventStore.unit.spec.ts index 456a661d..8aaf7cf5 100644 --- a/src/packages/emmett-tests/src/eventStore/inMemory/inMemoryEventStore.unit.spec.ts +++ b/src/packages/emmett-tests/src/eventStore/inMemory/inMemoryEventStore.unit.spec.ts @@ -1,34 +1,31 @@ -import { describe, it } from 'node:test'; -import { getInMemoryEventStore, isGlobalStreamCaughtUp } from '../eventStore'; -import { collect, streamTransformations } from '../streaming'; -import { assertEqual } from '../testing'; -import { testAggregateStream } from '../testing/features'; -import { type Event } from '../typing'; +import { getInMemoryEventStore } from '@event-driven-io/emmett'; +import { describe } from 'node:test'; +import { testAggregateStream } from '../features'; -const { stopOn } = streamTransformations; +// const { stopOn } = streamTransformations; -type MockEvent = Event<'Mocked', { mocked: true }>; +// type MockEvent = Event<'Mocked', { mocked: true }>; void describe('InMemoryEventStore', () => { void testAggregateStream(() => Promise.resolve(getInMemoryEventStore())); - void it('Successful subscription and processing of events', async () => { - const eventStore = getInMemoryEventStore(); - const streamName = 'test-stream'; + // void it('Successful subscription and processing of events', async () => { + // const eventStore = getInMemoryEventStore(); + // const streamName = 'test-stream'; - const events: MockEvent[] = [ - { type: 'Mocked', data: { mocked: true } }, - { type: 'Mocked', data: { mocked: true } }, - ]; + // const events: MockEvent[] = [ + // { type: 'Mocked', data: { mocked: true } }, + // { type: 'Mocked', data: { mocked: true } }, + // ]; - await eventStore.appendToStream(streamName, events); + // await eventStore.appendToStream(streamName, events); - const readableStream = eventStore - .streamEvents() - .pipeThrough(stopOn(isGlobalStreamCaughtUp)); + // const readableStream = eventStore + // .streamEvents() + // .pipeThrough(stopOn(isGlobalStreamCaughtUp)); - const receivedEvents = await collect(readableStream); + // const receivedEvents = await collect(readableStream); - assertEqual(receivedEvents.length, events.length); - }); + // assertEqual(receivedEvents.length, events.length); + // }); }); diff --git a/src/packages/emmett/package.json b/src/packages/emmett/package.json index dada9804..2e9ea12f 100644 --- a/src/packages/emmett/package.json +++ b/src/packages/emmett/package.json @@ -3,7 +3,6 @@ "type": "module", "version": "0.19.1", "description": "Emmett - Event Sourcing development made simple", - "type": "module", "scripts": { "build": "tsup", "build:ts": "tsc", @@ -71,13 +70,12 @@ "emmett": "./dist/cli.js" }, "peerDependencies": { - "@event-driven-io/emmett-shims": "0.11.2", + "@event-driven-io/emmett-shims": "0.19.1", "@types/async-retry": "^1.4.8", "@types/uuid": "^10.0.0", "async-retry": "^1.3.3", "commander": "^12.1.0", "uuid": "^10.0.0", - "web-streams-polyfill": "^4.0.0", "ts-node": "^10.9.2" } } diff --git a/src/packages/emmett/src/eventStore/eventStore.ts b/src/packages/emmett/src/eventStore/eventStore.ts index d728d5e1..baa10ad4 100644 --- a/src/packages/emmett/src/eventStore/eventStore.ts +++ b/src/packages/emmett/src/eventStore/eventStore.ts @@ -1,6 +1,6 @@ -import type { ReadableStream } from '@event-driven-io/emmett-shims'; +//import type { ReadableStream } from '@event-driven-io/emmett-shims'; import type { Event, ReadEvent, ReadEventMetadata } from '../typing'; -import type { GlobalSubscriptionEvent } from './events'; +//import type { GlobalSubscriptionEvent } from './events'; import type { ExpectedStreamVersion } from './expectedVersion'; // #region event-store @@ -29,9 +29,9 @@ export interface EventStore< options?: AppendToStreamOptions, ): Promise>; - streamEvents(): ReadableStream< - ReadEvent | GlobalSubscriptionEvent - >; + // streamEvents(): ReadableStream< + // ReadEvent | GlobalSubscriptionEvent + // >; } export type EventStoreSession< diff --git a/src/packages/emmett/src/eventStore/inMemoryEventStore.ts b/src/packages/emmett/src/eventStore/inMemoryEventStore.ts index 853ff35a..e5934fcd 100644 --- a/src/packages/emmett/src/eventStore/inMemoryEventStore.ts +++ b/src/packages/emmett/src/eventStore/inMemoryEventStore.ts @@ -155,6 +155,6 @@ export const getInMemoryEventStore = (): EventStore< return result; }, - streamEvents: streamingCoordinator.stream, + //streamEvents: streamingCoordinator.stream, }; }; diff --git a/src/packages/emmett/src/eventStore/subscriptions/streamingCoordinator.unit.spec.ts b/src/packages/emmett/src/eventStore/subscriptions/streamingCoordinator.unit.spec.ts index 37adda74..2b9702d4 100644 --- a/src/packages/emmett/src/eventStore/subscriptions/streamingCoordinator.unit.spec.ts +++ b/src/packages/emmett/src/eventStore/subscriptions/streamingCoordinator.unit.spec.ts @@ -8,7 +8,11 @@ import { type ReadEvent, type ReadEventMetadataWithGlobalPosition, } from '../../typing'; -import { caughtUpEventFrom, globalStreamCaughtUp } from '../events'; +import { + caughtUpEventFrom, + globalStreamCaughtUp, + type GlobalStreamCaughtUp, +} from '../events'; import { StreamingCoordinator } from './streamingCoordinator'; void describe('StreamingCoordinator', () => { @@ -59,7 +63,10 @@ void describe('StreamingCoordinator', () => { const result = await collectedEvents; assertDeepEqual(result, [ - globalStreamCaughtUp({ globalPosition: 0n }), + globalStreamCaughtUp({ globalPosition: 0n }) as ReadEvent< + GlobalStreamCaughtUp, + ReadEventMetadataWithGlobalPosition + >, event, ]); }); @@ -86,12 +93,18 @@ void describe('StreamingCoordinator', () => { const result2 = await collectedEvents2; assertDeepEqual(result1, [ - globalStreamCaughtUp({ globalPosition: 0n }), + globalStreamCaughtUp({ globalPosition: 0n }) as ReadEvent< + GlobalStreamCaughtUp, + ReadEventMetadataWithGlobalPosition + >, event1, event2, ]); assertDeepEqual(result2, [ - globalStreamCaughtUp({ globalPosition: 0n }), + globalStreamCaughtUp({ globalPosition: 0n }) as ReadEvent< + GlobalStreamCaughtUp, + ReadEventMetadataWithGlobalPosition + >, event1, event2, ]); diff --git a/src/packages/emmett/src/streaming/transformations/retry.unit.spec.ts b/src/packages/emmett/src/streaming/transformations/retry.unit.spec.ts index bef2cde4..97942e3a 100644 --- a/src/packages/emmett/src/streaming/transformations/retry.unit.spec.ts +++ b/src/packages/emmett/src/streaming/transformations/retry.unit.spec.ts @@ -81,7 +81,7 @@ void describe('retry', () => { const reader = transformStream.readable.getReader(); try { await reader.read(); - } catch (error) { + } catch { errorCaught = true; } diff --git a/src/packages/emmett/src/testing/assertions.ts b/src/packages/emmett/src/testing/assertions.ts index 9bd59811..99b91e77 100644 --- a/src/packages/emmett/src/testing/assertions.ts +++ b/src/packages/emmett/src/testing/assertions.ts @@ -8,13 +8,6 @@ export class AssertionError extends Error { } } -const stringify = (obj: unknown) => - JSON.stringify( - obj, - // eslint-disable-next-line @typescript-eslint/no-unsafe-return - (_, value) => (typeof value === 'bigint' ? value.toString() : value), - ); - export const isSubset = (superObj: unknown, subObj: unknown): boolean => { const sup = superObj as DefaultRecord; const sub = subObj as DefaultRecord; diff --git a/src/packages/emmett/src/testing/wrapEventStore.ts b/src/packages/emmett/src/testing/wrapEventStore.ts index 44b72830..e6a94f5f 100644 --- a/src/packages/emmett/src/testing/wrapEventStore.ts +++ b/src/packages/emmett/src/testing/wrapEventStore.ts @@ -1,4 +1,3 @@ -import type { ReadableStream } from '@event-driven-io/emmett-shims'; import type { AggregateStreamOptions, AggregateStreamResult, @@ -6,11 +5,10 @@ import type { AppendToStreamResult, DefaultStreamVersionType, EventStore, - GlobalSubscriptionEvent, ReadStreamOptions, ReadStreamResult, } from '../eventStore'; -import { type Event, type ReadEvent, type ReadEventMetadata } from '../typing'; +import { type Event, type ReadEventMetadata } from '../typing'; export type TestEventStream = [ string, @@ -78,11 +76,11 @@ export const WrapEventStore = < return eventStore.appendToStream(streamName, events); }, - streamEvents: (): ReadableStream< - // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents - ReadEvent | GlobalSubscriptionEvent - > => { - return eventStore.streamEvents(); - }, + // streamEvents: (): ReadableStream< + // // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents + // ReadEvent | GlobalSubscriptionEvent + // > => { + // return eventStore.streamEvents(); + // }, }; };