@openfn/language-kobotoolbox 4.3.3 → 4.3.4
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/README.md +1 -1
- package/dist/index.cjs +6 -0
- package/dist/index.js +6 -0
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -94,6 +94,12 @@ async function request(state, method, path, opts = {}) {
|
|
|
94
94
|
parseAs = "json",
|
|
95
95
|
maxRedirections
|
|
96
96
|
} = opts;
|
|
97
|
+
const isAbsoluteUrl = /^(https?:|\/\/)/i.test(path);
|
|
98
|
+
if (isAbsoluteUrl) {
|
|
99
|
+
throw new Error(
|
|
100
|
+
`Invalid path argument: "${path}" appears to be an absolute URL. Please provide a relative path`
|
|
101
|
+
);
|
|
102
|
+
}
|
|
97
103
|
const requestPath = `/api/${apiVersion}/${path}/`;
|
|
98
104
|
const authHeaders = (0, import_util.makeBasicAuthHeader)(username, password);
|
|
99
105
|
const options = {
|
package/dist/index.js
CHANGED
|
@@ -60,6 +60,12 @@ async function request(state, method, path, opts = {}) {
|
|
|
60
60
|
parseAs = "json",
|
|
61
61
|
maxRedirections
|
|
62
62
|
} = opts;
|
|
63
|
+
const isAbsoluteUrl = /^(https?:|\/\/)/i.test(path);
|
|
64
|
+
if (isAbsoluteUrl) {
|
|
65
|
+
throw new Error(
|
|
66
|
+
`Invalid path argument: "${path}" appears to be an absolute URL. Please provide a relative path`
|
|
67
|
+
);
|
|
68
|
+
}
|
|
63
69
|
const requestPath = `/api/${apiVersion}/${path}/`;
|
|
64
70
|
const authHeaders = makeBasicAuthHeader(username, password);
|
|
65
71
|
const options = {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-kobotoolbox",
|
|
3
3
|
"label": "KoboToolbox",
|
|
4
|
-
"version": "4.3.
|
|
4
|
+
"version": "4.3.4",
|
|
5
5
|
"description": "OpenFn adaptor for KoboToolbox",
|
|
6
6
|
"homepage": "https://docs.openfn.org",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
9
|
+
"url": "https://github.com/OpenFn/adaptors.git"
|
|
10
10
|
},
|
|
11
11
|
"main": "dist/index.cjs",
|
|
12
12
|
"author": "Open Function Group",
|