plexmint 0.2.5 → 0.2.7

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 +10 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -560,13 +560,13 @@ async function buyCommand(ticker) {
560
560
  const client = new PlexMintClient(getApiKey());
561
561
  const result = await client.purchase(upperTicker);
562
562
  spinner.stop();
563
- const { ticker: t, title, pricePaid, walletBalance } = result.data;
563
+ const d = result.data;
564
564
  console.log("");
565
565
  console.log(mint(" \u2713 ") + chalk6.bold("Purchase complete!"));
566
566
  console.log("");
567
- console.log(chalk6.gray(" Prompt: ") + chalk6.white(`${title} (${t})`));
568
- console.log(chalk6.gray(" Price paid: ") + mint(formatPrice(pricePaid)));
569
- console.log(chalk6.gray(" Wallet balance: ") + chalk6.white(formatPrice(walletBalance)));
567
+ console.log(chalk6.gray(" Prompt: ") + chalk6.white(`${d.title || upperTicker} (${d.ticker || upperTicker})`));
568
+ if (d.pricePaid) console.log(chalk6.gray(" Price paid: ") + mint(formatPrice(d.pricePaid)));
569
+ if (d.walletBalance != null) console.log(chalk6.gray(" Wallet balance: ") + chalk6.white(formatPrice(d.walletBalance)));
570
570
  console.log("");
571
571
  console.log(
572
572
  chalk6.gray(" View in your library: ") + chalk6.white("plexmint library")
@@ -704,23 +704,23 @@ async function libraryCommand() {
704
704
  mint("Ticker"),
705
705
  mint("Title"),
706
706
  mint("Category"),
707
- mint("Version"),
708
707
  mint("Purchased")
709
708
  ],
710
709
  style: { head: [], border: ["gray"] },
711
- colWidths: [14, 32, 14, 10, 14]
710
+ colWidths: [14, 32, 14, 16]
712
711
  });
713
712
  for (const item of items) {
714
- const date = new Date(item.purchasedAt).toLocaleDateString("en-US", {
713
+ const raw = item;
714
+ const purchaseDate = raw.purchasedAt ?? raw.createdAt ?? raw.purchased_at;
715
+ const date = purchaseDate ? new Date(purchaseDate).toLocaleDateString("en-US", {
715
716
  month: "short",
716
717
  day: "numeric",
717
718
  year: "numeric"
718
- });
719
+ }) : "\u2014";
719
720
  table.push([
720
721
  chalk8.bold(item.ticker),
721
722
  item.title.length > 30 ? item.title.slice(0, 27) + "..." : item.title,
722
- item.category,
723
- `v${item.version}`,
723
+ raw.category || "\u2014",
724
724
  chalk8.gray(date)
725
725
  ]);
726
726
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plexmint",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "PlexMint CLI — Browse, buy, and manage AI prompts from your terminal",
5
5
  "type": "module",
6
6
  "bin": {