Skip to content

Commit

Permalink
Remove request dep (#1183)
Browse files Browse the repository at this point in the history
* Update drill docker-compose version

* Remove unused method

* Remove request from package.json
  • Loading branch information
rickbergfalk committed Mar 18, 2023
1 parent 74055c3 commit 46a84e1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 70 deletions.
2 changes: 1 addition & 1 deletion server/drivers/drill/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '1.14.0'
version: '3'
services:
drill:
image: harisekhon/apache-drill:latest
Expand Down
27 changes: 0 additions & 27 deletions server/drivers/drill/drill.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const fetch = require('node-fetch');
let request = require('request');
let url = require('url');
const appLog = require('../../lib/app-log');

exports.version = '1.0';
Expand All @@ -18,31 +16,6 @@ let Client = (exports.Client = function (args) {
}
});

Client.prototype.execute = function (queryString, callback) {
const href = url.format({
protocol: this.protocol,
hostname: 'localhost',
pathname: '/query.json',
port: 8047,
});
let headers = {
'Content-Type': 'application/json; charset=UTF-8',
'User-Name': this.user,
Accept: 'application/json',
};
let queryOptions = {
uri: href,
method: 'POST',
headers,
json: { queryType: 'SQL', query: queryString },
};
request(queryOptions, function (error, response, body) {
if (!error && response.statusCode === 200) {
callback(null, body);
} // TODO Add error handling
});
};

Client.prototype.getSchemata = function () {
return this.query('SHOW DATABASES');
};
Expand Down
1 change: 0 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
"prettier": "^2.6.2",
"query-string": "^7.1.1",
"redis": "^4.0.6",
"request": "^2.88.2",
"rimraf": "^3.0.2",
"sanitize-filename": "^1.6.3",
"sequelize": "^6.19.0",
Expand Down
43 changes: 2 additions & 41 deletions server/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2595,7 +2595,7 @@ har-schema@^2.0.0:
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
integrity sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==

har-validator@~5.1.0, har-validator@~5.1.3:
har-validator@~5.1.0:
version "5.1.5"
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd"
integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==
Expand Down Expand Up @@ -4562,11 +4562,6 @@ psl@^1.1.24:
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==

psl@^1.1.28:
version "1.8.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==

pump@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
Expand All @@ -4585,7 +4580,7 @@ punycode@^1.3.2, punycode@^1.4.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e"
integrity sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==

punycode@^2.1.0, punycode@^2.1.1:
punycode@^2.1.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==
Expand Down Expand Up @@ -4807,32 +4802,6 @@ request@2.88.0:
tunnel-agent "^0.6.0"
uuid "^3.3.2"

request@^2.88.2:
version "2.88.2"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
caseless "~0.12.0"
combined-stream "~1.0.6"
extend "~3.0.2"
forever-agent "~0.6.1"
form-data "~2.3.2"
har-validator "~5.1.3"
http-signature "~1.2.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
oauth-sign "~0.9.0"
performance-now "^2.1.0"
qs "~6.5.2"
safe-buffer "^5.1.2"
tough-cookie "~2.5.0"
tunnel-agent "^0.6.0"
uuid "^3.3.2"

require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
Expand Down Expand Up @@ -5599,14 +5568,6 @@ tough-cookie@~2.4.3:
psl "^1.1.24"
punycode "^1.4.1"

tough-cookie@~2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
dependencies:
psl "^1.1.28"
punycode "^2.1.1"

tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
Expand Down

0 comments on commit 46a84e1

Please sign in to comment.