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