@mailmodo/cli 0.0.20-beta.pr23.33 → 0.0.20-beta.pr23.34

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.
@@ -5,6 +5,8 @@ export default class Logs extends BaseCommand {
5
5
  static flags: {
6
6
  email: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
7
  failed: import("@oclif/core/interfaces").BooleanFlag<boolean>;
8
+ limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
9
+ page: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
8
10
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
9
11
  yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
12
  };
@@ -17,11 +17,22 @@ export default class Logs extends BaseCommand {
17
17
  default: false,
18
18
  description: 'Show only failed/bounced events',
19
19
  }),
20
+ limit: Flags.integer({
21
+ default: 50,
22
+ description: 'Entries per page (max 200)',
23
+ }),
24
+ page: Flags.integer({
25
+ default: 1,
26
+ description: 'Page number',
27
+ }),
20
28
  };
21
29
  async run() {
22
30
  const { flags } = await this.parse(Logs);
23
31
  await this.ensureAuth();
24
- const params = {};
32
+ const params = {
33
+ limit: String(flags.limit),
34
+ page: String(flags.page),
35
+ };
25
36
  if (flags.email)
26
37
  params.email = flags.email;
27
38
  if (flags.failed)
@@ -30,7 +41,7 @@ export default class Logs extends BaseCommand {
30
41
  if (!response.ok) {
31
42
  this.handleApiError(response);
32
43
  }
33
- const { entries } = response.data;
44
+ const { entries, limit, page, total } = response.data;
34
45
  if (flags.json) {
35
46
  this.log(JSON.stringify(response.data, null, 2));
36
47
  return;
@@ -49,6 +60,11 @@ export default class Logs extends BaseCommand {
49
60
  this.log(` ${' '.repeat(52)}${chalk.dim(`(reason: ${entry.reason})`)}`);
50
61
  }
51
62
  }
63
+ const totalPages = Math.ceil(total / limit);
64
+ this.log(`\n Page ${page} of ${totalPages} · ${total} total entries`);
65
+ if (page < totalPages) {
66
+ this.log(` ${chalk.dim(`Next: --page ${page + 1}`)}`);
67
+ }
52
68
  }
53
69
  else {
54
70
  this.log(` ${chalk.dim('No log entries found.')}`);
@@ -455,6 +455,22 @@
455
455
  "name": "failed",
456
456
  "allowNo": false,
457
457
  "type": "boolean"
458
+ },
459
+ "limit": {
460
+ "description": "Entries per page (max 200)",
461
+ "name": "limit",
462
+ "default": 50,
463
+ "hasDynamicHelp": false,
464
+ "multiple": false,
465
+ "type": "option"
466
+ },
467
+ "page": {
468
+ "description": "Page number",
469
+ "name": "page",
470
+ "default": 1,
471
+ "hasDynamicHelp": false,
472
+ "multiple": false,
473
+ "type": "option"
458
474
  }
459
475
  },
460
476
  "hasDynamicHelp": false,
@@ -618,5 +634,5 @@
618
634
  ]
619
635
  }
620
636
  },
621
- "version": "0.0.20-beta.pr23.33"
637
+ "version": "0.0.20-beta.pr23.34"
622
638
  }
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.20-beta.pr23.33",
4
+ "version": "0.0.20-beta.pr23.34",
5
5
  "author": "provishalk",
6
6
  "bin": {
7
7
  "mailmodo": "bin/run.js"