Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo sxastarter app #4

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
args:
PARENT_IMAGE: ${REGISTRY}${COMPOSE_PROJECT_NAME}-nodejs:${VERSION:-latest}
volumes:
- .\src\nextjs:C:\app
- .\src\sxastarter:C:\app
environment:
SITECORE_API_HOST: "http://cm"
NEXTJS_DIST_DIR: ".next-container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<sitecore>
<javaScriptServices>
<apps>
<app name="espire"
<app name="sxastarter"
deploymentSecret="xwf748xgtgko88jj7ls7pp6q2rr2bem6fmvmlipjcg"
debugSecurity="false"
/>
Expand Down
78 changes: 78 additions & 0 deletions src/sxastarter/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# For development purposes, note Next.js supports a .env.local
# file, which is already configured to be git ignored.
# Read more about Next.js support of environment variables here:
# https://nextjs.org/docs/basic-features/environment-variables

# The public URL to use for absolute URLs, which are required when
# the Next.js app is run within Sitecore editors.
# This should match the `serverSideRenderingEngineApplicationUrl`
# in your Sitecore configuration (see \sitecore\config\sxastarter.config).
# Be sure to update these values accordingly as your public endpoint changes.
# See https://jss.sitecore.com/docs/fundamentals/services/view-engine
PUBLIC_URL=http://localhost:3000

# To secure the Sitecore editor endpoint exposed by your Next.js app
# (`/api/editing/render` by default), a secret token is used. This (client-side)
# value must match your server-side value (see \sitecore\config\sxastarter.config).
# We recommend an alphanumeric value of at least 16 characters.
JSS_EDITING_SECRET=

# Your Sitecore API key is needed to build the app. Typically, the API key is
# defined in `scjssconfig.json` (as `sitecore.apiKey`). This file may not exist
# when building locally (if you've never run `jss setup`), or when building in a
# higher environment (since `scjssconfig.json` is ignored from source control).
# In this case, use this environment variable to provide the value at build time.
SITECORE_API_KEY=

# Your Sitecore API hostname is needed to build the app. Typically, the API host is
# defined in `scjssconfig.json` (as `sitecore.layoutServiceHost`). This file may
# not exist when building locally (if you've never run `jss setup`), or when building
# in a higher environment (since `scjssconfig.json` is ignored from source control).
# In this case, use this environment variable to provide the value at build time.
SITECORE_API_HOST=

# Your GraphQL Edge endpoint. This is required for Sitecore Experience Edge.
# For Sitecore XM, this is typically optional. By default, the endpoint is calculated using
# the resolved Sitecore API hostname + the `graphQLEndpointPath` defined in your `package.json`.
GRAPH_QL_ENDPOINT=

# Your default app language.
DEFAULT_LANGUAGE=

# The way in which layout and dictionary data is fetched from Sitecore
FETCH_WITH=GraphQL

# Indicates whether SSG `getStaticPaths` pre-render any pages
# Set the environment variable DISABLE_SSG_FETCH=true
# to enable full ISR (Incremental Static Regeneration) flow
DISABLE_SSG_FETCH=

# Sitecore JSS npm packages utilize the debug module for debug logging.
# https://www.npmjs.com/package/debug
# Set the DEBUG environment variable to 'sitecore-jss:*' to see all logs:
#DEBUG=sitecore-jss:*
# Or be selective and show for example only layout service logs:
#DEBUG=sitecore-jss:layout
# Or everything BUT layout service logs:
#DEBUG=sitecore-jss:*,-sitecore-jss:layout

# Your Sitecore CDP API target (specific to your data center region)
NEXT_PUBLIC_CDP_TARGET_URL=

# Your Sitecore CDP client key
NEXT_PUBLIC_CDP_CLIENT_KEY=

# An optional Sitecore Personalize scope identifier.
# This can be used to isolate personalization data when multiple XM Cloud Environments share a Personalize tenant.
# This should match the PAGES_PERSONALIZE_SCOPE environment variable for your connected XM Cloud Environment.
NEXT_PUBLIC_PERSONALIZE_SCOPE=

# Your Sitecore CDP point(s) of sale
# Can be provided as a single value (mypoint.com) or a multi-value JSON with locales ({"en":"en.mypoint.com","fr":"fr.mypoint.com"} etc)
NEXT_PUBLIC_CDP_POINTOFSALE=

# Timeout (ms) for Sitecore CDP requests to respond within. Default is 400.
PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT=

# Timeout (ms) for Sitecore Experience Edge requests to respond within. Default is 400.
PERSONALIZE_MIDDLEWARE_EDGE_TIMEOUT=
25 changes: 25 additions & 0 deletions src/sxastarter/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"root": true,
"extends": [
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:yaml/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"@typescript-eslint",
"prettier",
"yaml"
],
"ignorePatterns": [".generated/**/*", "**/*.d.ts", "**/*.js"],
"rules": {
"@next/next/no-img-element": "off", // Don't force next/image
"jsx-a11y/alt-text": ["warn", { "elements": ["img"] }], // Don't force alt for <Image/> (sourced from Sitecore media)
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "error",
"jsx-quotes": ["error", "prefer-double"]
}
}
11 changes: 11 additions & 0 deletions src/sxastarter/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Line endings for this repository
# See: https://help.github.com/en/articles/configuring-git-to-handle-line-endings
# This should line up with the expectations from .eslintrc

# Set the default behavior, in case people don't have core.autocrlf set.
* text=crlf

# Declare files that will always have CRLF line endings on checkout.
*.ts text eol=crlf
*.tsx text eol=crlf
*.js text eol=crlf
33 changes: 33 additions & 0 deletions src/sxastarter/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# next.js
/.next*/
/out/

# graphql code generation
/.generated
*.graphql.d.ts
*.graphqls.d.ts

# misc
.DS_Store

# local env files
.env.local
.env.*.local

# Log files
*.log*

# sitecore
scjssconfig.json
*.deploysecret.config

# vercel
.vercel
8 changes: 8 additions & 0 deletions src/sxastarter/.graphql-let.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema:
- './src/temp/GraphQLIntrospectionResult.json'
documents: 'src/**/*.graphql'
plugins:
- typescript-operations
- typed-document-node
config:
useIndexSignature: true
1 change: 1 addition & 0 deletions src/sxastarter/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
8 changes: 8 additions & 0 deletions src/sxastarter/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"endOfLine": "crlf",
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100
}
9 changes: 9 additions & 0 deletions src/sxastarter/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"GraphQL.vscode-graphql",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"mikestead.dotenv",
"redhat.vscode-yaml",
]
}
15 changes: 15 additions & 0 deletions src/sxastarter/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"skipFiles": ["<node_internals>/**"],
"port": 9229
}
]
}
Loading