@mx-space/cli 0.13.2 → 0.14.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.
Files changed (51) hide show
  1. package/README.md +1 -1
  2. package/ROADMAP.md +1 -1
  3. package/dist/{Lexical.dev-BsbWMhb3.mjs → Lexical.dev-DTxuYHmG.mjs} +4 -4
  4. package/dist/{Lexical.node-DnR_u_Ke.mjs → Lexical.node-BlCLnfA6.mjs} +1 -1
  5. package/dist/{Lexical.prod-B7L8eVsO.mjs → Lexical.prod-CeB9UQuo.mjs} +4 -4
  6. package/dist/{LexicalClipboard.dev-BGSFbuTA.mjs → LexicalClipboard.dev-CdFkLR_D.mjs} +5 -5
  7. package/dist/{LexicalClipboard.node-CUD_tpWb.mjs → LexicalClipboard.node-ktUajxsv.mjs} +1 -1
  8. package/dist/{LexicalClipboard.prod-DQXfRt3h.mjs → LexicalClipboard.prod-DliyLofW.mjs} +5 -5
  9. package/dist/{LexicalCodeCore.dev-B9lK_GSN.mjs → LexicalCodeCore.dev-CL9tHWJX.mjs} +4 -4
  10. package/dist/{LexicalCodeCore.prod-CNWMPXhg.mjs → LexicalCodeCore.prod-BoMSJc29.mjs} +4 -4
  11. package/dist/{LexicalDragon.dev-DRm2bGZ1.mjs → LexicalDragon.dev-CqW7Aq5H.mjs} +2 -2
  12. package/dist/{LexicalDragon.node-d8gPruly.mjs → LexicalDragon.node-DLXctJyy.mjs} +1 -1
  13. package/dist/{LexicalDragon.prod-ey3uKDJF.mjs → LexicalDragon.prod-DHI3T6n5.mjs} +2 -2
  14. package/dist/{LexicalExtension.dev-CXtOJb83.mjs → LexicalExtension.dev-BP-18zns.mjs} +6 -6
  15. package/dist/{LexicalExtension.node-CMsupJZs.mjs → LexicalExtension.node-BWH6xbzG.mjs} +1 -1
  16. package/dist/{LexicalExtension.prod-BCLGhzcg.mjs → LexicalExtension.prod-Cs6OgrDn.mjs} +6 -6
  17. package/dist/{LexicalHeadless.dev-yVDOBd64.mjs → LexicalHeadless.dev-DJp__UcP.mjs} +1 -1
  18. package/dist/{LexicalHeadless.prod-B8qauuEA.mjs → LexicalHeadless.prod-o0v9cIu5.mjs} +1 -1
  19. package/dist/{LexicalHtml.dev-3rdckXIU.mjs → LexicalHtml.dev-DoymwFpG.mjs} +8 -8
  20. package/dist/{LexicalHtml.node-DagZUjQ_.mjs → LexicalHtml.node-CVkbWtUA.mjs} +1 -1
  21. package/dist/{LexicalHtml.prod-B5AQaJDb.mjs → LexicalHtml.prod-C2b3z99k.mjs} +8 -8
  22. package/dist/{LexicalLink.dev-CspSwLNB.mjs → LexicalLink.dev-7cgLOLIe.mjs} +5 -5
  23. package/dist/{LexicalLink.prod-Da-ZW6H5.mjs → LexicalLink.prod-DWFgoXHR.mjs} +5 -5
  24. package/dist/{LexicalList.dev-CNXmV6v8.mjs → LexicalList.dev-Ci2iOxFx.mjs} +4 -4
  25. package/dist/{LexicalList.prod-DgQzj4v9.mjs → LexicalList.prod-D0xX5d3G.mjs} +4 -4
  26. package/dist/{LexicalMarkdown.dev-0XURdo96.mjs → LexicalMarkdown.dev-C0ZYCyuR.mjs} +4 -4
  27. package/dist/{LexicalMarkdown.prod-qUsIQfJx.mjs → LexicalMarkdown.prod-0M-Nc-rh.mjs} +4 -4
  28. package/dist/{LexicalRichText.dev-BqsEA7I9.mjs → LexicalRichText.dev-Cnr1kDym.mjs} +7 -7
  29. package/dist/{LexicalRichText.node-D73RR0Ck.mjs → LexicalRichText.node-BUJZAiap.mjs} +4 -4
  30. package/dist/{LexicalRichText.prod-4Atyd7OR.mjs → LexicalRichText.prod-BfbMQ9uM.mjs} +7 -7
  31. package/dist/{LexicalSelection.dev-DK5xfxKP.mjs → LexicalSelection.dev-C4L7l8OB.mjs} +1 -1
  32. package/dist/{LexicalSelection.node-pyZyrANz.mjs → LexicalSelection.node-CLKroUMQ.mjs} +1 -1
  33. package/dist/{LexicalSelection.prod-C5GrCbDC.mjs → LexicalSelection.prod-DzFqpTlw.mjs} +1 -1
  34. package/dist/{LexicalTable.dev-DiR_4rdI.mjs → LexicalTable.dev-Cc9-zqKa.mjs} +7 -7
  35. package/dist/{LexicalTable.prod-Cbc5EasT.mjs → LexicalTable.prod-BgO4nCxy.mjs} +7 -7
  36. package/dist/{LexicalUtils.dev-jhPjn1vQ.mjs → LexicalUtils.dev-BRgK0L6G.mjs} +2 -2
  37. package/dist/{LexicalUtils.node-Ck74ludK.mjs → LexicalUtils.node-BVAwOkL4.mjs} +1 -1
  38. package/dist/{LexicalUtils.prod-nuTBxnk_.mjs → LexicalUtils.prod-C1gtvVDP.mjs} +2 -2
  39. package/dist/bin/mxs.mjs +1 -1
  40. package/dist/{esm-DupC6TTP.mjs → esm-BNu4sUWV.mjs} +6 -6
  41. package/dist/esm-jbwcVZth.mjs +2 -0
  42. package/dist/index.mjs +1 -1
  43. package/dist/{mxs-BgAyMQdq.mjs → mxs-BUqt-N3N.mjs} +928 -656
  44. package/dist/vendor/litexml/cli.mjs +24150 -0
  45. package/dist/vendor/litexml/litexml-html-preview-client.css +8862 -0
  46. package/dist/vendor/litexml/litexml-html-preview-client.js +163814 -0
  47. package/dist/vendor/litexml/style.css +96 -0
  48. package/package.json +13 -14
  49. package/skills/commands-draft.md +45 -0
  50. package/skills/commands-preview.md +3 -3
  51. package/dist/esm-BumPuCXw.mjs +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/cli",
3
- "version": "0.13.2",
3
+ "version": "0.14.0",
4
4
  "description": "Command line interface for mx-space (mx-core) — auth, content, configuration",
5
5
  "keywords": [
6
6
  "mx-space",
@@ -47,16 +47,20 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "dependencies": {
50
+ "devDependencies": {
51
51
  "@clack/prompts": "^1.6.0",
52
52
  "@effect/cli": "0.75.2",
53
53
  "@effect/platform": "0.96.2",
54
54
  "@effect/platform-node": "0.107.0",
55
- "@haklex/rich-headless": "0.29.1",
56
- "@haklex/rich-litexml": "0.29.0",
57
- "@haklex/rich-litexml-cli": "0.29.0",
55
+ "@effect/vitest": "0.29.0",
56
+ "@haklex/rich-compose": "0.30.1",
57
+ "@haklex/rich-headless": "0.30.0",
58
+ "@haklex/rich-litexml": "0.30.0",
59
+ "@haklex/rich-litexml-cli": "0.30.1",
58
60
  "@lexical/headless": "^0.46.0",
59
- "better-auth": "^1.6.20",
61
+ "@types/node": "26.0.1",
62
+ "@types/semver": "7.7.1",
63
+ "better-auth": "^1.6.23",
60
64
  "effect": "3.21.4",
61
65
  "fast-xml-parser": "5.9.3",
62
66
  "get-east-asian-width": "^1.6.0",
@@ -64,17 +68,12 @@
64
68
  "minisearch": "^7.2.0",
65
69
  "open": "^11.0.0",
66
70
  "semver": "7.8.5",
67
- "@mx-space/api-client": "5.4.0",
68
- "@mx-space/editor": "0.2.0"
69
- },
70
- "devDependencies": {
71
- "@effect/vitest": "0.29.0",
72
- "@types/node": "26.0.0",
73
- "@types/semver": "7.7.1",
74
71
  "tsdown": "0.22.3",
75
72
  "tsx": "^4.22.4",
76
73
  "typescript": "6.0.3",
77
- "vitest": "4.1.9"
74
+ "vitest": "4.1.9",
75
+ "@mx-space/editor": "0.2.0",
76
+ "@mx-space/api-client": "5.4.0"
78
77
  },
79
78
  "scripts": {
80
79
  "package": "rm -rf dist && tsdown",
@@ -0,0 +1,45 @@
1
+ ---
2
+ slug: commands-draft
3
+ title: Draft commands
4
+ description: draft list/get/create/update/publish/delete syntax — standalone server-side drafts
5
+ order: 43
6
+ ---
7
+
8
+ # Draft commands
9
+
10
+ Drafts are standalone server-side entities, separate from a post's publish
11
+ state. A new draft is not visible anywhere on the site until `draft publish`
12
+ turns it into a real post/note/page. Drafts keep version history on every
13
+ content change.
14
+
15
+ | Command | Purpose | Flags |
16
+ | ------------------------ | ----------------------------------------------------------- | -------------------------------------------------------------------------- |
17
+ | `mxs draft list` | List drafts. | `--type post\|note\|page`, `--new` (unlinked only), `--linked`, `--page`, `--size` |
18
+ | `mxs draft get <id>` | Read a draft by Snowflake id. | global flags |
19
+ | `mxs draft create` | Create a standalone post draft. | same authoring flags as `post create` (`--file`, `--title`, `--content`, `--format`, `--meta`, ...); `--silent` emits `{ok, id}` |
20
+ | `mxs draft update <id>` | Update a draft; bumps version, records history. | same authoring flags; `--silent` |
21
+ | `mxs draft publish <id>` | Publish: creates the live post/note/page (or applies to the linked one). | `--silent`, `--open` |
22
+ | `mxs draft delete <id>` | Delete a draft. | `--force`; prefer `--dry-run` first |
23
+
24
+ ## Recommended authoring flow for a new post
25
+
26
+ ```bash
27
+ mxs draft create --file article.xml --silent # → { ok: true, id: <draftId> }
28
+ mxs draft update <draftId> --file article.xml # iterate after review feedback
29
+ mxs draft publish <draftId> # go live in one step
30
+ ```
31
+
32
+ Notes:
33
+
34
+ - `draft create` always targets `refType: post`. Note/page drafts are
35
+ authored in the admin dashboard; `draft publish` handles all three types.
36
+ - `--state` is ignored for drafts: a draft has no publish state.
37
+ `draft publish` always makes the result live.
38
+ - For staging changes to an **already published** post, prefer
39
+ `mxs post stage <slugOrId>` + `mxs post apply <slugOrId>` — same server
40
+ entity, resolved by post slug instead of draft id.
41
+ - `publish` sends `draftId` to the server, which links the draft to the
42
+ created resource and marks the draft version as published; the draft and
43
+ its history are retained.
44
+
45
+ Dry-run support: `create`, `update`, `publish`, `delete`.
@@ -7,7 +7,7 @@ order: 41
7
7
 
8
8
  # Preview command
9
9
 
10
- `mxs preview` renders a LiteXML fragment or `<mxpost>` / `<mxnote>` envelope to HTML and (by default) opens it in the system browser. It is a thin wrapper around the `@haklex/rich-litexml-cli` `litexml --format html` pipeline, so the output matches what the editor would render once published.
10
+ `mxs preview` renders a LiteXML fragment or `<mxpost>` / `<mxnote>` envelope to HTML and (by default) opens it in the system browser. It uses the LiteXML preview renderer vendored into the published CLI bundle, so the output matches what the editor would render once published without requiring runtime package dependencies.
11
11
 
12
12
  | Command | Behavior |
13
13
  | ---------------------------------------- | --------------------------------------------------------------------------- |
@@ -56,7 +56,7 @@ mxs preview ./post.xml --print > preview.html
56
56
 
57
57
  | Symptom | Likely cause |
58
58
  | -------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
59
- | `cannot resolve @haklex/rich-litexml-cli binary` | Installed dep is broken; reinstall `@mx-space/cli` or run `pnpm install`. |
60
- | `Cannot resolve @haklex/rich-compose asset "style.css"` | Outdated `@haklex/rich-compose` (< 0.15.2). Upgrade or reinstall. |
59
+ | `cannot resolve LiteXML preview renderer` | Published package is incomplete; reinstall `@mx-space/cli` or rebuild the CLI package. |
60
+ | `Cannot resolve @haklex/rich-compose asset "style.css"` | Vendored preview assets are missing; reinstall `@mx-space/cli` or rebuild the CLI package. |
61
61
  | `expected root <mxpost>` / `expected root <mxnote>` | Input begins with the wrong envelope root, or the envelope is malformed. Check the root tag. |
62
62
  | Browser does not open | `--open` shells out to the system `open`/`xdg-open`/`start`. Use `--save` or `--print` instead. |
@@ -1,2 +0,0 @@
1
- import { E as Schema_exports } from "./esm-DupC6TTP.mjs";
2
- export { Schema_exports as Schema };