@wirecat/cli-base 0.99.0 → 0.100.0

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/CHANGELOG.md CHANGED
@@ -8,6 +8,29 @@ Versions before 0.8.0 are in the [git tags](https://github.com/WireCatLabs/cli-b
8
8
  Every entry says what changed as a caller sees it, why, and what to watch for — the rules are
9
9
  [`docs/dev/CONVENTIONS.md`](docs/dev/CONVENTIONS.md#the-changelog).
10
10
 
11
+ ## 0.100.0 — 14.11.2026
12
+
13
+ ### Added
14
+
15
+ - `PARITY_GROUPS`' `shared-roots` group takes asterisk-cli (its command is `pbx`), compared like beeline on
16
+ `commands`, `doctor`, `skill`, `mcp` and `upgrade`, and WC-CI-9 reserves 02:48 UTC for its monthly run.
17
+ `cli-dev repo-check` then passes for asterisk-cli without its own `config/parity-groups.json`.
18
+ - `PARITY_GROUPS`' `shared-roots` group takes notion-cli (its command is `notion`), compared on `commands`, `doctor`,
19
+ `skill`, `mcp` and `upgrade` until its documents commands ship, and WC-CI-9 reserves 02:20 UTC for its monthly run.
20
+ `cli-dev repo-check` then passes for notion-cli without its own `config/parity-groups.json`.
21
+
22
+ - **The flag vocabulary has `--setting <name=value>`** (role `value`, string): one of the service's own settings,
23
+ repeated for more. cli-core's shared `meetings create` and `meetings update` take it, so a CLI that mounts them
24
+ passes `option-role` without a baseline line.
25
+
26
+ ### Fixed
27
+
28
+ - **A query's `time` field takes a time without seconds or without an offset**, as cli-core's `--since-time` does:
29
+ `created_at>"2026-10-01T09:00"` and `created_at>"2026-10-01 09:00"` worked as flags but failed as
30
+ `query.invalid-date`. A time with no offset is read in the zone the query is evaluated in (`dateRange`'s `zone`);
31
+ one that daylight saving skips or repeats there is refused and asks for an offset. Watch for: `validateQuery`
32
+ checks a time without an offset in its `zone` option, UTC when none is given.
33
+
11
34
  ## 0.99.0 — 13.11.2026
12
35
 
13
36
  ### Changed — may break callers
@@ -11,7 +11,7 @@ export const timezoneOf = (given) => {
11
11
  };
12
12
  const calendar = (value, span) => {
13
13
  if (!/^\d{4}-\d{2}-\d{2}$/u.test(value))
14
- queryError("query.invalid-date", span, "use an ISO date or a quoted timestamp with offset");
14
+ queryError("query.invalid-date", span, "use an ISO date such as 2026-10-01");
15
15
  const year = Number(value.slice(0, 4)), month = Number(value.slice(5, 7)), day = Number(value.slice(8, 10));
16
16
  const date = new Date(0);
17
17
  date.setUTCFullYear(year, month - 1, day);
@@ -105,6 +105,7 @@ export const zonedMoment = (value, zone, span, { end = false } = {}) => {
105
105
  return time;
106
106
  };
107
107
  const AGO = /^(\d+)(m|h|d)$/u;
108
+ const MOMENT = /^(\d{4}-\d{2}-\d{2})[T ](\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,3})?)?(Z|[+-]\d{2}:\d{2})?$/u;
108
109
  const AGO_MS = { m: 60_000, h: 3_600_000, d: 86_400_000 };
109
110
  const dayOf = (word, zone, now, span) => {
110
111
  const today = new Intl.DateTimeFormat("en-CA", {
@@ -133,14 +134,16 @@ export const dateEndpoint = (value, zone, side, inclusive, span, now = Date.now(
133
134
  time: dayBoundary(value, zone, side === "lower" ? !inclusive : inclusive, span),
134
135
  inclusive: side === "lower",
135
136
  };
136
- if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,3})?(?:Z|[+-]\d{2}:\d{2})$/u.test(value))
137
- queryError("query.invalid-date", span, "use an ISO date, today, yesterday, 30m/2h/7d ago, or a quoted timestamp with offset");
138
- calendar(value.slice(0, 10), span);
139
- const time = Date.parse(value);
140
- if (!Number.isFinite(time) ||
141
- Number(value.slice(11, 13)) > 23 ||
142
- Number(value.slice(14, 16)) > 59 ||
143
- Number(value.slice(17, 19)) > 59)
137
+ const [, day, hour, minute, second = "0", offset] = MOMENT.exec(value) ?? [];
138
+ if (day === undefined)
139
+ queryError("query.invalid-date", span, "use an ISO date, a date and time such as 2026-10-01T09:00 (optional seconds and offset), today, yesterday or " +
140
+ "30m/2h/7d ago");
141
+ const moment = value.replace(" ", "T");
142
+ if (offset === undefined)
143
+ return { time: wallTime(moment, zone, span), inclusive };
144
+ calendar(day, span);
145
+ const time = Date.parse(moment);
146
+ if (!Number.isFinite(time) || Number(hour) > 23 || Number(minute) > 59 || Number(second) > 59)
144
147
  queryError("query.invalid-date", span);
145
148
  return { time, inclusive };
146
149
  };
@@ -143,11 +143,12 @@ export const PARITY_GROUPS = defineParityGroups([
143
143
  covers: ["commands", "upgrade", "notes", "meetings"],
144
144
  differences: FAMILY_SINCE_0_98,
145
145
  },
146
- // bitrix24-cli's search is cli-core's CRM `search all`, and beeline-cli's meetings take call recordings, not
147
- // zoom-cli's: both are compared on the root commands every CLI shares, the way gcal and mail are on theirs.
146
+ // bitrix24-cli's search is cli-core's CRM `search all`, and beeline-cli's and asterisk-cli's meetings take call
147
+ // recordings, not zoom-cli's: they are compared on the root commands every CLI shares, the way gcal and mail are.
148
+ // notion-cli joins here until its documents commands ship; then it moves next to drive.
148
149
  {
149
150
  name: "shared-roots",
150
- members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline"],
151
+ members: ["tg", "max", "memo", "drive", "zm", "wa", "b24", "beeline", "pbx", "notion"],
151
152
  covers: ["commands", "doctor", "skill", "mcp", "upgrade"],
152
153
  differences: [...MEMO_HAS_NO_PROFILES, MEMO_DOCTOR_DEEP],
153
154
  },
@@ -22,6 +22,13 @@ export const CALENDAR_FLAGS = [
22
22
  type: "string",
23
23
  meaning: "a person invited to the event, by email address; repeat it for more",
24
24
  },
25
+ {
26
+ name: "--setting",
27
+ value: "<name=value>",
28
+ role: "value",
29
+ type: "string",
30
+ meaning: "one of the service's own settings, such as a meeting's waiting room; repeat it for more",
31
+ },
25
32
  {
26
33
  name: "--id",
27
34
  value: "<id>",
@@ -168,6 +168,7 @@ its prompt in cli-template says so from cli-template 0.8.0. A CLI on an older te
168
168
  | UTC | Repository |
169
169
  |---|---|
170
170
  | 02:17 | cli-base |
171
+ | 02:20 | notion-cli |
171
172
  | 02:24 | whatsapp-cli |
172
173
  | 02:27 | gcal-cli |
173
174
  | 02:31 | cli-memo |
@@ -175,6 +176,7 @@ its prompt in cli-template says so from cli-template 0.8.0. A CLI on an older te
175
176
  | 02:38 | cli-core |
176
177
  | 02:41 | mail-cli |
177
178
  | 02:45 | drive-cli |
179
+ | 02:48 | asterisk-cli |
178
180
  | 02:52 | cli-testing |
179
181
  | 02:59 | max-cli |
180
182
  | 03:02 | cli-template |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirecat/cli-base",
3
- "version": "0.99.0",
3
+ "version": "0.100.0",
4
4
  "description": "The parts every command line tool needs: output modes, terminal rendering, error model, exit codes, credentials, clocks",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Viacheslav Ptsarev",