@alloy-framework/client-wasm 0.13.0 β 0.14.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 +1 -1
- package/alloy_client_wasm.d.ts +0 -174
- package/alloy_client_wasm.js +0 -1215
- package/alloy_client_wasm_bg.wasm +0 -0
- package/alloy_client_wasm_bg.wasm.d.ts +0 -40
package/package.json
CHANGED
package/alloy_client_wasm.d.ts
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
export class AlloyClient {
|
|
5
|
-
free(): void;
|
|
6
|
-
[Symbol.dispose](): void;
|
|
7
|
-
decrypt_custom(key: string, data: string): string;
|
|
8
|
-
/**
|
|
9
|
-
* Smart DELETE Request
|
|
10
|
-
*/
|
|
11
|
-
delete(path: string, encrypt_enabled?: boolean | null): Promise<any>;
|
|
12
|
-
encrypt_custom(key: string, data: string): string;
|
|
13
|
-
/**
|
|
14
|
-
* Smart GET Request (encrypt_query: defaults to true)
|
|
15
|
-
*/
|
|
16
|
-
get(path: string, encrypt_enabled?: boolean | null): Promise<any>;
|
|
17
|
-
constructor(master_secret: string);
|
|
18
|
-
/**
|
|
19
|
-
* Smart PATCH Request
|
|
20
|
-
*/
|
|
21
|
-
patch(path: string, json_body: any, encrypt_enabled?: boolean | null): Promise<any>;
|
|
22
|
-
/**
|
|
23
|
-
* Smart POST Request
|
|
24
|
-
*/
|
|
25
|
-
post(path: string, json_body: any, encrypt_enabled?: boolean | null): Promise<any>;
|
|
26
|
-
/**
|
|
27
|
-
* Smart PUT Request
|
|
28
|
-
*/
|
|
29
|
-
put(path: string, json_body: any, encrypt_enabled?: boolean | null): Promise<any>;
|
|
30
|
-
uuid(): string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* π‘ AlloySocket β WASM κΈ°λ° WebSocket ν΄λΌμ΄μΈνΈ
|
|
35
|
-
*
|
|
36
|
-
* μ΄λ²€νΈ κΈ°λ° λ©μμ§ ({ type, data }) ꡬ쑰λ₯Ό μ¬μ©νλ©°,
|
|
37
|
-
* λ©μμ§ μνΈν, μλ Ping, μ€λ§νΈ μ¬μ°κ²°μ μ§μν©λλ€.
|
|
38
|
-
*/
|
|
39
|
-
export class AlloySocket {
|
|
40
|
-
free(): void;
|
|
41
|
-
[Symbol.dispose](): void;
|
|
42
|
-
/**
|
|
43
|
-
* π μλ² μ°κ²°
|
|
44
|
-
*/
|
|
45
|
-
connect(): void;
|
|
46
|
-
/**
|
|
47
|
-
* π λͺ
μμ μ°κ²° μ’
λ£
|
|
48
|
-
*/
|
|
49
|
-
disconnect(): void;
|
|
50
|
-
/**
|
|
51
|
-
* π μ°κ²° μν νμΈ
|
|
52
|
-
*/
|
|
53
|
-
is_connected(): boolean;
|
|
54
|
-
/**
|
|
55
|
-
* π‘ AlloySocket μμ±μ
|
|
56
|
-
*
|
|
57
|
-
* @param url - WebSocket μλ² μ£Όμ (μ: "ws://localhost:3000/ws")
|
|
58
|
-
* @param master_secret - λ©μμ§ μνΈν ν€
|
|
59
|
-
* @param encrypt_enabled - μνΈν νμ±ν μ¬λΆ (κΈ°λ³Έ: false)
|
|
60
|
-
*/
|
|
61
|
-
constructor(url: string, master_secret: string, encrypt_enabled?: boolean | null);
|
|
62
|
-
/**
|
|
63
|
-
* π© μ΄λ²€νΈ νΈλ€λ¬ λ±λ‘
|
|
64
|
-
*
|
|
65
|
-
* @param event_type - μ΄λ²€νΈ νμ
(μ: "connect", "message", "disconnect", "chat")
|
|
66
|
-
* @param callback - JS μ½λ°± ν¨μ
|
|
67
|
-
*/
|
|
68
|
-
on(event_type: string, callback: Function): void;
|
|
69
|
-
/**
|
|
70
|
-
* π¨ μ΄λ²€νΈ κΈ°λ° λ©μμ§ μ μ‘
|
|
71
|
-
*
|
|
72
|
-
* @param event_type - μ΄λ²€νΈ νμ
(μ: "chat", "sync")
|
|
73
|
-
* @param data - μ μ‘ν λ°μ΄ν° (JS κ°μ²΄)
|
|
74
|
-
*/
|
|
75
|
-
send(event_type: string, data: any): void;
|
|
76
|
-
/**
|
|
77
|
-
* βοΈ μλ μ¬μ°κ²° νμ±ν/λΉνμ±ν
|
|
78
|
-
*/
|
|
79
|
-
set_auto_reconnect(enabled: boolean): void;
|
|
80
|
-
/**
|
|
81
|
-
* βοΈ μ΅λ μ¬μ°κ²° μλ νμ μ€μ
|
|
82
|
-
*/
|
|
83
|
-
set_max_reconnect_attempts(count: number): void;
|
|
84
|
-
/**
|
|
85
|
-
* βοΈ Ping μ£ΌκΈ° μ€μ (λ°λ¦¬μ΄)
|
|
86
|
-
*/
|
|
87
|
-
set_ping_interval(ms: number): void;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export class AlloyUtil {
|
|
91
|
-
private constructor();
|
|
92
|
-
free(): void;
|
|
93
|
-
[Symbol.dispose](): void;
|
|
94
|
-
/**
|
|
95
|
-
* Find items > threshold (Example of complex filter)
|
|
96
|
-
*/
|
|
97
|
-
static filter_gt(list: Int32Array, threshold: number): Int32Array;
|
|
98
|
-
static md5(input: string): string;
|
|
99
|
-
static sha256(input: string): string;
|
|
100
|
-
/**
|
|
101
|
-
* Shuffle a large array of integers (Fisher-Yates)
|
|
102
|
-
* Much faster than JS sort(() => 0.5 - Math.random())
|
|
103
|
-
*/
|
|
104
|
-
static shuffle_i32(list: Int32Array): Int32Array;
|
|
105
|
-
/**
|
|
106
|
-
* High performance sort
|
|
107
|
-
*/
|
|
108
|
-
static sort_i32(list: Int32Array): Int32Array;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
112
|
-
|
|
113
|
-
export interface InitOutput {
|
|
114
|
-
readonly memory: WebAssembly.Memory;
|
|
115
|
-
readonly __wbg_alloyclient_free: (a: number, b: number) => void;
|
|
116
|
-
readonly __wbg_alloysocket_free: (a: number, b: number) => void;
|
|
117
|
-
readonly __wbg_alloyutil_free: (a: number, b: number) => void;
|
|
118
|
-
readonly alloyclient_decrypt_custom: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
119
|
-
readonly alloyclient_delete: (a: number, b: number, c: number, d: number) => number;
|
|
120
|
-
readonly alloyclient_encrypt_custom: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
121
|
-
readonly alloyclient_get: (a: number, b: number, c: number, d: number) => number;
|
|
122
|
-
readonly alloyclient_new: (a: number, b: number, c: number) => void;
|
|
123
|
-
readonly alloyclient_patch: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
124
|
-
readonly alloyclient_post: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
125
|
-
readonly alloyclient_put: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
126
|
-
readonly alloyclient_uuid: (a: number, b: number) => void;
|
|
127
|
-
readonly alloysocket_connect: (a: number, b: number) => void;
|
|
128
|
-
readonly alloysocket_disconnect: (a: number) => void;
|
|
129
|
-
readonly alloysocket_is_connected: (a: number) => number;
|
|
130
|
-
readonly alloysocket_new: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
131
|
-
readonly alloysocket_on: (a: number, b: number, c: number, d: number) => void;
|
|
132
|
-
readonly alloysocket_send: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
133
|
-
readonly alloysocket_set_auto_reconnect: (a: number, b: number) => void;
|
|
134
|
-
readonly alloysocket_set_max_reconnect_attempts: (a: number, b: number) => void;
|
|
135
|
-
readonly alloysocket_set_ping_interval: (a: number, b: number) => void;
|
|
136
|
-
readonly alloyutil_filter_gt: (a: number, b: number, c: number, d: number) => void;
|
|
137
|
-
readonly alloyutil_md5: (a: number, b: number, c: number) => void;
|
|
138
|
-
readonly alloyutil_sha256: (a: number, b: number, c: number) => void;
|
|
139
|
-
readonly alloyutil_shuffle_i32: (a: number, b: number, c: number) => void;
|
|
140
|
-
readonly alloyutil_sort_i32: (a: number, b: number, c: number) => void;
|
|
141
|
-
readonly __wasm_bindgen_func_elem_87: (a: number, b: number) => void;
|
|
142
|
-
readonly __wasm_bindgen_func_elem_665: (a: number, b: number) => void;
|
|
143
|
-
readonly __wasm_bindgen_func_elem_713: (a: number, b: number, c: number, d: number) => void;
|
|
144
|
-
readonly __wasm_bindgen_func_elem_88: (a: number, b: number, c: number) => void;
|
|
145
|
-
readonly __wasm_bindgen_func_elem_666: (a: number, b: number, c: number) => void;
|
|
146
|
-
readonly __wasm_bindgen_func_elem_92: (a: number, b: number) => void;
|
|
147
|
-
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
148
|
-
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
149
|
-
readonly __wbindgen_export3: (a: number) => void;
|
|
150
|
-
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
151
|
-
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
158
|
-
* a precompiled `WebAssembly.Module`.
|
|
159
|
-
*
|
|
160
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
161
|
-
*
|
|
162
|
-
* @returns {InitOutput}
|
|
163
|
-
*/
|
|
164
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
168
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
169
|
-
*
|
|
170
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
171
|
-
*
|
|
172
|
-
* @returns {Promise<InitOutput>}
|
|
173
|
-
*/
|
|
174
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|