@unyt/datex 0.0.11 → 0.0.12

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.
Files changed (68) hide show
  1. package/README.md +10 -14
  2. package/esm/datex-web/datex_web.d.ts +2 -0
  3. package/esm/datex-web/datex_web.d.ts.map +1 -0
  4. package/esm/datex-web/datex_web.internal.d.ts +383 -0
  5. package/esm/datex-web/datex_web.internal.d.ts.map +1 -0
  6. package/esm/{datex-core/datex_core_js.internal.js → datex-web/datex_web.internal.js} +737 -1121
  7. package/esm/datex-web/datex_web.js +18 -0
  8. package/esm/datex-web/datex_web.wasm +0 -0
  9. package/esm/datex-web/wasm_url.node.js +1 -0
  10. package/esm/{datex-core.d.ts → datex.d.ts} +3 -3
  11. package/esm/datex.d.ts.map +1 -0
  12. package/esm/{datex-core.js → datex.js} +3 -3
  13. package/esm/default.d.ts.map +1 -1
  14. package/esm/default.js +2 -3
  15. package/esm/deno.json +27 -21
  16. package/esm/dif/core.d.ts.map +1 -1
  17. package/esm/dif/definitions.d.ts.map +1 -1
  18. package/esm/dif/dif-handler.d.ts +10 -1
  19. package/esm/dif/dif-handler.d.ts.map +1 -1
  20. package/esm/dif/dif-handler.js +14 -2
  21. package/esm/dif/display.d.ts.map +1 -1
  22. package/esm/dif/display.js +1 -3
  23. package/esm/dif/js-lib.d.ts.map +1 -1
  24. package/esm/dif/type-registry.d.ts.map +1 -1
  25. package/esm/dif/type-registry.js +2 -2
  26. package/esm/lib/special-core-types/endpoint.d.ts +2 -0
  27. package/esm/lib/special-core-types/endpoint.d.ts.map +1 -1
  28. package/esm/lib/special-core-types/endpoint.js +6 -1
  29. package/esm/mod.d.ts +3 -1
  30. package/esm/mod.d.ts.map +1 -1
  31. package/esm/mod.js +3 -1
  32. package/esm/network/com-hub.d.ts +20 -22
  33. package/esm/network/com-hub.d.ts.map +1 -1
  34. package/esm/network/com-hub.js +30 -49
  35. package/esm/network/interfaces/websocket-server-base.d.ts +8 -0
  36. package/esm/network/interfaces/websocket-server-base.d.ts.map +1 -0
  37. package/esm/network/interfaces/websocket-server-base.js +93 -0
  38. package/esm/network/interfaces/websocket-server-deno.d.ts +4 -0
  39. package/esm/network/interfaces/websocket-server-deno.d.ts.map +1 -0
  40. package/esm/network/interfaces/websocket-server-deno.js +22 -0
  41. package/esm/network/mod.d.ts +0 -1
  42. package/esm/network/mod.d.ts.map +1 -1
  43. package/esm/network/mod.js +0 -1
  44. package/esm/runtime/runtime.d.ts +7 -14
  45. package/esm/runtime/runtime.d.ts.map +1 -1
  46. package/esm/runtime/runtime.js +11 -20
  47. package/esm/utils/devtools-formatter.d.ts +2 -0
  48. package/esm/utils/devtools-formatter.d.ts.map +1 -0
  49. package/esm/utils/devtools-formatter.js +40 -0
  50. package/esm/utils/js-runtime-compat/js-runtime.d.ts.map +1 -1
  51. package/package.json +7 -7
  52. package/esm/datex-core/datex_core_js.d.ts +0 -2
  53. package/esm/datex-core/datex_core_js.d.ts.map +0 -1
  54. package/esm/datex-core/datex_core_js.internal.d.ts +0 -496
  55. package/esm/datex-core/datex_core_js.internal.d.ts.map +0 -1
  56. package/esm/datex-core/datex_core_js.js +0 -21
  57. package/esm/datex-core/datex_core_js.wasm +0 -0
  58. package/esm/datex-core/wasm_url.node.js +0 -1
  59. package/esm/datex-core.d.ts.map +0 -1
  60. package/esm/network/com-interface.d.ts +0 -35
  61. package/esm/network/com-interface.d.ts.map +0 -1
  62. package/esm/network/com-interface.js +0 -75
  63. package/esm/network/interface-impls/base.d.ts +0 -46
  64. package/esm/network/interface-impls/base.d.ts.map +0 -1
  65. package/esm/network/interface-impls/base.js +0 -47
  66. package/esm/network/interface-impls/websocket-client.d.ts +0 -8
  67. package/esm/network/interface-impls/websocket-client.d.ts.map +0 -1
  68. package/esm/network/interface-impls/websocket-client.js +0 -8
@@ -1,46 +0,0 @@
1
- import { ComInterfaceImpl } from "../com-interface.js";
2
- import type { BaseInterfaceSetupData, InterfaceDirection } from "../../datex-core/datex_core_js";
3
- export type {
4
- /**
5
- * Setup data for the base communication interface.
6
- */
7
- BaseInterfaceSetupData,
8
- /**
9
- * Direction of the communication interface (In/Out/InOut).
10
- */
11
- InterfaceDirection, };
12
- /**
13
- * Implementation of the base communication interface.
14
- */
15
- export declare class BaseInterfaceImpl extends ComInterfaceImpl<BaseInterfaceSetupData> {
16
- /**
17
- * Registers a socket for the communication interface.
18
- * @param interfaceDirection The direction of the interface (incoming/outgoing).
19
- * @returns The UUID of the registered socket.
20
- */
21
- registerSocket(interfaceDirection: InterfaceDirection): string;
22
- /**
23
- * Destroys a socket for the communication interface.
24
- * @param socketUUID The UUID of the socket to destroy.
25
- */
26
- destroySocket(socketUUID: string): void;
27
- /**
28
- * Receives a data block for the communication interface.
29
- * @param socketUUID The UUID of the socket to receive data on.
30
- * @param data The data block to receive.
31
- */
32
- receive(socketUUID: string, data: Uint8Array): void;
33
- /**
34
- * Tests sending a data block for the communication interface.
35
- * @param socketUUID The UUID of the socket to send data on.
36
- * @param data The data block to send.
37
- * @returns A promise that resolves to true if the block was sent successfully, false otherwise.
38
- */
39
- testSendBlock(socketUUID: string, data: Uint8Array): Promise<boolean>;
40
- /**
41
- * Registers a callback to handle sending data blocks.
42
- * @param callback The callback to be invoked when sending data.
43
- */
44
- onSend(callback: (data: Uint8Array, receiver_socket_uuid: string) => Promise<boolean>): void;
45
- }
46
- //# sourceMappingURL=base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/network/interface-impls/base.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,KAAK,EACR,sBAAsB,EACtB,kBAAkB,EACrB,MAAM,gCAAgC,CAAC;AAExC,YAAY;AACR;;GAEG;AACH,sBAAsB;AACtB;;GAEG;AACH,kBAAkB,GACrB,CAAC;AAEF;;GAEG;AACH,qBAAa,iBACT,SAAQ,gBAAgB,CAAC,sBAAsB,CAAC;IAChD;;;;OAIG;IACI,cAAc,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,MAAM;IAOrE;;;OAGG;IACI,aAAa,CAAC,UAAU,EAAE,MAAM;IAOvC;;;;OAIG;IACI,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU;IAQnD;;;;;OAKG;IACI,aAAa,CAChB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,UAAU,GACjB,OAAO,CAAC,OAAO,CAAC;IAQnB;;;OAGG;IACI,MAAM,CACT,QAAQ,EAAE,CACN,IAAI,EAAE,UAAU,EAChB,oBAAoB,EAAE,MAAM,KAC3B,OAAO,CAAC,OAAO,CAAC;CAI5B"}
@@ -1,47 +0,0 @@
1
- import { ComInterfaceImpl } from "../com-interface.js";
2
- import { ComHub } from "../com-hub.js";
3
- /**
4
- * Implementation of the base communication interface.
5
- */
6
- export class BaseInterfaceImpl extends ComInterfaceImpl {
7
- /**
8
- * Registers a socket for the communication interface.
9
- * @param interfaceDirection The direction of the interface (incoming/outgoing).
10
- * @returns The UUID of the registered socket.
11
- */
12
- registerSocket(interfaceDirection) {
13
- return this.jsComHub.base_interface_register_socket(this.uuid, interfaceDirection);
14
- }
15
- /**
16
- * Destroys a socket for the communication interface.
17
- * @param socketUUID The UUID of the socket to destroy.
18
- */
19
- destroySocket(socketUUID) {
20
- this.jsComHub.base_interface_destroy_socket(this.uuid, socketUUID);
21
- }
22
- /**
23
- * Receives a data block for the communication interface.
24
- * @param socketUUID The UUID of the socket to receive data on.
25
- * @param data The data block to receive.
26
- */
27
- receive(socketUUID, data) {
28
- this.jsComHub.base_interface_receive(this.uuid, socketUUID, data);
29
- }
30
- /**
31
- * Tests sending a data block for the communication interface.
32
- * @param socketUUID The UUID of the socket to send data on.
33
- * @param data The data block to send.
34
- * @returns A promise that resolves to true if the block was sent successfully, false otherwise.
35
- */
36
- testSendBlock(socketUUID, data) {
37
- return this.jsComHub.base_interface_test_send_block(this.uuid, socketUUID, data);
38
- }
39
- /**
40
- * Registers a callback to handle sending data blocks.
41
- * @param callback The callback to be invoked when sending data.
42
- */
43
- onSend(callback) {
44
- this.jsComHub.base_interface_on_send(this.uuid, callback);
45
- }
46
- }
47
- ComHub.registerInterfaceImpl("base", BaseInterfaceImpl);
@@ -1,8 +0,0 @@
1
- import { ComInterfaceImpl } from "../com-interface.js";
2
- import type { WebSocketClientInterfaceSetupData } from "../../datex-core/datex_core_js";
3
- /**
4
- * Implementation of the WebSocket client communication interface.
5
- */
6
- export declare class WebSocketClientInterfaceImpl extends ComInterfaceImpl<WebSocketClientInterfaceSetupData> {
7
- }
8
- //# sourceMappingURL=websocket-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"websocket-client.d.ts","sourceRoot":"","sources":["../../../src/network/interface-impls/websocket-client.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gCAAgC,CAAC;AAGxF;;GAEG;AACH,qBAAa,4BACT,SAAQ,gBAAgB,CAAC,iCAAiC,CAAC;CAC9D"}
@@ -1,8 +0,0 @@
1
- import { ComInterfaceImpl } from "../com-interface.js";
2
- import { ComHub } from "../com-hub.js";
3
- /**
4
- * Implementation of the WebSocket client communication interface.
5
- */
6
- export class WebSocketClientInterfaceImpl extends ComInterfaceImpl {
7
- }
8
- ComHub.registerInterfaceImpl("websocket-client", WebSocketClientInterfaceImpl);