@openfn/language-mogli 0.6.15 → 0.7.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 +49 -0
- package/dist/index.cjs +3 -0
- package/dist/index.js +18 -15
- package/package.json +1 -1
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -825,6 +825,55 @@
|
|
|
825
825
|
]
|
|
826
826
|
},
|
|
827
827
|
"valid": true
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"name": "log",
|
|
831
|
+
"params": [
|
|
832
|
+
"args"
|
|
833
|
+
],
|
|
834
|
+
"docs": {
|
|
835
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
836
|
+
"tags": [
|
|
837
|
+
{
|
|
838
|
+
"title": "public",
|
|
839
|
+
"description": null,
|
|
840
|
+
"type": null
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"title": "function",
|
|
844
|
+
"description": null,
|
|
845
|
+
"name": null
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
"title": "example",
|
|
849
|
+
"description": "log('Patient List::', $.patients);",
|
|
850
|
+
"caption": "Log values from state"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"title": "example",
|
|
854
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
855
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"title": "param",
|
|
859
|
+
"description": "A value or message to display in the logs",
|
|
860
|
+
"type": {
|
|
861
|
+
"type": "NameExpression",
|
|
862
|
+
"name": "any"
|
|
863
|
+
},
|
|
864
|
+
"name": "args"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"title": "returns",
|
|
868
|
+
"description": null,
|
|
869
|
+
"type": {
|
|
870
|
+
"type": "NameExpression",
|
|
871
|
+
"name": "Operation"
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
]
|
|
875
|
+
},
|
|
876
|
+
"valid": true
|
|
828
877
|
}
|
|
829
878
|
]
|
|
830
879
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -42,6 +42,7 @@ __export(src_exports, {
|
|
|
42
42
|
index: () => import_language_common3.index,
|
|
43
43
|
join: () => import_language_common3.join,
|
|
44
44
|
lastReferenceValue: () => import_language_common3.lastReferenceValue,
|
|
45
|
+
log: () => import_language_common3.log,
|
|
45
46
|
lookup: () => lookup,
|
|
46
47
|
merge: () => import_language_common3.merge,
|
|
47
48
|
reference: () => reference,
|
|
@@ -74,6 +75,7 @@ __export(Adaptor_exports, {
|
|
|
74
75
|
index: () => import_language_common3.index,
|
|
75
76
|
join: () => import_language_common3.join,
|
|
76
77
|
lastReferenceValue: () => import_language_common3.lastReferenceValue,
|
|
78
|
+
log: () => import_language_common3.log,
|
|
77
79
|
lookup: () => lookup,
|
|
78
80
|
merge: () => import_language_common3.merge,
|
|
79
81
|
reference: () => reference,
|
|
@@ -275,6 +277,7 @@ var src_default = Adaptor_exports;
|
|
|
275
277
|
index,
|
|
276
278
|
join,
|
|
277
279
|
lastReferenceValue,
|
|
280
|
+
log,
|
|
278
281
|
lookup,
|
|
279
282
|
merge,
|
|
280
283
|
reference,
|
package/dist/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(Adaptor_exports, {
|
|
|
23
23
|
index: () => index,
|
|
24
24
|
join: () => join,
|
|
25
25
|
lastReferenceValue: () => lastReferenceValue,
|
|
26
|
+
log: () => log,
|
|
26
27
|
lookup: () => lookup,
|
|
27
28
|
merge: () => merge,
|
|
28
29
|
reference: () => reference,
|
|
@@ -57,25 +58,26 @@ function relationship(relationshipName, externalId, dataSource) {
|
|
|
57
58
|
|
|
58
59
|
// src/Adaptor.js
|
|
59
60
|
import {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
field as field2,
|
|
64
|
-
source,
|
|
65
|
-
sourceValue as sourceValue2,
|
|
61
|
+
alterState,
|
|
62
|
+
arrayToString,
|
|
63
|
+
beta,
|
|
66
64
|
combine,
|
|
67
|
-
merge,
|
|
68
65
|
dataPath,
|
|
69
66
|
dataValue,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
beta,
|
|
74
|
-
toArray,
|
|
75
|
-
arrayToString,
|
|
76
|
-
alterState,
|
|
67
|
+
each,
|
|
68
|
+
field as field2,
|
|
69
|
+
fields,
|
|
77
70
|
fn,
|
|
78
|
-
fnIf
|
|
71
|
+
fnIf,
|
|
72
|
+
index,
|
|
73
|
+
join,
|
|
74
|
+
lastReferenceValue,
|
|
75
|
+
log,
|
|
76
|
+
merge,
|
|
77
|
+
referencePath,
|
|
78
|
+
source,
|
|
79
|
+
sourceValue as sourceValue2,
|
|
80
|
+
toArray
|
|
79
81
|
} from "@openfn/language-common";
|
|
80
82
|
var { curry, mapValues, flatten } = pkg;
|
|
81
83
|
var createSMS = curry(function(params, state) {
|
|
@@ -244,6 +246,7 @@ export {
|
|
|
244
246
|
index,
|
|
245
247
|
join,
|
|
246
248
|
lastReferenceValue,
|
|
249
|
+
log,
|
|
247
250
|
lookup,
|
|
248
251
|
merge,
|
|
249
252
|
reference,
|
package/package.json
CHANGED
package/types/Adaptor.d.ts
CHANGED
|
@@ -26,4 +26,4 @@ export type State = {
|
|
|
26
26
|
};
|
|
27
27
|
export type Operation = Function;
|
|
28
28
|
export { lookup, relationship } from "./sourceHelpers.js";
|
|
29
|
-
export {
|
|
29
|
+
export { alterState, arrayToString, beta, combine, dataPath, dataValue, each, field, fields, fn, fnIf, index, join, lastReferenceValue, log, merge, referencePath, source, sourceValue, toArray } from "@openfn/language-common";
|