@tsed/testcontainers-mongo 8.0.0-alpha.9 → 8.0.0-beta.10
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlatformTest } from "@tsed/
|
|
1
|
+
import { PlatformTest } from "@tsed/platform-http/testing";
|
|
2
2
|
import { MongoClient } from "mongodb";
|
|
3
3
|
import { getMongoConnectionOptions, getMongoConnectionsOptions, startMongoServer, stopMongoServer } from "./ContainerUtils.js";
|
|
4
4
|
export class TestContainersMongo {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TestContainersMongo.js","sourceRoot":"","sources":["../../../src/services/TestContainersMongo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"TestContainersMongo.js","sourceRoot":"","sources":["../../../src/services/TestContainersMongo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAEpC,OAAO,EAAC,yBAAyB,EAAE,0BAA0B,EAAE,gBAAgB,EAAE,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAE7H,MAAM,OAAO,mBAAmB;aACvB,qBAAgB,GAAG,gBAAgB,CAAC;aACpC,oBAAe,GAAG,eAAe,CAAC;aAClC,+BAA0B,GAAG,0BAA0B,CAAC;aACxD,8BAAyB,GAAG,yBAAyB,CAAC;IAI7D,MAAM,CAAC,MAAM,CAAC,UAAuC,EAAE;QACrD,mBAAmB,CAAC,aAAa,GAAG,0BAA0B,EAAE,CAAC;QAEjE,OAAO,YAAY,CAAC,MAAM,CAAC;YACzB,GAAG,OAAO;YACV,QAAQ,EAAE,mBAAmB,CAAC,aAAa;SAC5C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,SAAS,CAAC,GAAY,EAAE,OAAoC,EAAE;QACnE,OAAO,GAAG,EAAE;YACV,mBAAmB,CAAC,aAAa,GAAG,0BAA0B,EAAE,CAAC;YACjE,OAAO,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE;gBACjC,QAAQ,EAAE,mBAAmB,CAAC,aAAa;gBAC3C,GAAG,IAAI;aACR,CAAC,EAAE,CAAC;QACP,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,cAAuB;QACxC,IAAI,OAAO,cAAc,KAAK,QAAQ,EAAE,CAAC;YACvC,MAAM,mBAAmB,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,YAAY,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,cAAsB,EAAE,aAAa,GAAG,mBAAmB,CAAC,aAAa;QACpG,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE;gBACnD,gBAAgB,EAAE,IAAI;aACvB,CAAC,CAAC;YAEH,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;YACvB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,EAAE,CAAC;YACvB,MAAM,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACnD,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACvB,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,cAAc,cAAc,eAAe,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;QACrF,CAAC;IACH,CAAC"}
|
|
@@ -23,6 +23,7 @@
|
|
|
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";
|
|
@@ -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.10",
|
|
6
6
|
"source": "./src/index.ts",
|
|
7
7
|
"main": "./lib/esm/index.js",
|
|
8
8
|
"module": "./lib/esm/index.js",
|
|
@@ -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/
|
|
34
|
-
"@tsed/
|
|
35
|
-
"@tsed/
|
|
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.10",
|
|
33
|
+
"@tsed/core": "8.0.0-beta.10",
|
|
34
|
+
"@tsed/di": "8.0.0-beta.10",
|
|
35
|
+
"@tsed/platform-http": "8.0.0-beta.10",
|
|
36
|
+
"@tsed/typescript": "8.0.0-beta.10",
|
|
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/
|
|
45
|
-
"@tsed/
|
|
46
|
-
"@tsed/
|
|
44
|
+
"@tsed/core": "8.0.0-beta.10",
|
|
45
|
+
"@tsed/di": "8.0.0-beta.10",
|
|
46
|
+
"@tsed/platform-http": "8.0.0-beta.10",
|
|
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
|
}
|
package/readme.md
CHANGED
|
@@ -100,7 +100,7 @@ export default defineConfig({
|
|
|
100
100
|
Use the `TestContainersMongo.create` method to start the mongo server before your test:
|
|
101
101
|
|
|
102
102
|
```ts
|
|
103
|
-
import {PlatformTest} from "@tsed/
|
|
103
|
+
import {PlatformTest} from "@tsed/platform-http/testing";
|
|
104
104
|
import {Property, Required} from "@tsed/schema";
|
|
105
105
|
import {Model, MongooseModel, ObjectID, PostHook, PreHook, Unique} from "@tsed/mongoose";
|
|
106
106
|
import {TestContainersMongo} from "@tsed/testcontainers-mongo";
|
|
@@ -169,7 +169,7 @@ TestContainersMongo provides a method to get the connection options for MikroORM
|
|
|
169
169
|
```ts
|
|
170
170
|
import {EntityManager, MikroORM} from "@mikro-orm/core";
|
|
171
171
|
import {defineConfig} from "@mikro-orm/mongodb";
|
|
172
|
-
import {PlatformTest} from "@tsed/
|
|
172
|
+
import {PlatformTest} from "@tsed/platform-http/testing";
|
|
173
173
|
import {TestContainersMongo} from "@tsed/testcontainers-mongo";
|
|
174
174
|
|
|
175
175
|
beforeEach(async () => {
|