@contentful/create-contentful-app 1.3.0 → 1.3.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/README.md CHANGED
@@ -17,7 +17,7 @@ To start developing your first app, run:
17
17
  npx create-contentful-app my-first-app
18
18
  ```
19
19
 
20
- ![Screenshot of `npx create-contentful-app my-app`](./docs/screenshot.png)
20
+ ![Screenshot of `npx create-contentful-app my-app`](https://raw.githubusercontent.com/contentful/create-contentful-app/master/packages/contentful--create-contentful-app/docs/screenshot.png)
21
21
 
22
22
  ## Bootstrap
23
23
 
package/lib/index.js CHANGED
@@ -94,7 +94,7 @@ function initProject(appName, options) {
94
94
  successMessage(fullAppFolder);
95
95
  }
96
96
  catch (err) {
97
- (0, logger_1.error)(`Failed to create ${appName}`, err instanceof Error ? err : String(err));
97
+ (0, logger_1.error)(`Failed to create ${appName}`, err);
98
98
  process.exit(1);
99
99
  }
100
100
  });
package/lib/logger.js CHANGED
@@ -10,15 +10,18 @@ function warn(message) {
10
10
  }
11
11
  exports.warn = warn;
12
12
  function error(message, error) {
13
- if (error instanceof Error) {
14
- console.log(`${chalk_1.default.red('Error:')} ${message}\n`);
13
+ console.log(`${chalk_1.default.red('Error:')} ${message}`);
14
+ if (error === undefined) {
15
+ return;
16
+ }
17
+ else if (error instanceof Error) {
18
+ console.log();
15
19
  console.log(error);
16
20
  }
17
21
  else {
18
- console.log(`${chalk_1.default.red('Error:')} ${message}
19
-
20
- ${error.startsWith('Error: ') ? error.substring(7) : error}
21
- `);
22
+ const strigifiedError = String(error);
23
+ console.log();
24
+ console.log(`${strigifiedError.startsWith('Error: ') ? strigifiedError.substring(7) : strigifiedError}`);
22
25
  }
23
26
  }
24
27
  exports.error = error;
package/lib/utils.js CHANGED
@@ -8,7 +8,7 @@ const logger_1 = require("./logger");
8
8
  const MUTUALLY_EXCLUSIVE_OPTIONS = ['source', 'example', 'javascript', 'typescript'];
9
9
  function exec(command, args, options) {
10
10
  return new Promise((resolve, reject) => {
11
- const process = (0, child_process_1.spawn)(command, args, Object.assign({ stdio: 'inherit' }, options));
11
+ const process = (0, child_process_1.spawn)(command, args, Object.assign({ stdio: 'inherit', shell: true }, options));
12
12
  process.on('exit', (exitCode) => {
13
13
  if (exitCode === 0) {
14
14
  resolve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/create-contentful-app",
3
- "version": "1.3.0",
3
+ "version": "1.3.4",
4
4
  "description": "A template for building Contentful Apps",
5
5
  "keywords": [
6
6
  "contentful",
@@ -35,7 +35,7 @@
35
35
  "build": "tsc"
36
36
  },
37
37
  "dependencies": {
38
- "@contentful/app-scripts": "^1.0.2",
38
+ "@contentful/app-scripts": "1.1.2",
39
39
  "chalk": "^4.1.0",
40
40
  "commander": "^9.0.0",
41
41
  "degit": "2.8.4",
@@ -64,5 +64,5 @@
64
64
  "@types/tildify": "^2.0.2",
65
65
  "@types/validate-npm-package-name": "^3.0.3"
66
66
  },
67
- "gitHead": "8850036ca478b6e860ca53976f9167fae97f7381"
67
+ "gitHead": "36e8af239a193298f18bc7aefceea53cc6d9bb97"
68
68
  }