@storehouse/mongodb 1.1.0 → 2.3.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/README.md +2 -2
- package/lib/index.d.ts +28 -28
- package/lib/index.js +94 -94
- package/lib/index.js.map +1 -1
- package/package.json +45 -45
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @storehouse/mongodb
|
|
2
2
|
MongoDB driver manager for @storehouse/core.
|
|
3
3
|
|
|
4
|
-
[Documentation](https://
|
|
4
|
+
[Documentation](https://kisiwu.github.io/storehouse/mongodb/latest/).
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
@@ -116,7 +116,7 @@ const Movies = getModel(Storehouse, 'local', 'otherdatabase.movies');
|
|
|
116
116
|
|
|
117
117
|
## References
|
|
118
118
|
|
|
119
|
-
- [Documentation](https://
|
|
119
|
+
- [Documentation](https://kisiwu.github.io/storehouse/mongodb/latest/)
|
|
120
120
|
- [@storehouse/core](https://www.npmjs.com/package/@storehouse/core)
|
|
121
121
|
- [mongodb](https://www.npmjs.com/package/mongodb)
|
|
122
122
|
|
package/lib/index.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { IManager, ManagerArg } from '@storehouse/core/lib/manager';
|
|
2
|
-
import { Registry } from '@storehouse/core/lib/registry';
|
|
3
|
-
import { MongoClient, MongoClientOptions, Document, Collection } from 'mongodb';
|
|
4
|
-
export interface MongoDBManagerArg extends ManagerArg {
|
|
5
|
-
config?: {
|
|
6
|
-
url: string;
|
|
7
|
-
options?: MongoClientOptions;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* @param registry
|
|
13
|
-
* @param manager Manager name or model name
|
|
14
|
-
* @param modelName Model name
|
|
15
|
-
* @returns
|
|
16
|
-
*/
|
|
17
|
-
export declare function getModel<T extends Document = Document>(registry: Registry, managerName: string, modelName?: string): Collection<T>;
|
|
18
|
-
export declare function getManager<M extends MongoDBManager = MongoDBManager>(registry: Registry, managerName?: string): M;
|
|
19
|
-
export declare function getConnection(registry: Registry, managerName?: string): MongoClient;
|
|
20
|
-
export declare class MongoDBManager extends MongoClient implements IManager {
|
|
21
|
-
static readonly type = "@storehouse/mongodb";
|
|
22
|
-
protected name: string;
|
|
23
|
-
constructor(settings: MongoDBManagerArg);
|
|
24
|
-
private _registerConnectionEvents;
|
|
25
|
-
getConnection(): MongoClient;
|
|
26
|
-
closeConnection(force?: boolean): Promise<void>;
|
|
27
|
-
getModel<T extends Document = Document>(name: string): Collection<T>;
|
|
28
|
-
}
|
|
1
|
+
import { IManager, ManagerArg } from '@storehouse/core/lib/manager';
|
|
2
|
+
import { Registry } from '@storehouse/core/lib/registry';
|
|
3
|
+
import { MongoClient, MongoClientOptions, Document, Collection } from 'mongodb';
|
|
4
|
+
export interface MongoDBManagerArg extends ManagerArg {
|
|
5
|
+
config?: {
|
|
6
|
+
url: string;
|
|
7
|
+
options?: MongoClientOptions;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param registry
|
|
13
|
+
* @param manager Manager name or model name
|
|
14
|
+
* @param modelName Model name
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare function getModel<T extends Document = Document>(registry: Registry, managerName: string, modelName?: string): Collection<T>;
|
|
18
|
+
export declare function getManager<M extends MongoDBManager = MongoDBManager>(registry: Registry, managerName?: string): M;
|
|
19
|
+
export declare function getConnection(registry: Registry, managerName?: string): MongoClient;
|
|
20
|
+
export declare class MongoDBManager extends MongoClient implements IManager {
|
|
21
|
+
static readonly type = "@storehouse/mongodb";
|
|
22
|
+
protected name: string;
|
|
23
|
+
constructor(settings: MongoDBManagerArg);
|
|
24
|
+
private _registerConnectionEvents;
|
|
25
|
+
getConnection(): MongoClient;
|
|
26
|
+
closeConnection(force?: boolean): Promise<void>;
|
|
27
|
+
getModel<T extends Document = Document>(name: string): Collection<T>;
|
|
28
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MongoDBManager = exports.getConnection = exports.getManager = exports.getModel = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const mongodb_1 = require("mongodb");
|
|
6
|
-
const logger_1 = tslib_1.__importDefault(require("@novice1/logger"));
|
|
7
|
-
const Log = logger_1.default.debugger('@storehouse/mongodb:manager');
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @param registry
|
|
11
|
-
* @param manager Manager name or model name
|
|
12
|
-
* @param modelName Model name
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
function getModel(registry, managerName, modelName) {
|
|
16
|
-
const model = registry.getModel(managerName, modelName);
|
|
17
|
-
if (!model) {
|
|
18
|
-
throw new ReferenceError(`Could not find model "${modelName || managerName}"`);
|
|
19
|
-
}
|
|
20
|
-
return model;
|
|
21
|
-
}
|
|
22
|
-
exports.getModel = getModel;
|
|
23
|
-
function getManager(registry, managerName) {
|
|
24
|
-
const manager = registry.getManager(managerName);
|
|
25
|
-
if (!manager) {
|
|
26
|
-
throw new ReferenceError(`Could not find manager "${managerName || registry.defaultManager}"`);
|
|
27
|
-
}
|
|
28
|
-
if (!(manager instanceof MongoDBManager)) {
|
|
29
|
-
throw new TypeError(`Manager "${managerName || registry.defaultManager}" is not instance of MongoDBManager`);
|
|
30
|
-
}
|
|
31
|
-
return manager;
|
|
32
|
-
}
|
|
33
|
-
exports.getManager = getManager;
|
|
34
|
-
function getConnection(registry, managerName) {
|
|
35
|
-
const conn = registry.getConnection(managerName);
|
|
36
|
-
if (!conn) {
|
|
37
|
-
throw new ReferenceError(`Could not find connection "${managerName || registry.defaultManager}"`);
|
|
38
|
-
}
|
|
39
|
-
return conn;
|
|
40
|
-
}
|
|
41
|
-
exports.getConnection = getConnection;
|
|
42
|
-
class MongoDBManager extends mongodb_1.MongoClient {
|
|
43
|
-
constructor(settings) {
|
|
44
|
-
var _a;
|
|
45
|
-
if (!((_a = settings.config) === null || _a === void 0 ? void 0 : _a.url)) {
|
|
46
|
-
throw new TypeError('Missing connection url');
|
|
47
|
-
}
|
|
48
|
-
super(settings.config.url, settings.config.options);
|
|
49
|
-
this.name = settings.name || `MongoDB ${Date.now()}_${Math.ceil(Math.random() * 10000) + 10}`;
|
|
50
|
-
this._registerConnectionEvents();
|
|
51
|
-
Log.info('[%s] MongoClient created. Must call "MongoClient.connect()".', this.name);
|
|
52
|
-
}
|
|
53
|
-
_registerConnectionEvents() {
|
|
54
|
-
this.on('topologyOpening', () => {
|
|
55
|
-
Log.info('[%s] connecting ...', this.name);
|
|
56
|
-
});
|
|
57
|
-
this.on('serverOpening', () => {
|
|
58
|
-
Log.info('[%s] connected!', this.name);
|
|
59
|
-
});
|
|
60
|
-
this.on('serverClosed', () => {
|
|
61
|
-
Log.info('[%s] disconnected!', this.name);
|
|
62
|
-
});
|
|
63
|
-
this.on('topologyClosed', () => {
|
|
64
|
-
Log.info('[%s] connection closed!', this.name);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
getConnection() {
|
|
68
|
-
return this;
|
|
69
|
-
}
|
|
70
|
-
closeConnection(force) {
|
|
71
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
if (force) {
|
|
73
|
-
yield this.close(force);
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
yield this.close();
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
getModel(name) {
|
|
81
|
-
const conn = this.getConnection();
|
|
82
|
-
let model;
|
|
83
|
-
const names = name.split('.');
|
|
84
|
-
if (names.length >= 2) {
|
|
85
|
-
model = conn.db(names[0]).collection(names[1]);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
model = conn.db().collection(names[0]);
|
|
89
|
-
}
|
|
90
|
-
return model;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
exports.MongoDBManager = MongoDBManager;
|
|
94
|
-
MongoDBManager.type = '@storehouse/mongodb';
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MongoDBManager = exports.getConnection = exports.getManager = exports.getModel = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const mongodb_1 = require("mongodb");
|
|
6
|
+
const logger_1 = tslib_1.__importDefault(require("@novice1/logger"));
|
|
7
|
+
const Log = logger_1.default.debugger('@storehouse/mongodb:manager');
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @param registry
|
|
11
|
+
* @param manager Manager name or model name
|
|
12
|
+
* @param modelName Model name
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
function getModel(registry, managerName, modelName) {
|
|
16
|
+
const model = registry.getModel(managerName, modelName);
|
|
17
|
+
if (!model) {
|
|
18
|
+
throw new ReferenceError(`Could not find model "${modelName || managerName}"`);
|
|
19
|
+
}
|
|
20
|
+
return model;
|
|
21
|
+
}
|
|
22
|
+
exports.getModel = getModel;
|
|
23
|
+
function getManager(registry, managerName) {
|
|
24
|
+
const manager = registry.getManager(managerName);
|
|
25
|
+
if (!manager) {
|
|
26
|
+
throw new ReferenceError(`Could not find manager "${managerName || registry.defaultManager}"`);
|
|
27
|
+
}
|
|
28
|
+
if (!(manager instanceof MongoDBManager)) {
|
|
29
|
+
throw new TypeError(`Manager "${managerName || registry.defaultManager}" is not instance of MongoDBManager`);
|
|
30
|
+
}
|
|
31
|
+
return manager;
|
|
32
|
+
}
|
|
33
|
+
exports.getManager = getManager;
|
|
34
|
+
function getConnection(registry, managerName) {
|
|
35
|
+
const conn = registry.getConnection(managerName);
|
|
36
|
+
if (!conn) {
|
|
37
|
+
throw new ReferenceError(`Could not find connection "${managerName || registry.defaultManager}"`);
|
|
38
|
+
}
|
|
39
|
+
return conn;
|
|
40
|
+
}
|
|
41
|
+
exports.getConnection = getConnection;
|
|
42
|
+
class MongoDBManager extends mongodb_1.MongoClient {
|
|
43
|
+
constructor(settings) {
|
|
44
|
+
var _a;
|
|
45
|
+
if (!((_a = settings.config) === null || _a === void 0 ? void 0 : _a.url)) {
|
|
46
|
+
throw new TypeError('Missing connection url');
|
|
47
|
+
}
|
|
48
|
+
super(settings.config.url, settings.config.options);
|
|
49
|
+
this.name = settings.name || `MongoDB ${Date.now()}_${Math.ceil(Math.random() * 10000) + 10}`;
|
|
50
|
+
this._registerConnectionEvents();
|
|
51
|
+
Log.info('[%s] MongoClient created. Must call "MongoClient.connect()".', this.name);
|
|
52
|
+
}
|
|
53
|
+
_registerConnectionEvents() {
|
|
54
|
+
this.on('topologyOpening', () => {
|
|
55
|
+
Log.info('[%s] connecting ...', this.name);
|
|
56
|
+
});
|
|
57
|
+
this.on('serverOpening', () => {
|
|
58
|
+
Log.info('[%s] connected!', this.name);
|
|
59
|
+
});
|
|
60
|
+
this.on('serverClosed', () => {
|
|
61
|
+
Log.info('[%s] disconnected!', this.name);
|
|
62
|
+
});
|
|
63
|
+
this.on('topologyClosed', () => {
|
|
64
|
+
Log.info('[%s] connection closed!', this.name);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
getConnection() {
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
closeConnection(force) {
|
|
71
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
if (force) {
|
|
73
|
+
yield this.close(force);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
yield this.close();
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
getModel(name) {
|
|
81
|
+
const conn = this.getConnection();
|
|
82
|
+
let model;
|
|
83
|
+
const names = name.split('.');
|
|
84
|
+
if (names.length >= 2) {
|
|
85
|
+
model = conn.db(names[0]).collection(names[1]);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
model = conn.db().collection(names[0]);
|
|
89
|
+
}
|
|
90
|
+
return model;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
exports.MongoDBManager = MongoDBManager;
|
|
94
|
+
MongoDBManager.type = '@storehouse/mongodb';
|
|
95
95
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,qCAKiB;AACjB,qEAAqC;AAGrC,MAAM,GAAG,GAAG,gBAAM,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;AAS3D;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAgC,QAAkB,EAAE,WAAmB,EAAE,SAAkB;IACjH,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAgB,WAAW,EAAE,SAAS,CAAC,CAAC;IACvE,IAAI,CAAC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAEA,qCAKiB;AACjB,qEAAqC;AAGrC,MAAM,GAAG,GAAG,gBAAM,CAAC,QAAQ,CAAC,6BAA6B,CAAC,CAAC;AAS3D;;;;;;GAMG;AACH,SAAgB,QAAQ,CAAgC,QAAkB,EAAE,WAAmB,EAAE,SAAkB;IACjH,MAAM,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAgB,WAAW,EAAE,SAAS,CAAC,CAAC;IACvE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,cAAc,CAAC,yBAAyB,SAAS,IAAI,WAAW,GAAG,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAND,4BAMC;AAED,SAAgB,UAAU,CAA4C,QAAkB,EAAE,WAAoB;IAC5G,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAI,W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CAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC;aAAM,CAAC;YACN,KAAK,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,UAAU,CAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5C,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;;AAxDH,wCAyDC;AAxDiB,mBAAI,GAAG,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@storehouse/mongodb",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "MongoDB manager for @storehouse/core",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"doc": "typedoc",
|
|
8
|
-
"build": "tsc",
|
|
9
|
-
"lint": "eslint src/**/*.ts",
|
|
10
|
-
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\", \"noUnusedParameters\": false}' kaukau --require ts-node/register --config kaukau-src.js",
|
|
11
|
-
"testlib": "kaukau --config kaukau-lib.js"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/kisiwu/storehouse-mongodb.git"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"storehouse",
|
|
19
|
-
"mongodb"
|
|
20
|
-
],
|
|
21
|
-
"author": "demingongo",
|
|
22
|
-
"license": "MIT",
|
|
23
|
-
"bugs": {
|
|
24
|
-
"url": "https://github.com/kisiwu/storehouse-mongodb/issues"
|
|
25
|
-
},
|
|
26
|
-
"homepage": "https://
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@types/chai": "^4.
|
|
29
|
-
"@types/mocha": "^
|
|
30
|
-
"@types/node": "^
|
|
31
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
32
|
-
"@typescript-eslint/parser": "^
|
|
33
|
-
"eslint": "^
|
|
34
|
-
"kaukau": "^
|
|
35
|
-
"ts-node": "^10.
|
|
36
|
-
"typedoc": "^0.
|
|
37
|
-
"typescript": "^
|
|
38
|
-
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"@novice1/logger": "^1.3.
|
|
41
|
-
"@storehouse/core": "^1.
|
|
42
|
-
"mongodb": "^
|
|
43
|
-
"tslib": "^2.
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@storehouse/mongodb",
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"description": "MongoDB manager for @storehouse/core",
|
|
5
|
+
"main": "lib/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"doc": "typedoc",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"lint": "eslint src/**/*.ts",
|
|
10
|
+
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\", \"noUnusedParameters\": false}' kaukau --require ts-node/register --config kaukau-src.js",
|
|
11
|
+
"testlib": "kaukau --config kaukau-lib.js"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/kisiwu/storehouse-mongodb.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"storehouse",
|
|
19
|
+
"mongodb"
|
|
20
|
+
],
|
|
21
|
+
"author": "demingongo",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/kisiwu/storehouse-mongodb/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://kisiwu.github.io/storehouse/mongodb/latest/",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/chai": "^4.3.12",
|
|
29
|
+
"@types/mocha": "^10.0.6",
|
|
30
|
+
"@types/node": "^20.11.20",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
32
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
33
|
+
"eslint": "^8.57.0",
|
|
34
|
+
"kaukau": "^3.0.1",
|
|
35
|
+
"ts-node": "^10.9.2",
|
|
36
|
+
"typedoc": "^0.25.8",
|
|
37
|
+
"typescript": "^5.3.3"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@novice1/logger": "^1.3.3",
|
|
41
|
+
"@storehouse/core": "^1.1.1",
|
|
42
|
+
"mongodb": "^6.3.0",
|
|
43
|
+
"tslib": "^2.6.2"
|
|
44
|
+
}
|
|
45
|
+
}
|