@event-driven-io/emmett-testcontainers 0.17.0 → 0.18.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/dist/index.d.mts +31 -4
- package/dist/index.d.ts +31 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-KRK662GT.mjs +0 -2
- package/dist/chunk-KRK662GT.mjs.map +0 -1
- package/dist/chunk-MOHBTVDP.js +0 -2
- package/dist/chunk-MOHBTVDP.js.map +0 -1
- package/dist/chunk-P5YRDUIG.mjs +0 -2
- package/dist/chunk-P5YRDUIG.mjs.map +0 -1
- package/dist/chunk-YKV66PD2.js +0 -2
- package/dist/chunk-YKV66PD2.js.map +0 -1
- package/dist/eventStore/eventStoreDBContainer.d.mts +0 -29
- package/dist/eventStore/eventStoreDBContainer.d.ts +0 -29
- package/dist/eventStore/eventStoreDBContainer.js +0 -2
- package/dist/eventStore/eventStoreDBContainer.js.map +0 -1
- package/dist/eventStore/eventStoreDBContainer.mjs +0 -2
- package/dist/eventStore/eventStoreDBContainer.mjs.map +0 -1
- package/dist/eventStore/index.d.mts +0 -7
- package/dist/eventStore/index.d.ts +0 -7
- package/dist/eventStore/index.js +0 -2
- package/dist/eventStore/index.js.map +0 -1
- package/dist/eventStore/index.mjs +0 -2
- package/dist/eventStore/index.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
+
import { GenericContainer, AbstractStartedContainer, StartedTestContainer } from 'testcontainers';
|
|
3
|
+
|
|
4
|
+
declare const EVENTSTOREDB_PORT = 2113;
|
|
5
|
+
declare const EVENTSTOREDB_TCP_PORT = 1113;
|
|
6
|
+
declare const EVENTSTOREDB_TCP_PORTS: number[];
|
|
7
|
+
declare const EVENTSTOREDB_IMAGE_NAME = "eventstore/eventstore";
|
|
8
|
+
declare const EVENTSTOREDB_IMAGE_TAG = "23.10.1-bookworm-slim";
|
|
9
|
+
declare const EVENTSTOREDB_ARM64_IMAGE_TAG = "23.10.1-alpha-arm64v8";
|
|
10
|
+
declare const EVENTSTOREDB_DEFAULT_IMAGE: string;
|
|
11
|
+
type EventStoreDBContainerOptions = {
|
|
12
|
+
disableProjections?: boolean;
|
|
13
|
+
isSecure?: boolean;
|
|
14
|
+
useFileStorage?: boolean;
|
|
15
|
+
withoutReuse?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions;
|
|
18
|
+
declare class EventStoreDBContainer extends GenericContainer {
|
|
19
|
+
private readonly tcpPorts;
|
|
20
|
+
constructor(image?: string, options?: EventStoreDBContainerOptions);
|
|
21
|
+
start(): Promise<StartedEventStoreDBContainer>;
|
|
22
|
+
}
|
|
23
|
+
declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
24
|
+
constructor(container: StartedTestContainer);
|
|
25
|
+
getConnectionString(): string;
|
|
26
|
+
getClient(): EventStoreDBClient;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare const getEventStoreDBTestClient: (useTestContainers?: boolean) => Promise<EventStoreDBClient>;
|
|
30
|
+
|
|
31
|
+
export { EVENTSTOREDB_ARM64_IMAGE_TAG, EVENTSTOREDB_DEFAULT_IMAGE, EVENTSTOREDB_IMAGE_NAME, EVENTSTOREDB_IMAGE_TAG, EVENTSTOREDB_PORT, EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_TCP_PORTS, EventStoreDBContainer, type EventStoreDBContainerOptions, StartedEventStoreDBContainer, defaultEventStoreDBContainerOptions, getEventStoreDBTestClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
+
import { GenericContainer, AbstractStartedContainer, StartedTestContainer } from 'testcontainers';
|
|
3
|
+
|
|
4
|
+
declare const EVENTSTOREDB_PORT = 2113;
|
|
5
|
+
declare const EVENTSTOREDB_TCP_PORT = 1113;
|
|
6
|
+
declare const EVENTSTOREDB_TCP_PORTS: number[];
|
|
7
|
+
declare const EVENTSTOREDB_IMAGE_NAME = "eventstore/eventstore";
|
|
8
|
+
declare const EVENTSTOREDB_IMAGE_TAG = "23.10.1-bookworm-slim";
|
|
9
|
+
declare const EVENTSTOREDB_ARM64_IMAGE_TAG = "23.10.1-alpha-arm64v8";
|
|
10
|
+
declare const EVENTSTOREDB_DEFAULT_IMAGE: string;
|
|
11
|
+
type EventStoreDBContainerOptions = {
|
|
12
|
+
disableProjections?: boolean;
|
|
13
|
+
isSecure?: boolean;
|
|
14
|
+
useFileStorage?: boolean;
|
|
15
|
+
withoutReuse?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions;
|
|
18
|
+
declare class EventStoreDBContainer extends GenericContainer {
|
|
19
|
+
private readonly tcpPorts;
|
|
20
|
+
constructor(image?: string, options?: EventStoreDBContainerOptions);
|
|
21
|
+
start(): Promise<StartedEventStoreDBContainer>;
|
|
22
|
+
}
|
|
23
|
+
declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
24
|
+
constructor(container: StartedTestContainer);
|
|
25
|
+
getConnectionString(): string;
|
|
26
|
+
getClient(): EventStoreDBClient;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare const getEventStoreDBTestClient: (useTestContainers?: boolean) => Promise<EventStoreDBClient>;
|
|
30
|
+
|
|
31
|
+
export { EVENTSTOREDB_ARM64_IMAGE_TAG, EVENTSTOREDB_DEFAULT_IMAGE, EVENTSTOREDB_IMAGE_NAME, EVENTSTOREDB_IMAGE_TAG, EVENTSTOREDB_PORT, EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_TCP_PORTS, EventStoreDBContainer, type EventStoreDBContainerOptions, StartedEventStoreDBContainer, defaultEventStoreDBContainerOptions, getEventStoreDBTestClient };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _dbclient = require('@eventstore/db-client');var _testcontainers = require('testcontainers');var s=2113,i= exports.EVENTSTOREDB_TCP_PORT =1113,l= exports.EVENTSTOREDB_TCP_PORTS =[i,s],_= exports.EVENTSTOREDB_IMAGE_NAME ="eventstore/eventstore",R= exports.EVENTSTOREDB_IMAGE_TAG ="23.10.1-bookworm-slim",p= exports.EVENTSTOREDB_ARM64_IMAGE_TAG ="23.10.1-alpha-arm64v8",O= exports.EVENTSTOREDB_DEFAULT_IMAGE =`${_}:${process.arch!=="arm64"?R:p}`,u= exports.defaultEventStoreDBContainerOptions ={disableProjections:!1,isSecure:!1,useFileStorage:!1,withoutReuse:!1},o= exports.EventStoreDBContainer = (_class =class extends _testcontainers.GenericContainer{__init() {this.tcpPorts=l}constructor(t=O,e=u){super(t);_class.prototype.__init.call(this);;let T={...e.disableProjections?{}:{EVENTSTORE_RUN_PROJECTIONS:"ALL"},...e.isSecure?{}:{EVENTSTORE_INSECURE:"true"},...e.useFileStorage?{EVENTSTORE_MEM_DB:"false",EVENTSTORE_DB:"/data/integration-tests"}:{},EVENTSTORE_CLUSTER_SIZE:"1",EVENTSTORE_START_STANDARD_PROJECTIONS:"true",EVENTSTORE_EXT_TCP_PORT:`${i}`,EVENTSTORE_HTTP_PORT:`${s}`,EVENTSTORE_ENABLE_EXTERNAL_TCP:"true",EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP:"true"};this.withEnvironment(T).withExposedPorts(...this.tcpPorts),e.withoutReuse||this.withReuse()}async start(){return new r(await super.start())}}, _class),r= exports.StartedEventStoreDBContainer =class extends _testcontainers.AbstractStartedContainer{constructor(t){super(t)}getConnectionString(){return`esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`}getClient(){return _dbclient.EventStoreDBClient.connectionString(this.getConnectionString())}};var E,f= exports.getEventStoreDBTestClient =async(n=!1)=>{let t;return n?(E||(E=await new o().start()),t=E.getConnectionString()):t="esdb://localhost:2113?tls=false",_dbclient.EventStoreDBClient.connectionString(t)};exports.EVENTSTOREDB_ARM64_IMAGE_TAG = p; exports.EVENTSTOREDB_DEFAULT_IMAGE = O; exports.EVENTSTOREDB_IMAGE_NAME = _; exports.EVENTSTOREDB_IMAGE_TAG = R; exports.EVENTSTOREDB_PORT = s; exports.EVENTSTOREDB_TCP_PORT = i; exports.EVENTSTOREDB_TCP_PORTS = l; exports.EventStoreDBContainer = o; exports.StartedEventStoreDBContainer = r; exports.defaultEventStoreDBContainerOptions = u; exports.getEventStoreDBTestClient = f;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"sources":["../src/eventStore/index.ts","../src/eventStore/eventStoreDBContainer.ts"],"names":["EVENTSTOREDB_PORT","EVENTSTOREDB_TCP_PORT","EVENTSTOREDB_TCP_PORTS","EVENTSTOREDB_IMAGE_NAME","EVENTSTOREDB_IMAGE_TAG","EVENTSTOREDB_ARM64_IMAGE_TAG","EVENTSTOREDB_DEFAULT_IMAGE"],"mappings":"AAAA,sIAAmC,gDCK5B,IAGMA,CAAAA,CAAoB,IAAA,CACpBC,CAAAA,iCAAwB,IAAA,CACxBC,CAAAA,kCAAyB,CACpCD,CAAAA,CACAD,CACF,CAAA,CACaG,CAAAA,mCAA0B,uBAAA,CAC1BC,CAAAA,kCAAyB,uBAAA,CACzBC,CAAAA,wCAA+B,uBAAA,CAE/BC,CAAAA,sCAA6B,CAAA,EAAA","file":"/home/runner/work/emmett/emmett/src/packages/emmett-testcontainers/dist/index.js","sourcesContent":["import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n EventStoreDBContainer,\n StartedEventStoreDBContainer,\n} from './eventStoreDBContainer';\n\nexport * from './eventStoreDBContainer';\n\nlet esdbContainer: StartedEventStoreDBContainer;\n\nexport const getEventStoreDBTestClient = async (\n useTestContainers = false,\n): Promise<EventStoreDBClient> => {\n let connectionString;\n\n if (useTestContainers) {\n if (!esdbContainer)\n esdbContainer = await new EventStoreDBContainer().start();\n\n connectionString = esdbContainer.getConnectionString();\n } else {\n // await compose.upAll();\n connectionString = 'esdb://localhost:2113?tls=false';\n }\n\n // That's how EventStoreDB client is setup\n // We're taking the connection string from container\n return EventStoreDBClient.connectionString(connectionString);\n};\n","import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n AbstractStartedContainer,\n GenericContainer,\n type StartedTestContainer,\n} from 'testcontainers';\nimport type { Environment } from 'testcontainers/build/types';\n\nexport const EVENTSTOREDB_PORT = 2113;\nexport const EVENTSTOREDB_TCP_PORT = 1113;\nexport const EVENTSTOREDB_TCP_PORTS = [\n EVENTSTOREDB_TCP_PORT,\n EVENTSTOREDB_PORT,\n];\nexport const EVENTSTOREDB_IMAGE_NAME = 'eventstore/eventstore';\nexport const EVENTSTOREDB_IMAGE_TAG = '23.10.1-bookworm-slim';\nexport const EVENTSTOREDB_ARM64_IMAGE_TAG = '23.10.1-alpha-arm64v8';\n\nexport const EVENTSTOREDB_DEFAULT_IMAGE = `${EVENTSTOREDB_IMAGE_NAME}:${process.arch !== 'arm64' ? EVENTSTOREDB_IMAGE_TAG : EVENTSTOREDB_ARM64_IMAGE_TAG}`;\n\nexport type EventStoreDBContainerOptions = {\n disableProjections?: boolean;\n isSecure?: boolean;\n useFileStorage?: boolean;\n withoutReuse?: boolean;\n};\n\nexport const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions =\n {\n disableProjections: false,\n isSecure: false,\n useFileStorage: false,\n withoutReuse: false,\n };\n\nexport class EventStoreDBContainer extends GenericContainer {\n private readonly tcpPorts = EVENTSTOREDB_TCP_PORTS;\n\n constructor(\n image = EVENTSTOREDB_DEFAULT_IMAGE,\n options: EventStoreDBContainerOptions = defaultEventStoreDBContainerOptions,\n ) {\n super(image);\n\n const environment: Environment = {\n ...(!options.disableProjections\n ? {\n EVENTSTORE_RUN_PROJECTIONS: 'ALL',\n }\n : {}),\n ...(!options.isSecure\n ? {\n EVENTSTORE_INSECURE: 'true',\n }\n : {}),\n ...(options.useFileStorage\n ? {\n EVENTSTORE_MEM_DB: 'false',\n EVENTSTORE_DB: '/data/integration-tests',\n }\n : {}),\n EVENTSTORE_CLUSTER_SIZE: '1',\n EVENTSTORE_START_STANDARD_PROJECTIONS: 'true',\n EVENTSTORE_EXT_TCP_PORT: `${EVENTSTOREDB_TCP_PORT}`,\n EVENTSTORE_HTTP_PORT: `${EVENTSTOREDB_PORT}`,\n EVENTSTORE_ENABLE_EXTERNAL_TCP: 'true',\n EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP: 'true',\n };\n\n this.withEnvironment(environment).withExposedPorts(...this.tcpPorts);\n\n if (!options.withoutReuse) this.withReuse();\n }\n\n async start(): Promise<StartedEventStoreDBContainer> {\n return new StartedEventStoreDBContainer(await super.start());\n }\n}\n\nexport class StartedEventStoreDBContainer extends AbstractStartedContainer {\n constructor(container: StartedTestContainer) {\n super(container);\n }\n\n getConnectionString(): string {\n return `esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`;\n }\n\n getClient(): EventStoreDBClient {\n return EventStoreDBClient.connectionString(this.getConnectionString());\n }\n}\n"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{EventStoreDBClient as C}from"@eventstore/db-client";import{EventStoreDBClient as a}from"@eventstore/db-client";import{AbstractStartedContainer as S,GenericContainer as c}from"testcontainers";var s=2113,i=1113,l=[i,s],_="eventstore/eventstore",R="23.10.1-bookworm-slim",p="23.10.1-alpha-arm64v8",O=`${_}:${process.arch!=="arm64"?R:p}`,u={disableProjections:!1,isSecure:!1,useFileStorage:!1,withoutReuse:!1},o=class extends c{tcpPorts=l;constructor(t=O,e=u){super(t);let T={...e.disableProjections?{}:{EVENTSTORE_RUN_PROJECTIONS:"ALL"},...e.isSecure?{}:{EVENTSTORE_INSECURE:"true"},...e.useFileStorage?{EVENTSTORE_MEM_DB:"false",EVENTSTORE_DB:"/data/integration-tests"}:{},EVENTSTORE_CLUSTER_SIZE:"1",EVENTSTORE_START_STANDARD_PROJECTIONS:"true",EVENTSTORE_EXT_TCP_PORT:`${i}`,EVENTSTORE_HTTP_PORT:`${s}`,EVENTSTORE_ENABLE_EXTERNAL_TCP:"true",EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP:"true"};this.withEnvironment(T).withExposedPorts(...this.tcpPorts),e.withoutReuse||this.withReuse()}async start(){return new r(await super.start())}},r=class extends S{constructor(t){super(t)}getConnectionString(){return`esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`}getClient(){return a.connectionString(this.getConnectionString())}};var E,f=async(n=!1)=>{let t;return n?(E||(E=await new o().start()),t=E.getConnectionString()):t="esdb://localhost:2113?tls=false",C.connectionString(t)};export{p as EVENTSTOREDB_ARM64_IMAGE_TAG,O as EVENTSTOREDB_DEFAULT_IMAGE,_ as EVENTSTOREDB_IMAGE_NAME,R as EVENTSTOREDB_IMAGE_TAG,s as EVENTSTOREDB_PORT,i as EVENTSTOREDB_TCP_PORT,l as EVENTSTOREDB_TCP_PORTS,o as EventStoreDBContainer,r as StartedEventStoreDBContainer,u as defaultEventStoreDBContainerOptions,f as getEventStoreDBTestClient};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/eventStore/index.ts","../src/eventStore/eventStoreDBContainer.ts"],"sourcesContent":["import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n EventStoreDBContainer,\n StartedEventStoreDBContainer,\n} from './eventStoreDBContainer';\n\nexport * from './eventStoreDBContainer';\n\nlet esdbContainer: StartedEventStoreDBContainer;\n\nexport const getEventStoreDBTestClient = async (\n useTestContainers = false,\n): Promise<EventStoreDBClient> => {\n let connectionString;\n\n if (useTestContainers) {\n if (!esdbContainer)\n esdbContainer = await new EventStoreDBContainer().start();\n\n connectionString = esdbContainer.getConnectionString();\n } else {\n // await compose.upAll();\n connectionString = 'esdb://localhost:2113?tls=false';\n }\n\n // That's how EventStoreDB client is setup\n // We're taking the connection string from container\n return EventStoreDBClient.connectionString(connectionString);\n};\n","import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n AbstractStartedContainer,\n GenericContainer,\n type StartedTestContainer,\n} from 'testcontainers';\nimport type { Environment } from 'testcontainers/build/types';\n\nexport const EVENTSTOREDB_PORT = 2113;\nexport const EVENTSTOREDB_TCP_PORT = 1113;\nexport const EVENTSTOREDB_TCP_PORTS = [\n EVENTSTOREDB_TCP_PORT,\n EVENTSTOREDB_PORT,\n];\nexport const EVENTSTOREDB_IMAGE_NAME = 'eventstore/eventstore';\nexport const EVENTSTOREDB_IMAGE_TAG = '23.10.1-bookworm-slim';\nexport const EVENTSTOREDB_ARM64_IMAGE_TAG = '23.10.1-alpha-arm64v8';\n\nexport const EVENTSTOREDB_DEFAULT_IMAGE = `${EVENTSTOREDB_IMAGE_NAME}:${process.arch !== 'arm64' ? EVENTSTOREDB_IMAGE_TAG : EVENTSTOREDB_ARM64_IMAGE_TAG}`;\n\nexport type EventStoreDBContainerOptions = {\n disableProjections?: boolean;\n isSecure?: boolean;\n useFileStorage?: boolean;\n withoutReuse?: boolean;\n};\n\nexport const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions =\n {\n disableProjections: false,\n isSecure: false,\n useFileStorage: false,\n withoutReuse: false,\n };\n\nexport class EventStoreDBContainer extends GenericContainer {\n private readonly tcpPorts = EVENTSTOREDB_TCP_PORTS;\n\n constructor(\n image = EVENTSTOREDB_DEFAULT_IMAGE,\n options: EventStoreDBContainerOptions = defaultEventStoreDBContainerOptions,\n ) {\n super(image);\n\n const environment: Environment = {\n ...(!options.disableProjections\n ? {\n EVENTSTORE_RUN_PROJECTIONS: 'ALL',\n }\n : {}),\n ...(!options.isSecure\n ? {\n EVENTSTORE_INSECURE: 'true',\n }\n : {}),\n ...(options.useFileStorage\n ? {\n EVENTSTORE_MEM_DB: 'false',\n EVENTSTORE_DB: '/data/integration-tests',\n }\n : {}),\n EVENTSTORE_CLUSTER_SIZE: '1',\n EVENTSTORE_START_STANDARD_PROJECTIONS: 'true',\n EVENTSTORE_EXT_TCP_PORT: `${EVENTSTOREDB_TCP_PORT}`,\n EVENTSTORE_HTTP_PORT: `${EVENTSTOREDB_PORT}`,\n EVENTSTORE_ENABLE_EXTERNAL_TCP: 'true',\n EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP: 'true',\n };\n\n this.withEnvironment(environment).withExposedPorts(...this.tcpPorts);\n\n if (!options.withoutReuse) this.withReuse();\n }\n\n async start(): Promise<StartedEventStoreDBContainer> {\n return new StartedEventStoreDBContainer(await super.start());\n }\n}\n\nexport class StartedEventStoreDBContainer extends AbstractStartedContainer {\n constructor(container: StartedTestContainer) {\n super(container);\n }\n\n getConnectionString(): string {\n return `esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`;\n }\n\n getClient(): EventStoreDBClient {\n return EventStoreDBClient.connectionString(this.getConnectionString());\n }\n}\n"],"mappings":"AAAA,OAAS,sBAAAA,MAA0B,wBCAnC,OAAS,sBAAAC,MAA0B,wBACnC,OACE,4BAAAC,EACA,oBAAAC,MAEK,iBAGA,IAAMC,EAAoB,KACpBC,EAAwB,KACxBC,EAAyB,CACpCD,EACAD,CACF,EACaG,EAA0B,wBAC1BC,EAAyB,wBACzBC,EAA+B,wBAE/BC,EAA6B,GAAGH,CAAuB,IAAI,QAAQ,OAAS,QAAUC,EAAyBC,CAA4B,GAS3IE,EACX,CACE,mBAAoB,GACpB,SAAU,GACV,eAAgB,GAChB,aAAc,EAChB,EAEWC,EAAN,cAAoCT,CAAiB,CACzC,SAAWG,EAE5B,YACEO,EAAQH,EACRI,EAAwCH,EACxC,CACA,MAAME,CAAK,EAEX,IAAME,EAA2B,CAC/B,GAAKD,EAAQ,mBAIT,CAAC,EAHD,CACE,2BAA4B,KAC9B,EAEJ,GAAKA,EAAQ,SAIT,CAAC,EAHD,CACE,oBAAqB,MACvB,EAEJ,GAAIA,EAAQ,eACR,CACE,kBAAmB,QACnB,cAAe,yBACjB,EACA,CAAC,EACL,wBAAyB,IACzB,sCAAuC,OACvC,wBAAyB,GAAGT,CAAqB,GACjD,qBAAsB,GAAGD,CAAiB,GAC1C,+BAAgC,OAChC,qCAAsC,MACxC,EAEA,KAAK,gBAAgBW,CAAW,EAAE,iBAAiB,GAAG,KAAK,QAAQ,EAE9DD,EAAQ,cAAc,KAAK,UAAU,CAC5C,CAEA,MAAM,OAA+C,CACnD,OAAO,IAAIE,EAA6B,MAAM,MAAM,MAAM,CAAC,CAC7D,CACF,EAEaA,EAAN,cAA2Cd,CAAyB,CACzE,YAAYe,EAAiC,CAC3C,MAAMA,CAAS,CACjB,CAEA,qBAA8B,CAC5B,MAAO,UAAU,KAAK,QAAQ,CAAC,IAAI,KAAK,cAAc,IAAI,CAAC,YAC7D,CAEA,WAAgC,CAC9B,OAAOhB,EAAmB,iBAAiB,KAAK,oBAAoB,CAAC,CACvE,CACF,EDnFA,IAAIiB,EAESC,EAA4B,MACvCC,EAAoB,KACY,CAChC,IAAIC,EAEJ,OAAID,GACGF,IACHA,EAAgB,MAAM,IAAII,EAAsB,EAAE,MAAM,GAE1DD,EAAmBH,EAAc,oBAAoB,GAGrDG,EAAmB,kCAKdE,EAAmB,iBAAiBF,CAAgB,CAC7D","names":["EventStoreDBClient","EventStoreDBClient","AbstractStartedContainer","GenericContainer","EVENTSTOREDB_PORT","EVENTSTOREDB_TCP_PORT","EVENTSTOREDB_TCP_PORTS","EVENTSTOREDB_IMAGE_NAME","EVENTSTOREDB_IMAGE_TAG","EVENTSTOREDB_ARM64_IMAGE_TAG","EVENTSTOREDB_DEFAULT_IMAGE","defaultEventStoreDBContainerOptions","EventStoreDBContainer","image","options","environment","StartedEventStoreDBContainer","container","esdbContainer","getEventStoreDBTestClient","useTestContainers","connectionString","EventStoreDBContainer","EventStoreDBClient"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event-driven-io/emmett-testcontainers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Emmett - TestContainers - Event Sourcing development made simple",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"dist"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@event-driven-io/emmett": "0.
|
|
50
|
-
"testcontainers": "^10.
|
|
49
|
+
"@event-driven-io/emmett": "0.18.0",
|
|
50
|
+
"testcontainers": "^10.12.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@eventstore/db-client": "^6.1
|
|
53
|
+
"@eventstore/db-client": "^6.2.1"
|
|
54
54
|
}
|
|
55
55
|
}
|
package/dist/chunk-KRK662GT.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as n}from"./chunk-P5YRDUIG.mjs";import{EventStoreDBClient as r}from"@eventstore/db-client";var e,l=async(o=!1)=>{let t;return o?(e||(e=await new n().start()),t=e.getConnectionString()):t="esdb://localhost:2113?tls=false",r.connectionString(t)};export{l as a};
|
|
2
|
-
//# sourceMappingURL=chunk-KRK662GT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eventStore/index.ts"],"sourcesContent":["import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n EventStoreDBContainer,\n StartedEventStoreDBContainer,\n} from './eventStoreDBContainer';\n\nexport * from './eventStoreDBContainer';\n\nlet esdbContainer: StartedEventStoreDBContainer;\n\nexport const getEventStoreDBTestClient = async (\n useTestContainers = false,\n): Promise<EventStoreDBClient> => {\n let connectionString;\n\n if (useTestContainers) {\n if (!esdbContainer)\n esdbContainer = await new EventStoreDBContainer().start();\n\n connectionString = esdbContainer.getConnectionString();\n } else {\n // await compose.upAll();\n connectionString = 'esdb://localhost:2113?tls=false';\n }\n\n // That's how EventStoreDB client is setup\n // We're taking the connection string from container\n return EventStoreDBClient.connectionString(connectionString);\n};\n"],"mappings":"yCAAA,OAAS,sBAAAA,MAA0B,wBAQnC,IAAIC,EAESC,EAA4B,MACvCC,EAAoB,KACY,CAChC,IAAIC,EAEJ,OAAID,GACGF,IACHA,EAAgB,MAAM,IAAII,EAAsB,EAAE,MAAM,GAE1DD,EAAmBH,EAAc,oBAAoB,GAGrDG,EAAmB,kCAKdE,EAAmB,iBAAiBF,CAAgB,CAC7D","names":["EventStoreDBClient","esdbContainer","getEventStoreDBTestClient","useTestContainers","connectionString","EventStoreDBContainer","EventStoreDBClient"]}
|
package/dist/chunk-MOHBTVDP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;var _dbclient = require('@eventstore/db-client');var _testcontainers = require('testcontainers');var n=2113,E= exports.b =1113,_= exports.c =[E,n],R= exports.d ="eventstore/eventstore",c= exports.e ="23.10.1-bookworm-slim",O= exports.f ="23.10.1-alpha-arm64v8",p= exports.g =`${R}:${process.arch!=="arm64"?c:O}`,l= exports.h ={disableProjections:!1,isSecure:!1,useFileStorage:!1,withoutReuse:!1},r= exports.i = (_class =class extends _testcontainers.GenericContainer{__init() {this.tcpPorts=_}constructor(e=p,t=l){super(e);_class.prototype.__init.call(this);;let T={...t.disableProjections?{}:{EVENTSTORE_RUN_PROJECTIONS:"ALL"},...t.isSecure?{}:{EVENTSTORE_INSECURE:"true"},...t.useFileStorage?{EVENTSTORE_MEM_DB:"false",EVENTSTORE_DB:"/data/integration-tests"}:{},EVENTSTORE_CLUSTER_SIZE:"1",EVENTSTORE_START_STANDARD_PROJECTIONS:"true",EVENTSTORE_EXT_TCP_PORT:`${E}`,EVENTSTORE_HTTP_PORT:`${n}`,EVENTSTORE_ENABLE_EXTERNAL_TCP:"true",EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP:"true"};this.withEnvironment(T).withExposedPorts(...this.tcpPorts),t.withoutReuse||this.withReuse()}async start(){return new o(await super.start())}}, _class),o= exports.j =class extends _testcontainers.AbstractStartedContainer{constructor(e){super(e)}getConnectionString(){return`esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`}getClient(){return _dbclient.EventStoreDBClient.connectionString(this.getConnectionString())}};exports.a = n; exports.b = E; exports.c = _; exports.d = R; exports.e = c; exports.f = O; exports.g = p; exports.h = l; exports.i = r; exports.j = o;
|
|
2
|
-
//# sourceMappingURL=chunk-MOHBTVDP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eventStore/eventStoreDBContainer.ts"],"names":["EventStoreDBClient","AbstractStartedContainer","GenericContainer","EVENTSTOREDB_PORT","EVENTSTOREDB_TCP_PORT","EVENTSTOREDB_TCP_PORTS","EVENTSTOREDB_IMAGE_NAME","EVENTSTOREDB_IMAGE_TAG","EVENTSTOREDB_ARM64_IMAGE_TAG","EVENTSTOREDB_DEFAULT_IMAGE","defaultEventStoreDBContainerOptions","EventStoreDBContainer","image","options","environment","StartedEventStoreDBContainer","container"],"mappings":"AAAA,OAAS,sBAAAA,MAA0B,wBACnC,OACE,4BAAAC,EACA,oBAAAC,MAEK,iBAGA,IAAMC,EAAoB,KACpBC,EAAwB,KACxBC,EAAyB,CACpCD,EACAD,CACF,EACaG,EAA0B,wBAC1BC,EAAyB,wBACzBC,EAA+B,wBAE/BC,EAA6B,GAAGH,CAAuB,IAAI,QAAQ,OAAS,QAAUC,EAAyBC,CAA4B,GAS3IE,EACX,CACE,mBAAoB,GACpB,SAAU,GACV,eAAgB,GAChB,aAAc,EAChB,EAEWC,EAAN,cAAoCT,CAAiB,CACzC,SAAWG,EAE5B,YACEO,EAAQH,EACRI,EAAwCH,EACxC,CACA,MAAME,CAAK,EAEX,IAAME,EAA2B,CAC/B,GAAKD,EAAQ,mBAIT,CAAC,EAHD,CACE,2BAA4B,KAC9B,EAEJ,GAAKA,EAAQ,SAIT,CAAC,EAHD,CACE,oBAAqB,MACvB,EAEJ,GAAIA,EAAQ,eACR,CACE,kBAAmB,QACnB,cAAe,yBACjB,EACA,CAAC,EACL,wBAAyB,IACzB,sCAAuC,OACvC,wBAAyB,GAAGT,CAAqB,GACjD,qBAAsB,GAAGD,CAAiB,GAC1C,+BAAgC,OAChC,qCAAsC,MACxC,EAEA,KAAK,gBAAgBW,CAAW,EAAE,iBAAiB,GAAG,KAAK,QAAQ,EAE9DD,EAAQ,cAAc,KAAK,UAAU,CAC5C,CAEA,MAAM,OAA+C,CACnD,OAAO,IAAIE,EAA6B,MAAM,MAAM,MAAM,CAAC,CAC7D,CACF,EAEaA,EAAN,cAA2Cd,CAAyB,CACzE,YAAYe,EAAiC,CAC3C,MAAMA,CAAS,CACjB,CAEA,qBAA8B,CAC5B,MAAO,UAAU,KAAK,QAAQ,CAAC,IAAI,KAAK,cAAc,IAAI,CAAC,YAC7D,CAEA,WAAgC,CAC9B,OAAOhB,EAAmB,iBAAiB,KAAK,oBAAoB,CAAC,CACvE,CACF","sourcesContent":["import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n AbstractStartedContainer,\n GenericContainer,\n type StartedTestContainer,\n} from 'testcontainers';\nimport type { Environment } from 'testcontainers/build/types';\n\nexport const EVENTSTOREDB_PORT = 2113;\nexport const EVENTSTOREDB_TCP_PORT = 1113;\nexport const EVENTSTOREDB_TCP_PORTS = [\n EVENTSTOREDB_TCP_PORT,\n EVENTSTOREDB_PORT,\n];\nexport const EVENTSTOREDB_IMAGE_NAME = 'eventstore/eventstore';\nexport const EVENTSTOREDB_IMAGE_TAG = '23.10.1-bookworm-slim';\nexport const EVENTSTOREDB_ARM64_IMAGE_TAG = '23.10.1-alpha-arm64v8';\n\nexport const EVENTSTOREDB_DEFAULT_IMAGE = `${EVENTSTOREDB_IMAGE_NAME}:${process.arch !== 'arm64' ? EVENTSTOREDB_IMAGE_TAG : EVENTSTOREDB_ARM64_IMAGE_TAG}`;\n\nexport type EventStoreDBContainerOptions = {\n disableProjections?: boolean;\n isSecure?: boolean;\n useFileStorage?: boolean;\n withoutReuse?: boolean;\n};\n\nexport const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions =\n {\n disableProjections: false,\n isSecure: false,\n useFileStorage: false,\n withoutReuse: false,\n };\n\nexport class EventStoreDBContainer extends GenericContainer {\n private readonly tcpPorts = EVENTSTOREDB_TCP_PORTS;\n\n constructor(\n image = EVENTSTOREDB_DEFAULT_IMAGE,\n options: EventStoreDBContainerOptions = defaultEventStoreDBContainerOptions,\n ) {\n super(image);\n\n const environment: Environment = {\n ...(!options.disableProjections\n ? {\n EVENTSTORE_RUN_PROJECTIONS: 'ALL',\n }\n : {}),\n ...(!options.isSecure\n ? {\n EVENTSTORE_INSECURE: 'true',\n }\n : {}),\n ...(options.useFileStorage\n ? {\n EVENTSTORE_MEM_DB: 'false',\n EVENTSTORE_DB: '/data/integration-tests',\n }\n : {}),\n EVENTSTORE_CLUSTER_SIZE: '1',\n EVENTSTORE_START_STANDARD_PROJECTIONS: 'true',\n EVENTSTORE_EXT_TCP_PORT: `${EVENTSTOREDB_TCP_PORT}`,\n EVENTSTORE_HTTP_PORT: `${EVENTSTOREDB_PORT}`,\n EVENTSTORE_ENABLE_EXTERNAL_TCP: 'true',\n EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP: 'true',\n };\n\n this.withEnvironment(environment).withExposedPorts(...this.tcpPorts);\n\n if (!options.withoutReuse) this.withReuse();\n }\n\n async start(): Promise<StartedEventStoreDBContainer> {\n return new StartedEventStoreDBContainer(await super.start());\n }\n}\n\nexport class StartedEventStoreDBContainer extends AbstractStartedContainer {\n constructor(container: StartedTestContainer) {\n super(container);\n }\n\n getConnectionString(): string {\n return `esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`;\n }\n\n getClient(): EventStoreDBClient {\n return EventStoreDBClient.connectionString(this.getConnectionString());\n }\n}\n"]}
|
package/dist/chunk-P5YRDUIG.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{EventStoreDBClient as i}from"@eventstore/db-client";import{AbstractStartedContainer as a,GenericContainer as S}from"testcontainers";var n=2113,E=1113,_=[E,n],R="eventstore/eventstore",c="23.10.1-bookworm-slim",O="23.10.1-alpha-arm64v8",p=`${R}:${process.arch!=="arm64"?c:O}`,l={disableProjections:!1,isSecure:!1,useFileStorage:!1,withoutReuse:!1},r=class extends S{tcpPorts=_;constructor(e=p,t=l){super(e);let T={...t.disableProjections?{}:{EVENTSTORE_RUN_PROJECTIONS:"ALL"},...t.isSecure?{}:{EVENTSTORE_INSECURE:"true"},...t.useFileStorage?{EVENTSTORE_MEM_DB:"false",EVENTSTORE_DB:"/data/integration-tests"}:{},EVENTSTORE_CLUSTER_SIZE:"1",EVENTSTORE_START_STANDARD_PROJECTIONS:"true",EVENTSTORE_EXT_TCP_PORT:`${E}`,EVENTSTORE_HTTP_PORT:`${n}`,EVENTSTORE_ENABLE_EXTERNAL_TCP:"true",EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP:"true"};this.withEnvironment(T).withExposedPorts(...this.tcpPorts),t.withoutReuse||this.withReuse()}async start(){return new o(await super.start())}},o=class extends a{constructor(e){super(e)}getConnectionString(){return`esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`}getClient(){return i.connectionString(this.getConnectionString())}};export{n as a,E as b,_ as c,R as d,c as e,O as f,p as g,l as h,r as i,o as j};
|
|
2
|
-
//# sourceMappingURL=chunk-P5YRDUIG.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eventStore/eventStoreDBContainer.ts"],"sourcesContent":["import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n AbstractStartedContainer,\n GenericContainer,\n type StartedTestContainer,\n} from 'testcontainers';\nimport type { Environment } from 'testcontainers/build/types';\n\nexport const EVENTSTOREDB_PORT = 2113;\nexport const EVENTSTOREDB_TCP_PORT = 1113;\nexport const EVENTSTOREDB_TCP_PORTS = [\n EVENTSTOREDB_TCP_PORT,\n EVENTSTOREDB_PORT,\n];\nexport const EVENTSTOREDB_IMAGE_NAME = 'eventstore/eventstore';\nexport const EVENTSTOREDB_IMAGE_TAG = '23.10.1-bookworm-slim';\nexport const EVENTSTOREDB_ARM64_IMAGE_TAG = '23.10.1-alpha-arm64v8';\n\nexport const EVENTSTOREDB_DEFAULT_IMAGE = `${EVENTSTOREDB_IMAGE_NAME}:${process.arch !== 'arm64' ? EVENTSTOREDB_IMAGE_TAG : EVENTSTOREDB_ARM64_IMAGE_TAG}`;\n\nexport type EventStoreDBContainerOptions = {\n disableProjections?: boolean;\n isSecure?: boolean;\n useFileStorage?: boolean;\n withoutReuse?: boolean;\n};\n\nexport const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions =\n {\n disableProjections: false,\n isSecure: false,\n useFileStorage: false,\n withoutReuse: false,\n };\n\nexport class EventStoreDBContainer extends GenericContainer {\n private readonly tcpPorts = EVENTSTOREDB_TCP_PORTS;\n\n constructor(\n image = EVENTSTOREDB_DEFAULT_IMAGE,\n options: EventStoreDBContainerOptions = defaultEventStoreDBContainerOptions,\n ) {\n super(image);\n\n const environment: Environment = {\n ...(!options.disableProjections\n ? {\n EVENTSTORE_RUN_PROJECTIONS: 'ALL',\n }\n : {}),\n ...(!options.isSecure\n ? {\n EVENTSTORE_INSECURE: 'true',\n }\n : {}),\n ...(options.useFileStorage\n ? {\n EVENTSTORE_MEM_DB: 'false',\n EVENTSTORE_DB: '/data/integration-tests',\n }\n : {}),\n EVENTSTORE_CLUSTER_SIZE: '1',\n EVENTSTORE_START_STANDARD_PROJECTIONS: 'true',\n EVENTSTORE_EXT_TCP_PORT: `${EVENTSTOREDB_TCP_PORT}`,\n EVENTSTORE_HTTP_PORT: `${EVENTSTOREDB_PORT}`,\n EVENTSTORE_ENABLE_EXTERNAL_TCP: 'true',\n EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP: 'true',\n };\n\n this.withEnvironment(environment).withExposedPorts(...this.tcpPorts);\n\n if (!options.withoutReuse) this.withReuse();\n }\n\n async start(): Promise<StartedEventStoreDBContainer> {\n return new StartedEventStoreDBContainer(await super.start());\n }\n}\n\nexport class StartedEventStoreDBContainer extends AbstractStartedContainer {\n constructor(container: StartedTestContainer) {\n super(container);\n }\n\n getConnectionString(): string {\n return `esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`;\n }\n\n getClient(): EventStoreDBClient {\n return EventStoreDBClient.connectionString(this.getConnectionString());\n }\n}\n"],"mappings":"AAAA,OAAS,sBAAAA,MAA0B,wBACnC,OACE,4BAAAC,EACA,oBAAAC,MAEK,iBAGA,IAAMC,EAAoB,KACpBC,EAAwB,KACxBC,EAAyB,CACpCD,EACAD,CACF,EACaG,EAA0B,wBAC1BC,EAAyB,wBACzBC,EAA+B,wBAE/BC,EAA6B,GAAGH,CAAuB,IAAI,QAAQ,OAAS,QAAUC,EAAyBC,CAA4B,GAS3IE,EACX,CACE,mBAAoB,GACpB,SAAU,GACV,eAAgB,GAChB,aAAc,EAChB,EAEWC,EAAN,cAAoCT,CAAiB,CACzC,SAAWG,EAE5B,YACEO,EAAQH,EACRI,EAAwCH,EACxC,CACA,MAAME,CAAK,EAEX,IAAME,EAA2B,CAC/B,GAAKD,EAAQ,mBAIT,CAAC,EAHD,CACE,2BAA4B,KAC9B,EAEJ,GAAKA,EAAQ,SAIT,CAAC,EAHD,CACE,oBAAqB,MACvB,EAEJ,GAAIA,EAAQ,eACR,CACE,kBAAmB,QACnB,cAAe,yBACjB,EACA,CAAC,EACL,wBAAyB,IACzB,sCAAuC,OACvC,wBAAyB,GAAGT,CAAqB,GACjD,qBAAsB,GAAGD,CAAiB,GAC1C,+BAAgC,OAChC,qCAAsC,MACxC,EAEA,KAAK,gBAAgBW,CAAW,EAAE,iBAAiB,GAAG,KAAK,QAAQ,EAE9DD,EAAQ,cAAc,KAAK,UAAU,CAC5C,CAEA,MAAM,OAA+C,CACnD,OAAO,IAAIE,EAA6B,MAAM,MAAM,MAAM,CAAC,CAC7D,CACF,EAEaA,EAAN,cAA2Cd,CAAyB,CACzE,YAAYe,EAAiC,CAC3C,MAAMA,CAAS,CACjB,CAEA,qBAA8B,CAC5B,MAAO,UAAU,KAAK,QAAQ,CAAC,IAAI,KAAK,cAAc,IAAI,CAAC,YAC7D,CAEA,WAAgC,CAC9B,OAAOhB,EAAmB,iBAAiB,KAAK,oBAAoB,CAAC,CACvE,CACF","names":["EventStoreDBClient","AbstractStartedContainer","GenericContainer","EVENTSTOREDB_PORT","EVENTSTOREDB_TCP_PORT","EVENTSTOREDB_TCP_PORTS","EVENTSTOREDB_IMAGE_NAME","EVENTSTOREDB_IMAGE_TAG","EVENTSTOREDB_ARM64_IMAGE_TAG","EVENTSTOREDB_DEFAULT_IMAGE","defaultEventStoreDBContainerOptions","EventStoreDBContainer","image","options","environment","StartedEventStoreDBContainer","container"]}
|
package/dist/chunk-YKV66PD2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMOHBTVDPjs = require('./chunk-MOHBTVDP.js');var _dbclient = require('@eventstore/db-client');var e,l= exports.a =async(o=!1)=>{let t;return o?(e||(e=await new (0, _chunkMOHBTVDPjs.i)().start()),t=e.getConnectionString()):t="esdb://localhost:2113?tls=false",_dbclient.EventStoreDBClient.connectionString(t)};exports.a = l;
|
|
2
|
-
//# sourceMappingURL=chunk-YKV66PD2.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eventStore/index.ts"],"names":["EventStoreDBClient","esdbContainer","getEventStoreDBTestClient","useTestContainers","connectionString","EventStoreDBContainer"],"mappings":"wCAAA,OAAS,sBAAAA,MAA0B,wBAQnC,IAAIC,EAESC,EAA4B,MACvCC,EAAoB,KACY,CAChC,IAAIC,EAEJ,OAAID,GACGF,IACHA,EAAgB,MAAM,IAAII,EAAsB,EAAE,MAAM,GAE1DD,EAAmBH,EAAc,oBAAoB,GAGrDG,EAAmB,kCAKdJ,EAAmB,iBAAiBI,CAAgB,CAC7D","sourcesContent":["import { EventStoreDBClient } from '@eventstore/db-client';\nimport {\n EventStoreDBContainer,\n StartedEventStoreDBContainer,\n} from './eventStoreDBContainer';\n\nexport * from './eventStoreDBContainer';\n\nlet esdbContainer: StartedEventStoreDBContainer;\n\nexport const getEventStoreDBTestClient = async (\n useTestContainers = false,\n): Promise<EventStoreDBClient> => {\n let connectionString;\n\n if (useTestContainers) {\n if (!esdbContainer)\n esdbContainer = await new EventStoreDBContainer().start();\n\n connectionString = esdbContainer.getConnectionString();\n } else {\n // await compose.upAll();\n connectionString = 'esdb://localhost:2113?tls=false';\n }\n\n // That's how EventStoreDB client is setup\n // We're taking the connection string from container\n return EventStoreDBClient.connectionString(connectionString);\n};\n"]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
-
import { GenericContainer, AbstractStartedContainer, StartedTestContainer } from 'testcontainers';
|
|
3
|
-
|
|
4
|
-
declare const EVENTSTOREDB_PORT = 2113;
|
|
5
|
-
declare const EVENTSTOREDB_TCP_PORT = 1113;
|
|
6
|
-
declare const EVENTSTOREDB_TCP_PORTS: number[];
|
|
7
|
-
declare const EVENTSTOREDB_IMAGE_NAME = "eventstore/eventstore";
|
|
8
|
-
declare const EVENTSTOREDB_IMAGE_TAG = "23.10.1-bookworm-slim";
|
|
9
|
-
declare const EVENTSTOREDB_ARM64_IMAGE_TAG = "23.10.1-alpha-arm64v8";
|
|
10
|
-
declare const EVENTSTOREDB_DEFAULT_IMAGE: string;
|
|
11
|
-
type EventStoreDBContainerOptions = {
|
|
12
|
-
disableProjections?: boolean;
|
|
13
|
-
isSecure?: boolean;
|
|
14
|
-
useFileStorage?: boolean;
|
|
15
|
-
withoutReuse?: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions;
|
|
18
|
-
declare class EventStoreDBContainer extends GenericContainer {
|
|
19
|
-
private readonly tcpPorts;
|
|
20
|
-
constructor(image?: string, options?: EventStoreDBContainerOptions);
|
|
21
|
-
start(): Promise<StartedEventStoreDBContainer>;
|
|
22
|
-
}
|
|
23
|
-
declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
24
|
-
constructor(container: StartedTestContainer);
|
|
25
|
-
getConnectionString(): string;
|
|
26
|
-
getClient(): EventStoreDBClient;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { EVENTSTOREDB_ARM64_IMAGE_TAG, EVENTSTOREDB_DEFAULT_IMAGE, EVENTSTOREDB_IMAGE_NAME, EVENTSTOREDB_IMAGE_TAG, EVENTSTOREDB_PORT, EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_TCP_PORTS, EventStoreDBContainer, type EventStoreDBContainerOptions, StartedEventStoreDBContainer, defaultEventStoreDBContainerOptions };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
-
import { GenericContainer, AbstractStartedContainer, StartedTestContainer } from 'testcontainers';
|
|
3
|
-
|
|
4
|
-
declare const EVENTSTOREDB_PORT = 2113;
|
|
5
|
-
declare const EVENTSTOREDB_TCP_PORT = 1113;
|
|
6
|
-
declare const EVENTSTOREDB_TCP_PORTS: number[];
|
|
7
|
-
declare const EVENTSTOREDB_IMAGE_NAME = "eventstore/eventstore";
|
|
8
|
-
declare const EVENTSTOREDB_IMAGE_TAG = "23.10.1-bookworm-slim";
|
|
9
|
-
declare const EVENTSTOREDB_ARM64_IMAGE_TAG = "23.10.1-alpha-arm64v8";
|
|
10
|
-
declare const EVENTSTOREDB_DEFAULT_IMAGE: string;
|
|
11
|
-
type EventStoreDBContainerOptions = {
|
|
12
|
-
disableProjections?: boolean;
|
|
13
|
-
isSecure?: boolean;
|
|
14
|
-
useFileStorage?: boolean;
|
|
15
|
-
withoutReuse?: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const defaultEventStoreDBContainerOptions: EventStoreDBContainerOptions;
|
|
18
|
-
declare class EventStoreDBContainer extends GenericContainer {
|
|
19
|
-
private readonly tcpPorts;
|
|
20
|
-
constructor(image?: string, options?: EventStoreDBContainerOptions);
|
|
21
|
-
start(): Promise<StartedEventStoreDBContainer>;
|
|
22
|
-
}
|
|
23
|
-
declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
24
|
-
constructor(container: StartedTestContainer);
|
|
25
|
-
getConnectionString(): string;
|
|
26
|
-
getClient(): EventStoreDBClient;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { EVENTSTOREDB_ARM64_IMAGE_TAG, EVENTSTOREDB_DEFAULT_IMAGE, EVENTSTOREDB_IMAGE_NAME, EVENTSTOREDB_IMAGE_TAG, EVENTSTOREDB_PORT, EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_TCP_PORTS, EventStoreDBContainer, type EventStoreDBContainerOptions, StartedEventStoreDBContainer, defaultEventStoreDBContainerOptions };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMOHBTVDPjs = require('../chunk-MOHBTVDP.js');exports.EVENTSTOREDB_ARM64_IMAGE_TAG = _chunkMOHBTVDPjs.f; exports.EVENTSTOREDB_DEFAULT_IMAGE = _chunkMOHBTVDPjs.g; exports.EVENTSTOREDB_IMAGE_NAME = _chunkMOHBTVDPjs.d; exports.EVENTSTOREDB_IMAGE_TAG = _chunkMOHBTVDPjs.e; exports.EVENTSTOREDB_PORT = _chunkMOHBTVDPjs.a; exports.EVENTSTOREDB_TCP_PORT = _chunkMOHBTVDPjs.b; exports.EVENTSTOREDB_TCP_PORTS = _chunkMOHBTVDPjs.c; exports.EventStoreDBContainer = _chunkMOHBTVDPjs.i; exports.StartedEventStoreDBContainer = _chunkMOHBTVDPjs.j; exports.defaultEventStoreDBContainerOptions = _chunkMOHBTVDPjs.h;
|
|
2
|
-
//# sourceMappingURL=eventStoreDBContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j}from"../chunk-P5YRDUIG.mjs";export{f as EVENTSTOREDB_ARM64_IMAGE_TAG,g as EVENTSTOREDB_DEFAULT_IMAGE,d as EVENTSTOREDB_IMAGE_NAME,e as EVENTSTOREDB_IMAGE_TAG,a as EVENTSTOREDB_PORT,b as EVENTSTOREDB_TCP_PORT,c as EVENTSTOREDB_TCP_PORTS,i as EventStoreDBContainer,j as StartedEventStoreDBContainer,h as defaultEventStoreDBContainerOptions};
|
|
2
|
-
//# sourceMappingURL=eventStoreDBContainer.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
-
export { EVENTSTOREDB_ARM64_IMAGE_TAG, EVENTSTOREDB_DEFAULT_IMAGE, EVENTSTOREDB_IMAGE_NAME, EVENTSTOREDB_IMAGE_TAG, EVENTSTOREDB_PORT, EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_TCP_PORTS, EventStoreDBContainer, EventStoreDBContainerOptions, StartedEventStoreDBContainer, defaultEventStoreDBContainerOptions } from './eventStoreDBContainer.mjs';
|
|
3
|
-
import 'testcontainers';
|
|
4
|
-
|
|
5
|
-
declare const getEventStoreDBTestClient: (useTestContainers?: boolean) => Promise<EventStoreDBClient>;
|
|
6
|
-
|
|
7
|
-
export { getEventStoreDBTestClient };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
-
export { EVENTSTOREDB_ARM64_IMAGE_TAG, EVENTSTOREDB_DEFAULT_IMAGE, EVENTSTOREDB_IMAGE_NAME, EVENTSTOREDB_IMAGE_TAG, EVENTSTOREDB_PORT, EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_TCP_PORTS, EventStoreDBContainer, EventStoreDBContainerOptions, StartedEventStoreDBContainer, defaultEventStoreDBContainerOptions } from './eventStoreDBContainer.js';
|
|
3
|
-
import 'testcontainers';
|
|
4
|
-
|
|
5
|
-
declare const getEventStoreDBTestClient: (useTestContainers?: boolean) => Promise<EventStoreDBClient>;
|
|
6
|
-
|
|
7
|
-
export { getEventStoreDBTestClient };
|
package/dist/eventStore/index.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYKV66PD2js = require('../chunk-YKV66PD2.js');var _chunkMOHBTVDPjs = require('../chunk-MOHBTVDP.js');exports.EVENTSTOREDB_ARM64_IMAGE_TAG = _chunkMOHBTVDPjs.f; exports.EVENTSTOREDB_DEFAULT_IMAGE = _chunkMOHBTVDPjs.g; exports.EVENTSTOREDB_IMAGE_NAME = _chunkMOHBTVDPjs.d; exports.EVENTSTOREDB_IMAGE_TAG = _chunkMOHBTVDPjs.e; exports.EVENTSTOREDB_PORT = _chunkMOHBTVDPjs.a; exports.EVENTSTOREDB_TCP_PORT = _chunkMOHBTVDPjs.b; exports.EVENTSTOREDB_TCP_PORTS = _chunkMOHBTVDPjs.c; exports.EventStoreDBContainer = _chunkMOHBTVDPjs.i; exports.StartedEventStoreDBContainer = _chunkMOHBTVDPjs.j; exports.defaultEventStoreDBContainerOptions = _chunkMOHBTVDPjs.h; exports.getEventStoreDBTestClient = _chunkYKV66PD2js.a;
|
|
2
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as k}from"../chunk-KRK662GT.mjs";import{a,b,c,d,e,f,g,h,i,j}from"../chunk-P5YRDUIG.mjs";export{f as EVENTSTOREDB_ARM64_IMAGE_TAG,g as EVENTSTOREDB_DEFAULT_IMAGE,d as EVENTSTOREDB_IMAGE_NAME,e as EVENTSTOREDB_IMAGE_TAG,a as EVENTSTOREDB_PORT,b as EVENTSTOREDB_TCP_PORT,c as EVENTSTOREDB_TCP_PORTS,i as EventStoreDBContainer,j as StartedEventStoreDBContainer,h as defaultEventStoreDBContainerOptions,k as getEventStoreDBTestClient};
|
|
2
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|