supabase / edge-runtime

A server based on Deno runtime, capable of running JavaScript, TypeScript, and WASM services.
MIT License
691 stars 62 forks source link

fix(sb_workers): allow extra context to be passed in from js land #440

Closed nyannyacha closed 2 weeks ago

nyannyacha commented 2 weeks ago

What kind of change does this PR introduce?

Enhancement

Description

The purpose of this is to allow bootstrapping to be more granular, by allowing extra context to be passed in from js land.

We've observed instances of using the Deno.readFileSync API in prod, but because bootstrap.js is hardcoded to block these APIs, it was difficult to react quickly to unblock them.

await EdgeRuntime.userWorkers.create({
    ..
    context: {
        useReadSyncFileAPI: true
    }
});
github-actions[bot] commented 2 weeks ago

:tada: This PR is included in version 1.61.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: