@garuhq/cli 0.11.0 → 0.12.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to `@garuhq/cli` are documented in this file. Format:
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: [SemVer](https://semver.org/).
5
5
 
6
+ ## [0.12.0] — 2026-08-22
7
+
8
+ ### Changed
9
+
10
+ - **`garu scheduled-charges` now targets `/api/v1/scheduled-charges`.**
11
+ `list`/`attempts` pretty-print output reports `count`/`totalCount`/
12
+ `totalPages` instead of a `page`/`total` counter. No command flags or
13
+ arguments changed — scheduled-charge ids were already opaque strings
14
+ (`sch_...`), so this is a wire-level move, not an identifier change.
15
+ - **`@garuhq/node` bumped to `4.0.0`.** Breaking for
16
+ `garu.scheduledCharges.list()`/`.listAttempts()` (see that package's
17
+ changelog); `garu-cli`'s own commands are unaffected beyond the
18
+ pretty-print header above.
19
+
6
20
  ## [0.11.0] — 2026-08-22
7
21
 
8
22
  ### Changed
package/dist/index.cjs CHANGED
@@ -15,7 +15,7 @@ var pc__default = /*#__PURE__*/_interopDefault(pc);
15
15
  // src/index.ts
16
16
 
17
17
  // src/version.ts
18
- var CLI_VERSION = "0.11.0";
18
+ var CLI_VERSION = "0.12.0";
19
19
  var CliError = class extends Error {
20
20
  code;
21
21
  exitCode;
@@ -1226,10 +1226,8 @@ function prettyScheduledCharge(c) {
1226
1226
  return lines.join("\n");
1227
1227
  }
1228
1228
  function prettyScheduledChargeList(list) {
1229
- if (list.data.length === 0) {
1230
- return `No scheduled charges found (page ${list.meta.page}/${list.meta.totalPages || 1})`;
1231
- }
1232
- const header = `Scheduled charges (page ${list.meta.page}/${list.meta.totalPages || "?"}, ${list.meta.total} total)`;
1229
+ if (list.data.length === 0) return "No scheduled charges found";
1230
+ const header = `Scheduled charges (${list.count} of ${list.totalCount} total, ${list.totalPages} page(s))`;
1233
1231
  const rows = list.data.map(
1234
1232
  (c) => ` ${c.id.padEnd(20)} ${String(c.status).padEnd(18)} ${String(c.type).padEnd(9)} ${String(c.amount).padStart(10)} ${c.dueDate}`
1235
1233
  );
@@ -1252,10 +1250,8 @@ function prettyScheduledChargeDetail(detail) {
1252
1250
  return lines.join("\n");
1253
1251
  }
1254
1252
  function prettyAttemptList(list) {
1255
- if (list.data.length === 0) {
1256
- return `No billing attempts found (page ${list.meta.page}/${list.meta.totalPages || 1})`;
1257
- }
1258
- const header = `Billing attempts (page ${list.meta.page}/${list.meta.totalPages || "?"}, ${list.meta.total} total)`;
1253
+ if (list.data.length === 0) return "No billing attempts found";
1254
+ const header = `Billing attempts (${list.count} of ${list.totalCount} total, ${list.totalPages} page(s))`;
1259
1255
  const rows = list.data.map(
1260
1256
  (a) => ` cycle ${String(a.cycleNumber).padStart(3)} #${a.attemptNumber} ${a.status.padEnd(10)} ${a.paymentMethod.padEnd(7)} ${a.failureCode ?? ""} ${a.attemptedAt}`
1261
1257
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@garuhq/cli",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Official command-line interface for the Garu payment gateway.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://garu.com.br",
@@ -46,7 +46,7 @@
46
46
  "prepublishOnly": "npm run check:version-sync && npm run typecheck && npm test && npm run build"
47
47
  },
48
48
  "dependencies": {
49
- "@garuhq/node": "3.0.0",
49
+ "@garuhq/node": "4.0.0",
50
50
  "@inquirer/prompts": "8.4.1",
51
51
  "commander": "12.0.0",
52
52
  "picocolors": "1.0.0",