vibecash 0.2.5 → 0.2.6
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/dist/index.js +9 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -265,12 +265,15 @@ function registerPriceCommands(program2) {
|
|
|
265
265
|
if (opts.interval) body.interval = opts.interval;
|
|
266
266
|
const data = await apiRequest("POST", "/prices", body);
|
|
267
267
|
success("Price created");
|
|
268
|
-
output(data, (d) =>
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
268
|
+
output(data, (d) => {
|
|
269
|
+
const payUrl = process.env.VIBECASH_PAY_URL || "https://vibecash.dev";
|
|
270
|
+
return [
|
|
271
|
+
`Price ID: ${d.id}`,
|
|
272
|
+
`Amount: ${fmtAmount(d.unitAmount ?? d.amount, d.currency)}${d.interval ? "/" + d.interval : ""}`,
|
|
273
|
+
`Type: ${d.type}`,
|
|
274
|
+
`Payment URL: ${payUrl}/buy/${d.id}`
|
|
275
|
+
].join("\n");
|
|
276
|
+
});
|
|
274
277
|
} catch (err) {
|
|
275
278
|
console.error(`Error: ${err.message}`);
|
|
276
279
|
process.exit(1);
|