create-sitecore-jss 22.5.0-beta.13 → 22.5.0-beta.14

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.
@@ -33,10 +33,8 @@ class PreviewModePlugin implements Plugin {
33
33
  } = context.previewData;
34
34
 
35
35
  const componentService = new RestComponentLayoutService({
36
- apiHost: config.sitecoreApiHost,
37
- apiKey: config.sitecoreApiKey,
38
- siteName: site,
39
- configurationName: config.layoutServiceConfigurationName,
36
+ sitecoreEdgeContextId: config.sitecoreEdgeContextId,
37
+ sitecoreEdgeUrl: config.sitecoreEdgeUrl,
40
38
  });
41
39
 
42
40
  const componentData = await componentService.fetchComponentData({
@@ -49,18 +47,18 @@ class PreviewModePlugin implements Plugin {
49
47
  version,
50
48
  });
51
49
 
52
- // we can reuse editing service, fortunately
53
- const dictionaryData = await graphQLEditingService.fetchDictionaryData({
54
- siteName: site,
55
- language,
56
- });
57
-
58
50
  if (!componentData) {
59
51
  throw new Error(
60
52
  `Unable to fetch editing data for preview ${JSON.stringify(context.previewData)}`
61
53
  );
62
54
  }
63
55
 
56
+ // we can reuse editing service, fortunately
57
+ const dictionaryData = await graphQLEditingService.fetchDictionaryData({
58
+ siteName: site,
59
+ language,
60
+ });
61
+
64
62
  props.locale = context.previewData.language;
65
63
  props.layoutData = componentData;
66
64
  props.headLinks = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sitecore-jss",
3
- "version": "22.5.0-beta.13",
3
+ "version": "22.5.0-beta.14",
4
4
  "description": "Sitecore JSS initializer",
5
5
  "bin": "./dist/index.js",
6
6
  "scripts": {
@@ -65,5 +65,5 @@
65
65
  "ts-node": "^10.9.1",
66
66
  "typescript": "~5.6.3"
67
67
  },
68
- "gitHead": "f0d317e3ed25fe96cb7d242d05e9c785bc8335c2"
68
+ "gitHead": "5d4ba1509f35d860a1920c2728fb203fbf11b2a5"
69
69
  }