@openfn/language-khanacademy 0.5.31 → 0.6.1
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 +3 -3
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
|
@@ -315,6 +315,49 @@
|
|
|
315
315
|
},
|
|
316
316
|
"valid": true
|
|
317
317
|
},
|
|
318
|
+
{
|
|
319
|
+
"name": "combine",
|
|
320
|
+
"params": [
|
|
321
|
+
"operations"
|
|
322
|
+
],
|
|
323
|
+
"docs": {
|
|
324
|
+
"description": "Combines two operations into one",
|
|
325
|
+
"tags": [
|
|
326
|
+
{
|
|
327
|
+
"title": "public",
|
|
328
|
+
"description": null,
|
|
329
|
+
"type": null
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"title": "function",
|
|
333
|
+
"description": null,
|
|
334
|
+
"name": null
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"title": "example",
|
|
338
|
+
"description": "combine(\n create('foo'),\n delete('bar')\n)"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"title": "param",
|
|
342
|
+
"description": "Operations to be performed.",
|
|
343
|
+
"type": {
|
|
344
|
+
"type": "NameExpression",
|
|
345
|
+
"name": "Operations"
|
|
346
|
+
},
|
|
347
|
+
"name": "operations"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"title": "returns",
|
|
351
|
+
"description": null,
|
|
352
|
+
"type": {
|
|
353
|
+
"type": "NameExpression",
|
|
354
|
+
"name": "Operation"
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
"valid": true
|
|
360
|
+
},
|
|
318
361
|
{
|
|
319
362
|
"name": "field",
|
|
320
363
|
"params": [
|
|
@@ -468,6 +511,55 @@
|
|
|
468
511
|
]
|
|
469
512
|
},
|
|
470
513
|
"valid": true
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"name": "log",
|
|
517
|
+
"params": [
|
|
518
|
+
"args"
|
|
519
|
+
],
|
|
520
|
+
"docs": {
|
|
521
|
+
"description": "Outputs a message, like calling `console.log`. Use this at the top level of your job code, but not inside callbacks.",
|
|
522
|
+
"tags": [
|
|
523
|
+
{
|
|
524
|
+
"title": "public",
|
|
525
|
+
"description": null,
|
|
526
|
+
"type": null
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"title": "function",
|
|
530
|
+
"description": null,
|
|
531
|
+
"name": null
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"title": "example",
|
|
535
|
+
"description": "log('Patient List::', $.patients);",
|
|
536
|
+
"caption": "Log values from state"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"title": "example",
|
|
540
|
+
"description": "fn((state) => {\n console.log(state.data);\n return state;\n})",
|
|
541
|
+
"caption": "Use console.log inside a callback or fn block"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"title": "param",
|
|
545
|
+
"description": "A value or message to display in the logs",
|
|
546
|
+
"type": {
|
|
547
|
+
"type": "NameExpression",
|
|
548
|
+
"name": "any"
|
|
549
|
+
},
|
|
550
|
+
"name": "args"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
"title": "returns",
|
|
554
|
+
"description": null,
|
|
555
|
+
"type": {
|
|
556
|
+
"type": "NameExpression",
|
|
557
|
+
"name": "Operation"
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
]
|
|
561
|
+
},
|
|
562
|
+
"valid": true
|
|
471
563
|
}
|
|
472
564
|
]
|
|
473
565
|
}
|
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
|
});
|
|
@@ -45,6 +47,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
45
47
|
var Adaptor_exports = {};
|
|
46
48
|
__export(Adaptor_exports, {
|
|
47
49
|
alterState: () => import_language_common2.alterState,
|
|
50
|
+
combine: () => import_language_common2.combine,
|
|
48
51
|
dataPath: () => import_language_common2.dataPath,
|
|
49
52
|
dataValue: () => import_language_common2.dataValue,
|
|
50
53
|
execute: () => execute,
|
|
@@ -54,6 +57,7 @@ __export(Adaptor_exports, {
|
|
|
54
57
|
fn: () => import_language_common2.fn,
|
|
55
58
|
fnIf: () => import_language_common2.fnIf,
|
|
56
59
|
lastReferenceValue: () => import_language_common2.lastReferenceValue,
|
|
60
|
+
log: () => import_language_common2.log,
|
|
57
61
|
merge: () => import_language_common2.merge,
|
|
58
62
|
sourceValue: () => import_language_common2.sourceValue
|
|
59
63
|
});
|
|
@@ -222,6 +226,7 @@ var src_default = Adaptor_exports;
|
|
|
222
226
|
// Annotate the CommonJS export names for ESM import in node:
|
|
223
227
|
0 && (module.exports = {
|
|
224
228
|
alterState,
|
|
229
|
+
combine,
|
|
225
230
|
dataPath,
|
|
226
231
|
dataValue,
|
|
227
232
|
execute,
|
|
@@ -231,6 +236,7 @@ var src_default = Adaptor_exports;
|
|
|
231
236
|
fn,
|
|
232
237
|
fnIf,
|
|
233
238
|
lastReferenceValue,
|
|
239
|
+
log,
|
|
234
240
|
merge,
|
|
235
241
|
sourceValue
|
|
236
242
|
});
|
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
|
execute: () => execute,
|
|
@@ -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
|
});
|
|
@@ -26,16 +28,18 @@ import { expandReferences } from "@openfn/language-common/util";
|
|
|
26
28
|
import request from "request";
|
|
27
29
|
import qs from "qs";
|
|
28
30
|
import {
|
|
29
|
-
fn,
|
|
30
|
-
fnIf,
|
|
31
|
-
field,
|
|
32
|
-
sourceValue,
|
|
33
|
-
fields,
|
|
34
31
|
alterState,
|
|
35
|
-
|
|
32
|
+
combine,
|
|
36
33
|
dataPath,
|
|
37
34
|
dataValue,
|
|
38
|
-
|
|
35
|
+
field,
|
|
36
|
+
fields,
|
|
37
|
+
fn,
|
|
38
|
+
fnIf,
|
|
39
|
+
lastReferenceValue,
|
|
40
|
+
log,
|
|
41
|
+
merge,
|
|
42
|
+
sourceValue
|
|
39
43
|
} from "@openfn/language-common";
|
|
40
44
|
function execute(...operations) {
|
|
41
45
|
const initialState = {
|
|
@@ -195,6 +199,7 @@ function fetch(params) {
|
|
|
195
199
|
var src_default = Adaptor_exports;
|
|
196
200
|
export {
|
|
197
201
|
alterState,
|
|
202
|
+
combine,
|
|
198
203
|
dataPath,
|
|
199
204
|
dataValue,
|
|
200
205
|
src_default as default,
|
|
@@ -205,6 +210,7 @@ export {
|
|
|
205
210
|
fn,
|
|
206
211
|
fnIf,
|
|
207
212
|
lastReferenceValue,
|
|
213
|
+
log,
|
|
208
214
|
merge,
|
|
209
215
|
sourceValue
|
|
210
216
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-khanacademy",
|
|
3
3
|
"label": "Khan Academy",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"description": "A Khan Academy Language Pack for OpenFn",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"author": "Open Function Group",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"configuration-schema.json"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"qs": "^6.
|
|
16
|
+
"qs": "^6.15.2",
|
|
17
17
|
"request": "^2.88.2",
|
|
18
|
-
"@openfn/language-common": "3.3.
|
|
18
|
+
"@openfn/language-common": "3.3.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"assertion-error": "^2.0.0",
|
package/types/Adaptor.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export function execute(...operations: Operations): Operation;
|
|
|
16
16
|
* @returns {Operation}
|
|
17
17
|
*/
|
|
18
18
|
export function fetch(params: object): Operation;
|
|
19
|
-
export {
|
|
19
|
+
export { alterState, combine, dataPath, dataValue, field, fields, fn, fnIf, lastReferenceValue, log, merge, sourceValue } from "@openfn/language-common";
|