refactor(struct): replace bluebird with native Promise

This commit is contained in:
Simon Chan 2022-05-14 18:10:47 +08:00
parent 1ee03486a6
commit 7d5445aeae
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
8 changed files with 1357 additions and 1336 deletions

View file

@ -66,7 +66,9 @@ export async function deserializeLogMessage(stream: StructAsyncDeserializeStream
await stream.read(entry.headerSize - LoggerEntry.size);
const priority = (await stream.read(1))[0] as LogPriority;
const payload = await stream.read(entry.payloadSize - 1);
return { ...entry, priority, payload };
(entry as any).priority = priority;
(entry as any).payload = payload;
return entry as LogMessage;
}
export interface LogSize {