@adobe/spacecat-shared-data-access 2.0.1 → 2.0.3
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 +14 -0
- package/package.json +2 -2
- package/src/models/api-key/api-key.schema.js +6 -0
- package/src/util/patcher.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-data-access-v2.0.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.0.2...@adobe/spacecat-shared-data-access-v2.0.3) (2025-01-16)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* branch protection / npm cache / deps ([#545](https://github.com/adobe/spacecat-shared/issues/545)) ([004de60](https://github.com/adobe/spacecat-shared/commit/004de60b05b5039590f92ed8f7117725f6e4df41))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-data-access-v2.0.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.0.1...@adobe/spacecat-shared-data-access-v2.0.2) (2025-01-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* patcher should use schema getter, schema omissions ([#539](https://github.com/adobe/spacecat-shared/issues/539)) ([b14b469](https://github.com/adobe/spacecat-shared/commit/b14b469d3714795c6291ddcf742c38abd94250e6))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-data-access-v2.0.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.0.0...@adobe/spacecat-shared-data-access-v2.0.1) (2025-01-12)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-data-access",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Data Access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@adobe/spacecat-shared-utils": "1.26.
|
|
37
|
+
"@adobe/spacecat-shared-utils": "1.26.4",
|
|
38
38
|
"@aws-sdk/client-dynamodb": "3.726.1",
|
|
39
39
|
"@aws-sdk/lib-dynamodb": "3.726.1",
|
|
40
40
|
"@types/joi": "17.2.3",
|
package/src/util/patcher.js
CHANGED
|
@@ -122,15 +122,16 @@ class Patcher {
|
|
|
122
122
|
#set(attribute, value) {
|
|
123
123
|
this.patchRecord = this.#getPatchRecord().set({ [attribute.name]: value });
|
|
124
124
|
|
|
125
|
+
const transmutedValue = attribute.get(value);
|
|
125
126
|
const update = {
|
|
126
127
|
[attribute.name]: {
|
|
127
128
|
previous: this.record[attribute.name],
|
|
128
|
-
current:
|
|
129
|
+
current: transmutedValue,
|
|
129
130
|
},
|
|
130
131
|
};
|
|
131
132
|
|
|
132
133
|
// update the record with the update value for later save
|
|
133
|
-
this.record[attribute.name] =
|
|
134
|
+
this.record[attribute.name] = transmutedValue;
|
|
134
135
|
|
|
135
136
|
// remember the update operation with the previous and current value
|
|
136
137
|
this.updates = { ...this.updates, ...update };
|