@openfn/language-inform 1.2.5 → 1.3.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 CHANGED
@@ -1103,6 +1103,55 @@
1103
1103
  },
1104
1104
  "valid": false
1105
1105
  },
1106
+ {
1107
+ "name": "log",
1108
+ "params": [
1109
+ "args"
1110
+ ],
1111
+ "docs": {
1112
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
1113
+ "tags": [
1114
+ {
1115
+ "title": "public",
1116
+ "description": null,
1117
+ "type": null
1118
+ },
1119
+ {
1120
+ "title": "function",
1121
+ "description": null,
1122
+ "name": null
1123
+ },
1124
+ {
1125
+ "title": "example",
1126
+ "description": "log('Patient List::', $.patients);",
1127
+ "caption": "Log values from state"
1128
+ },
1129
+ {
1130
+ "title": "example",
1131
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
1132
+ "caption": "Use console.log inside a callback or fn block"
1133
+ },
1134
+ {
1135
+ "title": "param",
1136
+ "description": "A value or message to display in the logs",
1137
+ "type": {
1138
+ "type": "NameExpression",
1139
+ "name": "any"
1140
+ },
1141
+ "name": "args"
1142
+ },
1143
+ {
1144
+ "title": "returns",
1145
+ "description": null,
1146
+ "type": {
1147
+ "type": "NameExpression",
1148
+ "name": "Operation"
1149
+ }
1150
+ }
1151
+ ]
1152
+ },
1153
+ "valid": true
1154
+ },
1106
1155
  {
1107
1156
  "name": "as",
1108
1157
  "params": [
package/dist/index.cjs CHANGED
@@ -46,6 +46,7 @@ __export(src_exports, {
46
46
  group: () => import_language_common2.group,
47
47
  http: () => http_exports,
48
48
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
49
+ log: () => import_language_common2.log,
49
50
  merge: () => import_language_common2.merge,
50
51
  scrubEmojis: () => import_language_common2.scrubEmojis,
51
52
  sourceValue: () => import_language_common2.sourceValue,
@@ -75,6 +76,7 @@ __export(Adaptor_exports, {
75
76
  getSubmissions: () => getSubmissions,
76
77
  group: () => import_language_common2.group,
77
78
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
79
+ log: () => import_language_common2.log,
78
80
  merge: () => import_language_common2.merge,
79
81
  scrubEmojis: () => import_language_common2.scrubEmojis,
80
82
  sourceValue: () => import_language_common2.sourceValue,
@@ -286,6 +288,7 @@ var src_default = Adaptor_exports;
286
288
  group,
287
289
  http,
288
290
  lastReferenceValue,
291
+ log,
289
292
  merge,
290
293
  scrubEmojis,
291
294
  sourceValue,
package/dist/index.js CHANGED
@@ -26,6 +26,7 @@ __export(Adaptor_exports, {
26
26
  getSubmissions: () => getSubmissions,
27
27
  group: () => group,
28
28
  lastReferenceValue: () => lastReferenceValue,
29
+ log: () => log,
29
30
  merge: () => merge,
30
31
  scrubEmojis: () => scrubEmojis,
31
32
  sourceValue: () => sourceValue,
@@ -80,6 +81,7 @@ var request = (configuration = {}, method, path, options = {}) => {
80
81
 
81
82
  // src/Adaptor.js
82
83
  import {
84
+ as,
83
85
  combine,
84
86
  cursor,
85
87
  dataPath,
@@ -92,11 +94,11 @@ import {
92
94
  fnIf,
93
95
  group,
94
96
  lastReferenceValue,
97
+ log,
95
98
  merge,
96
99
  scrubEmojis,
97
100
  sourceValue,
98
- util,
99
- as
101
+ util
100
102
  } from "@openfn/language-common";
101
103
  function getForms(options = {}) {
102
104
  return async (state) => {
@@ -258,6 +260,7 @@ export {
258
260
  group,
259
261
  http_exports as http,
260
262
  lastReferenceValue,
263
+ log,
261
264
  merge,
262
265
  scrubEmojis,
263
266
  sourceValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-inform",
3
- "version": "1.2.5",
3
+ "version": "1.3.0",
4
4
  "description": "OpenFn inform adaptor for UNICEF InForm platform operations",
5
5
  "type": "module",
6
6
  "exports": {
@@ -20,7 +20,7 @@
20
20
  "configuration-schema.json"
21
21
  ],
22
22
  "dependencies": {
23
- "@openfn/language-common": "3.3.1"
23
+ "@openfn/language-common": "3.3.2"
24
24
  },
25
25
  "devDependencies": {
26
26
  "assertion-error": "2.0.0",
@@ -106,4 +106,4 @@ export function downloadAttachment(attachmentId: string, options?: object): Oper
106
106
  * State object
107
107
  */
108
108
  export type HttpState = any;
109
- export { combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, group, lastReferenceValue, merge, scrubEmojis, sourceValue, util, as } from "@openfn/language-common";
109
+ export { as, combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, group, lastReferenceValue, log, merge, scrubEmojis, sourceValue, util } from "@openfn/language-common";