@openfn/language-khanacademy 0.5.15 → 0.5.16
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/dist/index.cjs +3 -1
- package/dist/index.js +4 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -59,6 +59,7 @@ __export(Adaptor_exports, {
|
|
|
59
59
|
});
|
|
60
60
|
var import_language_common = require("@openfn/language-common");
|
|
61
61
|
var import_url = require("url");
|
|
62
|
+
var import_util = require("@openfn/language-common/util");
|
|
62
63
|
var import_request = __toESM(require("request"), 1);
|
|
63
64
|
var import_qs = __toESM(require("qs"), 1);
|
|
64
65
|
var import_language_common2 = require("@openfn/language-common");
|
|
@@ -81,7 +82,8 @@ function fetch(params) {
|
|
|
81
82
|
}
|
|
82
83
|
return (state) => {
|
|
83
84
|
const { email, password, consumerKey, secretKey } = state.configuration;
|
|
84
|
-
const
|
|
85
|
+
const [resolvedParams] = (0, import_util.expandReferences)(state, params);
|
|
86
|
+
const { getEndpoint, queryParams, postUrl } = resolvedParams;
|
|
85
87
|
const query = import_qs.default.stringify(queryParams);
|
|
86
88
|
const getUrl = (0, import_url.resolve)(
|
|
87
89
|
"https://www.khanacademy.org/api/v1/",
|
package/dist/index.js
CHANGED
|
@@ -20,11 +20,9 @@ __export(Adaptor_exports, {
|
|
|
20
20
|
merge: () => merge,
|
|
21
21
|
sourceValue: () => sourceValue
|
|
22
22
|
});
|
|
23
|
-
import {
|
|
24
|
-
execute as commonExecute,
|
|
25
|
-
expandReferences
|
|
26
|
-
} from "@openfn/language-common";
|
|
23
|
+
import { execute as commonExecute } from "@openfn/language-common";
|
|
27
24
|
import { resolve as resolveUrl } from "url";
|
|
25
|
+
import { expandReferences } from "@openfn/language-common/util";
|
|
28
26
|
import request from "request";
|
|
29
27
|
import qs from "qs";
|
|
30
28
|
import {
|
|
@@ -58,7 +56,8 @@ function fetch(params) {
|
|
|
58
56
|
}
|
|
59
57
|
return (state) => {
|
|
60
58
|
const { email, password, consumerKey, secretKey } = state.configuration;
|
|
61
|
-
const
|
|
59
|
+
const [resolvedParams] = expandReferences(state, params);
|
|
60
|
+
const { getEndpoint, queryParams, postUrl } = resolvedParams;
|
|
62
61
|
const query = qs.stringify(queryParams);
|
|
63
62
|
const getUrl = resolveUrl(
|
|
64
63
|
"https://www.khanacademy.org/api/v1/",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-khanacademy",
|
|
3
3
|
"label": "Khan Academy",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.16",
|
|
5
5
|
"description": "A Khan Academy Language Pack for OpenFn",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"author": "Open Function Group",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"qs": "^6.11.0",
|
|
17
17
|
"request": "^2.88.2",
|
|
18
|
-
"@openfn/language-common": "
|
|
18
|
+
"@openfn/language-common": "3.0.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"assertion-error": "^2.0.0",
|