@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 +22 -0
- package/dist/server/handler.cjs +6 -11
- package/dist/server/handler.cjs.map +2 -2
- package/dist/server/operations/insertOne.d.ts.map +1 -1
- package/dist/server/operations/insertOne.js +6 -10
- package/dist/server/operations/insertOne.js.map +1 -1
- package/dist/server/shadow/generator.d.ts +4 -9
- package/dist/server/shadow/generator.d.ts.map +1 -1
- package/dist/server/shadow/generator.js +4 -5
- package/dist/server/shadow/generator.js.map +1 -1
- package/package.json +1 -1
- package/terraform/outputs.tf +0 -5
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
|
package/dist/server/handler.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
// @exabugs/dynamodb-client v0.3.
|
|
2
|
-
// Built: 2025-12-
|
|
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:
|
|
29391
|
+
shadowCount: shadowRecords.length
|
|
29397
29392
|
});
|
|
29398
|
-
return
|
|
29393
|
+
return recordData;
|
|
29399
29394
|
}
|
|
29400
29395
|
__name(handleInsertOne, "handleInsertOne");
|
|
29401
29396
|
|