create-sitecore-jss 22.2.0-canary.21 → 22.2.0-canary.23

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.
@@ -20,6 +20,9 @@ const chalk_1 = __importDefault(require("chalk"));
20
20
  * @param {string[]} nextStepsArr next steps to be performed after app is created
21
21
  */
22
22
  const nextSteps = (appNames, nextStepsArr) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const successMessage = appNames.length > 1
24
+ ? `JSS applications ${chalk_1.default.green(appNames.join(', '))} are ready!`
25
+ : `JSS application ${chalk_1.default.green(appNames[0])} is ready!`;
23
26
  console.log(chalk_1.default.red(' -/oyhdmNNNNmdhyo/- '));
24
27
  console.log(chalk_1.default.red(' :sdMMMMMMMMMMMMMMMMMMMMds: '));
25
28
  console.log(chalk_1.default.red(' :yNMMMMMMMMMMMMMMMMMMMMMMMMMMNy: '));
@@ -51,7 +54,7 @@ const nextSteps = (appNames, nextStepsArr) => __awaiter(void 0, void 0, void 0,
51
54
  console.log(chalk_1.default.white(' / // /\\ \\_\\ \\ '));
52
55
  console.log(chalk_1.default.white(' \\___/___/___/'));
53
56
  console.log();
54
- console.log(`JSS application(s) ${chalk_1.default.green(appNames.join(', '))} ${appNames.length > 1 ? 'are' : 'is'} ready!`);
57
+ console.log(successMessage);
55
58
  console.log();
56
59
  console.log(chalk_1.default.yellow('Next steps:'));
57
60
  nextStepsArr.forEach((step) => {
@@ -48,7 +48,7 @@ export const getGraphQLClientFactoryConfig = () => {
48
48
  }
49
49
  }
50
50
 
51
- if (!clientConfig.endpoint) {
51
+ if (!clientConfig?.endpoint) {
52
52
  throw new Error(
53
53
  'Please configure either your sitecoreEdgeContextId, or your graphQLEndpoint and sitecoreApiKey.'
54
54
  );
@@ -5,7 +5,13 @@ import { Config, ServerBundle } from './types';
5
5
  */
6
6
  const bundlePath = process.env.PROXY_BUNDLE_PATH || '../dist/server.bundle';
7
7
 
8
- const serverBundle: ServerBundle = require(bundlePath);
8
+ let serverBundle: ServerBundle;
9
+
10
+ try {
11
+ serverBundle = require(bundlePath);
12
+ } catch (error) {
13
+ throw new Error(`ERROR: The server.bundle.js error. ${error}`);
14
+ }
9
15
 
10
16
  export const config: Config = {
11
17
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sitecore-jss",
3
- "version": "22.2.0-canary.21",
3
+ "version": "22.2.0-canary.23",
4
4
  "description": "Sitecore JSS initializer",
5
5
  "bin": "./dist/index.js",
6
6
  "scripts": {
@@ -63,5 +63,5 @@
63
63
  "ts-node": "^10.9.1",
64
64
  "typescript": "~4.9.5"
65
65
  },
66
- "gitHead": "a422356e849b61d67b535bac447e78606b5f65ab"
66
+ "gitHead": "fcaf928234e66925c04d56ac7d062338c23fe010"
67
67
  }