diff --git a/patches/@typedorm+core+1.16.0-beta.2.patch b/patches/@typedorm+core+1.16.0-beta.2.patch deleted file mode 100644 index e7d6b7c..0000000 --- a/patches/@typedorm+core+1.16.0-beta.2.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff --git a/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.d.ts b/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.d.ts -index 36f6216..1663dec 100755 ---- a/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.d.ts -+++ b/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.d.ts -@@ -1,3 +1,4 @@ --import { WriteBatchCreate, WriteBatchDelete } from './write-batch'; -+import { WriteBatchCreate, WriteBatchPut, WriteBatchDelete} from './write-batch'; - export declare function isBatchAddCreateItem(item: any): item is WriteBatchCreate; -+export declare function isBatchAddPutItem(item: any): item is WriteBatchPut; - export declare function isBatchAddDeleteItem(item: any): item is WriteBatchDelete; -diff --git a/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.js b/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.js -index e5e4f53..51f1118 100755 ---- a/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.js -+++ b/node_modules/@typedorm/core/cjs/src/classes/batch/type-guards.js -@@ -6,6 +6,10 @@ function isBatchAddCreateItem(item) { - return !(0, common_1.isEmptyObject)(item) && !!item.create; - } - exports.isBatchAddCreateItem = isBatchAddCreateItem; -+function isBatchAddPutItem(item) { -+ return !(0, common_1.isEmptyObject)(item) && !!item.put; -+} -+exports.isBatchAddPutItem = isBatchAddPutItem; - function isBatchAddDeleteItem(item) { - return (!(0, common_1.isEmptyObject)(item) && - !!item.delete); -diff --git a/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.d.ts b/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.d.ts -index 7d946f1..422543c 100755 ---- a/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.d.ts -+++ b/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.d.ts -@@ -5,15 +5,21 @@ export interface WriteBatchCreate { - item: Entity; - }; - } -+export interface WriteBatchPut { -+ put: { -+ item: Entity; -+ }; -+} - export interface WriteBatchDelete { - delete: { - item: EntityTarget; - primaryKey: PrimaryKey; - }; - } --export type WriteBatchItem = WriteBatchCreate | WriteBatchDelete; -+export type WriteBatchItem = WriteBatchCreate | WriteBatchPut | WriteBatchDelete; - export declare class WriteBatch extends Batch> { - add(batchItems: WriteBatchItem[]): this; - addCreateItem(item: Entity): this; -+ addPutItem(item: Entity): this; - addDeleteItem>(item: EntityTarget, primaryKey: PrimaryKey): this; - } -diff --git a/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.js b/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.js -index e4fef33..45c51bd 100755 ---- a/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.js -+++ b/node_modules/@typedorm/core/cjs/src/classes/batch/write-batch.js -@@ -15,6 +15,14 @@ class WriteBatch extends batch_1.Batch { - }); - return this; - } -+ addPutItem(item) { -+ this.items.push({ -+ put: { -+ item, -+ }, -+ }); -+ return this; -+ } - addDeleteItem(item, primaryKey) { - this.items.push({ - delete: { -diff --git a/node_modules/@typedorm/core/cjs/src/classes/transformer/document-client-batch-transformer.js b/node_modules/@typedorm/core/cjs/src/classes/transformer/document-client-batch-transformer.js -index dc4383d..3305d76 100755 ---- a/node_modules/@typedorm/core/cjs/src/classes/transformer/document-client-batch-transformer.js -+++ b/node_modules/@typedorm/core/cjs/src/classes/transformer/document-client-batch-transformer.js -@@ -161,10 +161,16 @@ class DocumentClientBatchTransformer extends low_order_transformers_1.LowOrderTr - const namespaceId = (0, uuid_1.v4)(); - const itemTransformHashMap = new Map(); - return batchItems.reduce((acc, batchItem) => { -- // is create -- if ((0, type_guards_1.isBatchAddCreateItem)(batchItem)) { -+ // is create or put -+ if ((0, type_guards_1.isBatchAddCreateItem)(batchItem) || (0, type_guards_1.isBatchAddPutItem)(batchItem)) { - // transform put item -- const dynamoPutItem = this.toDynamoPutItem(batchItem.create.item, undefined, metadataOptions); -+ const dynamoPutItem = this.toDynamoPutItem( -+ (0, type_guards_1.isBatchAddPutItem)(batchItem) ? -+ batchItem.put.item : -+ batchItem.create.item, -+ { overwriteIfExists: (0, type_guards_1.isBatchAddPutItem)(batchItem) }, -+ metadataOptions -+ ); - if (!(0, type_guards_2.isWriteTransactionItemList)(dynamoPutItem)) { - const transformedWriteRequest = { - PutRequest: {