run402 1.19.0 → 1.19.1

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/lib/email.mjs +6 -5
  2. package/package.json +1 -1
package/lib/email.mjs CHANGED
@@ -71,14 +71,15 @@ async function resolveMailboxId(projectId, serviceKey) {
71
71
  console.error(JSON.stringify({ status: "error", http: res.status, ...data }));
72
72
  process.exit(1);
73
73
  }
74
- const mailboxes = await res.json();
74
+ const body = await res.json();
75
+ const mailboxes = body.mailboxes || body;
75
76
  if (!Array.isArray(mailboxes) || mailboxes.length === 0) {
76
77
  console.error(JSON.stringify({ status: "error", message: "No mailbox found. Run: run402 email create <slug>" }));
77
78
  process.exit(1);
78
79
  }
79
80
  const mb = mailboxes[0];
80
- updateProject(projectId, { mailbox_id: mb.id, mailbox_address: mb.address });
81
- return mb.id;
81
+ updateProject(projectId, { mailbox_id: mb.mailbox_id, mailbox_address: mb.address });
82
+ return mb.mailbox_id;
82
83
  }
83
84
 
84
85
  async function create(args) {
@@ -114,8 +115,8 @@ async function create(args) {
114
115
  process.exit(1);
115
116
  }
116
117
 
117
- updateProject(projectId, { mailbox_id: data.id, mailbox_address: data.address });
118
- console.log(JSON.stringify({ status: "ok", mailbox_id: data.id, address: data.address, slug: data.slug }));
118
+ updateProject(projectId, { mailbox_id: data.mailbox_id, mailbox_address: data.address });
119
+ console.log(JSON.stringify({ status: "ok", mailbox_id: data.mailbox_id, address: data.address, slug: data.slug }));
119
120
  }
120
121
 
121
122
  async function send(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "run402",
3
- "version": "1.19.0",
3
+ "version": "1.19.1",
4
4
  "description": "CLI for Run402 — provision Postgres databases, deploy static sites, generate images, and manage wallets via x402 and MPP micropayments.",
5
5
  "type": "module",
6
6
  "bin": {