Updates
This commit is contained in:
parent
863906f3e6
commit
19eb7bf222
@ -87,7 +87,7 @@ function queryDSQLAPI(_a) {
|
||||
// httpsRequest.getHeaders()
|
||||
// );
|
||||
}
|
||||
resolve(Object.assign(Object.assign({}, responseObj), { requestOptions }));
|
||||
resolve(Object.assign(Object.assign({}, responseObj), { requestOptions: loggedRequestOptions }));
|
||||
}
|
||||
catch (error) {
|
||||
resolve({
|
||||
|
||||
@ -7,6 +7,7 @@ exports.default = httpsRequest;
|
||||
const https_1 = __importDefault(require("https"));
|
||||
const http_1 = __importDefault(require("http"));
|
||||
const url_1 = require("url");
|
||||
const lodash_1 = __importDefault(require("lodash"));
|
||||
/**
|
||||
* # Make Https Request
|
||||
*/
|
||||
@ -28,6 +29,8 @@ function httpsRequest({ url, method, hostname, host, path, headers, body, port,
|
||||
: 80,
|
||||
headers: {},
|
||||
};
|
||||
let loggedRequestOptions = lodash_1.default.cloneDeep(requestOptions);
|
||||
delete loggedRequestOptions["headers"];
|
||||
if (path)
|
||||
requestOptions.path = path;
|
||||
if (headers)
|
||||
|
||||
@ -124,7 +124,10 @@ export default async function queryDSQLAPI<T = { [k: string]: any }>({
|
||||
// httpsRequest.getHeaders()
|
||||
// );
|
||||
}
|
||||
resolve({ ...responseObj, requestOptions });
|
||||
resolve({
|
||||
...responseObj,
|
||||
requestOptions: loggedRequestOptions,
|
||||
});
|
||||
} catch (error: any) {
|
||||
resolve({
|
||||
success: false,
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import https from "https";
|
||||
import http from "http";
|
||||
import { URL } from "url";
|
||||
import _ from "lodash";
|
||||
|
||||
type Param = {
|
||||
scheme?: string;
|
||||
@ -47,6 +48,9 @@ export default function httpsRequest<Res extends any = any>({
|
||||
headers: {},
|
||||
};
|
||||
|
||||
let loggedRequestOptions = _.cloneDeep(requestOptions);
|
||||
delete loggedRequestOptions["headers"];
|
||||
|
||||
if (path) requestOptions.path = path;
|
||||
|
||||
if (headers) requestOptions.headers = headers;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "5.7.0",
|
||||
"version": "5.7.1",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user