elasticio-sailor-nodejs 2.7.6-dev.1 → 2.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/service.js +10 -0
- package/package.json +2 -2
package/lib/service.js
CHANGED
|
@@ -139,6 +139,16 @@ function processService(serviceMethod, env) {
|
|
|
139
139
|
data: responseBody,
|
|
140
140
|
validateStatus: (status) => (status >= 200 && status < 500)
|
|
141
141
|
};
|
|
142
|
+
const parsedUrl = new URL(POST_RESULT_URL);
|
|
143
|
+
if (parsedUrl.username && parsedUrl.password) {
|
|
144
|
+
opts.auth = {
|
|
145
|
+
username: decodeURIComponent(parsedUrl.username),
|
|
146
|
+
password: decodeURIComponent(parsedUrl.password)
|
|
147
|
+
};
|
|
148
|
+
parsedUrl.username = '';
|
|
149
|
+
parsedUrl.password = '';
|
|
150
|
+
opts.url = parsedUrl.toString();
|
|
151
|
+
}
|
|
142
152
|
|
|
143
153
|
const config = {
|
|
144
154
|
retriesCount: parseInt(env.ELASTICIO_API_REQUEST_RETRY_ATTEMPTS),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "elasticio-sailor-nodejs",
|
|
3
3
|
"description": "The official elastic.io library for bootstrapping and executing for Node.js connectors",
|
|
4
|
-
"version": "2.7.6
|
|
4
|
+
"version": "2.7.6",
|
|
5
5
|
"main": "run.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"audit": "better-npm-audit audit --level high --production",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bunyan": "1.8.10",
|
|
22
22
|
"co": "4.6.0",
|
|
23
23
|
"debug": "3.1.0",
|
|
24
|
-
"elasticio-rest-node": "2.0.0
|
|
24
|
+
"elasticio-rest-node": "2.0.0",
|
|
25
25
|
"event-to-promise": "0.8.0",
|
|
26
26
|
"lodash": "4.17.21",
|
|
27
27
|
"p-throttle": "2.1.0",
|