@unyt/datex 0.0.5 → 0.0.6
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/esm/datex-core/datex_core_js.internal.d.ts +45 -36
- package/esm/datex-core/datex_core_js.internal.d.ts.map +1 -1
- package/esm/datex-core/datex_core_js.internal.js +143 -117
- package/esm/datex-core/datex_core_js.wasm +0 -0
- package/esm/deno.json +1 -1
- package/esm/runtime/runtime.js +1 -1
- package/package.json +1 -1
|
@@ -135,7 +135,7 @@ export function __wbg_writable_169515f8aae06da5(arg0: any): any;
|
|
|
135
135
|
export function __wbg_write_311434e30ee214e5(arg0: any, arg1: any): any;
|
|
136
136
|
export function __wbindgen_boolean_get(arg0: any): 1 | 0 | 2;
|
|
137
137
|
export function __wbindgen_cb_drop(arg0: any): boolean;
|
|
138
|
-
export function
|
|
138
|
+
export function __wbindgen_closure_wrapper3688(arg0: any, arg1: any, arg2: any): {
|
|
139
139
|
(...args: any[]): any;
|
|
140
140
|
original: {
|
|
141
141
|
a: any;
|
|
@@ -144,7 +144,7 @@ export function __wbindgen_closure_wrapper3633(arg0: any, arg1: any, arg2: any):
|
|
|
144
144
|
dtor: any;
|
|
145
145
|
};
|
|
146
146
|
};
|
|
147
|
-
export function
|
|
147
|
+
export function __wbindgen_closure_wrapper3721(arg0: any, arg1: any, arg2: any): {
|
|
148
148
|
(...args: any[]): any;
|
|
149
149
|
original: {
|
|
150
150
|
a: any;
|
|
@@ -153,7 +153,7 @@ export function __wbindgen_closure_wrapper3666(arg0: any, arg1: any, arg2: any):
|
|
|
153
153
|
dtor: any;
|
|
154
154
|
};
|
|
155
155
|
};
|
|
156
|
-
export function
|
|
156
|
+
export function __wbindgen_closure_wrapper410(arg0: any, arg1: any, arg2: any): {
|
|
157
157
|
(...args: any[]): any;
|
|
158
158
|
original: {
|
|
159
159
|
a: any;
|
|
@@ -162,7 +162,7 @@ export function __wbindgen_closure_wrapper745(arg0: any, arg1: any, arg2: any):
|
|
|
162
162
|
dtor: any;
|
|
163
163
|
};
|
|
164
164
|
};
|
|
165
|
-
export function
|
|
165
|
+
export function __wbindgen_closure_wrapper411(arg0: any, arg1: any, arg2: any): {
|
|
166
166
|
(...args: any[]): any;
|
|
167
167
|
original: {
|
|
168
168
|
a: any;
|
|
@@ -171,7 +171,7 @@ export function __wbindgen_closure_wrapper746(arg0: any, arg1: any, arg2: any):
|
|
|
171
171
|
dtor: any;
|
|
172
172
|
};
|
|
173
173
|
};
|
|
174
|
-
export function
|
|
174
|
+
export function __wbindgen_closure_wrapper412(arg0: any, arg1: any, arg2: any): {
|
|
175
175
|
(...args: any[]): any;
|
|
176
176
|
original: {
|
|
177
177
|
a: any;
|
|
@@ -180,7 +180,7 @@ export function __wbindgen_closure_wrapper747(arg0: any, arg1: any, arg2: any):
|
|
|
180
180
|
dtor: any;
|
|
181
181
|
};
|
|
182
182
|
};
|
|
183
|
-
export function
|
|
183
|
+
export function __wbindgen_closure_wrapper413(arg0: any, arg1: any, arg2: any): {
|
|
184
184
|
(...args: any[]): any;
|
|
185
185
|
original: {
|
|
186
186
|
a: any;
|
|
@@ -214,37 +214,12 @@ export class JSComHub {
|
|
|
214
214
|
__destroy_into_raw(): number | undefined;
|
|
215
215
|
__wbg_ptr: number | undefined;
|
|
216
216
|
free(): void;
|
|
217
|
-
register_default_interface_factories(): void;
|
|
218
|
-
/**
|
|
219
|
-
* @param {string} interface_type
|
|
220
|
-
* @param {string} properties
|
|
221
|
-
* @returns {Promise<any>}
|
|
222
|
-
*/
|
|
223
|
-
create_interface(interface_type: string, properties: string): Promise<any>;
|
|
224
217
|
/**
|
|
225
218
|
* @param {string} interface_uuid
|
|
226
|
-
* @
|
|
227
|
-
|
|
228
|
-
close_interface(interface_uuid: string): Promise<any>;
|
|
229
|
-
/**
|
|
230
|
-
* @returns {Promise<void>}
|
|
231
|
-
*/
|
|
232
|
-
update(): Promise<void>;
|
|
233
|
-
/**
|
|
234
|
-
* Send a block to the given interface and socket
|
|
235
|
-
* This does not involve the routing on the ComHub level.
|
|
236
|
-
* The socket UUID is used to identify the socket to send the block over
|
|
237
|
-
* The interface UUID is used to identify the interface to send the block over
|
|
238
|
-
* @param {Uint8Array} block
|
|
239
|
-
* @param {string} interface_uuid
|
|
240
|
-
* @param {string} socket_uuid
|
|
241
|
-
* @returns {Promise<boolean>}
|
|
242
|
-
*/
|
|
243
|
-
send_block(block: Uint8Array, interface_uuid: string, socket_uuid: string): Promise<boolean>;
|
|
244
|
-
/**
|
|
245
|
-
* @returns {Uint8Array[]}
|
|
219
|
+
* @param {WebSocket} websocket
|
|
220
|
+
* @returns {string}
|
|
246
221
|
*/
|
|
247
|
-
|
|
222
|
+
websocket_server_interface_add_socket(interface_uuid: string, websocket: WebSocket): string;
|
|
248
223
|
/**
|
|
249
224
|
* @param {string} uuid
|
|
250
225
|
* @param {string} direction
|
|
@@ -274,12 +249,46 @@ export class JSComHub {
|
|
|
274
249
|
* @returns {Promise<boolean>}
|
|
275
250
|
*/
|
|
276
251
|
base_interface_test_send_block(uuid: string, socket_uuid: string, data: Uint8Array): Promise<boolean>;
|
|
252
|
+
register_default_interface_factories(): void;
|
|
253
|
+
/**
|
|
254
|
+
* @param {string} interface_type
|
|
255
|
+
* @param {string} properties
|
|
256
|
+
* @returns {Promise<any>}
|
|
257
|
+
*/
|
|
258
|
+
create_interface(interface_type: string, properties: string): Promise<any>;
|
|
277
259
|
/**
|
|
278
260
|
* @param {string} interface_uuid
|
|
279
|
-
* @
|
|
261
|
+
* @returns {Promise<any>}
|
|
262
|
+
*/
|
|
263
|
+
close_interface(interface_uuid: string): Promise<any>;
|
|
264
|
+
/**
|
|
265
|
+
* @returns {Promise<void>}
|
|
266
|
+
*/
|
|
267
|
+
update(): Promise<void>;
|
|
268
|
+
/**
|
|
269
|
+
* Send a block to the given interface and socket
|
|
270
|
+
* This does not involve the routing on the ComHub level.
|
|
271
|
+
* The socket UUID is used to identify the socket to send the block over
|
|
272
|
+
* The interface UUID is used to identify the interface to send the block over
|
|
273
|
+
* @param {Uint8Array} block
|
|
274
|
+
* @param {string} interface_uuid
|
|
275
|
+
* @param {string} socket_uuid
|
|
276
|
+
* @returns {Promise<boolean>}
|
|
277
|
+
*/
|
|
278
|
+
send_block(block: Uint8Array, interface_uuid: string, socket_uuid: string): Promise<boolean>;
|
|
279
|
+
/**
|
|
280
|
+
* @returns {Uint8Array[]}
|
|
281
|
+
*/
|
|
282
|
+
_drain_incoming_blocks(): Uint8Array[];
|
|
283
|
+
/**
|
|
280
284
|
* @returns {string}
|
|
281
285
|
*/
|
|
282
|
-
|
|
286
|
+
get_metadata_string(): string;
|
|
287
|
+
/**
|
|
288
|
+
* @param {string} endpoint
|
|
289
|
+
* @returns {Promise<string | undefined>}
|
|
290
|
+
*/
|
|
291
|
+
get_trace_string(endpoint: string): Promise<string | undefined>;
|
|
283
292
|
}
|
|
284
293
|
export class JSMemory {
|
|
285
294
|
static __wrap(ptr: any): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datex_core_js.internal.d.ts","sourceRoot":"","sources":["../../src/datex-core/datex_core_js.internal.js"],"names":[],"mappings":"AAQA,+CAEC;
|
|
1
|
+
{"version":3,"file":"datex_core_js.internal.d.ts","sourceRoot":"","sources":["../../src/datex-core/datex_core_js.internal.js"],"names":[],"mappings":"AAQA,+CAEC;AA6OD;;;;GAIG;AACH,uCAJW,MAAM,eACN,GAAG,GACD,SAAS,CAWrB;AAED;;GAEG;AACH,sCAFW,MAAM,QAUhB;AAED;;;;;GAKG;AACH,sCAJW,MAAM,aACN,OAAO,GACL,MAAM,CAmBlB;AAED;;;;;GAKG;AACH,+CAHW,MAAM,GACJ,OAAO,CAWnB;AAi4BD,kFAGC;AAED,8DAGC;AAED,iEAKC;AAED,iEAKC;AAED,iEAKC;AAED,iEAGC;AAED,6EAUC;AAED,+DAGC;AAED,qEAGC;AAED,6DAGC;AAED,kEAIC;AAED,8DAEC;AAED,oEAGC;AAED,+FAGC;AAED,mEAGC;AAED,mEAKC;AAED,4DAGC;AAED,8DAEC;AAED,oEASC;AAED,oEASC;AAED,8DAEC;AAED,yEAUC;AAED,sEAKC;AAED,wEAKC;AAED,4EAKC;AAED,iEAGC;AAED,sEAKC;AAED,gEAKC;AAED,qEAGC;AAED,oEAGC;AAED,gFAGC;AAED,6EAGC;AAED,sEAWC;AAED,6DAEC;AAED,kFASC;AAED,gFASC;AAED,6EASC;AAED,kGAWC;AAED,iFASC;AAED,6EASC;AAED,yEAUC;AAED,8DAGC;AAED,4DAEC;AAED,2EAUC;AAED,iEAGC;AAED,+EAiBC;AAED,qDAGC;AAED,oDAGC;AAED,oDAGC;AAED,gEAKC;AAED,kEAGC;AAED,iFAGC;AAED,+GAOC;AAED,iFAKC;AAED,4EAGC;AAED,qDAGC;AAED,uEAGC;AAED,uEAGC;AAED,uEAEC;AAED,sEAGC;AAED,8EAUC;AAED,4DAGC;AAED,gEAGC;AAED,oEAEC;AAED,mEAGC;AAED,wEAGC;AAED,qEAGC;AAED,0EAYC;AAED,iEAIC;AAED,iEAIC;AAED,8DAGC;AAED,sFAGC;AAED,uFAGC;AAED,uEAKC;AAED,kFAEC;AAED,gEAKC;AAED,+EAEC;AAED,iFAEC;AAED,2FAEC;AAED,4FAEC;AAED,iFAEC;AAED,8EAEC;AAED,oFAEC;AAED,8EAEC;AAED,qFAEC;AAED,iGAKC;AAED,gFAEC;AAED,gFAEC;AAED,6EAEC;AAED,6EAEC;AAED,qFAEC;AAED,wFAEC;AAED,oFAEC;AAED,2EAEC;AAED,2EAEC;AAED,0FAEC;AAED,iEAKC;AAED,yEAGC;AAED,yEAUC;AAED,qEAGC;AAED,0EAGC;AAED,mEAGC;AAED,qEAGC;AAED,8DAGC;AAED,uEAGC;AAED,kFAGC;AAED,mEAUC;AAED,6DAEC;AAED,gEAGC;AAED,wEAGC;AAED,6DAIC;AAED,uDAQC;AAED;;;;;;;;EAGC;AAED;;;;;;;;EAGC;AAED;;;;;;;;EAGC;AAED;;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CAmBzB;IACD;;;OAGG;IACH,qCAHW,MAAM,oCAmBhB;IACD;;;;OAIG;IACH,kCAJW,MAAM,aACN,UAAU,GACR,OAAO,CAAC,IAAI,CAAC,CAmBzB;IACD;;;OAGG;IACH,oCAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAezB;CACJ;AASD;IACI,yCAKC;IAHG,8BAAkB;IAKtB,aAGC;IACD;;;OAGG;IACH,sBAHW,MAAM,GACJ,OAAO,CAAC,GAAG,CAAC,CAexB;CACJ"}
|
|
@@ -216,30 +216,6 @@ function takeFromExternrefTable0(idx) {
|
|
|
216
216
|
wasm.__externref_table_dealloc(idx);
|
|
217
217
|
return value;
|
|
218
218
|
}
|
|
219
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
220
|
-
ptr = ptr >>> 0;
|
|
221
|
-
const mem = getDataViewMemory0();
|
|
222
|
-
const result = [];
|
|
223
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
224
|
-
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
225
|
-
}
|
|
226
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
227
|
-
return result;
|
|
228
|
-
}
|
|
229
|
-
function _assertClass(instance, klass) {
|
|
230
|
-
if (!(instance instanceof klass)) {
|
|
231
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
235
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
236
|
-
for (let i = 0; i < array.length; i++) {
|
|
237
|
-
const add = addToExternrefTable0(array[i]);
|
|
238
|
-
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
239
|
-
}
|
|
240
|
-
WASM_VECTOR_LEN = array.length;
|
|
241
|
-
return ptr;
|
|
242
|
-
}
|
|
243
219
|
/**
|
|
244
220
|
* @param {string} config
|
|
245
221
|
* @param {any} debug_flags
|
|
@@ -292,17 +268,41 @@ export function execute_internal(datex_script) {
|
|
|
292
268
|
const ret = wasm.execute_internal(ptr0, len0);
|
|
293
269
|
return ret !== 0;
|
|
294
270
|
}
|
|
271
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
272
|
+
ptr = ptr >>> 0;
|
|
273
|
+
const mem = getDataViewMemory0();
|
|
274
|
+
const result = [];
|
|
275
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
276
|
+
result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true)));
|
|
277
|
+
}
|
|
278
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
279
|
+
return result;
|
|
280
|
+
}
|
|
281
|
+
function _assertClass(instance, klass) {
|
|
282
|
+
if (!(instance instanceof klass)) {
|
|
283
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
287
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
288
|
+
for (let i = 0; i < array.length; i++) {
|
|
289
|
+
const add = addToExternrefTable0(array[i]);
|
|
290
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
291
|
+
}
|
|
292
|
+
WASM_VECTOR_LEN = array.length;
|
|
293
|
+
return ptr;
|
|
294
|
+
}
|
|
295
295
|
function __wbg_adapter_40(arg0, arg1, arg2) {
|
|
296
|
-
wasm.
|
|
296
|
+
wasm.closure237_externref_shim(arg0, arg1, arg2);
|
|
297
297
|
}
|
|
298
298
|
function __wbg_adapter_49(arg0, arg1, arg2) {
|
|
299
|
-
wasm.
|
|
299
|
+
wasm.closure1038_externref_shim(arg0, arg1, arg2);
|
|
300
300
|
}
|
|
301
301
|
function __wbg_adapter_52(arg0, arg1) {
|
|
302
302
|
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hc8a7d0aeea5060d1(arg0, arg1);
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
wasm.
|
|
304
|
+
function __wbg_adapter_280(arg0, arg1, arg2, arg3) {
|
|
305
|
+
wasm.closure1984_externref_shim(arg0, arg1, arg2, arg3);
|
|
306
306
|
}
|
|
307
307
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
308
308
|
const __wbindgen_enum_RtcIceConnectionState = [
|
|
@@ -359,67 +359,32 @@ export class JSComHub {
|
|
|
359
359
|
const ptr = this.__destroy_into_raw();
|
|
360
360
|
wasm.__wbg_jscomhub_free(ptr, 0);
|
|
361
361
|
}
|
|
362
|
-
register_default_interface_factories() {
|
|
363
|
-
wasm.jscomhub_register_default_interface_factories(this.__wbg_ptr);
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* @param {string} interface_type
|
|
367
|
-
* @param {string} properties
|
|
368
|
-
* @returns {Promise<any>}
|
|
369
|
-
*/
|
|
370
|
-
create_interface(interface_type, properties) {
|
|
371
|
-
const ptr0 = passStringToWasm0(interface_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
372
|
-
const len0 = WASM_VECTOR_LEN;
|
|
373
|
-
const ptr1 = passStringToWasm0(properties, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
374
|
-
const len1 = WASM_VECTOR_LEN;
|
|
375
|
-
const ret = wasm.jscomhub_create_interface(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
376
|
-
return ret;
|
|
377
|
-
}
|
|
378
362
|
/**
|
|
379
363
|
* @param {string} interface_uuid
|
|
380
|
-
* @
|
|
381
|
-
|
|
382
|
-
close_interface(interface_uuid) {
|
|
383
|
-
const ptr0 = passStringToWasm0(interface_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
384
|
-
const len0 = WASM_VECTOR_LEN;
|
|
385
|
-
const ret = wasm.jscomhub_close_interface(this.__wbg_ptr, ptr0, len0);
|
|
386
|
-
return ret;
|
|
387
|
-
}
|
|
388
|
-
/**
|
|
389
|
-
* @returns {Promise<void>}
|
|
390
|
-
*/
|
|
391
|
-
update() {
|
|
392
|
-
const ret = wasm.jscomhub_update(this.__wbg_ptr);
|
|
393
|
-
return ret;
|
|
394
|
-
}
|
|
395
|
-
/**
|
|
396
|
-
* Send a block to the given interface and socket
|
|
397
|
-
* This does not involve the routing on the ComHub level.
|
|
398
|
-
* The socket UUID is used to identify the socket to send the block over
|
|
399
|
-
* The interface UUID is used to identify the interface to send the block over
|
|
400
|
-
* @param {Uint8Array} block
|
|
401
|
-
* @param {string} interface_uuid
|
|
402
|
-
* @param {string} socket_uuid
|
|
403
|
-
* @returns {Promise<boolean>}
|
|
404
|
-
*/
|
|
405
|
-
send_block(block, interface_uuid, socket_uuid) {
|
|
406
|
-
const ptr0 = passArray8ToWasm0(block, wasm.__wbindgen_malloc);
|
|
407
|
-
const len0 = WASM_VECTOR_LEN;
|
|
408
|
-
const ptr1 = passStringToWasm0(interface_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
409
|
-
const len1 = WASM_VECTOR_LEN;
|
|
410
|
-
const ptr2 = passStringToWasm0(socket_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
411
|
-
const len2 = WASM_VECTOR_LEN;
|
|
412
|
-
const ret = wasm.jscomhub_send_block(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
413
|
-
return ret;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* @returns {Uint8Array[]}
|
|
364
|
+
* @param {WebSocket} websocket
|
|
365
|
+
* @returns {string}
|
|
417
366
|
*/
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
367
|
+
websocket_server_interface_add_socket(interface_uuid, websocket) {
|
|
368
|
+
let deferred3_0;
|
|
369
|
+
let deferred3_1;
|
|
370
|
+
try {
|
|
371
|
+
const ptr0 = passStringToWasm0(interface_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
372
|
+
const len0 = WASM_VECTOR_LEN;
|
|
373
|
+
const ret = wasm.jscomhub_websocket_server_interface_add_socket(this.__wbg_ptr, ptr0, len0, websocket);
|
|
374
|
+
var ptr2 = ret[0];
|
|
375
|
+
var len2 = ret[1];
|
|
376
|
+
if (ret[3]) {
|
|
377
|
+
ptr2 = 0;
|
|
378
|
+
len2 = 0;
|
|
379
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
380
|
+
}
|
|
381
|
+
deferred3_0 = ptr2;
|
|
382
|
+
deferred3_1 = len2;
|
|
383
|
+
return getStringFromWasm0(ptr2, len2);
|
|
384
|
+
}
|
|
385
|
+
finally {
|
|
386
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
387
|
+
}
|
|
423
388
|
}
|
|
424
389
|
/**
|
|
425
390
|
* @param {string} uuid
|
|
@@ -509,33 +474,94 @@ export class JSComHub {
|
|
|
509
474
|
const ret = wasm.jscomhub_base_interface_test_send_block(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
510
475
|
return ret;
|
|
511
476
|
}
|
|
477
|
+
register_default_interface_factories() {
|
|
478
|
+
wasm.jscomhub_register_default_interface_factories(this.__wbg_ptr);
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* @param {string} interface_type
|
|
482
|
+
* @param {string} properties
|
|
483
|
+
* @returns {Promise<any>}
|
|
484
|
+
*/
|
|
485
|
+
create_interface(interface_type, properties) {
|
|
486
|
+
const ptr0 = passStringToWasm0(interface_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
487
|
+
const len0 = WASM_VECTOR_LEN;
|
|
488
|
+
const ptr1 = passStringToWasm0(properties, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
489
|
+
const len1 = WASM_VECTOR_LEN;
|
|
490
|
+
const ret = wasm.jscomhub_create_interface(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
491
|
+
return ret;
|
|
492
|
+
}
|
|
512
493
|
/**
|
|
513
494
|
* @param {string} interface_uuid
|
|
514
|
-
* @
|
|
495
|
+
* @returns {Promise<any>}
|
|
496
|
+
*/
|
|
497
|
+
close_interface(interface_uuid) {
|
|
498
|
+
const ptr0 = passStringToWasm0(interface_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
499
|
+
const len0 = WASM_VECTOR_LEN;
|
|
500
|
+
const ret = wasm.jscomhub_close_interface(this.__wbg_ptr, ptr0, len0);
|
|
501
|
+
return ret;
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* @returns {Promise<void>}
|
|
505
|
+
*/
|
|
506
|
+
update() {
|
|
507
|
+
const ret = wasm.jscomhub_update(this.__wbg_ptr);
|
|
508
|
+
return ret;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Send a block to the given interface and socket
|
|
512
|
+
* This does not involve the routing on the ComHub level.
|
|
513
|
+
* The socket UUID is used to identify the socket to send the block over
|
|
514
|
+
* The interface UUID is used to identify the interface to send the block over
|
|
515
|
+
* @param {Uint8Array} block
|
|
516
|
+
* @param {string} interface_uuid
|
|
517
|
+
* @param {string} socket_uuid
|
|
518
|
+
* @returns {Promise<boolean>}
|
|
519
|
+
*/
|
|
520
|
+
send_block(block, interface_uuid, socket_uuid) {
|
|
521
|
+
const ptr0 = passArray8ToWasm0(block, wasm.__wbindgen_malloc);
|
|
522
|
+
const len0 = WASM_VECTOR_LEN;
|
|
523
|
+
const ptr1 = passStringToWasm0(interface_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
524
|
+
const len1 = WASM_VECTOR_LEN;
|
|
525
|
+
const ptr2 = passStringToWasm0(socket_uuid, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
526
|
+
const len2 = WASM_VECTOR_LEN;
|
|
527
|
+
const ret = wasm.jscomhub_send_block(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
528
|
+
return ret;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* @returns {Uint8Array[]}
|
|
532
|
+
*/
|
|
533
|
+
_drain_incoming_blocks() {
|
|
534
|
+
const ret = wasm.jscomhub__drain_incoming_blocks(this.__wbg_ptr);
|
|
535
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
536
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
537
|
+
return v1;
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
515
540
|
* @returns {string}
|
|
516
541
|
*/
|
|
517
|
-
|
|
518
|
-
let
|
|
519
|
-
let
|
|
542
|
+
get_metadata_string() {
|
|
543
|
+
let deferred1_0;
|
|
544
|
+
let deferred1_1;
|
|
520
545
|
try {
|
|
521
|
-
const
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
var len2 = ret[1];
|
|
526
|
-
if (ret[3]) {
|
|
527
|
-
ptr2 = 0;
|
|
528
|
-
len2 = 0;
|
|
529
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
530
|
-
}
|
|
531
|
-
deferred3_0 = ptr2;
|
|
532
|
-
deferred3_1 = len2;
|
|
533
|
-
return getStringFromWasm0(ptr2, len2);
|
|
546
|
+
const ret = wasm.jscomhub_get_metadata_string(this.__wbg_ptr);
|
|
547
|
+
deferred1_0 = ret[0];
|
|
548
|
+
deferred1_1 = ret[1];
|
|
549
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
534
550
|
}
|
|
535
551
|
finally {
|
|
536
|
-
wasm.__wbindgen_free(
|
|
552
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
537
553
|
}
|
|
538
554
|
}
|
|
555
|
+
/**
|
|
556
|
+
* @param {string} endpoint
|
|
557
|
+
* @returns {Promise<string | undefined>}
|
|
558
|
+
*/
|
|
559
|
+
get_trace_string(endpoint) {
|
|
560
|
+
const ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
561
|
+
const len0 = WASM_VECTOR_LEN;
|
|
562
|
+
const ret = wasm.jscomhub_get_trace_string(this.__wbg_ptr, ptr0, len0);
|
|
563
|
+
return ret;
|
|
564
|
+
}
|
|
539
565
|
}
|
|
540
566
|
const JSMemoryFinalization = (typeof FinalizationRegistry === "undefined")
|
|
541
567
|
? { register: () => { }, unregister: () => { } }
|
|
@@ -1148,7 +1174,7 @@ export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
|
1148
1174
|
const a = state0.a;
|
|
1149
1175
|
state0.a = 0;
|
|
1150
1176
|
try {
|
|
1151
|
-
return
|
|
1177
|
+
return __wbg_adapter_280(a, state0.b, arg0, arg1);
|
|
1152
1178
|
}
|
|
1153
1179
|
finally {
|
|
1154
1180
|
state0.a = a;
|
|
@@ -1432,28 +1458,28 @@ export function __wbindgen_cb_drop(arg0) {
|
|
|
1432
1458
|
const ret = false;
|
|
1433
1459
|
return ret;
|
|
1434
1460
|
}
|
|
1435
|
-
export function
|
|
1436
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1461
|
+
export function __wbindgen_closure_wrapper3688(arg0, arg1, arg2) {
|
|
1462
|
+
const ret = makeMutClosure(arg0, arg1, 1039, __wbg_adapter_49);
|
|
1437
1463
|
return ret;
|
|
1438
1464
|
}
|
|
1439
|
-
export function
|
|
1440
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1465
|
+
export function __wbindgen_closure_wrapper3721(arg0, arg1, arg2) {
|
|
1466
|
+
const ret = makeMutClosure(arg0, arg1, 1056, __wbg_adapter_52);
|
|
1441
1467
|
return ret;
|
|
1442
1468
|
}
|
|
1443
|
-
export function
|
|
1444
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1469
|
+
export function __wbindgen_closure_wrapper410(arg0, arg1, arg2) {
|
|
1470
|
+
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_40);
|
|
1445
1471
|
return ret;
|
|
1446
1472
|
}
|
|
1447
|
-
export function
|
|
1448
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1473
|
+
export function __wbindgen_closure_wrapper411(arg0, arg1, arg2) {
|
|
1474
|
+
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_40);
|
|
1449
1475
|
return ret;
|
|
1450
1476
|
}
|
|
1451
|
-
export function
|
|
1452
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1477
|
+
export function __wbindgen_closure_wrapper412(arg0, arg1, arg2) {
|
|
1478
|
+
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_40);
|
|
1453
1479
|
return ret;
|
|
1454
1480
|
}
|
|
1455
|
-
export function
|
|
1456
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1481
|
+
export function __wbindgen_closure_wrapper413(arg0, arg1, arg2) {
|
|
1482
|
+
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_40);
|
|
1457
1483
|
return ret;
|
|
1458
1484
|
}
|
|
1459
1485
|
export function __wbindgen_debug_string(arg0, arg1) {
|
|
Binary file
|
package/esm/deno.json
CHANGED
package/esm/runtime/runtime.js
CHANGED
|
@@ -13,7 +13,7 @@ var _Runtime_runtime, _Runtime_memory, _Runtime_comHub;
|
|
|
13
13
|
import { create_runtime, execute_internal, } from "../datex-core.js";
|
|
14
14
|
import { ComHub } from "../network/com-hub.js";
|
|
15
15
|
// auto-generated version - do not edit:
|
|
16
|
-
const VERSION = "0.0.
|
|
16
|
+
const VERSION = "0.0.6";
|
|
17
17
|
export class Runtime {
|
|
18
18
|
constructor(config, debug_flags) {
|
|
19
19
|
Object.defineProperty(this, "js_version", {
|