@prosopo/database 3.15.18 → 3.15.20

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,5 +1,5 @@
1
1
 
2
- > @prosopo/database@3.15.18 build:cjs
2
+ > @prosopo/database@3.15.20 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -33,21 +33,24 @@ ViteCommonJSConfig: .
33
33
  '@prosopo/api'
34
34
  ]
35
35
  }
36
- vite v6.4.1 building SSR bundle for production...
36
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
37
+ vite v8.1.5 building ssr environment for production...
37
38
  Bundle build started
38
- transforming...
39
- Build end
40
- ✓ 11 modules transformed.
39
+ 
40
+ ✓ 12 modules transformed.
41
41
  rendering chunks...
42
- dist/cjs/base/index.cjs  0.28 kB
43
- dist/cjs/base/mongoMemory.cjs  0.71 kB
44
- dist/cjs/databases/index.cjs  1.02 kB
45
- dist/cjs/index.cjs  1.22 kB
46
- dist/cjs/databases/client.cjs  1.91 kB
47
- dist/cjs/mongooseOptions.cjs  2.37 kB
48
- dist/cjs/base/mongo.cjs  4.79 kB
49
- dist/cjs/databases/centralDbStreamer.cjs  5.30 kB
50
- dist/cjs/databases/captcha.cjs  8.70 kB
51
- dist/cjs/redisCache.cjs 15.68 kB
52
- dist/cjs/databases/provider.cjs 71.26 kB
53
- ✓ built in 337ms
42
+ computing gzip size...
43
+ dist/cjs/base/index.cjs 0.22 kB │ gzip: 0.10 kB
44
+ dist/cjs/base/mongoMemory.cjs 0.66 kB │ gzip: 0.32 kB
45
+ dist/cjs/_virtual/_rolldown/runtime.cjs 1.00 kB │ gzip: 0.50 kB
46
+ dist/cjs/databases/index.cjs 1.14 kB │ gzip: 0.32 kB
47
+ dist/cjs/index.cjs 1.49 kB │ gzip: 0.45 kB
48
+ dist/cjs/databases/client.cjs 1.57 kB │ gzip: 0.69 kB
49
+ dist/cjs/mongooseOptions.cjs 2.65 kB │ gzip: 1.15 kB
50
+ dist/cjs/base/mongo.cjs 4.25 kB │ gzip: 1.30 kB
51
+ dist/cjs/databases/centralDbStreamer.cjs 5.29 kB │ gzip: 1.30 kB
52
+ dist/cjs/databases/captcha.cjs 7.16 kB │ gzip: 2.18 kB
53
+ dist/cjs/redisCache.cjs 14.09 kB │ gzip: 4.09 kB
54
+ dist/cjs/databases/provider.cjs 60.22 kB │ gzip: 11.96 kB
55
+
56
+ ✓ built in 98ms
@@ -1,8 +1,8 @@
1
1
 
2
- > @prosopo/database@3.15.18 build:tsc
2
+ > @prosopo/database@3.15.20 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 10:22:47 PM - Projects in this build:
5
+ 8:59:38 PM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
@@ -17,31 +17,31 @@
17
17
  * ../types-database/tsconfig.json
18
18
  * tsconfig.json
19
19
 
20
- 10:22:47 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
20
+ 8:59:38 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
21
21
 
22
- 10:22:47 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
22
+ 8:59:38 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
23
23
 
24
- 10:22:47 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
24
+ 8:59:38 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
25
25
 
26
- 10:22:47 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
26
+ 8:59:38 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
27
27
 
28
- 10:22:47 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
28
+ 8:59:38 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
29
29
 
30
- 10:22:47 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
30
+ 8:59:38 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/provider/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
31
31
 
32
- 10:22:47 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/error.ts' is older than output '../common/tsconfig.tsbuildinfo'
32
+ 8:59:38 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/tests/utils/batches.unit.test.ts' is older than output '../common/tsconfig.tsbuildinfo'
33
33
 
34
- 10:22:47 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
34
+ 8:59:38 PM - Project '../api-route/tsconfig.json' is up to date because newest input '../api-route/src/apiRoutes.ts' is older than output '../api-route/tsconfig.tsbuildinfo'
35
35
 
36
- 10:22:47 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
36
+ 8:59:38 PM - Project '../redis-client/tsconfig.json' is up to date because newest input '../redis-client/src/index.ts' is older than output '../redis-client/tsconfig.tsbuildinfo'
37
37
 
38
- 10:22:47 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
38
+ 8:59:38 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
39
39
 
40
- 10:22:47 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
40
+ 8:59:38 PM - Project '../user-access-policy/tsconfig.json' is up to date because newest input '../user-access-policy/src/ruleRecord.ts' is older than output '../user-access-policy/tsconfig.tsbuildinfo'
41
41
 
42
- 10:22:47 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/index.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
42
+ 8:59:39 PM - Project '../types-database/tsconfig.json' is up to date because newest input '../types-database/src/types/bannedDomain.ts' is older than output '../types-database/tsconfig.tsbuildinfo'
43
43
 
44
- 10:22:47 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
44
+ 8:59:39 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
45
45
 
46
- 10:22:47 PM - Building project '/home/runner/work/captcha/captcha/packages/database/tsconfig.json'...
46
+ 8:59:39 PM - Building project '/home/runner/work/captcha/captcha/packages/database/tsconfig.json'...
47
47
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/database@3.15.18 build
2
+ > @prosopo/database@3.15.20 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/database@3.15.18 build:cross-env
6
+ > @prosopo/database@3.15.20 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -37,21 +37,24 @@ ViteEsmConfig: .
37
37
  '@prosopo/api'
38
38
  ]
39
39
  }
40
- vite v6.4.1 building SSR bundle for production...
40
+ The plugin "vite-tsconfig-paths" is detected. Vite now supports tsconfig paths resolution natively via the resolve.tsconfigPaths option. You can remove the plugin and set resolve.tsconfigPaths: true in your Vite config instead.
41
+ vite v8.1.5 building ssr environment for production...
41
42
  Bundle build started
42
- transforming...
43
- Build end
44
- ✓ 11 modules transformed.
43
+ 
44
+ ✓ 12 modules transformed.
45
45
  rendering chunks...
46
- dist/base/index.js  0.15 kB
47
- dist/base/mongoMemory.js  0.59 kB
48
- dist/databases/index.js  0.75 kB
49
- dist/index.js  0.84 kB
50
- dist/databases/client.js  1.79 kB
51
- dist/mongooseOptions.js  2.24 kB
52
- dist/base/mongo.js  4.34 kB
53
- dist/databases/centralDbStreamer.js  5.19 kB
54
- dist/databases/captcha.js  8.63 kB
55
- dist/redisCache.js 15.58 kB
56
- dist/databases/provider.js 71.06 kB
57
- ✓ built in 606ms
46
+ computing gzip size...
47
+ dist/_virtual/_rolldown/runtime.js 0.04 kB │ gzip: 0.06 kB
48
+ dist/base/index.js 0.14 kB │ gzip: 0.08 kB
49
+ dist/base/mongoMemory.js 0.60 kB │ gzip: 0.30 kB
50
+ dist/databases/index.js 0.77 kB │ gzip: 0.27 kB
51
+ dist/index.js 0.86 kB │ gzip: 0.31 kB
52
+ dist/databases/client.js 1.47 kB │ gzip: 0.68 kB
53
+ dist/mongooseOptions.js 2.56 kB │ gzip: 1.12 kB
54
+ dist/base/mongo.js 3.99 kB │ gzip: 1.21 kB
55
+ dist/databases/centralDbStreamer.js 5.23 kB │ gzip: 1.28 kB
56
+ dist/databases/captcha.js 7.08 kB │ gzip: 2.17 kB
57
+ dist/redisCache.js 14.07 kB │ gzip: 4.09 kB
58
+ dist/databases/provider.js 59.00 kB │ gzip: 11.94 kB
59
+
60
+ ✓ built in 101ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @prosopo/database
2
2
 
3
+ ## 3.15.20
4
+ ### Patch Changes
5
+
6
+ - e14fce6: chore(deps): bump vite to 6.4.3 and mongoose to 8.24.1, and adjust types for the mongoose 8.24 Document/ObjectId changes
7
+ - Updated dependencies [2c47bb7]
8
+ - Updated dependencies [0e1171c]
9
+ - Updated dependencies [103318c]
10
+ - Updated dependencies [270a8d8]
11
+ - Updated dependencies [e14fce6]
12
+ - @prosopo/util@3.3.5
13
+ - @prosopo/types@4.10.0
14
+ - @prosopo/types-database@4.11.17
15
+ - @prosopo/common@3.1.48
16
+ - @prosopo/redis-client@1.0.30
17
+ - @prosopo/user-access-policy@3.12.9
18
+ - @prosopo/logger@2.0.4
19
+
20
+ ## 3.15.19
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [c61dfb5]
24
+ - @prosopo/user-access-policy@3.12.8
25
+ - @prosopo/types-database@4.11.16
26
+
3
27
  ## 3.15.18
4
28
  ### Patch Changes
5
29
 
@@ -0,0 +1,3 @@
1
+ import "node:module";
2
+ //#endregion
3
+ export {};
@@ -1,6 +1,3 @@
1
1
  import { MongoDatabase } from "./mongo.js";
2
2
  import { MongoMemoryDatabase } from "./mongoMemory.js";
3
- export {
4
- MongoDatabase,
5
- MongoMemoryDatabase
6
- };
3
+ export { MongoDatabase, MongoMemoryDatabase };
@@ -1,143 +1,139 @@
1
+ import { getMongoConnectionOptions } from "../mongooseOptions.js";
1
2
  import { fileURLToPath } from "node:url";
2
3
  import { ProsopoDBError } from "@prosopo/common";
3
4
  import { getLogger } from "@prosopo/logger";
4
5
  import mongoose from "mongoose";
5
- import { getMongoConnectionOptions } from "../mongooseOptions.js";
6
+ //#region src/base/mongo.ts
6
7
  mongoose.set("strictQuery", false);
7
- const DEFAULT_ENDPOINT = "mongodb://127.0.0.1:27017";
8
- class MongoDatabase {
9
- constructor(url, dbname, authSource, logger) {
10
- this.connected = false;
11
- const baseEndpoint = url || DEFAULT_ENDPOINT;
12
- const parsedUrl = new URL(baseEndpoint);
13
- if (dbname) {
14
- parsedUrl.pathname = dbname;
15
- }
16
- if (authSource) {
17
- parsedUrl.searchParams.set("authSource", authSource);
18
- }
19
- this._url = parsedUrl.toString();
20
- this.safeURL = this.url.replace(/\w+:\w+/, "<Credentials>");
21
- this.dbname = dbname || parsedUrl.pathname.replace("/", "");
22
- this.logger = logger || getLogger("info", "database:mongo");
23
- }
24
- get url() {
25
- return this._url;
26
- }
27
- getConnection() {
28
- if (!this.connection) {
29
- throw new ProsopoDBError("DATABASE.CONNECTION_UNDEFINED", {
30
- context: { failedFuncName: this.getConnection.name },
31
- logger: this.logger
32
- });
33
- }
34
- return this.connection;
35
- }
36
- /**
37
- * @description Connect to the database and set the various tables
38
- */
39
- async connect() {
40
- this.logger.debug(() => ({
41
- data: { mongoUrl: this.safeURL },
42
- msg: "Connecting to database"
43
- }));
44
- try {
45
- if (this.connected) {
46
- this.logger.debug(() => ({
47
- data: { mongoUrl: this.safeURL },
48
- msg: "Database connection already open"
49
- }));
50
- return;
51
- }
52
- if (this.connecting) {
53
- this.logger.debug(() => ({
54
- data: { mongoUrl: this.safeURL },
55
- msg: "Database connection in progress, waiting for it to finish"
56
- }));
57
- return this.connecting;
58
- }
59
- this.connecting = new Promise((resolve, reject) => {
60
- const appName = fileURLToPath(import.meta.url);
61
- const connection = mongoose.createConnection(
62
- this.url,
63
- getMongoConnectionOptions({
64
- url: this.url,
65
- appName,
66
- dbName: this.dbname,
67
- maxPoolSize: 50,
68
- minPoolSize: 5
69
- })
70
- );
71
- const onConnected = () => {
72
- this.logger.debug(() => ({
73
- data: { mongoUrl: this.safeURL },
74
- msg: "Database connection opened"
75
- }));
76
- this.connected = true;
77
- this.connection = connection;
78
- this.connecting = void 0;
79
- resolve();
80
- };
81
- const onError = (err) => {
82
- this.logger.error(() => ({
83
- err,
84
- data: { mongoUrl: this.safeURL },
85
- msg: "Database error"
86
- }));
87
- this.connected = false;
88
- this.connecting = void 0;
89
- reject(err);
90
- };
91
- connection.once("open", onConnected);
92
- connection.once("error", onError);
93
- connection.on("disconnected", () => {
94
- this.connected = false;
95
- this.logger.debug(() => ({
96
- data: { mongoUrl: this.safeURL },
97
- msg: "Database disconnected"
98
- }));
99
- });
100
- connection.on("reconnected", () => {
101
- this.connected = true;
102
- this.logger.debug(() => ({
103
- data: { mongoUrl: this.safeURL },
104
- msg: "Database reconnected"
105
- }));
106
- });
107
- connection.on("close", () => {
108
- this.connected = false;
109
- this.logger.debug(() => ({
110
- data: { mongoUrl: this.safeURL },
111
- msg: "Database connection closed"
112
- }));
113
- });
114
- connection.on("fullsetup", () => {
115
- this.connected = true;
116
- this.logger.debug(() => ({
117
- data: { mongoUrl: this.safeURL },
118
- msg: "Database connection is fully setup"
119
- }));
120
- });
121
- });
122
- return this.connecting;
123
- } catch (e) {
124
- this.logger.error(() => ({
125
- err: e,
126
- data: { mongoUrl: this.safeURL },
127
- msg: "Database connection error"
128
- }));
129
- throw e;
130
- }
131
- }
132
- /** Close connection to the database */
133
- async close() {
134
- this.logger.debug(() => ({
135
- data: { mongoUrl: this.safeURL },
136
- msg: "Closing connection"
137
- }));
138
- await this.connection?.close();
139
- }
140
- }
141
- export {
142
- MongoDatabase
8
+ var DEFAULT_ENDPOINT = "mongodb://127.0.0.1:27017";
9
+ /**
10
+ * Returns a generic Mongo database layer
11
+ * @param {string} url The database endpoint
12
+ * @param {string} dbname The database name
13
+ * @return {MongoDatabase} Database layer
14
+ */
15
+ var MongoDatabase = class {
16
+ constructor(url, dbname, authSource, logger) {
17
+ this.connected = false;
18
+ const parsedUrl = new URL(url || DEFAULT_ENDPOINT);
19
+ if (dbname) parsedUrl.pathname = dbname;
20
+ if (authSource) parsedUrl.searchParams.set("authSource", authSource);
21
+ this._url = parsedUrl.toString();
22
+ this.safeURL = this.url.replace(/\w+:\w+/, "<Credentials>");
23
+ this.dbname = dbname || parsedUrl.pathname.replace("/", "");
24
+ this.logger = logger || getLogger("info", "database:mongo");
25
+ }
26
+ get url() {
27
+ return this._url;
28
+ }
29
+ getConnection() {
30
+ if (!this.connection) throw new ProsopoDBError("DATABASE.CONNECTION_UNDEFINED", {
31
+ context: { failedFuncName: this.getConnection.name },
32
+ logger: this.logger
33
+ });
34
+ return this.connection;
35
+ }
36
+ /**
37
+ * @description Connect to the database and set the various tables
38
+ */
39
+ async connect() {
40
+ this.logger.debug(() => ({
41
+ data: { mongoUrl: this.safeURL },
42
+ msg: "Connecting to database"
43
+ }));
44
+ try {
45
+ if (this.connected) {
46
+ this.logger.debug(() => ({
47
+ data: { mongoUrl: this.safeURL },
48
+ msg: "Database connection already open"
49
+ }));
50
+ return;
51
+ }
52
+ if (this.connecting) {
53
+ this.logger.debug(() => ({
54
+ data: { mongoUrl: this.safeURL },
55
+ msg: "Database connection in progress, waiting for it to finish"
56
+ }));
57
+ return this.connecting;
58
+ }
59
+ this.connecting = new Promise((resolve, reject) => {
60
+ const appName = fileURLToPath(import.meta.url);
61
+ const connection = mongoose.createConnection(this.url, getMongoConnectionOptions({
62
+ url: this.url,
63
+ appName,
64
+ dbName: this.dbname,
65
+ maxPoolSize: 50,
66
+ minPoolSize: 5
67
+ }));
68
+ const onConnected = () => {
69
+ this.logger.debug(() => ({
70
+ data: { mongoUrl: this.safeURL },
71
+ msg: "Database connection opened"
72
+ }));
73
+ this.connected = true;
74
+ this.connection = connection;
75
+ this.connecting = void 0;
76
+ resolve();
77
+ };
78
+ const onError = (err) => {
79
+ this.logger.error(() => ({
80
+ err,
81
+ data: { mongoUrl: this.safeURL },
82
+ msg: "Database error"
83
+ }));
84
+ this.connected = false;
85
+ this.connecting = void 0;
86
+ reject(err);
87
+ };
88
+ connection.once("open", onConnected);
89
+ connection.once("error", onError);
90
+ connection.on("disconnected", () => {
91
+ this.connected = false;
92
+ this.logger.debug(() => ({
93
+ data: { mongoUrl: this.safeURL },
94
+ msg: "Database disconnected"
95
+ }));
96
+ });
97
+ connection.on("reconnected", () => {
98
+ this.connected = true;
99
+ this.logger.debug(() => ({
100
+ data: { mongoUrl: this.safeURL },
101
+ msg: "Database reconnected"
102
+ }));
103
+ });
104
+ connection.on("close", () => {
105
+ this.connected = false;
106
+ this.logger.debug(() => ({
107
+ data: { mongoUrl: this.safeURL },
108
+ msg: "Database connection closed"
109
+ }));
110
+ });
111
+ connection.on("fullsetup", () => {
112
+ this.connected = true;
113
+ this.logger.debug(() => ({
114
+ data: { mongoUrl: this.safeURL },
115
+ msg: "Database connection is fully setup"
116
+ }));
117
+ });
118
+ });
119
+ return this.connecting;
120
+ } catch (e) {
121
+ this.logger.error(() => ({
122
+ err: e,
123
+ data: { mongoUrl: this.safeURL },
124
+ msg: "Database connection error"
125
+ }));
126
+ throw e;
127
+ }
128
+ }
129
+ /** Close connection to the database */
130
+ async close() {
131
+ this.logger.debug(() => ({
132
+ data: { mongoUrl: this.safeURL },
133
+ msg: "Closing connection"
134
+ }));
135
+ await this.connection?.close();
136
+ }
143
137
  };
138
+ //#endregion
139
+ export { MongoDatabase };
@@ -1,23 +1,23 @@
1
- import { MongoMemoryServer } from "mongodb-memory-server";
2
1
  import { MongoDatabase } from "./mongo.js";
3
- class MongoMemoryDatabase extends MongoDatabase {
4
- constructor(_url, dbname, logger, authSource) {
5
- super("", dbname, authSource, logger);
6
- this._url = "";
7
- }
8
- async connect() {
9
- if (!this.mongod) {
10
- this.mongod = await MongoMemoryServer.create();
11
- this._url = this.mongod.getUri();
12
- }
13
- await super.connect();
14
- }
15
- async close() {
16
- await super.close();
17
- await this.mongod?.stop();
18
- this.mongod = void 0;
19
- }
20
- }
21
- export {
22
- MongoMemoryDatabase
2
+ import { MongoMemoryServer } from "mongodb-memory-server";
3
+ //#region src/base/mongoMemory.ts
4
+ var MongoMemoryDatabase = class extends MongoDatabase {
5
+ constructor(_url, dbname, logger, authSource) {
6
+ super("", dbname, authSource, logger);
7
+ this._url = "";
8
+ }
9
+ async connect() {
10
+ if (!this.mongod) {
11
+ this.mongod = await MongoMemoryServer.create();
12
+ this._url = this.mongod.getUri();
13
+ }
14
+ await super.connect();
15
+ }
16
+ async close() {
17
+ await super.close();
18
+ await this.mongod?.stop();
19
+ this.mongod = void 0;
20
+ }
23
21
  };
22
+ //#endregion
23
+ export { MongoMemoryDatabase };
@@ -0,0 +1,23 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ exports.__toESM = __toESM;
@@ -1,6 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const mongo = require("./mongo.cjs");
4
- const mongoMemory = require("./mongoMemory.cjs");
5
- exports.MongoDatabase = mongo.MongoDatabase;
6
- exports.MongoMemoryDatabase = mongoMemory.MongoMemoryDatabase;
1
+ const require_mongo = require("./mongo.cjs");
2
+ const require_mongoMemory = require("./mongoMemory.cjs");
3
+ exports.MongoDatabase = require_mongo.MongoDatabase;
4
+ exports.MongoMemoryDatabase = require_mongoMemory.MongoMemoryDatabase;