complete-cli 1.0.1-dev.8 → 1.0.1

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.
@@ -113,11 +113,17 @@ async function installNodeModules(projectPath, skipInstall, packageManager) {
113
113
  return;
114
114
  }
115
115
  const command = getPackageManagerInstallCommand(packageManager);
116
- const s = promptSpinnerStart(`Installing node modules with "${command}"... (This can take a long time.)`);
117
- const $$ = $({ cwd: projectPath });
118
- const commandParts = command.split(" ");
119
- await $$ `${commandParts}`;
120
- s.stop("Installed.");
116
+ const s = promptSpinnerStart(`Installing the project dependencies with "${command}". (This can take a long time.)`);
117
+ try {
118
+ const $$ = $({ cwd: projectPath });
119
+ const commandParts = command.split(" ");
120
+ await $$ `${commandParts}`;
121
+ s.stop("Installed.");
122
+ }
123
+ catch {
124
+ s.stop("Failed to install.");
125
+ promptError("Exiting.");
126
+ }
121
127
  }
122
128
  async function formatFiles(projectPath) {
123
129
  const $$ = $({ cwd: projectPath });
package/dist/prompt.js CHANGED
@@ -41,7 +41,9 @@ export function promptLog(msg) {
41
41
  log.step(msg); // Step is a hollow green diamond.
42
42
  }
43
43
  export function promptSpinnerStart(msg) {
44
- const s = spinner();
44
+ const s = spinner({
45
+ indicator: "timer",
46
+ });
45
47
  s.start(msg);
46
48
  return s;
47
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "complete-cli",
3
- "version": "1.0.1-dev.8",
3
+ "version": "1.0.1",
4
4
  "description": "A command line tool for bootstrapping TypeScript projects.",
5
5
  "keywords": [
6
6
  "typescript"
@@ -184,12 +184,18 @@ async function installNodeModules(
184
184
 
185
185
  const command = getPackageManagerInstallCommand(packageManager);
186
186
  const s = promptSpinnerStart(
187
- `Installing node modules with "${command}"... (This can take a long time.)`,
187
+ `Installing the project dependencies with "${command}". (This can take a long time.)`,
188
188
  );
189
- const $$ = $({ cwd: projectPath });
190
- const commandParts = command.split(" ");
191
- await $$`${commandParts}`;
192
- s.stop("Installed.");
189
+
190
+ try {
191
+ const $$ = $({ cwd: projectPath });
192
+ const commandParts = command.split(" ");
193
+ await $$`${commandParts}`;
194
+ s.stop("Installed.");
195
+ } catch {
196
+ s.stop("Failed to install.");
197
+ promptError("Exiting.");
198
+ }
193
199
  }
194
200
 
195
201
  async function formatFiles(projectPath: string) {
package/src/prompt.ts CHANGED
@@ -68,7 +68,9 @@ export function promptLog(msg: string): void {
68
68
  }
69
69
 
70
70
  export function promptSpinnerStart(msg: string): ReturnType<typeof spinner> {
71
- const s = spinner();
71
+ const s = spinner({
72
+ indicator: "timer",
73
+ });
72
74
  s.start(msg);
73
75
  return s;
74
76
  }