@openfn/language-cartodb 0.4.30 → 0.5.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
@@ -433,6 +433,49 @@
433
433
  },
434
434
  "valid": true
435
435
  },
436
+ {
437
+ "name": "combine",
438
+ "params": [
439
+ "operations"
440
+ ],
441
+ "docs": {
442
+ "description": "Combines two operations into one",
443
+ "tags": [
444
+ {
445
+ "title": "public",
446
+ "description": null,
447
+ "type": null
448
+ },
449
+ {
450
+ "title": "function",
451
+ "description": null,
452
+ "name": null
453
+ },
454
+ {
455
+ "title": "example",
456
+ "description": "combine(\n create('foo'),\n delete('bar')\n)"
457
+ },
458
+ {
459
+ "title": "param",
460
+ "description": "Operations to be performed.",
461
+ "type": {
462
+ "type": "NameExpression",
463
+ "name": "Operations"
464
+ },
465
+ "name": "operations"
466
+ },
467
+ {
468
+ "title": "returns",
469
+ "description": null,
470
+ "type": {
471
+ "type": "NameExpression",
472
+ "name": "Operation"
473
+ }
474
+ }
475
+ ]
476
+ },
477
+ "valid": true
478
+ },
436
479
  {
437
480
  "name": "field",
438
481
  "params": [
@@ -586,6 +629,55 @@
586
629
  ]
587
630
  },
588
631
  "valid": true
632
+ },
633
+ {
634
+ "name": "log",
635
+ "params": [
636
+ "args"
637
+ ],
638
+ "docs": {
639
+ "description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
640
+ "tags": [
641
+ {
642
+ "title": "public",
643
+ "description": null,
644
+ "type": null
645
+ },
646
+ {
647
+ "title": "function",
648
+ "description": null,
649
+ "name": null
650
+ },
651
+ {
652
+ "title": "example",
653
+ "description": "log('Patient List::', $.patients);",
654
+ "caption": "Log values from state"
655
+ },
656
+ {
657
+ "title": "example",
658
+ "description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
659
+ "caption": "Use console.log inside a callback or fn block"
660
+ },
661
+ {
662
+ "title": "param",
663
+ "description": "A value or message to display in the logs",
664
+ "type": {
665
+ "type": "NameExpression",
666
+ "name": "any"
667
+ },
668
+ "name": "args"
669
+ },
670
+ {
671
+ "title": "returns",
672
+ "description": null,
673
+ "type": {
674
+ "type": "NameExpression",
675
+ "name": "Operation"
676
+ }
677
+ }
678
+ ]
679
+ },
680
+ "valid": true
589
681
  }
590
682
  ]
591
683
  }
package/dist/index.cjs CHANGED
@@ -26,6 +26,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
26
26
  var src_exports = {};
27
27
  __export(src_exports, {
28
28
  addRow: () => addRow,
29
+ combine: () => import_language_common2.combine,
29
30
  dataPath: () => import_language_common2.dataPath,
30
31
  dataValue: () => import_language_common2.dataValue,
31
32
  default: () => src_default,
@@ -36,6 +37,7 @@ __export(src_exports, {
36
37
  fn: () => import_language_common2.fn,
37
38
  fnIf: () => import_language_common2.fnIf,
38
39
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
40
+ log: () => import_language_common2.log,
39
41
  merge: () => import_language_common2.merge,
40
42
  sourceValue: () => import_language_common2.sourceValue,
41
43
  sql: () => sql
@@ -46,6 +48,7 @@ module.exports = __toCommonJS(src_exports);
46
48
  var Adaptor_exports = {};
47
49
  __export(Adaptor_exports, {
48
50
  addRow: () => addRow,
51
+ combine: () => import_language_common2.combine,
49
52
  dataPath: () => import_language_common2.dataPath,
50
53
  dataValue: () => import_language_common2.dataValue,
51
54
  each: () => import_language_common2.each,
@@ -55,6 +58,7 @@ __export(Adaptor_exports, {
55
58
  fn: () => import_language_common2.fn,
56
59
  fnIf: () => import_language_common2.fnIf,
57
60
  lastReferenceValue: () => import_language_common2.lastReferenceValue,
61
+ log: () => import_language_common2.log,
58
62
  merge: () => import_language_common2.merge,
59
63
  sourceValue: () => import_language_common2.sourceValue,
60
64
  sql: () => sql
@@ -130,6 +134,7 @@ var src_default = Adaptor_exports;
130
134
  // Annotate the CommonJS export names for ESM import in node:
131
135
  0 && (module.exports = {
132
136
  addRow,
137
+ combine,
133
138
  dataPath,
134
139
  dataValue,
135
140
  each,
@@ -139,6 +144,7 @@ var src_default = Adaptor_exports;
139
144
  fn,
140
145
  fnIf,
141
146
  lastReferenceValue,
147
+ log,
142
148
  merge,
143
149
  sourceValue,
144
150
  sql
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
  addRow: () => addRow,
11
+ combine: () => combine,
11
12
  dataPath: () => dataPath,
12
13
  dataValue: () => dataValue,
13
14
  each: () => each,
@@ -17,6 +18,7 @@ __export(Adaptor_exports, {
17
18
  fn: () => fn,
18
19
  fnIf: () => fnIf,
19
20
  lastReferenceValue: () => lastReferenceValue,
21
+ log: () => log,
20
22
  merge: () => merge,
21
23
  sourceValue: () => sourceValue,
22
24
  sql: () => sql
@@ -40,16 +42,18 @@ function post({ apiKey, body, url }) {
40
42
  // src/Adaptor.js
41
43
  import jsonSqlPkg from "json-sql";
42
44
  import {
43
- fn,
44
- fnIf,
45
+ combine,
46
+ dataPath,
47
+ dataValue,
48
+ each,
45
49
  field,
46
50
  fields,
47
- sourceValue,
48
- each,
51
+ fn,
52
+ fnIf,
53
+ lastReferenceValue,
54
+ log,
49
55
  merge,
50
- dataPath,
51
- dataValue,
52
- lastReferenceValue
56
+ sourceValue
53
57
  } from "@openfn/language-common";
54
58
  var jsonSql = jsonSqlPkg();
55
59
  function execute(...operations) {
@@ -102,6 +106,7 @@ function addRow(table, rowData) {
102
106
  var src_default = Adaptor_exports;
103
107
  export {
104
108
  addRow,
109
+ combine,
105
110
  dataPath,
106
111
  dataValue,
107
112
  src_default as default,
@@ -112,6 +117,7 @@ export {
112
117
  fn,
113
118
  fnIf,
114
119
  lastReferenceValue,
120
+ log,
115
121
  merge,
116
122
  sourceValue,
117
123
  sql
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openfn/language-cartodb",
3
3
  "label": "CartoDB",
4
- "version": "0.4.30",
4
+ "version": "0.5.0",
5
5
  "description": "cartodb Language Pack for OpenFn",
6
6
  "main": "dist/index.cjs",
7
7
  "author": "Open Function Group",
@@ -17,7 +17,7 @@
17
17
  "json-sql": "^0.3.8",
18
18
  "lodash-fp": "^0.10.2",
19
19
  "superagent": "^3.7.0",
20
- "@openfn/language-common": "3.3.1"
20
+ "@openfn/language-common": "3.3.2"
21
21
  },
22
22
  "devDependencies": {
23
23
  "assertion-error": "^1.0.1",
@@ -27,4 +27,4 @@ export function sql(sqlQuery: object): Operation;
27
27
  * @returns {Operation}
28
28
  */
29
29
  export function addRow(table: string, rowData: object): Operation;
30
- export { fn, fnIf, field, fields, sourceValue, each, merge, dataPath, dataValue, lastReferenceValue } from "@openfn/language-common";
30
+ export { combine, dataPath, dataValue, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";