create-sitecore-jss 22.3.1-canary.2 → 22.3.1-canary.4
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/common/processes/transform.js +6 -1
- package/dist/templates/angular/package.json +5 -5
- package/dist/templates/angular-xmcloud/README.md +12 -7
- package/dist/templates/nextjs/package.json +4 -4
- package/dist/templates/nextjs-styleguide/package.json +1 -1
- package/dist/templates/node-headless-ssr-experience-edge/package.json +2 -2
- package/dist/templates/node-headless-ssr-proxy/package.json +3 -3
- package/dist/templates/node-xmcloud-proxy/README.md +1 -1
- package/dist/templates/node-xmcloud-proxy/package.json +3 -3
- package/dist/templates/react/package.json +5 -5
- package/dist/templates/react-native/package.json +4 -4
- package/dist/templates/vue/package.json +4 -4
- package/package.json +4 -2
|
@@ -45,6 +45,7 @@ const ejs_1 = require("ejs");
|
|
|
45
45
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
46
46
|
const helpers_1 = require("../utils/helpers");
|
|
47
47
|
const diff_1 = require("diff");
|
|
48
|
+
const { version } = require('../../../package.json');
|
|
48
49
|
const FILE_FOR_COPY_REGEXP = /(index\.html)$|\.(gif|jpg|jpeg|tiff|png|svg|ashx|ico|pdf|jar|eot|woff|ttf|woff2)$/;
|
|
49
50
|
const transformFilename = (file, args) => {
|
|
50
51
|
// eslint-disable-next-line guard-for-in
|
|
@@ -182,7 +183,11 @@ const diffAndWriteFiles = (_a) => __awaiter(void 0, [_a], void 0, function* ({ r
|
|
|
182
183
|
exports.diffAndWriteFiles = diffAndWriteFiles;
|
|
183
184
|
const populateEjsData = (answers, destination) => {
|
|
184
185
|
// pass in helper to answers object
|
|
185
|
-
|
|
186
|
+
// Don't expose canary build number in the generated app
|
|
187
|
+
const jssVersion = version.includes('canary')
|
|
188
|
+
? version.replace(/(-canary\.\d+)$/, '-canary')
|
|
189
|
+
: version;
|
|
190
|
+
const ejsData = Object.assign(Object.assign({}, answers), { version: jssVersion, helper: {
|
|
186
191
|
isDev: (0, helpers_1.isDevEnvironment)(destination || answers.destination),
|
|
187
192
|
getPascalCaseName: helpers_1.getPascalCaseName,
|
|
188
193
|
getAppPrefix: helpers_1.getAppPrefix,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "<%- version %>",
|
|
4
4
|
"description": "Application utilizing Sitecore JavaScript Services and Angular (angular-cli).",
|
|
5
5
|
"config": {
|
|
6
6
|
"appName": "<%- appName %>",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@apollo/client": "^3.3.12",
|
|
58
58
|
"@ngx-translate/core": "~15.0.0",
|
|
59
59
|
"@ngx-translate/http-loader": "~8.0.0",
|
|
60
|
-
"@sitecore-jss/sitecore-jss-angular": "
|
|
60
|
+
"@sitecore-jss/sitecore-jss-angular": "~<%- version %>",
|
|
61
61
|
"apollo-angular": "~6.0.0",
|
|
62
62
|
"bootstrap": "^5.3.3",
|
|
63
63
|
"core-js": "~3.37.1",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"@angular/cli": "~17.3.8",
|
|
80
80
|
"@angular/compiler-cli": "~17.3.11",
|
|
81
81
|
"@angular/language-service": "~17.3.11",
|
|
82
|
-
"@sitecore-jss/sitecore-jss-angular-schematics": "
|
|
83
|
-
"@sitecore-jss/sitecore-jss-cli": "
|
|
84
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "
|
|
82
|
+
"@sitecore-jss/sitecore-jss-angular-schematics": "~<%- version %>",
|
|
83
|
+
"@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
|
|
84
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
|
|
85
85
|
"@types/jasmine": "~3.6.7",
|
|
86
86
|
"@types/jasminewd2": "~2.0.8",
|
|
87
87
|
"@types/node": "~22.9.0",
|
|
@@ -8,7 +8,7 @@ This Single Page Application (SPA) built with Angular is designed to be fully co
|
|
|
8
8
|
|
|
9
9
|
- `Context ID`: The Context ID environment variable simplifies setting up and configuring XM Cloud solutions. It's a unified identifier that maps to all your configured resources, such as content, sites, files, forms, and integration settings.
|
|
10
10
|
|
|
11
|
-
- `Pages
|
|
11
|
+
- `XM Cloud Pages editing integration`: full integration with Pages - the dynamic visual page editor of XM Cloud.
|
|
12
12
|
|
|
13
13
|
- `XM Cloud proxy personalization` with embedded personalization and A/B Component Test support.
|
|
14
14
|
|
|
@@ -43,13 +43,18 @@ The following environment variables can be set to configure the angular app. You
|
|
|
43
43
|
|
|
44
44
|
## Build & run
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
### Running the application in production mode
|
|
47
47
|
|
|
48
|
-
To run your app in production mode
|
|
48
|
+
To build and run in production mode you need to have your angular app side by side with the [Node XM CLoud proxy](https://github.com/Sitecore/jss/tree/dev/packages/create-sitecore-jss/src/templates/node-xmcloud-proxy). For additional information on how to set up and run SPA app in production mode against XM CLoud instance you can check the [spa-starters](https://github.com/sitecorelabs/xmcloud-foundation-head/tree/main/headapps/spa-starter) monoreopo readme.
|
|
49
49
|
|
|
50
|
-
1. Run `npm install`
|
|
50
|
+
1. Run `npm install` for both angular and proxy apps
|
|
51
|
+
2. Run `npm run build` in the angular app root; this will build the angular app and copy the the resulting `/dist` folder into the specified proxy app folder
|
|
52
|
+
3. Run `npm run start` in the proxy app root
|
|
53
|
+
|
|
54
|
+
### Running the application in connected mode
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
When building and running your app in connected mode the proxy application is not needed. However, please note that certain features, such as personalization, server-side rendering, and editing, will not be available.
|
|
53
57
|
|
|
54
|
-
|
|
55
|
-
|
|
58
|
+
1. Run `npm install`
|
|
59
|
+
2. Run `npm run build`
|
|
60
|
+
3. Run `npm run start:connected`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
3
|
"description": "Application utilizing Sitecore JavaScript Services and Next.js",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "<%- version %>",
|
|
5
5
|
"private": true,
|
|
6
6
|
"config": {
|
|
7
7
|
"appName": "<%- appName %>",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@sitecore-jss/sitecore-jss-nextjs": "
|
|
28
|
+
"@sitecore-jss/sitecore-jss-nextjs": "~<%- version %>",
|
|
29
29
|
"graphql": "~15.8.0",
|
|
30
30
|
"graphql-tag": "^2.12.6",
|
|
31
31
|
"next": "^14.2.18",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@graphql-codegen/typescript-operations": "^4.0.1",
|
|
44
44
|
"@graphql-codegen/typescript-resolvers": "^4.0.1",
|
|
45
45
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
46
|
-
"@sitecore-jss/sitecore-jss-cli": "
|
|
47
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "
|
|
46
|
+
"@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
|
|
47
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
|
|
48
48
|
"@types/node": "^22.9.0",
|
|
49
49
|
"@types/react": "^18.2.22",
|
|
50
50
|
"@types/react-dom": "^18.0.5",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-headless-ssr-experience-edge-sample",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "<%- version %>",
|
|
4
4
|
"description": "Node server-side-rendering sample for running JSS apps under Node hosting using Experience Edge",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "ts-node ./src/index.ts"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"homepage": "https://jss.sitecore.com",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sitecore-jss/sitecore-jss": "
|
|
22
|
+
"@sitecore-jss/sitecore-jss": "~<%- version %>",
|
|
23
23
|
"compression": "^1.7.4",
|
|
24
24
|
"express": "^4.18.2",
|
|
25
25
|
"dotenv": "^16.0.3"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-headless-ssr-proxy-sample",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "<%- version %>",
|
|
4
4
|
"description": "Node server-side-rendering proxy sample for running JSS apps under Node hosting",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "ts-node ./src/index.ts"
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"homepage": "https://jss.sitecore.com",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sitecore-jss/sitecore-jss": "
|
|
23
|
-
"@sitecore-jss/sitecore-jss-proxy": "
|
|
22
|
+
"@sitecore-jss/sitecore-jss": "~<%- version %>",
|
|
23
|
+
"@sitecore-jss/sitecore-jss-proxy": "~<%- version %>",
|
|
24
24
|
"agentkeepalive": "^4.2.1",
|
|
25
25
|
"compression": "~1.7.4",
|
|
26
26
|
"express": "~4.19.2",
|
|
@@ -12,7 +12,7 @@ This is a sample setup showing one of how you can configure XM Cloud rendering s
|
|
|
12
12
|
|
|
13
13
|
- `Context ID`: The Context ID environment variable simplifies setting up and configuring XM Cloud solutions. It's a unified identifier that maps to all your configured resources, such as content, sites, files, forms, and integration settings.
|
|
14
14
|
|
|
15
|
-
- `Pages
|
|
15
|
+
- `XM Cloud Pages editing integration`: full integration with Pages - the dynamic visual page editor of XM Cloud.
|
|
16
16
|
|
|
17
17
|
- `XM Cloud proxy personalization` with embedded personalization and A/B Component Test support.
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-xmcloud-sample",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "<%- version %>",
|
|
4
4
|
"description": "Node XM Cloud Proxy sample for running XM Cloud JSS SPA apps",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Sitecore Corporation",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"start": "ts-node ./src/index.ts"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sitecore-jss/sitecore-jss-proxy": "
|
|
13
|
+
"@sitecore-jss/sitecore-jss-proxy": "~<%- version %>",
|
|
14
14
|
"compression": "^1.7.4",
|
|
15
15
|
"express": "^4.18.2",
|
|
16
16
|
"dotenv": "^16.0.3",
|
|
17
17
|
"http-proxy-middleware": "^3.0.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@sitecore-jss/sitecore-jss": "
|
|
20
|
+
"@sitecore-jss/sitecore-jss": "~<%- version %>",
|
|
21
21
|
"@types/compression": "^1.7.2",
|
|
22
22
|
"@types/express": "^4.17.17",
|
|
23
23
|
"ts-node": "^10.9.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
3
|
"description": "Application utilizing Sitecore JavaScript Services and React (create-react-app).",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "<%- version %>",
|
|
5
5
|
"private": true,
|
|
6
6
|
"config": {
|
|
7
7
|
"appName": "<%- appName %>",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"license": "Apache-2.0",
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@apollo/client": "^3.7.1",
|
|
31
|
-
"@sitecore-jss/sitecore-jss-react": "
|
|
31
|
+
"@sitecore-jss/sitecore-jss-react": "~<%- version %>",
|
|
32
32
|
"axios": "^1.2.0",
|
|
33
33
|
"bootstrap": "^5.2.3",
|
|
34
34
|
"cross-fetch": "^3.1.5",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@babel/preset-env": "^7.20.2",
|
|
54
54
|
"@babel/preset-react": "^7.18.6",
|
|
55
55
|
"@babel/register": "~7.18.9",
|
|
56
|
-
"@sitecore-jss/sitecore-jss-cli": "
|
|
57
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "
|
|
58
|
-
"@sitecore-jss/sitecore-jss-rendering-host": "
|
|
56
|
+
"@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
|
|
57
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
|
|
58
|
+
"@sitecore-jss/sitecore-jss-rendering-host": "~<%- version %>",
|
|
59
59
|
"babel-loader": "~9.1.0",
|
|
60
60
|
"babel-preset-react-app": "~10.0.1",
|
|
61
61
|
"chalk": "~4.1.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "<%- version %>",
|
|
4
4
|
"description": "A basic React Native app utilizing Sitecore JavaScript Services",
|
|
5
5
|
"config": {
|
|
6
6
|
"appName": "<%- appName %>",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@react-native-community/masked-view": "^0.1.10",
|
|
26
|
-
"@sitecore-jss/sitecore-jss-react-native": "
|
|
26
|
+
"@sitecore-jss/sitecore-jss-react-native": "~<%- version %>",
|
|
27
27
|
"prop-types": "^15.6.0",
|
|
28
28
|
"react": "16.13.1",
|
|
29
29
|
"react-native": "^0.63.4",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"private": true,
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@sitecore-jss/sitecore-jss-cli": "
|
|
41
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "
|
|
40
|
+
"@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
|
|
41
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
|
|
42
42
|
"babel-core": "^6.26.0",
|
|
43
43
|
"babel-eslint": "^8.2.1",
|
|
44
44
|
"babel-plugin-inline-replace-variables": "^1.3.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "<%- appName %>",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "<%- version %>",
|
|
4
4
|
"description": "Application utilizing Sitecore JavaScript Services and Vue (vue-cli).",
|
|
5
5
|
"private": true,
|
|
6
6
|
"config": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@apollo/client": "^3.7.4",
|
|
47
47
|
"@panter/vue-i18next": "~0.15.2",
|
|
48
|
-
"@sitecore-jss/sitecore-jss-vue": "
|
|
48
|
+
"@sitecore-jss/sitecore-jss-vue": "~<%- version %>",
|
|
49
49
|
"@vue/apollo-composable": "4.2.1",
|
|
50
50
|
"@vue/apollo-option": "^4.0.0",
|
|
51
51
|
"@vue/apollo-ssr": "^4.0.0",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@babel/eslint-parser": "^7.19.1",
|
|
65
65
|
"@babel/register": "7.18.9",
|
|
66
|
-
"@sitecore-jss/sitecore-jss-cli": "
|
|
67
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "
|
|
66
|
+
"@sitecore-jss/sitecore-jss-cli": "~<%- version %>",
|
|
67
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "~<%- version %>",
|
|
68
68
|
"@vue/cli-plugin-babel": "~5.0.8",
|
|
69
69
|
"@vue/cli-plugin-eslint": "~5.0.8",
|
|
70
70
|
"@vue/cli-service": "~5.0.8",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.3.1-canary.
|
|
3
|
+
"version": "22.3.1-canary.4",
|
|
4
4
|
"description": "Sitecore JSS initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@types/minimist": "^1.2.2",
|
|
51
51
|
"@types/mocha": "^10.0.1",
|
|
52
52
|
"@types/node": "^22.9.0",
|
|
53
|
+
"@types/proxyquire": "^1.3.31",
|
|
53
54
|
"@types/sinon": "17.0.3",
|
|
54
55
|
"@types/sinon-chai": "^4.0.0",
|
|
55
56
|
"chai": "^4.3.7",
|
|
@@ -58,10 +59,11 @@
|
|
|
58
59
|
"eslint": "^8.56.0",
|
|
59
60
|
"mocha": "^10.2.0",
|
|
60
61
|
"nyc": "^15.1.0",
|
|
62
|
+
"proxyquire": "^2.1.3",
|
|
61
63
|
"sinon": "^18.0.0",
|
|
62
64
|
"sinon-chai": "^3.7.0",
|
|
63
65
|
"ts-node": "^10.9.1",
|
|
64
66
|
"typescript": "~5.6.3"
|
|
65
67
|
},
|
|
66
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "4c9c7a3ab03d414ac94967374ec5825743de96b3"
|
|
67
69
|
}
|