@mx-space/cli 0.4.0 → 0.5.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/README.md +48 -3
- package/ROADMAP.md +11 -7
- package/dist/bin/mxs.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{mxs-BbNjmEgB.mjs → mxs-Dsh_ZkeN.mjs} +863 -210
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,9 +19,11 @@ Node.js 22 or newer is required.
|
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
mxs auth login
|
|
22
|
-
mxs post create --file ./post.xml
|
|
23
|
-
mxs post
|
|
24
|
-
|
|
22
|
+
mxs post create --file ./post.xml --open --silent # open admin preview, terse output
|
|
23
|
+
mxs post get my-slug --output xml > /tmp/post.xml # round-trip envelope
|
|
24
|
+
# edit /tmp/post.xml ...
|
|
25
|
+
mxs post update my-slug --file /tmp/post.xml --open
|
|
26
|
+
mxs post publish my-slug
|
|
25
27
|
```
|
|
26
28
|
|
|
27
29
|
When the CLI cannot resolve an API URL, it starts an interactive onboarding prompt in TTY contexts. Use `MXS_API_URL` or `--api-url` for non-interactive environments.
|
|
@@ -206,6 +208,14 @@ Existing installations that use the legacy flat files (`~/.config/mxs/config.jso
|
|
|
206
208
|
| `--related <csv>` | Comma-separated related document ids. |
|
|
207
209
|
| `--meta <spec>` | JSON literal or `file=<path>`. |
|
|
208
210
|
| `--file <path>` | LiteXML envelope. |
|
|
211
|
+
| `--open` | After success, open the admin edit page in the default browser. |
|
|
212
|
+
| `--silent` | On success, emit `ok` instead of the full server response. |
|
|
213
|
+
|
|
214
|
+
`--open` and `--silent` are also available on `post update`, `post edit`,
|
|
215
|
+
`note create`/`update`, and `page create`/`update`. The admin URL is
|
|
216
|
+
resolved from the server's `/options/url.admin_url` config; the opened
|
|
217
|
+
URL follows the admin-vue3 hash-router convention
|
|
218
|
+
(`${admin_url}#/<kind>/edit?id=<id>`).
|
|
209
219
|
|
|
210
220
|
## Notes
|
|
211
221
|
|
|
@@ -314,6 +324,41 @@ Page edit and page file payloads currently reuse the `<mxpost>` envelope shape.
|
|
|
314
324
|
| `--description <text>` | `description` |
|
|
315
325
|
| `--icon <text>` | `icon` |
|
|
316
326
|
|
|
327
|
+
## Comments
|
|
328
|
+
|
|
329
|
+
Moderation commands for the comment queue. `state` is one of `unread`, `read`, or `junk` (server-side codes `0`, `1`, `2`).
|
|
330
|
+
|
|
331
|
+
| Command | Description |
|
|
332
|
+
| -------------------------------------- | ----------------------------------------------------------------- |
|
|
333
|
+
| `mxs comment list` | List comments (default `--state unread`). |
|
|
334
|
+
| `mxs comment unread` | Shortcut for `comment list --state unread` (accepts `--page` / `--size`). |
|
|
335
|
+
| `mxs comment get <id>` | Show a single comment by id. |
|
|
336
|
+
| `mxs comment approve <id...>` | Mark one or more comments as read (state→1). |
|
|
337
|
+
| `mxs comment reject <id...>` | Mark one or more comments as junk (state→2). |
|
|
338
|
+
| `mxs comment delete <id...>` | Soft-delete one or more comments. |
|
|
339
|
+
|
|
340
|
+
### Comment List Flags
|
|
341
|
+
|
|
342
|
+
| Flag | Description |
|
|
343
|
+
| ----------------------------- | -------------------------------------------------------------------------- |
|
|
344
|
+
| `--page <n>` / `--size <n>` | Standard paging knobs. |
|
|
345
|
+
| `--state <unread|read|junk>` | Filter by state. Defaults to `unread`. |
|
|
346
|
+
| `--all` | Aggregate every state into one response (issues three parallel requests). |
|
|
347
|
+
|
|
348
|
+
### Comment Moderation Flags
|
|
349
|
+
|
|
350
|
+
| Flag | Applies to | Description |
|
|
351
|
+
| ----------------------------- | ----------------------- | -------------------------------------------------------------------------- |
|
|
352
|
+
| `--all` | approve, reject, delete | Apply to every comment instead of the explicit `<id...>` list. |
|
|
353
|
+
| `--state <unread|read|junk>` | approve, reject, delete | When used with `--all`, restricts the affected set by current state. |
|
|
354
|
+
| `--force` | delete, any `--all` | Required in non-TTY contexts to confirm destructive operations. |
|
|
355
|
+
|
|
356
|
+
Guard summary:
|
|
357
|
+
|
|
358
|
+
- `delete` of a single id refuses to run in a non-TTY context without `--force`.
|
|
359
|
+
- Any `--all` invocation (`approve`, `reject`, `delete`) refuses to run in a non-TTY context without `--force`.
|
|
360
|
+
- `approve` and `reject` of explicit ids run without confirmation.
|
|
361
|
+
|
|
317
362
|
## Configuration
|
|
318
363
|
|
|
319
364
|
| Command | Description |
|
package/ROADMAP.md
CHANGED
|
@@ -8,7 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
- Internal rewrite onto Effect-TS (`@effect/cli` + `@effect/platform`). User-facing CLI surface is unchanged — see [`README.md`](./README.md#v030-behavior-changes) for the small list of behavioral adjustments and [`docs/architecture.md`](./docs/architecture.md) for the new internal architecture.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Next — Comment moderation
|
|
12
|
+
|
|
13
|
+
- `mxs comment list [--page N] [--size N] [--state unread|read|junk] [--all]`
|
|
14
|
+
- `mxs comment get <id>`
|
|
15
|
+
- `mxs comment approve <id...> | --all [--state <s>]`
|
|
16
|
+
- `mxs comment reject <id...> | --all [--state <s>]`
|
|
17
|
+
- `mxs comment delete <id...> | --all [--state <s>] [--force]`
|
|
18
|
+
|
|
19
|
+
State map: `unread=0`, `read=1`, `junk=2`. Routes single-id verbs through the server's batch endpoints (`PATCH /comments/batch/state`, `DELETE /comments/batch`) for one unified path.
|
|
20
|
+
|
|
21
|
+
## v2 — AI
|
|
12
22
|
|
|
13
23
|
> **Note (v0.3):** Service interface placeholders for AI, Backup, and Cache are reserved in `src/services/{Ai,Backup,Cache}.ts` and threaded through the layer composition. Implementation is pending.
|
|
14
24
|
|
|
@@ -17,12 +27,6 @@
|
|
|
17
27
|
- `mxs ai translate <id> --to <locale>`
|
|
18
28
|
- `mxs ai insights refresh`
|
|
19
29
|
- `mxs ai tokens`
|
|
20
|
-
- Comment moderation
|
|
21
|
-
- `mxs comment list`
|
|
22
|
-
- `mxs comment approve <id>`
|
|
23
|
-
- `mxs comment reject <id>`
|
|
24
|
-
- `mxs comment delete <id>`
|
|
25
|
-
- Markdown → Lexical bridge (contingent on a haklex reader)
|
|
26
30
|
|
|
27
31
|
## v3
|
|
28
32
|
|
package/dist/bin/mxs.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-
|
|
1
|
+
import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-Dsh_ZkeN.mjs";
|
|
2
2
|
export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };
|