@travetto/model-dynamodb 5.0.0 → 5.0.1

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/service.ts +2 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-dynamodb",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "DynamoDB backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -25,12 +25,12 @@
25
25
  "directory": "module/model-dynamodb"
26
26
  },
27
27
  "dependencies": {
28
- "@aws-sdk/client-dynamodb": "^3.631.0",
29
- "@travetto/config": "^5.0.0",
30
- "@travetto/model": "^5.0.0"
28
+ "@aws-sdk/client-dynamodb": "^3.637.0",
29
+ "@travetto/config": "^5.0.1",
30
+ "@travetto/model": "^5.0.1"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/command": "^5.0.0"
33
+ "@travetto/command": "^5.0.1"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/command": {
package/src/service.ts CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  KeySchemaElement, PutItemCommandInput, PutItemCommandOutput
4
4
  } from '@aws-sdk/client-dynamodb';
5
5
 
6
- import { asFull, ShutdownManager, TimeUtil, type Class, type DeepPartial } from '@travetto/runtime';
6
+ import { ShutdownManager, TimeUtil, type Class, type DeepPartial } from '@travetto/runtime';
7
7
  import { Injectable } from '@travetto/di';
8
8
  import {
9
9
  ModelCrudSupport, ModelExpirySupport, ModelRegistry, ModelStorageSupport,
@@ -308,8 +308,7 @@ export class DynamoDBModelService implements ModelCrudSupport, ModelExpirySuppor
308
308
  async updatePartial<T extends ModelType>(cls: Class<T>, item: Partial<T> & { id: string }, view?: string): Promise<T> {
309
309
  ModelCrudUtil.ensureNotSubType(cls);
310
310
  const id = item.id;
311
- item = await ModelCrudUtil.naivePartialUpdate(cls, item, view, (): Promise<T> => this.get(cls, id));
312
- const itemAsT = asFull<T>(item);
311
+ const itemAsT = await ModelCrudUtil.naivePartialUpdate(cls, () => this.get(cls, id), item, view);
313
312
  await this.#putItem(cls, id, itemAsT, 'update');
314
313
  return itemAsT;
315
314
  }