@diaryx/wasm-node 0.14.0 → 0.14.1-dev.e1611e0
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/README.md +26 -23
- package/diaryx_wasm.d.ts +3 -3
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,16 +5,15 @@ part_of: '[README](/crates/README.md)'
|
|
|
5
5
|
audience:
|
|
6
6
|
- developers
|
|
7
7
|
contents:
|
|
8
|
-
|
|
8
|
+
- '[README](/crates/diaryx_wasm/src/README.md)'
|
|
9
9
|
attachments:
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
- '[Cargo.toml](/crates/diaryx_wasm/Cargo.toml)'
|
|
11
|
+
- '[build.rs](/crates/diaryx_wasm/build.rs)'
|
|
12
12
|
exclude:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
- '*.lock'
|
|
14
|
+
- '*.db'
|
|
15
|
+
- pkg/**
|
|
16
16
|
---
|
|
17
|
-
|
|
18
17
|
# diaryx_wasm
|
|
19
18
|
|
|
20
19
|
WebAssembly bindings for `diaryx_core`, used by the web frontend in `apps/web`.
|
|
@@ -50,19 +49,21 @@ Current filesystem test suites live in:
|
|
|
50
49
|
|
|
51
50
|
The crate provides typed class-based APIs that wrap `diaryx_core` functionality:
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
52
|
+
|
|
53
|
+
| Class | Purpose |
|
|
54
|
+
| ----------------------- | ----------------------------------------- |
|
|
55
|
+
| `DiaryxWorkspace` | Workspace tree operations |
|
|
56
|
+
| `DiaryxEntry` | Entry CRUD operations |
|
|
57
|
+
| `DiaryxFrontmatter` | Frontmatter manipulation |
|
|
58
|
+
| `DiaryxSearch` | Workspace search |
|
|
59
|
+
| `DiaryxTemplate` | Template management |
|
|
60
|
+
| `DiaryxValidation` | Link integrity validation and fixing |
|
|
61
|
+
| `DiaryxExport` | Export with audience filtering |
|
|
62
|
+
| `DiaryxAttachment` | Attachment upload/download |
|
|
63
|
+
| `DiaryxFilesystem` | Low-level filesystem operations (sync) |
|
|
64
|
+
| `DiaryxAsyncFilesystem` | Async filesystem operations with Promises |
|
|
65
|
+
| `Diaryx` | Unified command API (includes CRDT ops) |
|
|
66
|
+
|
|
66
67
|
|
|
67
68
|
### In-Memory Filesystem
|
|
68
69
|
|
|
@@ -352,11 +353,13 @@ await diaryx.executeJs({
|
|
|
352
353
|
|
|
353
354
|
CRDT operations use `doc_type` to specify which document to operate on:
|
|
354
355
|
|
|
355
|
-
|
|
356
|
-
|
|
|
357
|
-
|
|
|
356
|
+
|
|
357
|
+
| doc_type | doc_name | Description |
|
|
358
|
+
| ----------- | --------- | ------------------------------------------ |
|
|
359
|
+
| `workspace` | `null` | The workspace file hierarchy metadata |
|
|
358
360
|
| `body` | file path | Per-file body content (e.g., `notes/a.md`) |
|
|
359
361
|
|
|
362
|
+
|
|
360
363
|
## Error Handling
|
|
361
364
|
|
|
362
365
|
All methods return `Result<T, JsValue>` for JavaScript interop. Errors are converted to JavaScript exceptions with descriptive messages.
|
package/diaryx_wasm.d.ts
CHANGED
|
@@ -462,9 +462,6 @@ export interface InitOutput {
|
|
|
462
462
|
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
463
463
|
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
464
464
|
readonly jsasyncfilesystem_new: (a: any) => number;
|
|
465
|
-
readonly init: () => void;
|
|
466
|
-
readonly now_timestamp: () => [number, number];
|
|
467
|
-
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
468
465
|
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
469
466
|
readonly __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
470
467
|
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
@@ -500,6 +497,9 @@ export interface InitOutput {
|
|
|
500
497
|
readonly wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
501
498
|
readonly wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
502
499
|
readonly wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
500
|
+
readonly init: () => void;
|
|
501
|
+
readonly now_timestamp: () => [number, number];
|
|
502
|
+
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
503
503
|
readonly wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
|
|
504
504
|
readonly wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
|
|
505
505
|
readonly wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
|
package/diaryx_wasm_bg.wasm
CHANGED
|
Binary file
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -4,9 +4,6 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
5
5
|
export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
|
6
6
|
export const jsasyncfilesystem_new: (a: any) => number;
|
|
7
|
-
export const init: () => void;
|
|
8
|
-
export const now_timestamp: () => [number, number];
|
|
9
|
-
export const today_formatted: (a: number, b: number) => [number, number];
|
|
10
7
|
export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
11
8
|
export const __wbg_wasmsyncclient_free: (a: number, b: number) => void;
|
|
12
9
|
export const diaryxbackend_create: (a: number, b: number) => any;
|
|
@@ -42,6 +39,9 @@ export const wasmsyncclient_pollOutgoingText: (a: number) => [number, number];
|
|
|
42
39
|
export const wasmsyncclient_queueLocalUpdate: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
43
40
|
export const wasmsyncclient_setSessionCode: (a: number, b: number, c: number) => void;
|
|
44
41
|
export const wasmsyncclient_unfocusFiles: (a: number, b: number, c: number) => void;
|
|
42
|
+
export const init: () => void;
|
|
43
|
+
export const now_timestamp: () => [number, number];
|
|
44
|
+
export const today_formatted: (a: number, b: number) => [number, number];
|
|
45
45
|
export const wasm_bindgen__closure__destroy__h358403ff5b31de35: (a: number, b: number) => void;
|
|
46
46
|
export const wasm_bindgen__convert__closures_____invoke__h9824f9855d7aa260: (a: number, b: number, c: any, d: any) => void;
|
|
47
47
|
export const wasm_bindgen__convert__closures_____invoke__h4b881ac518a5291a: (a: number, b: number, c: any) => void;
|
package/package.json
CHANGED