@maravilla-labs/cli 0.1.7 → 0.1.8

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
@@ -16,6 +16,11 @@ pnpm add -g @maravilla-labs/cli
16
16
  yarn global add @maravilla-labs/cli
17
17
  ```
18
18
 
19
+ **Note:** To see installation progress with npm 7+, use the `--foreground-scripts` flag:
20
+ ```bash
21
+ npm install -g @maravilla-labs/cli --foreground-scripts
22
+ ```
23
+
19
24
  Verify:
20
25
 
21
26
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maravilla-labs/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "NPM wrapper for the Maravilla CLI binary; downloads the right release for your platform.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Maravilla Labs",
@@ -18,8 +18,17 @@ if (process.env.MARAVILLA_CLI_SKIP_INSTALL === '1' || process.env.CI) {
18
18
  console.log('✿ Skipping Maravilla CLI binary install (CI or skip flag set)');
19
19
  process.exit(0);
20
20
  }
21
+
21
22
  import { spawn } from 'child_process';
22
23
 
24
+ // Detect if output is being suppressed (npm 7+ behavior)
25
+ // Write to stderr as a fallback since it's more likely to be shown
26
+ const isOutputSuppressed = !process.stdout.isTTY && !process.env.npm_config_foreground_scripts;
27
+ if (isOutputSuppressed) {
28
+ console.error('✿ Installing Maravilla CLI binary...');
29
+ console.error('✿ To see detailed progress, run: npm install --foreground-scripts');
30
+ }
31
+
23
32
  const __filename = fileURLToPath(import.meta.url);
24
33
  const __dirname = path.dirname(__filename);
25
34
 
@@ -273,7 +282,13 @@ async function sha256File(filePath) {
273
282
  });
274
283
  }
275
284
 
276
- install().catch(err => {
277
- console.error(chalk.red(`${flower()} install failed: ${err.message}`));
278
- process.exitCode = 1;
279
- });
285
+ install()
286
+ .then(() => {
287
+ if (isOutputSuppressed) {
288
+ console.error('✿ Maravilla CLI binary installed successfully!');
289
+ }
290
+ })
291
+ .catch(err => {
292
+ console.error(chalk.red(`${flower()} install failed: ${err.message}`));
293
+ process.exitCode = 1;
294
+ });