@unyt/datex 0.0.5 → 0.0.7
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 +6 -4
- package/esm/_dnt.shims.d.ts +1 -1
- package/esm/datex-core/datex_core_js.internal.d.ts +290 -210
- package/esm/datex-core/datex_core_js.internal.d.ts.map +1 -1
- package/esm/datex-core/datex_core_js.internal.js +836 -524
- package/esm/datex-core/datex_core_js.wasm +0 -0
- package/esm/deno.json +11 -2
- package/esm/dif/builders.d.ts +11 -0
- package/esm/dif/builders.d.ts.map +1 -0
- package/esm/dif/builders.js +23 -0
- package/esm/dif/definitions.d.ts +116 -0
- package/esm/dif/definitions.d.ts.map +1 -0
- package/esm/dif/definitions.js +70 -0
- package/esm/dif/dif-handler.d.ts +217 -0
- package/esm/dif/dif-handler.d.ts.map +1 -0
- package/esm/dif/dif-handler.js +688 -0
- package/esm/dif/display.d.ts +8 -0
- package/esm/dif/display.d.ts.map +1 -0
- package/esm/dif/display.js +74 -0
- package/esm/mod.js +8 -6
- package/esm/network/com-hub.d.ts +1 -0
- package/esm/network/com-hub.d.ts.map +1 -1
- package/esm/network/com-hub.js +3 -0
- package/esm/network/interface-impls/base.d.ts +11 -0
- package/esm/network/interface-impls/base.d.ts.map +1 -0
- package/esm/network/interface-impls/base.js +21 -0
- package/esm/network/interface-impls/websocket-client.d.ts +6 -0
- package/esm/network/interface-impls/websocket-client.d.ts.map +1 -0
- package/esm/network/interface-impls/websocket-client.js +6 -0
- package/esm/network/interface-impls/websocket-server-deno.d.ts +9 -0
- package/esm/network/interface-impls/websocket-server-deno.d.ts.map +1 -0
- package/esm/network/interface-impls/websocket-server-deno.js +45 -0
- package/esm/refs/ref.d.ts +27 -0
- package/esm/refs/ref.d.ts.map +1 -0
- package/esm/refs/ref.js +58 -0
- package/esm/runtime/runtime.d.ts +97 -5
- package/esm/runtime/runtime.d.ts.map +1 -1
- package/esm/runtime/runtime.js +69 -13
- package/esm/runtime/special-core-types.d.ts +10 -0
- package/esm/runtime/special-core-types.d.ts.map +1 -0
- package/esm/runtime/special-core-types.js +51 -0
- package/package.json +10 -1
|
Binary file
|
package/esm/deno.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unyt/datex",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": "./src/mod.ts",
|
|
6
6
|
"compilerOptions": {
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"test": "deno task build && deno test -A",
|
|
15
15
|
"test-no-build": "deno test -A",
|
|
16
16
|
"build-npm": "deno run -A scripts/build-npm.ts",
|
|
17
|
+
"build-bundle": "deno run -A scripts/build-bundle.ts",
|
|
17
18
|
"serve": "deno run -A https://raw.githubusercontent.com/unyt-org/ts-file-server/main/src/run.ts -w --minify=false --port 8042",
|
|
18
19
|
"fmt": "deno fmt && cargo fmt",
|
|
19
20
|
"lint": "deno lint --fix && cargo clippy --fix --features debug"
|
|
@@ -23,7 +24,15 @@
|
|
|
23
24
|
"exclude": ["./npm"]
|
|
24
25
|
},
|
|
25
26
|
"imports": {
|
|
26
|
-
"@
|
|
27
|
+
"@david/path": "jsr:@david/path@^0.2.0",
|
|
28
|
+
"@deno/dnt": "jsr:@deno/dnt@^0.42.1",
|
|
29
|
+
"@deno/wasmbuild": "https://jsr.io/@deno/wasmbuild/0.19.3/lib/commands/build_command.ts",
|
|
30
|
+
"@qnighy/dedent": "jsr:@qnighy/dedent@^0.1.2",
|
|
31
|
+
"@std/assert": "jsr:@std/assert@^1.0.15",
|
|
32
|
+
"@std/cli": "jsr:@std/cli@^1.0.23",
|
|
33
|
+
"@std/encoding": "jsr:@std/encoding@^1.0.10",
|
|
34
|
+
"@std/fmt": "jsr:@std/fmt@^1.0.8",
|
|
35
|
+
"@std/uuid": "jsr:@std/uuid@^1.0.9"
|
|
27
36
|
},
|
|
28
37
|
"test": {
|
|
29
38
|
"exclude": ["./npm"]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type DIFUpdateData } from "./definitions.js";
|
|
2
|
+
import type { DIFHandler } from "./dif-handler.js";
|
|
3
|
+
/**
|
|
4
|
+
* Creates a DIFUpdate object that describes replacing a pointer's value.
|
|
5
|
+
*/
|
|
6
|
+
export declare function DIF_Replace<T>(difHandler: DIFHandler, value: T): DIFUpdateData;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a DIFUpdate object that describes updating a property of a pointer's value.
|
|
9
|
+
*/
|
|
10
|
+
export declare function DIF_UpdateProperty<K, V>(difHandler: DIFHandler, property: K, value: V): DIFUpdateData;
|
|
11
|
+
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/dif/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,EACzB,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,CAAC,GACT,aAAa,CAMf;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EACnC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,CAAC,EACX,KAAK,EAAE,CAAC,GACT,aAAa,CAQf"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DIFUpdateKind } from "./definitions.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates a DIFUpdate object that describes replacing a pointer's value.
|
|
4
|
+
*/
|
|
5
|
+
export function DIF_Replace(difHandler, value) {
|
|
6
|
+
const difValue = difHandler.convertJSValueToDIFValue(value);
|
|
7
|
+
return {
|
|
8
|
+
kind: DIFUpdateKind.Replace,
|
|
9
|
+
value: difValue,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Creates a DIFUpdate object that describes updating a property of a pointer's value.
|
|
14
|
+
*/
|
|
15
|
+
export function DIF_UpdateProperty(difHandler, property, value) {
|
|
16
|
+
const difKey = difHandler.convertJSValueToDIFValue(property);
|
|
17
|
+
const difValue = difHandler.convertJSValueToDIFValue(value);
|
|
18
|
+
return {
|
|
19
|
+
kind: DIFUpdateKind.Set,
|
|
20
|
+
key: { kind: "value", value: difKey },
|
|
21
|
+
value: difValue,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export declare const CoreTypeAddress: {
|
|
2
|
+
readonly null: "010000";
|
|
3
|
+
readonly type: "020000";
|
|
4
|
+
readonly boolean: "030000";
|
|
5
|
+
readonly endpoint: "070000";
|
|
6
|
+
readonly text: "080000";
|
|
7
|
+
readonly list: "090000";
|
|
8
|
+
readonly unit: "0b0000";
|
|
9
|
+
readonly map: "0c0000";
|
|
10
|
+
readonly decimal: "2c0100";
|
|
11
|
+
readonly decimal_f32: "2d0100";
|
|
12
|
+
readonly decimal_f64: "2e0100";
|
|
13
|
+
readonly decimal_big: "2f0100";
|
|
14
|
+
readonly integer: "640000";
|
|
15
|
+
readonly integer_u8: "650000";
|
|
16
|
+
readonly integer_u16: "660000";
|
|
17
|
+
readonly integer_u32: "670000";
|
|
18
|
+
readonly integer_u64: "680000";
|
|
19
|
+
readonly integer_u128: "690000";
|
|
20
|
+
readonly integer_i8: "6a0000";
|
|
21
|
+
readonly integer_i16: "6b0000";
|
|
22
|
+
readonly integer_i32: "6c0000";
|
|
23
|
+
readonly integer_i64: "6d0000";
|
|
24
|
+
readonly integer_i128: "6e0000";
|
|
25
|
+
readonly integer_big: "6f0000";
|
|
26
|
+
};
|
|
27
|
+
export type CoreTypeAddress = typeof CoreTypeAddress[keyof typeof CoreTypeAddress];
|
|
28
|
+
export declare const CoreTypeAddressRanges: {
|
|
29
|
+
readonly small_unsigned_integers: Set<"650000" | "660000" | "670000" | "680000" | "690000">;
|
|
30
|
+
readonly big_unsigned_integers: Set<"6f0000">;
|
|
31
|
+
readonly small_signed_integers: Set<"6a0000" | "6b0000" | "6c0000" | "6d0000" | "6e0000">;
|
|
32
|
+
readonly big_signed_integers: Set<"6f0000">;
|
|
33
|
+
readonly decimals: Set<"2c0100" | "2d0100" | "2e0100" | "2f0100">;
|
|
34
|
+
};
|
|
35
|
+
/** 3, 5, or 26 byte hex string */
|
|
36
|
+
export type DIFPointerAddress = string;
|
|
37
|
+
export type DIFValue = {
|
|
38
|
+
type?: DIFTypeContainer;
|
|
39
|
+
value: DIFRepresentationValue;
|
|
40
|
+
};
|
|
41
|
+
export type DIFContainer = DIFValue | DIFPointerAddress;
|
|
42
|
+
export declare const DIFTypeKinds: {
|
|
43
|
+
readonly Structural: 0;
|
|
44
|
+
readonly Reference: 1;
|
|
45
|
+
readonly Intersection: 2;
|
|
46
|
+
readonly Union: 3;
|
|
47
|
+
readonly Unit: 4;
|
|
48
|
+
readonly Function: 5;
|
|
49
|
+
};
|
|
50
|
+
export type DIFTypeKind = typeof DIFTypeKinds[keyof typeof DIFTypeKinds];
|
|
51
|
+
export declare const DIFReferenceMutability: {
|
|
52
|
+
readonly Mutable: 0;
|
|
53
|
+
readonly Immutable: 1;
|
|
54
|
+
readonly Final: 2;
|
|
55
|
+
};
|
|
56
|
+
export type DIFReferenceMutability = typeof DIFReferenceMutability[keyof typeof DIFReferenceMutability];
|
|
57
|
+
export type DIFTypeDefinition<Kind extends DIFTypeKind = DIFTypeKind> = Kind extends typeof DIFTypeKinds.Structural ? DIFValue : Kind extends typeof DIFTypeKinds.Reference ? DIFPointerAddress : Kind extends typeof DIFTypeKinds.Intersection ? Array<DIFTypeContainer> : Kind extends typeof DIFTypeKinds.Union ? Array<DIFTypeContainer> : Kind extends typeof DIFTypeKinds.Unit ? null : Kind extends typeof DIFTypeKinds.Function ? unknown : never;
|
|
58
|
+
export type DIFType<Kind extends DIFTypeKind = DIFTypeKind> = {
|
|
59
|
+
name?: string;
|
|
60
|
+
kind: Kind;
|
|
61
|
+
def: DIFTypeDefinition<Kind>;
|
|
62
|
+
mut?: DIFReferenceMutability;
|
|
63
|
+
};
|
|
64
|
+
export type DIFReference = {
|
|
65
|
+
value: DIFValueContainer;
|
|
66
|
+
allowed_type: DIFTypeContainer;
|
|
67
|
+
mut: DIFReferenceMutability;
|
|
68
|
+
};
|
|
69
|
+
export type DIFValueContainer = DIFValue | DIFPointerAddress;
|
|
70
|
+
export type DIFTypeContainer = DIFType | DIFPointerAddress;
|
|
71
|
+
export type DIFObject = Record<string, DIFValueContainer>;
|
|
72
|
+
export type DIFArray = DIFValueContainer[];
|
|
73
|
+
export type DIFMap = [DIFValueContainer, DIFValueContainer][];
|
|
74
|
+
export type DIFRepresentationValue = string | number | boolean | null | DIFObject | DIFMap | DIFArray;
|
|
75
|
+
export type DIFProperty = {
|
|
76
|
+
kind: "text";
|
|
77
|
+
value: string;
|
|
78
|
+
} | {
|
|
79
|
+
kind: "index";
|
|
80
|
+
value: number;
|
|
81
|
+
} | {
|
|
82
|
+
kind: "value";
|
|
83
|
+
value: DIFValueContainer;
|
|
84
|
+
};
|
|
85
|
+
export declare const DIFUpdateKind: {
|
|
86
|
+
readonly Replace: "replace";
|
|
87
|
+
readonly Push: "push";
|
|
88
|
+
readonly Set: "set";
|
|
89
|
+
readonly Remove: "remove";
|
|
90
|
+
readonly Clear: "clear";
|
|
91
|
+
};
|
|
92
|
+
export type DIFUpdateKind = typeof DIFUpdateKind[keyof typeof DIFUpdateKind];
|
|
93
|
+
export type DIFUpdateData = {
|
|
94
|
+
kind: typeof DIFUpdateKind.Replace;
|
|
95
|
+
value: DIFValueContainer;
|
|
96
|
+
} | {
|
|
97
|
+
kind: typeof DIFUpdateKind.Push;
|
|
98
|
+
value: DIFValueContainer;
|
|
99
|
+
} | {
|
|
100
|
+
kind: typeof DIFUpdateKind.Remove;
|
|
101
|
+
key: DIFProperty;
|
|
102
|
+
} | {
|
|
103
|
+
kind: typeof DIFUpdateKind.Set;
|
|
104
|
+
key: DIFProperty;
|
|
105
|
+
value: DIFValueContainer;
|
|
106
|
+
} | {
|
|
107
|
+
kind: typeof DIFUpdateKind.Clear;
|
|
108
|
+
};
|
|
109
|
+
export type DIFUpdate = {
|
|
110
|
+
source_id: number;
|
|
111
|
+
data: DIFUpdateData;
|
|
112
|
+
};
|
|
113
|
+
export type ObserveOptions = {
|
|
114
|
+
relay_own_updates: boolean;
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/dif/definitions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;CAyBlB,CAAC;AACX,MAAM,MAAM,eAAe,GACvB,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzD,eAAO,MAAM,qBAAqB;;;;;;CAuBxB,CAAC;AAEX,kCAAkC;AAClC,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACvC,MAAM,MAAM,QAAQ,GAAG;IACnB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,KAAK,EAAE,sBAAsB,CAAC;CACjC,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,iBAAiB,CAAC;AAExD,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,OAAO,YAAY,CAAC,MAAM,OAAO,YAAY,CAAC,CAAC;AAEzE,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAC9B,OAAO,sBAAsB,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEvE,MAAM,MAAM,iBAAiB,CAAC,IAAI,SAAS,WAAW,GAAG,WAAW,IAChE,IAAI,SAAS,OAA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
|
10
|
+
decimal: "2c0100",
|
|
11
|
+
decimal_f32: "2d0100",
|
|
12
|
+
decimal_f64: "2e0100",
|
|
13
|
+
decimal_big: "2f0100",
|
|
14
|
+
integer: "640000",
|
|
15
|
+
integer_u8: "650000",
|
|
16
|
+
integer_u16: "660000",
|
|
17
|
+
integer_u32: "670000",
|
|
18
|
+
integer_u64: "680000",
|
|
19
|
+
integer_u128: "690000",
|
|
20
|
+
integer_i8: "6a0000",
|
|
21
|
+
integer_i16: "6b0000",
|
|
22
|
+
integer_i32: "6c0000",
|
|
23
|
+
integer_i64: "6d0000",
|
|
24
|
+
integer_i128: "6e0000",
|
|
25
|
+
integer_big: "6f0000",
|
|
26
|
+
};
|
|
27
|
+
export const CoreTypeAddressRanges = {
|
|
28
|
+
small_unsigned_integers: new Set([
|
|
29
|
+
CoreTypeAddress.integer_u8,
|
|
30
|
+
CoreTypeAddress.integer_u16,
|
|
31
|
+
CoreTypeAddress.integer_u32,
|
|
32
|
+
CoreTypeAddress.integer_u64,
|
|
33
|
+
CoreTypeAddress.integer_u128,
|
|
34
|
+
]),
|
|
35
|
+
big_unsigned_integers: new Set([CoreTypeAddress.integer_big]),
|
|
36
|
+
small_signed_integers: new Set([
|
|
37
|
+
CoreTypeAddress.integer_i8,
|
|
38
|
+
CoreTypeAddress.integer_i16,
|
|
39
|
+
CoreTypeAddress.integer_i32,
|
|
40
|
+
CoreTypeAddress.integer_i64,
|
|
41
|
+
CoreTypeAddress.integer_i128,
|
|
42
|
+
]),
|
|
43
|
+
big_signed_integers: new Set([CoreTypeAddress.integer_big]),
|
|
44
|
+
decimals: new Set([
|
|
45
|
+
CoreTypeAddress.decimal,
|
|
46
|
+
CoreTypeAddress.decimal_f32,
|
|
47
|
+
CoreTypeAddress.decimal_f64,
|
|
48
|
+
CoreTypeAddress.decimal_big,
|
|
49
|
+
]),
|
|
50
|
+
};
|
|
51
|
+
export const DIFTypeKinds = {
|
|
52
|
+
Structural: 0,
|
|
53
|
+
Reference: 1,
|
|
54
|
+
Intersection: 2,
|
|
55
|
+
Union: 3,
|
|
56
|
+
Unit: 4,
|
|
57
|
+
Function: 5,
|
|
58
|
+
};
|
|
59
|
+
export const DIFReferenceMutability = {
|
|
60
|
+
Mutable: 0,
|
|
61
|
+
Immutable: 1,
|
|
62
|
+
Final: 2,
|
|
63
|
+
};
|
|
64
|
+
export const DIFUpdateKind = {
|
|
65
|
+
Replace: "replace",
|
|
66
|
+
Push: "push",
|
|
67
|
+
Set: "set",
|
|
68
|
+
Remove: "remove",
|
|
69
|
+
Clear: "clear",
|
|
70
|
+
};
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { JSRuntime, RuntimeDIFHandle } from "../datex-core.js";
|
|
2
|
+
import { Ref } from "../refs/ref.js";
|
|
3
|
+
import { type DIFContainer, type DIFPointerAddress, DIFReferenceMutability, type DIFTypeContainer, type DIFUpdate, type DIFUpdateData, type DIFValue, type DIFValueContainer, type ObserveOptions } from "./definitions.js";
|
|
4
|
+
export declare class DIFHandler {
|
|
5
|
+
#private;
|
|
6
|
+
get _observers(): Map<string, Map<number, (value: DIFUpdateData) => void>>;
|
|
7
|
+
get _handle(): RuntimeDIFHandle;
|
|
8
|
+
get _transceiver_id(): number;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a new DIFHandler instance.
|
|
11
|
+
* @param runtime - The JSRuntime instance for executing Datex scripts.
|
|
12
|
+
* @param pointerCache - The PointerCache instance for managing object pointers. If not provided, a new PointerCache will be created.
|
|
13
|
+
*/
|
|
14
|
+
constructor(runtime: JSRuntime);
|
|
15
|
+
/**
|
|
16
|
+
* Executes a Datex script asynchronously and returns a Promise that resolves to a DIFContainer.
|
|
17
|
+
* @param datexScript - The Datex script source code to execute.
|
|
18
|
+
* @param values - An optional array of values to inject into the script.
|
|
19
|
+
* @returns A Promise that resolves to the execution result as a DIFContainer.
|
|
20
|
+
* @throws If an error occurs during execution.
|
|
21
|
+
*/
|
|
22
|
+
executeDIF(datexScript: string, values?: unknown[] | null): Promise<DIFContainer>;
|
|
23
|
+
/**
|
|
24
|
+
* Executes a Datex script synchronously and returns the result as a DIFContainer.
|
|
25
|
+
* @param datexScript - The Datex script source code to execute.
|
|
26
|
+
* @param values - An optional array of values to inject into the script.
|
|
27
|
+
* @returns The execution result as a DIFContainer.
|
|
28
|
+
* @throws If an error occurs during execution.
|
|
29
|
+
*/
|
|
30
|
+
executeSyncDIF(datexScript: string, values?: unknown[] | null): DIFContainer;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new pointer for the specified value.
|
|
33
|
+
* @param difValue - The DIFValue value to create a pointer for.
|
|
34
|
+
* @param allowedType - The allowed type for the pointer.
|
|
35
|
+
* @param mutability - The mutability of the pointer.
|
|
36
|
+
* @returns The created pointer address.
|
|
37
|
+
*/
|
|
38
|
+
createPointer(difValue: DIFValue, allowedType: (DIFTypeContainer | null) | undefined, mutability: DIFReferenceMutability): string;
|
|
39
|
+
/**
|
|
40
|
+
* Creates a new pointer that points to an existing address.
|
|
41
|
+
* @param address - The address to create a reference pointer for.
|
|
42
|
+
* @param allowedType - The allowed type for the pointer.
|
|
43
|
+
* @param mutability - The mutability of the pointer.
|
|
44
|
+
* @returns A Promise that resolves to the created pointer address.
|
|
45
|
+
*/
|
|
46
|
+
createRefPointer(address: string, allowedType: (DIFTypeContainer | null) | undefined, mutability: DIFReferenceMutability): string;
|
|
47
|
+
/**
|
|
48
|
+
* Updates the DIF value at the specified address.
|
|
49
|
+
* @param address - The address of the DIF value to update.
|
|
50
|
+
* @param dif - The DIFUpdate object containing the update information.
|
|
51
|
+
*/
|
|
52
|
+
updatePointer(address: string, dif: DIFUpdateData): void;
|
|
53
|
+
/**
|
|
54
|
+
* Registers an observer callback for changes to the DIF value at the specified address
|
|
55
|
+
* directly on the DATEX core runtime.
|
|
56
|
+
* This method should only be used internally, since it comes with additional overhead.
|
|
57
|
+
* For normal use cases, use the observePointer method instead.
|
|
58
|
+
* The callback will be invoked whenever the value at the address is updated.
|
|
59
|
+
* @param address - The address of the DIF value to observe.
|
|
60
|
+
* @param callback - The callback function to invoke on updates.
|
|
61
|
+
* @returns An observer ID that can be used to unregister the observer.
|
|
62
|
+
* @throws If the pointer is final.
|
|
63
|
+
*/
|
|
64
|
+
observePointerBindDirect(address: string, callback: (value: DIFUpdate) => void, options?: ObserveOptions): number;
|
|
65
|
+
/**
|
|
66
|
+
* Updates the observe options for a registered observer.
|
|
67
|
+
* @param address - The address of the DIF value being observed.
|
|
68
|
+
* @param observerId - The observer ID returned by the observePointer method.
|
|
69
|
+
* @param options - The new observe options to apply.
|
|
70
|
+
*/
|
|
71
|
+
private updateObserverOptions;
|
|
72
|
+
/**
|
|
73
|
+
* Enables propagation of own updates for a registered observer.
|
|
74
|
+
* @param address - The address of the DIF value being observed.
|
|
75
|
+
* @param observerId - The observer ID returned by the observePointer method.
|
|
76
|
+
*/
|
|
77
|
+
enableOwnUpdatesPropagation(address: string, observerId: number): void;
|
|
78
|
+
/**
|
|
79
|
+
* Disables propagation of own updates for a registered observer.
|
|
80
|
+
* @param address - The address of the DIF value being observed.
|
|
81
|
+
* @param observerId - The observer ID returned by the observePointer method.
|
|
82
|
+
*/
|
|
83
|
+
disableOwnUpdatesPropagation(address: string, observerId: number): void;
|
|
84
|
+
/**
|
|
85
|
+
* Unregisters an observer that was registered directly on the DATEX core runtime
|
|
86
|
+
* with the observePointerBindDirect method.
|
|
87
|
+
* For internal use only.
|
|
88
|
+
* @param address - The address of the DIF value being observed.
|
|
89
|
+
* @param observerId - The observer ID returned by the observePointer method.
|
|
90
|
+
*/
|
|
91
|
+
unobservePointerBindDirect(address: string, observerId: number): void;
|
|
92
|
+
/**
|
|
93
|
+
* Registers a local observer callback for changes to the DIF value at the specified address.
|
|
94
|
+
* The callback will be invoked whenever the value at the address is updated.
|
|
95
|
+
* In contrast to observePointerBindDirect, this method does not register the observer
|
|
96
|
+
* directly on the DATEX core runtime, but keeps it local in the JS side, which prevents
|
|
97
|
+
* unnecessary overhead from additional cross-language calls.
|
|
98
|
+
* @param address - The address of the DIF value to observe.
|
|
99
|
+
* @param callback - The callback function to invoke on updates.
|
|
100
|
+
* @returns An observer ID that can be used to unregister the observer.
|
|
101
|
+
* @throws If the pointer is final.
|
|
102
|
+
*/
|
|
103
|
+
observePointer(address: string, callback: (value: DIFUpdateData) => void): number;
|
|
104
|
+
/**
|
|
105
|
+
* Unregisters an observer that was registered with the observePointer method.
|
|
106
|
+
* @param address - The address of the DIF value being observed.
|
|
107
|
+
* @param observerId - The observer ID returned by the observePointer method.
|
|
108
|
+
* @returns True if the observer was successfully unregistered, false otherwise.
|
|
109
|
+
*/
|
|
110
|
+
unobservePointer(address: string, observerId: number): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Resolves a DIFValue to its corresponding JS value.
|
|
113
|
+
* This function handles core types and custom types (not yet implemented).
|
|
114
|
+
* It returns the resolved value as the specified type T.
|
|
115
|
+
* @param value
|
|
116
|
+
*/
|
|
117
|
+
resolveDIFValue<T extends unknown>(value: DIFValue): T | Promise<T>;
|
|
118
|
+
/**
|
|
119
|
+
* Converts an array of Promises or resolved values to either a Promise of an array of resolved values,
|
|
120
|
+
* or an array of resolved values if all values are already resolved.
|
|
121
|
+
*/
|
|
122
|
+
promiseAllOrSync<T>(values: (T | Promise<T>)[]): Promise<T[]> | T[];
|
|
123
|
+
/**
|
|
124
|
+
* Converts an object with values that may be Promises to either a Promise of an object with resolved values,
|
|
125
|
+
* or an object with resolved values if all values are already resolved.
|
|
126
|
+
*/
|
|
127
|
+
promiseFromObjectOrSync<T>(values: {
|
|
128
|
+
[key: string]: T | Promise<T>;
|
|
129
|
+
}): Promise<{
|
|
130
|
+
[key: string]: T;
|
|
131
|
+
}> | {
|
|
132
|
+
[key: string]: T;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Maps a value or Promise of a value to another value or Promise of a value using the provided onfulfilled function.
|
|
136
|
+
*/
|
|
137
|
+
mapPromise<T, N>(value: T | Promise<T>, onfulfilled: (value: T) => N): N | Promise<N>;
|
|
138
|
+
/**
|
|
139
|
+
* Resolves a DIFValueContainer (either a DIFValue or a pointer address) to its corresponding JS value.
|
|
140
|
+
* If the container contains pointers that are not yet loaded in memory, it returns a Promise that resolves to the value.
|
|
141
|
+
* Otherwise, it returns the resolved value directly.
|
|
142
|
+
* @param value - The DIFValueContainer to resolve.
|
|
143
|
+
* @returns The resolved value as type T, or a Promise that resolves to type T.
|
|
144
|
+
*/
|
|
145
|
+
resolveDIFValueContainer<T extends unknown>(value: DIFValueContainer): T | Promise<T>;
|
|
146
|
+
/**
|
|
147
|
+
* Synchronous version of resolveDIFValueContainer.
|
|
148
|
+
* This method can only be used if the value only contains pointer addresses that are already loaded in memory -
|
|
149
|
+
* otherwise, use the asynchronous `resolveDIFValueContainer` method instead.
|
|
150
|
+
* @param value - The DIFValueContainer to resolve.
|
|
151
|
+
* @returns The resolved value as type T.
|
|
152
|
+
* @throws If the resolution would require asynchronous operations.
|
|
153
|
+
*/
|
|
154
|
+
resolveDIFValueContainerSync<T extends unknown>(value: DIFValueContainer): T;
|
|
155
|
+
/**
|
|
156
|
+
* Resolves a pointer address to its corresponding JS value.
|
|
157
|
+
* If the pointer address is not yet loaded in memory, it returns a Promise that resolves to the value.
|
|
158
|
+
* Otherwise, it returns the resolved value directly.
|
|
159
|
+
* @param address - The pointer address to resolve.
|
|
160
|
+
* @returns The resolved value as type T, or a Promise that resolves to type T.
|
|
161
|
+
*/
|
|
162
|
+
resolvePointerAddress<T extends unknown>(address: string): Promise<T> | T;
|
|
163
|
+
/**
|
|
164
|
+
* Resolves a pointer address to its corresponding JS value synchronously.
|
|
165
|
+
* If the pointer address is not yet loaded in memory, it returns a Promise that resolves to the value.
|
|
166
|
+
* Otherwise, it returns the resolved value directly.
|
|
167
|
+
* @param address - The pointer address to resolve.
|
|
168
|
+
* @returns The resolved value as type T, or a Promise that resolves to type T.
|
|
169
|
+
* @throws If the resolution would require asynchronous operations.
|
|
170
|
+
*/
|
|
171
|
+
resolvePointerAddressSync<T extends unknown>(address: string): T;
|
|
172
|
+
/**
|
|
173
|
+
* Converts an array of JS values to an array of DIFValues.
|
|
174
|
+
* If the input is null, it returns null.
|
|
175
|
+
* @param values
|
|
176
|
+
*/
|
|
177
|
+
convertToDIFValues<T extends unknown[]>(values: T | null): DIFValue[] | null;
|
|
178
|
+
/**
|
|
179
|
+
* Returns true if the given address is within the specified address range.
|
|
180
|
+
*/
|
|
181
|
+
protected isPointerAddressInAdresses(address: DIFPointerAddress, range: Set<string>): boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Initializes a pointer with the given value and mutability, by
|
|
184
|
+
* adding a proxy wrapper if necessary, and setting up observation and caching on the JS side.
|
|
185
|
+
*/
|
|
186
|
+
protected initPointer<T>(ptrAddress: string, value: T, mutability: DIFReferenceMutability, allowedType?: DIFTypeContainer | null): T | Ref<T>;
|
|
187
|
+
/**
|
|
188
|
+
* Handles a pointer update received from the DATEX core runtime.
|
|
189
|
+
* If the pointer is cached and has a dereferenceable value, it updates the value.
|
|
190
|
+
* @param address - The address of the pointer being updated.
|
|
191
|
+
* @param update - The DIFUpdateData containing the update information.
|
|
192
|
+
* @returns True if the pointer was found and updated, false otherwise.
|
|
193
|
+
*/
|
|
194
|
+
protected handlePointerUpdate(address: string, update: DIFUpdateData): boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Caches the given pointer value with the given address in the JS side cache.
|
|
197
|
+
* The pointer must already be wrapped if necessary.
|
|
198
|
+
*/
|
|
199
|
+
protected cacheWrappedPointerValue(address: string, value: WeakKey, observerId: number | null): void;
|
|
200
|
+
protected getCachedPointer(address: string): WeakKey | undefined;
|
|
201
|
+
/**
|
|
202
|
+
* Creates a new pointer containg the given JS value.
|
|
203
|
+
* The returned value is a proxy object that behaves like the original object,
|
|
204
|
+
* but also propagates changes between JS and the DATEX runtime.
|
|
205
|
+
*/
|
|
206
|
+
createPointerFromJSValue(value: unknown, allowedType?: DIFTypeContainer | null, mutability?: DIFReferenceMutability): unknown | Ref<unknown>;
|
|
207
|
+
protected wrapJSValueInProxy<T>(value: T, pointerAddress: string, _type?: DIFTypeContainer | null): (T | Ref<unknown>) & WeakKey;
|
|
208
|
+
private isRef;
|
|
209
|
+
private proxifyJSMap;
|
|
210
|
+
private wrapJSObjectInProxy;
|
|
211
|
+
getPointerAddressForValue<T>(value: T): string | null;
|
|
212
|
+
/**
|
|
213
|
+
* Converts a given JS value to its DIFValue representation.
|
|
214
|
+
*/
|
|
215
|
+
convertJSValueToDIFValue<T extends unknown>(value: T): DIFValue;
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=dif-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dif-handler.d.ts","sourceRoot":"","sources":["../../src/dif/dif-handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAErC,OAAO,EAIH,KAAK,YAAY,EAGjB,KAAK,iBAAiB,EAGtB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,aAAa,EAElB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACtB,MAAM,kBAAkB,CAAC;AAG1B,qBAAa,UAAU;;IAqBnB,IAAI,UAAU,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC,CAAC,CAEzE;IAED,IAAI,OAAO,IAAI,gBAAgB,CAE9B;IAED,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED;;;;OAIG;gBAEC,OAAO,EAAE,SAAS;IAMtB;;;;;;OAMG;IACI,UAAU,CACb,WAAW,EAAE,MAAM,EACnB,MAAM,GAAE,OAAO,EAAE,GAAG,IAAS,GAC9B,OAAO,CAAC,YAAY,CAAC;IAOxB;;;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