@exabugs/dynamodb-client 0.3.3 → 0.3.5

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/CHANGELOG.md CHANGED
@@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.5] - 2024-12-02
11
+
12
+ ### Changed
13
+
14
+ - **Shadow Records**: Removed `data` field from shadow records
15
+ - Shadow records now only contain `PK` and `SK` fields
16
+ - Record ID is extracted from `SK` (format: `{field}#{value}#id#{recordId}`)
17
+ - Reduces storage cost and simplifies data structure
18
+ - No functional changes - ID extraction logic remains the same
19
+
20
+ ## [0.3.4] - 2024-12-02
21
+
22
+ ### Removed
23
+
24
+ - **Metadata**: Removed internal metadata fields from records
25
+ - Removed `__shadowKeys` field (no longer needed with auto-shadow)
26
+ - Removed `__configVersion` field (no config file to track)
27
+ - Removed `__configHash` field (no config file to track)
28
+ - Records are now cleaner and contain only user data
29
+ - **Terraform**: Removed `shadow_config` output from Terraform module
30
+ - No longer needed with environment variable-based configuration
31
+
10
32
  ## [0.3.3] - 2024-12-02
11
33
 
12
34
  ### Fixed
@@ -1,5 +1,5 @@
1
- // @exabugs/dynamodb-client v0.3.3
2
- // Built: 2025-12-02T04:29:35.350Z
1
+ // @exabugs/dynamodb-client v0.3.5
2
+ // Built: 2025-12-02T05:16:09.491Z
3
3
  "use strict";
4
4
  var __create = Object.create;
5
5
  var __defProp = Object.defineProperty;
@@ -27808,8 +27808,7 @@ function generateShadowRecords(record, resourceName, config) {
27808
27808
  const sk = `${fieldName}#${formattedValue}#id#${record.id}`;
27809
27809
  shadows.push({
27810
27810
  PK: resourceName,
27811
- SK: sk,
27812
- data: { id: record.id }
27811
+ SK: sk
27813
27812
  });
27814
27813
  }
27815
27814
  return shadows;
@@ -29360,7 +29359,6 @@ async function handleInsertOne(resource, params, requestId) {
29360
29359
  recordData = addTTL(resource, recordData);
29361
29360
  const shadowConfig = getShadowConfig();
29362
29361
  const shadowRecords = generateShadowRecords(recordData, resource, shadowConfig);
29363
- const shadowKeys = shadowRecords.map((shadow) => shadow.SK);
29364
29362
  const mainSK = generateMainRecordSK(id);
29365
29363
  await executeDynamoDBOperation(
29366
29364
  () => dbClient2.send(
@@ -29369,10 +29367,7 @@ async function handleInsertOne(resource, params, requestId) {
29369
29367
  Item: {
29370
29368
  PK: resource,
29371
29369
  SK: mainSK,
29372
- data: {
29373
- ...recordData,
29374
- __shadowKeys: shadowKeys
29375
- }
29370
+ data: recordData
29376
29371
  }
29377
29372
  })
29378
29373
  ),
@@ -29393,9 +29388,9 @@ async function handleInsertOne(resource, params, requestId) {
29393
29388
  requestId,
29394
29389
  resource,
29395
29390
  id,
29396
- shadowCount: shadowKeys.length
29391
+ shadowCount: shadowRecords.length
29397
29392
  });
29398
- return removeShadowKeys(recordData);
29393
+ return recordData;
29399
29394
  }
29400
29395
  __name(handleInsertOne, "handleInsertOne");
29401
29396