@webiny/api-dynamodb-to-elasticsearch 5.42.2-beta.0 → 5.42.2-beta.2
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/Decompressor.d.ts +1 -1
- package/Decompressor.js.map +1 -1
- package/Operations.d.ts +1 -1
- package/Operations.js.map +1 -1
- package/marshall.d.ts +1 -1
- package/marshall.js.map +1 -1
- package/package.json +12 -12
- package/types.d.ts +1 -1
- package/types.js.map +1 -1
package/Decompressor.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IDecompressor } from "./types";
|
|
2
|
-
import { GenericRecord } from "@webiny/
|
|
2
|
+
import { GenericRecord } from "@webiny/api/types";
|
|
3
3
|
import { PluginsContainer } from "@webiny/plugins";
|
|
4
4
|
export interface IDecompressorParams {
|
|
5
5
|
plugins: PluginsContainer;
|
package/Decompressor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_apiElasticsearch","require","Decompressor","constructor","params","plugins","decompress","data","ex","exports"],"sources":["Decompressor.ts"],"sourcesContent":["import { IDecompressor } from \"./types\";\nimport { decompress } from \"@webiny/api-elasticsearch\";\nimport { GenericRecord } from \"@webiny/
|
|
1
|
+
{"version":3,"names":["_apiElasticsearch","require","Decompressor","constructor","params","plugins","decompress","data","ex","exports"],"sources":["Decompressor.ts"],"sourcesContent":["import { IDecompressor } from \"./types\";\nimport { decompress } from \"@webiny/api-elasticsearch\";\nimport { GenericRecord } from \"@webiny/api/types\";\nimport { PluginsContainer } from \"@webiny/plugins\";\n\nexport interface IDecompressorParams {\n plugins: PluginsContainer;\n}\n\nexport class Decompressor implements IDecompressor {\n private readonly plugins: PluginsContainer;\n\n public constructor(params: IDecompressorParams) {\n this.plugins = params.plugins;\n }\n\n public async decompress(data: GenericRecord): Promise<GenericRecord | null> {\n try {\n return await decompress(this.plugins, data);\n } catch (ex) {\n return null;\n }\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AAQO,MAAMC,YAAY,CAA0B;EAGxCC,WAAWA,CAACC,MAA2B,EAAE;IAC5C,IAAI,CAACC,OAAO,GAAGD,MAAM,CAACC,OAAO;EACjC;EAEA,MAAaC,UAAUA,CAACC,IAAmB,EAAiC;IACxE,IAAI;MACA,OAAO,MAAM,IAAAD,4BAAU,EAAC,IAAI,CAACD,OAAO,EAAEE,IAAI,CAAC;IAC/C,CAAC,CAAC,OAAOC,EAAE,EAAE;MACT,OAAO,IAAI;IACf;EACJ;AACJ;AAACC,OAAA,CAAAP,YAAA,GAAAA,YAAA","ignoreList":[]}
|
package/Operations.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenericRecord } from "@webiny/
|
|
1
|
+
import { GenericRecord } from "@webiny/api/types";
|
|
2
2
|
import { IDeleteOperationParams, IInsertOperationParams, IModifyOperationParams, IOperations } from "./types";
|
|
3
3
|
export declare enum OperationType {
|
|
4
4
|
INSERT = "INSERT",
|
package/Operations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["OperationType","exports","Operations","_items","items","total","length","clear","insert","params","push","index","_id","id","_index","data","modify","delete"],"sources":["Operations.ts"],"sourcesContent":["import { GenericRecord } from \"@webiny/
|
|
1
|
+
{"version":3,"names":["OperationType","exports","Operations","_items","items","total","length","clear","insert","params","push","index","_id","id","_index","data","modify","delete"],"sources":["Operations.ts"],"sourcesContent":["import { GenericRecord } from \"@webiny/api/types\";\nimport {\n IDeleteOperationParams,\n IInsertOperationParams,\n IModifyOperationParams,\n IOperations\n} from \"~/types\";\n\nexport enum OperationType {\n INSERT = \"INSERT\",\n MODIFY = \"MODIFY\",\n REMOVE = \"REMOVE\"\n}\n\nexport class Operations implements IOperations {\n private _items: GenericRecord[] = [];\n\n public get items(): GenericRecord[] {\n return this._items;\n }\n\n public get total(): number {\n return this.items.length;\n }\n\n public clear() {\n this._items = [];\n }\n\n public insert(params: IInsertOperationParams): void {\n this.items.push(\n {\n index: {\n _id: params.id,\n _index: params.index\n }\n },\n params.data\n );\n }\n\n public modify(params: IModifyOperationParams): void {\n this.insert(params);\n }\n\n public delete(params: IDeleteOperationParams): void {\n this.items.push({\n delete: {\n _id: params.id,\n _index: params.index\n }\n });\n }\n}\n"],"mappings":";;;;;;IAQYA,aAAa,GAAAC,OAAA,CAAAD,aAAA,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAMlB,MAAME,UAAU,CAAwB;EACnCC,MAAM,GAAoB,EAAE;EAEpC,IAAWC,KAAKA,CAAA,EAAoB;IAChC,OAAO,IAAI,CAACD,MAAM;EACtB;EAEA,IAAWE,KAAKA,CAAA,EAAW;IACvB,OAAO,IAAI,CAACD,KAAK,CAACE,MAAM;EAC5B;EAEOC,KAAKA,CAAA,EAAG;IACX,IAAI,CAACJ,MAAM,GAAG,EAAE;EACpB;EAEOK,MAAMA,CAACC,MAA8B,EAAQ;IAChD,IAAI,CAACL,KAAK,CAACM,IAAI,CACX;MACIC,KAAK,EAAE;QACHC,GAAG,EAAEH,MAAM,CAACI,EAAE;QACdC,MAAM,EAAEL,MAAM,CAACE;MACnB;IACJ,CAAC,EACDF,MAAM,CAACM,IACX,CAAC;EACL;EAEOC,MAAMA,CAACP,MAA8B,EAAQ;IAChD,IAAI,CAACD,MAAM,CAACC,MAAM,CAAC;EACvB;EAEOQ,MAAMA,CAACR,MAA8B,EAAQ;IAChD,IAAI,CAACL,KAAK,CAACM,IAAI,CAAC;MACZO,MAAM,EAAE;QACJL,GAAG,EAAEH,MAAM,CAACI,EAAE;QACdC,MAAM,EAAEL,MAAM,CAACE;MACnB;IACJ,CAAC,CAAC;EACN;AACJ;AAACV,OAAA,CAAAC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
package/marshall.d.ts
CHANGED
package/marshall.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_clientDynamodb","require","marshall","value","baseMarshall","exports","unmarshall","undefined","baseUnmarshall"],"sources":["marshall.ts"],"sourcesContent":["import {\n marshall as baseMarshall,\n unmarshall as baseUnmarshall\n} from \"@webiny/aws-sdk/client-dynamodb\";\nimport { GenericRecord } from \"@webiny/
|
|
1
|
+
{"version":3,"names":["_clientDynamodb","require","marshall","value","baseMarshall","exports","unmarshall","undefined","baseUnmarshall"],"sources":["marshall.ts"],"sourcesContent":["import {\n marshall as baseMarshall,\n unmarshall as baseUnmarshall\n} from \"@webiny/aws-sdk/client-dynamodb\";\nimport { GenericRecord } from \"@webiny/api/types\";\n\nimport { AttributeValue } from \"@webiny/handler-aws/types\";\n\nexport interface MarshalledValue {\n [key: string]: AttributeValue;\n}\n\nexport const marshall = (value: GenericRecord): MarshalledValue => {\n if (!value) {\n return value;\n }\n return baseMarshall(value) as MarshalledValue;\n};\n\nexport const unmarshall = <T>(value?: MarshalledValue): T | undefined => {\n if (!value) {\n return undefined;\n }\n /**\n * We can safely cast the return value to `T` because we are 100% positive that this is correct.\n */\n // @ts-expect-error\n return baseUnmarshall(value) as T;\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAYO,MAAMC,QAAQ,GAAIC,KAAoB,IAAsB;EAC/D,IAAI,CAACA,KAAK,EAAE;IACR,OAAOA,KAAK;EAChB;EACA,OAAO,IAAAC,wBAAY,EAACD,KAAK,CAAC;AAC9B,CAAC;AAACE,OAAA,CAAAH,QAAA,GAAAA,QAAA;AAEK,MAAMI,UAAU,GAAOH,KAAuB,IAAoB;EACrE,IAAI,CAACA,KAAK,EAAE;IACR,OAAOI,SAAS;EACpB;EACA;AACJ;AACA;EACI;EACA,OAAO,IAAAC,0BAAc,EAACL,KAAK,CAAC;AAChC,CAAC;AAACE,OAAA,CAAAC,UAAA,GAAAA,UAAA","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/api-dynamodb-to-elasticsearch",
|
|
3
|
-
"version": "5.42.2-beta.
|
|
3
|
+
"version": "5.42.2-beta.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Webiny Ltd.",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@webiny/api
|
|
15
|
-
"@webiny/api-
|
|
16
|
-
"@webiny/
|
|
17
|
-
"@webiny/
|
|
18
|
-
"@webiny/
|
|
14
|
+
"@webiny/api": "5.42.2-beta.2",
|
|
15
|
+
"@webiny/api-elasticsearch": "5.42.2-beta.2",
|
|
16
|
+
"@webiny/api-log": "5.42.2-beta.2",
|
|
17
|
+
"@webiny/aws-sdk": "5.42.2-beta.2",
|
|
18
|
+
"@webiny/error": "5.42.2-beta.2",
|
|
19
|
+
"@webiny/handler-aws": "5.42.2-beta.2",
|
|
19
20
|
"p-retry": "4.6.2"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
|
-
"@webiny/
|
|
23
|
-
"@webiny/
|
|
24
|
-
"@webiny/project-utils": "5.42.2-beta.0",
|
|
23
|
+
"@webiny/plugins": "5.42.2-beta.2",
|
|
24
|
+
"@webiny/project-utils": "5.42.2-beta.2",
|
|
25
25
|
"typescript": "4.9.5"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
"directory": "dist"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "
|
|
33
|
-
"watch": "
|
|
32
|
+
"build": "node ../cli/bin.js run build",
|
|
33
|
+
"watch": "node ../cli/bin.js run watch"
|
|
34
34
|
},
|
|
35
35
|
"adio": {
|
|
36
36
|
"ignoreDirs": [
|
|
37
37
|
"__tests__"
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "00f036a0606014b75e02a1ce6dea45bd68c89dac"
|
|
41
41
|
}
|
package/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GenericRecord } from "@webiny/
|
|
1
|
+
import { GenericRecord } from "@webiny/api/types";
|
|
2
2
|
import { DynamoDBRecord } from "@webiny/handler-aws/types";
|
|
3
3
|
import { ElasticsearchContext } from "@webiny/api-elasticsearch/types";
|
|
4
4
|
import { Context as LoggerContext } from "@webiny/api-log/types";
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { GenericRecord } from \"@webiny/
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { GenericRecord } from \"@webiny/api/types\";\nimport { DynamoDBRecord } from \"@webiny/handler-aws/types\";\nimport { ElasticsearchContext } from \"@webiny/api-elasticsearch/types\";\nimport { Context as LoggerContext } from \"@webiny/api-log/types\";\n\nexport interface IOperationsBuilderBuildParams {\n records: DynamoDBRecord[];\n}\n\nexport interface IOperationsBuilder {\n build(params: IOperationsBuilderBuildParams): Promise<IOperations>;\n}\n\nexport interface IInsertOperationParams {\n id: string;\n index: string;\n data: GenericRecord;\n}\n\nexport type IModifyOperationParams = IInsertOperationParams;\n\nexport interface IDeleteOperationParams {\n id: string;\n index: string;\n}\n\nexport interface IOperations {\n items: GenericRecord[];\n total: number;\n clear(): void;\n insert(params: IInsertOperationParams): void;\n modify(params: IModifyOperationParams): void;\n delete(params: IDeleteOperationParams): void;\n}\n\nexport interface IDecompressor {\n decompress(data: GenericRecord): Promise<GenericRecord | null>;\n}\n\nexport interface Context extends ElasticsearchContext, Pick<LoggerContext, \"logger\"> {}\n"],"mappings":"","ignoreList":[]}
|