@adobe/spacecat-shared-content-client 1.0.7 → 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 CHANGED
@@ -1,3 +1,10 @@
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
+
1
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)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-content-client",
3
- "version": "1.0.7",
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.8",
38
+ "@adobe/spacecat-helix-content-sdk": "1.1.10",
39
39
  "@adobe/spacecat-shared-utils": "1.19.6"
40
40
  },
41
41
  "devDependencies": {
@@ -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 string`);
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(docPath);
177
+ const originalMetadata = await this.getPageMetadata(path);
178
178
 
179
179
  let mergedMetadata;
180
180
  if (overwrite) {