@adobe/spacecat-shared-content-client 1.1.3 → 1.1.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 CHANGED
@@ -1,3 +1,18 @@
1
+ # [@adobe/spacecat-shared-content-client-v1.1.5](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.1.4...@adobe/spacecat-shared-content-client-v1.1.5) (2024-09-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * config and content client fixes ([9650742](https://github.com/adobe/spacecat-shared/commit/965074276cc93b8a6e9e382602670ae8a709d9bb))
7
+ * **deps:** update dependency @adobe/spacecat-helix-content-sdk to v1.1.14 ([#388](https://github.com/adobe/spacecat-shared/issues/388)) ([19322bb](https://github.com/adobe/spacecat-shared/commit/19322bb59269aed1e613739e3a5932c09ca1475e))
8
+
9
+ # [@adobe/spacecat-shared-content-client-v1.1.4](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.1.3...@adobe/spacecat-shared-content-client-v1.1.4) (2024-09-28)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **deps:** update dependency @adobe/spacecat-helix-content-sdk to v1.1.13 ([#386](https://github.com/adobe/spacecat-shared/issues/386)) ([299f9db](https://github.com/adobe/spacecat-shared/commit/299f9db7965b162a3a121b4fe7a828d7540df9bb))
15
+
1
16
  # [@adobe/spacecat-shared-content-client-v1.1.3](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-content-client-v1.1.2...@adobe/spacecat-shared-content-client-v1.1.3) (2024-09-22)
2
17
 
3
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-content-client",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
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.6",
38
- "@adobe/spacecat-helix-content-sdk": "1.1.12",
38
+ "@adobe/spacecat-helix-content-sdk": "1.1.14",
39
39
  "@adobe/spacecat-shared-utils": "1.19.6",
40
40
  "graph-data-structure": "4.0.0"
41
41
  },
@@ -58,7 +58,7 @@ const validateSite = (site) => {
58
58
  throw new Error('Site is required');
59
59
  }
60
60
 
61
- const contentSource = site.getConfig()?.content?.source;
61
+ const contentSource = site.getConfig()?.getHlxContentConfig()?.source;
62
62
  if (!isObject(contentSource)) {
63
63
  throw new Error('Site must have a valid content source');
64
64
  }
@@ -181,7 +181,7 @@ export default class ContentClient {
181
181
  const { log = console, env } = context;
182
182
 
183
183
  const config = {};
184
- const contentSourceType = site.getConfig().content?.source?.type;
184
+ const contentSourceType = site.getConfig()?.getHlxContentConfig()?.source?.type;
185
185
  const envMapping = SUPPORTED_CONTENT_SOURCES.get(contentSourceType);
186
186
 
187
187
  if (envMapping) {
@@ -195,11 +195,11 @@ export default class ContentClient {
195
195
 
196
196
  constructor(config, site, log) {
197
197
  validateSite(site);
198
- validateConfiguration(config, site.getConfig().content.source.type);
198
+ validateConfiguration(config, site.getConfig()?.getHlxContentConfig()?.source?.type);
199
199
 
200
200
  this.log = log;
201
201
  this.config = config;
202
- this.contentSource = site.getConfig().content.source;
202
+ this.contentSource = site.getConfig()?.getHlxContentConfig()?.source;
203
203
  this.site = site;
204
204
  this.rawClient = null;
205
205
  }