@plexspaces/sdk 0.1.9 → 0.1.11
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/dist/host.d.ts +68 -8
- package/dist/host.js +295 -20
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/shard_types.d.ts +76 -0
- package/dist/shard_types.js +5 -0
- package/dist/wire/shard-group-proto-wire.d.ts +12 -0
- package/dist/wire/shard-group-proto-wire.js +533 -36
- package/dist/wire/tuplespace-proto-wire.d.ts +1 -1
- package/dist/wire/tuplespace-proto-wire.js +6 -6
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Build WriteRequest protobuf bytes (field
|
|
1
|
+
/** Build WriteRequest protobuf bytes (field 2: tuple with repeated TupleField). */
|
|
2
2
|
export declare function encodeWriteRequest(tuple: unknown[]): Uint8Array;
|
|
3
3
|
/** Build ReadRequest protobuf bytes. */
|
|
4
4
|
export declare function encodeReadRequest(pattern: unknown[], take: boolean, maxResults: number): Uint8Array;
|
|
@@ -63,19 +63,19 @@ function encodeTupleFields(tuple, allowWildcardStar) {
|
|
|
63
63
|
}
|
|
64
64
|
return out;
|
|
65
65
|
}
|
|
66
|
-
/** Build WriteRequest protobuf bytes (field
|
|
66
|
+
/** Build WriteRequest protobuf bytes (field 2: tuple with repeated TupleField). */
|
|
67
67
|
export function encodeWriteRequest(tuple) {
|
|
68
68
|
const tupleBody = encodeTupleFields(tuple, false);
|
|
69
|
-
return appendLengthDelimited(new Uint8Array(0),
|
|
69
|
+
return appendLengthDelimited(new Uint8Array(0), 2, tupleBody);
|
|
70
70
|
}
|
|
71
71
|
/** Build ReadRequest protobuf bytes. */
|
|
72
72
|
export function encodeReadRequest(pattern, take, maxResults) {
|
|
73
73
|
const templateBody = encodeTupleFields(pattern, true);
|
|
74
|
-
let out = appendLengthDelimited(new Uint8Array(0),
|
|
74
|
+
let out = appendLengthDelimited(new Uint8Array(0), 2, templateBody);
|
|
75
75
|
if (take) {
|
|
76
|
-
out = concatBytes(out, new Uint8Array([
|
|
76
|
+
out = concatBytes(out, new Uint8Array([0x28, 0x01]));
|
|
77
77
|
}
|
|
78
|
-
out = concatBytes(out, new Uint8Array([
|
|
78
|
+
out = concatBytes(out, new Uint8Array([0x30]));
|
|
79
79
|
out = appendVarint(out, maxResults >>> 0);
|
|
80
80
|
return out;
|
|
81
81
|
}
|
|
@@ -147,7 +147,7 @@ export function parseReadResponseTuples(data) {
|
|
|
147
147
|
pos += tn;
|
|
148
148
|
const fn = Number(tag >> 3n);
|
|
149
149
|
const wt = Number(tag & 7n);
|
|
150
|
-
if (fn ===
|
|
150
|
+
if (fn === 2 && wt === 2) {
|
|
151
151
|
const { slice, nextPos } = readLengthDelimited(data, pos);
|
|
152
152
|
pos = nextPos;
|
|
153
153
|
tuples.push(parseTupleMsg(slice));
|