@typerighter/rpc-client 0.2.1 → 0.3.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/package.json
CHANGED
package/src/typedown_server.d.ts
CHANGED
|
@@ -94,6 +94,7 @@ export class RpcClient {
|
|
|
94
94
|
private constructor();
|
|
95
95
|
free(): void;
|
|
96
96
|
[Symbol.dispose](): void;
|
|
97
|
+
close(): void;
|
|
97
98
|
static connect(addr: string, port: number): Promise<RpcClient>;
|
|
98
99
|
getConfig(): Promise<TdSiteConfig>;
|
|
99
100
|
getSchema(schema: string): Promise<TdSchemaInfo>;
|
|
@@ -15,6 +15,9 @@ export class RpcClient {
|
|
|
15
15
|
const ptr = this.__destroy_into_raw();
|
|
16
16
|
wasm.__wbg_rpcclient_free(ptr, 0);
|
|
17
17
|
}
|
|
18
|
+
close() {
|
|
19
|
+
wasm.rpcclient_close(this.__wbg_ptr);
|
|
20
|
+
}
|
|
18
21
|
/**
|
|
19
22
|
* @param {string} addr
|
|
20
23
|
* @param {number} port
|
|
@@ -270,7 +273,7 @@ export function __wbg_new_typed_1824d93f294193e5(arg0, arg1) {
|
|
|
270
273
|
const a = state0.a;
|
|
271
274
|
state0.a = 0;
|
|
272
275
|
try {
|
|
273
|
-
return
|
|
276
|
+
return wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
274
277
|
} finally {
|
|
275
278
|
state0.a = a;
|
|
276
279
|
}
|
|
@@ -383,32 +386,32 @@ export function __wbg_wasClean_3c7aa2335da09e74(arg0) {
|
|
|
383
386
|
}
|
|
384
387
|
export function __wbindgen_cast_0000000000000001(arg0, arg1) {
|
|
385
388
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 255, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
386
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
389
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___wasm_bindgen_32f5b7fa4e0d533b___JsValue__core_b87ab95613d0b69a___result__Result_____wasm_bindgen_32f5b7fa4e0d533b___JsError___true_);
|
|
387
390
|
return ret;
|
|
388
391
|
}
|
|
389
392
|
export function __wbindgen_cast_0000000000000002(arg0, arg1) {
|
|
390
393
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 159, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
391
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
394
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true_);
|
|
392
395
|
return ret;
|
|
393
396
|
}
|
|
394
397
|
export function __wbindgen_cast_0000000000000003(arg0, arg1) {
|
|
395
398
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 159, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
396
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
399
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__2);
|
|
397
400
|
return ret;
|
|
398
401
|
}
|
|
399
402
|
export function __wbindgen_cast_0000000000000004(arg0, arg1) {
|
|
400
403
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 159, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
401
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
404
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__3);
|
|
402
405
|
return ret;
|
|
403
406
|
}
|
|
404
407
|
export function __wbindgen_cast_0000000000000005(arg0, arg1) {
|
|
405
408
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 163, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
406
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
409
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true_);
|
|
407
410
|
return ret;
|
|
408
411
|
}
|
|
409
412
|
export function __wbindgen_cast_0000000000000006(arg0, arg1) {
|
|
410
413
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 234, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
411
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
414
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true__1_);
|
|
412
415
|
return ret;
|
|
413
416
|
}
|
|
414
417
|
export function __wbindgen_cast_0000000000000007(arg0) {
|
|
@@ -454,35 +457,35 @@ export function __wbindgen_init_externref_table() {
|
|
|
454
457
|
table.set(offset + 2, true);
|
|
455
458
|
table.set(offset + 3, false);
|
|
456
459
|
}
|
|
457
|
-
function
|
|
458
|
-
wasm.
|
|
460
|
+
function wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true_(arg0, arg1) {
|
|
461
|
+
wasm.wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true_(arg0, arg1);
|
|
459
462
|
}
|
|
460
463
|
|
|
461
|
-
function
|
|
462
|
-
wasm.
|
|
464
|
+
function wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true__1_(arg0, arg1) {
|
|
465
|
+
wasm.wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true__1_(arg0, arg1);
|
|
463
466
|
}
|
|
464
467
|
|
|
465
|
-
function
|
|
466
|
-
wasm.
|
|
468
|
+
function wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
|
|
469
|
+
wasm.wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
|
|
467
470
|
}
|
|
468
471
|
|
|
469
|
-
function
|
|
470
|
-
wasm.
|
|
472
|
+
function wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__2(arg0, arg1, arg2) {
|
|
473
|
+
wasm.wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__2(arg0, arg1, arg2);
|
|
471
474
|
}
|
|
472
475
|
|
|
473
|
-
function
|
|
474
|
-
wasm.
|
|
476
|
+
function wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__3(arg0, arg1, arg2) {
|
|
477
|
+
wasm.wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__3(arg0, arg1, arg2);
|
|
475
478
|
}
|
|
476
479
|
|
|
477
|
-
function
|
|
478
|
-
const ret = wasm.
|
|
480
|
+
function wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___wasm_bindgen_32f5b7fa4e0d533b___JsValue__core_b87ab95613d0b69a___result__Result_____wasm_bindgen_32f5b7fa4e0d533b___JsError___true_(arg0, arg1, arg2) {
|
|
481
|
+
const ret = wasm.wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___wasm_bindgen_32f5b7fa4e0d533b___JsValue__core_b87ab95613d0b69a___result__Result_____wasm_bindgen_32f5b7fa4e0d533b___JsError___true_(arg0, arg1, arg2);
|
|
479
482
|
if (ret[1]) {
|
|
480
483
|
throw takeFromExternrefTable0(ret[0]);
|
|
481
484
|
}
|
|
482
485
|
}
|
|
483
486
|
|
|
484
|
-
function
|
|
485
|
-
wasm.
|
|
487
|
+
function wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
488
|
+
wasm.wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
486
489
|
}
|
|
487
490
|
|
|
488
491
|
|
|
Binary file
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_rpcclient_free: (a: number, b: number) => void;
|
|
5
|
+
export const rpcclient_close: (a: number) => void;
|
|
5
6
|
export const rpcclient_connect: (a: number, b: number, c: number) => any;
|
|
6
7
|
export const rpcclient_getConfig: (a: number) => any;
|
|
7
8
|
export const rpcclient_getSchema: (a: number, b: number, c: number) => any;
|
|
@@ -18,13 +19,13 @@ export const rpcclient_onSchemaCreated: (a: number, b: any) => void;
|
|
|
18
19
|
export const rpcclient_onSchemaDeleted: (a: number, b: any) => void;
|
|
19
20
|
export const rpcclient_requestFile: (a: number, b: number, c: number) => any;
|
|
20
21
|
export const rpcclient_requestFiles: (a: number, b: number, c: number) => any;
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
22
|
+
export const wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___wasm_bindgen_32f5b7fa4e0d533b___JsValue__core_b87ab95613d0b69a___result__Result_____wasm_bindgen_32f5b7fa4e0d533b___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
23
|
+
export const wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined___js_sys_2bfed54ed3690802___Function_fn_wasm_bindgen_32f5b7fa4e0d533b___JsValue_____wasm_bindgen_32f5b7fa4e0d533b___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
24
|
+
export const wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true_: (a: number, b: number, c: any) => void;
|
|
25
|
+
export const wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__2: (a: number, b: number, c: any) => void;
|
|
26
|
+
export const wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke___web_sys_58397777148ed4e8___features__gen_CloseEvent__CloseEvent______true__3: (a: number, b: number, c: any) => void;
|
|
27
|
+
export const wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true_: (a: number, b: number) => void;
|
|
28
|
+
export const wasm_bindgen_32f5b7fa4e0d533b___convert__closures_____invoke_______true__1_: (a: number, b: number) => void;
|
|
28
29
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
29
30
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
30
31
|
export const __wbindgen_exn_store: (a: number) => void;
|