First step of docs/git-sync-plan.md. New workspace package @docmost/git-sync vendoring the PURE parts from docmost-sync (HEAD b03eb35): - lib: markdown-converter, markdown-document, canonicalize, docmost-schema, node-ops, diff, and an extracted markdown-to-prosemirror (only the pure marked->HTML->generateJSON path from upstream collaboration.ts; no websocket). - engine (pure, no IO): reconcile, layout, sanitize, stabilize, loop-guard. Ported the upstream pure-module + round-trip corpus tests (vitest): 314 pass, 3 expected upstream known-limitation fails. tsc clean. No server wiring yet. docmost-schema inlines getStyleProperty (as packages/mcp does — @tiptap/core 3.20.4 doesn't export it). IO engine (pull/push/git/settings) deferred to later Phase A/B steps; the editor-ext idempotency gate (plan §13.1) is the next step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
967 B
JavaScript
17 lines
967 B
JavaScript
/**
|
|
* Public surface of the vendored pure converter (the `lib/` half of the
|
|
* docmost-sync `docmost-client` package). This barrel re-exports only the
|
|
* PURE, IO-free pieces the sync engine needs: the self-contained markdown
|
|
* (de)serializers, the lossless ProseMirror <-> Markdown converter, the
|
|
* markdown -> ProseMirror import path, and semantic canonicalization for the
|
|
* round-trip idempotency check (SPEC §11).
|
|
*
|
|
* The REST client, websocket/collab write-path, auth-utils and page-lock from
|
|
* the upstream package are deliberately NOT vendored (the gitmost server writes
|
|
* natively — plan §2.2/§2.3).
|
|
*/
|
|
export { serializeDocmostMarkdown, parseDocmostMarkdown, serializeDocmostMarkdownBody, } from "./markdown-document.js";
|
|
export { convertProseMirrorToMarkdown } from "./markdown-converter.js";
|
|
export { markdownToProseMirror } from "./markdown-to-prosemirror.js";
|
|
export { canonicalizeContent, docsCanonicallyEqual, } from "./canonicalize.js";
|