@bendyline/docblocks 2.0.0 → 2.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/dist/{chunk-J32GU3F3.js → chunk-6IYMTYMQ.js} +249 -221
- package/dist/chunk-6IYMTYMQ.js.map +1 -0
- package/dist/{chunk-75UUF6C4.js → chunk-B56KWCSE.js} +2 -2
- package/dist/{chunk-RVQHY3XU.js → chunk-BNKV7MTO.js} +1 -1
- package/dist/{chunk-RVQHY3XU.js.map → chunk-BNKV7MTO.js.map} +1 -1
- package/dist/chunk-BXMF5YQJ.js +149 -0
- package/dist/chunk-BXMF5YQJ.js.map +1 -0
- package/dist/{chunk-PGR7LK6D.js → chunk-COYQXQK3.js} +14 -5
- package/dist/chunk-COYQXQK3.js.map +1 -0
- package/dist/{chunk-RQJRQF46.js → chunk-DN7A33LL.js} +42 -49
- package/dist/chunk-DN7A33LL.js.map +1 -0
- package/dist/chunk-FA7UNOXK.js +20 -0
- package/dist/chunk-FA7UNOXK.js.map +1 -0
- package/dist/chunk-GM5YXU4L.js +29 -0
- package/dist/chunk-GM5YXU4L.js.map +1 -0
- package/dist/{chunk-SI2LU2RP.js → chunk-JS6XFWQK.js} +2 -1
- package/dist/chunk-JS6XFWQK.js.map +1 -0
- package/dist/{chunk-EGNDADXB.js → chunk-MNSZ7EZN.js} +2 -2
- package/dist/chunk-P3DVZQ6S.js +228 -0
- package/dist/chunk-P3DVZQ6S.js.map +1 -0
- package/dist/chunk-P4WATND4.js +52 -0
- package/dist/chunk-P4WATND4.js.map +1 -0
- package/dist/chunk-RVPGQBWR.js +169 -0
- package/dist/chunk-RVPGQBWR.js.map +1 -0
- package/dist/chunk-U722UUFN.js +9 -0
- package/dist/chunk-U722UUFN.js.map +1 -0
- package/dist/{chunk-GCPBEMMH.js → chunk-VTCSF7VS.js} +11 -21
- package/dist/chunk-VTCSF7VS.js.map +1 -0
- package/dist/{chunk-2D7Y4IR3.js → chunk-WJKYY5QR.js} +123 -66
- package/dist/chunk-WJKYY5QR.js.map +1 -0
- package/dist/{chunk-5MYAICRE.js → chunk-XUML3MKV.js} +44 -56
- package/dist/chunk-XUML3MKV.js.map +1 -0
- package/dist/document/index.d.ts +358 -6
- package/dist/document/index.js +24 -3
- package/dist/document/index.js.map +1 -1
- package/dist/filesystem/electron.d.ts +73 -4
- package/dist/filesystem/electron.js +16 -3
- package/dist/filesystem/electron.js.map +1 -1
- package/dist/filesystem/index.d.ts +228 -22
- package/dist/filesystem/index.js +133 -19
- package/dist/filesystem/index.js.map +1 -1
- package/dist/filesystem/indexeddb.d.ts +284 -5
- package/dist/filesystem/indexeddb.js +22 -4
- package/dist/filesystem/indexeddb.js.map +1 -1
- package/dist/filesystem/memory.d.ts +152 -4
- package/dist/filesystem/memory.js +12 -3
- package/dist/filesystem/memory.js.map +1 -1
- package/dist/filesystem/native.d.ts +136 -4
- package/dist/filesystem/native.js +27 -3
- package/dist/filesystem/native.js.map +1 -1
- package/dist/host/index.d.ts +32 -9
- package/dist/host/index.js +26 -29
- package/dist/host/index.js.map +1 -1
- package/dist/index.d.ts +14 -10
- package/dist/index.js +204 -9
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts +33 -4
- package/dist/mcp/index.js +31 -3
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/zod.d.ts +637 -635
- package/dist/mcp/zod.js +700 -884
- package/dist/mcp/zod.js.map +1 -1
- package/dist/share/index.d.ts +43 -0
- package/dist/share/index.js +13 -0
- package/dist/share/index.js.map +1 -0
- package/dist/{types-CsX6EN2t.d.ts → types-BEg5SQ1_.d.ts} +1 -1
- package/dist/{types-eOlt9J7n.d.ts → types-CueK0tvU.d.ts} +34 -11
- package/dist/vscode/index.d.ts +220 -3
- package/dist/vscode/index.js +382 -2
- package/dist/vscode/index.js.map +1 -1
- package/dist/workspace/index.d.ts +141 -4
- package/dist/workspace/index.js +28 -2
- package/dist/workspace/index.js.map +1 -1
- package/package.json +9 -5
- package/dist/chunk-2D7Y4IR3.js.map +0 -1
- package/dist/chunk-5MYAICRE.js.map +0 -1
- package/dist/chunk-AYZ4HN5M.js +0 -20
- package/dist/chunk-AYZ4HN5M.js.map +0 -1
- package/dist/chunk-GCPBEMMH.js.map +0 -1
- package/dist/chunk-J32GU3F3.js.map +0 -1
- package/dist/chunk-PGR7LK6D.js.map +0 -1
- package/dist/chunk-RQJRQF46.js.map +0 -1
- package/dist/chunk-SI2LU2RP.js.map +0 -1
- package/dist/chunk-W5UUUII5.js +0 -142
- package/dist/chunk-W5UUUII5.js.map +0 -1
- package/dist/document/document-session.d.ts +0 -127
- package/dist/document/document-session.d.ts.map +0 -1
- package/dist/document/document-session.js +0 -749
- package/dist/document/document-session.js.map +0 -1
- package/dist/document/filesystem-target.d.ts +0 -17
- package/dist/document/filesystem-target.d.ts.map +0 -1
- package/dist/document/filesystem-target.js +0 -70
- package/dist/document/filesystem-target.js.map +0 -1
- package/dist/document/index.d.ts.map +0 -1
- package/dist/document/recovery-journal.d.ts +0 -125
- package/dist/document/recovery-journal.d.ts.map +0 -1
- package/dist/document/recovery-journal.js +0 -385
- package/dist/document/recovery-journal.js.map +0 -1
- package/dist/document/types.d.ts +0 -89
- package/dist/document/types.d.ts.map +0 -1
- package/dist/document/types.js +0 -9
- package/dist/document/types.js.map +0 -1
- package/dist/filesystem/commit-lock.d.ts +0 -3
- package/dist/filesystem/commit-lock.d.ts.map +0 -1
- package/dist/filesystem/commit-lock.js +0 -20
- package/dist/filesystem/commit-lock.js.map +0 -1
- package/dist/filesystem/dbk-workspace.d.ts +0 -34
- package/dist/filesystem/dbk-workspace.d.ts.map +0 -1
- package/dist/filesystem/dbk-workspace.js +0 -85
- package/dist/filesystem/dbk-workspace.js.map +0 -1
- package/dist/filesystem/electron-provider-v2.d.ts +0 -36
- package/dist/filesystem/electron-provider-v2.d.ts.map +0 -1
- package/dist/filesystem/electron-provider-v2.js +0 -503
- package/dist/filesystem/electron-provider-v2.js.map +0 -1
- package/dist/filesystem/electron-provider.d.ts +0 -35
- package/dist/filesystem/electron-provider.d.ts.map +0 -1
- package/dist/filesystem/electron-provider.js +0 -69
- package/dist/filesystem/electron-provider.js.map +0 -1
- package/dist/filesystem/electron.d.ts.map +0 -1
- package/dist/filesystem/file-media-provider.d.ts +0 -23
- package/dist/filesystem/file-media-provider.d.ts.map +0 -1
- package/dist/filesystem/file-media-provider.js +0 -85
- package/dist/filesystem/file-media-provider.js.map +0 -1
- package/dist/filesystem/filesystem-content-container.d.ts +0 -24
- package/dist/filesystem/filesystem-content-container.d.ts.map +0 -1
- package/dist/filesystem/filesystem-content-container.js +0 -153
- package/dist/filesystem/filesystem-content-container.js.map +0 -1
- package/dist/filesystem/fs-error.d.ts +0 -46
- package/dist/filesystem/fs-error.d.ts.map +0 -1
- package/dist/filesystem/fs-error.js +0 -170
- package/dist/filesystem/fs-error.js.map +0 -1
- package/dist/filesystem/index.d.ts.map +0 -1
- package/dist/filesystem/indexeddb-content-container.d.ts +0 -22
- package/dist/filesystem/indexeddb-content-container.d.ts.map +0 -1
- package/dist/filesystem/indexeddb-content-container.js +0 -100
- package/dist/filesystem/indexeddb-content-container.js.map +0 -1
- package/dist/filesystem/indexeddb-provider-v2.d.ts +0 -96
- package/dist/filesystem/indexeddb-provider-v2.d.ts.map +0 -1
- package/dist/filesystem/indexeddb-provider-v2.js +0 -1241
- package/dist/filesystem/indexeddb-provider-v2.js.map +0 -1
- package/dist/filesystem/indexeddb-provider.d.ts +0 -39
- package/dist/filesystem/indexeddb-provider.d.ts.map +0 -1
- package/dist/filesystem/indexeddb-provider.js +0 -145
- package/dist/filesystem/indexeddb-provider.js.map +0 -1
- package/dist/filesystem/indexeddb-store.d.ts +0 -34
- package/dist/filesystem/indexeddb-store.d.ts.map +0 -1
- package/dist/filesystem/indexeddb-store.js +0 -165
- package/dist/filesystem/indexeddb-store.js.map +0 -1
- package/dist/filesystem/indexeddb.d.ts.map +0 -1
- package/dist/filesystem/legacy-v2-adapter.d.ts +0 -62
- package/dist/filesystem/legacy-v2-adapter.d.ts.map +0 -1
- package/dist/filesystem/legacy-v2-adapter.js +0 -499
- package/dist/filesystem/legacy-v2-adapter.js.map +0 -1
- package/dist/filesystem/memory-provider-v2.d.ts +0 -92
- package/dist/filesystem/memory-provider-v2.d.ts.map +0 -1
- package/dist/filesystem/memory-provider-v2.js +0 -615
- package/dist/filesystem/memory-provider-v2.js.map +0 -1
- package/dist/filesystem/memory-provider.d.ts +0 -54
- package/dist/filesystem/memory-provider.d.ts.map +0 -1
- package/dist/filesystem/memory-provider.js +0 -132
- package/dist/filesystem/memory-provider.js.map +0 -1
- package/dist/filesystem/memory.d.ts.map +0 -1
- package/dist/filesystem/move-entry.d.ts +0 -9
- package/dist/filesystem/move-entry.d.ts.map +0 -1
- package/dist/filesystem/move-entry.js +0 -103
- package/dist/filesystem/move-entry.js.map +0 -1
- package/dist/filesystem/move-error.d.ts +0 -53
- package/dist/filesystem/move-error.d.ts.map +0 -1
- package/dist/filesystem/move-error.js +0 -99
- package/dist/filesystem/move-error.js.map +0 -1
- package/dist/filesystem/native-provider-v2.d.ts +0 -75
- package/dist/filesystem/native-provider-v2.d.ts.map +0 -1
- package/dist/filesystem/native-provider-v2.js +0 -849
- package/dist/filesystem/native-provider-v2.js.map +0 -1
- package/dist/filesystem/native-provider.d.ts +0 -53
- package/dist/filesystem/native-provider.d.ts.map +0 -1
- package/dist/filesystem/native-provider.js +0 -471
- package/dist/filesystem/native-provider.js.map +0 -1
- package/dist/filesystem/native.d.ts.map +0 -1
- package/dist/filesystem/types.d.ts +0 -83
- package/dist/filesystem/types.d.ts.map +0 -1
- package/dist/filesystem/types.js +0 -16
- package/dist/filesystem/types.js.map +0 -1
- package/dist/filesystem/v2.d.ts +0 -172
- package/dist/filesystem/v2.d.ts.map +0 -1
- package/dist/filesystem/v2.js +0 -16
- package/dist/filesystem/v2.js.map +0 -1
- package/dist/filesystem/workspace-path.d.ts +0 -21
- package/dist/filesystem/workspace-path.d.ts.map +0 -1
- package/dist/filesystem/workspace-path.js +0 -80
- package/dist/filesystem/workspace-path.js.map +0 -1
- package/dist/host/filesystem-v2.d.ts +0 -45
- package/dist/host/filesystem-v2.d.ts.map +0 -1
- package/dist/host/filesystem-v2.js +0 -13
- package/dist/host/filesystem-v2.js.map +0 -1
- package/dist/host/git.d.ts +0 -200
- package/dist/host/git.d.ts.map +0 -1
- package/dist/host/git.js +0 -15
- package/dist/host/git.js.map +0 -1
- package/dist/host/index.d.ts.map +0 -1
- package/dist/host/types.d.ts +0 -232
- package/dist/host/types.d.ts.map +0 -1
- package/dist/host/types.js +0 -10
- package/dist/host/types.js.map +0 -1
- package/dist/host/wire-policy.d.ts +0 -22
- package/dist/host/wire-policy.d.ts.map +0 -1
- package/dist/host/wire-policy.js +0 -92
- package/dist/host/wire-policy.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/mcp/index.d.ts.map +0 -1
- package/dist/mcp/types.d.ts +0 -466
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/types.js +0 -25
- package/dist/mcp/types.js.map +0 -1
- package/dist/mcp/wire.d.ts +0 -29
- package/dist/mcp/wire.d.ts.map +0 -1
- package/dist/mcp/wire.js +0 -1046
- package/dist/mcp/wire.js.map +0 -1
- package/dist/mcp/zod.d.ts.map +0 -1
- package/dist/vscode/index.d.ts.map +0 -1
- package/dist/vscode/messages.d.ts +0 -204
- package/dist/vscode/messages.d.ts.map +0 -1
- package/dist/vscode/messages.js +0 -494
- package/dist/vscode/messages.js.map +0 -1
- package/dist/workspace/index.d.ts.map +0 -1
- package/dist/workspace/reconcile-electron.d.ts +0 -19
- package/dist/workspace/reconcile-electron.d.ts.map +0 -1
- package/dist/workspace/reconcile-electron.js +0 -42
- package/dist/workspace/reconcile-electron.js.map +0 -1
- package/dist/workspace/types.d.ts +0 -69
- package/dist/workspace/types.d.ts.map +0 -1
- package/dist/workspace/types.js +0 -2
- package/dist/workspace/types.js.map +0 -1
- package/dist/workspace/workspace-manager.d.ts +0 -47
- package/dist/workspace/workspace-manager.d.ts.map +0 -1
- package/dist/workspace/workspace-manager.js +0 -126
- package/dist/workspace/workspace-manager.js.map +0 -1
- package/src/document/document-session.ts +0 -834
- package/src/document/filesystem-target.ts +0 -109
- package/src/document/index.ts +0 -41
- package/src/document/recovery-journal.ts +0 -536
- package/src/document/types.ts +0 -116
- package/src/filesystem/commit-lock.ts +0 -29
- package/src/filesystem/dbk-workspace.ts +0 -135
- package/src/filesystem/electron-provider-v2.ts +0 -630
- package/src/filesystem/electron-provider.ts +0 -99
- package/src/filesystem/electron.ts +0 -3
- package/src/filesystem/file-media-provider.ts +0 -103
- package/src/filesystem/filesystem-content-container.ts +0 -164
- package/src/filesystem/fs-error.ts +0 -234
- package/src/filesystem/index.ts +0 -143
- package/src/filesystem/indexeddb-content-container.ts +0 -112
- package/src/filesystem/indexeddb-provider-v2.ts +0 -1740
- package/src/filesystem/indexeddb-provider.ts +0 -171
- package/src/filesystem/indexeddb-store.ts +0 -207
- package/src/filesystem/indexeddb.ts +0 -12
- package/src/filesystem/legacy-v2-adapter.ts +0 -779
- package/src/filesystem/memory-provider-v2.ts +0 -896
- package/src/filesystem/memory-provider.ts +0 -180
- package/src/filesystem/memory.ts +0 -15
- package/src/filesystem/move-entry.ts +0 -142
- package/src/filesystem/move-error.ts +0 -159
- package/src/filesystem/native-provider-v2.ts +0 -1165
- package/src/filesystem/native-provider.ts +0 -537
- package/src/filesystem/native.ts +0 -16
- package/src/filesystem/types.ts +0 -114
- package/src/filesystem/v2.ts +0 -231
- package/src/filesystem/workspace-path.ts +0 -92
- package/src/host/filesystem-v2.ts +0 -104
- package/src/host/git.ts +0 -246
- package/src/host/index.ts +0 -93
- package/src/host/types.ts +0 -274
- package/src/host/wire-policy.ts +0 -103
- package/src/index.ts +0 -10
- package/src/mcp/index.ts +0 -3
- package/src/mcp/types.ts +0 -594
- package/src/mcp/wire.ts +0 -1280
- package/src/mcp/zod.ts +0 -1000
- package/src/vscode/index.ts +0 -2
- package/src/vscode/messages.ts +0 -704
- package/src/workspace/index.ts +0 -17
- package/src/workspace/reconcile-electron.ts +0 -65
- package/src/workspace/types.ts +0 -67
- package/src/workspace/workspace-manager.ts +0 -151
- /package/dist/{chunk-75UUF6C4.js.map → chunk-B56KWCSE.js.map} +0 -0
- /package/dist/{chunk-EGNDADXB.js.map → chunk-MNSZ7EZN.js.map} +0 -0
|
@@ -1,22 +1,228 @@
|
|
|
1
|
-
|
|
2
|
-
export { getFileSystemProviderV2, hasFileSystemProviderV2 } from '
|
|
3
|
-
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { P as FsOperation, s as FileSystemProviderV2, r as FileSystemProviderCapabilities, q as FileSystemProvider, c as FileSystemAtomicity, d as FileSystemCaseSensitivity, z as FileSystemSymlinkPolicy, i as FileSystemDurability, k as FileSystemEntrySnapshot, m as FileSystemFileRead, K as FileSystemWriteOptions, n as FileSystemFileSnapshot, g as FileSystemCreateDirectoryOptions, h as FileSystemDirectorySnapshot, u as FileSystemRemoveOptions, v as FileSystemRemoveResult, o as FileSystemMoveOptions, w as FileSystemSnapshot, G as FileSystemWatchListener, H as FileSystemWatchOptions, I as FileSystemWatchSubscription } from '../types-BEg5SQ1_.js';
|
|
2
|
+
export { F as FileCommitResult, a as FileEntry, b as FileMeta, e as FileSystemConditionalWriteStrength, f as FileSystemCreateDirectoryMode, j as FileSystemEntry, l as FileSystemEntryWatchEvent, p as FileSystemOverflowWatchEvent, t as FileSystemProviderWithV2, x as FileSystemSnapshotEntry, y as FileSystemSnapshotFile, A as FileSystemVersion, B as FileSystemWatchErrorListener, C as FileSystemWatchEvent, D as FileSystemWatchEventOrigin, E as FileSystemWatchEventType, J as FileSystemWriteMode, L as FolderEntry, M as FsError, N as FsErrorCode, O as FsErrorContext, S as SerializedFsError, Q as deserializeFsError, R as fsErrorFromUnknown, T as getFileSystemProviderV2, U as hasFileSystemProviderV2, V as isQuotaExceededError, W as isSerializedFsError, X as mapDomExceptionToFsErrorCode, Y as mapNodeErrorCodeToFsErrorCode, Z as parseFileSystemVersion, _ as serializeFsError, $ as tryParseFileSystemVersion } from '../types-BEg5SQ1_.js';
|
|
3
|
+
import { a as WorkspacePath } from '../workspace-path-CWVrcuPL.js';
|
|
4
|
+
export { W as WORKSPACE_ROOT, p as parseWorkspacePath, t as tryParseWorkspacePath, w as workspacePathBasename, b as workspacePathContains, c as workspacePathDirname, d as workspacePathJoin, e as workspacePathToLegacy } from '../workspace-path-CWVrcuPL.js';
|
|
5
|
+
import { MemoryFileSystemSnapshot, MemoryFileSystemProvider } from './memory.js';
|
|
6
|
+
export { MemoryFilePayloadKind, MemoryFileSystemProviderV2, MemoryFileSystemSnapshotFile, MemoryFileSystemV2CompatibilityFile, MemoryFileSystemV2Replacement, MemoryFileSystemV2ReplacementFile, MemoryFileSystemV2State, MemoryFileSystemV2StateFile } from './memory.js';
|
|
7
|
+
export { IndexedDBContentContainer, IndexedDBFileSystemProvider, IndexedDBFileSystemProviderV2, IndexedDBFileSystemProviderV2Options, IndexedDBLegacyConflictReason, IndexedDBLegacyConflictResolution, IndexedDBLegacyMigrationConflict, IndexedDBLegacyOpaqueDiscardTarget, IndexedDBLegacyOpaqueRecord, IndexedDBLegacyOpaqueRecordSummary, IndexedDBLegacyOpaqueValue, IndexedDBLegacyRecoveryCandidate, IndexedDBLegacyRecoveryKind } from './indexeddb.js';
|
|
8
|
+
import { ContentContainer, ContentEntry } from '@bendyline/squisq/storage';
|
|
9
|
+
import { MediaProvider } from '@bendyline/squisq/schemas';
|
|
10
|
+
export { NativeFileSystemMovePathState, NativeFileSystemMoveRecoveryError, NativeFileSystemMoveRecoveryState, NativeFileSystemProvider, NativeFileSystemProviderV2, isNativeFileSystemSupported, loadDirectoryHandle, openNativeFolder, removeDirectoryHandle, restoreNativeFolder, storeDirectoryHandle } from './native.js';
|
|
11
|
+
export { ElectronFileSystemProvider, ElectronFileSystemProviderV2 } from './electron.js';
|
|
12
|
+
export { isElectronHost } from '../host/index.js';
|
|
13
|
+
import '../types-CueK0tvU.js';
|
|
14
|
+
|
|
15
|
+
interface DecodeUtf8TextOptions {
|
|
16
|
+
/** User-facing description of the payload being decoded. */
|
|
17
|
+
readonly label?: string;
|
|
18
|
+
/** Filesystem operation that produced the bytes. */
|
|
19
|
+
readonly operation?: FsOperation;
|
|
20
|
+
/** Canonical or display path associated with the payload. */
|
|
21
|
+
readonly path?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Decode byte-authoritative text without silently replacing malformed input.
|
|
25
|
+
* Replacement characters are unsafe at persistence boundaries because a later
|
|
26
|
+
* save can permanently overwrite the original bytes with altered content.
|
|
27
|
+
*/
|
|
28
|
+
declare function decodeUtf8Text(data: ArrayBuffer | ArrayBufferView, options?: DecodeUtf8TextOptions): string;
|
|
29
|
+
|
|
30
|
+
type LegacyFilePayloadModel = 'split' | 'binary-first-text-fallback' | 'binary-authoritative';
|
|
31
|
+
interface LegacyFileSystemProviderV2AdapterOptions {
|
|
32
|
+
/**
|
|
33
|
+
* Split stores expose independent raw text and binary channels and reject
|
|
34
|
+
* dual payloads. Binary-first stores synthesize text for binary records, so
|
|
35
|
+
* the adapter only asks for text after readBinary() returns null. Binary-
|
|
36
|
+
* authoritative stores expose every file through readBinary().
|
|
37
|
+
*/
|
|
38
|
+
readonly payloadModel: LegacyFilePayloadModel;
|
|
39
|
+
readonly writeAtomicity?: FileSystemAtomicity;
|
|
40
|
+
readonly moveAtomicity?: FileSystemAtomicity;
|
|
41
|
+
readonly caseSensitivity?: FileSystemCaseSensitivity;
|
|
42
|
+
readonly symlinkPolicy?: FileSystemSymlinkPolicy;
|
|
43
|
+
readonly durability?: FileSystemDurability;
|
|
44
|
+
/** Optional ownership hook; omitted when the adapter does not own the v1 provider. */
|
|
45
|
+
readonly dispose?: () => void | Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Correctness bridge for hardened v1 providers while storage backends migrate.
|
|
49
|
+
*
|
|
50
|
+
* The adapter deliberately serializes every observable operation. This makes a
|
|
51
|
+
* version check and its mutation indivisible among v2 callers, but cannot make
|
|
52
|
+
* calls that bypass the adapter participate in that boundary. Content-derived
|
|
53
|
+
* versions make those external changes visible on the next adapter operation.
|
|
54
|
+
*/
|
|
55
|
+
declare class LegacyFileSystemProviderV2Adapter implements FileSystemProviderV2 {
|
|
56
|
+
private readonly provider;
|
|
57
|
+
private readonly options;
|
|
58
|
+
readonly id: string;
|
|
59
|
+
readonly label: string;
|
|
60
|
+
readonly capabilities: FileSystemProviderCapabilities;
|
|
61
|
+
private operationTail;
|
|
62
|
+
private readonly subscriptions;
|
|
63
|
+
private closing;
|
|
64
|
+
private disposed;
|
|
65
|
+
private disposePromise;
|
|
66
|
+
constructor(provider: FileSystemProvider, options: LegacyFileSystemProviderV2AdapterOptions);
|
|
67
|
+
stat(path: WorkspacePath): Promise<FileSystemEntrySnapshot | null>;
|
|
68
|
+
readFile(path: WorkspacePath): Promise<FileSystemFileRead | null>;
|
|
69
|
+
readDirectory(path: WorkspacePath): Promise<readonly FileSystemEntrySnapshot[]>;
|
|
70
|
+
writeFile(path: WorkspacePath, data: ArrayBuffer | Uint8Array, options?: FileSystemWriteOptions): Promise<FileSystemFileSnapshot>;
|
|
71
|
+
createDirectory(path: WorkspacePath, options?: FileSystemCreateDirectoryOptions): Promise<FileSystemDirectorySnapshot>;
|
|
72
|
+
remove(path: WorkspacePath, options?: FileSystemRemoveOptions): Promise<FileSystemRemoveResult>;
|
|
73
|
+
move(oldPath: WorkspacePath, newPath: WorkspacePath, options?: FileSystemMoveOptions): Promise<FileSystemEntrySnapshot>;
|
|
74
|
+
snapshot(): Promise<FileSystemSnapshot>;
|
|
75
|
+
watch(_listener: FileSystemWatchListener, options?: FileSystemWatchOptions): FileSystemWatchSubscription;
|
|
76
|
+
dispose(): Promise<void>;
|
|
77
|
+
private enqueue;
|
|
78
|
+
private assertAccepting;
|
|
79
|
+
private canonical;
|
|
80
|
+
private canonicalNonRoot;
|
|
81
|
+
private assertExpectedVersion;
|
|
82
|
+
private assertParents;
|
|
83
|
+
private captureTree;
|
|
84
|
+
private captureFile;
|
|
85
|
+
private invoke;
|
|
86
|
+
private error;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
type DbkWorkspaceAssetLayout = 'auto' | 'preserve' | 'companion';
|
|
90
|
+
interface DbkWorkspaceSnapshotOptions {
|
|
91
|
+
/** Provider-relative path of the transient workspace's active markdown file. */
|
|
92
|
+
targetDocumentPath: string;
|
|
93
|
+
/**
|
|
94
|
+
* `preserve` treats the DBK as a serialized workspace tree. `companion`
|
|
95
|
+
* rebases secondary Markdown files beneath `<document>_files/`. `auto`
|
|
96
|
+
* preserves a DBK whose primary path already matches the target, otherwise
|
|
97
|
+
* rebasing the secondary documents into the companion directory.
|
|
98
|
+
*/
|
|
99
|
+
assetLayout?: DbkWorkspaceAssetLayout;
|
|
100
|
+
}
|
|
101
|
+
interface DbkWorkspaceSnapshot extends MemoryFileSystemSnapshot {
|
|
102
|
+
readonly sourceDocumentPath: string;
|
|
103
|
+
readonly targetDocumentPath: string;
|
|
104
|
+
readonly documentContent: string;
|
|
105
|
+
readonly assetLayout: Exclude<DbkWorkspaceAssetLayout, 'auto'>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Fully materialize and validate a DBK container before touching its target
|
|
109
|
+
* provider. Transient workspace DBKs are intentionally Markdown-only: every
|
|
110
|
+
* member must be a valid UTF-8 `.md` file. A missing, unreadable, binary, or
|
|
111
|
+
* differently typed entry fails the snapshot as a whole.
|
|
112
|
+
*/
|
|
113
|
+
declare function createDbkWorkspaceSnapshot(source: ContentContainer, options: DbkWorkspaceSnapshotOptions): Promise<DbkWorkspaceSnapshot>;
|
|
114
|
+
/**
|
|
115
|
+
* Replace a transient DBK workspace as one logical operation.
|
|
116
|
+
*
|
|
117
|
+
* Container reads and validation happen before provider mutation. The memory
|
|
118
|
+
* provider then stages and swaps the full tree synchronously, which removes
|
|
119
|
+
* stale files and guarantees the old tree survives any failed replacement.
|
|
120
|
+
*/
|
|
121
|
+
declare function replaceMemoryWorkspaceFromDbk(provider: MemoryFileSystemProvider, source: ContentContainer, options: DbkWorkspaceSnapshotOptions): Promise<DbkWorkspaceSnapshot>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* FileSystemContentContainer — a ContentContainer backed by any
|
|
125
|
+
* FileSystemProvider, scoped to a sub-path (e.g., ".docblocks/media/").
|
|
126
|
+
*
|
|
127
|
+
* Used by the Electron desktop app so media lives inside the workspace
|
|
128
|
+
* folder (visible as regular files) rather than in a separate IndexedDB
|
|
129
|
+
* origin that only the app can see.
|
|
130
|
+
*/
|
|
131
|
+
|
|
132
|
+
declare class FileSystemContentContainer implements ContentContainer {
|
|
133
|
+
private readonly provider;
|
|
134
|
+
private readonly prefix;
|
|
135
|
+
constructor(provider: FileSystemProvider, prefix?: string);
|
|
136
|
+
readFile(path: string): Promise<ArrayBuffer | null>;
|
|
137
|
+
writeFile(path: string, data: ArrayBuffer | Uint8Array, _mimeType?: string): Promise<void>;
|
|
138
|
+
removeFile(path: string): Promise<void>;
|
|
139
|
+
listFiles(prefix?: string): Promise<ContentEntry[]>;
|
|
140
|
+
exists(path: string): Promise<boolean>;
|
|
141
|
+
getDocumentPath(): Promise<string | null>;
|
|
142
|
+
readDocument(): Promise<string | null>;
|
|
143
|
+
writeDocument(markdown: string, filename?: string): Promise<void>;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* createFileMediaProvider — per-file media storage following the pandoc /
|
|
148
|
+
* Word convention: a markdown file `notes.md` gets a sibling folder
|
|
149
|
+
* `notes_files/` that holds its images, audio, and video.
|
|
150
|
+
*
|
|
151
|
+
* Given:
|
|
152
|
+
* • `container` — a ContentContainer scoped to the markdown file's
|
|
153
|
+
* parent directory (so `readFile('notes_files/image.png')` maps to the
|
|
154
|
+
* parent-relative path)
|
|
155
|
+
* • `markdownBasename` — e.g. `"notes.md"`
|
|
156
|
+
*
|
|
157
|
+
* Returns a MediaProvider that:
|
|
158
|
+
* • Writes new media under `{basename}_files/{name}` in the parent dir
|
|
159
|
+
* • Returns the folder-qualified path (`notes_files/image.png`) from
|
|
160
|
+
* addMedia so the markdown stays portable outside DocBlocks
|
|
161
|
+
* • Resolves both bare (`image.png`) and folder-qualified
|
|
162
|
+
* (`notes_files/image.png`) references — so legacy markdown and
|
|
163
|
+
* exports from other tools both work
|
|
164
|
+
*/
|
|
165
|
+
|
|
166
|
+
declare function createFileMediaProvider(container: ContentContainer, markdownBasename: string): MediaProvider;
|
|
167
|
+
|
|
168
|
+
/** Return the hidden companion directory used for a document's media and versions. */
|
|
169
|
+
declare function documentCompanionPath(documentPath: string): string;
|
|
170
|
+
/**
|
|
171
|
+
* Move an explorer entry without overwriting an existing entry. Markdown files
|
|
172
|
+
* carry their hidden `<basename>_files` companion directory with them.
|
|
173
|
+
*/
|
|
174
|
+
declare function moveFileSystemEntry(provider: FileSystemProvider, oldPath: string, newPath: string, kind: 'file' | 'directory'): Promise<void>;
|
|
175
|
+
|
|
176
|
+
type FileSystemPathPresence = 'present' | 'missing' | 'unknown';
|
|
177
|
+
interface FileSystemPartialMoveState {
|
|
178
|
+
readonly source: FileSystemPathPresence;
|
|
179
|
+
readonly destination: FileSystemPathPresence;
|
|
180
|
+
readonly companionSource: FileSystemPathPresence;
|
|
181
|
+
readonly companionDestination: FileSystemPathPresence;
|
|
182
|
+
}
|
|
183
|
+
type FileSystemMoveLocation = 'source' | 'destination' | 'both' | 'neither' | 'unknown';
|
|
184
|
+
interface FileSystemEntryMoveState {
|
|
185
|
+
readonly source: FileSystemPathPresence;
|
|
186
|
+
readonly destination: FileSystemPathPresence;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* One provider move failed without restoring a provable source-only state.
|
|
190
|
+
* This is backend-neutral: callers must use `location`, never infer from the
|
|
191
|
+
* original exception or a provider's advertised move atomicity.
|
|
192
|
+
*/
|
|
193
|
+
declare class FileSystemMoveRecoveryError extends Error {
|
|
194
|
+
readonly sourcePath: string;
|
|
195
|
+
readonly destinationPath: string;
|
|
196
|
+
readonly state: FileSystemEntryMoveState;
|
|
197
|
+
readonly moveError: unknown;
|
|
198
|
+
readonly code: "partial-move";
|
|
199
|
+
constructor(sourcePath: string, destinationPath: string, state: FileSystemEntryMoveState, moveError: unknown);
|
|
200
|
+
get location(): FileSystemMoveLocation;
|
|
201
|
+
/** Alias used by DocumentSession's document-retarget recovery protocol. */
|
|
202
|
+
get documentLocation(): FileSystemMoveLocation;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* A compound document/companion move failed and the document rollback also
|
|
206
|
+
* failed. Callers must use the recorded post-state instead of assuming the
|
|
207
|
+
* original path is still authoritative.
|
|
208
|
+
*/
|
|
209
|
+
declare class FileSystemPartialMoveError extends Error {
|
|
210
|
+
readonly sourcePath: string;
|
|
211
|
+
readonly destinationPath: string;
|
|
212
|
+
readonly companionSourcePath: string;
|
|
213
|
+
readonly companionDestinationPath: string;
|
|
214
|
+
readonly state: FileSystemPartialMoveState;
|
|
215
|
+
readonly moveError: unknown;
|
|
216
|
+
readonly rollbackError: unknown;
|
|
217
|
+
readonly code: "partial-move";
|
|
218
|
+
constructor(sourcePath: string, destinationPath: string, companionSourcePath: string, companionDestinationPath: string, state: FileSystemPartialMoveState, moveError: unknown, rollbackError: unknown);
|
|
219
|
+
get documentLocation(): FileSystemMoveLocation;
|
|
220
|
+
get companionLocation(): FileSystemMoveLocation;
|
|
221
|
+
}
|
|
222
|
+
declare function isFileSystemPartialMoveError(error: unknown): error is FileSystemPartialMoveError;
|
|
223
|
+
declare function isFileSystemMoveRecoveryError(error: unknown): error is FileSystemMoveRecoveryError;
|
|
224
|
+
declare function isFileSystemMoveStateError(error: unknown): error is FileSystemMoveRecoveryError | FileSystemPartialMoveError;
|
|
225
|
+
declare function describePartialMove(provider: FileSystemProvider, sourcePath: string, destinationPath: string, companionSourcePath: string, companionDestinationPath: string): Promise<FileSystemPartialMoveState>;
|
|
226
|
+
declare function describeEntryMove(provider: FileSystemProvider, sourcePath: string, destinationPath: string): Promise<FileSystemEntryMoveState>;
|
|
227
|
+
|
|
228
|
+
export { type DbkWorkspaceAssetLayout, type DbkWorkspaceSnapshot, type DbkWorkspaceSnapshotOptions, type DecodeUtf8TextOptions, FileSystemAtomicity, FileSystemCaseSensitivity, FileSystemContentContainer, FileSystemCreateDirectoryOptions, FileSystemDirectorySnapshot, FileSystemDurability, type FileSystemEntryMoveState, FileSystemEntrySnapshot, FileSystemFileRead, FileSystemFileSnapshot, type FileSystemMoveLocation, FileSystemMoveOptions, FileSystemMoveRecoveryError, FileSystemPartialMoveError, type FileSystemPartialMoveState, type FileSystemPathPresence, FileSystemProvider, FileSystemProviderCapabilities, FileSystemProviderV2, FileSystemRemoveOptions, FileSystemRemoveResult, FileSystemSnapshot, FileSystemSymlinkPolicy, FileSystemWatchListener, FileSystemWatchOptions, FileSystemWatchSubscription, FileSystemWriteOptions, FsOperation, type LegacyFilePayloadModel, LegacyFileSystemProviderV2Adapter, type LegacyFileSystemProviderV2AdapterOptions, MemoryFileSystemProvider, MemoryFileSystemSnapshot, WorkspacePath, createDbkWorkspaceSnapshot, createFileMediaProvider, decodeUtf8Text, describeEntryMove, describePartialMove, documentCompanionPath, isFileSystemMoveRecoveryError, isFileSystemMoveStateError, isFileSystemPartialMoveError, moveFileSystemEntry, replaceMemoryWorkspaceFromDbk };
|
package/dist/filesystem/index.js
CHANGED
|
@@ -1,20 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import {
|
|
2
|
+
FileSystemContentContainer,
|
|
3
|
+
LegacyFileSystemProviderV2Adapter,
|
|
4
|
+
createDbkWorkspaceSnapshot,
|
|
5
|
+
createFileMediaProvider,
|
|
6
|
+
documentCompanionPath,
|
|
7
|
+
moveFileSystemEntry,
|
|
8
|
+
replaceMemoryWorkspaceFromDbk
|
|
9
|
+
} from "../chunk-XUML3MKV.js";
|
|
10
|
+
import {
|
|
11
|
+
IndexedDBContentContainer,
|
|
12
|
+
IndexedDBFileSystemProvider,
|
|
13
|
+
IndexedDBFileSystemProviderV2
|
|
14
|
+
} from "../chunk-6IYMTYMQ.js";
|
|
15
|
+
import {
|
|
16
|
+
MemoryFileSystemProvider,
|
|
17
|
+
MemoryFileSystemProviderV2
|
|
18
|
+
} from "../chunk-DN7A33LL.js";
|
|
19
|
+
import {
|
|
20
|
+
NativeFileSystemMoveRecoveryError,
|
|
21
|
+
NativeFileSystemProvider,
|
|
22
|
+
NativeFileSystemProviderV2,
|
|
23
|
+
isNativeFileSystemSupported,
|
|
24
|
+
loadDirectoryHandle,
|
|
25
|
+
openNativeFolder,
|
|
26
|
+
removeDirectoryHandle,
|
|
27
|
+
restoreNativeFolder,
|
|
28
|
+
storeDirectoryHandle
|
|
29
|
+
} from "../chunk-WJKYY5QR.js";
|
|
30
|
+
import "../chunk-AEHCVWU5.js";
|
|
31
|
+
import "../chunk-GM5YXU4L.js";
|
|
32
|
+
import {
|
|
33
|
+
ElectronFileSystemProvider,
|
|
34
|
+
ElectronFileSystemProviderV2
|
|
35
|
+
} from "../chunk-VTCSF7VS.js";
|
|
36
|
+
import {
|
|
37
|
+
isElectronHost
|
|
38
|
+
} from "../chunk-BNKV7MTO.js";
|
|
39
|
+
import "../chunk-FNW556FN.js";
|
|
40
|
+
import "../chunk-U722UUFN.js";
|
|
41
|
+
import {
|
|
42
|
+
parseFileSystemVersion,
|
|
43
|
+
tryParseFileSystemVersion
|
|
44
|
+
} from "../chunk-P4WATND4.js";
|
|
45
|
+
import {
|
|
46
|
+
FileSystemMoveRecoveryError,
|
|
47
|
+
FileSystemPartialMoveError,
|
|
48
|
+
describeEntryMove,
|
|
49
|
+
describePartialMove,
|
|
50
|
+
isFileSystemMoveRecoveryError,
|
|
51
|
+
isFileSystemMoveStateError,
|
|
52
|
+
isFileSystemPartialMoveError
|
|
53
|
+
} from "../chunk-MNSZ7EZN.js";
|
|
54
|
+
import {
|
|
55
|
+
decodeUtf8Text
|
|
56
|
+
} from "../chunk-FA7UNOXK.js";
|
|
57
|
+
import {
|
|
58
|
+
FsError,
|
|
59
|
+
WORKSPACE_ROOT,
|
|
60
|
+
deserializeFsError,
|
|
61
|
+
fsErrorFromUnknown,
|
|
62
|
+
isQuotaExceededError,
|
|
63
|
+
isSerializedFsError,
|
|
64
|
+
mapDomExceptionToFsErrorCode,
|
|
65
|
+
mapNodeErrorCodeToFsErrorCode,
|
|
66
|
+
parseWorkspacePath,
|
|
67
|
+
serializeFsError,
|
|
68
|
+
tryParseWorkspacePath,
|
|
69
|
+
workspacePathBasename,
|
|
70
|
+
workspacePathContains,
|
|
71
|
+
workspacePathDirname,
|
|
72
|
+
workspacePathJoin,
|
|
73
|
+
workspacePathToLegacy
|
|
74
|
+
} from "../chunk-JS6XFWQK.js";
|
|
75
|
+
import "../chunk-RVPGQBWR.js";
|
|
76
|
+
import {
|
|
77
|
+
getFileSystemProviderV2,
|
|
78
|
+
hasFileSystemProviderV2
|
|
79
|
+
} from "../chunk-EZKJZUNJ.js";
|
|
80
|
+
export {
|
|
81
|
+
ElectronFileSystemProvider,
|
|
82
|
+
ElectronFileSystemProviderV2,
|
|
83
|
+
FileSystemContentContainer,
|
|
84
|
+
FileSystemMoveRecoveryError,
|
|
85
|
+
FileSystemPartialMoveError,
|
|
86
|
+
FsError,
|
|
87
|
+
IndexedDBContentContainer,
|
|
88
|
+
IndexedDBFileSystemProvider,
|
|
89
|
+
IndexedDBFileSystemProviderV2,
|
|
90
|
+
LegacyFileSystemProviderV2Adapter,
|
|
91
|
+
MemoryFileSystemProvider,
|
|
92
|
+
MemoryFileSystemProviderV2,
|
|
93
|
+
NativeFileSystemMoveRecoveryError,
|
|
94
|
+
NativeFileSystemProvider,
|
|
95
|
+
NativeFileSystemProviderV2,
|
|
96
|
+
WORKSPACE_ROOT,
|
|
97
|
+
createDbkWorkspaceSnapshot,
|
|
98
|
+
createFileMediaProvider,
|
|
99
|
+
decodeUtf8Text,
|
|
100
|
+
describeEntryMove,
|
|
101
|
+
describePartialMove,
|
|
102
|
+
deserializeFsError,
|
|
103
|
+
documentCompanionPath,
|
|
104
|
+
fsErrorFromUnknown,
|
|
105
|
+
getFileSystemProviderV2,
|
|
106
|
+
hasFileSystemProviderV2,
|
|
107
|
+
isElectronHost,
|
|
108
|
+
isFileSystemMoveRecoveryError,
|
|
109
|
+
isFileSystemMoveStateError,
|
|
110
|
+
isFileSystemPartialMoveError,
|
|
111
|
+
isNativeFileSystemSupported,
|
|
112
|
+
isQuotaExceededError,
|
|
113
|
+
isSerializedFsError,
|
|
114
|
+
loadDirectoryHandle,
|
|
115
|
+
mapDomExceptionToFsErrorCode,
|
|
116
|
+
mapNodeErrorCodeToFsErrorCode,
|
|
117
|
+
moveFileSystemEntry,
|
|
118
|
+
openNativeFolder,
|
|
119
|
+
parseFileSystemVersion,
|
|
120
|
+
parseWorkspacePath,
|
|
121
|
+
removeDirectoryHandle,
|
|
122
|
+
replaceMemoryWorkspaceFromDbk,
|
|
123
|
+
restoreNativeFolder,
|
|
124
|
+
serializeFsError,
|
|
125
|
+
storeDirectoryHandle,
|
|
126
|
+
tryParseFileSystemVersion,
|
|
127
|
+
tryParseWorkspacePath,
|
|
128
|
+
workspacePathBasename,
|
|
129
|
+
workspacePathContains,
|
|
130
|
+
workspacePathDirname,
|
|
131
|
+
workspacePathJoin,
|
|
132
|
+
workspacePathToLegacy
|
|
133
|
+
};
|
|
20
134
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|