@openfn/language-openhim 0.3.13 → 0.3.15
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 +2 -1
- package/dist/index.js +3 -5
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -56,6 +56,7 @@ __export(Adaptor_exports, {
|
|
|
56
56
|
sourceValue: () => import_language_common2.sourceValue
|
|
57
57
|
});
|
|
58
58
|
var import_language_common = require("@openfn/language-common");
|
|
59
|
+
var import_util = require("@openfn/language-common/util");
|
|
59
60
|
|
|
60
61
|
// src/Client.js
|
|
61
62
|
var import_superagent = __toESM(require("superagent"), 1);
|
|
@@ -84,7 +85,7 @@ function execute(...operations) {
|
|
|
84
85
|
}
|
|
85
86
|
function encounter(encounterData) {
|
|
86
87
|
return (state) => {
|
|
87
|
-
const body = (0,
|
|
88
|
+
const [body] = (0, import_util.expandReferences)(state, encounterData);
|
|
88
89
|
const { username, password, apiUrl } = state.configuration;
|
|
89
90
|
const url = (0, import_url.resolve)(apiUrl + "/", "chw/encounter");
|
|
90
91
|
console.log("Posting encounter:");
|
package/dist/index.js
CHANGED
|
@@ -19,10 +19,8 @@ __export(Adaptor_exports, {
|
|
|
19
19
|
merge: () => merge,
|
|
20
20
|
sourceValue: () => sourceValue
|
|
21
21
|
});
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
expandReferences
|
|
25
|
-
} from "@openfn/language-common";
|
|
22
|
+
import { execute as commonExecute } from "@openfn/language-common";
|
|
23
|
+
import { expandReferences } from "@openfn/language-common/util";
|
|
26
24
|
|
|
27
25
|
// src/Client.js
|
|
28
26
|
import request from "superagent";
|
|
@@ -61,7 +59,7 @@ function execute(...operations) {
|
|
|
61
59
|
}
|
|
62
60
|
function encounter(encounterData) {
|
|
63
61
|
return (state) => {
|
|
64
|
-
const body = expandReferences(encounterData)
|
|
62
|
+
const [body] = expandReferences(state, encounterData);
|
|
65
63
|
const { username, password, apiUrl } = state.configuration;
|
|
66
64
|
const url = resolveUrl(apiUrl + "/", "chw/encounter");
|
|
67
65
|
console.log("Posting encounter:");
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-openhim",
|
|
3
|
-
"
|
|
3
|
+
"label": "OpenHIM",
|
|
4
|
+
"version": "0.3.15",
|
|
4
5
|
"description": "openhim Language Pack for OpenFn",
|
|
5
6
|
"main": "dist/index.cjs",
|
|
6
7
|
"author": "Open Function Group",
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
"JSONPath": "^0.10.0",
|
|
16
17
|
"lodash-fp": "^0.10.2",
|
|
17
18
|
"superagent": "^3.7.0",
|
|
18
|
-
"@openfn/language-common": "
|
|
19
|
+
"@openfn/language-common": "3.0.0"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
22
|
"assertion-error": "^1.0.1",
|
|
@@ -25,7 +26,6 @@
|
|
|
25
26
|
"babel-preset-stage-0": "^6.3.13",
|
|
26
27
|
"chai": "^3.4.0",
|
|
27
28
|
"deep-eql": "^0.1.3",
|
|
28
|
-
"esno": "^0.16.3",
|
|
29
29
|
"rimraf": "^3.0.2",
|
|
30
30
|
"sinon": "^1.17.2",
|
|
31
31
|
"superagent-mock": "^1.10.0"
|