@gepetto/cli 0.2.2 → 0.2.3
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/README.md +1 -0
- package/bin/gepetto.mjs +9 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ npx @gepetto/cli webhook test http://localhost:3000/api/gepetto # sends a sign
|
|
|
19
19
|
npx @gepetto/cli secret # your webhook signing secret
|
|
20
20
|
npx @gepetto/cli keys # your test and live keys, masked (--show to print them in full)
|
|
21
21
|
npx @gepetto/cli subscribe # payment link; the live key is written to .env.production.local once paid
|
|
22
|
+
npx @gepetto/cli billing # invoices, payment method and cancellation (Stripe portal)
|
|
22
23
|
npx @gepetto/cli whoami # or logout
|
|
23
24
|
```
|
|
24
25
|
|
package/bin/gepetto.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import path from 'node:path';
|
|
|
7
7
|
import crypto from 'node:crypto';
|
|
8
8
|
import { spawn } from 'node:child_process';
|
|
9
9
|
|
|
10
|
-
const VERSION = '0.2.
|
|
10
|
+
const VERSION = '0.2.3';
|
|
11
11
|
const API = (process.env.GEPETTO_API_URL || 'https://europe-west1-gepettoai.cloudfunctions.net/v2').replace(/\/$/, '');
|
|
12
12
|
// The keys go wherever GEPETTO_API_URL points: https only (http allowed for a local server)
|
|
13
13
|
{
|
|
@@ -230,6 +230,13 @@ const commands = {
|
|
|
230
230
|
fail('payment_timeout', 'No payment after 30 minutes. Run the command again once paid: the key will be written.');
|
|
231
231
|
},
|
|
232
232
|
|
|
233
|
+
/** The Stripe customer portal of the account: invoices, payment method, cancellation. */
|
|
234
|
+
async billing() {
|
|
235
|
+
const { url } = await api('POST', '/cli/billing', { token: session() });
|
|
236
|
+
out(`Billing (invoices, payment method, cancellation): ${url}`, { event: 'billing', url });
|
|
237
|
+
openBrowser(url);
|
|
238
|
+
},
|
|
239
|
+
|
|
233
240
|
async run() {
|
|
234
241
|
const tool = positional[1];
|
|
235
242
|
if (!TOOLS.includes(tool)) fail('unknown_tool', `Tool: ${TOOLS.join(', ')}. Example: npx @gepetto/cli run declutter --image ./room.jpg`);
|
|
@@ -326,6 +333,7 @@ const commands = {
|
|
|
326
333
|
webhook test <url> Send a signed success and failure to your webhook endpoint
|
|
327
334
|
secret Your webhook signing secret
|
|
328
335
|
subscribe Payment link of the subscription; writes the live key once paid
|
|
336
|
+
billing Invoices, payment method and cancellation (Stripe portal)
|
|
329
337
|
logout | whoami
|
|
330
338
|
|
|
331
339
|
Every command accepts --json. Docs: https://docs.gepettoapp.com`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gepetto/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "Gepetto API v2 from the terminal: sign in, get an API key, render real estate photos (enhance, declutter, furnish, sky, restyle, walls and floors, upscale), subscribe.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|