@diaryx/wasm-node 1.4.1 → 1.4.3-dev.56325eb
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 +5 -5
- package/diaryx_wasm.d.ts +66 -11
- package/diaryx_wasm.js +288 -286
- package/diaryx_wasm_bg.wasm +0 -0
- package/diaryx_wasm_bg.wasm.d.ts +22 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,11 +100,11 @@ console.log(
|
|
|
100
100
|
`Fixed: ${fixSummary.total_fixed}, Failed: ${fixSummary.total_failed}`,
|
|
101
101
|
);
|
|
102
102
|
|
|
103
|
-
// Fix individual
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
validation.
|
|
107
|
-
validation.
|
|
103
|
+
// Fix an individual warning or error by handing the variant straight from
|
|
104
|
+
// a prior `validate_workspace` / `validate_file` result back to the generic
|
|
105
|
+
// fixer. New warning/error kinds Just Work without a frontend patch.
|
|
106
|
+
validation.fix_validation_warning(result.warnings[0]);
|
|
107
|
+
validation.fix_validation_error(result.errors[0]);
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
#### Validation Errors
|
package/diaryx_wasm.d.ts
CHANGED
|
@@ -93,6 +93,50 @@ export interface JsFileSystemCallbacks {
|
|
|
93
93
|
|
|
94
94
|
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Auth client exposed to JavaScript.
|
|
98
|
+
*
|
|
99
|
+
* Wraps [`AuthService`] with a [`WasmAuthenticatedClient`] backend. All
|
|
100
|
+
* methods return JSON strings on success and throw a JavaScript `Error`
|
|
101
|
+
* carrying `statusCode` and `devices` properties on failure.
|
|
102
|
+
*/
|
|
103
|
+
export class AuthClient {
|
|
104
|
+
free(): void;
|
|
105
|
+
[Symbol.dispose](): void;
|
|
106
|
+
createWorkspace(name: string): Promise<any>;
|
|
107
|
+
deleteAccount(): Promise<void>;
|
|
108
|
+
deleteDevice(device_id: string): Promise<void>;
|
|
109
|
+
deleteWorkspace(workspace_id: string): Promise<void>;
|
|
110
|
+
getDevices(): Promise<any>;
|
|
111
|
+
getMe(): Promise<any>;
|
|
112
|
+
/**
|
|
113
|
+
* Load non-secret session metadata as a JSON string (or `null`).
|
|
114
|
+
*/
|
|
115
|
+
getMetadata(): Promise<any>;
|
|
116
|
+
/**
|
|
117
|
+
* Whether a session is currently established (per the `hasSession` callback).
|
|
118
|
+
*/
|
|
119
|
+
isAuthenticated(): Promise<boolean>;
|
|
120
|
+
logout(): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Create a new auth client targeting the given server URL.
|
|
123
|
+
*
|
|
124
|
+
* `callbacks` is a JavaScript object implementing the `AuthCallbacks`
|
|
125
|
+
* interface (see module docs for the expected shape).
|
|
126
|
+
*/
|
|
127
|
+
constructor(server_url: string, callbacks: AuthCallbacks);
|
|
128
|
+
refreshToken(): Promise<any>;
|
|
129
|
+
renameDevice(device_id: string, new_name: string): Promise<void>;
|
|
130
|
+
renameWorkspace(workspace_id: string, new_name: string): Promise<void>;
|
|
131
|
+
requestMagicLink(email: string): Promise<any>;
|
|
132
|
+
verifyCode(code: string, email: string, device_name?: string | null, replace_device_id?: string | null): Promise<any>;
|
|
133
|
+
verifyMagicLink(token: string, device_name?: string | null, replace_device_id?: string | null): Promise<any>;
|
|
134
|
+
/**
|
|
135
|
+
* Server URL this client targets.
|
|
136
|
+
*/
|
|
137
|
+
readonly serverUrl: string;
|
|
138
|
+
}
|
|
139
|
+
|
|
96
140
|
/**
|
|
97
141
|
* Unified async backend with native storage.
|
|
98
142
|
*
|
|
@@ -164,12 +208,6 @@ export class DiaryxBackend {
|
|
|
164
208
|
* ```
|
|
165
209
|
*/
|
|
166
210
|
execute(command_json: string): Promise<string>;
|
|
167
|
-
/**
|
|
168
|
-
* Execute a command from a JavaScript object directly.
|
|
169
|
-
*
|
|
170
|
-
* This avoids JSON serialization overhead for better performance.
|
|
171
|
-
*/
|
|
172
|
-
executeJs(command: any): Promise<any>;
|
|
173
211
|
/**
|
|
174
212
|
* Check if this backend has native sync support.
|
|
175
213
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -286,15 +324,32 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
286
324
|
|
|
287
325
|
export interface InitOutput {
|
|
288
326
|
readonly memory: WebAssembly.Memory;
|
|
327
|
+
readonly __wbg_authclient_free: (a: number, b: number) => void;
|
|
289
328
|
readonly __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
290
329
|
readonly __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
330
|
+
readonly authclient_createWorkspace: (a: number, b: number, c: number) => any;
|
|
331
|
+
readonly authclient_deleteAccount: (a: number) => any;
|
|
332
|
+
readonly authclient_deleteDevice: (a: number, b: number, c: number) => any;
|
|
333
|
+
readonly authclient_deleteWorkspace: (a: number, b: number, c: number) => any;
|
|
334
|
+
readonly authclient_getDevices: (a: number) => any;
|
|
335
|
+
readonly authclient_getMe: (a: number) => any;
|
|
336
|
+
readonly authclient_getMetadata: (a: number) => any;
|
|
337
|
+
readonly authclient_isAuthenticated: (a: number) => any;
|
|
338
|
+
readonly authclient_logout: (a: number) => any;
|
|
339
|
+
readonly authclient_new: (a: number, b: number, c: any) => number;
|
|
340
|
+
readonly authclient_refreshToken: (a: number) => any;
|
|
341
|
+
readonly authclient_renameDevice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
342
|
+
readonly authclient_renameWorkspace: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
343
|
+
readonly authclient_requestMagicLink: (a: number, b: number, c: number) => any;
|
|
344
|
+
readonly authclient_serverUrl: (a: number) => [number, number];
|
|
345
|
+
readonly authclient_verifyCode: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
346
|
+
readonly authclient_verifyMagicLink: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
291
347
|
readonly diaryxbackend_create: (a: number, b: number) => any;
|
|
292
348
|
readonly diaryxbackend_createFromJsFileSystem: (a: any) => [number, number, number];
|
|
293
349
|
readonly diaryxbackend_createInMemory: () => [number, number, number];
|
|
294
350
|
readonly diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
295
351
|
readonly diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
296
352
|
readonly diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
297
|
-
readonly diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
298
353
|
readonly diaryxbackend_hasNativeSync: (a: number) => number;
|
|
299
354
|
readonly diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
300
355
|
readonly diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
@@ -307,16 +362,16 @@ export interface InitOutput {
|
|
|
307
362
|
readonly today_formatted: (a: number, b: number) => [number, number];
|
|
308
363
|
readonly init: () => void;
|
|
309
364
|
readonly diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
310
|
-
readonly
|
|
311
|
-
readonly
|
|
312
|
-
readonly wasm_bindgen__convert__closures_____invoke__h229fb34ceaba2930: (a: number, b: number, c: any, d: any) => void;
|
|
365
|
+
readonly wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3: (a: number, b: number, c: any) => [number, number];
|
|
366
|
+
readonly wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0: (a: number, b: number, c: any, d: any) => void;
|
|
313
367
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
314
368
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
315
369
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
316
370
|
readonly __externref_table_alloc: () => number;
|
|
317
371
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
318
|
-
readonly
|
|
372
|
+
readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
319
373
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
374
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
320
375
|
readonly __wbindgen_start: () => void;
|
|
321
376
|
}
|
|
322
377
|
|
package/diaryx_wasm.js
CHANGED
|
@@ -1,5 +1,210 @@
|
|
|
1
1
|
/* @ts-self-types="./diaryx_wasm.d.ts" */
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Auth client exposed to JavaScript.
|
|
5
|
+
*
|
|
6
|
+
* Wraps [`AuthService`] with a [`WasmAuthenticatedClient`] backend. All
|
|
7
|
+
* methods return JSON strings on success and throw a JavaScript `Error`
|
|
8
|
+
* carrying `statusCode` and `devices` properties on failure.
|
|
9
|
+
*/
|
|
10
|
+
export class AuthClient {
|
|
11
|
+
__destroy_into_raw() {
|
|
12
|
+
const ptr = this.__wbg_ptr;
|
|
13
|
+
this.__wbg_ptr = 0;
|
|
14
|
+
AuthClientFinalization.unregister(this);
|
|
15
|
+
return ptr;
|
|
16
|
+
}
|
|
17
|
+
free() {
|
|
18
|
+
const ptr = this.__destroy_into_raw();
|
|
19
|
+
wasm.__wbg_authclient_free(ptr, 0);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @param {string} name
|
|
23
|
+
* @returns {Promise<any>}
|
|
24
|
+
*/
|
|
25
|
+
createWorkspace(name) {
|
|
26
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
27
|
+
const len0 = WASM_VECTOR_LEN;
|
|
28
|
+
const ret = wasm.authclient_createWorkspace(this.__wbg_ptr, ptr0, len0);
|
|
29
|
+
return ret;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @returns {Promise<void>}
|
|
33
|
+
*/
|
|
34
|
+
deleteAccount() {
|
|
35
|
+
const ret = wasm.authclient_deleteAccount(this.__wbg_ptr);
|
|
36
|
+
return ret;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @param {string} device_id
|
|
40
|
+
* @returns {Promise<void>}
|
|
41
|
+
*/
|
|
42
|
+
deleteDevice(device_id) {
|
|
43
|
+
const ptr0 = passStringToWasm0(device_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
44
|
+
const len0 = WASM_VECTOR_LEN;
|
|
45
|
+
const ret = wasm.authclient_deleteDevice(this.__wbg_ptr, ptr0, len0);
|
|
46
|
+
return ret;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @param {string} workspace_id
|
|
50
|
+
* @returns {Promise<void>}
|
|
51
|
+
*/
|
|
52
|
+
deleteWorkspace(workspace_id) {
|
|
53
|
+
const ptr0 = passStringToWasm0(workspace_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
54
|
+
const len0 = WASM_VECTOR_LEN;
|
|
55
|
+
const ret = wasm.authclient_deleteWorkspace(this.__wbg_ptr, ptr0, len0);
|
|
56
|
+
return ret;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @returns {Promise<any>}
|
|
60
|
+
*/
|
|
61
|
+
getDevices() {
|
|
62
|
+
const ret = wasm.authclient_getDevices(this.__wbg_ptr);
|
|
63
|
+
return ret;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @returns {Promise<any>}
|
|
67
|
+
*/
|
|
68
|
+
getMe() {
|
|
69
|
+
const ret = wasm.authclient_getMe(this.__wbg_ptr);
|
|
70
|
+
return ret;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Load non-secret session metadata as a JSON string (or `null`).
|
|
74
|
+
* @returns {Promise<any>}
|
|
75
|
+
*/
|
|
76
|
+
getMetadata() {
|
|
77
|
+
const ret = wasm.authclient_getMetadata(this.__wbg_ptr);
|
|
78
|
+
return ret;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Whether a session is currently established (per the `hasSession` callback).
|
|
82
|
+
* @returns {Promise<boolean>}
|
|
83
|
+
*/
|
|
84
|
+
isAuthenticated() {
|
|
85
|
+
const ret = wasm.authclient_isAuthenticated(this.__wbg_ptr);
|
|
86
|
+
return ret;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @returns {Promise<void>}
|
|
90
|
+
*/
|
|
91
|
+
logout() {
|
|
92
|
+
const ret = wasm.authclient_logout(this.__wbg_ptr);
|
|
93
|
+
return ret;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Create a new auth client targeting the given server URL.
|
|
97
|
+
*
|
|
98
|
+
* `callbacks` is a JavaScript object implementing the `AuthCallbacks`
|
|
99
|
+
* interface (see module docs for the expected shape).
|
|
100
|
+
* @param {string} server_url
|
|
101
|
+
* @param {AuthCallbacks} callbacks
|
|
102
|
+
*/
|
|
103
|
+
constructor(server_url, callbacks) {
|
|
104
|
+
const ptr0 = passStringToWasm0(server_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
105
|
+
const len0 = WASM_VECTOR_LEN;
|
|
106
|
+
const ret = wasm.authclient_new(ptr0, len0, callbacks);
|
|
107
|
+
this.__wbg_ptr = ret >>> 0;
|
|
108
|
+
AuthClientFinalization.register(this, this.__wbg_ptr, this);
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* @returns {Promise<any>}
|
|
113
|
+
*/
|
|
114
|
+
refreshToken() {
|
|
115
|
+
const ret = wasm.authclient_refreshToken(this.__wbg_ptr);
|
|
116
|
+
return ret;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @param {string} device_id
|
|
120
|
+
* @param {string} new_name
|
|
121
|
+
* @returns {Promise<void>}
|
|
122
|
+
*/
|
|
123
|
+
renameDevice(device_id, new_name) {
|
|
124
|
+
const ptr0 = passStringToWasm0(device_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
125
|
+
const len0 = WASM_VECTOR_LEN;
|
|
126
|
+
const ptr1 = passStringToWasm0(new_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
127
|
+
const len1 = WASM_VECTOR_LEN;
|
|
128
|
+
const ret = wasm.authclient_renameDevice(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
129
|
+
return ret;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* @param {string} workspace_id
|
|
133
|
+
* @param {string} new_name
|
|
134
|
+
* @returns {Promise<void>}
|
|
135
|
+
*/
|
|
136
|
+
renameWorkspace(workspace_id, new_name) {
|
|
137
|
+
const ptr0 = passStringToWasm0(workspace_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
138
|
+
const len0 = WASM_VECTOR_LEN;
|
|
139
|
+
const ptr1 = passStringToWasm0(new_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
140
|
+
const len1 = WASM_VECTOR_LEN;
|
|
141
|
+
const ret = wasm.authclient_renameWorkspace(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
142
|
+
return ret;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @param {string} email
|
|
146
|
+
* @returns {Promise<any>}
|
|
147
|
+
*/
|
|
148
|
+
requestMagicLink(email) {
|
|
149
|
+
const ptr0 = passStringToWasm0(email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
150
|
+
const len0 = WASM_VECTOR_LEN;
|
|
151
|
+
const ret = wasm.authclient_requestMagicLink(this.__wbg_ptr, ptr0, len0);
|
|
152
|
+
return ret;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Server URL this client targets.
|
|
156
|
+
* @returns {string}
|
|
157
|
+
*/
|
|
158
|
+
get serverUrl() {
|
|
159
|
+
let deferred1_0;
|
|
160
|
+
let deferred1_1;
|
|
161
|
+
try {
|
|
162
|
+
const ret = wasm.authclient_serverUrl(this.__wbg_ptr);
|
|
163
|
+
deferred1_0 = ret[0];
|
|
164
|
+
deferred1_1 = ret[1];
|
|
165
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
166
|
+
} finally {
|
|
167
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* @param {string} code
|
|
172
|
+
* @param {string} email
|
|
173
|
+
* @param {string | null} [device_name]
|
|
174
|
+
* @param {string | null} [replace_device_id]
|
|
175
|
+
* @returns {Promise<any>}
|
|
176
|
+
*/
|
|
177
|
+
verifyCode(code, email, device_name, replace_device_id) {
|
|
178
|
+
const ptr0 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
179
|
+
const len0 = WASM_VECTOR_LEN;
|
|
180
|
+
const ptr1 = passStringToWasm0(email, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
181
|
+
const len1 = WASM_VECTOR_LEN;
|
|
182
|
+
var ptr2 = isLikeNone(device_name) ? 0 : passStringToWasm0(device_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
183
|
+
var len2 = WASM_VECTOR_LEN;
|
|
184
|
+
var ptr3 = isLikeNone(replace_device_id) ? 0 : passStringToWasm0(replace_device_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
185
|
+
var len3 = WASM_VECTOR_LEN;
|
|
186
|
+
const ret = wasm.authclient_verifyCode(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
187
|
+
return ret;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* @param {string} token
|
|
191
|
+
* @param {string | null} [device_name]
|
|
192
|
+
* @param {string | null} [replace_device_id]
|
|
193
|
+
* @returns {Promise<any>}
|
|
194
|
+
*/
|
|
195
|
+
verifyMagicLink(token, device_name, replace_device_id) {
|
|
196
|
+
const ptr0 = passStringToWasm0(token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
197
|
+
const len0 = WASM_VECTOR_LEN;
|
|
198
|
+
var ptr1 = isLikeNone(device_name) ? 0 : passStringToWasm0(device_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
199
|
+
var len1 = WASM_VECTOR_LEN;
|
|
200
|
+
var ptr2 = isLikeNone(replace_device_id) ? 0 : passStringToWasm0(replace_device_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
201
|
+
var len2 = WASM_VECTOR_LEN;
|
|
202
|
+
const ret = wasm.authclient_verifyMagicLink(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
203
|
+
return ret;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (Symbol.dispose) AuthClient.prototype[Symbol.dispose] = AuthClient.prototype.free;
|
|
207
|
+
|
|
3
208
|
/**
|
|
4
209
|
* Unified async backend with native storage.
|
|
5
210
|
*
|
|
@@ -126,17 +331,6 @@ export class DiaryxBackend {
|
|
|
126
331
|
const ret = wasm.diaryxbackend_execute(this.__wbg_ptr, ptr0, len0);
|
|
127
332
|
return ret;
|
|
128
333
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Execute a command from a JavaScript object directly.
|
|
131
|
-
*
|
|
132
|
-
* This avoids JSON serialization overhead for better performance.
|
|
133
|
-
* @param {any} command
|
|
134
|
-
* @returns {Promise<any>}
|
|
135
|
-
*/
|
|
136
|
-
executeJs(command) {
|
|
137
|
-
const ret = wasm.diaryxbackend_executeJs(this.__wbg_ptr, command);
|
|
138
|
-
return ret;
|
|
139
|
-
}
|
|
140
334
|
/**
|
|
141
335
|
* Check if this backend has native sync support.
|
|
142
336
|
* Always false — sync is handled by the Extism sync plugin loaded at runtime.
|
|
@@ -336,83 +530,33 @@ export function today_formatted(format) {
|
|
|
336
530
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
337
531
|
}
|
|
338
532
|
}
|
|
339
|
-
|
|
340
533
|
function __wbg_get_imports() {
|
|
341
534
|
const import0 = {
|
|
342
535
|
__proto__: null,
|
|
343
|
-
|
|
344
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
345
|
-
return ret;
|
|
346
|
-
},
|
|
347
|
-
__wbg_Number_a5a435bd7bbec835: function(arg0) {
|
|
348
|
-
const ret = Number(arg0);
|
|
349
|
-
return ret;
|
|
350
|
-
},
|
|
351
|
-
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
352
|
-
const ret = String(arg1);
|
|
353
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
354
|
-
const len1 = WASM_VECTOR_LEN;
|
|
355
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
356
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
357
|
-
},
|
|
358
|
-
__wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
|
|
359
|
-
const v = arg1;
|
|
360
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
361
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
362
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
363
|
-
},
|
|
364
|
-
__wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
|
|
536
|
+
__wbg___wbindgen_boolean_get_6ea149f0a8dcc5ff: function(arg0) {
|
|
365
537
|
const v = arg0;
|
|
366
538
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
367
539
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
368
540
|
},
|
|
369
|
-
|
|
370
|
-
const ret = debugString(arg1);
|
|
371
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
372
|
-
const len1 = WASM_VECTOR_LEN;
|
|
373
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
374
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
375
|
-
},
|
|
376
|
-
__wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
|
|
377
|
-
const ret = arg0 in arg1;
|
|
378
|
-
return ret;
|
|
379
|
-
},
|
|
380
|
-
__wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
|
|
381
|
-
const ret = typeof(arg0) === 'bigint';
|
|
382
|
-
return ret;
|
|
383
|
-
},
|
|
384
|
-
__wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
|
|
541
|
+
__wbg___wbindgen_is_function_3baa9db1a987f47d: function(arg0) {
|
|
385
542
|
const ret = typeof(arg0) === 'function';
|
|
386
543
|
return ret;
|
|
387
544
|
},
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
391
|
-
return ret;
|
|
392
|
-
},
|
|
393
|
-
__wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
|
|
394
|
-
const ret = typeof(arg0) === 'string';
|
|
545
|
+
__wbg___wbindgen_is_null_52ff4ec04186736f: function(arg0) {
|
|
546
|
+
const ret = arg0 === null;
|
|
395
547
|
return ret;
|
|
396
548
|
},
|
|
397
|
-
|
|
549
|
+
__wbg___wbindgen_is_undefined_29a43b4d42920abd: function(arg0) {
|
|
398
550
|
const ret = arg0 === undefined;
|
|
399
551
|
return ret;
|
|
400
552
|
},
|
|
401
|
-
|
|
402
|
-
const ret = arg0 === arg1;
|
|
403
|
-
return ret;
|
|
404
|
-
},
|
|
405
|
-
__wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
|
|
406
|
-
const ret = arg0 == arg1;
|
|
407
|
-
return ret;
|
|
408
|
-
},
|
|
409
|
-
__wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
|
|
553
|
+
__wbg___wbindgen_number_get_c7f42aed0525c451: function(arg0, arg1) {
|
|
410
554
|
const obj = arg1;
|
|
411
555
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
412
556
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
413
557
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
414
558
|
},
|
|
415
|
-
|
|
559
|
+
__wbg___wbindgen_string_get_7ed5322991caaec5: function(arg0, arg1) {
|
|
416
560
|
const obj = arg1;
|
|
417
561
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
418
562
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -420,106 +564,62 @@ function __wbg_get_imports() {
|
|
|
420
564
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
421
565
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
422
566
|
},
|
|
423
|
-
|
|
567
|
+
__wbg___wbindgen_throw_6b64449b9b9ed33c: function(arg0, arg1) {
|
|
424
568
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
425
569
|
},
|
|
426
|
-
|
|
570
|
+
__wbg__wbg_cb_unref_b46c9b5a9f08ec37: function(arg0) {
|
|
427
571
|
arg0._wbg_cb_unref();
|
|
428
572
|
},
|
|
429
|
-
|
|
573
|
+
__wbg_apply_4c35bd236dda9c14: function() { return handleError(function (arg0, arg1, arg2) {
|
|
430
574
|
const ret = arg0.apply(arg1, arg2);
|
|
431
575
|
return ret;
|
|
432
576
|
}, arguments); },
|
|
433
|
-
|
|
434
|
-
const ret = arg0.call(arg1
|
|
577
|
+
__wbg_call_14b169f759b26747: function() { return handleError(function (arg0, arg1) {
|
|
578
|
+
const ret = arg0.call(arg1);
|
|
435
579
|
return ret;
|
|
436
580
|
}, arguments); },
|
|
437
|
-
|
|
438
|
-
const ret = arg0.call(arg1, arg2, arg3);
|
|
581
|
+
__wbg_call_86e39d65afc3d9db: function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
582
|
+
const ret = arg0.call(arg1, arg2, arg3, arg4);
|
|
439
583
|
return ret;
|
|
440
584
|
}, arguments); },
|
|
441
|
-
|
|
442
|
-
const ret = arg0.call(arg1);
|
|
585
|
+
__wbg_call_a24592a6f349a97e: function() { return handleError(function (arg0, arg1, arg2) {
|
|
586
|
+
const ret = arg0.call(arg1, arg2);
|
|
443
587
|
return ret;
|
|
444
588
|
}, arguments); },
|
|
445
|
-
|
|
446
|
-
const ret = arg0.call(arg1, arg2, arg3
|
|
589
|
+
__wbg_call_bb28efe6b2f55b86: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
590
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
447
591
|
return ret;
|
|
448
592
|
}, arguments); },
|
|
449
|
-
|
|
593
|
+
__wbg_debug_4e190d233ee2e0d8: function(arg0, arg1, arg2, arg3) {
|
|
450
594
|
console.debug(arg0, arg1, arg2, arg3);
|
|
451
595
|
},
|
|
452
596
|
__wbg_diaryxbackend_new: function(arg0) {
|
|
453
597
|
const ret = DiaryxBackend.__wrap(arg0);
|
|
454
598
|
return ret;
|
|
455
599
|
},
|
|
456
|
-
|
|
457
|
-
const ret = arg0.done;
|
|
458
|
-
return ret;
|
|
459
|
-
},
|
|
460
|
-
__wbg_entries_e8a20ff8c9757101: function(arg0) {
|
|
461
|
-
const ret = Object.entries(arg0);
|
|
462
|
-
return ret;
|
|
463
|
-
},
|
|
464
|
-
__wbg_error_1eece6b0039034ce: function(arg0, arg1, arg2, arg3) {
|
|
600
|
+
__wbg_error_a6a4bb2525a88971: function(arg0, arg1, arg2, arg3) {
|
|
465
601
|
console.error(arg0, arg1, arg2, arg3);
|
|
466
602
|
},
|
|
467
|
-
|
|
468
|
-
const ret = String.fromCodePoint(arg0 >>> 0);
|
|
469
|
-
return ret;
|
|
470
|
-
}, arguments); },
|
|
471
|
-
__wbg_getTime_1dad7b5386ddd2d9: function(arg0) {
|
|
603
|
+
__wbg_getTime_da7c55f52b71e8c6: function(arg0) {
|
|
472
604
|
const ret = arg0.getTime();
|
|
473
605
|
return ret;
|
|
474
606
|
},
|
|
475
|
-
|
|
607
|
+
__wbg_getTimezoneOffset_31f57a5389d0d57c: function(arg0) {
|
|
476
608
|
const ret = arg0.getTimezoneOffset();
|
|
477
609
|
return ret;
|
|
478
610
|
},
|
|
479
|
-
|
|
611
|
+
__wbg_get_6011fa3a58f61074: function() { return handleError(function (arg0, arg1) {
|
|
480
612
|
const ret = Reflect.get(arg0, arg1);
|
|
481
613
|
return ret;
|
|
482
614
|
}, arguments); },
|
|
483
|
-
|
|
484
|
-
const ret = Reflect.get(arg0, arg1);
|
|
485
|
-
return ret;
|
|
486
|
-
}, arguments); },
|
|
487
|
-
__wbg_get_a8ee5c45dabc1b3b: function(arg0, arg1) {
|
|
615
|
+
__wbg_get_8360291721e2339f: function(arg0, arg1) {
|
|
488
616
|
const ret = arg0[arg1 >>> 0];
|
|
489
617
|
return ret;
|
|
490
618
|
},
|
|
491
|
-
|
|
492
|
-
const ret = arg0[arg1 >>> 0];
|
|
493
|
-
return ret;
|
|
494
|
-
},
|
|
495
|
-
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
496
|
-
const ret = arg0[arg1];
|
|
497
|
-
return ret;
|
|
498
|
-
},
|
|
499
|
-
__wbg_info_0194681687b5ab04: function(arg0, arg1, arg2, arg3) {
|
|
619
|
+
__wbg_info_e1c3400f7bf783dc: function(arg0, arg1, arg2, arg3) {
|
|
500
620
|
console.info(arg0, arg1, arg2, arg3);
|
|
501
621
|
},
|
|
502
|
-
|
|
503
|
-
let result;
|
|
504
|
-
try {
|
|
505
|
-
result = arg0 instanceof ArrayBuffer;
|
|
506
|
-
} catch (_) {
|
|
507
|
-
result = false;
|
|
508
|
-
}
|
|
509
|
-
const ret = result;
|
|
510
|
-
return ret;
|
|
511
|
-
},
|
|
512
|
-
__wbg_instanceof_Map_f194b366846aca0c: function(arg0) {
|
|
513
|
-
let result;
|
|
514
|
-
try {
|
|
515
|
-
result = arg0 instanceof Map;
|
|
516
|
-
} catch (_) {
|
|
517
|
-
result = false;
|
|
518
|
-
}
|
|
519
|
-
const ret = result;
|
|
520
|
-
return ret;
|
|
521
|
-
},
|
|
522
|
-
__wbg_instanceof_Object_be1962063fcc0c9f: function(arg0) {
|
|
622
|
+
__wbg_instanceof_Object_7c99480a1cdfb911: function(arg0) {
|
|
523
623
|
let result;
|
|
524
624
|
try {
|
|
525
625
|
result = arg0 instanceof Object;
|
|
@@ -529,7 +629,7 @@ function __wbg_get_imports() {
|
|
|
529
629
|
const ret = result;
|
|
530
630
|
return ret;
|
|
531
631
|
},
|
|
532
|
-
|
|
632
|
+
__wbg_instanceof_Promise_78658358a9b27cd4: function(arg0) {
|
|
533
633
|
let result;
|
|
534
634
|
try {
|
|
535
635
|
result = arg0 instanceof Promise;
|
|
@@ -539,7 +639,7 @@ function __wbg_get_imports() {
|
|
|
539
639
|
const ret = result;
|
|
540
640
|
return ret;
|
|
541
641
|
},
|
|
542
|
-
|
|
642
|
+
__wbg_instanceof_Uint8Array_152ba1f289edcf3f: function(arg0) {
|
|
543
643
|
let result;
|
|
544
644
|
try {
|
|
545
645
|
result = arg0 instanceof Uint8Array;
|
|
@@ -549,65 +649,53 @@ function __wbg_get_imports() {
|
|
|
549
649
|
const ret = result;
|
|
550
650
|
return ret;
|
|
551
651
|
},
|
|
552
|
-
|
|
652
|
+
__wbg_isArray_c3109d14ffc06469: function(arg0) {
|
|
553
653
|
const ret = Array.isArray(arg0);
|
|
554
654
|
return ret;
|
|
555
655
|
},
|
|
556
|
-
|
|
557
|
-
const ret = Number.isSafeInteger(arg0);
|
|
558
|
-
return ret;
|
|
559
|
-
},
|
|
560
|
-
__wbg_iterator_d8f549ec8fb061b1: function() {
|
|
561
|
-
const ret = Symbol.iterator;
|
|
562
|
-
return ret;
|
|
563
|
-
},
|
|
564
|
-
__wbg_length_b3416cf66a5452c8: function(arg0) {
|
|
656
|
+
__wbg_length_3d4ecd04bd8d22f1: function(arg0) {
|
|
565
657
|
const ret = arg0.length;
|
|
566
658
|
return ret;
|
|
567
659
|
},
|
|
568
|
-
|
|
660
|
+
__wbg_length_9f1775224cf1d815: function(arg0) {
|
|
569
661
|
const ret = arg0.length;
|
|
570
662
|
return ret;
|
|
571
663
|
},
|
|
572
|
-
|
|
664
|
+
__wbg_log_465fe3993e4051bf: function(arg0, arg1, arg2, arg3) {
|
|
573
665
|
console.log(arg0, arg1, arg2, arg3);
|
|
574
666
|
},
|
|
575
|
-
|
|
667
|
+
__wbg_new_0_4d657201ced14de3: function() {
|
|
576
668
|
const ret = new Date();
|
|
577
669
|
return ret;
|
|
578
670
|
},
|
|
579
|
-
|
|
580
|
-
const ret = new
|
|
671
|
+
__wbg_new_5e360d2ff7b9e1c3: function(arg0, arg1) {
|
|
672
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
581
673
|
return ret;
|
|
582
674
|
},
|
|
583
|
-
|
|
584
|
-
const ret = new Uint8Array(arg0);
|
|
585
|
-
return ret;
|
|
586
|
-
},
|
|
587
|
-
__wbg_new_a70fbab9066b301f: function() {
|
|
675
|
+
__wbg_new_682678e2f47e32bc: function() {
|
|
588
676
|
const ret = new Array();
|
|
589
677
|
return ret;
|
|
590
678
|
},
|
|
591
|
-
|
|
592
|
-
const ret = new
|
|
679
|
+
__wbg_new_7913666fe5070684: function(arg0) {
|
|
680
|
+
const ret = new Date(arg0);
|
|
593
681
|
return ret;
|
|
594
682
|
},
|
|
595
|
-
|
|
596
|
-
const ret = new
|
|
683
|
+
__wbg_new_aa8d0fa9762c29bd: function() {
|
|
684
|
+
const ret = new Object();
|
|
597
685
|
return ret;
|
|
598
686
|
},
|
|
599
|
-
|
|
687
|
+
__wbg_new_from_slice_b5ea43e23f6008c0: function(arg0, arg1) {
|
|
600
688
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
601
689
|
return ret;
|
|
602
690
|
},
|
|
603
|
-
|
|
691
|
+
__wbg_new_typed_323f37fd55ab048d: function(arg0, arg1) {
|
|
604
692
|
try {
|
|
605
693
|
var state0 = {a: arg0, b: arg1};
|
|
606
694
|
var cb0 = (arg0, arg1) => {
|
|
607
695
|
const a = state0.a;
|
|
608
696
|
state0.a = 0;
|
|
609
697
|
try {
|
|
610
|
-
return
|
|
698
|
+
return wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0(a, state0.b, arg0, arg1);
|
|
611
699
|
} finally {
|
|
612
700
|
state0.a = a;
|
|
613
701
|
}
|
|
@@ -615,90 +703,76 @@ function __wbg_get_imports() {
|
|
|
615
703
|
const ret = new Promise(cb0);
|
|
616
704
|
return ret;
|
|
617
705
|
} finally {
|
|
618
|
-
state0.a =
|
|
706
|
+
state0.a = 0;
|
|
619
707
|
}
|
|
620
708
|
},
|
|
621
|
-
|
|
709
|
+
__wbg_new_with_length_8c854e41ea4dae9b: function(arg0) {
|
|
622
710
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
623
711
|
return ret;
|
|
624
712
|
},
|
|
625
|
-
|
|
626
|
-
const ret =
|
|
713
|
+
__wbg_parse_1bbc9c053611d0a7: function() { return handleError(function (arg0, arg1) {
|
|
714
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
627
715
|
return ret;
|
|
628
716
|
}, arguments); },
|
|
629
|
-
|
|
630
|
-
const ret = arg0.next;
|
|
631
|
-
return ret;
|
|
632
|
-
},
|
|
633
|
-
__wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
|
|
717
|
+
__wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
|
|
634
718
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
635
719
|
},
|
|
636
|
-
|
|
720
|
+
__wbg_push_471a5b068a5295f6: function(arg0, arg1) {
|
|
637
721
|
const ret = arg0.push(arg1);
|
|
638
722
|
return ret;
|
|
639
723
|
},
|
|
640
|
-
|
|
724
|
+
__wbg_queueMicrotask_5d15a957e6aa920e: function(arg0) {
|
|
725
|
+
queueMicrotask(arg0);
|
|
726
|
+
},
|
|
727
|
+
__wbg_queueMicrotask_f8819e5ffc402f36: function(arg0) {
|
|
641
728
|
const ret = arg0.queueMicrotask;
|
|
642
729
|
return ret;
|
|
643
730
|
},
|
|
644
|
-
|
|
645
|
-
queueMicrotask(arg0);
|
|
646
|
-
},
|
|
647
|
-
__wbg_resolve_ae8d83246e5bcc12: function(arg0) {
|
|
731
|
+
__wbg_resolve_e6c466bc1052f16c: function(arg0) {
|
|
648
732
|
const ret = Promise.resolve(arg0);
|
|
649
733
|
return ret;
|
|
650
734
|
},
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
},
|
|
654
|
-
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
655
|
-
arg0[arg1] = arg2;
|
|
656
|
-
},
|
|
657
|
-
__wbg_set_8c0b3ffcf05d61c2: function(arg0, arg1, arg2) {
|
|
658
|
-
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
659
|
-
},
|
|
660
|
-
__wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
|
|
661
|
-
const ret = arg0.set(arg1, arg2);
|
|
735
|
+
__wbg_set_022bee52d0b05b19: function() { return handleError(function (arg0, arg1, arg2) {
|
|
736
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
662
737
|
return ret;
|
|
738
|
+
}, arguments); },
|
|
739
|
+
__wbg_set_3d484eb794afec82: function(arg0, arg1, arg2) {
|
|
740
|
+
arg0.set(getArrayU8FromWasm0(arg1, arg2));
|
|
663
741
|
},
|
|
664
|
-
|
|
742
|
+
__wbg_static_accessor_GLOBAL_8cfadc87a297ca02: function() {
|
|
665
743
|
const ret = typeof global === 'undefined' ? null : global;
|
|
666
744
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
667
745
|
},
|
|
668
|
-
|
|
746
|
+
__wbg_static_accessor_GLOBAL_THIS_602256ae5c8f42cf: function() {
|
|
669
747
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
670
748
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
671
749
|
},
|
|
672
|
-
|
|
750
|
+
__wbg_static_accessor_SELF_e445c1c7484aecc3: function() {
|
|
673
751
|
const ret = typeof self === 'undefined' ? null : self;
|
|
674
752
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
675
753
|
},
|
|
676
|
-
|
|
754
|
+
__wbg_static_accessor_WINDOW_f20e8576ef1e0f17: function() {
|
|
677
755
|
const ret = typeof window === 'undefined' ? null : window;
|
|
678
756
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
679
757
|
},
|
|
680
|
-
|
|
681
|
-
const ret = arg0.then(arg1);
|
|
682
|
-
return ret;
|
|
683
|
-
},
|
|
684
|
-
__wbg_then_9e335f6dd892bc11: function(arg0, arg1, arg2) {
|
|
758
|
+
__wbg_then_792e0c862b060889: function(arg0, arg1, arg2) {
|
|
685
759
|
const ret = arg0.then(arg1, arg2);
|
|
686
760
|
return ret;
|
|
687
761
|
},
|
|
688
|
-
|
|
689
|
-
const ret = arg0.
|
|
762
|
+
__wbg_then_8e16ee11f05e4827: function(arg0, arg1) {
|
|
763
|
+
const ret = arg0.then(arg1);
|
|
690
764
|
return ret;
|
|
691
765
|
},
|
|
692
|
-
|
|
693
|
-
const ret = arg0.
|
|
766
|
+
__wbg_toString_306ed0b9f320c1ca: function(arg0) {
|
|
767
|
+
const ret = arg0.toString();
|
|
694
768
|
return ret;
|
|
695
769
|
},
|
|
696
|
-
|
|
770
|
+
__wbg_warn_ad997e36628bd23a: function(arg0, arg1, arg2, arg3) {
|
|
697
771
|
console.warn(arg0, arg1, arg2, arg3);
|
|
698
772
|
},
|
|
699
773
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
700
|
-
// Cast intrinsic for `Closure(Closure {
|
|
701
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
774
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 597, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
775
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3);
|
|
702
776
|
return ret;
|
|
703
777
|
},
|
|
704
778
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
@@ -706,21 +780,11 @@ function __wbg_get_imports() {
|
|
|
706
780
|
const ret = arg0;
|
|
707
781
|
return ret;
|
|
708
782
|
},
|
|
709
|
-
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
710
|
-
// Cast intrinsic for `I64 -> Externref`.
|
|
711
|
-
const ret = arg0;
|
|
712
|
-
return ret;
|
|
713
|
-
},
|
|
714
|
-
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
783
|
+
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
715
784
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
716
785
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
717
786
|
return ret;
|
|
718
787
|
},
|
|
719
|
-
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
720
|
-
// Cast intrinsic for `U64 -> Externref`.
|
|
721
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
722
|
-
return ret;
|
|
723
|
-
},
|
|
724
788
|
__wbindgen_init_externref_table: function() {
|
|
725
789
|
const table = wasm.__wbindgen_externrefs;
|
|
726
790
|
const offset = table.grow(4);
|
|
@@ -737,17 +801,20 @@ function __wbg_get_imports() {
|
|
|
737
801
|
};
|
|
738
802
|
}
|
|
739
803
|
|
|
740
|
-
function
|
|
741
|
-
const ret = wasm.
|
|
804
|
+
function wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3(arg0, arg1, arg2) {
|
|
805
|
+
const ret = wasm.wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3(arg0, arg1, arg2);
|
|
742
806
|
if (ret[1]) {
|
|
743
807
|
throw takeFromExternrefTable0(ret[0]);
|
|
744
808
|
}
|
|
745
809
|
}
|
|
746
810
|
|
|
747
|
-
function
|
|
748
|
-
wasm.
|
|
811
|
+
function wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0(arg0, arg1, arg2, arg3) {
|
|
812
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0(arg0, arg1, arg2, arg3);
|
|
749
813
|
}
|
|
750
814
|
|
|
815
|
+
const AuthClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
816
|
+
? { register: () => {}, unregister: () => {} }
|
|
817
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_authclient_free(ptr >>> 0, 1));
|
|
751
818
|
const DiaryxBackendFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
752
819
|
? { register: () => {}, unregister: () => {} }
|
|
753
820
|
: new FinalizationRegistry(ptr => wasm.__wbg_diaryxbackend_free(ptr >>> 0, 1));
|
|
@@ -763,72 +830,7 @@ function addToExternrefTable0(obj) {
|
|
|
763
830
|
|
|
764
831
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
765
832
|
? { register: () => {}, unregister: () => {} }
|
|
766
|
-
: new FinalizationRegistry(state =>
|
|
767
|
-
|
|
768
|
-
function debugString(val) {
|
|
769
|
-
// primitive types
|
|
770
|
-
const type = typeof val;
|
|
771
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
772
|
-
return `${val}`;
|
|
773
|
-
}
|
|
774
|
-
if (type == 'string') {
|
|
775
|
-
return `"${val}"`;
|
|
776
|
-
}
|
|
777
|
-
if (type == 'symbol') {
|
|
778
|
-
const description = val.description;
|
|
779
|
-
if (description == null) {
|
|
780
|
-
return 'Symbol';
|
|
781
|
-
} else {
|
|
782
|
-
return `Symbol(${description})`;
|
|
783
|
-
}
|
|
784
|
-
}
|
|
785
|
-
if (type == 'function') {
|
|
786
|
-
const name = val.name;
|
|
787
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
788
|
-
return `Function(${name})`;
|
|
789
|
-
} else {
|
|
790
|
-
return 'Function';
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
// objects
|
|
794
|
-
if (Array.isArray(val)) {
|
|
795
|
-
const length = val.length;
|
|
796
|
-
let debug = '[';
|
|
797
|
-
if (length > 0) {
|
|
798
|
-
debug += debugString(val[0]);
|
|
799
|
-
}
|
|
800
|
-
for(let i = 1; i < length; i++) {
|
|
801
|
-
debug += ', ' + debugString(val[i]);
|
|
802
|
-
}
|
|
803
|
-
debug += ']';
|
|
804
|
-
return debug;
|
|
805
|
-
}
|
|
806
|
-
// Test for built-in
|
|
807
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
808
|
-
let className;
|
|
809
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
810
|
-
className = builtInMatches[1];
|
|
811
|
-
} else {
|
|
812
|
-
// Failed to match the standard '[object ClassName]'
|
|
813
|
-
return toString.call(val);
|
|
814
|
-
}
|
|
815
|
-
if (className == 'Object') {
|
|
816
|
-
// we're a user defined class or Object
|
|
817
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
818
|
-
// easier than looping through ownProperties of `val`.
|
|
819
|
-
try {
|
|
820
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
821
|
-
} catch (_) {
|
|
822
|
-
return 'Object';
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
// errors
|
|
826
|
-
if (val instanceof Error) {
|
|
827
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
828
|
-
}
|
|
829
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
830
|
-
return className;
|
|
831
|
-
}
|
|
833
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
832
834
|
|
|
833
835
|
function getArrayU8FromWasm0(ptr, len) {
|
|
834
836
|
ptr = ptr >>> 0;
|
|
@@ -869,8 +871,8 @@ function isLikeNone(x) {
|
|
|
869
871
|
return x === undefined || x === null;
|
|
870
872
|
}
|
|
871
873
|
|
|
872
|
-
function makeMutClosure(arg0, arg1,
|
|
873
|
-
const state = { a: arg0, b: arg1, cnt: 1
|
|
874
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
875
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
874
876
|
const real = (...args) => {
|
|
875
877
|
|
|
876
878
|
// First up with a closure we increment the internal reference
|
|
@@ -888,7 +890,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
888
890
|
};
|
|
889
891
|
real._wbg_cb_unref = () => {
|
|
890
892
|
if (--state.cnt === 0) {
|
|
891
|
-
|
|
893
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
892
894
|
state.a = 0;
|
|
893
895
|
CLOSURE_DTORS.unregister(state);
|
|
894
896
|
}
|
package/diaryx_wasm_bg.wasm
CHANGED
|
Binary file
|
package/diaryx_wasm_bg.wasm.d.ts
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_authclient_free: (a: number, b: number) => void;
|
|
4
5
|
export const __wbg_diaryxbackend_free: (a: number, b: number) => void;
|
|
5
6
|
export const __wbg_jsasyncfilesystem_free: (a: number, b: number) => void;
|
|
7
|
+
export const authclient_createWorkspace: (a: number, b: number, c: number) => any;
|
|
8
|
+
export const authclient_deleteAccount: (a: number) => any;
|
|
9
|
+
export const authclient_deleteDevice: (a: number, b: number, c: number) => any;
|
|
10
|
+
export const authclient_deleteWorkspace: (a: number, b: number, c: number) => any;
|
|
11
|
+
export const authclient_getDevices: (a: number) => any;
|
|
12
|
+
export const authclient_getMe: (a: number) => any;
|
|
13
|
+
export const authclient_getMetadata: (a: number) => any;
|
|
14
|
+
export const authclient_isAuthenticated: (a: number) => any;
|
|
15
|
+
export const authclient_logout: (a: number) => any;
|
|
16
|
+
export const authclient_new: (a: number, b: number, c: any) => number;
|
|
17
|
+
export const authclient_refreshToken: (a: number) => any;
|
|
18
|
+
export const authclient_renameDevice: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
19
|
+
export const authclient_renameWorkspace: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
20
|
+
export const authclient_requestMagicLink: (a: number, b: number, c: number) => any;
|
|
21
|
+
export const authclient_serverUrl: (a: number) => [number, number];
|
|
22
|
+
export const authclient_verifyCode: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
23
|
+
export const authclient_verifyMagicLink: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
6
24
|
export const diaryxbackend_create: (a: number, b: number) => any;
|
|
7
25
|
export const diaryxbackend_createFromJsFileSystem: (a: any) => [number, number, number];
|
|
8
26
|
export const diaryxbackend_createInMemory: () => [number, number, number];
|
|
9
27
|
export const diaryxbackend_emitFileSystemEvent: (a: number, b: number, c: number) => [number, number];
|
|
10
28
|
export const diaryxbackend_eventSubscriberCount: (a: number) => number;
|
|
11
29
|
export const diaryxbackend_execute: (a: number, b: number, c: number) => any;
|
|
12
|
-
export const diaryxbackend_executeJs: (a: number, b: any) => any;
|
|
13
30
|
export const diaryxbackend_hasNativeSync: (a: number) => number;
|
|
14
31
|
export const diaryxbackend_offFileSystemEvent: (a: number, b: bigint) => number;
|
|
15
32
|
export const diaryxbackend_onFileSystemEvent: (a: number, b: any) => bigint;
|
|
@@ -22,14 +39,14 @@ export const now_timestamp: () => [number, number];
|
|
|
22
39
|
export const today_formatted: (a: number, b: number) => [number, number];
|
|
23
40
|
export const init: () => void;
|
|
24
41
|
export const diaryxbackend_isCrdtEnabled: (a: number) => number;
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const wasm_bindgen__convert__closures_____invoke__h229fb34ceaba2930: (a: number, b: number, c: any, d: any) => void;
|
|
42
|
+
export const wasm_bindgen__convert__closures_____invoke__h3f4718a94aec51d3: (a: number, b: number, c: any) => [number, number];
|
|
43
|
+
export const wasm_bindgen__convert__closures_____invoke__h33e54e31fc8397d0: (a: number, b: number, c: any, d: any) => void;
|
|
28
44
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
29
45
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
30
46
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
31
47
|
export const __externref_table_alloc: () => number;
|
|
32
48
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
33
|
-
export const
|
|
49
|
+
export const __wbindgen_destroy_closure: (a: number, b: number) => void;
|
|
34
50
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
51
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
35
52
|
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED