@openfn/language-common 3.3.3 → 3.3.5
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 +1 -1
- package/dist/index.js +1 -1
- package/dist/util.cjs +1 -1
- package/dist/util.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -480,7 +480,7 @@ async function readResponseBody(response, parseAs) {
|
|
|
480
480
|
const arrayBuffer = await response.body.arrayBuffer();
|
|
481
481
|
return encode(arrayBuffer, { parseJson: false });
|
|
482
482
|
default:
|
|
483
|
-
return contentType && contentType.includes("application/json") ? await response.body.json() : response.body.text();
|
|
483
|
+
return contentType && (contentType.includes("application/json") || contentType.includes("+json")) ? await response.body.json() : response.body.text();
|
|
484
484
|
}
|
|
485
485
|
} catch (error) {
|
|
486
486
|
throw_error_default(response.statusCode, {
|
package/dist/index.js
CHANGED
|
@@ -415,7 +415,7 @@ async function readResponseBody(response, parseAs) {
|
|
|
415
415
|
const arrayBuffer = await response.body.arrayBuffer();
|
|
416
416
|
return encode(arrayBuffer, { parseJson: false });
|
|
417
417
|
default:
|
|
418
|
-
return contentType && contentType.includes("application/json") ? await response.body.json() : response.body.text();
|
|
418
|
+
return contentType && (contentType.includes("application/json") || contentType.includes("+json")) ? await response.body.json() : response.body.text();
|
|
419
419
|
}
|
|
420
420
|
} catch (error) {
|
|
421
421
|
throw_error_default(response.statusCode, {
|
package/dist/util.cjs
CHANGED
|
@@ -387,7 +387,7 @@ async function readResponseBody(response, parseAs) {
|
|
|
387
387
|
const arrayBuffer = await response.body.arrayBuffer();
|
|
388
388
|
return encode(arrayBuffer, { parseJson: false });
|
|
389
389
|
default:
|
|
390
|
-
return contentType && contentType.includes("application/json") ? await response.body.json() : response.body.text();
|
|
390
|
+
return contentType && (contentType.includes("application/json") || contentType.includes("+json")) ? await response.body.json() : response.body.text();
|
|
391
391
|
}
|
|
392
392
|
} catch (error) {
|
|
393
393
|
throw_error_default(response.statusCode, {
|
package/dist/util.js
CHANGED
|
@@ -336,7 +336,7 @@ async function readResponseBody(response, parseAs) {
|
|
|
336
336
|
const arrayBuffer = await response.body.arrayBuffer();
|
|
337
337
|
return encode(arrayBuffer, { parseJson: false });
|
|
338
338
|
default:
|
|
339
|
-
return contentType && contentType.includes("application/json") ? await response.body.json() : response.body.text();
|
|
339
|
+
return contentType && (contentType.includes("application/json") || contentType.includes("+json")) ? await response.body.json() : response.body.text();
|
|
340
340
|
}
|
|
341
341
|
} catch (error) {
|
|
342
342
|
throw_error_default(response.statusCode, {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-common",
|
|
3
3
|
"label": "Common",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.5",
|
|
5
5
|
"description": "Common Expressions for OpenFn",
|
|
6
6
|
"homepage": "https://docs.openfn.org",
|
|
7
7
|
"repository": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"http-status-codes": "^2.3.0",
|
|
43
43
|
"jsonpath-plus": "^10.3.0",
|
|
44
44
|
"lodash": "^4.18.1",
|
|
45
|
-
"undici": "^7.
|
|
45
|
+
"undici": "^7.29.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"chai": "4.3.6",
|