Skip to content

Commit db0c6a0

Browse files
committed
Resolved build failures-VI
1 parent 96c89cc commit db0c6a0

File tree

10 files changed

+10744
-10284
lines changed

10 files changed

+10744
-10284
lines changed

headapps/Sugcon2024/package-lock.json

Lines changed: 10717 additions & 10266 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

headapps/Sugcon2024/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
"@fortawesome/free-regular-svg-icons": "^6.5.1",
4141
"@fortawesome/free-solid-svg-icons": "^6.5.1",
4242
"@fortawesome/react-fontawesome": "^0.2.0",
43+
"@mdx-js/react": "^3.1.1",
4344
"@next/third-parties": "^15.4.1",
4445
"@sitecore-cloudsdk/events": "^0.5.4",
4546
"@sitecore-cloudsdk/personalize": "^0.5.4",
4647
"@sitecore-feaas/clientside": "^0.5.5",
4748
"@sitecore-jss/sitecore-jss-nextjs": "~22.9.0",
48-
"@sitecore/engage": "^1.4.1",
49+
"@sitecore/engage": "^1.4.3",
4950
"@types/react-slick": "^0.23.13",
5051
"bootstrap": "^5.1.3",
5152
"cheerio": "^1.0.0-rc.12",
@@ -66,7 +67,7 @@
6667
"swr": "^2.2.5"
6768
},
6869
"devDependencies": {
69-
"@graphql-codegen/cli": "^1.21.8",
70+
"@graphql-codegen/cli": "^6.0.0",
7071
"@graphql-codegen/import-types-preset": "^2.2.6",
7172
"@graphql-codegen/plugin-helpers": "^3.1.2",
7273
"@graphql-codegen/typed-document-node": "^2.3.12",
@@ -103,13 +104,13 @@
103104
"eslint-plugin-react": "^7.32.1",
104105
"eslint-plugin-storybook": "^0.6.15",
105106
"eslint-plugin-yaml": "^0.5.0",
106-
"graphql-let": "^0.18.6",
107+
"graphql-let": "^0.18.4",
107108
"npm-run-all": "~4.1.5",
108109
"prettier": "^2.8.3",
109110
"storybook": "^8.2.9",
110111
"ts-node": "^10.9.1",
111112
"tsconfig-paths": "^4.1.2",
112-
"typescript": "~4.9.4",
113+
"typescript": "^5.9.2",
113114
"yaml-loader": "^0.8.0"
114115
},
115116
"overrides": {

headapps/Sugcon2024/src/components/Basic Components/ErrorMessage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { Box, Heading, Text, Flex } from '@chakra-ui/react';
32
import {
43
TextField,

headapps/Sugcon2024/src/components/CdpPageView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ import { siteResolver } from 'lib/site-resolver';
1515
* See Sitecore Engage SDK documentation for details.
1616
* https://www.npmjs.com/package/@sitecore/engage
1717
*/
18+
const resolvePointOfSale = (site: SiteInfo, language: string): string => {
19+
return `${site.name}_${language}`;
20+
};
21+
1822
const CdpPageView = (): JSX.Element => {
1923
const {
2024
sitecoreContext: { pageState, route, variantId, site },
2125
} = useSitecoreContext();
2226

23-
const resolvePointOfSale = (site: SiteInfo, language: string): string => {
24-
return `${site.name}_${language}`;
25-
};
26-
2727
/**
2828
* Creates a page view event using the Sitecore Engage SDK.
2929
*/

headapps/Sugcon2024/src/components/ColumnSplitter.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import {
32
ComponentParams,
43
ComponentRendering,

headapps/Sugcon2024/src/components/Events/Sessions.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { Field, withDatasourceCheck } from '@sitecore-jss/sitecore-jss-nextjs';
32
import useSWR from 'swr';
43
import clsx from 'clsx';

headapps/Sugcon2024/src/lib/middleware/plugins/personalize.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ class PersonalizePlugin implements MiddlewarePlugin {
3232
},
3333
// Configuration for your Sitecore CDP endpoint
3434
cdpConfig: {
35-
sitecoreEdgeContextId: process.env.NEXT_PUBLIC_CDP_CONTEXT_ID || '',
35+
sitecoreEdgeContextId: process.env.NEXT_PUBLIC_CDP_CONTEXT_ID
36+
? process.env.NEXT_PUBLIC_CDP_CONTEXT_ID
37+
: (() => {
38+
throw new Error(
39+
'Environment variable NEXT_PUBLIC_CDP_CONTEXT_ID is required but not set.'
40+
);
41+
})(),
3642
sitecoreEdgeUrl:
3743
process.env.NEXT_PUBLIC_CDP_EDGE_URL || 'https://edge-platform.sitecorecloud.io',
3844
channel: process.env.NEXT_PUBLIC_CDP_CHANNEL || 'WEB',

headapps/Sugcon2024/src/lib/page-props-factory/plugins/feaas-themes.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ class FEeaSThemesPlugin implements Plugin {
66
order = 2;
77

88
async exec(props: SitecorePageProps) {
9+
const contextId = process.env.SITECORE_EDGE_CONTEXT_ID;
10+
if (!contextId) {
11+
throw new Error('Environment variable SITECORE_EDGE_CONTEXT_ID is required but not set.');
12+
}
913
// Collect FEAAS themes
1014
props.headLinks.push(
1115
...getDesignLibraryStylesheetLinks(
1216
props.layoutData,
13-
process.env.SITECORE_EDGE_CONTEXT_ID || ''
17+
contextId
1418
)
1519
);
1620

headapps/Sugcon2024/src/pages/[[...path]].tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useEffect } from 'react';
2+
import { JSX } from 'react';
23
import { GetStaticPaths, GetStaticProps } from 'next';
34
import NotFound from 'src/NotFound';
45
import Layout from 'src/Layout';

headapps/Sugcon2024/tsconfig.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
"temp/*": ["src/temp/*"],
88
"assets/*": ["src/assets/*"],
99
"template/*": ["src/components/Templates/*"],
10-
"graphql-types": ["node_modules/@types/graphql-let/__generated__/__types__"],
11-
"react": ["node_modules/@types/react"]
10+
"graphql-types": ["node_modules/@types/graphql-let/__generated__/__types__"]
1211
},
1312
"target": "es5",
1413
"lib": ["dom", "dom.iterable", "esnext"],
@@ -23,17 +22,18 @@
2322
"moduleResolution": "node",
2423
"resolveJsonModule": true,
2524
"isolatedModules": true,
26-
"jsx": "preserve",
25+
"jsx": "react-jsx",
2726
"allowSyntheticDefaultImports": true,
2827
"noImplicitReturns": true,
2928
"noImplicitAny": true,
3029
"noImplicitThis": true,
3130
"noUnusedLocals": true,
3231
"noUnusedParameters": true,
3332
"incremental": true,
34-
"forceConsistentCasingInFileNames": false
33+
"forceConsistentCasingInFileNames": false,
34+
"typeRoots": ["node_modules/@types", "src/types"],
35+
"types": ["node", "react", "react-dom", "aria-query", "mdx"]
3536
},
3637
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
3738
"exclude": ["node_modules"]
3839
}
39-

0 commit comments

Comments
 (0)