Lock the access-layer decision (REST only) and start implementation per SPEC. - monorepo (npm workspaces): packages/docmost-client = DocmostClient + lib/* copied 1:1 from docmost-mcp/src (backport target), plus bannered sync methods (listTrash, restorePage, listAllSpacePages, exportPageBody, listRecentSince / collectRecentSince cursor scan) - engine stays the root app per AGENTS.md (src/, test/, build/, data/, settings.ts); add roundtrip.ts (SPEC §11 idempotency harness), pull.ts (SPEC §6 read-only Docmost->FS mirror), sanitize.ts (SPEC §12 filenames, path-traversal-safe) - Dockerfile builds the workspace lib before the app; vitest gates CI - exportPageBody never touches /comments (SPEC §3); serializeDocmostMarkdownBody emits meta + body only - SPEC: resolve access-layer (REST), reflect root-engine layout + REST pagination - tests: sanitize (incl. dot-traversal), collectRecentSince (cutoff/dedup/cap), stripBlockIds, markdown round-trip byte-stability Note: raw ProseMirror round-trip is byte-stable in Markdown but not yet attribute- idempotent (SPEC §11 Задача №0, before Phase 2).
31 lines
821 B
JSON
31 lines
821 B
JSON
{
|
|
"name": "docmost-sync",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "Bidirectional sync daemon between Docmost articles and a local Markdown git vault (git is the state store). See SPEC.md.",
|
|
"license": "MIT",
|
|
"workspaces": ["packages/*"],
|
|
"engines": { "node": ">=20" },
|
|
"scripts": {
|
|
"build": "npm run build -w docmost-client && tsc",
|
|
"start": "node build/index.js",
|
|
"dev": "tsx watch src/index.ts",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"roundtrip": "node build/roundtrip.js",
|
|
"pull": "node build/pull.js"
|
|
},
|
|
"dependencies": {
|
|
"docmost-client": "*",
|
|
"dotenv": "17.4.2",
|
|
"zod": "3.25.76"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "22.19.21",
|
|
"tsx": "4.22.4",
|
|
"typescript": "5.9.3",
|
|
"vitest": "3.2.6"
|
|
}
|
|
}
|