@openfn/language-beyonic 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/ast.json +295 -0
  2. package/package.json +6 -5
package/ast.json ADDED
@@ -0,0 +1,295 @@
1
+ {
2
+ "operations": [],
3
+ "exports": [],
4
+ "common": [
5
+ {
6
+ "name": "sourceValue",
7
+ "params": [
8
+ "path"
9
+ ],
10
+ "docs": {
11
+ "description": "Picks out a single value from source data.\nIf a JSONPath returns more than one value for the reference, the first\nitem will be returned.",
12
+ "tags": [
13
+ {
14
+ "title": "public",
15
+ "description": null,
16
+ "type": null
17
+ },
18
+ {
19
+ "title": "example",
20
+ "description": "sourceValue('$.key')"
21
+ },
22
+ {
23
+ "title": "function",
24
+ "description": null,
25
+ "name": null
26
+ },
27
+ {
28
+ "title": "param",
29
+ "description": "JSONPath referencing a point in `state`.",
30
+ "type": {
31
+ "type": "NameExpression",
32
+ "name": "String"
33
+ },
34
+ "name": "path"
35
+ }
36
+ ]
37
+ },
38
+ "valid": true
39
+ },
40
+ {
41
+ "name": "dataPath",
42
+ "params": [
43
+ "path"
44
+ ],
45
+ "docs": {
46
+ "description": "Ensures a path points at the data.",
47
+ "tags": [
48
+ {
49
+ "title": "public",
50
+ "description": null,
51
+ "type": null
52
+ },
53
+ {
54
+ "title": "example",
55
+ "description": "dataPath('key')"
56
+ },
57
+ {
58
+ "title": "function",
59
+ "description": null,
60
+ "name": null
61
+ },
62
+ {
63
+ "title": "param",
64
+ "description": "JSONPath referencing a point in `data`.",
65
+ "type": {
66
+ "type": "NameExpression",
67
+ "name": "string"
68
+ },
69
+ "name": "path"
70
+ },
71
+ {
72
+ "title": "returns",
73
+ "description": null,
74
+ "type": {
75
+ "type": "NameExpression",
76
+ "name": "string"
77
+ }
78
+ }
79
+ ]
80
+ },
81
+ "valid": true
82
+ },
83
+ {
84
+ "name": "dataValue",
85
+ "params": [
86
+ "path"
87
+ ],
88
+ "docs": {
89
+ "description": "Picks out a single value from the source data object—usually `state.data`.\nIf a JSONPath returns more than one value for the reference, the first\nitem will be returned.",
90
+ "tags": [
91
+ {
92
+ "title": "public",
93
+ "description": null,
94
+ "type": null
95
+ },
96
+ {
97
+ "title": "example",
98
+ "description": "dataValue('key')"
99
+ },
100
+ {
101
+ "title": "function",
102
+ "description": null,
103
+ "name": null
104
+ },
105
+ {
106
+ "title": "param",
107
+ "description": "JSONPath referencing a point in `data`.",
108
+ "type": {
109
+ "type": "NameExpression",
110
+ "name": "String"
111
+ },
112
+ "name": "path"
113
+ }
114
+ ]
115
+ },
116
+ "valid": true
117
+ },
118
+ {
119
+ "name": "lastReferenceValue",
120
+ "params": [
121
+ "path"
122
+ ],
123
+ "docs": {
124
+ "description": "Picks out the last reference value from source data.",
125
+ "tags": [
126
+ {
127
+ "title": "public",
128
+ "description": null,
129
+ "type": null
130
+ },
131
+ {
132
+ "title": "example",
133
+ "description": "lastReferenceValue('key')"
134
+ },
135
+ {
136
+ "title": "function",
137
+ "description": null,
138
+ "name": null
139
+ },
140
+ {
141
+ "title": "param",
142
+ "description": "JSONPath referencing a point in `references`.",
143
+ "type": {
144
+ "type": "NameExpression",
145
+ "name": "String"
146
+ },
147
+ "name": "path"
148
+ }
149
+ ]
150
+ },
151
+ "valid": true
152
+ },
153
+ {
154
+ "name": "field",
155
+ "params": [
156
+ "key",
157
+ "value"
158
+ ],
159
+ "docs": {
160
+ "description": "Returns a key, value pair in an array.",
161
+ "tags": [
162
+ {
163
+ "title": "public",
164
+ "description": null,
165
+ "type": null
166
+ },
167
+ {
168
+ "title": "example",
169
+ "description": "field('destination_field_name__c', 'value')"
170
+ },
171
+ {
172
+ "title": "function",
173
+ "description": null,
174
+ "name": null
175
+ },
176
+ {
177
+ "title": "param",
178
+ "description": "Name of the field",
179
+ "type": {
180
+ "type": "NameExpression",
181
+ "name": "string"
182
+ },
183
+ "name": "key"
184
+ },
185
+ {
186
+ "title": "param",
187
+ "description": "The value itself or a sourceable operation.",
188
+ "type": {
189
+ "type": "NameExpression",
190
+ "name": "Value"
191
+ },
192
+ "name": "value"
193
+ }
194
+ ]
195
+ },
196
+ "valid": true
197
+ },
198
+ {
199
+ "name": "fields",
200
+ "params": [
201
+ "fields"
202
+ ],
203
+ "docs": {
204
+ "description": "Zips key value pairs into an object.",
205
+ "tags": [
206
+ {
207
+ "title": "public",
208
+ "description": null,
209
+ "type": null
210
+ },
211
+ {
212
+ "title": "example",
213
+ "description": "fields(list_of_fields)"
214
+ },
215
+ {
216
+ "title": "function",
217
+ "description": null,
218
+ "name": null
219
+ },
220
+ {
221
+ "title": "param",
222
+ "description": "a list of fields",
223
+ "type": {
224
+ "type": "NameExpression",
225
+ "name": "Fields"
226
+ },
227
+ "name": "fields"
228
+ },
229
+ {
230
+ "title": "returns",
231
+ "description": null,
232
+ "type": {
233
+ "type": "NameExpression",
234
+ "name": "Object"
235
+ }
236
+ }
237
+ ]
238
+ },
239
+ "valid": true
240
+ },
241
+ {
242
+ "name": "merge",
243
+ "params": [
244
+ "dataSource",
245
+ "fields"
246
+ ],
247
+ "docs": {
248
+ "description": "Merges fields into each item in an array.",
249
+ "tags": [
250
+ {
251
+ "title": "public",
252
+ "description": null,
253
+ "type": null
254
+ },
255
+ {
256
+ "title": "example",
257
+ "description": "merge(\n \"$.books[*]\",\n fields(\n field( \"publisher\", sourceValue(\"$.publisher\") )\n )\n)"
258
+ },
259
+ {
260
+ "title": "function",
261
+ "description": null,
262
+ "name": null
263
+ },
264
+ {
265
+ "title": "param",
266
+ "description": null,
267
+ "type": {
268
+ "type": "NameExpression",
269
+ "name": "DataSource"
270
+ },
271
+ "name": "dataSource"
272
+ },
273
+ {
274
+ "title": "param",
275
+ "description": "Group of fields to merge in.",
276
+ "type": {
277
+ "type": "NameExpression",
278
+ "name": "Object"
279
+ },
280
+ "name": "fields"
281
+ },
282
+ {
283
+ "title": "returns",
284
+ "description": null,
285
+ "type": {
286
+ "type": "NameExpression",
287
+ "name": "DataSource"
288
+ }
289
+ }
290
+ ]
291
+ },
292
+ "valid": true
293
+ }
294
+ ]
295
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfn/language-beyonic",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "beyonic Language Pack for OpenFn",
5
5
  "main": "dist/index.cjs",
6
6
  "author": "Open Function Group",
@@ -15,12 +15,13 @@
15
15
  "JSONPath": "^0.10.0",
16
16
  "language-common": "github:openfn/language-common",
17
17
  "lodash-fp": "^0.10.2",
18
- "superagent": "^1.7.2"
18
+ "superagent": "^8.0.0"
19
19
  },
20
20
  "devDependencies": {
21
- "assertion-error": "1.1.0",
22
- "chai": "3.5.0",
23
- "deep-eql": "0.1.3",
21
+ "@openfn/simple-ast": "0.4.1",
22
+ "assertion-error": "2.0.0",
23
+ "chai": "4.3.6",
24
+ "deep-eql": "4.1.1",
24
25
  "mocha": "7.2.0",
25
26
  "sinon": "1.17.7",
26
27
  "superagent-mock": "1.12.0",