@anansi/cli 1.1.55 → 1.1.58

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/package.json +2 -2
  3. package/run.js +15 -12
package/CHANGELOG.md CHANGED
@@ -3,6 +3,31 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ### [1.1.58](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.57...@anansi/cli@1.1.58) (2022-04-08)
7
+
8
+ **Note:** Version bump only for package @anansi/cli
9
+
10
+
11
+
12
+
13
+
14
+ ### [1.1.57](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.55...@anansi/cli@1.1.57) (2022-04-02)
15
+
16
+
17
+ ### 💅 Enhancement
18
+
19
+ * Better handling of Ctrl+C (SIGNINT) ([42e732d](https://github.com/ntucker/anansi/commit/42e732d88045f07363dcc8fe893f5d4266cd65fd))
20
+
21
+
22
+
23
+ ### [1.1.56](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.55...@anansi/cli@1.1.56) (2022-03-30)
24
+
25
+ **Note:** Version bump only for package @anansi/cli
26
+
27
+
28
+
29
+
30
+
6
31
  ### [1.1.55](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.54...@anansi/cli@1.1.55) (2022-03-30)
7
32
 
8
33
  **Note:** Version bump only for package @anansi/cli
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anansi/cli",
3
- "version": "1.1.55",
3
+ "version": "1.1.58",
4
4
  "description": "Fast React Web Apps",
5
5
  "homepage": "https://github.com/ntucker/anansi/tree/master/packages/cli#readme",
6
6
  "repository": {
@@ -51,7 +51,7 @@
51
51
  "npm": ">= 6.0.0"
52
52
  },
53
53
  "dependencies": {
54
- "@anansi/generator-js": "^7.3.9",
54
+ "@anansi/generator-js": "^7.3.12",
55
55
  "bin-version-check": "^4.0.0",
56
56
  "chalk": "^4.1.2",
57
57
  "commander": "^9.1.0",
package/run.js CHANGED
@@ -28,17 +28,19 @@ program
28
28
  }
29
29
  try {
30
30
  const cwd = options.dir || `./${projectName}`;
31
- await Promise.all([
32
- verifyAndPrompt(),
33
- execa('npx yo', ['@anansi/js', projectName], {
34
- stdio: 'inherit',
35
- shell: true,
36
- cwd,
37
- env: {
38
- PATH: `${process.env.PATH}:${__dirname}/node_modules/.bin`,
39
- },
40
- }),
41
- ]);
31
+ const yosub = execa('npx yo', ['@anansi/js', projectName], {
32
+ stdio: ['pipe', process.stdout, process.stderr],
33
+ shell: true,
34
+ cwd,
35
+ env: {
36
+ PATH: `${process.env.PATH}:${__dirname}/node_modules/.bin`,
37
+ },
38
+ });
39
+ // pipe with raw mode allows us to know when this exits with Ctrl+C (SIGINT)
40
+ process.stdin.setRawMode(true);
41
+ process.stdin.pipe(yosub.stdin, { end: false });
42
+ await Promise.all([verifyAndPrompt(), yosub]);
43
+
42
44
  const readme = path.join(cwd, 'README.md');
43
45
  // if user exits early this is still exit code 0, so we need to validate
44
46
  // whether the setup completed before going on to the next step
@@ -64,7 +66,8 @@ program
64
66
  });
65
67
  }
66
68
  } catch (error) {
67
- console.error(error.message);
69
+ // Don't display error for user-triggered exit (SIGINT)
70
+ if (error.exitCode !== 130) console.error(error.message);
68
71
  process.exit(2);
69
72
  }
70
73
  });