@openfn/language-http 6.2.0 → 6.2.1
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/configuration-schema.json +10 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,15 @@
|
|
|
18
18
|
"@some(!)Password"
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
|
+
"token": {
|
|
22
|
+
"title": "Token",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Bearer token or API key. This should be added manually to the Authorization header.",
|
|
25
|
+
"writeOnly": true,
|
|
26
|
+
"examples": [
|
|
27
|
+
"00QCjAl4MlV-WPX"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
21
30
|
"baseUrl": {
|
|
22
31
|
"title": "Base URL",
|
|
23
32
|
"anyOf": [
|
|
@@ -37,6 +46,5 @@
|
|
|
37
46
|
}
|
|
38
47
|
},
|
|
39
48
|
"type": "object",
|
|
40
|
-
"additionalProperties": true
|
|
41
|
-
"required": ["password", "username"]
|
|
49
|
+
"additionalProperties": true
|
|
42
50
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -98,7 +98,7 @@ var cheerio = __toESM(require("cheerio"), 1);
|
|
|
98
98
|
var import_cheerio_tableparser = __toESM(require("cheerio-tableparser"), 1);
|
|
99
99
|
function addBasicAuth(configuration = {}, headers) {
|
|
100
100
|
const { username, password } = configuration;
|
|
101
|
-
if (username && password) {
|
|
101
|
+
if (username && password && !headers.Authorization) {
|
|
102
102
|
Object.assign(headers, (0, import_util.makeBasicAuthHeader)(username, password));
|
|
103
103
|
}
|
|
104
104
|
}
|
package/dist/index.js
CHANGED
|
@@ -50,7 +50,7 @@ import * as cheerio from "cheerio";
|
|
|
50
50
|
import cheerioTableparser from "cheerio-tableparser";
|
|
51
51
|
function addBasicAuth(configuration = {}, headers) {
|
|
52
52
|
const { username, password } = configuration;
|
|
53
|
-
if (username && password) {
|
|
53
|
+
if (username && password && !headers.Authorization) {
|
|
54
54
|
Object.assign(headers, makeBasicAuthHeader(username, password));
|
|
55
55
|
}
|
|
56
56
|
}
|