@openfn/language-cht 1.1.12 → 1.2.0
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/ast.json +92 -0
- package/dist/index.cjs +6 -0
- package/dist/index.js +9 -3
- package/package.json +2 -2
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -600,6 +600,49 @@
|
|
|
600
600
|
},
|
|
601
601
|
"valid": true
|
|
602
602
|
},
|
|
603
|
+
{
|
|
604
|
+
"name": "combine",
|
|
605
|
+
"params": [
|
|
606
|
+
"operations"
|
|
607
|
+
],
|
|
608
|
+
"docs": {
|
|
609
|
+
"description": "Combines two operations into one",
|
|
610
|
+
"tags": [
|
|
611
|
+
{
|
|
612
|
+
"title": "public",
|
|
613
|
+
"description": null,
|
|
614
|
+
"type": null
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"title": "function",
|
|
618
|
+
"description": null,
|
|
619
|
+
"name": null
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"title": "example",
|
|
623
|
+
"description": "combine(\n create('foo'),\n delete('bar')\n)"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"title": "param",
|
|
627
|
+
"description": "Operations to be performed.",
|
|
628
|
+
"type": {
|
|
629
|
+
"type": "NameExpression",
|
|
630
|
+
"name": "Operations"
|
|
631
|
+
},
|
|
632
|
+
"name": "operations"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"title": "returns",
|
|
636
|
+
"description": null,
|
|
637
|
+
"type": {
|
|
638
|
+
"type": "NameExpression",
|
|
639
|
+
"name": "Operation"
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
]
|
|
643
|
+
},
|
|
644
|
+
"valid": true
|
|
645
|
+
},
|
|
603
646
|
{
|
|
604
647
|
"name": "field",
|
|
605
648
|
"params": [
|
|
@@ -840,6 +883,55 @@
|
|
|
840
883
|
},
|
|
841
884
|
"valid": false
|
|
842
885
|
},
|
|
886
|
+
{
|
|
887
|
+
"name": "log",
|
|
888
|
+
"params": [
|
|
889
|
+
"args"
|
|
890
|
+
],
|
|
891
|
+
"docs": {
|
|
892
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
893
|
+
"tags": [
|
|
894
|
+
{
|
|
895
|
+
"title": "public",
|
|
896
|
+
"description": null,
|
|
897
|
+
"type": null
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
"title": "function",
|
|
901
|
+
"description": null,
|
|
902
|
+
"name": null
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"title": "example",
|
|
906
|
+
"description": "log('Patient List::', $.patients);",
|
|
907
|
+
"caption": "Log values from state"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
"title": "example",
|
|
911
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
912
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"title": "param",
|
|
916
|
+
"description": "A value or message to display in the logs",
|
|
917
|
+
"type": {
|
|
918
|
+
"type": "NameExpression",
|
|
919
|
+
"name": "any"
|
|
920
|
+
},
|
|
921
|
+
"name": "args"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
"title": "returns",
|
|
925
|
+
"description": null,
|
|
926
|
+
"type": {
|
|
927
|
+
"type": "NameExpression",
|
|
928
|
+
"name": "Operation"
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
]
|
|
932
|
+
},
|
|
933
|
+
"valid": true
|
|
934
|
+
},
|
|
843
935
|
{
|
|
844
936
|
"name": "as",
|
|
845
937
|
"params": [
|
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
var src_exports = {};
|
|
21
21
|
__export(src_exports, {
|
|
22
22
|
as: () => import_language_common2.as,
|
|
23
|
+
combine: () => import_language_common2.combine,
|
|
23
24
|
cursor: () => import_language_common2.cursor,
|
|
24
25
|
dataPath: () => import_language_common2.dataPath,
|
|
25
26
|
dataValue: () => import_language_common2.dataValue,
|
|
@@ -31,6 +32,7 @@ __export(src_exports, {
|
|
|
31
32
|
fn: () => import_language_common2.fn,
|
|
32
33
|
get: () => get,
|
|
33
34
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
35
|
+
log: () => import_language_common2.log,
|
|
34
36
|
merge: () => import_language_common2.merge,
|
|
35
37
|
post: () => post,
|
|
36
38
|
put: () => put,
|
|
@@ -43,6 +45,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
43
45
|
var Adaptor_exports = {};
|
|
44
46
|
__export(Adaptor_exports, {
|
|
45
47
|
as: () => import_language_common2.as,
|
|
48
|
+
combine: () => import_language_common2.combine,
|
|
46
49
|
cursor: () => import_language_common2.cursor,
|
|
47
50
|
dataPath: () => import_language_common2.dataPath,
|
|
48
51
|
dataValue: () => import_language_common2.dataValue,
|
|
@@ -53,6 +56,7 @@ __export(Adaptor_exports, {
|
|
|
53
56
|
fn: () => import_language_common2.fn,
|
|
54
57
|
get: () => get,
|
|
55
58
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
59
|
+
log: () => import_language_common2.log,
|
|
56
60
|
merge: () => import_language_common2.merge,
|
|
57
61
|
post: () => post,
|
|
58
62
|
put: () => put,
|
|
@@ -121,6 +125,7 @@ var src_default = Adaptor_exports;
|
|
|
121
125
|
// Annotate the CommonJS export names for ESM import in node:
|
|
122
126
|
0 && (module.exports = {
|
|
123
127
|
as,
|
|
128
|
+
combine,
|
|
124
129
|
cursor,
|
|
125
130
|
dataPath,
|
|
126
131
|
dataValue,
|
|
@@ -131,6 +136,7 @@ var src_default = Adaptor_exports;
|
|
|
131
136
|
fn,
|
|
132
137
|
get,
|
|
133
138
|
lastReferenceValue,
|
|
139
|
+
log,
|
|
134
140
|
merge,
|
|
135
141
|
post,
|
|
136
142
|
put,
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var __export = (target, all) => {
|
|
|
8
8
|
var Adaptor_exports = {};
|
|
9
9
|
__export(Adaptor_exports, {
|
|
10
10
|
as: () => as,
|
|
11
|
+
combine: () => combine,
|
|
11
12
|
cursor: () => cursor,
|
|
12
13
|
dataPath: () => dataPath,
|
|
13
14
|
dataValue: () => dataValue,
|
|
@@ -18,6 +19,7 @@ __export(Adaptor_exports, {
|
|
|
18
19
|
fn: () => fn,
|
|
19
20
|
get: () => get,
|
|
20
21
|
lastReferenceValue: () => lastReferenceValue,
|
|
22
|
+
log: () => log,
|
|
21
23
|
merge: () => merge,
|
|
22
24
|
post: () => post,
|
|
23
25
|
put: () => put,
|
|
@@ -59,18 +61,20 @@ var request = (configuration = {}, method, path, options) => {
|
|
|
59
61
|
|
|
60
62
|
// src/Adaptor.js
|
|
61
63
|
import {
|
|
64
|
+
as,
|
|
65
|
+
combine,
|
|
66
|
+
cursor,
|
|
62
67
|
dataPath,
|
|
63
68
|
dataValue,
|
|
64
69
|
dateFns,
|
|
65
|
-
cursor,
|
|
66
70
|
each,
|
|
67
71
|
field,
|
|
68
72
|
fields,
|
|
69
73
|
fn,
|
|
70
74
|
lastReferenceValue,
|
|
75
|
+
log,
|
|
71
76
|
merge,
|
|
72
|
-
sourceValue
|
|
73
|
-
as
|
|
77
|
+
sourceValue
|
|
74
78
|
} from "@openfn/language-common";
|
|
75
79
|
function get(path, options, callback) {
|
|
76
80
|
return request2("GET", path, null, options, callback);
|
|
@@ -101,6 +105,7 @@ function request2(method, path, body, options = {}, callback = (s) => s) {
|
|
|
101
105
|
var src_default = Adaptor_exports;
|
|
102
106
|
export {
|
|
103
107
|
as,
|
|
108
|
+
combine,
|
|
104
109
|
cursor,
|
|
105
110
|
dataPath,
|
|
106
111
|
dataValue,
|
|
@@ -112,6 +117,7 @@ export {
|
|
|
112
117
|
fn,
|
|
113
118
|
get,
|
|
114
119
|
lastReferenceValue,
|
|
120
|
+
log,
|
|
115
121
|
merge,
|
|
116
122
|
post,
|
|
117
123
|
put,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-cht",
|
|
3
3
|
"label": "Community Health Toolkit (CHT)",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"description": "OpenFn adaptor for Community Health Toolkit (CHT)",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"configuration-schema.json"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@openfn/language-common": "3.3.
|
|
24
|
+
"@openfn/language-common": "3.3.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"assertion-error": "2.0.0",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -123,4 +123,4 @@ export type RequestOptions = {
|
|
|
123
123
|
*/
|
|
124
124
|
timeout: number;
|
|
125
125
|
};
|
|
126
|
-
export { dataPath, dataValue, dateFns,
|
|
126
|
+
export { as, combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";
|