create-content-sdk-app 1.4.0-canary.17 → 1.4.0-canary.18
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/dist/templates/nextjs/next.config.js +0 -3
- package/dist/templates/nextjs/package.json +2 -2
- package/dist/templates/nextjs/src/Bootstrap.tsx +2 -2
- package/dist/templates/nextjs/src/byoc/index.tsx +1 -1
- package/dist/templates/nextjs/src/components/content-sdk/CdpPageView.tsx +4 -5
- package/dist/templates/nextjs-app-router/.sitecore/import-map.server.ts +2 -2
- package/dist/templates/nextjs-app-router/package.json +2 -2
- package/dist/templates/nextjs-app-router/src/Bootstrap.tsx +2 -2
- package/dist/templates/nextjs-app-router/src/byoc/index.tsx +1 -1
- package/dist/templates/nextjs-app-router/src/components/content-sdk/CdpPageView.tsx +4 -5
- package/package.json +2 -2
|
@@ -101,9 +101,6 @@ const nextConfig = {
|
|
|
101
101
|
config.externals = ['vertx', ...config.externals];
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
config.resolve.alias['@sitecore-cloudsdk/events'] = path.resolve(
|
|
105
|
-
process.cwd(), './node_modules/@sitecore-cloudsdk/events'
|
|
106
|
-
);
|
|
107
104
|
config.resolve.alias['@sitecore-feaas/clientside/react'] = path.resolve(
|
|
108
105
|
process.cwd(), options.isServer ?
|
|
109
106
|
'./node_modules/@sitecore-feaas/clientside/dist/node/react.cjs' :
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@sitecore-
|
|
26
|
-
"@sitecore-
|
|
25
|
+
"@sitecore-content-sdk/analytics-core": "<%- version %>",
|
|
26
|
+
"@sitecore-content-sdk/events": "<%- version %>",
|
|
27
27
|
"@sitecore-content-sdk/nextjs": "<%- version %>",
|
|
28
28
|
"@sitecore-feaas/clientside": "^0.6.0",
|
|
29
29
|
"@sitecore/components": "~2.1.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, JSX } from 'react';
|
|
2
|
-
import { CloudSDK } from '@sitecore-
|
|
2
|
+
import { CloudSDK } from '@sitecore-content-sdk/analytics-core/browser';
|
|
3
3
|
import { SitecorePageProps } from '@sitecore-content-sdk/nextjs';
|
|
4
|
-
import '@sitecore-
|
|
4
|
+
import '@sitecore-content-sdk/events/browser';
|
|
5
5
|
import config from 'sitecore.config';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { JSX } from 'react';
|
|
2
2
|
import * as FEAAS from '@sitecore-feaas/clientside/react';
|
|
3
|
-
import * as Events from '@sitecore-
|
|
3
|
+
import * as Events from '@sitecore-content-sdk/events/browser';
|
|
4
4
|
import { LayoutServicePageState, SitecoreProviderReactContext } from '@sitecore-content-sdk/nextjs';
|
|
5
5
|
import '@sitecore/components/context';
|
|
6
6
|
import dynamic from 'next/dynamic';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { CdpHelper, useSitecore } from '@sitecore-content-sdk/nextjs';
|
|
2
2
|
import { useEffect } from 'react';
|
|
3
|
-
import { pageView } from '@sitecore-
|
|
3
|
+
import { pageView } from '@sitecore-content-sdk/events/browser';
|
|
4
4
|
import config from 'sitecore.config';
|
|
5
5
|
import { JSX } from 'react';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* This is the CDP page view component.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* https://www.npmjs.com/package/@sitecore-cloudsdk/events
|
|
9
|
+
* See Sitecore Content SDK documentation for details.
|
|
10
|
+
* https://www.npmjs.com/package/@sitecore-content-sdk/events
|
|
12
11
|
*/
|
|
13
12
|
const CdpPageView = (): JSX.Element => {
|
|
14
13
|
const {
|
|
@@ -51,7 +50,7 @@ const CdpPageView = (): JSX.Element => {
|
|
|
51
50
|
page: route.name,
|
|
52
51
|
pageVariantId,
|
|
53
52
|
language,
|
|
54
|
-
}).catch(e => console.debug(e));
|
|
53
|
+
}).catch((e) => console.debug(e));
|
|
55
54
|
}, [mode, route, context.variantId, siteName]);
|
|
56
55
|
|
|
57
56
|
return <></>;
|
|
@@ -16,7 +16,7 @@ import { Suspense } from 'react';
|
|
|
16
16
|
import React from 'react';
|
|
17
17
|
import { componentMap } from '.sitecore/component-map';
|
|
18
18
|
import client from 'src/lib/sitecore-client';
|
|
19
|
-
import { pageView } from '@sitecore-
|
|
19
|
+
import { pageView } from '@sitecore-content-sdk/events/browser';
|
|
20
20
|
import config from 'sitecore.config';
|
|
21
21
|
|
|
22
22
|
const importMapServer = [
|
|
@@ -48,7 +48,7 @@ const importMapServer = [
|
|
|
48
48
|
exports: [{ name: 'default', value: client }],
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
module: '@sitecore-
|
|
51
|
+
module: '@sitecore-content-sdk/events/browser',
|
|
52
52
|
exports: [{ name: 'pageView', value: pageView }],
|
|
53
53
|
},
|
|
54
54
|
{
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"start": "cross-env-shell NODE_ENV=production npm-run-all --serial build next:start"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sitecore-
|
|
32
|
-
"@sitecore-
|
|
31
|
+
"@sitecore-content-sdk/analytics-core": "<%- version %>",
|
|
32
|
+
"@sitecore-content-sdk/events": "<%- version %>",
|
|
33
33
|
"@sitecore-content-sdk/nextjs": "<%- version %>",
|
|
34
34
|
"@sitecore-feaas/clientside": "^0.6.0",
|
|
35
35
|
"@sitecore/components": "~2.1.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useEffect, JSX } from 'react';
|
|
3
|
-
import { CloudSDK } from '@sitecore-
|
|
4
|
-
import '@sitecore-
|
|
3
|
+
import { CloudSDK } from '@sitecore-content-sdk/analytics-core/browser';
|
|
4
|
+
import '@sitecore-content-sdk/events/browser';
|
|
5
5
|
import config from 'sitecore.config';
|
|
6
6
|
|
|
7
7
|
const Bootstrap = ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { JSX } from 'react';
|
|
2
2
|
import * as FEAAS from '@sitecore-feaas/clientside/react';
|
|
3
|
-
import * as Events from '@sitecore-
|
|
3
|
+
import * as Events from '@sitecore-content-sdk/events/browser';
|
|
4
4
|
import { LayoutServicePageState, SitecoreProviderReactContext } from '@sitecore-content-sdk/nextjs';
|
|
5
5
|
import '@sitecore/components/context';
|
|
6
6
|
import dynamic from 'next/dynamic';
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { CdpHelper, useSitecore } from '@sitecore-content-sdk/nextjs';
|
|
3
|
-
import { useEffect
|
|
4
|
-
import { pageView } from '@sitecore-
|
|
3
|
+
import React, { useEffect } from 'react';
|
|
4
|
+
import { pageView } from '@sitecore-content-sdk/events/browser';
|
|
5
5
|
import config from 'sitecore.config';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* This is the CDP page view component.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* https://www.npmjs.com/package/@sitecore-cloudsdk/events
|
|
9
|
+
* See Sitecore Content SDK documentation for details.
|
|
10
|
+
* https://www.npmjs.com/package/@sitecore-content-sdk/events
|
|
12
11
|
*/
|
|
13
12
|
const CdpPageView = (): JSX.Element => {
|
|
14
13
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-content-sdk-app",
|
|
3
|
-
"version": "1.4.0-canary.
|
|
3
|
+
"version": "1.4.0-canary.18",
|
|
4
4
|
"description": "Sitecore Content SDK initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"ts-node": "^10.9.2",
|
|
71
71
|
"typescript": "~5.8.3"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "d79565aaf6fef2b194973aa3c5bb797d0e432302"
|
|
74
74
|
}
|