@bendyline/docblocks 2.6.1 → 2.6.2
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/THIRD_PARTY_NOTICES.txt +4 -4
- package/dist/{chunk-BVY7GGNV.js → chunk-5MJC4KOE.js} +97 -7
- package/dist/{chunk-6XHOOBYF.js → chunk-KFWPPIJH.js} +9 -0
- package/dist/filesystem/electron.d.ts +2 -1
- package/dist/filesystem/electron.js +2 -2
- package/dist/filesystem/index.d.ts +1 -1
- package/dist/filesystem/index.js +2 -2
- package/dist/host/index.d.ts +2 -2
- package/dist/host/index.js +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -2
- package/dist/{types-DBYraXxE.d.ts → types-DhLZZNEn.d.ts} +22 -2
- package/dist/workspace/index.d.ts +1 -1
- package/package.json +2 -2
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -14,7 +14,7 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
14
14
|
|
|
15
15
|
| Package | Version | License | Source |
|
|
16
16
|
| --- | --- | --- | --- |
|
|
17
|
-
| @bendyline/squisq | 2.11.
|
|
17
|
+
| @bendyline/squisq | 2.11.4 | MIT | https://github.com/bendyline/squisq |
|
|
18
18
|
| @types/debug | 4.1.12 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
|
|
19
19
|
| @types/hast | 3.0.4 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
|
|
20
20
|
| @types/katex | 0.16.8 | MIT | https://github.com/DefinitelyTyped/DefinitelyTyped |
|
|
@@ -132,7 +132,7 @@ This notice is included in the published npm tarball. Transitive packages instal
|
|
|
132
132
|
Package-local license, copying, and notice files are reproduced below. Where a published package omits its repository license, the reviewed aggregate or README identified in `Source files` supplies the retained material.
|
|
133
133
|
|
|
134
134
|
==============================================================================
|
|
135
|
-
Components: @bendyline/squisq@2.11.
|
|
135
|
+
Components: @bendyline/squisq@2.11.4
|
|
136
136
|
Source files: node_modules/@bendyline/squisq/LICENSE
|
|
137
137
|
==============================================================================
|
|
138
138
|
MIT License
|
|
@@ -158,7 +158,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
158
158
|
SOFTWARE.
|
|
159
159
|
|
|
160
160
|
==============================================================================
|
|
161
|
-
Components: @bendyline/squisq@2.11.
|
|
161
|
+
Components: @bendyline/squisq@2.11.4
|
|
162
162
|
Source files: node_modules/@bendyline/squisq/NOTICE.md
|
|
163
163
|
==============================================================================
|
|
164
164
|
# Third-Party Notices for @bendyline/squisq
|
|
@@ -189,7 +189,7 @@ third-party license texts for bundled code and data are shipped in
|
|
|
189
189
|
THIRD_PARTY_LICENSES.txt.
|
|
190
190
|
|
|
191
191
|
==============================================================================
|
|
192
|
-
Components: @bendyline/squisq@2.11.
|
|
192
|
+
Components: @bendyline/squisq@2.11.4
|
|
193
193
|
Source files: node_modules/@bendyline/squisq/THIRD_PARTY_LICENSES.txt
|
|
194
194
|
==============================================================================
|
|
195
195
|
THIRD-PARTY LICENSES FOR @bendyline/squisq
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
|
|
3
|
+
FILE_SYSTEM_TRANSFER_LIMITS,
|
|
3
4
|
maybeGetDocBlocksHost
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KFWPPIJH.js";
|
|
6
|
+
import {
|
|
7
|
+
HOST_WIRE_LIMITS,
|
|
8
|
+
isBoundedBytePayload,
|
|
9
|
+
isBoundedString
|
|
10
|
+
} from "./chunk-2WDJ27EH.js";
|
|
5
11
|
import {
|
|
6
12
|
isRecord
|
|
7
13
|
} from "./chunk-73OOROXH.js";
|
|
@@ -64,16 +70,25 @@ var ElectronFileSystemProviderV2 = class {
|
|
|
64
70
|
const canonical = parseWorkspacePath(String(path));
|
|
65
71
|
return this.request(
|
|
66
72
|
"read",
|
|
67
|
-
() =>
|
|
68
|
-
|
|
69
|
-
if (
|
|
73
|
+
async () => {
|
|
74
|
+
const host = getHostFsV2("read");
|
|
75
|
+
if (host.beginRead && host.readChunk && host.closeTransfer) {
|
|
76
|
+
const value2 = unwrap(await host.stat(this.instanceId, canonical), "read");
|
|
77
|
+
const stat = value2 ? normalizeEntry(value2) : null;
|
|
78
|
+
if (stat?.kind === "file" && stat.size > FILE_SYSTEM_TRANSFER_LIMITS.chunkBytes) {
|
|
79
|
+
return { ok: true, value: await this.readTransferredFile(host, canonical) };
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const value = unwrap(await host.readFile(this.instanceId, canonical), "read");
|
|
83
|
+
if (!value) return { ok: true, value: null };
|
|
70
84
|
const entry = normalizeFile(value.entry);
|
|
71
85
|
const data = copyWireBuffer(value.data);
|
|
72
86
|
if (data.byteLength !== entry.size) {
|
|
73
87
|
throw new TypeError("Filesystem transport returned file bytes with the wrong size.");
|
|
74
88
|
}
|
|
75
|
-
return Object.freeze({ entry, data });
|
|
76
|
-
}
|
|
89
|
+
return { ok: true, value: Object.freeze({ entry, data }) };
|
|
90
|
+
},
|
|
91
|
+
(value) => value
|
|
77
92
|
);
|
|
78
93
|
}
|
|
79
94
|
async readDirectory(path) {
|
|
@@ -86,13 +101,82 @@ var ElectronFileSystemProviderV2 = class {
|
|
|
86
101
|
}
|
|
87
102
|
async writeFile(path, data, options) {
|
|
88
103
|
const canonical = parseWorkspacePath(String(path));
|
|
104
|
+
this.assertOpen("write");
|
|
105
|
+
if (data.byteLength > FILE_SYSTEM_TRANSFER_LIMITS.fileBytes) {
|
|
106
|
+
throw new FsError("quota-exceeded", "This file exceeds the 1 GiB desktop file limit.", {
|
|
107
|
+
operation: "write",
|
|
108
|
+
path: canonical
|
|
109
|
+
});
|
|
110
|
+
}
|
|
89
111
|
const owned = copyBytes(data);
|
|
90
112
|
return this.request(
|
|
91
113
|
"write",
|
|
92
|
-
() =>
|
|
114
|
+
async () => {
|
|
115
|
+
const host = getHostFsV2("write");
|
|
116
|
+
if (owned.byteLength > FILE_SYSTEM_TRANSFER_LIMITS.chunkBytes && host.beginWrite && host.writeChunk && host.finishWrite && host.closeTransfer) {
|
|
117
|
+
const id = normalizeTransferId(
|
|
118
|
+
unwrap(
|
|
119
|
+
await host.beginWrite(this.instanceId, canonical, owned.byteLength, options),
|
|
120
|
+
"write"
|
|
121
|
+
)
|
|
122
|
+
);
|
|
123
|
+
try {
|
|
124
|
+
for (let offset = 0; offset < owned.byteLength; offset += FILE_SYSTEM_TRANSFER_LIMITS.chunkBytes) {
|
|
125
|
+
unwrap(
|
|
126
|
+
await host.writeChunk(
|
|
127
|
+
this.instanceId,
|
|
128
|
+
id,
|
|
129
|
+
offset,
|
|
130
|
+
owned.slice(offset, offset + FILE_SYSTEM_TRANSFER_LIMITS.chunkBytes)
|
|
131
|
+
),
|
|
132
|
+
"write"
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
return await host.finishWrite(this.instanceId, id);
|
|
136
|
+
} finally {
|
|
137
|
+
unwrap(await host.closeTransfer(this.instanceId, id), "write");
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (owned.byteLength > HOST_WIRE_LIMITS.binaryBytes) {
|
|
141
|
+
throw new FsError(
|
|
142
|
+
"not-supported",
|
|
143
|
+
"This desktop version does not support large file transfers. Update DocBlocks and retry."
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
return host.writeFile(this.instanceId, canonical, owned, options);
|
|
147
|
+
},
|
|
93
148
|
normalizeFile
|
|
94
149
|
);
|
|
95
150
|
}
|
|
151
|
+
async readTransferredFile(host, path) {
|
|
152
|
+
if (!host.beginRead || !host.readChunk || !host.closeTransfer) {
|
|
153
|
+
throw new FsError("not-supported", "Large file transfers are unavailable.");
|
|
154
|
+
}
|
|
155
|
+
const transfer = unwrap(await host.beginRead(this.instanceId, path), "read");
|
|
156
|
+
if (transfer === null) return null;
|
|
157
|
+
if (!isRecord(transfer) || Object.keys(transfer).some((key) => key !== "transferId" && key !== "entry")) {
|
|
158
|
+
throw new TypeError("Filesystem returned an invalid transfer.");
|
|
159
|
+
}
|
|
160
|
+
const id = normalizeTransferId(transfer.transferId);
|
|
161
|
+
try {
|
|
162
|
+
const entry = normalizeFile(transfer.entry);
|
|
163
|
+
if (entry.path !== path || entry.size > FILE_SYSTEM_TRANSFER_LIMITS.fileBytes) {
|
|
164
|
+
throw new TypeError("Filesystem transfer returned an invalid file.");
|
|
165
|
+
}
|
|
166
|
+
const data = new Uint8Array(entry.size);
|
|
167
|
+
for (let offset = 0; offset < data.byteLength; ) {
|
|
168
|
+
const chunk = unwrap(await host.readChunk(this.instanceId, id, offset), "read");
|
|
169
|
+
if (!isBoundedBytePayload(chunk, FILE_SYSTEM_TRANSFER_LIMITS.chunkBytes) || chunk.byteLength === 0 || offset + chunk.byteLength > data.byteLength) {
|
|
170
|
+
throw new TypeError("Filesystem transfer returned an invalid chunk.");
|
|
171
|
+
}
|
|
172
|
+
data.set(chunk instanceof Uint8Array ? chunk : new Uint8Array(chunk), offset);
|
|
173
|
+
offset += chunk.byteLength;
|
|
174
|
+
}
|
|
175
|
+
return Object.freeze({ entry, data: data.buffer });
|
|
176
|
+
} finally {
|
|
177
|
+
unwrap(await host.closeTransfer(this.instanceId, id), "read");
|
|
178
|
+
}
|
|
179
|
+
}
|
|
96
180
|
async createDirectory(path, options) {
|
|
97
181
|
const canonical = parseWorkspacePath(String(path));
|
|
98
182
|
return this.request(
|
|
@@ -291,6 +375,12 @@ function unwrap(result, operation) {
|
|
|
291
375
|
}
|
|
292
376
|
throw deserializeFsError(result.error);
|
|
293
377
|
}
|
|
378
|
+
function normalizeTransferId(value) {
|
|
379
|
+
if (!isBoundedString(value, HOST_WIRE_LIMITS.identifierCharacters, 1)) {
|
|
380
|
+
throw new TypeError("Filesystem returned an invalid transfer ID.");
|
|
381
|
+
}
|
|
382
|
+
return value;
|
|
383
|
+
}
|
|
294
384
|
function normalizeEntry(entry) {
|
|
295
385
|
if (!isRecord(entry)) throw new TypeError("Expected a filesystem entry object.");
|
|
296
386
|
if (typeof entry.path !== "string")
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// src/host/filesystem-v2.ts
|
|
2
|
+
var FILE_SYSTEM_TRANSFER_LIMITS = Object.freeze({
|
|
3
|
+
fileBytes: 1024 * 1024 * 1024,
|
|
4
|
+
chunkBytes: 4 * 1024 * 1024,
|
|
5
|
+
totalBytes: 2 * 1024 * 1024 * 1024,
|
|
6
|
+
transfers: 4,
|
|
7
|
+
idleMs: 12e4,
|
|
8
|
+
lifetimeMs: 15 * 6e4
|
|
9
|
+
});
|
|
2
10
|
var ELECTRON_FILE_SYSTEM_V2_CAPABILITIES = Object.freeze({
|
|
3
11
|
writeAtomicity: "process",
|
|
4
12
|
moveAtomicity: "process",
|
|
@@ -29,6 +37,7 @@ function maybeGetDocBlocksHost() {
|
|
|
29
37
|
}
|
|
30
38
|
|
|
31
39
|
export {
|
|
40
|
+
FILE_SYSTEM_TRANSFER_LIMITS,
|
|
32
41
|
ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
|
|
33
42
|
isElectronHost,
|
|
34
43
|
getDocBlocksHost,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as FileSystemProviderV2, r as FileSystemProviderCapabilities, 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, C as FileSystemWatchEvent, H as FileSystemWatchOptions, I as FileSystemWatchSubscription, q as FileSystemProvider, F as FileCommitResult, j as FileSystemEntry, b as FileMeta } from '../types-Bb3yccTH.js';
|
|
2
2
|
import { a as WorkspacePath } from '../workspace-path-CWVrcuPL.js';
|
|
3
3
|
export { isElectronHost } from '../host/index.js';
|
|
4
|
-
import '../types-
|
|
4
|
+
import '../types-DhLZZNEn.js';
|
|
5
5
|
|
|
6
6
|
/** Pure renderer-side client for the typed Electron filesystem v2 transport. */
|
|
7
7
|
declare class ElectronFileSystemProviderV2 implements FileSystemProviderV2 {
|
|
@@ -24,6 +24,7 @@ declare class ElectronFileSystemProviderV2 implements FileSystemProviderV2 {
|
|
|
24
24
|
readFile(path: WorkspacePath): Promise<FileSystemFileRead | null>;
|
|
25
25
|
readDirectory(path: WorkspacePath): Promise<readonly FileSystemEntrySnapshot[]>;
|
|
26
26
|
writeFile(path: WorkspacePath, data: ArrayBuffer | Uint8Array, options?: FileSystemWriteOptions): Promise<FileSystemFileSnapshot>;
|
|
27
|
+
private readTransferredFile;
|
|
27
28
|
createDirectory(path: WorkspacePath, options?: FileSystemCreateDirectoryOptions): Promise<FileSystemDirectorySnapshot>;
|
|
28
29
|
remove(path: WorkspacePath, options?: FileSystemRemoveOptions): Promise<FileSystemRemoveResult>;
|
|
29
30
|
move(oldPath: WorkspacePath, newPath: WorkspacePath, options?: FileSystemMoveOptions): Promise<FileSystemEntrySnapshot>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ElectronFileSystemProvider,
|
|
3
3
|
ElectronFileSystemProviderV2
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-5MJC4KOE.js";
|
|
5
5
|
import {
|
|
6
6
|
isElectronHost
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KFWPPIJH.js";
|
|
8
8
|
import "../chunk-2WDJ27EH.js";
|
|
9
9
|
import "../chunk-73OOROXH.js";
|
|
10
10
|
import "../chunk-M62ZGJ5I.js";
|
|
@@ -10,7 +10,7 @@ import { MediaProvider } from '@bendyline/squisq/schemas';
|
|
|
10
10
|
export { NativeFileSystemMovePathState, NativeFileSystemMoveRecoveryError, NativeFileSystemMoveRecoveryState, NativeFileSystemProvider, NativeFileSystemProviderV2, isNativeFileSystemSupported, loadDirectoryHandle, openNativeFolder, removeDirectoryHandle, restoreNativeFolder, storeDirectoryHandle } from './native.js';
|
|
11
11
|
export { ElectronFileSystemProvider, ElectronFileSystemProviderV2 } from './electron.js';
|
|
12
12
|
export { isElectronHost } from '../host/index.js';
|
|
13
|
-
import '../types-
|
|
13
|
+
import '../types-DhLZZNEn.js';
|
|
14
14
|
|
|
15
15
|
interface DecodeUtf8TextOptions {
|
|
16
16
|
/** User-facing description of the payload being decoded. */
|
package/dist/filesystem/index.js
CHANGED
|
@@ -32,10 +32,10 @@ import "../chunk-KQ6756AJ.js";
|
|
|
32
32
|
import {
|
|
33
33
|
ElectronFileSystemProvider,
|
|
34
34
|
ElectronFileSystemProviderV2
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-5MJC4KOE.js";
|
|
36
36
|
import {
|
|
37
37
|
isElectronHost
|
|
38
|
-
} from "../chunk-
|
|
38
|
+
} from "../chunk-KFWPPIJH.js";
|
|
39
39
|
import "../chunk-2WDJ27EH.js";
|
|
40
40
|
import "../chunk-73OOROXH.js";
|
|
41
41
|
import {
|
package/dist/host/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason,
|
|
1
|
+
import { S as OpenRequest, O as HostPinnedDocument, D as DocBlocksHostAPI } from '../types-DhLZZNEn.js';
|
|
2
|
+
export { a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, F as FILE_SYSTEM_TRANSFER_LIMITS, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason, I as HostEnvironment, J as HostExportTargetGrant, K as HostFileSystemReadTransfer, L as HostFileSystemV2OpenRequest, M as HostFileSystemV2Result, N as HostFileSystemV2WatchMessage, P as HostPrepareCloseRequest, Q as HostPrepareCloseResult, R as MenuCommand, U as UpdateCheckResult, T as UpdateInstallResult, V as UpdaterStatus } from '../types-DhLZZNEn.js';
|
|
3
3
|
import '../types-Bb3yccTH.js';
|
|
4
4
|
import '../workspace-path-CWVrcuPL.js';
|
|
5
5
|
|
package/dist/host/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
|
|
3
|
+
FILE_SYSTEM_TRANSFER_LIMITS,
|
|
3
4
|
getDocBlocksHost,
|
|
4
5
|
isElectronHost,
|
|
5
6
|
maybeGetDocBlocksHost
|
|
6
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-KFWPPIJH.js";
|
|
7
8
|
import {
|
|
8
9
|
HOST_WIRE_LIMITS,
|
|
9
10
|
MAX_HOST_PINNED_DOCUMENTS,
|
|
@@ -16,6 +17,7 @@ import {
|
|
|
16
17
|
} from "../chunk-2WDJ27EH.js";
|
|
17
18
|
export {
|
|
18
19
|
ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
|
|
20
|
+
FILE_SYSTEM_TRANSFER_LIMITS,
|
|
19
21
|
HOST_WIRE_LIMITS,
|
|
20
22
|
MAX_HOST_PINNED_DOCUMENTS,
|
|
21
23
|
getDocBlocksHost,
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,6 @@ export { DOCUMENT_RECOVERY_JOURNAL_SCHEMA_VERSION, DOCUMENT_RECOVERY_JOURNAL_STO
|
|
|
9
9
|
export { ElectronWorkspaceReconciliation, TransientOrigin, WorkspaceDescriptor, ensureDefaultWorkspace, getTransientWorkspace, getWorkspace, listWorkspaces, parsePersistedWorkspaceList, reconcileElectronWorkspaceDescriptors, registerTransientWorkspace, removeWorkspace, saveWorkspace, touchWorkspace, unregisterTransientWorkspace } from './workspace/index.js';
|
|
10
10
|
export { HOST_WIRE_LIMITS, MAX_HOST_PINNED_DOCUMENTS, getDocBlocksHost, isBoundedBytePayload, isBoundedString, isElectronHost, isTrustedRendererUrl, maybeGetDocBlocksHost, parseExternalHttpUrl, parseOpenRequest, parsePinnedMenuDocuments } from './host/index.js';
|
|
11
11
|
export { SHARED_DOCUMENT_LIMITS, SharedDocumentHashParseResult, SharedDocumentMode, SharedDocumentPayload, createSharedDocumentHash, createSharedDocumentUrl, parseSharedDocumentHash } from './share/index.js';
|
|
12
|
-
export { D as DocBlocksHostAPI, a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason,
|
|
12
|
+
export { D as DocBlocksHostAPI, a as DocBlocksHostClipboardAPI, b as DocBlocksHostExportAPI, c as DocBlocksHostExternalAPI, d as DocBlocksHostFfmpegAPI, e as DocBlocksHostFsAPI, f as DocBlocksHostFsV2API, g as DocBlocksHostGitAPI, h as DocBlocksHostLifecycleAPI, i as DocBlocksHostMenuAPI, j as DocBlocksHostShellAPI, k as DocBlocksHostUpdaterAPI, l as DocBlocksHostWorkspacesAPI, E as ELECTRON_FILE_SYSTEM_V2_CAPABILITIES, m as ElectronWorkspaceInfo, n as ExternalBinaryCommitResult, F as FILE_SYSTEM_TRANSFER_LIMITS, G as GitBranchInfo, o as GitCapabilities, p as GitCloneHandle, q as GitCloneProgress, r as GitError, s as GitErrorCode, t as GitFileAtRevision, u as GitFileChange, v as GitFileStatusCode, w as GitLogEntry, x as GitLogOptions, y as GitRemoteInfo, z as GitRepoDetection, A as GitResult, B as GitRevision, C as GitStatus, H as HostCloseReason, I as HostEnvironment, J as HostExportTargetGrant, K as HostFileSystemReadTransfer, L as HostFileSystemV2OpenRequest, M as HostFileSystemV2Result, N as HostFileSystemV2WatchMessage, O as HostPinnedDocument, P as HostPrepareCloseRequest, Q as HostPrepareCloseResult, R as MenuCommand, S as OpenRequest, U as UpdateCheckResult, T as UpdateInstallResult, V as UpdaterStatus } from './types-DhLZZNEn.js';
|
|
13
13
|
import '@bendyline/squisq/storage';
|
|
14
14
|
import '@bendyline/squisq/schemas';
|
package/dist/index.js
CHANGED
|
@@ -38,13 +38,14 @@ import "./chunk-KQ6756AJ.js";
|
|
|
38
38
|
import {
|
|
39
39
|
ElectronFileSystemProvider,
|
|
40
40
|
ElectronFileSystemProviderV2
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5MJC4KOE.js";
|
|
42
42
|
import {
|
|
43
43
|
ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
|
|
44
|
+
FILE_SYSTEM_TRANSFER_LIMITS,
|
|
44
45
|
getDocBlocksHost,
|
|
45
46
|
isElectronHost,
|
|
46
47
|
maybeGetDocBlocksHost
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-KFWPPIJH.js";
|
|
48
49
|
import {
|
|
49
50
|
HOST_WIRE_LIMITS,
|
|
50
51
|
MAX_HOST_PINNED_DOCUMENTS,
|
|
@@ -128,6 +129,7 @@ export {
|
|
|
128
129
|
ELECTRON_FILE_SYSTEM_V2_CAPABILITIES,
|
|
129
130
|
ElectronFileSystemProvider,
|
|
130
131
|
ElectronFileSystemProviderV2,
|
|
132
|
+
FILE_SYSTEM_TRANSFER_LIMITS,
|
|
131
133
|
FileSystemContentContainer,
|
|
132
134
|
FileSystemMoveRecoveryError,
|
|
133
135
|
FileSystemPartialMoveError,
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
import { S as SerializedFsError,
|
|
1
|
+
import { S as SerializedFsError, n as FileSystemFileSnapshot, K as FileSystemWriteOptions, r as FileSystemProviderCapabilities, k as FileSystemEntrySnapshot, m as FileSystemFileRead, g as FileSystemCreateDirectoryOptions, h as FileSystemDirectorySnapshot, u as FileSystemRemoveOptions, v as FileSystemRemoveResult, o as FileSystemMoveOptions, w as FileSystemSnapshot, C as FileSystemWatchEvent, F as FileCommitResult, j as FileSystemEntry, b as FileMeta } from './types-Bb3yccTH.js';
|
|
2
2
|
import { a as WorkspacePath } from './workspace-path-CWVrcuPL.js';
|
|
3
3
|
|
|
4
|
+
/** File size and per-message size are deliberately separate budgets. */
|
|
5
|
+
declare const FILE_SYSTEM_TRANSFER_LIMITS: Readonly<{
|
|
6
|
+
fileBytes: number;
|
|
7
|
+
chunkBytes: number;
|
|
8
|
+
totalBytes: number;
|
|
9
|
+
transfers: 4;
|
|
10
|
+
idleMs: 120000;
|
|
11
|
+
lifetimeMs: number;
|
|
12
|
+
}>;
|
|
13
|
+
interface HostFileSystemReadTransfer {
|
|
14
|
+
readonly transferId: string;
|
|
15
|
+
readonly entry: FileSystemFileSnapshot;
|
|
16
|
+
}
|
|
4
17
|
/** Stable capabilities shared by the Electron v2 client and native backend. */
|
|
5
18
|
declare const ELECTRON_FILE_SYSTEM_V2_CAPABILITIES: FileSystemProviderCapabilities;
|
|
6
19
|
/** Explicit result envelope; Electron does not preserve custom Error fields. */
|
|
@@ -30,6 +43,13 @@ type HostFileSystemV2WatchMessage = {
|
|
|
30
43
|
};
|
|
31
44
|
/** Wire-level filesystem v2 API exposed by preload. */
|
|
32
45
|
interface DocBlocksHostFsV2API {
|
|
46
|
+
/** Optional for compatibility with older preload versions. */
|
|
47
|
+
beginRead?(instanceId: string, path: WorkspacePath): Promise<HostFileSystemV2Result<HostFileSystemReadTransfer | null>>;
|
|
48
|
+
readChunk?(instanceId: string, transferId: string, offset: number): Promise<HostFileSystemV2Result<ArrayBuffer>>;
|
|
49
|
+
beginWrite?(instanceId: string, path: WorkspacePath, byteLength: number, options?: FileSystemWriteOptions): Promise<HostFileSystemV2Result<string>>;
|
|
50
|
+
writeChunk?(instanceId: string, transferId: string, offset: number, data: ArrayBuffer | Uint8Array): Promise<HostFileSystemV2Result<null>>;
|
|
51
|
+
finishWrite?(instanceId: string, transferId: string): Promise<HostFileSystemV2Result<FileSystemFileSnapshot>>;
|
|
52
|
+
closeTransfer?(instanceId: string, transferId: string): Promise<HostFileSystemV2Result<null>>;
|
|
33
53
|
open(request: HostFileSystemV2OpenRequest): Promise<HostFileSystemV2Result<FileSystemProviderCapabilities>>;
|
|
34
54
|
stat(instanceId: string, path: WorkspacePath): Promise<HostFileSystemV2Result<FileSystemEntrySnapshot | null>>;
|
|
35
55
|
readFile(instanceId: string, path: WorkspacePath): Promise<HostFileSystemV2Result<FileSystemFileRead | null>>;
|
|
@@ -554,4 +574,4 @@ interface DocBlocksHostAPI {
|
|
|
554
574
|
onOpenRequest(listener: (request: OpenRequest) => void): () => void;
|
|
555
575
|
}
|
|
556
576
|
|
|
557
|
-
export { type GitResult as A, type GitRevision as B, type GitStatus as C, type DocBlocksHostAPI as D, ELECTRON_FILE_SYSTEM_V2_CAPABILITIES as E,
|
|
577
|
+
export { type GitResult as A, type GitRevision as B, type GitStatus as C, type DocBlocksHostAPI as D, ELECTRON_FILE_SYSTEM_V2_CAPABILITIES as E, FILE_SYSTEM_TRANSFER_LIMITS as F, type GitBranchInfo as G, type HostCloseReason as H, type HostEnvironment as I, type HostExportTargetGrant as J, type HostFileSystemReadTransfer as K, type HostFileSystemV2OpenRequest as L, type HostFileSystemV2Result as M, type HostFileSystemV2WatchMessage as N, type HostPinnedDocument as O, type HostPrepareCloseRequest as P, type HostPrepareCloseResult as Q, type MenuCommand as R, type OpenRequest as S, type UpdateInstallResult as T, type UpdateCheckResult as U, type UpdaterStatus as V, type DocBlocksHostClipboardAPI as a, type DocBlocksHostExportAPI as b, type DocBlocksHostExternalAPI as c, type DocBlocksHostFfmpegAPI as d, type DocBlocksHostFsAPI as e, type DocBlocksHostFsV2API as f, type DocBlocksHostGitAPI as g, type DocBlocksHostLifecycleAPI as h, type DocBlocksHostMenuAPI as i, type DocBlocksHostShellAPI as j, type DocBlocksHostUpdaterAPI as k, type DocBlocksHostWorkspacesAPI as l, type ElectronWorkspaceInfo as m, type ExternalBinaryCommitResult as n, type GitCapabilities as o, type GitCloneHandle as p, type GitCloneProgress as q, type GitError as r, type GitErrorCode as s, type GitFileAtRevision as t, type GitFileChange as u, type GitFileStatusCode as v, type GitLogEntry as w, type GitLogOptions as x, type GitRemoteInfo as y, type GitRepoDetection as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { q as FileSystemProvider } from '../types-Bb3yccTH.js';
|
|
2
|
-
import { m as ElectronWorkspaceInfo,
|
|
2
|
+
import { m as ElectronWorkspaceInfo, I as HostEnvironment } from '../types-DhLZZNEn.js';
|
|
3
3
|
import '../workspace-path-CWVrcuPL.js';
|
|
4
4
|
|
|
5
5
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/docblocks",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "Core data structures and filesystem abstractions for DocBlocks",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Bendyline",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"typecheck": "tsc --noEmit"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@bendyline/squisq": "2.11.
|
|
109
|
+
"@bendyline/squisq": "2.11.4",
|
|
110
110
|
"zod": "3.25.76"
|
|
111
111
|
}
|
|
112
112
|
}
|