@mdfn/server 0.1.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 +26 -0
- package/dist/index.cjs +737 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +159 -0
- package/dist/index.d.ts +159 -0
- package/dist/index.js +718 -0
- package/dist/index.js.map +1 -0
- package/package.json +9 -0
package/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# `@mdfn/server`
|
|
2
|
+
|
|
3
|
+
Self-hosted document CRUD, canonical source validation, optimistic versioning,
|
|
4
|
+
immutable revisions, editorial workflows, persisted collaboration updates,
|
|
5
|
+
authorization hooks, and a Web Standard router. The incoming
|
|
6
|
+
`@superfunctions/db` adapter is always wrapped internally with the MDFN schema.
|
|
7
|
+
|
|
8
|
+
Durable mode is the default and rejects database adapters without transaction
|
|
9
|
+
and relational-constraint support. Create/update/restore/editorial writes
|
|
10
|
+
validate both Markdown and the complete sidecar, run atomically, and support idempotency through the
|
|
11
|
+
`Idempotency-Key` header or request body. Delete atomically removes the
|
|
12
|
+
document, revisions, receipts, and collaboration updates. Ephemeral mode must
|
|
13
|
+
be selected explicitly and is intended only for memory-backed tests.
|
|
14
|
+
|
|
15
|
+
The router exposes document and version CRUD, version restore, sidecar and
|
|
16
|
+
audit reads, comment/reply/resolve, suggestion/decision, review transitions,
|
|
17
|
+
and collaboration update append/read/compact routes under `/api/mdfn` by
|
|
18
|
+
default. Version history returns bounded lightweight metadata pages; fetch an
|
|
19
|
+
individual version for its Markdown and sidecar. Collaboration reads return a
|
|
20
|
+
bounded page containing the updates, their exact `includedUpdateIds`, and a
|
|
21
|
+
stable `nextCursor` when another page remains; pass that cursor back as the
|
|
22
|
+
`cursor` query parameter. Compaction requires the represented ids and preserves
|
|
23
|
+
updates that arrive concurrently without invalidating an existing cursor. The
|
|
24
|
+
default collaboration and router body limits are derived from the configured maximum
|
|
25
|
+
Markdown size plus Yjs and transport-encoding overhead. Every operation is
|
|
26
|
+
tenant/owner scoped and passes through the host's authorization callback.
|