@openfn/language-common 1.7.4 → 1.7.6
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 +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/package.json +6 -3
- package/types/Adaptor.d.ts +1 -1
package/ast.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -93,7 +93,8 @@ __export(Adaptor_exports, {
|
|
|
93
93
|
splitKeys: () => splitKeys,
|
|
94
94
|
toArray: () => toArray
|
|
95
95
|
});
|
|
96
|
-
var
|
|
96
|
+
var import_curry = __toESM(require("lodash/fp/curry.js"), 1);
|
|
97
|
+
var import_fromPairs = __toESM(require("lodash/fp/fromPairs.js"), 1);
|
|
97
98
|
var import_jsonpath_plus = require("jsonpath-plus");
|
|
98
99
|
|
|
99
100
|
// src/beta.js
|
|
@@ -224,7 +225,6 @@ __export(dateFns_exports, {
|
|
|
224
225
|
var import_date_fns = require("date-fns");
|
|
225
226
|
|
|
226
227
|
// src/Adaptor.js
|
|
227
|
-
var { curry, fromPairs } = import_fp.default;
|
|
228
228
|
function execute(...operations) {
|
|
229
229
|
return (state) => {
|
|
230
230
|
const start = Promise.resolve(state);
|
|
@@ -269,7 +269,7 @@ function lastReferenceValue(path) {
|
|
|
269
269
|
const lastReferencePath = referencePath("[0]".concat(".", path));
|
|
270
270
|
return sourceValue(lastReferencePath);
|
|
271
271
|
}
|
|
272
|
-
var map =
|
|
272
|
+
var map = (0, import_curry.default)(function(path, operation, state) {
|
|
273
273
|
switch (typeof path) {
|
|
274
274
|
case "string":
|
|
275
275
|
source(path)(state).map(function(data) {
|
|
@@ -351,7 +351,7 @@ function field(key, value) {
|
|
|
351
351
|
return [key, value];
|
|
352
352
|
}
|
|
353
353
|
function fields(...fields2) {
|
|
354
|
-
return
|
|
354
|
+
return (0, import_fromPairs.default)(fields2);
|
|
355
355
|
}
|
|
356
356
|
function merge(dataSource, fields2) {
|
|
357
357
|
return (state) => {
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,8 @@ __export(Adaptor_exports, {
|
|
|
38
38
|
splitKeys: () => splitKeys,
|
|
39
39
|
toArray: () => toArray
|
|
40
40
|
});
|
|
41
|
-
import
|
|
41
|
+
import curry from "lodash/fp/curry.js";
|
|
42
|
+
import fromPairs from "lodash/fp/fromPairs.js";
|
|
42
43
|
import { JSONPath } from "jsonpath-plus";
|
|
43
44
|
|
|
44
45
|
// src/beta.js
|
|
@@ -169,7 +170,6 @@ __export(dateFns_exports, {
|
|
|
169
170
|
import { parse, format } from "date-fns";
|
|
170
171
|
|
|
171
172
|
// src/Adaptor.js
|
|
172
|
-
var { curry, fromPairs } = _;
|
|
173
173
|
function execute(...operations) {
|
|
174
174
|
return (state) => {
|
|
175
175
|
const start = Promise.resolve(state);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfn/language-common",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.6",
|
|
4
4
|
"description": "Common Expressions for OpenFn",
|
|
5
5
|
"homepage": "https://docs.openfn.org",
|
|
6
6
|
"repository": {
|
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
"url": "https://github.com/openfn/adaptors.git"
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
|
-
"
|
|
12
|
-
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
13
16
|
},
|
|
14
17
|
"author": "Open Function Group",
|
|
15
18
|
"license": "LGPL-3.0-or-later",
|