integreat 0.8.0-alpha.57 → 0.8.0-alpha.58
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.js
CHANGED
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "transformers", { enumerable: true, get: function
|
|
|
15
15
|
var middleware_1 = require("./middleware");
|
|
16
16
|
Object.defineProperty(exports, "middleware", { enumerable: true, get: function () { return middleware_1.default; } });
|
|
17
17
|
exports.default = {
|
|
18
|
-
version: '0.8.0-alpha.
|
|
18
|
+
version: '0.8.0-alpha.57',
|
|
19
19
|
create: create_1.default,
|
|
20
20
|
mergeDefinitions: mergeDefinitions_1.default,
|
|
21
21
|
mergeResources: mergeResources_1.default,
|
package/dist/utils/getField.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const dotProp = require("dot-prop");
|
|
4
4
|
const mapAny = require("map-any");
|
|
5
5
|
const is_1 = require("./is");
|
|
6
6
|
const extractIdFromRef = (data) => ((0, is_1.isReference)(data) ? data.id : data);
|
|
7
|
-
const extractFromPath = (data, fieldPath) => (
|
|
7
|
+
const extractFromPath = (data, fieldPath) => (fieldPath && (0, is_1.isObject)(data) && dotProp.get(data, fieldPath)) || undefined;
|
|
8
8
|
exports.default = (item, field) => mapAny(extractIdFromRef, extractFromPath(item, field));
|
|
9
9
|
//# sourceMappingURL=getField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getField.js","sourceRoot":"","sources":["../../src/utils/getField.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"getField.js","sourceRoot":"","sources":["../../src/utils/getField.ts"],"names":[],"mappings":";;AAAA,oCAAoC;AACpC,kCAAkC;AAClC,6BAA4C;AAE5C,MAAM,gBAAgB,GAAG,CAAC,IAAa,EAAE,EAAE,CAAC,CAAC,IAAA,gBAAW,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;AAEhF,MAAM,eAAe,GAAG,CAAC,IAAa,EAAE,SAAiB,EAAE,EAAE,CAC3D,CAAC,SAAS,IAAI,IAAA,aAAQ,EAAC,IAAI,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,IAAI,SAAS,CAAA;AAE5E,kBAAe,CAAC,IAAa,EAAE,KAAa,EAAuB,EAAE,CACnE,MAAM,CAAC,gBAAgB,EAAE,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAA"}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const R = require("ramda");
|
|
4
3
|
function mergeResources(...resources) {
|
|
5
|
-
return resources.reduce((resources, resource) =>
|
|
4
|
+
return resources.reduce((resources, resource) => ({
|
|
5
|
+
transporters: { ...resources.transporters, ...resource.transporters },
|
|
6
|
+
handlers: { ...resources.handlers, ...resource.handlers },
|
|
7
|
+
authenticators: {
|
|
8
|
+
...resources.authenticators,
|
|
9
|
+
...resource.authenticators,
|
|
10
|
+
},
|
|
11
|
+
transformers: { ...resources.transformers, ...resource.transformers },
|
|
12
|
+
}), {});
|
|
6
13
|
}
|
|
7
14
|
exports.default = mergeResources;
|
|
8
15
|
//# sourceMappingURL=mergeResources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeResources.js","sourceRoot":"","sources":["../../src/utils/mergeResources.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"mergeResources.js","sourceRoot":"","sources":["../../src/utils/mergeResources.ts"],"names":[],"mappings":";;AAEA,SAAwB,cAAc,CAAC,GAAG,SAAsB;IAC9D,OAAO,SAAS,CAAC,MAAM,CACrB,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QACxB,YAAY,EAAE,EAAE,GAAG,SAAS,CAAC,YAAY,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE;QACrE,QAAQ,EAAE,EAAE,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE;QACzD,cAAc,EAAE;YACd,GAAG,SAAS,CAAC,cAAc;YAC3B,GAAG,QAAQ,CAAC,cAAc;SAC3B;QACD,YAAY,EAAE,EAAE,GAAG,SAAS,CAAC,YAAY,EAAE,GAAG,QAAQ,CAAC,YAAY,EAAE;KACtE,CAAC,EACF,EAAE,CACH,CAAA;AACH,CAAC;AAbD,iCAaC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "integreat",
|
|
3
|
-
"version": "0.8.0-alpha.
|
|
3
|
+
"version": "0.8.0-alpha.58",
|
|
4
4
|
"description": "Node.js integration layer",
|
|
5
5
|
"author": "Kjell-Morten Bratsberg Thorsen <kjellmorten@integreat.io> (https://integreat.io/)",
|
|
6
6
|
"license": "ISC",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"@types/nanoid": "^3.0.0",
|
|
42
42
|
"@types/sax": "^1.2.4",
|
|
43
43
|
"debug": "^4.3.3",
|
|
44
|
+
"dot-prop": "^6.0.1",
|
|
44
45
|
"got": "^11.8.3",
|
|
45
46
|
"html-entities": "^2.3.2",
|
|
46
47
|
"later": "^1.2.0",
|
|
@@ -52,7 +53,6 @@
|
|
|
52
53
|
"p-limit": "^3.1.0",
|
|
53
54
|
"p-pipe": "^3.1.0",
|
|
54
55
|
"p-progress": "^0.5.1",
|
|
55
|
-
"ramda": "^0.28.0",
|
|
56
56
|
"rfdc": "^1.3.0",
|
|
57
57
|
"sax": "^1.2.4"
|
|
58
58
|
},
|