@activepieces/pieces-common
Advanced tools
Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "@activepieces/pieces-common", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"type": "commonjs", | ||
"dependencies": { | ||
"@sinclair/typebox": "0.26.8", | ||
"axios": "^1.0.0", | ||
"axios": "^1.6.0", | ||
"dayjs": "1.11.9", | ||
@@ -13,7 +13,7 @@ "is-base64": "1.1.0", | ||
"semver": "7.5.4", | ||
"@activepieces/pieces-framework": "0.7.0", | ||
"@activepieces/shared": "0.10.5", | ||
"tslib": "1.14.1" | ||
"@activepieces/pieces-framework": "0.7.1", | ||
"@activepieces/shared": "0.10.13", | ||
"tslib": "2.6.1" | ||
}, | ||
"main": "./src/index.js" | ||
} |
@@ -18,3 +18,3 @@ "use strict"; | ||
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; | ||
const url = this.getUrl(request); | ||
const { urlWithoutQueryParams, queryParams } = this.getUrl(request); | ||
const headers = this.getHeaders(request); | ||
@@ -25,4 +25,4 @@ const axiosRequestMethod = this.getAxiosRequestMethod(request.method); | ||
method: axiosRequestMethod, | ||
url, | ||
params: request.queryParams, | ||
url: urlWithoutQueryParams, | ||
params: Object.assign(Object.assign({}, queryParams), request.queryParams), | ||
headers, | ||
@@ -29,0 +29,0 @@ data: request.body, |
@@ -12,5 +12,8 @@ import { DelegatingAuthenticationConverter } from './delegating-authentication-converter'; | ||
abstract sendRequest<RequestBody extends HttpMessageBody, ResponseBody extends HttpMessageBody>(request: HttpRequest<RequestBody>): Promise<HttpResponse<ResponseBody>>; | ||
protected getUrl<RequestBody extends HttpMessageBody>(request: HttpRequest<RequestBody>): string; | ||
protected getUrl<RequestBody extends HttpMessageBody>(request: HttpRequest<RequestBody>): { | ||
urlWithoutQueryParams: string; | ||
queryParams: Record<string, string>; | ||
}; | ||
protected getHeaders<RequestBody extends HttpMessageBody>(request: HttpRequest<RequestBody>): HttpHeaders; | ||
private populateAuthentication; | ||
} |
@@ -14,3 +14,12 @@ "use strict"; | ||
const url = new node_url_1.URL(`${this.baseUrl}${request.url}`); | ||
return url.toString(); | ||
const urlWithoutQueryParams = `${url.origin}${url.pathname}`; | ||
const queryParams = {}; | ||
// Extract query parameters | ||
url.searchParams.forEach((value, key) => { | ||
queryParams[key] = value; | ||
}); | ||
return { | ||
urlWithoutQueryParams, | ||
queryParams, | ||
}; | ||
} | ||
@@ -17,0 +26,0 @@ getHeaders(request) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
37959
575
+ Added@activepieces/pieces-framework@0.7.1(transitive)
+ Added@activepieces/shared@0.10.13(transitive)
+ Addedtslib@2.6.2(transitive)
- Removed@activepieces/pieces-framework@0.7.0(transitive)
- Removed@activepieces/shared@0.10.4(transitive)
- Removedtslib@1.14.1(transitive)
Updated@activepieces/shared@0.10.13
Updatedaxios@^1.6.0
Updatedtslib@2.6.1