@openfn/language-hive 0.3.29 → 0.4.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 +92 -0
- package/dist/index.cjs +6 -0
- package/dist/index.js +7 -1
- package/package.json +1 -1
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -399,6 +399,49 @@
|
|
|
399
399
|
},
|
|
400
400
|
"valid": true
|
|
401
401
|
},
|
|
402
|
+
{
|
|
403
|
+
"name": "combine",
|
|
404
|
+
"params": [
|
|
405
|
+
"operations"
|
|
406
|
+
],
|
|
407
|
+
"docs": {
|
|
408
|
+
"description": "Combines two operations into one",
|
|
409
|
+
"tags": [
|
|
410
|
+
{
|
|
411
|
+
"title": "public",
|
|
412
|
+
"description": null,
|
|
413
|
+
"type": null
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"title": "function",
|
|
417
|
+
"description": null,
|
|
418
|
+
"name": null
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"title": "example",
|
|
422
|
+
"description": "combine(\n create('foo'),\n delete('bar')\n)"
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
"title": "param",
|
|
426
|
+
"description": "Operations to be performed.",
|
|
427
|
+
"type": {
|
|
428
|
+
"type": "NameExpression",
|
|
429
|
+
"name": "Operations"
|
|
430
|
+
},
|
|
431
|
+
"name": "operations"
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"title": "returns",
|
|
435
|
+
"description": null,
|
|
436
|
+
"type": {
|
|
437
|
+
"type": "NameExpression",
|
|
438
|
+
"name": "Operation"
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
]
|
|
442
|
+
},
|
|
443
|
+
"valid": true
|
|
444
|
+
},
|
|
402
445
|
{
|
|
403
446
|
"name": "field",
|
|
404
447
|
"params": [
|
|
@@ -626,6 +669,55 @@
|
|
|
626
669
|
]
|
|
627
670
|
},
|
|
628
671
|
"valid": true
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"name": "log",
|
|
675
|
+
"params": [
|
|
676
|
+
"args"
|
|
677
|
+
],
|
|
678
|
+
"docs": {
|
|
679
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
680
|
+
"tags": [
|
|
681
|
+
{
|
|
682
|
+
"title": "public",
|
|
683
|
+
"description": null,
|
|
684
|
+
"type": null
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"title": "function",
|
|
688
|
+
"description": null,
|
|
689
|
+
"name": null
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"title": "example",
|
|
693
|
+
"description": "log('Patient List::', $.patients);",
|
|
694
|
+
"caption": "Log values from state"
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
"title": "example",
|
|
698
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
699
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"title": "param",
|
|
703
|
+
"description": "A value or message to display in the logs",
|
|
704
|
+
"type": {
|
|
705
|
+
"type": "NameExpression",
|
|
706
|
+
"name": "any"
|
|
707
|
+
},
|
|
708
|
+
"name": "args"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"title": "returns",
|
|
712
|
+
"description": null,
|
|
713
|
+
"type": {
|
|
714
|
+
"type": "NameExpression",
|
|
715
|
+
"name": "Operation"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
]
|
|
719
|
+
},
|
|
720
|
+
"valid": true
|
|
629
721
|
}
|
|
630
722
|
]
|
|
631
723
|
}
|
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_common2.combine,
|
|
28
29
|
dataPath: () => import_language_common2.dataPath,
|
|
29
30
|
dataValue: () => import_language_common2.dataValue,
|
|
30
31
|
dateFns: () => import_language_common2.dateFns,
|
|
@@ -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
|
parseCsv: () => import_language_common2.parseCsv,
|
|
41
43
|
query: () => query,
|
|
@@ -46,6 +48,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
46
48
|
// src/Adaptor.js
|
|
47
49
|
var Adaptor_exports = {};
|
|
48
50
|
__export(Adaptor_exports, {
|
|
51
|
+
combine: () => import_language_common2.combine,
|
|
49
52
|
dataPath: () => import_language_common2.dataPath,
|
|
50
53
|
dataValue: () => import_language_common2.dataValue,
|
|
51
54
|
dateFns: () => import_language_common2.dateFns,
|
|
@@ -56,6 +59,7 @@ __export(Adaptor_exports, {
|
|
|
56
59
|
fn: () => import_language_common2.fn,
|
|
57
60
|
fnIf: () => import_language_common2.fnIf,
|
|
58
61
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
62
|
+
log: () => import_language_common2.log,
|
|
59
63
|
merge: () => import_language_common2.merge,
|
|
60
64
|
parseCsv: () => import_language_common2.parseCsv,
|
|
61
65
|
query: () => query,
|
|
@@ -139,6 +143,7 @@ async function execSql(statement, options) {
|
|
|
139
143
|
var src_default = Adaptor_exports;
|
|
140
144
|
// Annotate the CommonJS export names for ESM import in node:
|
|
141
145
|
0 && (module.exports = {
|
|
146
|
+
combine,
|
|
142
147
|
dataPath,
|
|
143
148
|
dataValue,
|
|
144
149
|
dateFns,
|
|
@@ -149,6 +154,7 @@ var src_default = Adaptor_exports;
|
|
|
149
154
|
fn,
|
|
150
155
|
fnIf,
|
|
151
156
|
lastReferenceValue,
|
|
157
|
+
log,
|
|
152
158
|
merge,
|
|
153
159
|
parseCsv,
|
|
154
160
|
query,
|
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
|
dataPath: () => dataPath,
|
|
11
12
|
dataValue: () => dataValue,
|
|
12
13
|
dateFns: () => dateFns,
|
|
@@ -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
|
parseCsv: () => parseCsv,
|
|
22
24
|
query: () => query,
|
|
@@ -29,6 +31,7 @@ import {
|
|
|
29
31
|
import { expandReferences } from "@openfn/language-common/util";
|
|
30
32
|
import hive from "hive-driver";
|
|
31
33
|
import {
|
|
34
|
+
combine,
|
|
32
35
|
dataPath,
|
|
33
36
|
dataValue,
|
|
34
37
|
dateFns,
|
|
@@ -37,9 +40,10 @@ import {
|
|
|
37
40
|
fields,
|
|
38
41
|
fn,
|
|
39
42
|
fnIf,
|
|
40
|
-
parseCsv,
|
|
41
43
|
lastReferenceValue,
|
|
44
|
+
log,
|
|
42
45
|
merge,
|
|
46
|
+
parseCsv,
|
|
43
47
|
sourceValue
|
|
44
48
|
} from "@openfn/language-common";
|
|
45
49
|
var { TCLIService, TCLIService_types } = hive.thrift;
|
|
@@ -115,6 +119,7 @@ async function execSql(statement, options) {
|
|
|
115
119
|
// src/index.js
|
|
116
120
|
var src_default = Adaptor_exports;
|
|
117
121
|
export {
|
|
122
|
+
combine,
|
|
118
123
|
dataPath,
|
|
119
124
|
dataValue,
|
|
120
125
|
dateFns,
|
|
@@ -126,6 +131,7 @@ export {
|
|
|
126
131
|
fn,
|
|
127
132
|
fnIf,
|
|
128
133
|
lastReferenceValue,
|
|
134
|
+
log,
|
|
129
135
|
merge,
|
|
130
136
|
parseCsv,
|
|
131
137
|
query,
|
package/package.json
CHANGED
package/types/Adaptor.d.ts
CHANGED
|
@@ -24,4 +24,4 @@ export function execute(...operations: Operations): Operation;
|
|
|
24
24
|
* @returns {Operation}
|
|
25
25
|
*/
|
|
26
26
|
export function query(qs: string, options: object, callback: Function): Operation;
|
|
27
|
-
export { dataPath, dataValue, dateFns, each, field, fields, fn, fnIf,
|
|
27
|
+
export { combine, dataPath, dataValue, dateFns, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, parseCsv, sourceValue } from "@openfn/language-common";
|