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

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.
@@ -30,13 +30,12 @@ class PreviewModePlugin implements Plugin {
30
30
  renderingId,
31
31
  dataSourceId,
32
32
  version,
33
+ mode,
33
34
  } = context.previewData;
34
35
 
35
36
  const componentService = new RestComponentLayoutService({
36
- apiHost: config.sitecoreApiHost,
37
- apiKey: config.sitecoreApiKey,
38
- siteName: site,
39
- configurationName: config.layoutServiceConfigurationName,
37
+ sitecoreEdgeContextId: config.sitecoreEdgeContextId,
38
+ sitecoreEdgeUrl: config.sitecoreEdgeUrl,
40
39
  });
41
40
 
42
41
  const componentData = await componentService.fetchComponentData({
@@ -47,12 +46,7 @@ class PreviewModePlugin implements Plugin {
47
46
  renderingId,
48
47
  dataSourceId,
49
48
  version,
50
- });
51
-
52
- // we can reuse editing service, fortunately
53
- const dictionaryData = await graphQLEditingService.fetchDictionaryData({
54
- siteName: site,
55
- language,
49
+ mode,
56
50
  });
57
51
 
58
52
  if (!componentData) {
@@ -61,6 +55,12 @@ class PreviewModePlugin implements Plugin {
61
55
  );
62
56
  }
63
57
 
58
+ // we can reuse editing service, fortunately
59
+ const dictionaryData = await graphQLEditingService.fetchDictionaryData({
60
+ siteName: site,
61
+ language,
62
+ });
63
+
64
64
  props.locale = context.previewData.language;
65
65
  props.layoutData = componentData;
66
66
  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.15",
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": "c9ac450559f169083ee682bbdb562da14d948468"
69
69
  }