sheetlink 0.1.12 → 0.1.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sheetlink",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "CLI for SheetLink — sync your bank transactions to any destination",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,16 +39,23 @@ export async function cmdSync(options) {
39
39
  const allAccounts = [];
40
40
  const results = [];
41
41
 
42
+ const spinnerFrames = ['⠋','⠙','⠹','⠸','⠼','⠴','⠦','⠧','⠇','⠏'];
43
+
42
44
  for (const id of itemIds) {
43
- process.stderr.write(`Syncing ${id}...`);
45
+ let i = 0;
46
+ const spinner = setInterval(() => {
47
+ process.stderr.write(`\r${spinnerFrames[i++ % spinnerFrames.length]} Syncing ${id}...`);
48
+ }, 80);
44
49
  try {
45
50
  const result = await syncItem(id);
46
51
  allTransactions.push(...(result.transactions || []));
47
52
  allAccounts.push(...(result.accounts || []));
48
53
  results.push({ item_id: id, ...result });
49
- process.stderr.write(` ${result.transactions?.length ?? 0} transactions\n`);
54
+ clearInterval(spinner);
55
+ process.stderr.write(`\r✓ Synced ${id} — ${result.transactions?.length ?? 0} transactions\n`);
50
56
  } catch (e) {
51
- process.stderr.write(` error: ${e.message}\n`);
57
+ clearInterval(spinner);
58
+ process.stderr.write(`\r✗ ${id} — ${e.message}\n`);
52
59
  }
53
60
  }
54
61