@khorsheed/dsh-library 0.0.0-stage → 0.1.1
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/CHANGELOG.md +19 -0
- package/README.en.md +49 -0
- package/README.i18n.yaml +6 -0
- package/README.md +48 -2
- package/cordis.patch.yml +17 -0
- package/lib/client.js +66334 -0
- package/lib/index.js +3318 -0
- package/lib/profiles-CFrPQdfO.js +1692 -0
- package/lib/tool.js +1597 -0
- package/lib/typert.host.d.ts +3 -0
- package/lib/typert.host.js +3811 -0
- package/lib/typert.remote-client.d.ts +137 -0
- package/lib/typert.remote-client.js +3077 -0
- package/lib/types/cards.d.ts +41 -0
- package/lib/types/cards.js +111 -0
- package/lib/types/client/LibraryPane.d.ts +26 -0
- package/lib/types/client/LibraryPane.js +129 -0
- package/lib/types/client/bind/BindChip.d.ts +33 -0
- package/lib/types/client/bind/BindChip.js +102 -0
- package/lib/types/client/contract.d.ts +167 -0
- package/lib/types/client/contract.js +1 -0
- package/lib/types/client/covers.d.ts +36 -0
- package/lib/types/client/covers.js +66 -0
- package/lib/types/client/definition.d.ts +27 -0
- package/lib/types/client/definition.js +32 -0
- package/lib/types/client/icons-local.d.ts +41 -0
- package/lib/types/client/icons-local.js +25 -0
- package/lib/types/client/icons.d.ts +27 -0
- package/lib/types/client/icons.js +11 -0
- package/lib/types/client/index.d.ts +35 -0
- package/lib/types/client/index.js +231 -0
- package/lib/types/client/judge.d.ts +70 -0
- package/lib/types/client/judge.js +262 -0
- package/lib/types/client/locales.d.ts +553 -0
- package/lib/types/client/locales.js +1076 -0
- package/lib/types/client/look.d.ts +63 -0
- package/lib/types/client/look.js +64 -0
- package/lib/types/client/math.d.ts +24 -0
- package/lib/types/client/math.js +47 -0
- package/lib/types/client/mistakes.d.ts +21 -0
- package/lib/types/client/mistakes.js +28 -0
- package/lib/types/client/preset-visibility.d.ts +109 -0
- package/lib/types/client/preset-visibility.js +123 -0
- package/lib/types/client/quiz-drafts.d.ts +29 -0
- package/lib/types/client/quiz-drafts.js +50 -0
- package/lib/types/client/reveal.d.ts +21 -0
- package/lib/types/client/reveal.js +31 -0
- package/lib/types/client/store.d.ts +111 -0
- package/lib/types/client/store.js +48 -0
- package/lib/types/client/titles.d.ts +17 -0
- package/lib/types/client/titles.js +23 -0
- package/lib/types/client/ui.d.ts +96 -0
- package/lib/types/client/ui.js +124 -0
- package/lib/types/client/views/book.d.ts +57 -0
- package/lib/types/client/views/book.js +164 -0
- package/lib/types/client/views/cards.d.ts +17 -0
- package/lib/types/client/views/cards.js +53 -0
- package/lib/types/client/views/home.d.ts +26 -0
- package/lib/types/client/views/home.js +263 -0
- package/lib/types/client/views/lesson.d.ts +42 -0
- package/lib/types/client/views/lesson.js +146 -0
- package/lib/types/client/views/path.d.ts +32 -0
- package/lib/types/client/views/path.js +64 -0
- package/lib/types/client/views/quiz.d.ts +42 -0
- package/lib/types/client/views/quiz.js +366 -0
- package/lib/types/client/views/station-quiz.d.ts +43 -0
- package/lib/types/client/views/station-quiz.js +203 -0
- package/lib/types/client/views/station.d.ts +18 -0
- package/lib/types/client/views/station.js +142 -0
- package/lib/types/image-refs.d.ts +35 -0
- package/lib/types/image-refs.js +71 -0
- package/lib/types/index.d.ts +51 -0
- package/lib/types/index.js +31 -0
- package/lib/types/mastery.d.ts +81 -0
- package/lib/types/mastery.js +110 -0
- package/lib/types/profiles.d.ts +31 -0
- package/lib/types/profiles.js +25 -0
- package/lib/types/remote.d.ts +355 -0
- package/lib/types/remote.js +332 -0
- package/lib/types/service/assess.d.ts +144 -0
- package/lib/types/service/assess.js +773 -0
- package/lib/types/service/bindings.d.ts +92 -0
- package/lib/types/service/bindings.js +198 -0
- package/lib/types/service/cards.d.ts +85 -0
- package/lib/types/service/cards.js +320 -0
- package/lib/types/service/core.d.ts +124 -0
- package/lib/types/service/core.js +169 -0
- package/lib/types/service/pages.d.ts +60 -0
- package/lib/types/service/pages.js +125 -0
- package/lib/types/service/roadmap.d.ts +99 -0
- package/lib/types/service/roadmap.js +284 -0
- package/lib/types/service/rules.d.ts +63 -0
- package/lib/types/service/rules.js +245 -0
- package/lib/types/service/shelf.d.ts +136 -0
- package/lib/types/service/shelf.js +422 -0
- package/lib/types/service.d.ts +42 -0
- package/lib/types/service.js +41 -0
- package/lib/types/store.d.ts +257 -0
- package/lib/types/store.js +1376 -0
- package/lib/types/tool-definition.d.ts +49 -0
- package/lib/types/tool-definition.js +49 -0
- package/lib/types/tool.d.ts +71 -0
- package/lib/types/tool.js +174 -0
- package/lib/types/tools/assess.d.ts +11 -0
- package/lib/types/tools/assess.js +82 -0
- package/lib/types/tools/binding.d.ts +11 -0
- package/lib/types/tools/binding.js +46 -0
- package/lib/types/tools/cards.d.ts +11 -0
- package/lib/types/tools/cards.js +100 -0
- package/lib/types/tools/kit.d.ts +215 -0
- package/lib/types/tools/kit.js +281 -0
- package/lib/types/tools/notes.d.ts +11 -0
- package/lib/types/tools/notes.js +40 -0
- package/lib/types/tools/page.d.ts +11 -0
- package/lib/types/tools/page.js +59 -0
- package/lib/types/tools/project.d.ts +11 -0
- package/lib/types/tools/project.js +67 -0
- package/lib/types/tools/quiz.d.ts +11 -0
- package/lib/types/tools/quiz.js +74 -0
- package/lib/types/tools/read.d.ts +11 -0
- package/lib/types/tools/read.js +127 -0
- package/lib/types/tools/resource.d.ts +11 -0
- package/lib/types/tools/resource.js +147 -0
- package/lib/types/tools/roadmap.d.ts +11 -0
- package/lib/types/tools/roadmap.js +102 -0
- package/lib/types/types.d.ts +752 -0
- package/lib/types/types.js +159 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +135 -3
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { type LibraryAssessment, type LibraryAttachmentRef, type LibraryAttempt, type LibraryBinding, type LibraryCard, type LibraryEvent, type LibraryNodeCover, type LibraryPage, type LibraryProject, type LibraryResource, type LibraryRoadmap } from './types.ts';
|
|
2
|
+
/** A store failure that the service maps onto a refusal. */
|
|
3
|
+
export declare class LibraryStoreError extends Error {
|
|
4
|
+
readonly kind: 'io' | 'corrupt' | 'unavailable';
|
|
5
|
+
constructor(message: string, kind: 'io' | 'corrupt' | 'unavailable');
|
|
6
|
+
}
|
|
7
|
+
/** Assert an id is usable as a path segment (no traversal, no separators). */
|
|
8
|
+
export declare function assertLibraryId(id: string, what: string): void;
|
|
9
|
+
/** Mint a store id: a readable prefix plus time-and-random uniqueness. */
|
|
10
|
+
export declare function mintLibraryId(prefix: string): string;
|
|
11
|
+
/** A held lock; `release` is idempotent. */
|
|
12
|
+
export interface LibraryLock {
|
|
13
|
+
release(): void;
|
|
14
|
+
}
|
|
15
|
+
/** Acquire the lock file, waiting out live owners and reclaiming stale ones. */
|
|
16
|
+
export declare function acquireLibraryLock(lockPath: string): Promise<LibraryLock>;
|
|
17
|
+
/** `state.json`: the version-guarded index of projects. */
|
|
18
|
+
export interface LibraryIndexDoc {
|
|
19
|
+
readonly version: number;
|
|
20
|
+
readonly projects: readonly LibraryProject[];
|
|
21
|
+
}
|
|
22
|
+
/** The empty index. */
|
|
23
|
+
export declare function emptyLibraryIndex(): LibraryIndexDoc;
|
|
24
|
+
/**
|
|
25
|
+
* Coerce a parsed value into an index. A version this store does not
|
|
26
|
+
* recognize reads as empty — v2 through v5 all read tolerantly (every entity
|
|
27
|
+
* normalize accepts the older shapes; `migrateState` still rewrites v2
|
|
28
|
+
* chapterRanges into covers).
|
|
29
|
+
*/
|
|
30
|
+
export declare function normalizeLibraryIndex(value: unknown): LibraryIndexDoc;
|
|
31
|
+
/** One project, when it carries the fields that make it one. */
|
|
32
|
+
export declare function normalizeProject(value: unknown): LibraryProject | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* One shelf entry, when it parses. Reads BOTH layouts: a v5
|
|
35
|
+
* `resources/<id>.json` (kind may be 'book', toc/meta live at the top) and a
|
|
36
|
+
* legacy one — a `books/<id>/book.json` (kind forced to 'book', book-ish
|
|
37
|
+
* fields folded into meta) or a `resources.jsonl` line (a thin link).
|
|
38
|
+
*/
|
|
39
|
+
export declare function normalizeResource(value: unknown): LibraryResource | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The shelf's reading order: textbooks (thick) before thin links; textbooks
|
|
42
|
+
* by `seq`, unnumbered ones after the numbered, ties by age; links by age.
|
|
43
|
+
*/
|
|
44
|
+
export declare function shelfOrder(a: LibraryResource, b: LibraryResource): number;
|
|
45
|
+
/**
|
|
46
|
+
* One node's cover, when it parses. Reads the v5 shape (`{ ref, locator? }`)
|
|
47
|
+
* and every legacy union member: `{ kind: 'book', bookId, ranges }`,
|
|
48
|
+
* `{ kind: 'resource', resourceId }`, `{ kind: 'url', url, title? }`,
|
|
49
|
+
* `{ kind: 'topic', text }`. Provenance rides along when present.
|
|
50
|
+
*/
|
|
51
|
+
export declare function normalizeNodeCover(value: unknown): LibraryNodeCover | undefined;
|
|
52
|
+
/** One roadmap (adopted or draft), when it parses; rule checks live in the service. */
|
|
53
|
+
export declare function normalizeRoadmap(value: unknown): LibraryRoadmap | undefined;
|
|
54
|
+
/** An attachment reference, when every durable field is present. */
|
|
55
|
+
export declare function normalizeAttachmentRef(value: unknown): LibraryAttachmentRef | undefined;
|
|
56
|
+
/** One photographed page (one pages/<resourceId>.jsonl line), when it parses. */
|
|
57
|
+
export declare function normalizePage(value: unknown): LibraryPage | undefined;
|
|
58
|
+
/** One knowledge card (one cards.jsonl line), when it parses. */
|
|
59
|
+
export declare function normalizeCard(value: unknown): LibraryCard | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Options arrive as plain strings, as { label } objects, or letter-keyed maps —
|
|
62
|
+
* the stored form is always plain strings, letter prefixes ("A) ") stripped
|
|
63
|
+
* (the answering UI badges the letter itself).
|
|
64
|
+
*/
|
|
65
|
+
export declare function normalizeQuizOptions(value: unknown): string[] | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* One assessment, when it parses. Reads BOTH shapes: a v5
|
|
68
|
+
* `assessments/<id>.json` (type quiz | practice, scope.resourceId) and a
|
|
69
|
+
* legacy `quizzes/<id>.json` (a quiz — scope.bookId folds into resourceId).
|
|
70
|
+
*/
|
|
71
|
+
export declare function normalizeAssessment(value: unknown): LibraryAssessment | undefined;
|
|
72
|
+
/** One attempt (one attempts.jsonl line), when it parses. */
|
|
73
|
+
export declare function normalizeAttempt(value: unknown): LibraryAttempt | undefined;
|
|
74
|
+
/** One audit event (one events.jsonl line), when it parses. */
|
|
75
|
+
export declare function normalizeEvent(value: unknown): LibraryEvent | undefined;
|
|
76
|
+
/** The bindings map, dropping rows that do not parse. */
|
|
77
|
+
export declare function normalizeBindings(value: unknown): Map<string, LibraryBinding>;
|
|
78
|
+
/**
|
|
79
|
+
* The native-fs library store. Reads never lock (a read observes one committed
|
|
80
|
+
* revision, never a partial one — writes are atomic renames); writes serialize
|
|
81
|
+
* on a per-project lock (`projects/<id>.lock`), the index and the bindings on
|
|
82
|
+
* their own.
|
|
83
|
+
*/
|
|
84
|
+
export declare class LibraryStore {
|
|
85
|
+
private readonly stateRoot;
|
|
86
|
+
/** Set once the root has proven unwritable; reads then degrade to empty. */
|
|
87
|
+
private unwritable;
|
|
88
|
+
/**
|
|
89
|
+
* @param config - optional state-root override (tests, deployments that keep
|
|
90
|
+
* state elsewhere).
|
|
91
|
+
*/
|
|
92
|
+
constructor(config?: {
|
|
93
|
+
stateRoot?: string;
|
|
94
|
+
});
|
|
95
|
+
/** The state root (diagnostics and tests). */
|
|
96
|
+
get root(): string;
|
|
97
|
+
/** Why persistence is unavailable, when it is. */
|
|
98
|
+
get unavailableReason(): string | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Whether persistence is available — probed by creating the root, because a
|
|
101
|
+
* read-only deployment is only knowable by trying.
|
|
102
|
+
*/
|
|
103
|
+
get available(): boolean;
|
|
104
|
+
private get indexFile();
|
|
105
|
+
private get bindingsFile();
|
|
106
|
+
private get projectsDir();
|
|
107
|
+
/** One project's directory. */
|
|
108
|
+
projectDir(projectId: string): string;
|
|
109
|
+
/** The v5 resource file. */
|
|
110
|
+
private resourceFile;
|
|
111
|
+
/** The legacy per-book directory (v3/v4 layout — read-only now). */
|
|
112
|
+
private legacyBookDir;
|
|
113
|
+
private cardsFile;
|
|
114
|
+
/** The legacy thin-links ledger (v3/v4 layout — read-only now). */
|
|
115
|
+
private legacyResourcesFile;
|
|
116
|
+
private attemptsFile;
|
|
117
|
+
private eventsFile;
|
|
118
|
+
/** The v5 assessment file. */
|
|
119
|
+
private assessmentFile;
|
|
120
|
+
/** The legacy quiz file (v3/v4 layout — read-only now). */
|
|
121
|
+
private legacyQuizFile;
|
|
122
|
+
/** The v5 roadmap file, keyed by its textbook. */
|
|
123
|
+
private roadmapFile;
|
|
124
|
+
/** The legacy per-book roadmap file (v3/v4 layout — read-only now). */
|
|
125
|
+
private legacyRoadmapFile;
|
|
126
|
+
/** The v5 pages ledger of one thick resource. */
|
|
127
|
+
/** notes/<resource>/<node>.md — or <node>.<n>.md, the Nth revision kept before a rewrite. */
|
|
128
|
+
private notesFile;
|
|
129
|
+
private pagesFile;
|
|
130
|
+
/** The per-project lock's path. */
|
|
131
|
+
private projectLock;
|
|
132
|
+
/** Serialize under the scope's lock: read-modify-write as one critical section. */
|
|
133
|
+
withProjectLock<T>(projectId: string, fn: () => Promise<T> | T): Promise<T>;
|
|
134
|
+
/** The index's own lock (project create/delete). */
|
|
135
|
+
withIndexLock<T>(fn: () => Promise<T> | T): Promise<T>;
|
|
136
|
+
/** The bindings' own lock. */
|
|
137
|
+
withBindingsLock<T>(fn: () => Promise<T> | T): Promise<T>;
|
|
138
|
+
private withRootLock;
|
|
139
|
+
/**
|
|
140
|
+
* Read and normalize one JSON document.
|
|
141
|
+
*
|
|
142
|
+
* @returns undefined when the file is absent; throws `corrupt` when it
|
|
143
|
+
* exists but does not parse (a hand-edited file stays visible rather than
|
|
144
|
+
* being silently clobbered).
|
|
145
|
+
*/
|
|
146
|
+
private readJsonFile;
|
|
147
|
+
/** Write one document atomically (temp file + rename). */
|
|
148
|
+
private writeJsonFile;
|
|
149
|
+
/** Write one text file atomically. */
|
|
150
|
+
private writeTextFile;
|
|
151
|
+
/** Append lines to one JSONL ledger (append-only: never a rewrite). */
|
|
152
|
+
private appendJsonlFile;
|
|
153
|
+
/** Read one JSONL ledger tolerantly: unparseable lines drop, never fail the read. */
|
|
154
|
+
private readJsonlFile;
|
|
155
|
+
/** The index; absent reads as empty, an unavailable root as empty. */
|
|
156
|
+
readIndex(): LibraryIndexDoc;
|
|
157
|
+
/** The session bindings; absent or unreadable reads as empty. */
|
|
158
|
+
readBindings(): Map<string, LibraryBinding>;
|
|
159
|
+
/** One project's record; undefined when absent. */
|
|
160
|
+
readProject(projectId: string): LibraryProject | undefined;
|
|
161
|
+
private projectFile;
|
|
162
|
+
/**
|
|
163
|
+
* One shelf entry; undefined when absent. The v5 file wins; the legacy
|
|
164
|
+
* spots follow (a book's `books/<id>/book.json`, then a thin link's
|
|
165
|
+
* resources.jsonl line).
|
|
166
|
+
*/
|
|
167
|
+
readResource(projectId: string, resourceId: string): LibraryResource | undefined;
|
|
168
|
+
/**
|
|
169
|
+
* Every shelf entry of one project, both layouts merged (a v5 file shadows
|
|
170
|
+
* a legacy twin of the same id): textbooks first in study order (`seq`,
|
|
171
|
+
* then age — an unnumbered legacy textbook queues behind the numbered
|
|
172
|
+
* ones), then thin links oldest first.
|
|
173
|
+
*/
|
|
174
|
+
listResources(projectId: string): LibraryResource[];
|
|
175
|
+
/**
|
|
176
|
+
* One textbook's adopted roadmap, or its draft. The v5 file wins; the
|
|
177
|
+
* legacy book directory follows. A retired project-level path (no
|
|
178
|
+
* resource) reads as absent.
|
|
179
|
+
*/
|
|
180
|
+
readRoadmap(projectId: string, resourceId: string | undefined, which?: 'adopted' | 'draft'): LibraryRoadmap | undefined;
|
|
181
|
+
/** A path with each station's 讲义 text read from its file (a node whose file is gone loses its notes). */
|
|
182
|
+
private withNotes;
|
|
183
|
+
/** One station's 讲义 markdown, when written. */
|
|
184
|
+
readNotes(projectId: string, resourceId: string, nodeId: string): string | undefined;
|
|
185
|
+
/** Keep the current 讲义 of a station as revision N before a rewrite (call inside `withProjectLock`). */
|
|
186
|
+
archiveNotes(projectId: string, resourceId: string, nodeId: string, revision: number, text: string): void;
|
|
187
|
+
/**
|
|
188
|
+
* One thick resource's photographed pages, oldest first — both layouts
|
|
189
|
+
* merged: pages recorded before the v5 write cutover stay in the legacy
|
|
190
|
+
* book directory, new ones append to `pages/<id>.jsonl`.
|
|
191
|
+
*/
|
|
192
|
+
readPages(projectId: string, resourceId: string): LibraryPage[];
|
|
193
|
+
/** Every knowledge card of one project (deleted ones included — callers filter). */
|
|
194
|
+
readCards(projectId: string): LibraryCard[];
|
|
195
|
+
/** Every attempt (the JSONL ledger, tolerant per line). */
|
|
196
|
+
readAttempts(projectId: string): LibraryAttempt[];
|
|
197
|
+
/** The audit ledger, oldest first. */
|
|
198
|
+
readEvents(projectId: string): LibraryEvent[];
|
|
199
|
+
/**
|
|
200
|
+
* One assessment; undefined when absent. The v5 file wins; a legacy quiz
|
|
201
|
+
* file (`quizzes/<id>.json`) reads as a type=quiz assessment.
|
|
202
|
+
*/
|
|
203
|
+
readAssessment(projectId: string, assessmentId: string): LibraryAssessment | undefined;
|
|
204
|
+
/** Every assessment of one project, oldest first, both layouts merged. */
|
|
205
|
+
listAssessments(projectId: string): LibraryAssessment[];
|
|
206
|
+
/** Write the index (call inside `withIndexLock`). */
|
|
207
|
+
writeIndex(doc: LibraryIndexDoc): void;
|
|
208
|
+
/** Write the bindings (call inside `withBindingsLock`). */
|
|
209
|
+
writeBindings(bindings: ReadonlyMap<string, LibraryBinding>): void;
|
|
210
|
+
/** Write one project's record (call inside `withProjectLock`). */
|
|
211
|
+
writeProject(project: LibraryProject): void;
|
|
212
|
+
/** Write one shelf entry (call inside `withProjectLock`) — the v5 layout. */
|
|
213
|
+
writeResource(projectId: string, resource: LibraryResource): void;
|
|
214
|
+
/** Write one textbook's adopted roadmap or its draft (call inside `withProjectLock`) — the v5 layout. */
|
|
215
|
+
writeRoadmap(projectId: string, roadmap: LibraryRoadmap): void;
|
|
216
|
+
/** Drop one textbook's draft (adopted or discarded), in BOTH layouts. */
|
|
217
|
+
removeDraft(projectId: string, resourceId: string): void;
|
|
218
|
+
/** Append one photographed page (call inside `withProjectLock`) — the v5 layout. */
|
|
219
|
+
appendPage(projectId: string, page: LibraryPage): void;
|
|
220
|
+
/**
|
|
221
|
+
* Rewrite the cards whole — a merge or a mastery move rewrites an existing
|
|
222
|
+
* line. The temp+rename keeps the swap atomic; the project lock serializes it.
|
|
223
|
+
*/
|
|
224
|
+
writeCards(projectId: string, cards: readonly LibraryCard[]): void;
|
|
225
|
+
/** Append one attempt (call inside `withProjectLock`). */
|
|
226
|
+
appendAttempt(projectId: string, attempt: LibraryAttempt): void;
|
|
227
|
+
/** Append audit events (call inside `withProjectLock`). */
|
|
228
|
+
appendEvents(projectId: string, events: readonly LibraryEvent[]): void;
|
|
229
|
+
/** Write one assessment (call inside `withProjectLock`) — the v5 layout. */
|
|
230
|
+
writeAssessment(projectId: string, assessment: LibraryAssessment): void;
|
|
231
|
+
/**
|
|
232
|
+
* Remove one shelf entry: the v5 file, its pages ledger, its roadmap files,
|
|
233
|
+
* and any legacy trace (the book directory, the resources.jsonl line).
|
|
234
|
+
*/
|
|
235
|
+
removeResource(projectId: string, resourceId: string): void;
|
|
236
|
+
/** Remove one project's whole directory. */
|
|
237
|
+
removeProject(projectId: string): void;
|
|
238
|
+
/**
|
|
239
|
+
* v2 → covers: wrap every stored roadmap node's `chapterRanges` into a book
|
|
240
|
+
* cover (the v2 paths are all per-book). Idempotent, each project's files
|
|
241
|
+
* rewritten under its own lock, the index bump last — a crash midway leaves
|
|
242
|
+
* the old version and the next run resumes. v1 roots were never deployed:
|
|
243
|
+
* they read as empty and are NOT migrated. Reads never wait for this pass —
|
|
244
|
+
* `normalizeRoadmap` wraps a v2 node on the fly.
|
|
245
|
+
*
|
|
246
|
+
* @returns whether a migration ran.
|
|
247
|
+
*/
|
|
248
|
+
migrateState(): Promise<boolean>;
|
|
249
|
+
/** Rewrite one project's v2 book roadmaps (adopted and draft) into covers. */
|
|
250
|
+
private migrateProjectRoadmapsV2;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Resolve the state root: an explicit config value wins, then
|
|
254
|
+
* `$DSH_HOME/state/dsh-library`, then `<cwd>/.dsh-library`.
|
|
255
|
+
*/
|
|
256
|
+
export declare function resolveLibraryStateRoot(configured: string | undefined): string;
|
|
257
|
+
//# sourceMappingURL=store.d.ts.map
|