@adobe/spacecat-shared-content-client 1.3.31 → 1.3.32

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.3.32](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.3.31...@adobe/spacecat-shared-content-client-v1.3.32) (2025-02-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * async call to content client ([#616](https://github.com/adobe/spacecat-shared/issues/616)) ([97479f9](https://github.com/adobe/spacecat-shared/commit/97479f90bff6b51bb122ad260a97b3b72abb3d2c))
7
+
1
8
  # [@adobe/spacecat-shared-content-client-v1.3.31](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.3.30...@adobe/spacecat-shared-content-client-v1.3.31) (2025-02-20)
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.3.31",
3
+ "version": "1.3.32",
4
4
  "description": "Shared modules of the Spacecat Services - Content Client",
5
5
  "type": "module",
6
6
  "engines": {
@@ -266,7 +266,7 @@ export default class ContentClient {
266
266
  this.log.info(`Getting page metadata for ${this.site.getId()} and path ${path}`);
267
267
 
268
268
  const docPath = this.#resolveDocPath(path);
269
- const document = this.rawClient.getDocument(docPath);
269
+ const document = await this.rawClient.getDocument(docPath);
270
270
  const metadata = await document.getMetadata();
271
271
 
272
272
  this.#logDuration('getPageMetadata', startTime);
@@ -286,7 +286,7 @@ export default class ContentClient {
286
286
  this.log.info(`Updating page metadata for ${this.site.getId()} and path ${path}`);
287
287
 
288
288
  const docPath = this.#resolveDocPath(path);
289
- const document = this.rawClient.getDocument(docPath);
289
+ const document = await this.rawClient.getDocument(docPath);
290
290
  const originalMetadata = await document.getMetadata();
291
291
 
292
292
  let mergedMetadata;
@@ -312,7 +312,7 @@ export default class ContentClient {
312
312
 
313
313
  this.log.info(`Getting redirects for ${this.site.getId()}`);
314
314
 
315
- const redirectsFile = this.rawClient.getRedirects();
315
+ const redirectsFile = await this.rawClient.getRedirects();
316
316
  const redirects = await redirectsFile.get();
317
317
  this.#logDuration('getRedirects', startTime);
318
318
 
@@ -328,7 +328,7 @@ export default class ContentClient {
328
328
 
329
329
  this.log.info(`Updating redirects for ${this.site.getId()}`);
330
330
 
331
- const redirectsFile = this.rawClient.getRedirects();
331
+ const redirectsFile = await this.rawClient.getRedirects();
332
332
  const currentRedirects = await redirectsFile.get();
333
333
  // validate combination of existing and new redirects
334
334
  const cleanNewRedirects = removeDuplicatedRedirects(currentRedirects, redirects, this.log);