@openfn/language-resourcemap 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 +92 -0
- package/dist/index.cjs +6 -0
- package/dist/index.js +13 -7
- package/package.json +2 -2
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -334,6 +334,49 @@
|
|
|
334
334
|
},
|
|
335
335
|
"valid": true
|
|
336
336
|
},
|
|
337
|
+
{
|
|
338
|
+
"name": "combine",
|
|
339
|
+
"params": [
|
|
340
|
+
"operations"
|
|
341
|
+
],
|
|
342
|
+
"docs": {
|
|
343
|
+
"description": "Combines two operations into one",
|
|
344
|
+
"tags": [
|
|
345
|
+
{
|
|
346
|
+
"title": "public",
|
|
347
|
+
"description": null,
|
|
348
|
+
"type": null
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"title": "function",
|
|
352
|
+
"description": null,
|
|
353
|
+
"name": null
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"title": "example",
|
|
357
|
+
"description": "combine(\n create('foo'),\n delete('bar')\n)"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"title": "param",
|
|
361
|
+
"description": "Operations to be performed.",
|
|
362
|
+
"type": {
|
|
363
|
+
"type": "NameExpression",
|
|
364
|
+
"name": "Operations"
|
|
365
|
+
},
|
|
366
|
+
"name": "operations"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"title": "returns",
|
|
370
|
+
"description": null,
|
|
371
|
+
"type": {
|
|
372
|
+
"type": "NameExpression",
|
|
373
|
+
"name": "Operation"
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
]
|
|
377
|
+
},
|
|
378
|
+
"valid": true
|
|
379
|
+
},
|
|
337
380
|
{
|
|
338
381
|
"name": "field",
|
|
339
382
|
"params": [
|
|
@@ -487,6 +530,55 @@
|
|
|
487
530
|
]
|
|
488
531
|
},
|
|
489
532
|
"valid": true
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"name": "log",
|
|
536
|
+
"params": [
|
|
537
|
+
"args"
|
|
538
|
+
],
|
|
539
|
+
"docs": {
|
|
540
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
541
|
+
"tags": [
|
|
542
|
+
{
|
|
543
|
+
"title": "public",
|
|
544
|
+
"description": null,
|
|
545
|
+
"type": null
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"title": "function",
|
|
549
|
+
"description": null,
|
|
550
|
+
"name": null
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"title": "example",
|
|
554
|
+
"description": "log('Patient List::', $.patients);",
|
|
555
|
+
"caption": "Log values from state"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"title": "example",
|
|
559
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
560
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"title": "param",
|
|
564
|
+
"description": "A value or message to display in the logs",
|
|
565
|
+
"type": {
|
|
566
|
+
"type": "NameExpression",
|
|
567
|
+
"name": "any"
|
|
568
|
+
},
|
|
569
|
+
"name": "args"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"title": "returns",
|
|
573
|
+
"description": null,
|
|
574
|
+
"type": {
|
|
575
|
+
"type": "NameExpression",
|
|
576
|
+
"name": "Operation"
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
]
|
|
580
|
+
},
|
|
581
|
+
"valid": true
|
|
490
582
|
}
|
|
491
583
|
]
|
|
492
584
|
}
|
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
|
alterState: () => import_language_common2.alterState,
|
|
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
|
submitSite: () => submitSite
|
|
@@ -46,6 +48,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
46
48
|
var Adaptor_exports = {};
|
|
47
49
|
__export(Adaptor_exports, {
|
|
48
50
|
alterState: () => import_language_common2.alterState,
|
|
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
|
submitSite: () => submitSite
|
|
@@ -131,6 +135,7 @@ var src_default = Adaptor_exports;
|
|
|
131
135
|
// Annotate the CommonJS export names for ESM import in node:
|
|
132
136
|
0 && (module.exports = {
|
|
133
137
|
alterState,
|
|
138
|
+
combine,
|
|
134
139
|
dataPath,
|
|
135
140
|
dataValue,
|
|
136
141
|
each,
|
|
@@ -140,6 +145,7 @@ var src_default = Adaptor_exports;
|
|
|
140
145
|
fn,
|
|
141
146
|
fnIf,
|
|
142
147
|
lastReferenceValue,
|
|
148
|
+
log,
|
|
143
149
|
merge,
|
|
144
150
|
sourceValue,
|
|
145
151
|
submitSite
|
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
|
alterState: () => alterState,
|
|
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
|
submitSite: () => submitSite
|
|
@@ -25,17 +27,19 @@ import { execute as commonExecute } from "@openfn/language-common";
|
|
|
25
27
|
import { expandReferences } from "@openfn/language-common/util";
|
|
26
28
|
import request from "request";
|
|
27
29
|
import {
|
|
28
|
-
fn,
|
|
29
|
-
fnIf,
|
|
30
30
|
alterState,
|
|
31
|
+
combine,
|
|
32
|
+
dataPath,
|
|
33
|
+
dataValue,
|
|
34
|
+
each,
|
|
31
35
|
field,
|
|
32
36
|
fields,
|
|
33
|
-
|
|
37
|
+
fn,
|
|
38
|
+
fnIf,
|
|
39
|
+
lastReferenceValue,
|
|
40
|
+
log,
|
|
34
41
|
merge,
|
|
35
|
-
|
|
36
|
-
dataPath,
|
|
37
|
-
dataValue,
|
|
38
|
-
lastReferenceValue
|
|
42
|
+
sourceValue
|
|
39
43
|
} from "@openfn/language-common";
|
|
40
44
|
function execute(...operations) {
|
|
41
45
|
const initialState = {
|
|
@@ -104,6 +108,7 @@ function submitSite(collection_id, submissionData) {
|
|
|
104
108
|
var src_default = Adaptor_exports;
|
|
105
109
|
export {
|
|
106
110
|
alterState,
|
|
111
|
+
combine,
|
|
107
112
|
dataPath,
|
|
108
113
|
dataValue,
|
|
109
114
|
src_default as default,
|
|
@@ -114,6 +119,7 @@ export {
|
|
|
114
119
|
fn,
|
|
115
120
|
fnIf,
|
|
116
121
|
lastReferenceValue,
|
|
122
|
+
log,
|
|
117
123
|
merge,
|
|
118
124
|
sourceValue,
|
|
119
125
|
submitSite
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-resourcemap",
|
|
3
3
|
"label": "Resourcemap",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"description": "OpenFn Resourcemap adaptor for geospatial platform operations",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"author": "Open Function Group",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"request": "^2.88.2",
|
|
17
|
-
"@openfn/language-common": "3.3.
|
|
17
|
+
"@openfn/language-common": "3.3.2"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"assertion-error": "^2.0.0",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export function execute(...operations: Operations): Operation;
|
|
|
15
15
|
* @returns {Operation}
|
|
16
16
|
*/
|
|
17
17
|
export function submitSite(collection_id: any, submissionData: any): Operation;
|
|
18
|
-
export {
|
|
18
|
+
export { alterState, combine, dataPath, dataValue, each, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";
|