@openfn/language-ghana-bdr 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
  sendBirthNotification: () => sendBirthNotification,
@@ -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
  sendBirthNotification: () => sendBirthNotification,
@@ -321,6 +325,7 @@ function sendBirthNotification(data) {
321
325
  var src_default = Adaptor_exports;
322
326
  // Annotate the CommonJS export names for ESM import in node:
323
327
  0 && (module.exports = {
328
+ combine,
324
329
  cursor,
325
330
  dataPath,
326
331
  dataValue,
@@ -333,6 +338,7 @@ var src_default = Adaptor_exports;
333
338
  fnIf,
334
339
  get,
335
340
  lastReferenceValue,
341
+ log,
336
342
  merge,
337
343
  post,
338
344
  sendBirthNotification,
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
  sendBirthNotification: () => sendBirthNotification,
@@ -253,18 +255,20 @@ function createServer(url = "http://tracker.chimgh.org") {
253
255
 
254
256
  // src/Adaptor.js
255
257
  import {
256
- fn,
257
- fnIf,
258
- each,
259
- merge,
260
- field,
261
- fields,
258
+ combine,
262
259
  cursor,
263
- dateFns,
264
260
  dataPath,
265
261
  dataValue,
266
- sourceValue,
267
- lastReferenceValue
262
+ dateFns,
263
+ each,
264
+ field,
265
+ fields,
266
+ fn,
267
+ fnIf,
268
+ lastReferenceValue,
269
+ log,
270
+ merge,
271
+ sourceValue
268
272
  } from "@openfn/language-common";
269
273
  function execute(...operations) {
270
274
  const initialState = {
@@ -296,6 +300,7 @@ function sendBirthNotification(data) {
296
300
  // src/index.js
297
301
  var src_default = Adaptor_exports;
298
302
  export {
303
+ combine,
299
304
  cursor,
300
305
  dataPath,
301
306
  dataValue,
@@ -309,6 +314,7 @@ export {
309
314
  fnIf,
310
315
  get,
311
316
  lastReferenceValue,
317
+ log,
312
318
  merge,
313
319
  post,
314
320
  sendBirthNotification,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-ghana-bdr",
3
3
  "label": "Ghana BDR",
4
- "version": "0.1.22",
4
+ "version": "0.2.0",
5
5
  "description": "OpenFn adaptor for Ghana birth-death registry (BDR)",
6
6
  "type": "module",
7
7
  "exports": {
@@ -73,4 +73,4 @@ export type HttpState = {
73
73
  */
74
74
  references: any;
75
75
  };
76
- export { fn, fnIf, each, merge, field, fields, cursor, dateFns, dataPath, dataValue, sourceValue, lastReferenceValue } from "@openfn/language-common";
76
+ export { combine, cursor, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";