Skip to content

Commit

Permalink
Merge branch 'lucia-wasi-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarscher committed Feb 13, 2024
2 parents 281b728 + 4372cb8 commit 0572afe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Binary file modified bun.lockb
Binary file not shown.
11 changes: 6 additions & 5 deletions packages/api/src/utils/password/argon2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ export async function invoke(args: string[]) {
const instance = new WebAssembly.Instance(argon2, {
wasi_snapshot_preview1: wasi.wasiImport,
})
await wasi.start(instance)
const errors = await stderr.readable.getReader().read()
const errorsValue = new TextDecoder().decode(errors.value)
const promise = wasi.start(instance)
const errors = stderr.readable.getReader().read()
const ret = stdout.readable.getReader().read()
const [errorsStream, resultStream, _] = await Promise.all([errors, ret, promise])
const errorsValue = new TextDecoder().decode(errorsStream.value)
if (errorsValue) {
throw new Error(errorsValue)
}
const ret = await stdout.readable.getReader().read()
const retValue = new TextDecoder().decode(ret.value)
const retValue = new TextDecoder().decode(resultStream.value)
return retValue.trim()
}

Expand Down

1 comment on commit 0572afe

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔ EAS production build completed

  • 🤖 Android build failed ❌
  • 🍏 IOS build failed ❌
Android QR IOS QR

Please sign in to comment.