@mx-space/cli 0.13.3 → 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.
@@ -71204,6 +71204,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71204
71204
  //#endregion
71205
71205
  //#region ../rich-ext-dynamic/src/DynamicHostRenderer.tsx
71206
71206
  init_static_entry();
71207
+ var importRemoteModule = new Function("url", "return import(url)");
71207
71208
  function parseProps(json) {
71208
71209
  try {
71209
71210
  const value = JSON.parse(json);
@@ -71246,10 +71247,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
71246
71247
  const container = document.createElement("div");
71247
71248
  container.style.minHeight = `${initialHeight}px`;
71248
71249
  shadow.append(container);
71249
- import(
71250
- /* @vite-ignore */
71251
- url
71252
- ).then((mod) => {
71250
+ importRemoteModule(url).then((mod) => {
71253
71251
  if (cancelled) return;
71254
71252
  const component = mod?.default;
71255
71253
  if (!isDynamicComponentModule(component)) throw new Error("module default export does not implement the dynamic mount protocol");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/cli",
3
- "version": "0.13.3",
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",
@@ -53,10 +53,10 @@
53
53
  "@effect/platform": "0.96.2",
54
54
  "@effect/platform-node": "0.107.0",
55
55
  "@effect/vitest": "0.29.0",
56
- "@haklex/rich-compose": "0.29.2",
57
- "@haklex/rich-headless": "0.29.1",
58
- "@haklex/rich-litexml": "0.29.0",
59
- "@haklex/rich-litexml-cli": "0.29.3",
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",
60
60
  "@lexical/headless": "^0.46.0",
61
61
  "@types/node": "26.0.1",
62
62
  "@types/semver": "7.7.1",
@@ -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`.