@adobe/spacecat-shared-content-client 1.0.6 → 1.0.8
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 +4 -4
- package/src/clients/content-client.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-content-client-v1.0.8](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.0.7...@adobe/spacecat-shared-content-client-v1.0.8) (2024-09-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* keep image in get and update page metadata table ([251a96c](https://github.com/adobe/spacecat-shared/commit/251a96cd61a55ab9e305babf68a3f5c3db273e39))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-content-client-v1.0.7](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.0.6...@adobe/spacecat-shared-content-client-v1.0.7) (2024-09-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update external fixes ([#369](https://github.com/adobe/spacecat-shared/issues/369)) ([5412d7b](https://github.com/adobe/spacecat-shared/commit/5412d7be554b9940d43b39b18f2913146e866846))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-content-client-v1.0.6](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.0.5...@adobe/spacecat-shared-content-client-v1.0.6) (2024-09-13)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-content-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Content Client",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@adobe/helix-universal": "5.0.5",
|
|
38
|
-
"@adobe/spacecat-helix-content-sdk": "1.1.
|
|
38
|
+
"@adobe/spacecat-helix-content-sdk": "1.1.10",
|
|
39
39
|
"@adobe/spacecat-shared-utils": "1.19.6"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"chai-as-promised": "8.0.0",
|
|
44
44
|
"esmock": "2.6.7",
|
|
45
45
|
"nock": "13.5.4",
|
|
46
|
-
"sinon": "18.0.
|
|
46
|
+
"sinon": "18.0.1",
|
|
47
47
|
"sinon-chai": "4.0.0",
|
|
48
|
-
"typescript": "5.
|
|
48
|
+
"typescript": "5.6.2"
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -91,8 +91,8 @@ const validateMetadata = (metadata) => {
|
|
|
91
91
|
throw new Error(`Metadata key ${key} must be a string`);
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
if (!hasText(value)) {
|
|
95
|
-
throw new Error(`Metadata value for key ${key} must be a
|
|
94
|
+
if (!hasText(value.value) || !hasText(value.type)) {
|
|
95
|
+
throw new Error(`Metadata value for key ${key} must be a object that has a value and type`);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
};
|
|
@@ -174,7 +174,7 @@ export default class ContentClient {
|
|
|
174
174
|
this.log.info(`Updating page metadata for ${this.site.getId()} and path ${path}`);
|
|
175
175
|
|
|
176
176
|
const docPath = this.#resolveDocPath(path);
|
|
177
|
-
const originalMetadata = await this.getPageMetadata(
|
|
177
|
+
const originalMetadata = await this.getPageMetadata(path);
|
|
178
178
|
|
|
179
179
|
let mergedMetadata;
|
|
180
180
|
if (overwrite) {
|