@mentio-dev/cli 0.1.0 → 0.1.1

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 CHANGED
@@ -12,4 +12,4 @@ mentio analytics:summary --range 7d --compare true
12
12
  mentio mentions:watch --platform reddit | jq -r '.post.url'
13
13
  ```
14
14
 
15
- JSON out, compact when piped and indented on a terminal; `--table` for lists. Keys come from `--api-key`, `MENTIO_API_KEY`, or `~/.mentio/config.json`. The full command list is at [docs.mentio.dev/cli/commands](https://docs.mentio.dev/cli/commands).
15
+ JSON out, compact when piped and indented on a terminal; `--table` for lists. Keys come from `--api-key`, `MENTIO_API_KEY`, or `~/.mentio/config.json`. Every command, by area, is at [docs.mentio.dev/cli](https://docs.mentio.dev/cli).
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { writeFileSync as writeFileSync2 } from "fs";
12
12
  // package.json
13
13
  var package_default = {
14
14
  name: "@mentio-dev/cli",
15
- version: "0.1.0",
15
+ version: "0.1.1",
16
16
  description: "Command-line client for the Mentio API: one command per endpoint, plus watch and MCP helpers.",
17
17
  license: "MIT",
18
18
  homepage: "https://docs.mentio.dev/cli",
@@ -132,6 +132,7 @@ function coerceScalar(field, raw, type) {
132
132
  case "integer":
133
133
  case "number": {
134
134
  const n = Number(raw);
135
+ if (!Number.isFinite(n) && /^\d{4}-\d{2}-\d{2}/.test(raw) && Number.isFinite(Date.parse(raw))) return raw;
135
136
  if (raw.trim() === "" || !Number.isFinite(n)) throw new UsageError(`--${field.name} expects a number, got "${raw}"`);
136
137
  if (type === "integer" && !Number.isInteger(n)) throw new UsageError(`--${field.name} expects a whole number, got "${raw}"`);
137
138
  return n;