@diaryx/wasm-node 1.4.0-dev.98aae90 → 1.4.0-dev.c0e8f64
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/diaryx_wasm.d.ts +12 -0
- package/diaryx_wasm.js +28 -1
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +2 -0
- package/package.json +1 -1
package/diaryx_wasm.d.ts
CHANGED
|
@@ -170,6 +170,11 @@ export class DiaryxBackend {
|
|
|
170
170
|
* This avoids JSON serialization overhead for better performance.
|
|
171
171
|
*/
|
|
172
172
|
executeJs(command: any): Promise<any>;
|
|
173
|
+
/**
|
|
174
|
+
* Get the current configuration from root index frontmatter.
|
|
175
|
+
* Config keys are stored as `diaryx_*` properties.
|
|
176
|
+
*/
|
|
177
|
+
getConfig(): Promise<any>;
|
|
173
178
|
/**
|
|
174
179
|
* Check if this backend has native sync support.
|
|
175
180
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -221,6 +226,11 @@ export class DiaryxBackend {
|
|
|
221
226
|
* Returns data as Uint8Array for efficient handling without base64 encoding.
|
|
222
227
|
*/
|
|
223
228
|
readBinary(path: string): Promise<any>;
|
|
229
|
+
/**
|
|
230
|
+
* Save configuration to root index frontmatter.
|
|
231
|
+
* Config keys are stored as `diaryx_*` properties.
|
|
232
|
+
*/
|
|
233
|
+
saveConfig(config_js: any): Promise<any>;
|
|
224
234
|
/**
|
|
225
235
|
* No-op — CrdtFs is not used; sync handled by Extism plugin.
|
|
226
236
|
*/
|
|
@@ -295,10 +305,12 @@ export interface InitOutput {
|
|
|
295
305
|
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
296
306
|
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
297
307
|
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
308
|
+
readonly diaryxbackend_getConfig: (a: number) => any;
|
|
298
309
|
readonly diaryxbackend_hasNativeSync: (a: number) => number;
|
|
299
310
|
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
300
311
|
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
301
312
|
readonly diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
313
|
+
readonly diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
302
314
|
readonly diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
303
315
|
readonly diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
304
316
|
readonly jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
package/diaryx_wasm.js
CHANGED
|
@@ -137,6 +137,15 @@ export class DiaryxBackend {
|
|
|
137
137
|
const ret = wasm.diaryxbackend_executeJs(this.__wbg_ptr, command);
|
|
138
138
|
return ret;
|
|
139
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Get the current configuration from root index frontmatter.
|
|
142
|
+
* Config keys are stored as `diaryx_*` properties.
|
|
143
|
+
* @returns {Promise<any>}
|
|
144
|
+
*/
|
|
145
|
+
getConfig() {
|
|
146
|
+
const ret = wasm.diaryxbackend_getConfig(this.__wbg_ptr);
|
|
147
|
+
return ret;
|
|
148
|
+
}
|
|
140
149
|
/**
|
|
141
150
|
* Check if this backend has native sync support.
|
|
142
151
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -213,6 +222,16 @@ export class DiaryxBackend {
|
|
|
213
222
|
const ret = wasm.diaryxbackend_readBinary(this.__wbg_ptr, ptr0, len0);
|
|
214
223
|
return ret;
|
|
215
224
|
}
|
|
225
|
+
/**
|
|
226
|
+
* Save configuration to root index frontmatter.
|
|
227
|
+
* Config keys are stored as `diaryx_*` properties.
|
|
228
|
+
* @param {any} config_js
|
|
229
|
+
* @returns {Promise<any>}
|
|
230
|
+
*/
|
|
231
|
+
saveConfig(config_js) {
|
|
232
|
+
const ret = wasm.diaryxbackend_saveConfig(this.__wbg_ptr, config_js);
|
|
233
|
+
return ret;
|
|
234
|
+
}
|
|
216
235
|
/**
|
|
217
236
|
* No-op — CrdtFs is not used; sync handled by Extism plugin.
|
|
218
237
|
* @param {boolean} _enabled
|
|
@@ -630,6 +649,10 @@ function __wbg_get_imports() {
|
|
|
630
649
|
const ret = arg0.next;
|
|
631
650
|
return ret;
|
|
632
651
|
},
|
|
652
|
+
__wbg_parse_e9eddd2a82c706eb: function() { return handleError(function (arg0, arg1) {
|
|
653
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
654
|
+
return ret;
|
|
655
|
+
}, arguments); },
|
|
633
656
|
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
634
657
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
635
658
|
},
|
|
@@ -677,6 +700,10 @@ function __wbg_get_imports() {
|
|
|
677
700
|
const ret = typeof window === 'undefined' ? null : window;
|
|
678
701
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
679
702
|
},
|
|
703
|
+
__wbg_stringify_5ae93966a84901ac: function() { return handleError(function (arg0) {
|
|
704
|
+
const ret = JSON.stringify(arg0);
|
|
705
|
+
return ret;
|
|
706
|
+
}, arguments); },
|
|
680
707
|
__wbg_then_098abe61755d12f6: function(arg0, arg1) {
|
|
681
708
|
const ret = arg0.then(arg1);
|
|
682
709
|
return ret;
|
|
@@ -697,7 +724,7 @@ function __wbg_get_imports() {
|
|
|
697
724
|
console.warn(arg0, arg1, arg2, arg3);
|
|
698
725
|
},
|
|
699
726
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
700
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
727
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 430, function: Function { arguments: [Externref], shim_idx: 431, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
701
728
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h89cb80d21d3bc312, wasm_bindgen__convert__closures_____invoke__hb75d489a2bc688e8);
|
|
702
729
|
return ret;
|
|
703
730
|
},
|
package/diaryx_wasm_bg.wasm
CHANGED
|
Binary file
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -10,10 +10,12 @@ export const diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number
|
|
|
10
10
|
export const diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
11
11
|
export const diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
12
12
|
export const diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
13
|
+
export const diaryxbackend_getConfig: (a: number) => any;
|
|
13
14
|
export const diaryxbackend_hasNativeSync: (a: number) => number;
|
|
14
15
|
export const diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
15
16
|
export const diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
16
17
|
export const diaryxbackend_readBinary: (a: number, b: number, c: number) => any;
|
|
18
|
+
export const diaryxbackend_saveConfig: (a: number, b: any) => any;
|
|
17
19
|
export const diaryxbackend_setCrdtEnabled: (a: number, b: number) => void;
|
|
18
20
|
export const diaryxbackend_writeBinary: (a: number, b: number, c: number, d: any) => any;
|
|
19
21
|
export const jsasyncfilesystem_has_callback: (a: number, b: number, c: number) => number;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@diaryx/wasm-node",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "WebAssembly bindings for Diaryx core functionality",
|
|
5
|
-
"version": "1.4.0-dev.
|
|
5
|
+
"version": "1.4.0-dev.c0e8f64",
|
|
6
6
|
"license": "SEE LICENSE IN ../../LICENSE.md",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|