@great-arrow/cli 0.1.41 → 0.1.42

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/index.js +33 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -9399,7 +9399,7 @@ function isNodeError(value) {
9399
9399
 
9400
9400
  // src/lib/version.ts
9401
9401
  var CLI_PACKAGE_NAME = "@great-arrow/cli";
9402
- var CLI_VERSION = "0.1.41";
9402
+ var CLI_VERSION = "0.1.42";
9403
9403
  var GAD_INSTALL_VERSION = "2026.08.08";
9404
9404
  var GAD_INSTALL_MIN_VERSION = "2026.06.22";
9405
9405
  var GAD_INSTALL_HEADER = "X-GAD-Install-Version";
@@ -16687,10 +16687,42 @@ function normalizeGlance(raw) {
16687
16687
  const sp = raw2;
16688
16688
  return typeof sp.line === "string" && sp.line !== "" && typeof sp.totalCostUsd === "number" && Number.isFinite(sp.totalCostUsd) ? { line: sp.line, totalCostUsd: sp.totalCostUsd } : null;
16689
16689
  })(),
16690
+ ...Array.isArray(obj.sections) ? { sections: normalizeTodaySections(obj.sections) } : {},
16691
+ ...Array.isArray(obj.degradedSections) ? {
16692
+ degradedSections: obj.degradedSections.filter(
16693
+ (k) => typeof k === "string"
16694
+ )
16695
+ } : {},
16690
16696
  urgency: typeof obj.urgency === "number" ? obj.urgency : null,
16691
16697
  generatedAt: typeof obj.generatedAt === "string" ? obj.generatedAt : (/* @__PURE__ */ new Date()).toISOString()
16692
16698
  };
16693
16699
  }
16700
+ function asNullableString(value) {
16701
+ return typeof value === "string" && value !== "" ? value : null;
16702
+ }
16703
+ function normalizeTodaySections(raw) {
16704
+ return raw.flatMap((section) => {
16705
+ if (typeof section !== "object" || section === null) return [];
16706
+ const s = section;
16707
+ if (typeof s.key !== "string" || typeof s.title !== "string") return [];
16708
+ const rows = asArray2(s.rows).flatMap((row) => {
16709
+ if (typeof row !== "object" || row === null) return [];
16710
+ const r = row;
16711
+ if (typeof r.id !== "string" || typeof r.title !== "string") return [];
16712
+ return [
16713
+ {
16714
+ id: r.id,
16715
+ title: r.title,
16716
+ meta: asNullableString(r.meta),
16717
+ href: asNullableString(r.href),
16718
+ tone: typeof r.tone === "string" ? r.tone : "normal",
16719
+ at: asNullableString(r.at)
16720
+ }
16721
+ ];
16722
+ });
16723
+ return rows.length > 0 ? [{ key: s.key, title: s.title, rows }] : [];
16724
+ });
16725
+ }
16694
16726
  function asArray2(value) {
16695
16727
  return Array.isArray(value) ? value : [];
16696
16728
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@great-arrow/cli",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
4
4
  "description": "GreatArrow.ai CLI tool",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,7 +17,7 @@
17
17
  "typecheck": "tsc --noEmit"
18
18
  },
19
19
  "dependencies": {
20
- "@napi-rs/keyring": "2.0.0",
20
+ "@napi-rs/keyring": "2.1.0",
21
21
  "commander": "^15.0.0",
22
22
  "update-notifier": "^7.3.1",
23
23
  "nanoid": "^3.3.18"