types
This commit is contained in:
parent
795f20988a
commit
79c515e57d
|
@ -132,7 +132,7 @@
|
|||
"@types/koa-send": "^4.1.6",
|
||||
"@types/koa__router": "12.0.4",
|
||||
"@types/lodash": "4.14.200",
|
||||
"@types/mssql": "9.1.4",
|
||||
"@types/mssql": "9.1.5",
|
||||
"@types/node-fetch": "2.6.4",
|
||||
"@types/oracledb": "6.5.1",
|
||||
"@types/pg": "8.6.6",
|
||||
|
|
|
@ -2,7 +2,7 @@ import { ImportSource, ImportInfo } from "./base"
|
|||
import { Query } from "../../../../../definitions/common"
|
||||
import { URL } from "url"
|
||||
|
||||
const parseCurl = async (data: string): any => {
|
||||
const parseCurl = async (data: string): Promise<any> => {
|
||||
const curlconverter = await import("curlconverter")
|
||||
const curlJson = curlconverter.toJsonString(data)
|
||||
return JSON.parse(curlJson)
|
||||
|
|
|
@ -281,6 +281,7 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
|
|||
case MSSQLConfigAuthType.NTLM: {
|
||||
const { domain, trustServerCertificate } =
|
||||
this.config.ntlmConfig || {}
|
||||
|
||||
clientCfg.authentication = {
|
||||
type: "ntlm",
|
||||
options: {
|
||||
|
|
|
@ -74,14 +74,14 @@ const SCHEMA: Integration = {
|
|||
|
||||
class SnowflakePromise {
|
||||
config: SnowflakeConfig
|
||||
client: snowflakeSdk
|
||||
client?: snowflakeSdk.Connection
|
||||
|
||||
constructor(config: SnowflakeConfig) {
|
||||
this.config = config
|
||||
}
|
||||
|
||||
async connect() {
|
||||
if (this.client?.isConnected()) return
|
||||
if (this.client?.isUp()) return
|
||||
|
||||
this.client = snowflakeSdk.createConnection(this.config)
|
||||
const connectAsync = promisify(this.client.connect.bind(this.client))
|
||||
|
@ -89,6 +89,10 @@ class SnowflakePromise {
|
|||
}
|
||||
|
||||
async execute(sql: string) {
|
||||
if (!this.client) {
|
||||
throw Error("No snowflake client present to execute query. Run connect() first to initialise.")
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
this.client.execute({
|
||||
sqlText: sql,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import jimp from "jimp"
|
||||
import { Jimp } from "jimp"
|
||||
|
||||
const FORMATS = {
|
||||
IMAGES: ["png", "jpg", "jpeg", "gif", "bmp", "tiff"],
|
||||
|
@ -6,8 +6,8 @@ const FORMATS = {
|
|||
|
||||
function processImage(file: { path: string }) {
|
||||
// this will overwrite the temp file
|
||||
return jimp.read(file.path).then(img => {
|
||||
return img.resize(300, jimp.AUTO).write(file.path)
|
||||
return Jimp.read(file.path).then(img => {
|
||||
return img.resize({ w: 256 }).write(file.path as `${string}.${string}`)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -5575,10 +5575,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
|
||||
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
|
||||
|
||||
"@types/mssql@9.1.4":
|
||||
version "9.1.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/mssql/-/mssql-9.1.4.tgz#d485b06494a76d15b957e0952305c55053bac366"
|
||||
integrity sha512-st2ryK+viraRuptxcGs+66J0RrABytxhGxUlpWcOniNPzpnxIaeNhPJVM3lZn1r+s/6lQARYID6Z+MBoseSD8g==
|
||||
"@types/mssql@9.1.5":
|
||||
version "9.1.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/mssql/-/mssql-9.1.5.tgz#1574a5870aeb029c6d787861af101161b9b8d3b6"
|
||||
integrity sha512-Q9EsgXwuRoX5wvUSu24YfbKMbFChv7pZ/jeCzPkj47ehcuXYsBcfogwrtVFosSjinD4Q/MY2YPGk9Yy1cM2Ywg==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
"@types/tedious" "*"
|
||||
|
|
Loading…
Reference in New Issue