fix: ts ignore declaration file issue w/ dbinfoz (#1945)
This commit is contained in:
parent
fe05db541d
commit
477ecd63ac
3 changed files with 8 additions and 9 deletions
|
|
@ -6,6 +6,7 @@ import {
|
|||
LoadSubmenuItemsArgs,
|
||||
} from "../../index.js";
|
||||
import { BaseContextProvider } from "../index.js";
|
||||
import getDatabaseAdapter from "dbinfoz";
|
||||
|
||||
class DatabaseContextProvider extends BaseContextProvider {
|
||||
static description: ContextProviderDescription = {
|
||||
|
|
@ -30,10 +31,9 @@ class DatabaseContextProvider extends BaseContextProvider {
|
|||
|
||||
const [connectionName, table] = query.split(".");
|
||||
|
||||
const { getDatabaseAdapter } = await import("dbinfoz");
|
||||
|
||||
for (const connection of connections) {
|
||||
if (connection.name === connectionName) {
|
||||
// @ts-ignore (incorrect typings on module's declaration file)
|
||||
const adapter = getDatabaseAdapter(
|
||||
connection.connection_type,
|
||||
connection.connection,
|
||||
|
|
@ -87,9 +87,8 @@ class DatabaseContextProvider extends BaseContextProvider {
|
|||
return contextItems;
|
||||
}
|
||||
|
||||
const { getDatabaseAdapter } = await import("dbinfoz");
|
||||
|
||||
for (const connection of connections) {
|
||||
// @ts-ignore (incorrect typings on module's declaration file)
|
||||
const adapter = getDatabaseAdapter(
|
||||
connection.connection_type,
|
||||
connection.connection,
|
||||
|
|
|
|||
8
extensions/vscode/package-lock.json
generated
8
extensions/vscode/package-lock.json
generated
|
|
@ -18,7 +18,7 @@
|
|||
"axios": "^1.2.5",
|
||||
"core": "file:../../core",
|
||||
"cors": "^2.8.5",
|
||||
"dbinfoz": "^0.1.4",
|
||||
"dbinfoz": "^0.11.0",
|
||||
"downshift": "^7.6.0",
|
||||
"esbuild": "^0.17.19",
|
||||
"express": "^4.18.2",
|
||||
|
|
@ -3918,9 +3918,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/dbinfoz": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.1.4.tgz",
|
||||
"integrity": "sha512-MB56+xS571ip7qoXqxdnOUtXebbWaqoZN+S++W51SQYJRSjQFGEIPucNmxgeQlBGJ1vM4mQNV47wzV6fcrezZg==",
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/dbinfoz/-/dbinfoz-0.11.0.tgz",
|
||||
"integrity": "sha512-l7REBd9pwTBI6PWSk/dx+zCpSE2tiJdSKfApeoOajnSgyMJgkwGfhpPO2mV76MLQeKPaSm0mMKxmoqd38SaHmw==",
|
||||
"dependencies": {
|
||||
"mysql2": "^3.9.1",
|
||||
"pg": "^8.11.3",
|
||||
|
|
|
|||
|
|
@ -579,7 +579,7 @@
|
|||
"axios": "^1.2.5",
|
||||
"core": "file:../../core",
|
||||
"cors": "^2.8.5",
|
||||
"dbinfoz": "^0.1.4",
|
||||
"dbinfoz": "^0.11.0",
|
||||
"downshift": "^7.6.0",
|
||||
"esbuild": "^0.17.19",
|
||||
"express": "^4.18.2",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue