extension-create 3.5.1 → 3.6.0

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 (2) hide show
  1. package/dist/module.cjs +12 -2
  2. package/package.json +2 -2
package/dist/module.cjs CHANGED
@@ -506,6 +506,11 @@ async function overridePackageJson(projectPath, projectName, { template: _templa
506
506
  throw error;
507
507
  }
508
508
  }
509
+ function clearLine() {
510
+ if (!process.stdout.isTTY) return;
511
+ process.stdout.write('\r');
512
+ process.stdout.write('\x1b[2K');
513
+ }
509
514
  function stripAnsi(input) {
510
515
  return input.replace(/\x1b\[[0-9;]*m/g, '');
511
516
  }
@@ -527,7 +532,8 @@ function startProgressBar(label, options) {
527
532
  const bar = `[${'='.repeat(filled)}${' '.repeat(empty)}]`;
528
533
  const line = `${label} ${bar}`;
529
534
  lastVisibleLength = stripAnsi(line).length;
530
- process.stdout.write(`\r${line}`);
535
+ clearLine();
536
+ process.stdout.write(line);
531
537
  tick = (tick + 1) % (width + 1);
532
538
  };
533
539
  render();
@@ -536,7 +542,11 @@ function startProgressBar(label, options) {
536
542
  stop: ()=>{
537
543
  clearInterval(timer);
538
544
  if (process.stdout.isTTY) {
539
- process.stdout.write(`\r${' '.repeat(lastVisibleLength)}\r`);
545
+ clearLine();
546
+ if (lastVisibleLength > 0) {
547
+ process.stdout.write(' '.repeat(lastVisibleLength));
548
+ process.stdout.write('\r');
549
+ }
540
550
  if (options?.persistLabel) process.stdout.write(`${label}\n`);
541
551
  }
542
552
  }
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "dist"
24
24
  ],
25
25
  "name": "extension-create",
26
- "version": "3.5.1",
26
+ "version": "3.6.0",
27
27
  "description": "The standalone extension creation engine for Extension.js",
28
28
  "author": {
29
29
  "name": "Cezar Augusto",
@@ -72,7 +72,7 @@
72
72
  ],
73
73
  "dependencies": {
74
74
  "adm-zip": "^0.5.16",
75
- "axios": "^1.13.2",
75
+ "axios": "^1.13.5",
76
76
  "cross-spawn": "^7.0.6",
77
77
  "go-git-it": "^5.1.1",
78
78
  "pintor": "0.3.0",