mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
fix jest
This commit is contained in:
1 parent
e8ba53e8ec
commit
03f8c767f0
4 files changed
+23
-9
No files matched your search
@@ -33,7 +33,6 @@
|
|||||||
"markdown-it-table-of-contents": "^0.4.4",
|
"markdown-it-table-of-contents": "^0.4.4",
|
||||||
"moment-timezone": "^0.5.31",
|
"moment-timezone": "^0.5.31",
|
||||||
"mongodb": "^3.5.9",
|
"mongodb": "^3.5.9",
|
||||||
"mongodb-watcher": "^1.3.0",
|
|
||||||
"nodemailer": "^6.4.10",
|
"nodemailer": "^6.4.10",
|
||||||
"nunjucks": "^3.2.2",
|
"nunjucks": "^3.2.2",
|
||||||
"prismjs": "^1.20.0",
|
"prismjs": "^1.20.0",
|
||||||
@@ -71,4 +70,4 @@
|
|||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"build:watch": "tsc --watch"
|
"build:watch": "tsc --watch"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
import mongodb from 'mongodb';
|
import mongodb from 'mongodb';
|
||||||
import MongoWatcher from 'mongodb-watcher';
|
|
||||||
import * as bus from './bus';
|
import * as bus from './bus';
|
||||||
import options from '../options';
|
import options from '../options';
|
||||||
|
|
||||||
@@ -16,12 +15,6 @@ mongodb.MongoClient.connect(mongourl, { useNewUrlParser: true, useUnifiedTopolog
|
|||||||
.then((Client) => {
|
.then((Client) => {
|
||||||
db = Client.db(opts.name);
|
db = Client.db(opts.name);
|
||||||
global.Hydro.service.db.db = db;
|
global.Hydro.service.db.db = db;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
const watcher = new MongoWatcher(db, {
|
|
||||||
longCursorThreshold: 100,
|
|
||||||
largeInsertThreshold: 1024 * 30,
|
|
||||||
largeFetchThreshold: 1024 * 30,
|
|
||||||
});
|
|
||||||
bus.publish('system_database_connected', null);
|
bus.publish('system_database_connected', null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es2019",
|
||||||
|
"module": "commonjs",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"declaration": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"composite": true,
|
||||||
|
"strictBindCallApply": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"outDir": "build",
|
||||||
|
"rootDir": "build"
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"build"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"packages"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
{ "path": "packages/login-with-github" },
|
{ "path": "packages/login-with-github" },
|
||||||
{ "path": "packages/login-with-google" },
|
{ "path": "packages/login-with-google" },
|
||||||
{ "path": "packages/migrate-vijos" },
|
{ "path": "packages/migrate-vijos" },
|
||||||
|
{ "path": "tsconfig.build.json" },
|
||||||
],
|
],
|
||||||
"files": [],
|
"files": [],
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user