@mailmodo/cli 0.0.39 → 0.0.40-beta.pr42.66

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
- '<%= config.bin %> login',
13
- 'MAILMODO_API_KEY=mm_live_xxx <%= config.bin %> login',
14
- ];
11
+ static get examples() {
12
+ if (process.platform === 'win32') {
13
+ return [
14
+ '<%= config.bin %> login',
15
+ '$env:MAILMODO_API_KEY="YOUR_API_KEY"; <%= config.bin %> login # PowerShell',
16
+ 'set MAILMODO_API_KEY=YOUR_API_KEY && <%= config.bin %> login # CMD',
17
+ ];
18
+ }
19
+ return [
20
+ '<%= config.bin %> login',
21
+ 'MAILMODO_API_KEY=YOUR_API_KEY <%= config.bin %> login',
22
+ ];
23
+ }
15
24
  static flags = {
16
25
  ...BaseCommand.baseFlags,
17
26
  };
@@ -280,13 +280,13 @@
280
280
  "index.js"
281
281
  ]
282
282
  },
283
- "emails": {
283
+ "init": {
284
284
  "aliases": [],
285
285
  "args": {},
286
- "description": "List and view configured email sequences",
286
+ "description": "Analyze your product and generate email sequences",
287
287
  "examples": [
288
- "<%= config.bin %> emails",
289
- "<%= config.bin %> emails --json"
288
+ "<%= config.bin %> init",
289
+ "<%= config.bin %> init --url https://myapp.com --yes"
290
290
  ],
291
291
  "flags": {
292
292
  "json": {
@@ -301,11 +301,18 @@
301
301
  "name": "yes",
302
302
  "allowNo": false,
303
303
  "type": "boolean"
304
+ },
305
+ "url": {
306
+ "description": "Product URL to analyze",
307
+ "name": "url",
308
+ "hasDynamicHelp": false,
309
+ "multiple": false,
310
+ "type": "option"
304
311
  }
305
312
  },
306
313
  "hasDynamicHelp": false,
307
314
  "hiddenAliases": [],
308
- "id": "emails",
315
+ "id": "init",
309
316
  "pluginAlias": "@mailmodo/cli",
310
317
  "pluginName": "@mailmodo/cli",
311
318
  "pluginType": "core",
@@ -315,17 +322,17 @@
315
322
  "relativePath": [
316
323
  "dist",
317
324
  "commands",
318
- "emails",
325
+ "init",
319
326
  "index.js"
320
327
  ]
321
328
  },
322
- "init": {
329
+ "emails": {
323
330
  "aliases": [],
324
331
  "args": {},
325
- "description": "Analyze your product and generate email sequences",
332
+ "description": "List and view configured email sequences",
326
333
  "examples": [
327
- "<%= config.bin %> init",
328
- "<%= config.bin %> init --url https://myapp.com --yes"
334
+ "<%= config.bin %> emails",
335
+ "<%= config.bin %> emails --json"
329
336
  ],
330
337
  "flags": {
331
338
  "json": {
@@ -340,18 +347,11 @@
340
347
  "name": "yes",
341
348
  "allowNo": false,
342
349
  "type": "boolean"
343
- },
344
- "url": {
345
- "description": "Product URL to analyze",
346
- "name": "url",
347
- "hasDynamicHelp": false,
348
- "multiple": false,
349
- "type": "option"
350
350
  }
351
351
  },
352
352
  "hasDynamicHelp": false,
353
353
  "hiddenAliases": [],
354
- "id": "init",
354
+ "id": "emails",
355
355
  "pluginAlias": "@mailmodo/cli",
356
356
  "pluginName": "@mailmodo/cli",
357
357
  "pluginType": "core",
@@ -361,7 +361,7 @@
361
361
  "relativePath": [
362
362
  "dist",
363
363
  "commands",
364
- "init",
364
+ "emails",
365
365
  "index.js"
366
366
  ]
367
367
  },
@@ -369,10 +369,6 @@
369
369
  "aliases": [],
370
370
  "args": {},
371
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
372
  "flags": {
377
373
  "json": {
378
374
  "description": "Output as JSON",
@@ -657,5 +653,5 @@
657
653
  ]
658
654
  }
659
655
  },
660
- "version": "0.0.39"
656
+ "version": "0.0.40-beta.pr42.66"
661
657
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mailmodo/cli",
3
3
  "description": "Email lifecycle automation for the AI-native builder generation.",
4
- "version": "0.0.39",
4
+ "version": "0.0.40-beta.pr42.66",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"