@event-driven-io/emmett-testcontainers 0.7.1 → 0.9.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/{chunk-FNDNWAIQ.mjs → chunk-KRK662GT.mjs} +2 -2
- package/dist/chunk-MOHBTVDP.js +2 -0
- package/dist/chunk-MOHBTVDP.js.map +1 -0
- package/dist/chunk-P5YRDUIG.mjs +2 -0
- package/dist/chunk-P5YRDUIG.mjs.map +1 -0
- package/dist/chunk-YKV66PD2.js +2 -0
- package/dist/eventStore/eventStoreDBContainer.d.mts +16 -2
- package/dist/eventStore/eventStoreDBContainer.d.ts +16 -2
- package/dist/eventStore/eventStoreDBContainer.js +1 -1
- package/dist/eventStore/eventStoreDBContainer.mjs +1 -1
- package/dist/eventStore/index.d.mts +1 -1
- package/dist/eventStore/index.d.ts +1 -1
- package/dist/eventStore/index.js +1 -1
- package/dist/eventStore/index.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
- package/dist/chunk-6KCN7WJ7.js +0 -2
- package/dist/chunk-BO6NJGWD.mjs +0 -2
- package/dist/chunk-BO6NJGWD.mjs.map +0 -1
- package/dist/chunk-QEVSBQNA.js +0 -2
- package/dist/chunk-QEVSBQNA.js.map +0 -1
- /package/dist/{chunk-FNDNWAIQ.mjs.map → chunk-KRK662GT.mjs.map} +0 -0
- /package/dist/{chunk-6KCN7WJ7.js.map → chunk-YKV66PD2.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
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
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
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,9 +1,23 @@
|
|
|
1
1
|
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
2
|
import { GenericContainer, AbstractStartedContainer, StartedTestContainer } from 'testcontainers';
|
|
3
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;
|
|
4
18
|
declare class EventStoreDBContainer extends GenericContainer {
|
|
5
19
|
private readonly tcpPorts;
|
|
6
|
-
constructor(image?: string,
|
|
20
|
+
constructor(image?: string, options?: EventStoreDBContainerOptions);
|
|
7
21
|
start(): Promise<StartedEventStoreDBContainer>;
|
|
8
22
|
}
|
|
9
23
|
declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
@@ -12,4 +26,4 @@ declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
|
12
26
|
getClient(): EventStoreDBClient;
|
|
13
27
|
}
|
|
14
28
|
|
|
15
|
-
export { EventStoreDBContainer, StartedEventStoreDBContainer };
|
|
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,9 +1,23 @@
|
|
|
1
1
|
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
2
|
import { GenericContainer, AbstractStartedContainer, StartedTestContainer } from 'testcontainers';
|
|
3
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;
|
|
4
18
|
declare class EventStoreDBContainer extends GenericContainer {
|
|
5
19
|
private readonly tcpPorts;
|
|
6
|
-
constructor(image?: string,
|
|
20
|
+
constructor(image?: string, options?: EventStoreDBContainerOptions);
|
|
7
21
|
start(): Promise<StartedEventStoreDBContainer>;
|
|
8
22
|
}
|
|
9
23
|
declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
@@ -12,4 +26,4 @@ declare class StartedEventStoreDBContainer extends AbstractStartedContainer {
|
|
|
12
26
|
getClient(): EventStoreDBClient;
|
|
13
27
|
}
|
|
14
28
|
|
|
15
|
-
export { EventStoreDBContainer, StartedEventStoreDBContainer };
|
|
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 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
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
2
|
//# sourceMappingURL=eventStoreDBContainer.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../chunk-
|
|
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
2
|
//# sourceMappingURL=eventStoreDBContainer.mjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
-
export { EventStoreDBContainer, StartedEventStoreDBContainer } from './eventStoreDBContainer.mjs';
|
|
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
3
|
import 'testcontainers';
|
|
4
4
|
|
|
5
5
|
declare const getEventStoreDBTestClient: (useTestContainers?: boolean) => Promise<EventStoreDBClient>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventStoreDBClient } from '@eventstore/db-client';
|
|
2
|
-
export { EventStoreDBContainer, StartedEventStoreDBContainer } from './eventStoreDBContainer.js';
|
|
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
3
|
import 'testcontainers';
|
|
4
4
|
|
|
5
5
|
declare const getEventStoreDBTestClient: (useTestContainers?: boolean) => Promise<EventStoreDBClient>;
|
package/dist/eventStore/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 _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
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
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
2
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { getEventStoreDBTestClient } from './eventStore/index.mjs';
|
|
2
|
-
export { EventStoreDBContainer, StartedEventStoreDBContainer } from './eventStore/eventStoreDBContainer.mjs';
|
|
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 './eventStore/eventStoreDBContainer.mjs';
|
|
3
3
|
import '@eventstore/db-client';
|
|
4
4
|
import 'testcontainers';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { getEventStoreDBTestClient } from './eventStore/index.js';
|
|
2
|
-
export { EventStoreDBContainer, StartedEventStoreDBContainer } from './eventStore/eventStoreDBContainer.js';
|
|
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 './eventStore/eventStoreDBContainer.js';
|
|
3
3
|
import '@eventstore/db-client';
|
|
4
4
|
import 'testcontainers';
|
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 _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
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as c}from"./chunk-KRK662GT.mjs";import{a as o,b as r,c as e,d as f,e as m,f as p,g as t,h as x,i as a,j as b}from"./chunk-P5YRDUIG.mjs";export{p as EVENTSTOREDB_ARM64_IMAGE_TAG,t as EVENTSTOREDB_DEFAULT_IMAGE,f as EVENTSTOREDB_IMAGE_NAME,m as EVENTSTOREDB_IMAGE_TAG,o as EVENTSTOREDB_PORT,r as EVENTSTOREDB_TCP_PORT,e as EVENTSTOREDB_TCP_PORTS,a as EventStoreDBContainer,b as StartedEventStoreDBContainer,x as defaultEventStoreDBContainerOptions,c as getEventStoreDBTestClient};
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@event-driven-io/emmett-testcontainers",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Emmett - TestContainers - Event Sourcing development made simple",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsup",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dist"
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@event-driven-io/emmett": "0.
|
|
49
|
+
"@event-driven-io/emmett": "0.9.0",
|
|
50
50
|
"testcontainers": "^10.7.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
package/dist/chunk-6KCN7WJ7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQEVSBQNAjs = require('./chunk-QEVSBQNA.js');var _dbclient = require('@eventstore/db-client');var e,l= exports.a =async(o=!1)=>{let t;return o?(e||(e=await new (0, _chunkQEVSBQNAjs.a)().start()),t=e.getConnectionString()):t="esdb://localhost:2113?tls=false",_dbclient.EventStoreDBClient.connectionString(t)};exports.a = l;
|
|
2
|
-
//# sourceMappingURL=chunk-6KCN7WJ7.js.map
|
package/dist/chunk-BO6NJGWD.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{EventStoreDBClient as S}from"@eventstore/db-client";import{AbstractStartedContainer as O,GenericContainer as a}from"testcontainers";var r=2113,n=1113,N=[n,r],c="eventstore/eventstore",P="23.10.1-bookworm-slim",E=class extends a{tcpPorts=N;constructor(t=`${c}:${P}`,s=!0,o=!0,i=!0,_=!1){super(t);let R={...s?{EVENTSTORE_RUN_PROJECTIONS:"ALL"}:{},...o?{EVENTSTORE_INSECURE:"true"}:{},...i?{}:{EVENTSTORE_MEM_DB:"false",EVENTSTORE_DB:"/data/integration-tests"},EVENTSTORE_CLUSTER_SIZE:"1",EVENTSTORE_START_STANDARD_PROJECTIONS:"true",EVENTSTORE_EXT_TCP_PORT:`${n}`,EVENTSTORE_HTTP_PORT:`${r}`,EVENTSTORE_ENABLE_EXTERNAL_TCP:"true",EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP:"true"};this.withEnvironment(R).withExposedPorts(...this.tcpPorts),_||this.withReuse()}async start(){return new e(await super.start())}},e=class extends O{constructor(t){super(t)}getConnectionString(){return`esdb://${this.getHost()}:${this.getMappedPort(2113)}?tls=false`}getClient(){return S.connectionString(this.getConnectionString())}};export{E as a,e as b};
|
|
2
|
-
//# sourceMappingURL=chunk-BO6NJGWD.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\nconst EVENTSTOREDB_PORT = 2113;\nconst EVENTSTOREDB_TCP_PORT = 1113;\nconst EVENTSTOREDB_TCP_PORTS = [EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_PORT];\nconst EVENTSTOREDB_IMAGE_NAME = 'eventstore/eventstore';\nconst EVENTSTOREDB_IMAGE_TAG = '23.10.1-bookworm-slim';\n\nexport class EventStoreDBContainer extends GenericContainer {\n private readonly tcpPorts = EVENTSTOREDB_TCP_PORTS;\n\n constructor(\n image = `${EVENTSTOREDB_IMAGE_NAME}:${EVENTSTOREDB_IMAGE_TAG}`,\n runProjections = true,\n isInsecure = true,\n emptyDatabase = true,\n withoutReuse = false,\n ) {\n super(image);\n\n const environment: Environment = {\n ...(runProjections\n ? {\n EVENTSTORE_RUN_PROJECTIONS: 'ALL',\n }\n : {}),\n ...(isInsecure\n ? {\n EVENTSTORE_INSECURE: 'true',\n }\n : {}),\n ...(!emptyDatabase\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 (!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,iBAGP,IAAMC,EAAoB,KACpBC,EAAwB,KACxBC,EAAyB,CAACD,EAAuBD,CAAiB,EAClEG,EAA0B,wBAC1BC,EAAyB,wBAElBC,EAAN,cAAoCN,CAAiB,CACzC,SAAWG,EAE5B,YACEI,EAAQ,GAAGH,CAAuB,IAAIC,CAAsB,GAC5DG,EAAiB,GACjBC,EAAa,GACbC,EAAgB,GAChBC,EAAe,GACf,CACA,MAAMJ,CAAK,EAEX,IAAMK,EAA2B,CAC/B,GAAIJ,EACA,CACE,2BAA4B,KAC9B,EACA,CAAC,EACL,GAAIC,EACA,CACE,oBAAqB,MACvB,EACA,CAAC,EACL,GAAKC,EAKD,CAAC,EAJD,CACE,kBAAmB,QACnB,cAAe,yBACjB,EAEJ,wBAAyB,IACzB,sCAAuC,OACvC,wBAAyB,GAAGR,CAAqB,GACjD,qBAAsB,GAAGD,CAAiB,GAC1C,+BAAgC,OAChC,qCAAsC,MACxC,EAEA,KAAK,gBAAgBW,CAAW,EAAE,iBAAiB,GAAG,KAAK,QAAQ,EAE9DD,GAAc,KAAK,UAAU,CACpC,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","EventStoreDBContainer","image","runProjections","isInsecure","emptyDatabase","withoutReuse","environment","StartedEventStoreDBContainer","container"]}
|
package/dist/chunk-QEVSBQNA.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 r=2113,n=1113,N=[n,r],c="eventstore/eventstore",P="23.10.1-bookworm-slim",E= exports.a = (_class =class extends _testcontainers.GenericContainer{__init() {this.tcpPorts=N}constructor(t=`${c}:${P}`,s=!0,o=!0,i=!0,_=!1){super(t);_class.prototype.__init.call(this);;let R={...s?{EVENTSTORE_RUN_PROJECTIONS:"ALL"}:{},...o?{EVENTSTORE_INSECURE:"true"}:{},...i?{}:{EVENTSTORE_MEM_DB:"false",EVENTSTORE_DB:"/data/integration-tests"},EVENTSTORE_CLUSTER_SIZE:"1",EVENTSTORE_START_STANDARD_PROJECTIONS:"true",EVENTSTORE_EXT_TCP_PORT:`${n}`,EVENTSTORE_HTTP_PORT:`${r}`,EVENTSTORE_ENABLE_EXTERNAL_TCP:"true",EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP:"true"};this.withEnvironment(R).withExposedPorts(...this.tcpPorts),_||this.withReuse()}async start(){return new e(await super.start())}}, _class),e= exports.b =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())}};exports.a = E; exports.b = e;
|
|
2
|
-
//# sourceMappingURL=chunk-QEVSBQNA.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","EventStoreDBContainer","image","runProjections","isInsecure","emptyDatabase","withoutReuse","environment","StartedEventStoreDBContainer","container"],"mappings":"AAAA,OAAS,sBAAAA,MAA0B,wBACnC,OACE,4BAAAC,EACA,oBAAAC,MAEK,iBAGP,IAAMC,EAAoB,KACpBC,EAAwB,KACxBC,EAAyB,CAACD,EAAuBD,CAAiB,EAClEG,EAA0B,wBAC1BC,EAAyB,wBAElBC,EAAN,cAAoCN,CAAiB,CACzC,SAAWG,EAE5B,YACEI,EAAQ,GAAGH,CAAuB,IAAIC,CAAsB,GAC5DG,EAAiB,GACjBC,EAAa,GACbC,EAAgB,GAChBC,EAAe,GACf,CACA,MAAMJ,CAAK,EAEX,IAAMK,EAA2B,CAC/B,GAAIJ,EACA,CACE,2BAA4B,KAC9B,EACA,CAAC,EACL,GAAIC,EACA,CACE,oBAAqB,MACvB,EACA,CAAC,EACL,GAAKC,EAKD,CAAC,EAJD,CACE,kBAAmB,QACnB,cAAe,yBACjB,EAEJ,wBAAyB,IACzB,sCAAuC,OACvC,wBAAyB,GAAGR,CAAqB,GACjD,qBAAsB,GAAGD,CAAiB,GAC1C,+BAAgC,OAChC,qCAAsC,MACxC,EAEA,KAAK,gBAAgBW,CAAW,EAAE,iBAAiB,GAAG,KAAK,QAAQ,EAE9DD,GAAc,KAAK,UAAU,CACpC,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\nconst EVENTSTOREDB_PORT = 2113;\nconst EVENTSTOREDB_TCP_PORT = 1113;\nconst EVENTSTOREDB_TCP_PORTS = [EVENTSTOREDB_TCP_PORT, EVENTSTOREDB_PORT];\nconst EVENTSTOREDB_IMAGE_NAME = 'eventstore/eventstore';\nconst EVENTSTOREDB_IMAGE_TAG = '23.10.1-bookworm-slim';\n\nexport class EventStoreDBContainer extends GenericContainer {\n private readonly tcpPorts = EVENTSTOREDB_TCP_PORTS;\n\n constructor(\n image = `${EVENTSTOREDB_IMAGE_NAME}:${EVENTSTOREDB_IMAGE_TAG}`,\n runProjections = true,\n isInsecure = true,\n emptyDatabase = true,\n withoutReuse = false,\n ) {\n super(image);\n\n const environment: Environment = {\n ...(runProjections\n ? {\n EVENTSTORE_RUN_PROJECTIONS: 'ALL',\n }\n : {}),\n ...(isInsecure\n ? {\n EVENTSTORE_INSECURE: 'true',\n }\n : {}),\n ...(!emptyDatabase\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 (!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"]}
|
|
File without changes
|
|
File without changes
|