@tsed/testcontainers-mongo 8.0.0-alpha.8 → 8.0.0-beta.1
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.
|
@@ -33,7 +33,7 @@ export async function stopMongoServer() {
|
|
|
33
33
|
export function getMongoUrl() {
|
|
34
34
|
return process.env.MONGO_URL;
|
|
35
35
|
}
|
|
36
|
-
export function getMongoConnectionOptions(id, opts = {}) {
|
|
36
|
+
export function getMongoConnectionOptions(id = "", opts = {}) {
|
|
37
37
|
const seed = Math.floor(Math.random() * 10000);
|
|
38
38
|
const { dbName = "db-test", ...otherOpts } = opts;
|
|
39
39
|
const url = `${getMongoUrl()}/${dbName}-${seed}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContainerUtils.js","sourceRoot":"","sources":["../../../src/services/ContainerUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAA0B,MAAM,yBAAyB,CAAC;AAWlF,MAAM,GAAG,GAAG,sBAAsB,CAAC;AAEnC,aAAa;AACb,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAEnB,SAAS,cAAc,CAAI,GAAW;IACpC,aAAa;IACb,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,cAAc,CAAC,GAAW,EAAE,WAAoB;IACvD,aAAa;IACb,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC;AAC5B,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAK,GAAG,aAAa;IACjD,OAAO,IAAI,gBAAgB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;AAC7C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,KAAc;IACnD,yBAAyB;IACzB,MAAM,SAAS,GAAG,cAAc,CAA0B,GAAG,CAAC,IAAI,CAAC,MAAM,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC;IAEtG,cAAc,C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@
|
|
|
23
23
|
/// <reference types="mongoose/types/validation.js" />
|
|
24
24
|
/// <reference types="mongoose/types/virtuals.js" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype.js" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype.js" />
|
|
26
27
|
import type { ConnectionOptions } from "node:tls";
|
|
27
28
|
import { StartedMongoDBContainer } from "@testcontainers/mongodb";
|
|
28
29
|
import type { ConnectOptions } from "mongoose";
|
|
@@ -39,7 +40,7 @@ export declare function startMongoServer(image?: string): Promise<{
|
|
|
39
40
|
}>;
|
|
40
41
|
export declare function stopMongoServer(): Promise<void>;
|
|
41
42
|
export declare function getMongoUrl(): string;
|
|
42
|
-
export declare function getMongoConnectionOptions(id
|
|
43
|
+
export declare function getMongoConnectionOptions(id?: string, opts?: ConnectOptions): {
|
|
43
44
|
id: string;
|
|
44
45
|
url: string;
|
|
45
46
|
connectionOptions: ConnectOptions;
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals.js" />
|
|
24
24
|
/// <reference types="mongoose" />
|
|
25
25
|
/// <reference types="mongoose/types/inferschematype.js" />
|
|
26
|
+
/// <reference types="mongoose/types/inferrawdoctype.js" />
|
|
26
27
|
import { getMongoConnectionOptions, getMongoConnectionsOptions, startMongoServer, stopMongoServer } from "./ContainerUtils.js";
|
|
27
28
|
export declare class TestContainersMongo {
|
|
28
29
|
static startMongoServer: typeof startMongoServer;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tsed/testcontainers-mongo",
|
|
3
3
|
"description": "A module to test Ts.ED code that use MongoDB as database using Test Containers",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "8.0.0-
|
|
5
|
+
"version": "8.0.0-beta.1",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
".": {
|
|
12
12
|
"types": "./lib/types/index.d.ts",
|
|
13
13
|
"import": "./lib/esm/index.js",
|
|
14
|
-
"default": "./lib/
|
|
14
|
+
"default": "./lib/esm/index.js"
|
|
15
15
|
},
|
|
16
16
|
"./vitest/setup": {
|
|
17
17
|
"types": "./lib/types/setup/vi.setup.d.ts",
|
|
@@ -24,26 +24,26 @@
|
|
|
24
24
|
"build:ts": "tsc --build tsconfig.json"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"semver": "^7.6.
|
|
27
|
+
"semver": "^7.6.3",
|
|
28
28
|
"tslib": "2.7.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@testcontainers/mongodb": "
|
|
32
|
-
"@tsed/barrels": "8.0.0-
|
|
33
|
-
"@tsed/common": "8.0.0-
|
|
34
|
-
"@tsed/core": "8.0.0-
|
|
35
|
-
"@tsed/di": "8.0.0-
|
|
36
|
-
"@tsed/typescript": "8.0.0-
|
|
37
|
-
"eslint": "9.
|
|
38
|
-
"mongodb": "6.
|
|
31
|
+
"@testcontainers/mongodb": "^10.13.2",
|
|
32
|
+
"@tsed/barrels": "8.0.0-beta.1",
|
|
33
|
+
"@tsed/common": "8.0.0-beta.1",
|
|
34
|
+
"@tsed/core": "8.0.0-beta.1",
|
|
35
|
+
"@tsed/di": "8.0.0-beta.1",
|
|
36
|
+
"@tsed/typescript": "8.0.0-beta.1",
|
|
37
|
+
"eslint": "9.12.0",
|
|
38
|
+
"mongodb": "6.9.0",
|
|
39
39
|
"testcontainers": ">=10.11.0",
|
|
40
40
|
"typescript": "5.4.5"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@testcontainers/mongodb": ">=10.11.0",
|
|
44
|
-
"@tsed/common": "8.0.0-
|
|
45
|
-
"@tsed/core": "8.0.0-
|
|
46
|
-
"@tsed/di": "8.0.0-
|
|
44
|
+
"@tsed/common": "8.0.0-beta.1",
|
|
45
|
+
"@tsed/core": "8.0.0-beta.1",
|
|
46
|
+
"@tsed/di": "8.0.0-beta.1",
|
|
47
47
|
"mongodb": ">=6",
|
|
48
48
|
"testcontainers": ">=10.11.0"
|
|
49
49
|
},
|
|
@@ -55,6 +55,6 @@
|
|
|
55
55
|
"author": "Romain Lenzotti",
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"publishConfig": {
|
|
58
|
-
"tag": "
|
|
58
|
+
"tag": "beta"
|
|
59
59
|
}
|
|
60
60
|
}
|