@mailmodo/cli 0.0.39 → 0.0.40-beta.pr42.65
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.
|
@@ -54,7 +54,7 @@ export default class Billing extends BaseCommand {
|
|
|
54
54
|
await this.setCap(flags.cap, autoChargeBlockCount, flags.json);
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
await this.showStatus(flags.json);
|
|
57
|
+
await this.showStatus(flags.json, flags.status);
|
|
58
58
|
}
|
|
59
59
|
async startCheckout(jsonOutput) {
|
|
60
60
|
const response = await this.withApiSpinner({ json: jsonOutput, text: ' Creating checkout session...' }, () => this.apiClient.post(API_ENDPOINTS.BILLING_CHECKOUT));
|
|
@@ -76,7 +76,7 @@ export default class Billing extends BaseCommand {
|
|
|
76
76
|
this.log(` ${INFO.BROWSER_OPEN_FAILED}\n`);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
async showStatus(jsonOutput) {
|
|
79
|
+
async showStatus(jsonOutput, statusOnly) {
|
|
80
80
|
const response = await this.withApiSpinner({ json: jsonOutput, text: ' Loading billing status...' }, () => this.apiClient.get(API_ENDPOINTS.BILLING_STATUS));
|
|
81
81
|
if (!response.ok) {
|
|
82
82
|
this.handleApiError(response);
|
|
@@ -104,7 +104,7 @@ export default class Billing extends BaseCommand {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
this.log('');
|
|
107
|
-
if (!data.hasPaymentMethod) {
|
|
107
|
+
if (!data.hasPaymentMethod && !statusOnly) {
|
|
108
108
|
await this.startCheckout(jsonOutput);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseCommand } from '../../lib/base-command.js';
|
|
2
2
|
export default class Login extends BaseCommand {
|
|
3
3
|
static description: string;
|
|
4
|
-
static examples: string[];
|
|
4
|
+
static get examples(): string[];
|
|
5
5
|
static flags: {
|
|
6
6
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
7
7
|
yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
@@ -8,10 +8,19 @@ import { API_ENDPOINTS, LOGIN_URL } from '../../lib/constants.js';
|
|
|
8
8
|
import { INFO } from '../../lib/messages.js';
|
|
9
9
|
export default class Login extends BaseCommand {
|
|
10
10
|
static description = 'Authenticate with Mailmodo using your API key';
|
|
11
|
-
static examples
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
static get examples() {
|
|
12
|
+
if (process.platform === 'win32') {
|
|
13
|
+
return [
|
|
14
|
+
'<%= config.bin %> login',
|
|
15
|
+
'$env:MAILMODO_API_KEY="mm_live_xxx"; <%= config.bin %> login # PowerShell',
|
|
16
|
+
'set MAILMODO_API_KEY=mm_live_xxx && <%= config.bin %> login # CMD',
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
return [
|
|
20
|
+
'<%= config.bin %> login',
|
|
21
|
+
'MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login',
|
|
22
|
+
];
|
|
23
|
+
}
|
|
15
24
|
static flags = {
|
|
16
25
|
...BaseCommand.baseFlags,
|
|
17
26
|
};
|
package/oclif.manifest.json
CHANGED
|
@@ -280,14 +280,10 @@
|
|
|
280
280
|
"index.js"
|
|
281
281
|
]
|
|
282
282
|
},
|
|
283
|
-
"
|
|
283
|
+
"login": {
|
|
284
284
|
"aliases": [],
|
|
285
285
|
"args": {},
|
|
286
|
-
"description": "
|
|
287
|
-
"examples": [
|
|
288
|
-
"<%= config.bin %> emails",
|
|
289
|
-
"<%= config.bin %> emails --json"
|
|
290
|
-
],
|
|
286
|
+
"description": "Authenticate with Mailmodo using your API key",
|
|
291
287
|
"flags": {
|
|
292
288
|
"json": {
|
|
293
289
|
"description": "Output as JSON",
|
|
@@ -305,7 +301,7 @@
|
|
|
305
301
|
},
|
|
306
302
|
"hasDynamicHelp": false,
|
|
307
303
|
"hiddenAliases": [],
|
|
308
|
-
"id": "
|
|
304
|
+
"id": "login",
|
|
309
305
|
"pluginAlias": "@mailmodo/cli",
|
|
310
306
|
"pluginName": "@mailmodo/cli",
|
|
311
307
|
"pluginType": "core",
|
|
@@ -315,7 +311,7 @@
|
|
|
315
311
|
"relativePath": [
|
|
316
312
|
"dist",
|
|
317
313
|
"commands",
|
|
318
|
-
"
|
|
314
|
+
"login",
|
|
319
315
|
"index.js"
|
|
320
316
|
]
|
|
321
317
|
},
|
|
@@ -365,51 +361,13 @@
|
|
|
365
361
|
"index.js"
|
|
366
362
|
]
|
|
367
363
|
},
|
|
368
|
-
"
|
|
369
|
-
"aliases": [],
|
|
370
|
-
"args": {},
|
|
371
|
-
"description": "Authenticate with Mailmodo using your API key",
|
|
372
|
-
"examples": [
|
|
373
|
-
"<%= config.bin %> login",
|
|
374
|
-
"MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login"
|
|
375
|
-
],
|
|
376
|
-
"flags": {
|
|
377
|
-
"json": {
|
|
378
|
-
"description": "Output as JSON",
|
|
379
|
-
"name": "json",
|
|
380
|
-
"allowNo": false,
|
|
381
|
-
"type": "boolean"
|
|
382
|
-
},
|
|
383
|
-
"yes": {
|
|
384
|
-
"char": "y",
|
|
385
|
-
"description": "Skip confirmation prompts",
|
|
386
|
-
"name": "yes",
|
|
387
|
-
"allowNo": false,
|
|
388
|
-
"type": "boolean"
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
"hasDynamicHelp": false,
|
|
392
|
-
"hiddenAliases": [],
|
|
393
|
-
"id": "login",
|
|
394
|
-
"pluginAlias": "@mailmodo/cli",
|
|
395
|
-
"pluginName": "@mailmodo/cli",
|
|
396
|
-
"pluginType": "core",
|
|
397
|
-
"strict": true,
|
|
398
|
-
"enableJsonFlag": false,
|
|
399
|
-
"isESM": true,
|
|
400
|
-
"relativePath": [
|
|
401
|
-
"dist",
|
|
402
|
-
"commands",
|
|
403
|
-
"login",
|
|
404
|
-
"index.js"
|
|
405
|
-
]
|
|
406
|
-
},
|
|
407
|
-
"logout": {
|
|
364
|
+
"emails": {
|
|
408
365
|
"aliases": [],
|
|
409
366
|
"args": {},
|
|
410
|
-
"description": "
|
|
367
|
+
"description": "List and view configured email sequences",
|
|
411
368
|
"examples": [
|
|
412
|
-
"<%= config.bin %>
|
|
369
|
+
"<%= config.bin %> emails",
|
|
370
|
+
"<%= config.bin %> emails --json"
|
|
413
371
|
],
|
|
414
372
|
"flags": {
|
|
415
373
|
"json": {
|
|
@@ -428,7 +386,7 @@
|
|
|
428
386
|
},
|
|
429
387
|
"hasDynamicHelp": false,
|
|
430
388
|
"hiddenAliases": [],
|
|
431
|
-
"id": "
|
|
389
|
+
"id": "emails",
|
|
432
390
|
"pluginAlias": "@mailmodo/cli",
|
|
433
391
|
"pluginName": "@mailmodo/cli",
|
|
434
392
|
"pluginType": "core",
|
|
@@ -438,7 +396,7 @@
|
|
|
438
396
|
"relativePath": [
|
|
439
397
|
"dist",
|
|
440
398
|
"commands",
|
|
441
|
-
"
|
|
399
|
+
"emails",
|
|
442
400
|
"index.js"
|
|
443
401
|
]
|
|
444
402
|
},
|
|
@@ -655,7 +613,45 @@
|
|
|
655
613
|
"status",
|
|
656
614
|
"index.js"
|
|
657
615
|
]
|
|
616
|
+
},
|
|
617
|
+
"logout": {
|
|
618
|
+
"aliases": [],
|
|
619
|
+
"args": {},
|
|
620
|
+
"description": "Sign out by removing saved credentials from this machine",
|
|
621
|
+
"examples": [
|
|
622
|
+
"<%= config.bin %> logout"
|
|
623
|
+
],
|
|
624
|
+
"flags": {
|
|
625
|
+
"json": {
|
|
626
|
+
"description": "Output as JSON",
|
|
627
|
+
"name": "json",
|
|
628
|
+
"allowNo": false,
|
|
629
|
+
"type": "boolean"
|
|
630
|
+
},
|
|
631
|
+
"yes": {
|
|
632
|
+
"char": "y",
|
|
633
|
+
"description": "Skip confirmation prompts",
|
|
634
|
+
"name": "yes",
|
|
635
|
+
"allowNo": false,
|
|
636
|
+
"type": "boolean"
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"hasDynamicHelp": false,
|
|
640
|
+
"hiddenAliases": [],
|
|
641
|
+
"id": "logout",
|
|
642
|
+
"pluginAlias": "@mailmodo/cli",
|
|
643
|
+
"pluginName": "@mailmodo/cli",
|
|
644
|
+
"pluginType": "core",
|
|
645
|
+
"strict": true,
|
|
646
|
+
"enableJsonFlag": false,
|
|
647
|
+
"isESM": true,
|
|
648
|
+
"relativePath": [
|
|
649
|
+
"dist",
|
|
650
|
+
"commands",
|
|
651
|
+
"logout",
|
|
652
|
+
"index.js"
|
|
653
|
+
]
|
|
658
654
|
}
|
|
659
655
|
},
|
|
660
|
-
"version": "0.0.
|
|
656
|
+
"version": "0.0.40-beta.pr42.65"
|
|
661
657
|
}
|