mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 18:32:29 +01:00
⬆️ bump lambert-db
This commit is contained in:
parent
7938b858b5
commit
451d2c3611
5
dist/util/Database.js
vendored
5
dist/util/Database.js
vendored
@ -2,6 +2,9 @@
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const lambert_db_1 = require("lambert-db");
|
||||
// TODO: load url from config
|
||||
const db = new lambert_db_1.MongoDatabase("mongodb://127.0.0.1:27017/lambert?readPreference=secondaryPreferred");
|
||||
const db = new lambert_db_1.MongoDatabase("mongodb://127.0.0.1:27017/lambert?readPreference=secondaryPreferred", {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: false,
|
||||
});
|
||||
exports.default = db;
|
||||
//# sourceMappingURL=Database.js.map
|
2
dist/util/Database.js.map
vendored
2
dist/util/Database.js.map
vendored
@ -1 +1 @@
|
||||
{"version":3,"file":"Database.js","sourceRoot":"","sources":["../../src/util/Database.ts"],"names":[],"mappings":";;AAAA,2CAA2C;AAE3C,6BAA6B;AAC7B,MAAM,EAAE,GAAG,IAAI,0BAAa,CAAC,qEAAqE,CAAC,CAAC;AAEpG,kBAAe,EAAE,CAAC"}
|
||||
{"version":3,"file":"Database.js","sourceRoot":"","sources":["../../src/util/Database.ts"],"names":[],"mappings":";;AAAA,2CAA2C;AAE3C,6BAA6B;AAC7B,MAAM,EAAE,GAAG,IAAI,0BAAa,CAAC,qEAAqE,EAAE;IACnG,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,KAAK;CACzB,CAAC,CAAC;AAEH,kBAAe,EAAE,CAAC"}
|
14
package-lock.json
generated
14
package-lock.json
generated
@ -10,7 +10,7 @@
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lambert-db": "^1.1.6",
|
||||
"lambert-db": "^1.1.7",
|
||||
"missing-native-js-functions": "^1.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -418,9 +418,9 @@
|
||||
"integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
|
||||
},
|
||||
"node_modules/lambert-db": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/lambert-db/-/lambert-db-1.1.6.tgz",
|
||||
"integrity": "sha512-FbUNAbgPYUvfJSxLdcfIk6w8J+Z4IYZJasVURBMm4eOeLm//kgGeOi+SrJqqa5z+gaCJ65ENIVs2hd+Cj2Efbw==",
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/lambert-db/-/lambert-db-1.1.7.tgz",
|
||||
"integrity": "sha512-OJzXySr/eISttGbkB3uE4ybJW8H/eO1lKWzCt0R38OBuMKnVBfCDO3yOQCXiIzjk9kXOggL4vsKy3OujLDXoDg==",
|
||||
"dependencies": {
|
||||
"missing-native-js-functions": "^1.1.8",
|
||||
"mongodb": "^3.6.2",
|
||||
@ -1428,9 +1428,9 @@
|
||||
"integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
|
||||
},
|
||||
"lambert-db": {
|
||||
"version": "1.1.6",
|
||||
"resolved": "https://registry.npmjs.org/lambert-db/-/lambert-db-1.1.6.tgz",
|
||||
"integrity": "sha512-FbUNAbgPYUvfJSxLdcfIk6w8J+Z4IYZJasVURBMm4eOeLm//kgGeOi+SrJqqa5z+gaCJ65ENIVs2hd+Cj2Efbw==",
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/lambert-db/-/lambert-db-1.1.7.tgz",
|
||||
"integrity": "sha512-OJzXySr/eISttGbkB3uE4ybJW8H/eO1lKWzCt0R38OBuMKnVBfCDO3yOQCXiIzjk9kXOggL4vsKy3OujLDXoDg==",
|
||||
"requires": {
|
||||
"missing-native-js-functions": "^1.1.8",
|
||||
"mongodb": "^3.6.2",
|
||||
|
@ -21,7 +21,7 @@
|
||||
"homepage": "https://github.com/discord-open-source/discord-server-util#readme",
|
||||
"dependencies": {
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"lambert-db": "^1.1.6",
|
||||
"lambert-db": "^1.1.7",
|
||||
"missing-native-js-functions": "^1.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -5,7 +5,7 @@ var Config: ProviderCache;
|
||||
|
||||
export default {
|
||||
init: async function init(opts: DefaultOptions = DefaultOptions) {
|
||||
Config = db.data.config({}).cache();
|
||||
Config = await db.data.config({}).cache();
|
||||
await Config.init();
|
||||
await Config.set(opts.merge(Config.cache || {}));
|
||||
},
|
||||
|
@ -1,6 +1,9 @@
|
||||
import { MongoDatabase } from "lambert-db";
|
||||
|
||||
// TODO: load url from config
|
||||
const db = new MongoDatabase("mongodb://127.0.0.1:27017/lambert?readPreference=secondaryPreferred");
|
||||
const db = new MongoDatabase("mongodb://127.0.0.1:27017/lambert?readPreference=secondaryPreferred", {
|
||||
useNewUrlParser: true,
|
||||
useUnifiedTopology: false,
|
||||
});
|
||||
|
||||
export default db;
|
||||
|
Loading…
Reference in New Issue
Block a user