feat(w2): add PackService for .novel and .novel-all export/import
Introduce pack-bootstrap chunk, ZipArchive-based PackService with progress IPC, book registry import helpers, and IT-PACK-01 / IT-ALL-02 integration tests. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
export const NOVEL_FORMAT_VERSION = 1
|
||||
export const NOVEL_ALL_FORMAT_VERSION = 1
|
||||
|
||||
export interface NovelManifest {
|
||||
formatVersion: number
|
||||
appVersion: string
|
||||
exportedAt: string
|
||||
bookId: string
|
||||
bookName: string
|
||||
}
|
||||
|
||||
export interface NovelAllManifest {
|
||||
formatVersion: number
|
||||
appVersion: string
|
||||
exportedAt: string
|
||||
bookCount: number
|
||||
}
|
||||
|
||||
export type PackImportStrategy = 'skip' | 'overwrite' | 'new'
|
||||
|
||||
export interface PackImportBookResult {
|
||||
sourceBookId: string
|
||||
targetBookId: string | null
|
||||
bookName: string
|
||||
action: 'imported' | 'skipped' | 'overwritten'
|
||||
}
|
||||
|
||||
export interface PackImportReport {
|
||||
imported: number
|
||||
skipped: number
|
||||
overwritten: number
|
||||
books: PackImportBookResult[]
|
||||
}
|
||||
|
||||
export interface PackProgressEvent {
|
||||
current: number
|
||||
total: number
|
||||
phase: 'export' | 'import' | 'estimate'
|
||||
message?: string
|
||||
}
|
||||
Reference in New Issue
Block a user