@openfn/language-ghana-nia 0.1.22 → 0.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 CHANGED
@@ -496,6 +496,49 @@
496
496
  },
497
497
  "valid": true
498
498
  },
499
+ {
500
+ "name": "combine",
501
+ "params": [
502
+ "operations"
503
+ ],
504
+ "docs": {
505
+ "description": "Combines two operations into one",
506
+ "tags": [
507
+ {
508
+ "title": "public",
509
+ "description": null,
510
+ "type": null
511
+ },
512
+ {
513
+ "title": "function",
514
+ "description": null,
515
+ "name": null
516
+ },
517
+ {
518
+ "title": "example",
519
+ "description": "combine(\n create('foo'),\n delete('bar')\n)"
520
+ },
521
+ {
522
+ "title": "param",
523
+ "description": "Operations to be performed.",
524
+ "type": {
525
+ "type": "NameExpression",
526
+ "name": "Operations"
527
+ },
528
+ "name": "operations"
529
+ },
530
+ {
531
+ "title": "returns",
532
+ "description": null,
533
+ "type": {
534
+ "type": "NameExpression",
535
+ "name": "Operation"
536
+ }
537
+ }
538
+ ]
539
+ },
540
+ "valid": true
541
+ },
499
542
  {
500
543
  "name": "field",
501
544
  "params": [
@@ -735,6 +778,55 @@
735
778
  ]
736
779
  },
737
780
  "valid": false
781
+ },
782
+ {
783
+ "name": "log",
784
+ "params": [
785
+ "args"
786
+ ],
787
+ "docs": {
788
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
789
+ "tags": [
790
+ {
791
+ "title": "public",
792
+ "description": null,
793
+ "type": null
794
+ },
795
+ {
796
+ "title": "function",
797
+ "description": null,
798
+ "name": null
799
+ },
800
+ {
801
+ "title": "example",
802
+ "description": "log('Patient List::', $.patients);",
803
+ "caption": "Log values from state"
804
+ },
805
+ {
806
+ "title": "example",
807
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
808
+ "caption": "Use console.log inside a callback or fn block"
809
+ },
810
+ {
811
+ "title": "param",
812
+ "description": "A value or message to display in the logs",
813
+ "type": {
814
+ "type": "NameExpression",
815
+ "name": "any"
816
+ },
817
+ "name": "args"
818
+ },
819
+ {
820
+ "title": "returns",
821
+ "description": null,
822
+ "type": {
823
+ "type": "NameExpression",
824
+ "name": "Operation"
825
+ }
826
+ }
827
+ ]
828
+ },
829
+ "valid": true
738
830
  }
739
831
  ]
740
832
  }
package/dist/index.cjs CHANGED
@@ -25,6 +25,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
25
25
  // src/index.js
26
26
  var src_exports = {};
27
27
  __export(src_exports, {
28
+ combine: () => import_language_common3.combine,
28
29
  cursor: () => import_language_common3.cursor,
29
30
  dataPath: () => import_language_common3.dataPath,
30
31
  dataValue: () => import_language_common3.dataValue,
@@ -38,6 +39,7 @@ __export(src_exports, {
38
39
  fnIf: () => import_language_common3.fnIf,
39
40
  get: () => get,
40
41
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
42
+ log: () => import_language_common3.log,
41
43
  merge: () => import_language_common3.merge,
42
44
  post: () => post,
43
45
  registerChild: () => registerChild,
@@ -48,6 +50,7 @@ module.exports = __toCommonJS(src_exports);
48
50
  // src/Adaptor.js
49
51
  var Adaptor_exports = {};
50
52
  __export(Adaptor_exports, {
53
+ combine: () => import_language_common3.combine,
51
54
  cursor: () => import_language_common3.cursor,
52
55
  dataPath: () => import_language_common3.dataPath,
53
56
  dataValue: () => import_language_common3.dataValue,
@@ -60,6 +63,7 @@ __export(Adaptor_exports, {
60
63
  fnIf: () => import_language_common3.fnIf,
61
64
  get: () => get,
62
65
  lastReferenceValue: () => import_language_common3.lastReferenceValue,
66
+ log: () => import_language_common3.log,
63
67
  merge: () => import_language_common3.merge,
64
68
  post: () => post,
65
69
  registerChild: () => registerChild,
@@ -287,6 +291,7 @@ function registerChild(data) {
287
291
  var src_default = Adaptor_exports;
288
292
  // Annotate the CommonJS export names for ESM import in node:
289
293
  0 && (module.exports = {
294
+ combine,
290
295
  cursor,
291
296
  dataPath,
292
297
  dataValue,
@@ -299,6 +304,7 @@ var src_default = Adaptor_exports;
299
304
  fnIf,
300
305
  get,
301
306
  lastReferenceValue,
307
+ log,
302
308
  merge,
303
309
  post,
304
310
  registerChild,
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ var __export = (target, all) => {
7
7
  // src/Adaptor.js
8
8
  var Adaptor_exports = {};
9
9
  __export(Adaptor_exports, {
10
+ combine: () => combine,
10
11
  cursor: () => cursor,
11
12
  dataPath: () => dataPath,
12
13
  dataValue: () => dataValue,
@@ -19,6 +20,7 @@ __export(Adaptor_exports, {
19
20
  fnIf: () => fnIf,
20
21
  get: () => get,
21
22
  lastReferenceValue: () => lastReferenceValue,
23
+ log: () => log,
22
24
  merge: () => merge,
23
25
  post: () => post,
24
26
  registerChild: () => registerChild,
@@ -219,18 +221,20 @@ function createServer(url = "https://selfie.imsgh.org:2035") {
219
221
 
220
222
  // src/Adaptor.js
221
223
  import {
222
- fn,
223
- fnIf,
224
- each,
225
- merge,
226
- field,
227
- fields,
224
+ combine,
228
225
  cursor,
229
- dateFns,
230
226
  dataPath,
231
227
  dataValue,
232
- sourceValue,
233
- lastReferenceValue
228
+ dateFns,
229
+ each,
230
+ field,
231
+ fields,
232
+ fn,
233
+ fnIf,
234
+ lastReferenceValue,
235
+ log,
236
+ merge,
237
+ sourceValue
234
238
  } from "@openfn/language-common";
235
239
  function execute(...operations) {
236
240
  const initialState = {
@@ -262,6 +266,7 @@ function registerChild(data) {
262
266
  // src/index.js
263
267
  var src_default = Adaptor_exports;
264
268
  export {
269
+ combine,
265
270
  cursor,
266
271
  dataPath,
267
272
  dataValue,
@@ -275,6 +280,7 @@ export {
275
280
  fnIf,
276
281
  get,
277
282
  lastReferenceValue,
283
+ log,
278
284
  merge,
279
285
  post,
280
286
  registerChild,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-ghana-nia",
3
3
  "label": "Ghana NIA",
4
- "version": "0.1.22",
4
+ "version": "0.2.0",
5
5
  "description": "OpenFn ghana-nia adaptor",
6
6
  "type": "module",
7
7
  "exports": {
@@ -90,4 +90,4 @@ export type HttpState = {
90
90
  */
91
91
  references: any;
92
92
  };
93
- export { fn, fnIf, each, merge, field, fields, cursor, dateFns, dataPath, dataValue, sourceValue, lastReferenceValue } from "@openfn/language-common";
93
+ export { combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";