wirejs-deploy-amplify-basic 0.0.62-table-resource → 0.0.64-table-resource

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.
@@ -3,6 +3,6 @@
3
3
  "dependencies": {
4
4
  "jsdom": "^25.0.1",
5
5
  "wirejs-dom": "^1.0.38",
6
- "wirejs-resources": "^0.1.30-table-resource"
6
+ "wirejs-resources": "^0.1.32-table-resource"
7
7
  }
8
8
  }
@@ -1,5 +1,6 @@
1
1
  import { env } from 'process';
2
- import { DynamoDBClient, PutItemCommand, DeleteItemCommand, GetItemCommand, ScanCommand, QueryCommand, } from '@aws-sdk/client-dynamodb';
2
+ import { DynamoDBClient, DeleteItemCommand, } from '@aws-sdk/client-dynamodb';
3
+ import { PutCommand, GetCommand, QueryCommand, ScanCommand, } from '@aws-sdk/lib-dynamodb';
3
4
  import { Resource, } from 'wirejs-resources';
4
5
  import { addResource } from '../resource-collector.js';
5
6
  function isFieldComparison(filter) {
@@ -128,7 +129,7 @@ export class DistributedTable extends Resource {
128
129
  ...item,
129
130
  };
130
131
  console.log('Saving item to DynamoDB:', itemToSave);
131
- await this.ddbClient.send(new PutItemCommand({
132
+ await this.ddbClient.send(new PutCommand({
132
133
  TableName: this.table,
133
134
  Item: itemToSave,
134
135
  }));
@@ -152,7 +153,7 @@ export class DistributedTable extends Resource {
152
153
  async get(key) {
153
154
  const ddbKey = this.#getDDBKey(key);
154
155
  console.log('Getting item from DynamoDB:', ddbKey);
155
- const result = await this.ddbClient.send(new GetItemCommand({
156
+ const result = await this.ddbClient.send(new GetCommand({
156
157
  TableName: this.table,
157
158
  Key: ddbKey,
158
159
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wirejs-deploy-amplify-basic",
3
- "version": "0.0.62-table-resource",
3
+ "version": "0.0.64-table-resource",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -25,13 +25,14 @@
25
25
  "@aws-sdk/client-cognito-identity-provider": "^3.741.0",
26
26
  "@aws-sdk/client-dynamodb": "^3.774.0",
27
27
  "@aws-sdk/client-s3": "^3.738.0",
28
+ "@aws-sdk/lib-dynamodb": "^3.778.0",
28
29
  "copy": "^0.3.2",
29
30
  "esbuild": "^0.24.2",
30
31
  "jsdom": "^25.0.0",
31
32
  "recursive-copy": "^2.0.14",
32
33
  "rimraf": "^6.0.1",
33
34
  "wirejs-dom": "^1.0.38",
34
- "wirejs-resources": "^0.1.30-table-resource"
35
+ "wirejs-resources": "^0.1.32-table-resource"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@aws-amplify/backend": "^1.14.0",