mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-29 04:06:00 +00:00
typings refactor - no compilation, renamed package
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
"nedb-promises": "^4.0.1",
|
||||
"pg": "^7.17.0",
|
||||
"socket.io": "^2.3.0",
|
||||
"@dbgate/lib": "file:../lib",
|
||||
"uuid": "^3.4.0"
|
||||
},
|
||||
"scripts": {
|
||||
@@ -26,6 +25,7 @@
|
||||
"devDependencies": {
|
||||
"@types/lodash": "^4.14.149",
|
||||
"nodemon": "^2.0.2",
|
||||
"typescript": "^3.7.4"
|
||||
"typescript": "^3.7.4",
|
||||
"@types/dbgate": "file:../lib"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ const { fork } = require('child_process');
|
||||
const DatabaseAnalyser = require('../engines/default/DatabaseAnalyser');
|
||||
|
||||
module.exports = {
|
||||
/** @type {import('@dbgate/lib').OpenedDatabaseConnection[]} */
|
||||
/** @type {import('dbgate').OpenedDatabaseConnection[]} */
|
||||
opened: [],
|
||||
requests: {},
|
||||
|
||||
@@ -48,7 +48,7 @@ module.exports = {
|
||||
return newOpened;
|
||||
},
|
||||
|
||||
/** @param {import('@dbgate/lib').OpenedDatabaseConnection} conn */
|
||||
/** @param {import('dbgate').OpenedDatabaseConnection} conn */
|
||||
async sendRequest(conn, message) {
|
||||
const msgid = uuidv1();
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class DatabaseAnalyser {
|
||||
/**
|
||||
*
|
||||
* @param {import('@dbgate/lib').EngineDriver} driver
|
||||
* @param {import('dbgate').EngineDriver} driver
|
||||
*/
|
||||
constructor(pool, driver) {
|
||||
this.pool = pool;
|
||||
@@ -11,7 +11,7 @@ class DatabaseAnalyser {
|
||||
async runAnalysis() {}
|
||||
}
|
||||
|
||||
/** @returns {import('@dbgate/lib').DatabaseInfo} */
|
||||
/** @returns {import('dbgate').DatabaseInfo} */
|
||||
DatabaseAnalyser.createEmptyStructure = () => ({
|
||||
tables: [],
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
/** @return {import('@dbgate/lib').EngineDriver} */
|
||||
/** @return {import('dbgate').EngineDriver} */
|
||||
function getDriver(connection) {
|
||||
const { engine } = connection;
|
||||
return require(`./${engine}`);
|
||||
|
||||
Reference in New Issue
Block a user