sv 0.6.3 → 0.6.4

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/dist/bin.js CHANGED
@@ -4,7 +4,7 @@ import require$$1, { execSync } from 'node:child_process';
4
4
  import path$2 from 'node:path';
5
5
  import fs$3 from 'node:fs';
6
6
  import process$1$1 from 'node:process';
7
- import { u as up$1, d as dedent, p as parseJson, a as parseScript, b as imports, c as common, e as exports$1, o as object$1, v as variables, _ as _function, f as parseSvelte, g as array$1, w as walk$1, k as kit, h as addFromString, E as Element, j as index, l as parseHtml, m as parseHtml$1, A as AtRule2, n as parseCss, q as pc, r as intro, s as outro, t as log$1, x as cancel, y as box, z as multiselect, B as isCancel, C as confirm, D as createWorkspace, F as setupAddons, G as note, H as select, I as text, J as packageManagerPrompt, K as applyAddons, L as installDependencies, M as formatFiles, N as spinner, O as getHighlighter, P as detectSync, Q as getUserAgent, R as group, S as resolveCommand, T as from$1 } from './install-aMzn70r6.js';
7
+ import { u as up$1, d as dedent, p as parseJson, a as parseScript, b as imports, c as common, e as exports$1, o as object$1, v as variables, _ as _function, f as parseSvelte, g as array$1, w as walk$1, k as kit, h as addFromString, E as Element, j as index, l as parseHtml, m as parseHtml$1, A as AtRule2, n as parseCss, q as pc, r as intro, s as outro, t as log$1, x as cancel, y as box, z as multiselect, B as isCancel, C as confirm, D as createWorkspace, F as setupAddons, G as note, H as select, I as text, J as packageManagerPrompt, K as applyAddons, L as installDependencies, M as formatFiles, N as spinner, O as getHighlighter, P as detectSync, Q as getUserAgent, R as group, S as resolveCommand, T as from$1 } from './install-ClR4mYH4.js';
8
8
  import 'node:readline';
9
9
  import 'node:tty';
10
10
  import { createGunzip } from 'node:zlib';
@@ -24,7 +24,7 @@ import 'stream';
24
24
  import 'readline';
25
25
 
26
26
  var name = "sv";
27
- var version = "0.6.3";
27
+ var version = "0.6.4";
28
28
  var type = "module";
29
29
  var description = "A CLI for creating and updating SvelteKit projects";
30
30
  var license = "MIT";
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { c as create } from './main-UNazaUHM.js';
2
- export { i as installAddon } from './install-aMzn70r6.js';
2
+ export { i as installAddon } from './install-ClR4mYH4.js';
3
3
  import 'node:fs';
4
4
  import 'node:path';
5
5
  import 'node:url';
@@ -1475,33 +1475,42 @@ const taskLog = (title) => {
1475
1475
  process$1.stdout.write(`${ACTIVE} ${title}
1476
1476
  `);
1477
1477
  let output = "";
1478
- const clear = (buffer = 0) => {
1479
- if (!output) return;
1480
- const lines = output.split("\n").length + buffer;
1481
- process$1.stdout.write(src.erase.lines(lines + 1));
1478
+ let frame = "";
1479
+ const clear = (eraseTitle = false) => {
1480
+ if (!frame) return;
1481
+ const terminalWidth = process$1.stdout.columns;
1482
+ const frameHeight = frame.split("\n").reduce((height, line) => {
1483
+ height += Math.ceil(line.length / terminalWidth);
1484
+ return height;
1485
+ }, 0);
1486
+ const lines = frameHeight + (eraseTitle ? 1 : 0);
1487
+ process$1.stdout.write(src.cursor.up(lines));
1488
+ process$1.stdout.write(src.erase.down());
1482
1489
  };
1483
- const print = () => {
1484
- const lines = output.split("\n");
1490
+ const print = (limit = 0) => {
1491
+ const lines = output.split("\n").slice(-limit);
1492
+ frame = "";
1485
1493
  for (const line of lines) {
1486
- const msg = color.dim(`${BAR} ${line}
1487
- `);
1488
- process$1.stdout.write(msg);
1494
+ frame += `${BAR} ${line}
1495
+ `;
1489
1496
  }
1497
+ process$1.stdout.write(color.dim(frame));
1490
1498
  };
1491
1499
  return {
1492
1500
  set text(data) {
1493
1501
  clear();
1494
1502
  output += data;
1495
- print();
1503
+ const frameHeight = Math.ceil(process$1.stdout.rows / 2);
1504
+ print(frameHeight);
1496
1505
  },
1497
1506
  fail(message) {
1498
- clear(1);
1507
+ clear(true);
1499
1508
  process$1.stdout.write(`${ERROR} ${message}
1500
1509
  `);
1501
1510
  print();
1502
1511
  },
1503
1512
  success(message) {
1504
- clear(1);
1513
+ clear(true);
1505
1514
  process$1.stdout.write(`${SUCCESS} ${message}
1506
1515
  `);
1507
1516
  }
@@ -43280,4 +43289,4 @@ function orderAddons(addons, setupResults) {
43280
43289
  }
43281
43290
 
43282
43291
  export { AtRule2 as A, isCancel as B, confirm as C, createWorkspace as D, Element as E, setupAddons as F, note as G, select as H, text as I, packageManagerPrompt as J, applyAddons as K, installDependencies as L, formatFiles as M, spinner as N, getHighlighter as O, detectSync as P, getUserAgent as Q, group as R, resolveCommand as S, from as T, _function as _, parseScript as a, imports as b, common as c, dedent as d, exports as e, parseSvelte as f, array as g, addFromString as h, installAddon as i, index as j, kit as k, parseHtml$1 as l, parseHtml as m, parseCss as n, object as o, parseJson as p, pc as q, intro as r, outro as s, log as t, up as u, variables as v, walk$1 as w, cancel as x, box as y, multiselect as z };
43283
- //# sourceMappingURL=install-aMzn70r6.js.map
43292
+ //# sourceMappingURL=install-ClR4mYH4.js.map