@superdurable/dex 0.2.1 → 0.2.3
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 +18 -1
- package/dist/src/client.d.ts +20 -0
- package/dist/src/client.js +53 -1
- package/dist/src/client.js.map +1 -1
- package/dist/src/context.d.ts +8 -0
- package/dist/src/flow.d.ts +5 -1
- package/dist/src/flow.js +32 -2
- package/dist/src/flow.js.map +1 -1
- package/dist/src/gen/dex.d.ts +55 -0
- package/dist/src/gen/dex.js +321 -0
- package/dist/src/gen/dex.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/invocation-context.d.ts +7 -2
- package/dist/src/invocation-context.js +40 -1
- package/dist/src/invocation-context.js.map +1 -1
- package/dist/src/persistence.d.ts +4 -1
- package/dist/src/persistence.js.map +1 -1
- package/dist/src/stream.d.ts +40 -0
- package/dist/src/stream.js +43 -0
- package/dist/src/stream.js.map +1 -0
- package/dist/src/worker-dispatcher.d.ts +3 -2
- package/dist/src/worker-dispatcher.js +7 -5
- package/dist/src/worker-dispatcher.js.map +1 -1
- package/dist/src/worker.js +1 -1
- package/dist/src/worker.js.map +1 -1
- package/native/linux-aarch64/dex_blob_cache_node.node +0 -0
- package/native/linux-x86_64/dex_blob_cache_node.node +0 -0
- package/native/macos-aarch64/dex_blob_cache_node.node +0 -0
- package/native/macos-x86_64/dex_blob_cache_node.node +0 -0
- package/native/windows-x86_64/dex_blob_cache_node.node +0 -0
- package/package.json +1 -1
package/dist/src/gen/dex.js
CHANGED
|
@@ -1871,6 +1871,309 @@ export const ChannelMessage = {
|
|
|
1871
1871
|
return message;
|
|
1872
1872
|
},
|
|
1873
1873
|
};
|
|
1874
|
+
function createBaseWriteStreamRequest() {
|
|
1875
|
+
return { flowId: "", flowType: "", streamName: "", streamCapacityBytes: 0n, value: undefined, idempotencyKey: "" };
|
|
1876
|
+
}
|
|
1877
|
+
export const WriteStreamRequest = {
|
|
1878
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1879
|
+
if (message.flowId !== "") {
|
|
1880
|
+
writer.uint32(10).string(message.flowId);
|
|
1881
|
+
}
|
|
1882
|
+
if (message.flowType !== "") {
|
|
1883
|
+
writer.uint32(18).string(message.flowType);
|
|
1884
|
+
}
|
|
1885
|
+
if (message.streamName !== "") {
|
|
1886
|
+
writer.uint32(26).string(message.streamName);
|
|
1887
|
+
}
|
|
1888
|
+
if (message.streamCapacityBytes !== 0n) {
|
|
1889
|
+
if (BigInt.asIntN(64, message.streamCapacityBytes) !== message.streamCapacityBytes) {
|
|
1890
|
+
throw new globalThis.Error("value provided for field message.streamCapacityBytes of type int64 too large");
|
|
1891
|
+
}
|
|
1892
|
+
writer.uint32(32).int64(message.streamCapacityBytes);
|
|
1893
|
+
}
|
|
1894
|
+
if (message.value !== undefined) {
|
|
1895
|
+
Value.encode(message.value, writer.uint32(42).fork()).join();
|
|
1896
|
+
}
|
|
1897
|
+
if (message.idempotencyKey !== "") {
|
|
1898
|
+
writer.uint32(50).string(message.idempotencyKey);
|
|
1899
|
+
}
|
|
1900
|
+
return writer;
|
|
1901
|
+
},
|
|
1902
|
+
decode(input, length) {
|
|
1903
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1904
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1905
|
+
const message = createBaseWriteStreamRequest();
|
|
1906
|
+
while (reader.pos < end) {
|
|
1907
|
+
const tag = reader.uint32();
|
|
1908
|
+
switch (tag >>> 3) {
|
|
1909
|
+
case 1: {
|
|
1910
|
+
if (tag !== 10) {
|
|
1911
|
+
break;
|
|
1912
|
+
}
|
|
1913
|
+
message.flowId = reader.string();
|
|
1914
|
+
continue;
|
|
1915
|
+
}
|
|
1916
|
+
case 2: {
|
|
1917
|
+
if (tag !== 18) {
|
|
1918
|
+
break;
|
|
1919
|
+
}
|
|
1920
|
+
message.flowType = reader.string();
|
|
1921
|
+
continue;
|
|
1922
|
+
}
|
|
1923
|
+
case 3: {
|
|
1924
|
+
if (tag !== 26) {
|
|
1925
|
+
break;
|
|
1926
|
+
}
|
|
1927
|
+
message.streamName = reader.string();
|
|
1928
|
+
continue;
|
|
1929
|
+
}
|
|
1930
|
+
case 4: {
|
|
1931
|
+
if (tag !== 32) {
|
|
1932
|
+
break;
|
|
1933
|
+
}
|
|
1934
|
+
message.streamCapacityBytes = reader.int64();
|
|
1935
|
+
continue;
|
|
1936
|
+
}
|
|
1937
|
+
case 5: {
|
|
1938
|
+
if (tag !== 42) {
|
|
1939
|
+
break;
|
|
1940
|
+
}
|
|
1941
|
+
message.value = Value.decode(reader, reader.uint32());
|
|
1942
|
+
continue;
|
|
1943
|
+
}
|
|
1944
|
+
case 6: {
|
|
1945
|
+
if (tag !== 50) {
|
|
1946
|
+
break;
|
|
1947
|
+
}
|
|
1948
|
+
message.idempotencyKey = reader.string();
|
|
1949
|
+
continue;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1953
|
+
break;
|
|
1954
|
+
}
|
|
1955
|
+
reader.skip(tag & 7);
|
|
1956
|
+
}
|
|
1957
|
+
return message;
|
|
1958
|
+
},
|
|
1959
|
+
create(base) {
|
|
1960
|
+
return WriteStreamRequest.fromPartial(base ?? {});
|
|
1961
|
+
},
|
|
1962
|
+
fromPartial(object) {
|
|
1963
|
+
const message = createBaseWriteStreamRequest();
|
|
1964
|
+
message.flowId = object.flowId ?? "";
|
|
1965
|
+
message.flowType = object.flowType ?? "";
|
|
1966
|
+
message.streamName = object.streamName ?? "";
|
|
1967
|
+
message.streamCapacityBytes = (object.streamCapacityBytes !== undefined && object.streamCapacityBytes !== null)
|
|
1968
|
+
? BigInt(object.streamCapacityBytes)
|
|
1969
|
+
: 0n;
|
|
1970
|
+
message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined;
|
|
1971
|
+
message.idempotencyKey = object.idempotencyKey ?? "";
|
|
1972
|
+
return message;
|
|
1973
|
+
},
|
|
1974
|
+
};
|
|
1975
|
+
function createBaseReadStreamRequest() {
|
|
1976
|
+
return { flowId: "", flowType: "", streamName: "", resumeToken: "", waitTimeSeconds: 0 };
|
|
1977
|
+
}
|
|
1978
|
+
export const ReadStreamRequest = {
|
|
1979
|
+
encode(message, writer = new BinaryWriter()) {
|
|
1980
|
+
if (message.flowId !== "") {
|
|
1981
|
+
writer.uint32(10).string(message.flowId);
|
|
1982
|
+
}
|
|
1983
|
+
if (message.flowType !== "") {
|
|
1984
|
+
writer.uint32(18).string(message.flowType);
|
|
1985
|
+
}
|
|
1986
|
+
if (message.streamName !== "") {
|
|
1987
|
+
writer.uint32(26).string(message.streamName);
|
|
1988
|
+
}
|
|
1989
|
+
if (message.resumeToken !== "") {
|
|
1990
|
+
writer.uint32(34).string(message.resumeToken);
|
|
1991
|
+
}
|
|
1992
|
+
if (message.waitTimeSeconds !== 0) {
|
|
1993
|
+
writer.uint32(40).int32(message.waitTimeSeconds);
|
|
1994
|
+
}
|
|
1995
|
+
return writer;
|
|
1996
|
+
},
|
|
1997
|
+
decode(input, length) {
|
|
1998
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1999
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2000
|
+
const message = createBaseReadStreamRequest();
|
|
2001
|
+
while (reader.pos < end) {
|
|
2002
|
+
const tag = reader.uint32();
|
|
2003
|
+
switch (tag >>> 3) {
|
|
2004
|
+
case 1: {
|
|
2005
|
+
if (tag !== 10) {
|
|
2006
|
+
break;
|
|
2007
|
+
}
|
|
2008
|
+
message.flowId = reader.string();
|
|
2009
|
+
continue;
|
|
2010
|
+
}
|
|
2011
|
+
case 2: {
|
|
2012
|
+
if (tag !== 18) {
|
|
2013
|
+
break;
|
|
2014
|
+
}
|
|
2015
|
+
message.flowType = reader.string();
|
|
2016
|
+
continue;
|
|
2017
|
+
}
|
|
2018
|
+
case 3: {
|
|
2019
|
+
if (tag !== 26) {
|
|
2020
|
+
break;
|
|
2021
|
+
}
|
|
2022
|
+
message.streamName = reader.string();
|
|
2023
|
+
continue;
|
|
2024
|
+
}
|
|
2025
|
+
case 4: {
|
|
2026
|
+
if (tag !== 34) {
|
|
2027
|
+
break;
|
|
2028
|
+
}
|
|
2029
|
+
message.resumeToken = reader.string();
|
|
2030
|
+
continue;
|
|
2031
|
+
}
|
|
2032
|
+
case 5: {
|
|
2033
|
+
if (tag !== 40) {
|
|
2034
|
+
break;
|
|
2035
|
+
}
|
|
2036
|
+
message.waitTimeSeconds = reader.int32();
|
|
2037
|
+
continue;
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2041
|
+
break;
|
|
2042
|
+
}
|
|
2043
|
+
reader.skip(tag & 7);
|
|
2044
|
+
}
|
|
2045
|
+
return message;
|
|
2046
|
+
},
|
|
2047
|
+
create(base) {
|
|
2048
|
+
return ReadStreamRequest.fromPartial(base ?? {});
|
|
2049
|
+
},
|
|
2050
|
+
fromPartial(object) {
|
|
2051
|
+
const message = createBaseReadStreamRequest();
|
|
2052
|
+
message.flowId = object.flowId ?? "";
|
|
2053
|
+
message.flowType = object.flowType ?? "";
|
|
2054
|
+
message.streamName = object.streamName ?? "";
|
|
2055
|
+
message.resumeToken = object.resumeToken ?? "";
|
|
2056
|
+
message.waitTimeSeconds = object.waitTimeSeconds ?? 0;
|
|
2057
|
+
return message;
|
|
2058
|
+
},
|
|
2059
|
+
};
|
|
2060
|
+
function createBaseReadStreamResponse() {
|
|
2061
|
+
return { message: undefined };
|
|
2062
|
+
}
|
|
2063
|
+
export const ReadStreamResponse = {
|
|
2064
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2065
|
+
if (message.message !== undefined) {
|
|
2066
|
+
StreamMessage.encode(message.message, writer.uint32(10).fork()).join();
|
|
2067
|
+
}
|
|
2068
|
+
return writer;
|
|
2069
|
+
},
|
|
2070
|
+
decode(input, length) {
|
|
2071
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2072
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2073
|
+
const message = createBaseReadStreamResponse();
|
|
2074
|
+
while (reader.pos < end) {
|
|
2075
|
+
const tag = reader.uint32();
|
|
2076
|
+
switch (tag >>> 3) {
|
|
2077
|
+
case 1: {
|
|
2078
|
+
if (tag !== 10) {
|
|
2079
|
+
break;
|
|
2080
|
+
}
|
|
2081
|
+
message.message = StreamMessage.decode(reader, reader.uint32());
|
|
2082
|
+
continue;
|
|
2083
|
+
}
|
|
2084
|
+
}
|
|
2085
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2086
|
+
break;
|
|
2087
|
+
}
|
|
2088
|
+
reader.skip(tag & 7);
|
|
2089
|
+
}
|
|
2090
|
+
return message;
|
|
2091
|
+
},
|
|
2092
|
+
create(base) {
|
|
2093
|
+
return ReadStreamResponse.fromPartial(base ?? {});
|
|
2094
|
+
},
|
|
2095
|
+
fromPartial(object) {
|
|
2096
|
+
const message = createBaseReadStreamResponse();
|
|
2097
|
+
message.message = (object.message !== undefined && object.message !== null)
|
|
2098
|
+
? StreamMessage.fromPartial(object.message)
|
|
2099
|
+
: undefined;
|
|
2100
|
+
return message;
|
|
2101
|
+
},
|
|
2102
|
+
};
|
|
2103
|
+
function createBaseStreamMessage() {
|
|
2104
|
+
return { value: undefined, resumeToken: "", createdTime: undefined, idempotencyKey: "" };
|
|
2105
|
+
}
|
|
2106
|
+
export const StreamMessage = {
|
|
2107
|
+
encode(message, writer = new BinaryWriter()) {
|
|
2108
|
+
if (message.value !== undefined) {
|
|
2109
|
+
Value.encode(message.value, writer.uint32(10).fork()).join();
|
|
2110
|
+
}
|
|
2111
|
+
if (message.resumeToken !== "") {
|
|
2112
|
+
writer.uint32(18).string(message.resumeToken);
|
|
2113
|
+
}
|
|
2114
|
+
if (message.createdTime !== undefined) {
|
|
2115
|
+
Timestamp.encode(toTimestamp(message.createdTime), writer.uint32(26).fork()).join();
|
|
2116
|
+
}
|
|
2117
|
+
if (message.idempotencyKey !== "") {
|
|
2118
|
+
writer.uint32(34).string(message.idempotencyKey);
|
|
2119
|
+
}
|
|
2120
|
+
return writer;
|
|
2121
|
+
},
|
|
2122
|
+
decode(input, length) {
|
|
2123
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2124
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2125
|
+
const message = createBaseStreamMessage();
|
|
2126
|
+
while (reader.pos < end) {
|
|
2127
|
+
const tag = reader.uint32();
|
|
2128
|
+
switch (tag >>> 3) {
|
|
2129
|
+
case 1: {
|
|
2130
|
+
if (tag !== 10) {
|
|
2131
|
+
break;
|
|
2132
|
+
}
|
|
2133
|
+
message.value = Value.decode(reader, reader.uint32());
|
|
2134
|
+
continue;
|
|
2135
|
+
}
|
|
2136
|
+
case 2: {
|
|
2137
|
+
if (tag !== 18) {
|
|
2138
|
+
break;
|
|
2139
|
+
}
|
|
2140
|
+
message.resumeToken = reader.string();
|
|
2141
|
+
continue;
|
|
2142
|
+
}
|
|
2143
|
+
case 3: {
|
|
2144
|
+
if (tag !== 26) {
|
|
2145
|
+
break;
|
|
2146
|
+
}
|
|
2147
|
+
message.createdTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
2148
|
+
continue;
|
|
2149
|
+
}
|
|
2150
|
+
case 4: {
|
|
2151
|
+
if (tag !== 34) {
|
|
2152
|
+
break;
|
|
2153
|
+
}
|
|
2154
|
+
message.idempotencyKey = reader.string();
|
|
2155
|
+
continue;
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
2159
|
+
break;
|
|
2160
|
+
}
|
|
2161
|
+
reader.skip(tag & 7);
|
|
2162
|
+
}
|
|
2163
|
+
return message;
|
|
2164
|
+
},
|
|
2165
|
+
create(base) {
|
|
2166
|
+
return StreamMessage.fromPartial(base ?? {});
|
|
2167
|
+
},
|
|
2168
|
+
fromPartial(object) {
|
|
2169
|
+
const message = createBaseStreamMessage();
|
|
2170
|
+
message.value = (object.value !== undefined && object.value !== null) ? Value.fromPartial(object.value) : undefined;
|
|
2171
|
+
message.resumeToken = object.resumeToken ?? "";
|
|
2172
|
+
message.createdTime = object.createdTime ?? undefined;
|
|
2173
|
+
message.idempotencyKey = object.idempotencyKey ?? "";
|
|
2174
|
+
return message;
|
|
2175
|
+
},
|
|
2176
|
+
};
|
|
1874
2177
|
function createBaseStopFlowRequest() {
|
|
1875
2178
|
return { flowId: "", runId: "", reason: "", stopType: 0 };
|
|
1876
2179
|
}
|
|
@@ -12232,6 +12535,24 @@ export const FlowServiceService = {
|
|
|
12232
12535
|
responseSerialize: (value) => Buffer.from(Empty.encode(value).finish()),
|
|
12233
12536
|
responseDeserialize: (value) => Empty.decode(value),
|
|
12234
12537
|
},
|
|
12538
|
+
writeStream: {
|
|
12539
|
+
path: "/dex.FlowService/WriteStream",
|
|
12540
|
+
requestStream: false,
|
|
12541
|
+
responseStream: false,
|
|
12542
|
+
requestSerialize: (value) => Buffer.from(WriteStreamRequest.encode(value).finish()),
|
|
12543
|
+
requestDeserialize: (value) => WriteStreamRequest.decode(value),
|
|
12544
|
+
responseSerialize: (value) => Buffer.from(Empty.encode(value).finish()),
|
|
12545
|
+
responseDeserialize: (value) => Empty.decode(value),
|
|
12546
|
+
},
|
|
12547
|
+
readStream: {
|
|
12548
|
+
path: "/dex.FlowService/ReadStream",
|
|
12549
|
+
requestStream: false,
|
|
12550
|
+
responseStream: false,
|
|
12551
|
+
requestSerialize: (value) => Buffer.from(ReadStreamRequest.encode(value).finish()),
|
|
12552
|
+
requestDeserialize: (value) => ReadStreamRequest.decode(value),
|
|
12553
|
+
responseSerialize: (value) => Buffer.from(ReadStreamResponse.encode(value).finish()),
|
|
12554
|
+
responseDeserialize: (value) => ReadStreamResponse.decode(value),
|
|
12555
|
+
},
|
|
12235
12556
|
stopFlow: {
|
|
12236
12557
|
path: "/dex.FlowService/StopFlow",
|
|
12237
12558
|
requestStream: false,
|