integreat 0.8.0-beta.23 → 0.8.0-beta.24
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
|
@@ -7,7 +7,7 @@ export { default as transformers } from './transformers/index.js';
|
|
|
7
7
|
export { default as middleware } from './middleware/index.js';
|
|
8
8
|
export { default as createAction } from './utils/createAction.js';
|
|
9
9
|
export default {
|
|
10
|
-
version: '0.8.0-beta.
|
|
10
|
+
version: '0.8.0-beta.23',
|
|
11
11
|
create,
|
|
12
12
|
mergeDefinitions,
|
|
13
13
|
mergeResources,
|
package/dist/service/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Action, Response, Dispatch, Transporter } from '../types.js';
|
|
|
3
3
|
import { EndpointDef, Endpoint } from './endpoints/types.js';
|
|
4
4
|
export interface MapOptions {
|
|
5
5
|
pipelines?: Record<string, MapDefinition>;
|
|
6
|
-
|
|
6
|
+
transformers?: Record<string, CustomFunction>;
|
|
7
7
|
dictionaries?: Dictionaries;
|
|
8
8
|
noneValues?: unknown[];
|
|
9
9
|
fwdAlias?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { MapDefinition, CustomFunction, Dictionaries } from 'map-transform';
|
|
2
2
|
import { Schema } from '../schema/index.js';
|
|
3
3
|
import { MapOptions } from '../service/types.js';
|
|
4
|
-
export default function createMapOptions(schemas: Record<string, Schema>, mutations?: Record<string, MapDefinition>,
|
|
4
|
+
export default function createMapOptions(schemas: Record<string, Schema>, mutations?: Record<string, MapDefinition>, transformers?: Record<string, CustomFunction>, dictionaries?: Dictionaries): MapOptions;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const pipelinesFromSchemas = (schemas) => Object.entries(schemas).reduce((pipelines, [id, def]) => ({ ...pipelines, [`cast_${id}`]: def.mapping }), {});
|
|
2
|
-
export default function createMapOptions(schemas, mutations,
|
|
2
|
+
export default function createMapOptions(schemas, mutations, transformers, dictionaries) {
|
|
3
3
|
return {
|
|
4
4
|
pipelines: {
|
|
5
5
|
...mutations,
|
|
6
6
|
...pipelinesFromSchemas(schemas),
|
|
7
7
|
},
|
|
8
|
-
|
|
8
|
+
transformers,
|
|
9
9
|
dictionaries,
|
|
10
10
|
fwdAlias: 'from',
|
|
11
11
|
revAlias: 'to',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createMapOptions.js","sourceRoot":"","sources":["../../src/utils/createMapOptions.ts"],"names":[],"mappings":"AAIA,MAAM,oBAAoB,GAAG,CAC3B,OAA+B,EACA,EAAE,CACjC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAC5B,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,EACzE,EAAE,CACH,CAAA;AAEH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,OAA+B,EAC/B,SAAyC,EACzC,
|
|
1
|
+
{"version":3,"file":"createMapOptions.js","sourceRoot":"","sources":["../../src/utils/createMapOptions.ts"],"names":[],"mappings":"AAIA,MAAM,oBAAoB,GAAG,CAC3B,OAA+B,EACA,EAAE,CACjC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,CAC5B,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,EACzE,EAAE,CACH,CAAA;AAEH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CACtC,OAA+B,EAC/B,SAAyC,EACzC,YAA6C,EAC7C,YAA2B;IAE3B,OAAO;QACL,SAAS,EAAE;YACT,GAAG,SAAS;YACZ,GAAG,oBAAoB,CAAC,OAAO,CAAC;SACjC;QACD,YAAY;QACZ,YAAY;QACZ,QAAQ,EAAE,MAAM;QAChB,QAAQ,EAAE,IAAI;KACf,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "integreat",
|
|
3
|
-
"version": "0.8.0-beta.
|
|
3
|
+
"version": "0.8.0-beta.24",
|
|
4
4
|
"description": "Node.js integration layer",
|
|
5
5
|
"author": "Kjell-Morten Bratsberg Thorsen <kjellmorten@integreat.io> (https://integreat.io/)",
|
|
6
6
|
"license": "ISC",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"later": "^1.2.0",
|
|
52
52
|
"luxon": "^3.2.1",
|
|
53
53
|
"map-any": "^0.2.1",
|
|
54
|
-
"map-transform": "0.4.0-beta.
|
|
54
|
+
"map-transform": "0.4.0-beta.8",
|
|
55
55
|
"ms": "^2.1.3",
|
|
56
56
|
"nanoid": "^4.0.0",
|
|
57
57
|
"p-limit": "^4.0.0",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@integreat/ts-dev-setup": "^4.0.0",
|
|
64
64
|
"@types/sinon": "^10.0.13",
|
|
65
|
-
"integreat-transporter-http": "0.1.0-beta.
|
|
65
|
+
"integreat-transporter-http": "0.1.0-beta.6",
|
|
66
66
|
"nock": "^13.3.0",
|
|
67
67
|
"sinon": "^15.0.1"
|
|
68
68
|
}
|