@anansi/cli 1.1.56 → 1.1.57
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/CHANGELOG.md +9 -0
- package/package.json +2 -2
- package/run.js +15 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
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.57](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.55...@anansi/cli@1.1.57) (2022-04-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 💅 Enhancement
|
|
10
|
+
|
|
11
|
+
* Better handling of Ctrl+C (SIGNINT) ([42e732d](https://github.com/ntucker/anansi/commit/42e732d88045f07363dcc8fe893f5d4266cd65fd))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
### [1.1.56](https://github.com/ntucker/anansi/compare/@anansi/cli@1.1.55...@anansi/cli@1.1.56) (2022-03-30)
|
|
7
16
|
|
|
8
17
|
**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.
|
|
3
|
+
"version": "1.1.57",
|
|
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.
|
|
54
|
+
"@anansi/generator-js": "^7.3.11",
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
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
|
});
|