@codejeet/oadm 0.0.3 → 0.0.5

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.
Files changed (2) hide show
  1. package/dist/cli.js +3 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -61,6 +61,7 @@ program
61
61
  .option('--sent', 'Show sent messages (outbox)', false)
62
62
  .option('--all', 'Show both received and sent', false)
63
63
  .option('--since <timestamp>', 'Only messages since timestamp (ISO 8601 or unix)', '')
64
+ .option('--limit <count>', 'Max messages to return (cap 200)', '')
64
65
  .option('--json', 'JSON output', false)
65
66
  .option('--ack', 'Ack returned messages', false)
66
67
  .action(async (opts) => {
@@ -78,6 +79,8 @@ program
78
79
  q.set('all', '1');
79
80
  if (opts.since)
80
81
  q.set('since', opts.since);
82
+ if (opts.limit)
83
+ q.set('limit', String(opts.limit));
81
84
  const data = await getJson(`${cfg.apiUrl}/v1/messages/inbox?${q.toString()}`, cfg.token);
82
85
  if (opts.json) {
83
86
  console.log(JSON.stringify(data, null, 2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codejeet/oadm",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "oadm": "dist/cli.js"