@openfn/language-magpi 1.0.5 → 1.1.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/dist/index.cjs +4 -4
- package/dist/index.js +4 -4
- package/package.json +4 -3
package/dist/index.cjs
CHANGED
|
@@ -106,8 +106,8 @@ function fetchSurveyData(params) {
|
|
|
106
106
|
url,
|
|
107
107
|
form
|
|
108
108
|
},
|
|
109
|
-
(
|
|
110
|
-
error = assembleError({ error, response });
|
|
109
|
+
(err, response, body) => {
|
|
110
|
+
const error = assembleError({ error: err, response });
|
|
111
111
|
if (error) {
|
|
112
112
|
console.log("Failed to fetch submission data.");
|
|
113
113
|
console.log("Response body: " + response.body);
|
|
@@ -145,8 +145,8 @@ function fetchSurveyData(params) {
|
|
|
145
145
|
url: postUrl,
|
|
146
146
|
json: item
|
|
147
147
|
},
|
|
148
|
-
(
|
|
149
|
-
error = assembleError({ error, response });
|
|
148
|
+
(err, response, postResponseBody) => {
|
|
149
|
+
const error = assembleError({ error: err, response });
|
|
150
150
|
if (error) {
|
|
151
151
|
console.error("POST failed.");
|
|
152
152
|
throw error;
|
package/dist/index.js
CHANGED
|
@@ -82,8 +82,8 @@ function fetchSurveyData(params) {
|
|
|
82
82
|
url,
|
|
83
83
|
form
|
|
84
84
|
},
|
|
85
|
-
(
|
|
86
|
-
error = assembleError({ error, response });
|
|
85
|
+
(err, response, body) => {
|
|
86
|
+
const error = assembleError({ error: err, response });
|
|
87
87
|
if (error) {
|
|
88
88
|
console.log("Failed to fetch submission data.");
|
|
89
89
|
console.log("Response body: " + response.body);
|
|
@@ -121,8 +121,8 @@ function fetchSurveyData(params) {
|
|
|
121
121
|
url: postUrl,
|
|
122
122
|
json: item
|
|
123
123
|
},
|
|
124
|
-
(
|
|
125
|
-
error = assembleError({ error, response });
|
|
124
|
+
(err, response, postResponseBody) => {
|
|
125
|
+
const error = assembleError({ error: err, response });
|
|
126
126
|
if (error) {
|
|
127
127
|
console.error("POST failed.");
|
|
128
128
|
throw error;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-magpi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "A Magpi Language Pack for OpenFn",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"author": "Open Function Group",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"configuration-schema.json"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@openfn/language-common": "^1.
|
|
15
|
+
"@openfn/language-common": "^1.8.1",
|
|
16
16
|
"JSONPath": "^0.10.0",
|
|
17
17
|
"js2xmlparser": "^3.0.0",
|
|
18
18
|
"lodash-fp": "^0.10.4",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
"test": "mocha --experimental-specifier-resolution=node --no-warnings",
|
|
50
50
|
"test:watch": "mocha -w --experimental-specifier-resolution=node --no-warnings",
|
|
51
51
|
"clean": "rimraf dist types docs",
|
|
52
|
-
"pack": "pnpm pack --pack-destination ../../dist"
|
|
52
|
+
"pack": "pnpm pack --pack-destination ../../dist",
|
|
53
|
+
"lint": "eslint src"
|
|
53
54
|
}
|
|
54
55
|
}
|