mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 23:34:47 -05:00
use flatbuffer create functions to add fields (#2046)
This commit is contained in:
parent
86aee7f137
commit
3452a10840
26 changed files with 98 additions and 197 deletions
|
@ -9,10 +9,7 @@ function req(
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const path_ = builder.createString(path);
|
const path_ = builder.createString(path);
|
||||||
msg.Chmod.startChmod(builder);
|
const inner = msg.Chmod.createChmod(builder, path_, mode);
|
||||||
msg.Chmod.addPath(builder, path_);
|
|
||||||
msg.Chmod.addMode(builder, mode);
|
|
||||||
const inner = msg.Chmod.endChmod(builder);
|
|
||||||
return [builder, msg.Any.Chmod, inner];
|
return [builder, msg.Any.Chmod, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,7 @@ function req(
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const from_ = builder.createString(from);
|
const from_ = builder.createString(from);
|
||||||
const to_ = builder.createString(to);
|
const to_ = builder.createString(to);
|
||||||
msg.CopyFile.startCopyFile(builder);
|
const inner = msg.CopyFile.createCopyFile(builder, from_, to_);
|
||||||
msg.CopyFile.addFrom(builder, from_);
|
|
||||||
msg.CopyFile.addTo(builder, to_);
|
|
||||||
const inner = msg.CopyFile.endCopyFile(builder);
|
|
||||||
return [builder, msg.Any.CopyFile, inner];
|
return [builder, msg.Any.CopyFile, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@ export function cwd(): string {
|
||||||
export function chdir(directory: string): void {
|
export function chdir(directory: string): void {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const directory_ = builder.createString(directory);
|
const directory_ = builder.createString(directory);
|
||||||
msg.Chdir.startChdir(builder);
|
const inner = msg.Chdir.createChdir(builder, directory_);
|
||||||
msg.Chdir.addDirectory(builder, directory_);
|
|
||||||
const inner = msg.Chdir.endChdir(builder);
|
|
||||||
sendSync(builder, msg.Any.Chdir, inner);
|
sendSync(builder, msg.Any.Chdir, inner);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,12 +31,16 @@ function sendInternal(
|
||||||
sync = true
|
sync = true
|
||||||
): [number, null | Uint8Array] {
|
): [number, null | Uint8Array] {
|
||||||
const cmdId = nextCmdId++;
|
const cmdId = nextCmdId++;
|
||||||
msg.Base.startBase(builder);
|
const message = msg.Base.createBase(
|
||||||
msg.Base.addInner(builder, inner);
|
builder,
|
||||||
msg.Base.addInnerType(builder, innerType);
|
cmdId,
|
||||||
msg.Base.addSync(builder, sync);
|
sync,
|
||||||
msg.Base.addCmdId(builder, cmdId);
|
0,
|
||||||
builder.finish(msg.Base.endBase(builder));
|
0,
|
||||||
|
innerType,
|
||||||
|
inner
|
||||||
|
);
|
||||||
|
builder.finish(message);
|
||||||
|
|
||||||
const control = builder.asUint8Array();
|
const control = builder.asUint8Array();
|
||||||
const response = core.dispatch(control, zeroCopy);
|
const response = core.dispatch(control, zeroCopy);
|
||||||
|
|
33
js/fetch.ts
33
js/fetch.ts
|
@ -308,32 +308,29 @@ function msgHttpRequest(
|
||||||
method: null | string,
|
method: null | string,
|
||||||
headers: null | domTypes.Headers
|
headers: null | domTypes.Headers
|
||||||
): flatbuffers.Offset {
|
): flatbuffers.Offset {
|
||||||
const methodOffset = !method ? -1 : builder.createString(method);
|
const methodOffset = !method ? 0 : builder.createString(method);
|
||||||
let fieldsOffset: flatbuffers.Offset = -1;
|
let fieldsOffset: flatbuffers.Offset = 0;
|
||||||
const urlOffset = builder.createString(url);
|
const urlOffset = builder.createString(url);
|
||||||
if (headers) {
|
if (headers) {
|
||||||
const kvOffsets: flatbuffers.Offset[] = [];
|
const kvOffsets: flatbuffers.Offset[] = [];
|
||||||
for (const [key, val] of headers.entries()) {
|
for (const [key, val] of headers.entries()) {
|
||||||
const keyOffset = builder.createString(key);
|
const keyOffset = builder.createString(key);
|
||||||
const valOffset = builder.createString(val);
|
const valOffset = builder.createString(val);
|
||||||
msg.KeyValue.startKeyValue(builder);
|
kvOffsets.push(
|
||||||
msg.KeyValue.addKey(builder, keyOffset);
|
msg.KeyValue.createKeyValue(builder, keyOffset, valOffset)
|
||||||
msg.KeyValue.addValue(builder, valOffset);
|
);
|
||||||
kvOffsets.push(msg.KeyValue.endKeyValue(builder));
|
|
||||||
}
|
}
|
||||||
fieldsOffset = msg.HttpHeader.createFieldsVector(builder, kvOffsets);
|
fieldsOffset = msg.HttpHeader.createFieldsVector(builder, kvOffsets);
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
msg.HttpHeader.startHttpHeader(builder);
|
return msg.HttpHeader.createHttpHeader(
|
||||||
msg.HttpHeader.addIsRequest(builder, true);
|
builder,
|
||||||
msg.HttpHeader.addUrl(builder, urlOffset);
|
true,
|
||||||
if (methodOffset >= 0) {
|
methodOffset,
|
||||||
msg.HttpHeader.addMethod(builder, methodOffset);
|
urlOffset,
|
||||||
}
|
0,
|
||||||
if (fieldsOffset >= 0) {
|
fieldsOffset
|
||||||
msg.HttpHeader.addFields(builder, fieldsOffset);
|
);
|
||||||
}
|
|
||||||
return msg.HttpHeader.endHttpHeader(builder);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function deserializeHeaderFields(m: msg.HttpHeader): Array<[string, string]> {
|
function deserializeHeaderFields(m: msg.HttpHeader): Array<[string, string]> {
|
||||||
|
@ -405,12 +402,10 @@ export async function fetch(
|
||||||
// Send Fetch message
|
// Send Fetch message
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const headerOff = msgHttpRequest(builder, url, method, headers);
|
const headerOff = msgHttpRequest(builder, url, method, headers);
|
||||||
msg.Fetch.startFetch(builder);
|
|
||||||
msg.Fetch.addHeader(builder, headerOff);
|
|
||||||
const resBase = await sendAsync(
|
const resBase = await sendAsync(
|
||||||
builder,
|
builder,
|
||||||
msg.Any.Fetch,
|
msg.Any.Fetch,
|
||||||
msg.Fetch.endFetch(builder),
|
msg.Fetch.createFetch(builder, headerOff),
|
||||||
body
|
body
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
23
js/files.ts
23
js/files.ts
|
@ -22,10 +22,7 @@ function reqOpen(
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const filename_ = builder.createString(filename);
|
const filename_ = builder.createString(filename);
|
||||||
const mode_ = builder.createString(mode);
|
const mode_ = builder.createString(mode);
|
||||||
msg.Open.startOpen(builder);
|
const inner = msg.Open.createOpen(builder, filename_, 0, mode_);
|
||||||
msg.Open.addFilename(builder, filename_);
|
|
||||||
msg.Open.addMode(builder, mode_);
|
|
||||||
const inner = msg.Open.endOpen(builder);
|
|
||||||
return [builder, msg.Any.Open, inner];
|
return [builder, msg.Any.Open, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,9 +63,7 @@ function reqRead(
|
||||||
p: Uint8Array
|
p: Uint8Array
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset, Uint8Array] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset, Uint8Array] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Read.startRead(builder);
|
const inner = msg.Read.createRead(builder, rid);
|
||||||
msg.Read.addRid(builder, rid);
|
|
||||||
const inner = msg.Read.endRead(builder);
|
|
||||||
return [builder, msg.Any.Read, inner, p];
|
return [builder, msg.Any.Read, inner, p];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,9 +109,7 @@ function reqWrite(
|
||||||
p: Uint8Array
|
p: Uint8Array
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset, Uint8Array] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset, Uint8Array] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Write.startWrite(builder);
|
const inner = msg.Write.createWrite(builder, rid);
|
||||||
msg.Write.addRid(builder, rid);
|
|
||||||
const inner = msg.Write.endWrite(builder);
|
|
||||||
return [builder, msg.Any.Write, inner, p];
|
return [builder, msg.Any.Write, inner, p];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,11 +156,7 @@ function reqSeek(
|
||||||
whence: SeekMode
|
whence: SeekMode
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Seek.startSeek(builder);
|
const inner = msg.Seek.createSeek(builder, rid, offset, whence);
|
||||||
msg.Seek.addRid(builder, rid);
|
|
||||||
msg.Seek.addOffset(builder, offset);
|
|
||||||
msg.Seek.addWhence(builder, whence);
|
|
||||||
const inner = msg.Seek.endSeek(builder);
|
|
||||||
return [builder, msg.Any.Seek, inner];
|
return [builder, msg.Any.Seek, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -198,9 +187,7 @@ export async function seek(
|
||||||
/** Close the file ID. */
|
/** Close the file ID. */
|
||||||
export function close(rid: number): void {
|
export function close(rid: number): void {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Close.startClose(builder);
|
const inner = msg.Close.createClose(builder, rid);
|
||||||
msg.Close.addRid(builder, rid);
|
|
||||||
const inner = msg.Close.endClose(builder);
|
|
||||||
dispatch.sendSync(builder, msg.Any.Close, inner);
|
dispatch.sendSync(builder, msg.Any.Close, inner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,7 @@ import { assert } from "./util";
|
||||||
export function formatError(errString: string): string {
|
export function formatError(errString: string): string {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const errString_ = builder.createString(errString);
|
const errString_ = builder.createString(errString);
|
||||||
msg.FormatError.startFormatError(builder);
|
const offset = msg.FormatError.createFormatError(builder, errString_);
|
||||||
msg.FormatError.addError(builder, errString_);
|
|
||||||
const offset = msg.FormatError.endFormatError(builder);
|
|
||||||
const baseRes = sendSync(builder, msg.Any.FormatError, offset);
|
const baseRes = sendSync(builder, msg.Any.FormatError, offset);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(msg.Any.FormatErrorRes === baseRes!.innerType());
|
assert(msg.Any.FormatErrorRes === baseRes!.innerType());
|
||||||
|
|
|
@ -16,20 +16,15 @@ function req({
|
||||||
suffix
|
suffix
|
||||||
}: MakeTempDirOptions): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
}: MakeTempDirOptions): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const fbDir = dir == null ? -1 : builder.createString(dir);
|
const fbDir = dir == null ? 0 : builder.createString(dir);
|
||||||
const fbPrefix = prefix == null ? -1 : builder.createString(prefix);
|
const fbPrefix = prefix == null ? 0 : builder.createString(prefix);
|
||||||
const fbSuffix = suffix == null ? -1 : builder.createString(suffix);
|
const fbSuffix = suffix == null ? 0 : builder.createString(suffix);
|
||||||
msg.MakeTempDir.startMakeTempDir(builder);
|
const inner = msg.MakeTempDir.createMakeTempDir(
|
||||||
if (dir != null) {
|
builder,
|
||||||
msg.MakeTempDir.addDir(builder, fbDir);
|
fbDir,
|
||||||
}
|
fbPrefix,
|
||||||
if (prefix != null) {
|
fbSuffix
|
||||||
msg.MakeTempDir.addPrefix(builder, fbPrefix);
|
);
|
||||||
}
|
|
||||||
if (suffix != null) {
|
|
||||||
msg.MakeTempDir.addSuffix(builder, fbSuffix);
|
|
||||||
}
|
|
||||||
const inner = msg.MakeTempDir.endMakeTempDir(builder);
|
|
||||||
return [builder, msg.Any.MakeTempDir, inner];
|
return [builder, msg.Any.MakeTempDir, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,7 @@ export interface Metrics {
|
||||||
|
|
||||||
function req(): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
function req(): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Metrics.startMetrics(builder);
|
const inner = msg.Metrics.createMetrics(builder);
|
||||||
const inner = msg.Metrics.endMetrics(builder);
|
|
||||||
return [builder, msg.Any.Metrics, inner];
|
return [builder, msg.Any.Metrics, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,7 @@ function req(
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const path_ = builder.createString(path);
|
const path_ = builder.createString(path);
|
||||||
msg.Mkdir.startMkdir(builder);
|
const inner = msg.Mkdir.createMkdir(builder, path_, recursive, mode);
|
||||||
msg.Mkdir.addPath(builder, path_);
|
|
||||||
msg.Mkdir.addRecursive(builder, recursive);
|
|
||||||
msg.Mkdir.addMode(builder, mode);
|
|
||||||
const inner = msg.Mkdir.endMkdir(builder);
|
|
||||||
return [builder, msg.Any.Mkdir, inner];
|
return [builder, msg.Any.Mkdir, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
19
js/net.ts
19
js/net.ts
|
@ -37,10 +37,7 @@ enum ShutdownMode {
|
||||||
|
|
||||||
function shutdown(rid: number, how: ShutdownMode): void {
|
function shutdown(rid: number, how: ShutdownMode): void {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Shutdown.startShutdown(builder);
|
const inner = msg.Shutdown.createShutdown(builder, rid, how);
|
||||||
msg.Shutdown.addRid(builder, rid);
|
|
||||||
msg.Shutdown.addHow(builder, how);
|
|
||||||
const inner = msg.Shutdown.endShutdown(builder);
|
|
||||||
const baseRes = dispatch.sendSync(builder, msg.Any.Shutdown, inner);
|
const baseRes = dispatch.sendSync(builder, msg.Any.Shutdown, inner);
|
||||||
assert(baseRes == null);
|
assert(baseRes == null);
|
||||||
}
|
}
|
||||||
|
@ -84,9 +81,7 @@ class ListenerImpl implements Listener {
|
||||||
|
|
||||||
async accept(): Promise<Conn> {
|
async accept(): Promise<Conn> {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Accept.startAccept(builder);
|
const inner = msg.Accept.createAccept(builder, this.rid);
|
||||||
msg.Accept.addRid(builder, this.rid);
|
|
||||||
const inner = msg.Accept.endAccept(builder);
|
|
||||||
const baseRes = await dispatch.sendAsync(builder, msg.Any.Accept, inner);
|
const baseRes = await dispatch.sendAsync(builder, msg.Any.Accept, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(msg.Any.NewConn === baseRes!.innerType());
|
assert(msg.Any.NewConn === baseRes!.innerType());
|
||||||
|
@ -140,10 +135,7 @@ export function listen(network: Network, address: string): Listener {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const network_ = builder.createString(network);
|
const network_ = builder.createString(network);
|
||||||
const address_ = builder.createString(address);
|
const address_ = builder.createString(address);
|
||||||
msg.Listen.startListen(builder);
|
const inner = msg.Listen.createListen(builder, network_, address_);
|
||||||
msg.Listen.addNetwork(builder, network_);
|
|
||||||
msg.Listen.addAddress(builder, address_);
|
|
||||||
const inner = msg.Listen.endListen(builder);
|
|
||||||
const baseRes = dispatch.sendSync(builder, msg.Any.Listen, inner);
|
const baseRes = dispatch.sendSync(builder, msg.Any.Listen, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(msg.Any.ListenRes === baseRes!.innerType());
|
assert(msg.Any.ListenRes === baseRes!.innerType());
|
||||||
|
@ -183,10 +175,7 @@ export async function dial(network: Network, address: string): Promise<Conn> {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const network_ = builder.createString(network);
|
const network_ = builder.createString(network);
|
||||||
const address_ = builder.createString(address);
|
const address_ = builder.createString(address);
|
||||||
msg.Dial.startDial(builder);
|
const inner = msg.Dial.createDial(builder, network_, address_);
|
||||||
msg.Dial.addNetwork(builder, network_);
|
|
||||||
msg.Dial.addAddress(builder, address_);
|
|
||||||
const inner = msg.Dial.endDial(builder);
|
|
||||||
const baseRes = await dispatch.sendAsync(builder, msg.Any.Dial, inner);
|
const baseRes = await dispatch.sendAsync(builder, msg.Any.Dial, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(msg.Any.NewConn === baseRes!.innerType());
|
assert(msg.Any.NewConn === baseRes!.innerType());
|
||||||
|
|
31
js/os.ts
31
js/os.ts
|
@ -36,8 +36,7 @@ interface ResponseModuleMetaData {
|
||||||
*/
|
*/
|
||||||
export function isTTY(): { stdin: boolean; stdout: boolean; stderr: boolean } {
|
export function isTTY(): { stdin: boolean; stdout: boolean; stderr: boolean } {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.IsTTY.startIsTTY(builder);
|
const inner = msg.IsTTY.createIsTTY(builder);
|
||||||
const inner = msg.IsTTY.endIsTTY(builder);
|
|
||||||
const baseRes = sendSync(builder, msg.Any.IsTTY, inner)!;
|
const baseRes = sendSync(builder, msg.Any.IsTTY, inner)!;
|
||||||
assert(msg.Any.IsTTYRes === baseRes.innerType());
|
assert(msg.Any.IsTTYRes === baseRes.innerType());
|
||||||
const res = new msg.IsTTYRes();
|
const res = new msg.IsTTYRes();
|
||||||
|
@ -49,9 +48,7 @@ export function isTTY(): { stdin: boolean; stdout: boolean; stderr: boolean } {
|
||||||
/** Exit the Deno process with optional exit code. */
|
/** Exit the Deno process with optional exit code. */
|
||||||
export function exit(exitCode = 0): never {
|
export function exit(exitCode = 0): never {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Exit.startExit(builder);
|
const inner = msg.Exit.createExit(builder, exitCode);
|
||||||
msg.Exit.addCode(builder, exitCode);
|
|
||||||
const inner = msg.Exit.endExit(builder);
|
|
||||||
sendSync(builder, msg.Any.Exit, inner);
|
sendSync(builder, msg.Any.Exit, inner);
|
||||||
return util.unreachable();
|
return util.unreachable();
|
||||||
}
|
}
|
||||||
|
@ -68,10 +65,11 @@ export function fetchModuleMetaData(
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const specifier_ = builder.createString(specifier);
|
const specifier_ = builder.createString(specifier);
|
||||||
const referrer_ = builder.createString(referrer);
|
const referrer_ = builder.createString(referrer);
|
||||||
msg.FetchModuleMetaData.startFetchModuleMetaData(builder);
|
const inner = msg.FetchModuleMetaData.createFetchModuleMetaData(
|
||||||
msg.FetchModuleMetaData.addSpecifier(builder, specifier_);
|
builder,
|
||||||
msg.FetchModuleMetaData.addReferrer(builder, referrer_);
|
specifier_,
|
||||||
const inner = msg.FetchModuleMetaData.endFetchModuleMetaData(builder);
|
referrer_
|
||||||
|
);
|
||||||
const baseRes = sendSync(builder, msg.Any.FetchModuleMetaData, inner);
|
const baseRes = sendSync(builder, msg.Any.FetchModuleMetaData, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(
|
assert(
|
||||||
|
@ -94,12 +92,9 @@ export function fetchModuleMetaData(
|
||||||
|
|
||||||
function setEnv(key: string, value: string): void {
|
function setEnv(key: string, value: string): void {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const _key = builder.createString(key);
|
const key_ = builder.createString(key);
|
||||||
const _value = builder.createString(value);
|
const value_ = builder.createString(value);
|
||||||
msg.SetEnv.startSetEnv(builder);
|
const inner = msg.SetEnv.createSetEnv(builder, key_, value_);
|
||||||
msg.SetEnv.addKey(builder, _key);
|
|
||||||
msg.SetEnv.addValue(builder, _value);
|
|
||||||
const inner = msg.SetEnv.endSetEnv(builder);
|
|
||||||
sendSync(builder, msg.Any.SetEnv, inner);
|
sendSync(builder, msg.Any.SetEnv, inner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,8 +132,7 @@ export function env(): { [index: string]: string } {
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Environ.startEnviron(builder);
|
const inner = msg.Environ.createEnviron(builder);
|
||||||
const inner = msg.Environ.endEnviron(builder);
|
|
||||||
const baseRes = sendSync(builder, msg.Any.Environ, inner)!;
|
const baseRes = sendSync(builder, msg.Any.Environ, inner)!;
|
||||||
assert(msg.Any.EnvironRes === baseRes.innerType());
|
assert(msg.Any.EnvironRes === baseRes.innerType());
|
||||||
const res = new msg.EnvironRes();
|
const res = new msg.EnvironRes();
|
||||||
|
@ -150,8 +144,7 @@ export function env(): { [index: string]: string } {
|
||||||
/** Send to the privileged side that we have setup and are ready. */
|
/** Send to the privileged side that we have setup and are ready. */
|
||||||
function sendStart(): msg.StartRes {
|
function sendStart(): msg.StartRes {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Start.startStart(builder);
|
const startOffset = msg.Start.createStart(builder, 0 /* unused */);
|
||||||
const startOffset = msg.Start.endStart(builder);
|
|
||||||
const baseRes = sendSync(builder, msg.Any.Start, startOffset);
|
const baseRes = sendSync(builder, msg.Any.Start, startOffset);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(msg.Any.StartRes === baseRes!.innerType());
|
assert(msg.Any.StartRes === baseRes!.innerType());
|
||||||
|
|
|
@ -18,8 +18,7 @@ export class Performance {
|
||||||
*/
|
*/
|
||||||
now(): number {
|
now(): number {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Now.startNow(builder);
|
const inner = msg.Now.createNow(builder);
|
||||||
const inner = msg.Now.endNow(builder);
|
|
||||||
const baseRes = sendSync(builder, msg.Any.Now, inner)!;
|
const baseRes = sendSync(builder, msg.Any.Now, inner)!;
|
||||||
assert(msg.Any.NowRes === baseRes.innerType());
|
assert(msg.Any.NowRes === baseRes.innerType());
|
||||||
const res = new msg.NowRes();
|
const res = new msg.NowRes();
|
||||||
|
|
|
@ -19,8 +19,7 @@ export type Permission = keyof Permissions;
|
||||||
|
|
||||||
function getReq(): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
function getReq(): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Permissions.startPermissions(builder);
|
const inner = msg.Permissions.createPermissions(builder);
|
||||||
const inner = msg.Permissions.endPermissions(builder);
|
|
||||||
return [builder, msg.Any.Permissions, inner];
|
return [builder, msg.Any.Permissions, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,9 +54,10 @@ function revokeReq(
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const permission_ = builder.createString(permission);
|
const permission_ = builder.createString(permission);
|
||||||
msg.PermissionRevoke.startPermissionRevoke(builder);
|
const inner = msg.PermissionRevoke.createPermissionRevoke(
|
||||||
msg.PermissionRevoke.addPermission(builder, permission_);
|
builder,
|
||||||
const inner = msg.PermissionRevoke.endPermissionRevoke(builder);
|
permission_
|
||||||
|
);
|
||||||
return [builder, msg.Any.PermissionRevoke, inner];
|
return [builder, msg.Any.PermissionRevoke, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,7 @@ export interface RunOptions {
|
||||||
|
|
||||||
async function runStatus(rid: number): Promise<ProcessStatus> {
|
async function runStatus(rid: number): Promise<ProcessStatus> {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.RunStatus.startRunStatus(builder);
|
const inner = msg.RunStatus.createRunStatus(builder, rid);
|
||||||
msg.RunStatus.addRid(builder, rid);
|
|
||||||
const inner = msg.RunStatus.endRunStatus(builder);
|
|
||||||
|
|
||||||
const baseRes = await dispatch.sendAsync(builder, msg.Any.RunStatus, inner);
|
const baseRes = await dispatch.sendAsync(builder, msg.Any.RunStatus, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
|
@ -154,35 +152,25 @@ export function run(opt: RunOptions): Process {
|
||||||
builder,
|
builder,
|
||||||
opt.args.map(a => builder.createString(a))
|
opt.args.map(a => builder.createString(a))
|
||||||
);
|
);
|
||||||
const cwdOffset = opt.cwd == null ? -1 : builder.createString(opt.cwd);
|
const cwdOffset = opt.cwd == null ? 0 : builder.createString(opt.cwd);
|
||||||
const kvOffset: flatbuffers.Offset[] = [];
|
const kvOffset: flatbuffers.Offset[] = [];
|
||||||
if (opt.env) {
|
if (opt.env) {
|
||||||
for (const [key, val] of Object.entries(opt.env)) {
|
for (const [key, val] of Object.entries(opt.env)) {
|
||||||
const keyOffset = builder.createString(key);
|
const keyOffset = builder.createString(key);
|
||||||
const valOffset = builder.createString(String(val));
|
const valOffset = builder.createString(String(val));
|
||||||
msg.KeyValue.startKeyValue(builder);
|
kvOffset.push(msg.KeyValue.createKeyValue(builder, keyOffset, valOffset));
|
||||||
msg.KeyValue.addKey(builder, keyOffset);
|
|
||||||
msg.KeyValue.addValue(builder, valOffset);
|
|
||||||
kvOffset.push(msg.KeyValue.endKeyValue(builder));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const envOffset = msg.Run.createEnvVector(builder, kvOffset);
|
const envOffset = msg.Run.createEnvVector(builder, kvOffset);
|
||||||
msg.Run.startRun(builder);
|
const inner = msg.Run.createRun(
|
||||||
msg.Run.addArgs(builder, argsOffset);
|
builder,
|
||||||
if (opt.cwd != null) {
|
argsOffset,
|
||||||
msg.Run.addCwd(builder, cwdOffset);
|
cwdOffset,
|
||||||
}
|
envOffset,
|
||||||
msg.Run.addEnv(builder, envOffset);
|
opt.stdin ? stdioMap(opt.stdin) : stdioMap("inherit"),
|
||||||
if (opt.stdin) {
|
opt.stdout ? stdioMap(opt.stdout) : stdioMap("inherit"),
|
||||||
msg.Run.addStdin(builder, stdioMap(opt.stdin!));
|
opt.stderr ? stdioMap(opt.stderr) : stdioMap("inherit")
|
||||||
}
|
);
|
||||||
if (opt.stdout) {
|
|
||||||
msg.Run.addStdout(builder, stdioMap(opt.stdout!));
|
|
||||||
}
|
|
||||||
if (opt.stderr) {
|
|
||||||
msg.Run.addStderr(builder, stdioMap(opt.stderr!));
|
|
||||||
}
|
|
||||||
const inner = msg.Run.endRun(builder);
|
|
||||||
const baseRes = dispatch.sendSync(builder, msg.Any.Run, inner);
|
const baseRes = dispatch.sendSync(builder, msg.Any.Run, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(msg.Any.RunRes === baseRes!.innerType());
|
assert(msg.Any.RunRes === baseRes!.innerType());
|
||||||
|
|
|
@ -8,9 +8,7 @@ import { assert } from "./util";
|
||||||
function req(path: string): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
function req(path: string): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const path_ = builder.createString(path);
|
const path_ = builder.createString(path);
|
||||||
msg.ReadDir.startReadDir(builder);
|
const inner = msg.ReadDir.createReadDir(builder, path_);
|
||||||
msg.ReadDir.addPath(builder, path_);
|
|
||||||
const inner = msg.ReadDir.endReadDir(builder);
|
|
||||||
return [builder, msg.Any.ReadDir, inner];
|
return [builder, msg.Any.ReadDir, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,7 @@ import * as dispatch from "./dispatch";
|
||||||
function req(name: string): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
function req(name: string): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const name_ = builder.createString(name);
|
const name_ = builder.createString(name);
|
||||||
msg.Readlink.startReadlink(builder);
|
const inner = msg.Readlink.createReadlink(builder, name_);
|
||||||
msg.Readlink.addName(builder, name_);
|
|
||||||
const inner = msg.Readlink.endReadlink(builder);
|
|
||||||
return [builder, msg.Any.Readlink, inner];
|
return [builder, msg.Any.Readlink, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,7 @@ function req(
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const path_ = builder.createString(path);
|
const path_ = builder.createString(path);
|
||||||
msg.Remove.startRemove(builder);
|
const inner = msg.Remove.createRemove(builder, path_, !!options.recursive);
|
||||||
msg.Remove.addPath(builder, path_);
|
|
||||||
msg.Remove.addRecursive(builder, !!options.recursive);
|
|
||||||
const inner = msg.Remove.endRemove(builder);
|
|
||||||
return [builder, msg.Any.Remove, inner];
|
return [builder, msg.Any.Remove, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,7 @@ function req(
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const oldpath_ = builder.createString(oldpath);
|
const oldpath_ = builder.createString(oldpath);
|
||||||
const newpath_ = builder.createString(newpath);
|
const newpath_ = builder.createString(newpath);
|
||||||
msg.Rename.startRename(builder);
|
const inner = msg.Rename.createRename(builder, oldpath_, newpath_);
|
||||||
msg.Rename.addOldpath(builder, oldpath_);
|
|
||||||
msg.Rename.addNewpath(builder, newpath_);
|
|
||||||
const inner = msg.Rename.endRename(builder);
|
|
||||||
return [builder, msg.Any.Rename, inner];
|
return [builder, msg.Any.Rename, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
10
js/repl.ts
10
js/repl.ts
|
@ -30,10 +30,7 @@ const replCommands = {
|
||||||
function startRepl(historyFile: string): number {
|
function startRepl(historyFile: string): number {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const historyFile_ = builder.createString(historyFile);
|
const historyFile_ = builder.createString(historyFile);
|
||||||
|
const inner = msg.ReplStart.createReplStart(builder, historyFile_);
|
||||||
msg.ReplStart.startReplStart(builder);
|
|
||||||
msg.ReplStart.addHistoryFile(builder, historyFile_);
|
|
||||||
const inner = msg.ReplStart.endReplStart(builder);
|
|
||||||
|
|
||||||
const baseRes = dispatch.sendSync(builder, msg.Any.ReplStart, inner);
|
const baseRes = dispatch.sendSync(builder, msg.Any.ReplStart, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
|
@ -48,10 +45,7 @@ function startRepl(historyFile: string): number {
|
||||||
export async function readline(rid: number, prompt: string): Promise<string> {
|
export async function readline(rid: number, prompt: string): Promise<string> {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const prompt_ = builder.createString(prompt);
|
const prompt_ = builder.createString(prompt);
|
||||||
msg.ReplReadline.startReplReadline(builder);
|
const inner = msg.ReplReadline.createReplReadline(builder, rid, prompt_);
|
||||||
msg.ReplReadline.addRid(builder, rid);
|
|
||||||
msg.ReplReadline.addPrompt(builder, prompt_);
|
|
||||||
const inner = msg.ReplReadline.endReplReadline(builder);
|
|
||||||
|
|
||||||
const baseRes = await dispatch.sendAsync(
|
const baseRes = await dispatch.sendAsync(
|
||||||
builder,
|
builder,
|
||||||
|
|
|
@ -13,8 +13,7 @@ export interface ResourceMap {
|
||||||
*/
|
*/
|
||||||
export function resources(): ResourceMap {
|
export function resources(): ResourceMap {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.Resources.startResources(builder);
|
const inner = msg.Resource.createResource(builder, 0, 0);
|
||||||
const inner = msg.Resource.endResource(builder);
|
|
||||||
const baseRes = dispatch.sendSync(builder, msg.Any.Resources, inner);
|
const baseRes = dispatch.sendSync(builder, msg.Any.Resources, inner);
|
||||||
assert(baseRes !== null);
|
assert(baseRes !== null);
|
||||||
assert(msg.Any.ResourcesRes === baseRes!.innerType());
|
assert(msg.Any.ResourcesRes === baseRes!.innerType());
|
||||||
|
|
|
@ -11,10 +11,7 @@ function req(
|
||||||
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const filename_ = builder.createString(filename);
|
const filename_ = builder.createString(filename);
|
||||||
msg.Stat.startStat(builder);
|
const inner = msg.Stat.createStat(builder, filename_, lstat);
|
||||||
msg.Stat.addFilename(builder, filename_);
|
|
||||||
msg.Stat.addLstat(builder, lstat);
|
|
||||||
const inner = msg.Stat.endStat(builder);
|
|
||||||
return [builder, msg.Any.Stat, inner];
|
return [builder, msg.Any.Stat, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,7 @@ function req(
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const oldname_ = builder.createString(oldname);
|
const oldname_ = builder.createString(oldname);
|
||||||
const newname_ = builder.createString(newname);
|
const newname_ = builder.createString(newname);
|
||||||
msg.Symlink.startSymlink(builder);
|
const inner = msg.Symlink.createSymlink(builder, oldname_, newname_);
|
||||||
msg.Symlink.addOldname(builder, oldname_);
|
|
||||||
msg.Symlink.addNewname(builder, newname_);
|
|
||||||
const inner = msg.Symlink.endSymlink(builder);
|
|
||||||
return [builder, msg.Any.Symlink, inner];
|
return [builder, msg.Any.Symlink, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,7 @@ function getTime(): number {
|
||||||
|
|
||||||
function clearGlobalTimeout(): void {
|
function clearGlobalTimeout(): void {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.GlobalTimerStop.startGlobalTimerStop(builder);
|
const inner = msg.GlobalTimerStop.createGlobalTimerStop(builder);
|
||||||
const inner = msg.GlobalTimerStop.endGlobalTimerStop(builder);
|
|
||||||
globalTimeoutDue = null;
|
globalTimeoutDue = null;
|
||||||
let res = sendSync(builder, msg.Any.GlobalTimerStop, inner);
|
let res = sendSync(builder, msg.Any.GlobalTimerStop, inner);
|
||||||
assert(res == null);
|
assert(res == null);
|
||||||
|
|
|
@ -10,10 +10,7 @@ function req(
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const name_ = builder.createString(name);
|
const name_ = builder.createString(name);
|
||||||
len = len && len > 0 ? Math.floor(len) : 0;
|
len = len && len > 0 ? Math.floor(len) : 0;
|
||||||
msg.Truncate.startTruncate(builder);
|
const inner = msg.Truncate.createTruncate(builder, name_, len);
|
||||||
msg.Truncate.addName(builder, name_);
|
|
||||||
msg.Truncate.addLen(builder, len);
|
|
||||||
const inner = msg.Truncate.endTruncate(builder);
|
|
||||||
return [builder, msg.Any.Truncate, inner];
|
return [builder, msg.Any.Truncate, inner];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,9 +23,7 @@ export function decodeMessage(dataIntArray: Uint8Array): any {
|
||||||
function createWorker(specifier: string): number {
|
function createWorker(specifier: string): number {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
const specifier_ = builder.createString(specifier);
|
const specifier_ = builder.createString(specifier);
|
||||||
msg.CreateWorker.startCreateWorker(builder);
|
const inner = msg.CreateWorker.createCreateWorker(builder, specifier_);
|
||||||
msg.CreateWorker.addSpecifier(builder, specifier_);
|
|
||||||
const inner = msg.CreateWorker.endCreateWorker(builder);
|
|
||||||
const baseRes = sendSync(builder, msg.Any.CreateWorker, inner);
|
const baseRes = sendSync(builder, msg.Any.CreateWorker, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(
|
assert(
|
||||||
|
@ -39,18 +37,14 @@ function createWorker(specifier: string): number {
|
||||||
|
|
||||||
async function hostGetWorkerClosed(rid: number): Promise<void> {
|
async function hostGetWorkerClosed(rid: number): Promise<void> {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.HostGetWorkerClosed.startHostGetWorkerClosed(builder);
|
const inner = msg.HostGetWorkerClosed.createHostGetWorkerClosed(builder, rid);
|
||||||
msg.HostGetWorkerClosed.addRid(builder, rid);
|
|
||||||
const inner = msg.HostGetWorkerClosed.endHostGetWorkerClosed(builder);
|
|
||||||
await sendAsync(builder, msg.Any.HostGetWorkerClosed, inner);
|
await sendAsync(builder, msg.Any.HostGetWorkerClosed, inner);
|
||||||
}
|
}
|
||||||
|
|
||||||
function hostPostMessage(rid: number, data: any): void {
|
function hostPostMessage(rid: number, data: any): void {
|
||||||
const dataIntArray = encodeMessage(data);
|
const dataIntArray = encodeMessage(data);
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.HostPostMessage.startHostPostMessage(builder);
|
const inner = msg.HostPostMessage.createHostPostMessage(builder, rid);
|
||||||
msg.HostPostMessage.addRid(builder, rid);
|
|
||||||
const inner = msg.HostPostMessage.endHostPostMessage(builder);
|
|
||||||
const baseRes = sendSync(
|
const baseRes = sendSync(
|
||||||
builder,
|
builder,
|
||||||
msg.Any.HostPostMessage,
|
msg.Any.HostPostMessage,
|
||||||
|
@ -62,9 +56,7 @@ function hostPostMessage(rid: number, data: any): void {
|
||||||
|
|
||||||
async function hostGetMessage(rid: number): Promise<any> {
|
async function hostGetMessage(rid: number): Promise<any> {
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.HostGetMessage.startHostGetMessage(builder);
|
const inner = msg.HostGetMessage.createHostGetMessage(builder, rid);
|
||||||
msg.HostGetMessage.addRid(builder, rid);
|
|
||||||
const inner = msg.HostGetMessage.endHostGetMessage(builder);
|
|
||||||
const baseRes = await sendAsync(builder, msg.Any.HostGetMessage, inner);
|
const baseRes = await sendAsync(builder, msg.Any.HostGetMessage, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(
|
assert(
|
||||||
|
@ -88,8 +80,7 @@ export let onmessage: (e: { data: any }) => void = (): void => {};
|
||||||
export function postMessage(data: any): void {
|
export function postMessage(data: any): void {
|
||||||
const dataIntArray = encodeMessage(data);
|
const dataIntArray = encodeMessage(data);
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.WorkerPostMessage.startWorkerPostMessage(builder);
|
const inner = msg.WorkerPostMessage.createWorkerPostMessage(builder);
|
||||||
const inner = msg.WorkerPostMessage.endWorkerPostMessage(builder);
|
|
||||||
const baseRes = sendSync(
|
const baseRes = sendSync(
|
||||||
builder,
|
builder,
|
||||||
msg.Any.WorkerPostMessage,
|
msg.Any.WorkerPostMessage,
|
||||||
|
@ -102,8 +93,10 @@ export function postMessage(data: any): void {
|
||||||
export async function getMessage(): Promise<any> {
|
export async function getMessage(): Promise<any> {
|
||||||
log("getMessage");
|
log("getMessage");
|
||||||
const builder = flatbuffers.createBuilder();
|
const builder = flatbuffers.createBuilder();
|
||||||
msg.WorkerGetMessage.startWorkerGetMessage(builder);
|
const inner = msg.WorkerGetMessage.createWorkerGetMessage(
|
||||||
const inner = msg.WorkerGetMessage.endWorkerGetMessage(builder);
|
builder,
|
||||||
|
0 /* unused */
|
||||||
|
);
|
||||||
const baseRes = await sendAsync(builder, msg.Any.WorkerGetMessage, inner);
|
const baseRes = await sendAsync(builder, msg.Any.WorkerGetMessage, inner);
|
||||||
assert(baseRes != null);
|
assert(baseRes != null);
|
||||||
assert(
|
assert(
|
||||||
|
|
Loading…
Reference in a new issue