Giter Club home page Giter Club logo

edge-runtime's Introduction

Supabase

Supabase is an open source Firebase alternative. We're building the features of Firebase using enterprise-grade open source tools.

  • Hosted Postgres Database. Docs
  • Authentication and Authorization. Docs
  • Auto-generated APIs.
  • Functions.
    • Database Functions. Docs
    • Edge Functions Docs
  • File Storage. Docs
  • AI + Vector/Embeddings Toolkit. Docs
  • Dashboard

Supabase Dashboard

Watch "releases" of this repo to get notified of major updates.

Watch this repo

Documentation

For full documentation, visit supabase.com/docs

To see how to Contribute, visit Getting Started

Community & Support

  • Community Forum. Best for: help with building, discussion about database best practices.
  • GitHub Issues. Best for: bugs and errors you encounter using Supabase.
  • Email Support. Best for: problems with your database or infrastructure.
  • Discord. Best for: sharing your applications and hanging out with the community.

How it works

Supabase is a combination of open source tools. We’re building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. If the tool doesn't exist, we build and open source it ourselves. Supabase is not a 1-to-1 mapping of Firebase. Our aim is to give developers a Firebase-like developer experience using open source tools.

Architecture

Supabase is a hosted platform. You can sign up and start using Supabase without installing anything. You can also self-host and develop locally.

Architecture

  • Postgres is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
  • Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres' built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients.
  • PostgREST is a web server that turns your PostgreSQL database directly into a RESTful API
  • GoTrue is a JWT based API for managing users and issuing JWT tokens.
  • Storage provides a RESTful interface for managing Files stored in S3, using Postgres to manage permissions.
  • pg_graphql a PostgreSQL extension that exposes a GraphQL API
  • postgres-meta is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
  • Kong is a cloud-native API gateway.

Client libraries

Our approach for client libraries is modular. Each sub-library is a standalone implementation for a single external system. This is one of the ways we support existing tools.

Language Client Feature-Clients (bundled in Supabase client)
Supabase PostgREST GoTrue Realtime Storage Functions
⚡️ Official ⚡️
JavaScript (TypeScript) supabase-js postgrest-js gotrue-js realtime-js storage-js functions-js
Flutter supabase-flutter postgrest-dart gotrue-dart realtime-dart storage-dart functions-dart
Swift supabase-swift postgrest-swift auth-swift realtime-swift storage-swift functions-swift
💚 Community 💚
C# supabase-csharp postgrest-csharp gotrue-csharp realtime-csharp storage-csharp functions-csharp
Go - postgrest-go gotrue-go - storage-go functions-go
Java - - gotrue-java - storage-java -
Kotlin supabase-kt postgrest-kt gotrue-kt realtime-kt storage-kt functions-kt
Python supabase-py postgrest-py gotrue-py realtime-py storage-py functions-py
Ruby supabase-rb postgrest-rb - - - -
Rust - postgrest-rs - - - -
Godot Engine (GDScript) supabase-gdscript postgrest-gdscript gotrue-gdscript realtime-gdscript storage-gdscript functions-gdscript

Badges

Made with Supabase

[![Made with Supabase](https://supabase.com/badge-made-with-supabase.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase.svg"
    alt="Made with Supabase"
  />
</a>

Made with Supabase (dark)

[![Made with Supabase](https://supabase.com/badge-made-with-supabase-dark.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase-dark.svg"
    alt="Made with Supabase"
  />
</a>

Translations

edge-runtime's People

Contributors

aayushyavajpayee avatar andreespirela avatar dependabot[bot] avatar egor-romanov avatar ethanmick avatar inian avatar laktek avatar liamkinne avatar mdluo avatar mlafeldt avatar nyannyacha avatar soonann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

edge-runtime's Issues

Importing axios throws error

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Unable to import axios from edge runtime.

To Reproduce

  • create and serve supabase/functions/hello/index.ts
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import axios from "https://esm.sh/[email protected]";

serve(async (req) => {
  console.log("Hello from Functions!");
  const { data } = await axios.get("https://supabase.com");
  return new Response(JSON.stringify(data), {
    headers: { "Content-Type": "application/json" },
  });
});
  • request error curl http://localhost:54321/functions/v1/hello -X POST
$ supabase functions serve --no-verify-jwt
Setting up Edge Functions runtime...
Serving functions on http://localhost:54321/functions/v1/<function-name>
serving the request with /home/deno/functions/hello
worker thread panicked TypeError: _.accessor is not a function
    at https://esm.sh/v115/[email protected]/esnext/axios.mjs:679:3

Expected behavior

No errors if the same function is served with deno directly, ie.

deno run --allow-net supabase/functions/hello/index.ts

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

related langchain-ai/langchainjs#633

Isolate Halting exit code is not properly sent to parent channel

Bug report

We're probably not sending the correct exit codes for EdgeTimeResult because this errors. Might be part of a potential race condition

edge_runtime.rs#L334 errors

            if halt_isolate_tx.send(call).is_err() {
                error!("failed to send the halt execution signal");
            }

image

Cannot import JSON dependencies

Bug report

Try to import the following dependency within a function.

import cl100k_base from 'https://esm.sh/@dqbd/[email protected]/encoders/cl100k_base.json' assert { type: 'json' }

console.log(cl100k_base)

It throws the following error when the function is run:

worker thread panicked Expected ';', '}' or <eof> at https://esm.sh/@dqbd/[email protected]/encoders/cl100k_base.json:1:11

Invalid file path on startup for relative imported modules / files

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I'm running the supabase edge-runtime in a self hosted environment. Since the upgrade from supabase/edge-runtime:v1.5.2 to the latest available version supabase/edge-runtime:v1.7.2 I'm getting the following error on the container startup:

Failed to load module: "file:///home/deno/functions/_shared/headers.ts" - Invalid file path.
  Specifier: file:///home/deno/functions/_shared/headers.ts
CPU time used: 13ms
Error: worker boot error

The setup is exactly the same as described in the example here.

It works as expected on supabase/edge-runtime:v1.6.0.

I'm mounting the functions directory as described in the docker example file here.

volumes:
      - ./volumes/functions:/home/deno/functions:Z

It seems like there is a / (slash) to much (3 instead of 2) in the file path where it tries to load the file.

Expected behavior

The local file / module import works as expected.

Currently:
file:///home/deno/functions/_shared/headers.ts

Should be / correct:
file://home/deno/functions/_shared/headers.ts

Error: Module not found "https://deno.land/[email protected]/media_types/_util.ts".

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

error: Uncaught (in promise) Error: Module not found "https://deno.land/[email protected]/media_types/_util.ts". 
      const ret = new Error(getStringFromWasm0(arg0, arg1));                                               
                  ^                                                                                        
    at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/[email protected]/eszip_wasm.generated.js:513:19)       
    at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1559899)                        
    at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1398157)                        
    at <anonymous> (https://deno.land/x/[email protected]/eszip_wasm_bg.wasm:1:1895031)                        
    at __wbg_adapter_40 (https://deno.land/x/[email protected]/eszip_wasm.generated.js:229:6)                  
    at real (https://deno.land/x/[email protected]/eszip_wasm.generated.js:213:14)                             
                                                                                                           
Try rerunning the command with --debug to troubleshoot the error.
Error: Process completed with exit code 1.

To Reproduce

Try to deploy edge function to staging/production.

Expected behavior

Function should deploy to staging/production without error.

System information

  • OS: Windows 11
$ supabase --version
1.75.3
$ docker --version
Docker version 24.0.2, build cb74dfc
$ node --version
v18.16.1

Not able to deploy edge functions because of failing Github actions

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

last night one of our edge functions failed because it could not find the XHR module on deno.land. This morning another edge function failed because it couldn't find the supabase module on esm.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:
Deploy edge functions through Github actions

Expected behavior

Successful deployment.

Screenshots

supabase module missing
XHR module not found

System information

  • OS: [e.g. macOS, Windows]
- Operating System: Windows_NT
- Node Version:     v19.8.1
- Nuxt Version:     3.5.3
- Nitro Version:    2.4.1
- Package Manager:  [email protected]
- Builder:          vite
- User Config:      typescript, colorMode, app, plugins, modules, googleFonts, routeRules, runtimeConfig, nitro, devtools, image, vite
- Runtime Modules:  @storyblok/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxtjs/[email protected], @nuxtjs/[email protected], @nuxthq/[email protected], @pinia/[email protected], @pinia-plugin-persistedstate/[email protected]
- Build Modules:    -
------------------------------```

Official Supabase Puppeteer example does not work locally

Bug report

Describe the bug

I'm trying to follow the official puppeteer example but Puppeteer requires Deno to be run with the --unstable flag. See the documentation here:

deno run -A --unstable example.js

However, it seems that the Supabase CLI does not support passing additional parameters so running the official example locally does not work.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Init a new Supabase project
  2. Follow the steps as described here: official puppeteer example
  3. Run the example locally using the supabase functions serve command
  4. See error

Expected behavior

For the example to work locally so that it can be tested before deploying.

User worker keeps connection open even after request was executed

Bug report

On this line https://github.com/supabase/edge-runtime/blob/main/examples/main/index.ts#L23 . The timeout for the User Worker is defined (also known as the worker that processes the request).

Currently, when a request is sent and the user worker evaluates serve, and it returns the response back to the user, it seems like the connection is kept open and when the worker dies when killing the thread for timeout, the following message is logged in the console:

Error in user worker connection: error shutting down connection: Socket is not connected (os error 57)

You can verify this behavior by starting the main script and then calling http://localhost:9000/main-empty and then waiting for the timeout. Happening in PR #32 .

Questions

cc @laktek

local edge runtime request times out waiting for Deno to cache deps after which it is inaccessible

Bug report

  • [ X] I confirm this is a bug with Supabase, not with my own application.
  • [ X] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

In the most recent version of supabase cli when developing edge functions the server times out while caching Deno deps then becomes unresponsive.

To Reproduce

  1. Run an edge function that has a number of dependencies.
  2. Observe timeout hyper::Error(IncompleteMessage)
  3. Subsequent edge function calls fail immediately with
 hyper::Error(User(Service), operation was canceled: connection was not ready

 Caused by:
     connection was not ready)

Expected behavior

The deps should be cached on first run resulting in one slow start then subsequent quick starts.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macos
  • Browser (if applies) N/A
  • Version of supabase: 1.50.2
  • Version of Node.js: 16.19.0
  • Version of edge-runtime image: public.ecr.aws/supabase/edge-runtime:v1.2.12

Additional context

Full log of what happens when I first send a request to the newest version of edge runtime


??? > Setting up Edge Functions runtime...
??? > Download https://deno.land/[email protected]/http/server.ts
??? > Download https://deno.land/x/[email protected]/index.ts
??? > Download https://deno.land/[email protected]/async/mod.ts
??? > Download https://deno.land/x/[email protected]/jwe/compact/decrypt.ts
??? > Download https://deno.land/x/[email protected]/jwe/flattened/decrypt.ts
??? > Download https://deno.land/x/[email protected]/jwe/general/decrypt.ts
??? > Download https://deno.land/x/[email protected]/jwe/general/encrypt.ts
??? > Download https://deno.land/x/[email protected]/jws/compact/verify.ts
??? > Download https://deno.land/x/[email protected]/jws/flattened/verify.ts
??? > Download https://deno.land/x/[email protected]/jws/general/verify.ts
??? > Download https://deno.land/x/[email protected]/jwt/verify.ts
??? > Download https://deno.land/x/[email protected]/jwt/decrypt.ts
??? > Download https://deno.land/x/[email protected]/jwe/compact/encrypt.ts
??? > Download https://deno.land/x/[email protected]/jwe/flattened/encrypt.ts
??? > Download https://deno.land/x/[email protected]/jws/compact/sign.ts
??? > Download https://deno.land/x/[email protected]/jws/flattened/sign.ts
??? > Download https://deno.land/x/[email protected]/jws/general/sign.ts
??? > Download https://deno.land/x/[email protected]/jwt/sign.ts
??? > Download https://deno.land/x/[email protected]/jwt/encrypt.ts
??? > Download https://deno.land/x/[email protected]/jwk/thumbprint.ts
??? > Download https://deno.land/x/[email protected]/jwk/embedded.ts
??? > Download https://deno.land/x/[email protected]/jwks/local.ts
??? > Download https://deno.land/x/[email protected]/jwks/remote.ts
??? > Download https://deno.land/x/[email protected]/jwt/unsecured.ts
??? > Download https://deno.land/x/[email protected]/key/export.ts
??? > Download https://deno.land/x/[email protected]/key/import.ts
??? > Download https://deno.land/x/[email protected]/util/decode_protected_header.ts
??? > Download https://deno.land/x/[email protected]/util/decode_jwt.ts
??? > Download https://deno.land/x/[email protected]/util/errors.ts
??? > Download https://deno.land/x/[email protected]/key/generate_key_pair.ts
??? > Download https://deno.land/x/[email protected]/key/generate_secret.ts
??? > Download https://deno.land/x/[email protected]/util/base64url.ts
??? > Download https://deno.land/[email protected]/async/abortable.ts
??? > Download https://deno.land/[email protected]/async/deadline.ts
??? > Download https://deno.land/[email protected]/async/debounce.ts
??? > Download https://deno.land/[email protected]/async/deferred.ts
??? > Download https://deno.land/[email protected]/async/delay.ts
??? > Download https://deno.land/[email protected]/async/mux_async_iterator.ts
??? > Download https://deno.land/[email protected]/async/pool.ts
??? > Download https://deno.land/[email protected]/async/tee.ts
??? > Download https://deno.land/[email protected]/async/retry.ts
??? > Download https://deno.land/x/[email protected]/runtime/base64url.ts
??? > Download https://deno.land/x/[email protected]/lib/buffer_utils.ts
??? > Download https://deno.land/x/[email protected]/runtime/decrypt.ts
??? > Download https://deno.land/x/[email protected]/runtime/zlib.ts
??? > Download https://deno.land/x/[email protected]/lib/is_disjoint.ts
??? > Download https://deno.land/x/[email protected]/lib/is_object.ts
??? > Download https://deno.land/x/[email protected]/lib/decrypt_key_management.ts
??? > Download https://deno.land/x/[email protected]/lib/cek.ts
??? > Download https://deno.land/x/[email protected]/lib/validate_crit.ts
??? > Download https://deno.land/x/[email protected]/lib/validate_algorithms.ts
??? > Download https://deno.land/x/[email protected]/lib/encrypt_key_management.ts
??? > Download https://deno.land/x/[email protected]/runtime/verify.ts
??? > Download https://deno.land/x/[email protected]/lib/check_key_type.ts
??? > Download https://deno.land/x/[email protected]/lib/jwt_claims_set.ts
??? > Download https://deno.land/x/[email protected]/runtime/encrypt.ts
??? > Download https://deno.land/x/[email protected]/lib/iv.ts
??? > Download https://deno.land/x/[email protected]/runtime/sign.ts
??? > Download https://deno.land/x/[email protected]/jwt/produce.ts
??? > Download https://deno.land/x/[email protected]/runtime/digest.ts
??? > Download https://deno.land/x/[email protected]/runtime/fetch_jwks.ts
??? > Download https://deno.land/x/[email protected]/runtime/env.ts
??? > Download https://deno.land/x/[email protected]/runtime/asn1.ts
??? > Download https://deno.land/x/[email protected]/runtime/key_to_jwk.ts
??? > Download https://deno.land/x/[email protected]/runtime/jwk_to_key.ts
??? > Download https://deno.land/x/[email protected]/runtime/generate.ts
??? > Download https://deno.land/x/[email protected]/lib/check_iv_length.ts
??? > Download https://deno.land/x/[email protected]/runtime/check_cek_length.ts
??? > Download https://deno.land/x/[email protected]/runtime/timing_safe_equal.ts
??? > Download https://deno.land/x/[email protected]/runtime/webcrypto.ts
??? > Download https://deno.land/x/[email protected]/lib/crypto_key.ts
??? > Download https://deno.land/x/[email protected]/lib/invalid_key_input.ts
??? > Download https://deno.land/x/[email protected]/runtime/is_key_like.ts
??? > Download https://deno.land/x/[email protected]/runtime/random.ts
??? > Download https://deno.land/x/[email protected]/runtime/aeskw.ts
??? > Download https://deno.land/x/[email protected]/runtime/ecdhes.ts
??? > Download https://deno.land/x/[email protected]/runtime/pbes2kw.ts
??? > Download https://deno.land/x/[email protected]/runtime/rsaes.ts
??? > Download https://deno.land/x/[email protected]/lib/aesgcmkw.ts
??? > Download https://deno.land/x/[email protected]/runtime/subtle_dsa.ts
??? > Download https://deno.land/x/[email protected]/runtime/check_key_length.ts
??? > Download https://deno.land/x/[email protected]/runtime/get_sign_verify_key.ts
??? > Download https://deno.land/x/[email protected]/lib/epoch.ts
??? > Download https://deno.land/x/[email protected]/lib/secs.ts
??? > Download https://deno.land/x/[email protected]/lib/format_pem.ts
??? > Download https://deno.land/x/[email protected]/runtime/bogus.ts
??? > Download https://deno.land/x/[email protected]/lib/check_p2s.ts
??? > Download https://deno.land/x/[email protected]/runtime/subtle_rsaes.ts
??? > Serving functions on http://localhost:54321/functions/v1/<function-name>
??? > serving the request with /home/deno/functions/generate-token
??? > Download https://deno.land/[email protected]/http/server.ts
??? > Download https://deno.land/x/[email protected]/mod.ts
??? > Download https://esm.sh/[email protected]?bundle&target=deno&no-check
??? > Download https://deno.land/[email protected]/async/mod.ts
??? > Download https://deno.land/x/[email protected]/mod.ts
??? > Download https://esm.sh/v114/[email protected]/deno/firebase-admin.bundle.mjs
??? > Download https://deno.land/[email protected]/async/abortable.ts
??? > Download https://deno.land/[email protected]/async/deadline.ts
??? > Download https://deno.land/[email protected]/async/debounce.ts
??? > Download https://deno.land/[email protected]/async/deferred.ts
??? > Download https://deno.land/[email protected]/async/delay.ts
??? > Download https://deno.land/[email protected]/async/mux_async_iterator.ts
??? > Download https://deno.land/[email protected]/async/pool.ts
??? > Download https://deno.land/[email protected]/async/tee.ts
??? > Download https://deno.land/[email protected]/async/retry.ts
??? > Download https://deno.land/x/[email protected]/db.ts
??? > Download https://deno.land/x/[email protected]/deps.ts
??? > Download https://deno.land/[email protected]/node/process.ts
??? > Download https://deno.land/[email protected]/node/buffer.ts
??? > Download https://deno.land/[email protected]/node/path.ts
??? > Download https://deno.land/[email protected]/node/fs.ts
??? > Download https://esm.sh/v114/@google-cloud/[email protected]/deno/build/src/path.js
??? > Download https://esm.sh/v114/[email protected]/deno/jsonwebtoken.mjs
??? > Download https://deno.land/[email protected]/node/crypto.ts
??? > Download https://deno.land/[email protected]/node/events.ts
??? > Download https://deno.land/[email protected]/node/https.ts
??? > Download https://esm.sh/v114/[email protected]/deno/node-forge.mjs
??? > Download https://deno.land/[email protected]/node/url.ts
??? > Download https://deno.land/[email protected]/node/os.ts
??? > Download https://deno.land/[email protected]/node/zlib.ts
??? > Download https://esm.sh/v114/@firebase/[email protected]/deno/standalone.js
??? > Download https://esm.sh/v114/@google-cloud/[email protected]/deno/firestore.mjs
??? > Download https://deno.land/[email protected]/node/http.ts
??? > Download https://esm.sh/v114/[email protected]/deno/jwks-rsa.mjs
??? > Download https://esm.sh/v114/@fastify/[email protected]/deno/busboy.mjs
??? > Download https://deno.land/[email protected]/path/mod.ts
??? > Download https://deno.land/[email protected]/_util/os.ts
??? > Download https://deno.land/[email protected]/path/win32.ts
??? > Download https://deno.land/[email protected]/path/posix.ts
??? > Download https://deno.land/[email protected]/path/common.ts
??? > Download https://deno.land/[email protected]/path/separator.ts
??? > Download https://deno.land/[email protected]/path/_interface.ts
??? > Download https://deno.land/[email protected]/path/glob.ts
??? > Download https://deno.land/[email protected]/node/_utils.ts
??? > Download https://deno.land/[email protected]/node/internal/validators.mjs
??? > Download https://deno.land/[email protected]/node/internal/errors.ts
??? > Download https://deno.land/[email protected]/node/internal/options.ts
??? > Download https://deno.land/[email protected]/_util/asserts.ts
??? > Download https://deno.land/[email protected]/path/mod.ts
??? > Download https://deno.land/[email protected]/node/_process/process.ts
??? > Download https://deno.land/[email protected]/node/_process/exiting.ts
??? > Download https://deno.land/[email protected]/node/_process/streams.mjs
??? > Download https://deno.land/[email protected]/node/_core.ts
??? > Download https://deno.land/[email protected]/node/_next_tick.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/mod.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/constants.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/uv.ts
??? > Download https://deno.land/[email protected]/node/internal/process/per_thread.mjs
??? > Download https://deno.land/[email protected]/node/path/mod.ts
??? > Download https://deno.land/[email protected]/node/internal/buffer.mjs
??? > Download https://deno.land/[email protected]/node/internal_binding/crypto.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/random.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/pbkdf2.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/scrypt.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/hkdf.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/keygen.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/keys.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/diffiehellman.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/cipher.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/sig.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/hash.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/x509.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/util.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/certificate.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_access.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_appendFile.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_chmod.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_chown.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_close.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_constants.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_copy.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_dir.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_dirent.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_exists.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_fdatasync.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_fstat.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_fsync.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_ftruncate.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_futimes.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_link.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_lstat.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_mkdir.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_mkdtemp.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_open.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_opendir.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_read.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_readdir.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_readFile.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_readlink.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_realpath.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_rename.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_rmdir.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_rm.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_stat.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_symlink.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_truncate.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_unlink.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_utimes.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_watch.ts
??? > Download https://deno.land/[email protected]/node/_fs/_fs_write.mjs
??? > Download https://deno.land/[email protected]/node/_fs/_fs_writev.mjs
??? > Download https://deno.land/[email protected]/node/_fs/_fs_writeFile.ts
??? > Download https://deno.land/[email protected]/node/internal/fs/utils.mjs
??? > Download https://deno.land/[email protected]/node/internal/fs/streams.mjs
??? > Download https://deno.land/[email protected]/node/_events.mjs
??? > Download https://deno.land/[email protected]/node/internal/url.ts
??? > Download https://deno.land/[email protected]/fs/eol.ts
??? > Download https://deno.land/[email protected]/_util/os.ts
??? > Download https://deno.land/[email protected]/path/_constants.ts
??? > Download https://deno.land/[email protected]/node/internal/idna.ts
??? > Download https://deno.land/[email protected]/node/internal/querystring.ts
??? > Download https://deno.land/[email protected]/node/querystring.ts
??? > Download https://esm.sh/v114/[email protected]/deno/jws.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/lodash.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/ms.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/semver.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/text-decoding.mjs
??? > Download https://deno.land/[email protected]/node/util.ts
??? > Download https://deno.land/[email protected]/node/stream.ts
??? > Download https://deno.land/[email protected]/node/internal/error_codes.ts
??? > Download https://deno.land/[email protected]/node/internal/hide_stack_frames.ts
??? > Download https://deno.land/[email protected]/node/internal/util/types.ts
??? > Download https://deno.land/[email protected]/node/internal/normalize_encoding.mjs
??? > Download https://deno.land/[email protected]/node/_zlib.mjs
??? > Download https://deno.land/[email protected]/path/_constants.ts
??? > Download https://deno.land/[email protected]/path/_util.ts
??? > Download https://deno.land/[email protected]/node/net.ts
??? > Download https://deno.land/[email protected]/http/http_status.ts
??? > Download https://deno.land/[email protected]/node/_http_outgoing.ts
??? > Download https://deno.land/[email protected]/node/_http_agent.mjs
??? > Download https://deno.land/[email protected]/node/_http_common.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/tcp_wrap.ts
??? > Download https://deno.land/[email protected]/_util/assert.ts
??? > Download https://esm.sh/v114/[email protected]/deno/google-gax.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/minimal.js
??? > Download https://esm.sh/v114/[email protected]/deno/functional-red-black-tree.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/status.js
??? > Download https://esm.sh/v114/[email protected]/deno/fast-deep-equal.mjs
??? > Download https://deno.land/[email protected]/node/assert.ts
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/fallback.js
??? > Download https://deno.land/[email protected]/node/internal_binding/node_options.ts
??? > Download https://deno.land/[email protected]/path/win32.ts
??? > Download https://deno.land/[email protected]/path/posix.ts
??? > Download https://deno.land/[email protected]/path/common.ts
??? > Download https://deno.land/[email protected]/path/separator.ts
??? > Download https://deno.land/[email protected]/path/_interface.ts
??? > Download https://deno.land/[email protected]/path/glob.ts
??? > Download https://deno.land/[email protected]/node/internal/readline/callbacks.mjs
??? > Download https://deno.land/[email protected]/node/_process/stdio.mjs
??? > Download https://deno.land/[email protected]/node/internal/fixed_queue.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/async_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/buffer.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/config.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/cares_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/contextify.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/credentials.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/errors.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/fs.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/fs_dir.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/fs_event_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/heap_utils.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/http_parser.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/icu.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/inspector.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/js_stream.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/messaging.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/module_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/native_module.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/natives.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/options.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/os.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/pipe_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/performance.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/process_methods.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/report.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/serdes.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/signal_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/spawn_sync.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/stream_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/string_decoder.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/symbols.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/task_queue.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/timers.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/tls_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/trace_events.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/tty_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/types.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/udp_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/url.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/util.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/v8.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/worker.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/zlib.ts
??? > Download https://deno.land/[email protected]/node/internal/util/inspect.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/limiter.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/debug.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/lru-memoizer.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/jose.mjs
??? > Download https://esm.sh/v114/@firebase/[email protected]/deno/component.mjs
??? > Download https://esm.sh/v114/@firebase/[email protected]/deno/logger.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/tslib.mjs
??? > Download https://esm.sh/v114/@firebase/[email protected]/deno/util.mjs
??? > Download https://deno.land/[email protected]/node/tls.ts
??? > Download https://esm.sh/v114/node_buffer.js
??? > Download https://esm.sh/v114/[email protected]/deno/lru-cache.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/jwa.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/safe-buffer.mjs
??? > Download https://deno.land/[email protected]/node/internal_binding/_utils.ts
??? > Download https://deno.land/[email protected]/node/internal/util.mjs
??? > Download https://deno.land/[email protected]/encoding/base64.ts
??? > Download https://deno.land/[email protected]/encoding/base64url.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/_libuv_winerror.ts
??? > Download https://deno.land/[email protected]/node/path/win32.ts
??? > Download https://deno.land/[email protected]/node/path/posix.ts
??? > Download https://deno.land/[email protected]/node/path/common.ts
??? > Download https://deno.land/[email protected]/node/path/separator.ts
??? > Download https://deno.land/[email protected]/node/path/_interface.ts
??? > Download https://deno.land/[email protected]/node/path/glob.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/_randomBytes.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/_randomFill.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/_randomInt.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/_timingSafeEqual.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/constants.ts
??? > Download https://deno.land/[email protected]/node/internal/crypto/_keys.ts
??? > Download https://deno.land/[email protected]/node/internal/streams/writable.mjs
??? > Download https://deno.land/[email protected]/node/_stream.mjs
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/public_encrypt/mod.js
??? > Download https://deno.land/[email protected]/crypto/_wasm/mod.ts
??? > Download https://deno.land/[email protected]/encoding/hex.ts
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/mod.js
??? > Download https://deno.land/[email protected]/node/_fs/_fs_common.ts
??? > Download https://deno.land/[email protected]/fs/exists.ts
??? > Download https://deno.land/[email protected]/streams/write_all.ts
??? > Download https://deno.land/[email protected]/node/internal/assert.mjs
??? > Download https://deno.land/[email protected]/node/internal/streams/destroy.mjs
??? > Download https://deno.land/[email protected]/node/_util/_util_callbackify.ts
??? > Download https://deno.land/[email protected]/node/internal/util/debuglog.ts
??? > Download https://deno.land/[email protected]/node/util/types.ts
??? > Download https://deno.land/[email protected]/node/internal/util/comparisons.ts
??? > Download https://deno.land/[email protected]/node/_zlib_binding.mjs
??? > Download https://deno.land/[email protected]/node/internal/net.ts
??? > Download https://deno.land/[email protected]/node/internal/async_hooks.ts
??? > Download https://deno.land/[email protected]/node/internal/stream_base_commons.ts
??? > Download https://deno.land/[email protected]/node/internal/timers.mjs
??? > Download https://deno.land/[email protected]/node/internal/dtrace.ts
??? > Download https://deno.land/[email protected]/node/dns.ts
??? > Download https://deno.land/[email protected]/node/diagnostics_channel.ts
??? > Download https://deno.land/[email protected]/node/internal/streams/state.mjs
??? > Download https://deno.land/[email protected]/node/internal/http.ts
??? > Download https://deno.land/[email protected]/node/async_hooks.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/connection_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/_listen.ts
??? > Download https://deno.land/[email protected]/flags/mod.ts
??? > Download https://deno.land/[email protected]/node/assertion_error.ts
??? > Download https://deno.land/[email protected]/testing/asserts.ts
??? > Download https://deno.land/[email protected]/path/_util.ts
??? > Download https://deno.land/[email protected]/node/internal/readline/utils.mjs
??? > Download https://deno.land/[email protected]/node/internal_binding/_node.ts
??? > Download https://deno.land/[email protected]/bytes/index_of_needle.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/ares.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/handle_wrap.ts
??? > Download https://esm.sh/v114/@google-cloud/[email protected]/deno/build/src/validate.js
??? > Download https://esm.sh/v114/@google-cloud/[email protected]/deno/build/src/util.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/index-minimal.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/longRunningCalls/longrunning.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/locationService.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/iamService.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/descriptor.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/operationsClient.js
??? > Download https://esm.sh/v114/[email protected]/deno/object-hash.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/googleError.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/warnings.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/util.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/featureDetection.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/fallbackProto.js
??? > Download https://esm.sh/v114/[email protected]/deno/google-auth-library.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/package.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/pathTemplate.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/protos/locations.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/streamingCalls/streaming.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/fallbackServiceStub.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/fallbackRest.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/createApiCall.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/routingHeader.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/protos/operations.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/protos/iam_service.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/gax.js
??? > Download https://esm.sh/v114/[email protected]/deno/protobufjs.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/proto3-json-serializer.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/retry-request.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/is-stream-ended.mjs
??? > Download https://esm.sh/v114/node_fetch.js
??? > Download https://esm.sh/v114/[email protected]/deno/fast-text-encoding.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/duplexify.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/abort-controller.mjs
??? > Download https://deno.land/[email protected]/node/_tls_common.ts
??? > Download https://deno.land/[email protected]/node/_tls_wrap.ts
??? > Download https://deno.land/[email protected]/node/internal/primordials.mjs
??? > Download https://deno.land/[email protected]/node/internal_binding/_winerror.ts
??? > Download https://deno.land/[email protected]/node/path/_constants.ts
??? > Download https://deno.land/[email protected]/node/path/_util.ts
??? > Download https://deno.land/[email protected]/crypto/timing_safe_equal.ts
??? > Download https://deno.land/[email protected]/node/string_decoder.ts
??? > Download https://deno.land/[email protected]/node/internal/streams/end-of-stream.mjs
??? > Download https://deno.land/[email protected]/node/internal/streams/utils.mjs
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/public_encrypt/public_encrypt.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/public_encrypt/private_decrypt.js
??? > Download https://deno.land/[email protected]/crypto/_wasm/lib/deno_std_wasm_crypto.generated.mjs
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/mod.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/encrypter.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/decrypter.js
??? > Download https://deno.land/[email protected]/fmt/printf.ts
??? > Download https://deno.land/[email protected]/node/internal_binding/node_file.ts
??? > Download https://deno.land/[email protected]/node/_pako.mjs
??? > Download https://deno.land/[email protected]/node/timers.ts
??? > Download https://deno.land/[email protected]/node/internal/dns/utils.ts
??? > Download https://deno.land/[email protected]/node/internal/dns/promises.ts
??? > Download https://deno.land/[email protected]/fmt/colors.ts
??? > Download https://deno.land/[email protected]/testing/_diff.ts
??? > Download https://deno.land/[email protected]/testing/_format.ts
??? > Download https://esm.sh/v114/[email protected]/deno/ms.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/ecdsa-sig-formatter.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/buffer-equal-constant-time.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/lru-cache.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/lodash.clonedeep.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/yallist.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/transcoding.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/protos/operations.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/operations_client_config.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/protos/status.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/reader.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/writer_buffer.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/writer.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/roots.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/rpc.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/util/minimal.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/reader_buffer.js
??? > Download https://esm.sh/v114/[email protected]/deno/request.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/extend.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/locations_client_config.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/protos/locations.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/paginationCalls/pageDescriptor.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/streamArrayParser.js
??? > Download https://esm.sh/v114/@google-cloud/[email protected]/deno/build/src/v1/firestore_client_config.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/iam_policy_service_client_config.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/protos/iam_service.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/base64-js.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/arrify.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/gtoken.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/jws.mjs
??? > Download https://deno.land/[email protected]/node/child_process.ts
??? > Download https://esm.sh/v114/[email protected]/deno/gaxios.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/gcp-metadata.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/bundlingCalls/bundleDescriptor.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/streamingCalls/streamDescriptor.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/longRunningCalls/longRunningDescriptor.js
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/pool.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/float.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/base64.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/path.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/eventemitter.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/aspromise.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/fetch.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/codegen.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/utf8.mjs
??? > Download https://esm.sh/v114/@protobufjs/[email protected]/deno/inquire.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/stream-shift.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/inherits.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/end-of-stream.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/readable-stream.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/normalCalls/timeout.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/normalCalls/retries.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/apiCaller.js
??? > Download https://esm.sh/v114/[email protected]/deno/yallist.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/pseudomap.mjs
??? > Download https://esm.sh/v114/@google-cloud/[email protected]/deno/build/src/timestamp.js
??? > Download https://esm.sh/v114/[email protected]/deno/src/util/longbits.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/parse_asn1/mod.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/public_encrypt/mgf.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/public_encrypt/xor.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/bn.js/bn.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/public_encrypt/with_public.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_rsa.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/auth_cipher.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/stream_cipher.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/cipher_base.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/aes.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/evp_bytes_to_key.ts
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/ecb.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/cbc.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/cfb.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/cfb8.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/cfb1.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/ofb.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/modes/ctr.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/randombytes.ts
??? > Download https://esm.sh/v114/[email protected]/deno/is-typedarray.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/forever-agent.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/http-signature.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/tough-cookie.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/performance-now.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/isstream.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/tunnel-agent.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/qs.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/mime-types.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/json-stringify-safe.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/v4.js
??? > Download https://esm.sh/v114/[email protected]/deno/aws4.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/oauth-sign.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/form-data.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/aws-sign2.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/har-validator.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/combined-stream.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/caseless.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/src/rpc/service.js
??? > Download https://esm.sh/v114/[email protected]/deno/https-proxy-agent.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/is-stream.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/google-p12-pem.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/paginationCalls/pagedApiCaller.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/normalCalls/normalApiCaller.js
??? > Download https://esm.sh/v114/[email protected]/deno/jwa.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/json-bigint.mjs
??? > Download https://deno.land/[email protected]/node/internal/child_process.ts
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/parse_asn1/asn1.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/parse_asn1/fix_proc.js
??? > Download https://esm.sh/v114/[email protected]/deno/mime-db.mjs
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/ghash.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/xor.ts
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/browserify_aes/incr32.js
??? > Download https://deno.land/[email protected]/collections/map_values.ts
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/mod.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/parse_asn1/certificate.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/streamingCalls/streamingApiCaller.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/longRunningCalls/longRunningApiCaller.js
??? > Download https://esm.sh/v114/[email protected]/deno/once.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/bundlingCalls/bundleExecutor.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/bundlingCalls/bundleApiCaller.js
??? > Download https://esm.sh/v114/[email protected]/deno/bignumber.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/agent-base.mjs
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/base/node.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/base/buffer.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/base/reporter.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/encoders/der.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/encoders/pem.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/decoders/der.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/decoders/pem.js
??? > Download https://deno.land/[email protected]/node/_crypto/crypto_browserify/asn1.js/constants/der.js
??? > Download https://esm.sh/v114/[email protected]/deno/wrappy.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/lib/bytesToUuid.js
??? > Download https://esm.sh/v114/[email protected]/deno/lib/rng.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/call.js
??? > Download https://esm.sh/v114/[email protected]/deno/lib/refs/json-schema-draft-06.json.js
??? > Download https://esm.sh/v114/[email protected]/deno/har-schema.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/ajv.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/sshpk.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/assert-plus.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/jsprim.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/paginationCalls/resourceCollector.js
??? > Download https://esm.sh/v114/[email protected]/deno/psl.mjs
??? > Download https://deno.land/[email protected]/node/punycode.ts
??? > Download https://esm.sh/v114/[email protected]/deno/util-deprecate.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/delayed-stream.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/bundlingCalls/task.js
??? > Download https://esm.sh/v114/[email protected]/deno/build/src/bundlingCalls/bundlingUtils.js
??? > Download https://esm.sh/v114/[email protected]/deno/json-schema-traverse.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/uri-js.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/fast-json-stable-stringify.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/extsprintf.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/json-schema.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/verror.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/jsbn.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/tweetnacl.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/safer-buffer.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/ecc-jsbn.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/bcrypt-pbkdf.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/lib/ec.js
??? > Download https://esm.sh/v114/[email protected]/deno/asn1.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/core-util-is.mjs
??? > Download https://esm.sh/v114/[email protected]/deno/extsprintf.mjs
??? > hyper::Error(IncompleteMessage)
??? > hyper::Error(User(Service), operation was canceled: connection was not ready
??? >
??? > Caused by:
??? >     connection was not ready)
??? > hyper::Error(User(Service), operation was canceled: connection was not ready

Unit tests not working

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

  • I have function named contact, which is simple function prepared using deno edge function. This function gets contacts stored in db table.
  • I am using superoak to test that function
  • When I run the test its keep loading & loading, so basically its stuck.

To Reproduce

I have prepared a demo repository to reproduce this issue. Following is the repo link

https://github.com/jigarmistry/supabase_unit_test

  1. I have setup contact.test.ts file in functions/contact folder

  2. To run unit test we have command npm run test:contact

  3. After running that command it kept loading and stuck without any result.

Expected behavior

  • It should run a test case and give expected true/false result.

System information

  • OS: macos
  • Version of supabase-js: latest
  • Version of Node.js: 14

Edge runtime v1.2.18 fails to import firebase-admin with `Identifier '__f$' has already been declared`

Bug report

  • [ X] I confirm this is a bug with Supabase, not with my own application.
  • [X ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I upgraded from Supabase cli v1.49.4 to 1.55.1. After doing so my edge function that imports firebase-admin no longer runs, it crashes with Identifier '__f$' has already been declared. This function worked fine on supabase cli 1.49.4 (not sure which edge-runtime version that is).

To Reproduce

  1. Run an edge fn with import firebase from "https://esm.sh/[email protected]?bundle&target=deno&no-check"
  2. Call the function, observe crash
worker thread panicked Uncaught SyntaxError: Identifier '__f$' has already been declared
    at https://esm.sh/v119/[email protected]/deno/firebase-admin.bundle.mjs:2:1611
 Error: channel closed
     at async UserWorker.fetch (ext:sb_user_workers/user_workers.js:50:21)
     at async Server.<anonymous> (file:///home/deno/main/index.ts:102:16)
     at async Server.#respond (https://deno.land/[email protected]/http/server.ts:220:24)

Expected behavior

Imports that previously worked should continue working

Screenshots

N/A

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

This worked fine with Supabase cli v1.49.4. I've deleted deno.lock and all deno cache files and the issue persists. If I switch back to cli 1.49.4 it works again but then I can't import local code since that feature was just released.

running supabase functions serve fails. running supabase functions serve <name> causes postgres connection to fail

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

seems like there is an issue with a deno package when running supabase functions serve I get this following error.

worker "/home/deno/functions/scraper" returned an error: Uncaught SyntaxError: The requested module '/v125/[email protected]/esnext/lib/readable-stream-browser.js' does not provide an export named 'default'
    at https://esm.sh/v125/[email protected]/esnext/jszip.mjs:2:291
InvalidWorkerCreation: worker boot error
    at async Function.create (ext:sb_user_workers/user_workers.js:80:21)
    at async Server.<anonymous> (file:///home/deno/main/index.ts:95:24)
    at async Server.#respond (https://deno.land/[email protected]/http/server.ts:220:24)

if I run supabase functions serve <function-name> --env-file supabase/.env then it will work once but needs to be restarted after every run.

seems to only be when done locally. which makes it incrediby frustrating to have to deploy changes everytime we want to test a function.

To Reproduce

start supabase and run supabase functions serve

Expected behavior

the functions should work

A clear and concise description of what you expected to happen.
the function should execute and hot reload locally as expected. deno seems to be flawed

System information

  • OS: Ventura 13.4
  • Browser chrome
  • Version of supabase-js: 1.68.6
  • Version of Node.js: 20.3.0

Additional context

seems like local lambda is still quite buggy.

Edge function does not execute in parallel

I have an edge function generate-image. When I invoke the function locally many times, each invocation runs in parallel as I expect.

local

When I deploy the function to production with the same code to invoke it many times, it seems to run sequentially. Something on the server side seems to be limiting the function to run only one execution at a time.

production

According to the function metrics in Supabase, the function executes in less than a second. The duration of the invocations is pretty consistent. So it seems that although the HTTP requests are initiated properly, something on the server side is causing each subsequent invocation to start only when the last one completes.

screenshot-2022-06-11-21-12-25

My expectation is that these functions would run completely in parallel up to the limits of my pro plan. Having these functions run sequentially misses out on one of the biggest benefits of serverless edge functions in my opinion. Is this a limitation of my plan? Is there a way to improve the performance of my function?

Create Snapshots during build

Chore

  • Create snapshots
  • Bisect code (necessary for snapshot)

Describe the chore

We want to generate snapshots and attach it to the binary so that most of the heavy start-up work gets compiled.

Error: channel closed

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

image

ab -n 5000 -c 100 http://localhost:9000/empty-response
serving the request with ./examples/empty-response
Error: channel closed
    at async Function.create (ext:sb_user_workers/user_workers.js:80:21)
    at async createWorker (file:///Users/shijinhua/Documents/privatespace/Bun/github.com/mivim-runtime/runtime/examples/main/index.ts:33:16)
    at async callWorker (file:///Users/shijinhua/Documents/privatespace/Bun/github.com/mivim-runtime/runtime/examples/main/index.ts:48:28)
serving the request with ./examples/empty-response

Any other request will report an error after reporting an error

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. const workerTimeoutMs = 1 * 1000
  2. cargo run -- start
  3. ab -n 5000 -c 100 http://localhost:9000/empty-response
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

image
image

System information

  • OS: macOS
  • Browser (if applies) command line
  • Version of none
  • Version of Node.js: none

Additional context

Add any other context about the problem here.

After restarting project postgresjs can no longer connect `ops.op_set_keepalive is not a function`

Bug report

  • [X ] I confirm this is a bug with Supabase, not with my own application.
  • [X ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

After restarting project postgresjs can no longer connect, it throws ops.op_set_keepalive is not a function. There have been no changes to my code. I only restarted my project via the Supabase dashboard due to an unrelated issue.

It seems that maybe there were some changes to the edge runtime that cause some deno APIs to no longer function correctly?

TypeError: ops.op_set_keepalive is not a function
    at TcpConn.setKeepAlive (ext:deno_net/01_net.js:162:16)
   at Object.setKeepAlive (https://deno.land/x/[email protected]/polyfills.js:37:61)
    at connected (https://deno.land/x/[email protected]/src/connection.js:365:51)
    at https://deno.land/x/[email protected]/polyfills.js:150:32
    at Array.forEach (<anonymous>)
    at call (https://deno.land/x/[email protected]/polyfills.js:150:18)
    at success (https://deno.land/x/[email protected]/polyfills.js:103:11)
    at eventLoopTick (ext:core/01_core.js:166:11)
    at cachedError (https://deno.land/x/[email protected]/src/query.js:171:23)
    at new Query (https://deno.land/x/[email protected]/src/query.js:36:24)
    at sql (https://deno.land/x/[email protected]/src/index.js:112:11)
    at file:///src/index.ts:153:61"}

To Reproduce

  1. Deploy an edge function that connects to the db with postgresjs
  2. Observe that connection fails with the above error

Expected behavior

Code that worked previously should continue to work unless a breaking change has been announced

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: N/A
  • Browser (if applies) N/A
  • Version of supabase-js: N/A
  • Version of Node.js: N/A

Additional context

N/A

Show exactly which import is failing

Chore

Always great to see all the improvements on the edge runner! Hope we can do this DX improvement as well!

Describe the chore

Make it more visible and descriptive when there is an import error.

Additional context

I was importing another function from another file but forgot the .ts extension:

import { parseAlert } from './parser' // insead of parser.ts

When I serve the function and call it I will get this error:

serving the request with /home/deno/functions/handle-resource
worker "/home/deno/functions/handle-resource" returned an error: No such file or directory (os error 2)
InvalidWorkerCreation: worker boot error
    at async Function.create (ext:sb_user_workers/user_workers.js:80:21)
    at async Server.<anonymous> (file:///home/deno/main/index.ts:95:24)
    at async Server.#respond (https://deno.land/[email protected]/http/server.ts:220:24)

I couldn't really tell what the error was. I misunderstood and thought the function folder was missing and wonder if some volume mounting would have caused the issue.

I think just displaying the line where the issue happened would be very helpful! Also seeing worker boot error feels very intimidating and distracted me from the fact that it was just a small typo

Latest oak server causing edge runtime to throw an error

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When using the latest (v12.2.0 at the time of writing) oak server in the edge runtime it throw an error about `worker thread panicked TypeError: Cannot read properties of undefined (reading 'querySync'). However if you should explicitly state the version of oak and use the previous version v12.1.0 this error goes away and the endpoints work as intended.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Deploy the self-hosted-edge-functions-demo to fly.io or any hosting provider
  2. Make a request to any of the oak server's endpoints
  3. Check the console where you deployed the project to see the error

Expected behavior

No errors, it should just work.

Screenshots

Screenshot 2023-04-21 004010

System information

  • OS: Windows 11
  • Browser (if applies) [e.g. chrome, safari]
  • Version of edge-runtime: v1.2.14

Additional context

Add any other context about the problem here.

ReferenceError: DOMException is not defined

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I am trying to use the deno_dom package but it fails with an exception:

ReferenceError: DOMException is not defined
    at default (https://deno.land/x/[email protected]/src/dom/selectors/nwsapi.js:20:9)
    at HTMLDocument.get _nwapi (https://deno.land/x/[email protected]/src/dom/document.ts:81:65)
    at HTMLDocument.querySelector (https://deno.land/x/[email protected]/src/dom/document.ts:184:21)
    at Server.<anonymous> (file:///home/deno/functions/test/index.ts:5:27)
    at Server.#respond (https://deno.land/[email protected]/http/server.ts:221:43)
    at Server.#serveHttp (https://deno.land/[email protected]/http/server.ts:258:26)

It works fine when I run my function with deno run

To Reproduce

  • Make sure the supabase stack is running
  • Create the following function
import { serve } from "https://deno.land/[email protected]/http/server.ts"
import { DOMParser, } from "https://deno.land/x/deno_dom/deno-dom-wasm.ts";

serve(async (req) => {
    const document = new DOMParser().parseFromString("<html></html>", "text/html");
    const html = document.querySelector("html");

    return new Response();
});
  • Serve your functions locally
  • Send request to function via curl

README diagram has gone full camo in dark theme :(

Love the diagram on the README, but it seems like it has a transparent background which doesn't work well with the dark theme
image

I just faced this issue myself the other day and I tired to add a style tag to the image, but apparently github strips off any style tags when rendering the image
https://github.com/orgs/community/discussions/41899

So instead, I added a style tag in my svg since they support style tags. Something like <svg style='background-color:white' ..... >

I have a fix for it that introduces the above, so do leme know if its ok for me to send in a PR (or if you would like a different fix)
https://github.com/soonann/edge-runtime/tree/fix-edge-diagram

TypeError: Deno.memoryUsage is not a function

Describe the bug
I'm attempting to get the @sentry/node SDK working in edge runtime. I see that Deno.memoryUsage got added to edge-runtime 3 months ago here https://github.com/supabase/edge-runtime/blame/01926fc73271f1834e49bf99d117f657ec4671a4/crates/node/polyfills/process.ts#L233 but on cli 1.99.10 the Sentry SDK fails to report events due to TypeError: Deno.memoryUsage is not a function.

Has Deno.memoryUsage not made it into the version of edge-runtime used by the cli yet?

To Reproduce
Steps to reproduce the behavior:

import * as Sentry from "https://esm.sh/@sentry/node?target=denonext&bundle=true"


Sentry.init({
    dsn: Deno.env.get("SENTRY_DSN"),
    debug: true,
    tracesSampleRate: 1,
})

Deno.serve(async req => {
    const transaction = Sentry.startTransaction({
        op: "test",
        name:  "testing",
    })
    transaction.finish()
     return new Response(JSON.stringify({success: true}), {
            headers: { "Content-Type": "application/json" },
            status: 200,
        })
})

observe that sentry debug logging outputs


[Error] Sentry Logger [warn]: w: Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
 Reason: TypeError: Deno.memoryUsage is not a function
     at https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:32:14635
     at Array.<anonymous> (https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:26:8995)
     at https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:26:9718
     at Array.forEach (<anonymous>)
     at t._executeHandlers (https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:26:9623)
     at t._setResult (https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:26:9481)
     at _reject (https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:26:9307)
     at Array.<anonymous> (https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:26:8979)
     at https://esm.sh/v132/@sentry/[email protected]/denonext/node.bundle.mjs:26:9718
     at Array.forEach (<anonymous>) {
   name: "w",
   logLevel: "warn"

Expected behavior
Deno node apis should all work correctly

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macos 13.5.2
  • Browser (if applicable) N/A
  • Version of CLI 1.99.10
  • Version of supabase-js (if applicable) N/A
  • Version of Node.js (if applicable) N/A

Additional context
N/A

Self-hosted edge functions - Error when importing shared local files

Bug report

Describe the bug

Calling an edge function that imports local files from the _shared directory produces the following error:

{"msg":"InvalidWorkerCreation: worker boot error"}

Within the supabase-edge-functions container logs I see the following error:

Failed to load module: "file:///home/deno/functions/_shared/message.ts" - Invalid file path.
  Specifier: file:///home/deno/functions/_shared/message.ts

To Reproduce

  1. Follow the steps outlined under "Running Supabase" to download supabase and run using docker: https://supabase.com/docs/guides/self-hosting/docker#running-supabase
  2. Create the file /functions/_shared/message.ts:
export function message() {
  return 'Hello from Edge Functions!';
}
  1. Update /functions/hello/index.ts to import the function from that file:
import { serve } from "https://deno.land/[email protected]/http/server.ts"
import { message } from "../_shared/message.ts";

serve(async () => {
  return new Response(
    `${message()}`,
    { headers: { "Content-Type": "application/json" } },
  )
})
  1. Run docker compose down and docker compose up to ensure the new file is present within the container.
  2. Issue an http request to the endpoint: http://localhost:8000/functions/v1/hello

Expected behavior

I'm expecting the message Hello from Edge Functions! to be displayed, but instead, I see {"msg":"InvalidWorkerCreation: worker boot error"}

System information

  • OS: Docker container on Ubuntu 22 (EC2 on AWS)

Additional context

If I move the _shared directory underneath hello: /functions/hello/_shared/, and alter the import statement within /hello/index.ts to import { message } from "./_shared/message.ts";, then it works fine.

Default to non-encrypted connection when no SSL certificate is provided

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When opening a TLS connection to Postgres edge runtime should fall back to a non-encrypted connection when no SSL certificate is provided. Currently

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Set up connection with deno postgres (e.g. https://github.com/thorwebdev/edgy-edge-functions/blob/main/supabase/functions/postgres-on-the-edge/index.ts )
  2. supabase functions serve --no-verify-jwt --env-file supabase/.env
  3. Navigate to http://localhost:54321/functions/v1/postgres-on-the-edge
  4. See error
Function "postgres-on-the-edge" up and running!
Sending fatal alert BadCertificate
TypeError: Cannot read properties of undefined (reading 'InvalidData')
    at Connection.#startup (https://deno.land/x/[email protected]/connection/connection.ts:276:46)
    at async Connection.startup (https://deno.land/x/[email protected]/connection/connection.ts:360:21)
    at async PoolClient.connect (https://deno.land/x/[email protected]/client.ts:161:13)
    at async https://deno.land/x/[email protected]/pool.ts:165:17
    at async Promise.all (index 0)
    at async Pool.#initialize (https://deno.land/x/[email protected]/pool.ts:169:63)
    at async Pool.connect (https://deno.land/x/[email protected]/pool.ts:113:9)
    at async Server.<anonymous> (file:///home/deno/functions/postgres-on-the-edge/index.ts:19:28)
    at async Server.#respond (https://deno.land/[email protected]/http/server.ts:245:30)

Expected behavior

Fall back to non-encrypted connection.

Additional context

  1. ✅ When providing the cert it works as expected:
// Create a database pool with one connection.
const pool = new Pool(
  {
    tls: { caCertificates: [Deno.env.get("DB_SSL_CERT")!] },
    database: "postgres",
    hostname: "db.bljghubhkofddfrezkhn.supabase.co",
    user: "postgres",
    port: 5432,
    password: Deno.env.get("DB_PASSWORD"),
  },
  1
);
  1. ✅ When specifically disabling TLS it works as expected
// Create a database pool with one connection.
const pool = new Pool(
  {
    tls: { enabled: false },
    database: "postgres",
    hostname: "db.bljghubhkofddfrezkhn.supabase.co",
    user: "postgres",
    port: 5432,
    password: Deno.env.get("DB_PASSWORD"),
  },
  1
);
  1. ❌ When omitting tls setting it fails
// Create a database pool with one connection.
const pool = new Pool(
  {
    database: "postgres",
    hostname: "db.bljghubhkofddfrezkhn.supabase.co",
    user: "postgres",
    port: 5432,
    password: Deno.env.get("DB_PASSWORD"),
  },
  1
);

System information

  • OS: mac os
  • Version of supabase cli: 1.50.13

Reduce request overhead

Description

When running examples/main. Two things are happening:

  1. A Main runtime is being created,
  2. A HTTP server is being created with serve(async (
    We essentially want to move this logic to the very Rust server itself so that the incoming requests are directly transfer to the UserWorker instead of doing it on the JS side.

So that it will look like this:

  1. Edge runtime spins up a server
  2. Server proxies the request to a new UserWorker

instead of

  1. Edge runtime spins up a server
  2. HTTP server is created on the JS side
  3. Workers need to be created on the JS side through OPS
  4. Request is sent to worker

supabase serve uses "--no-npm" mode for Deno. Why? This breaks code that needs npm modules.

Bug report

Describe the bug

I ported my firebase functions to supabase edge functions. In doing so I had to use some npm modules, which I thought was fine since deno supports npm. Upon trying to run my code however I was suprised to be hit with

worker thread panicked Unsupported scheme "npm" for module "npm:/@effect/[email protected]/Exit". Supported schemes: [
    "data",
    "blob",
    "file",
    "http",
    "https",
]

The supabase cli passes "--no-npm" when invoking Deno.

Code is here https://github.com/supabase/cli/blob/a30210717bdb1f3c9d3d5ce940d000971fc1a6da/internal/functions/serve/serve.go#L190

As far as I can tell this isn't documented anywhere by Supabase resulting in a surprise for users. Since Supabase targets people who want to switch from Firebase this is likely to affect almost everyone who attempts to switch as most people use npm modules in their firebase functions.

To Reproduce

  1. Add an npm specifier to your import_map.json such as "@effect/io/": "npm:/@effect/[email protected]/",
  2. run supabase functions serve
  3. Observe that function crashes at runtime due to --no-npm option passed to Deno by supabase cli.

Expected behavior

All Deno features should work. If there's a specific reason why --no-npm is needed it should be clearly documented along with an explanation of how to work around being unable to use npm import specifiers.

Screenshots

N/A

System information

  • OS: macOS
  • Browser N/A
  • Version of supabase-js: N/A
  • Version of Node.js: N/A

Additional context

examples/opengraph do not get connection

Bug report

 ~/github/supabase/edge-runtime/ [fix/opengraph*] cargo run -- start --main-service  ./examples/opengraph
    Finished dev [unoptimized + debuginfo] target(s) in 0.34s
     Running `target/debug/edge-runtime start --main-service ./examples/opengraph`
Listening on http://localhost:8000/

But it can't be connected on 8000

Channel is closed because worker has previously died

Bug report

When a request is received in main/index.ts. A worker is created and this one is added to a cache. If the worker and it's only deleted/cleaned when

    } catch (e) {
      console.error(e);
      if (e.message === "user worker not available") {
        // remove the worker from cache
        workerCache.delete(servicePath);
        // recall the worker
        return callWorker();
      } else {
        const error = { msg: e.toString() }
        return new Response(
            JSON.stringify(error),
            { status: 500, headers: { "Content-Type": "application/json" } },
        );
      }
    }

We need to find a better way to clean besides a message user worker not available because there have been instances I've run into where the worker dies and it's kept cached, which makes the request unreachable to its target channel

Set CORS headers for Edge Functions 401 response

Bug report

Originally posted in the main supabase repo, but reposting here as it seems to have regressed.

Describe the bug

When attempting to call an edge function with a bad token, the function rightly issues a 401 response. However, while CORS headers appear to be set for the preflight OPTIONS request, they are not for the subsequent POST request, resulting in the browser seeing a failed fetch rather than the 401 response.

Please note that this is not to do with setting cors headers within the function, as with a bad token the function code is never reached.

To Reproduce

fetch(
    import.meta.env.SUPABASE_FUNCTION_URL,
  {
    method: "POST",
    headers: {
      Authorization: "Bearer bad-token",
      "Content-Type": "application/json",
    },
  }
)
  .then((res) => {
    console.log(res);
  })
  .catch((error) => {
    console.log(error);
  });

When CORS is enabled in the browser, an error is caught. With CORS disabled (in the browser), the response is properly logged.

Expected behavior

The response should have appropriate CORS headers set.

System information

  • OS: OS X 12.5.1
  • Browser: Brave (also confirmed in Chrome)

Response is not interpreted when handler function.

Bug report

  1. It seems like the following code works under Deno deploy (https://deno.com/deploy/docs/examples) but not Edge Runtime
export default async function handler(req) {
    return new Response("Hello World");
}
  1. This is causing a:
TypeError: request body receiver not connected (request closed)
    at Object.write (ext:deno_web/06_streams.js:954:20)
    at Module.invokeCallbackFunction (ext:deno_webidl/00_webidl.js:976:16)
    at WritableStreamDefaultController.writeAlgorithm (ext:deno_web/06_streams.js:3675:14)
    at writableStreamDefaultControllerProcessWrite (ext:deno_web/06_streams.js:4177:55)
    at writableStreamDefaultControllerAdvanceQueueIfNeeded (ext:deno_web/06_streams.js:4080:5)
    at writableStreamDefaultControllerWrite (ext:deno_web/06_streams.js:4224:3)
    at writableStreamDefaultWriterWrite (ext:deno_web/06_streams.js:4371:3)
    at Object.chunkSteps (ext:deno_web/06_streams.js:2534:17)
    at readableStreamFulfillReadRequest (ext:deno_web/06_streams.js:2376:17)
    at readableByteStreamControllerCommitPullIntoDescriptor (ext:deno_web/06_streams.js:2067:5)

Note that this works:

Deno.serve(() => new Response("Hello World"));

Additional Context

  • Latest main

Isolate is not killed when error

Bug report

Currently, module waits until timeout even if it errors during evaluation. We want to kill the isolate if this happens.

Illustration

Request 1 ----> Module errors (such as #54)
..... 1min
Module is killed.

Meaning, the connections are still open.

runtime closes connection when worker exceeds timeout

Bug report

I'm running using the docker image v1.3.3 on a Mac M1.
When a worker is taking too long the runtime errors and stops working.

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

The worker has a timeout of 100 milliseconds.
The hello-world worker is waiting for 1 second before returning a response.

The error is:

web_1  | main function started
web_1  | serving the request with /home/deno/functions/hello-world
web_1  | hello-world started
web_1  | Error: channel closed
web_1  |     at async UserWorker.fetch (ext:sb_user_workers/user_workers.js:54:21)
web_1  |     at async Server.<anonymous> (file:///home/deno/functions/main/index.ts:39:16)
web_1  |     at async Server.#respond (https://deno.land/[email protected]/http/server.ts:219:24)
web_1  | serving the request with /home/deno/functions/hello-world
web_1  | Error: channel closed
web_1  |     at async Function.create (ext:sb_user_workers/user_workers.js:80:21)
web_1  |     at async Server.<anonymous> (file:///home/deno/functions/main/index.ts:31:24)
web_1  |     at async Server.#respond (https://deno.land/[email protected]/http/server.ts:219:24)

The first request throws in ext:sb_user_workers/user_workers.js:54:21.
Every subsequent request throws in ext:sb_user_workers/user_workers.js:80:21.

To Reproduce

I created a fork from the self hosted example.
https://github.com/EzzatOmar/self-hosted-edge-functions-demo

System information

  • OS: macOs
  • Docker image: ghcr.io/supabase/edge-runtime:v1.3.5

Edge Runtime Supabase OpenAI : TypeError: t is not a function

So i'm trying to use ConversationalRetrievalQAChain from Langchain within the Edge Functions. However I get the error underneath also. Im unsure if it's axios problem within the edge functions?

const chain = ConversationalRetrievalQAChain.fromLLM(
        model,
        supaStore.asRetriever(null, { chatbots: `%${body.bot}%` }),
        {
          qaTemplate: contextprompt,
          returnSourceDocuments: true,
        }
      );
      console.log("about to chain call");
      const res = await chain.call({
        question: body.user_message,
        chat_history: [],
      });
TypeError: t is not a function
    at Ke.exports (https://esm.sh/v120/[email protected]/esnext/axios.mjs:3:5734)
    at T.request (https://esm.sh/v120/[email protected]/esnext/axios.mjs:3:9122)
    at Function.request (https://esm.sh/v120/[email protected]/esnext/axios.mjs:2:839)
    at https://esm.sh/v120/[email protected]/esnext/openai.mjs:2:3794
    at https://esm.sh/v120/[email protected]/esnext/openai.mjs:2:26914
    at async n._fn (https://esm.sh/v120/[email protected]/esnext/p-retry.mjs:2:1577)```

import npm module fail

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

2023-05-01 15:54:13 worker thread panicked Unsupported scheme "npm" for module "npm:[email protected]". Supported schemes: [
2023-05-01 15:54:13     "data",
2023-05-01 15:54:13     "blob",
2023-05-01 15:54:13     "file",
2023-05-01 15:54:13     "http",
2023-05-01 15:54:13     "https",
2023-05-01 15:54:13 ]

To Reproduce

import OSS from "npm:[email protected]";

Expected behavior

import npm module successful

Screenshots

image

System information

  • MacOS
  • Edge
  • supabase-js: 2.21.0
  • Node.js: v18.14.0

Additional context

Add any other context about the problem here.

Worker thread cannot be created

Bug report

  • [ x ] I confirm this is a bug with Supabase, not with my own application.
  • [ x ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Running supabase docker instance 'edge-runtime:v1.6.6' docker container, using supabase functions serve results in the error:
Operation not permitted (os error 1) CPU time used: 0ms InvalidWorkerCreation: worker boot error at async Function.create (ext:sb_user_workers/user_workers.js:84:15) at async Server.<anonymous> (file:///home/deno/main/index.ts:110:24) at async Server.#respond (https://deno.land/[email protected]/http/server.ts:220:24)

After further investigation, it seems it is this line const key = await core.opAsync('op_user_worker_create', readyOptions); in /crates/sb_workers/user_workers.js creating the issue.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Install edge-runtime:v1.6.6 (also replicated on v1.8.1)
  2. Run supabase functions serve
  3. Call a function

This is my function:
`import { serve } from "https://deno.land/[email protected]/http/server.ts"

serve(() => {
return new Response()
})`

Expected behavior

Edge function should be executed

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS M1
  • Supabase CLI: 1.83.7
  • Docker version: v.4.22.0

Additional context

Add any other context about the problem here.

Deno object in local edge functions does not contain all props

Describe the bug
I'm trying to upload a file via a POST request using oak on my local edge functions and while trying to read the form data I get the following error: Deno.makeTempDir is not a function.

This is how I'm trying to read the form data: const data = await ctx.request.body({ type: 'form-data' }).value.read();, where ctx is the RouterContext provided by oak.

While doing some debugging I ended up logging the entire Deno object and this is the result:

{
  listen: [Function: listen],
  connect: [AsyncFunction: connect],
  connectTls: [AsyncFunction: connectTls],
  startTls: [AsyncFunction: startTls],
  resolveDns: [AsyncFunction: resolveDns],
  serveHttp: [Function: serveHttp],
  permissions: Permissions {},
  Permissions: [Class: Permissions],
  PermissionStatus: [Class: PermissionStatus],
  errors: {
    Interrupted: [Class: Interrupted],
    BadResource: [Class: BadResource],
    InvalidWorkerResponse: [Class: classErr] { getName: [Function (anonymous)] },
    InvalidWorkerCreation: [Class: classErr] { getName: [Function (anonymous)] },
    NotFound: [Class: classErr] { getName: [Function (anonymous)] },
    PermissionDenied: [Class: classErr] { getName: [Function (anonymous)] },
    ConnectionRefused: [Class: classErr] { getName: [Function (anonymous)] },
    ConnectionReset: [Class: classErr] { getName: [Function (anonymous)] },
    ConnectionAborted: [Class: classErr] { getName: [Function (anonymous)] },
    NotConnected: [Class: classErr] { getName: [Function (anonymous)] },
    AddrInUse: [Class: classErr] { getName: [Function (anonymous)] },
    AddrNotAvailable: [Class: classErr] { getName: [Function (anonymous)] },
    BrokenPipe: [Class: classErr] { getName: [Function (anonymous)] },
    AlreadyExists: [Class: classErr] { getName: [Function (anonymous)] },
    InvalidData: [Class: classErr] { getName: [Function (anonymous)] },
    TimedOut: [Class: classErr] { getName: [Function (anonymous)] },
    WriteZero: [Class: classErr] { getName: [Function (anonymous)] },
    WouldBlock: [Class: classErr] { getName: [Function (anonymous)] },
    UnexpectedEof: [Class: classErr] { getName: [Function (anonymous)] },
    Http: [Class: classErr] { getName: [Function (anonymous)] },
    Busy: [Class: classErr] { getName: [Function (anonymous)] },
    NotSupported: [Class: classErr] { getName: [Function (anonymous)] }
  },
  build: {
    target: "x86_64-unknown-linux-gnu",
    arch: "x86_64",
    os: "linux",
    vendor: "unknown",
    env: "gnu"
  },
  env: {
    get: [Function: getEnv],
    toObject: [Function: toObject],
    set: [Function: setEnv],
    has: [Function: has],
    delete: [Function: deleteEnv]
  },
  pid: undefined,
  args: [],
  mainModule: [Getter/Setter]
}

As you can see, there are a lot of missing properties/methods from the Deno object.

Is this intended?

Preflight OPTIONS requests fail with 408 - Request timeout

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When using supabase functions serve to serve all functions simultaneously, the pre-flight 'OPTIONS' request initiated by a browser agent fails.
The server returns Status Code 408 - Request timeout with a message body of {"msg":"Request could not be processed by the server because it timed out or an error was thrown."}

The bug is triggered by the fact that the OPTIONS body is empty

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Use code snippet at https://supabase.com/docs/guides/functions/cors#recommended-setup to setup CORS headers in the serve function
  2. Send OPTIONS request to edge function

Expected behavior

The server should return 200 with the CORS headers set appropriately.

Screenshots

Capture d’écran 2023-04-13 à 15 22 38
Capture d’écran 2023-04-13 à 15 23 28

System information

  • OS: macOS
  • Browser (if applies) : chrome. Also tested outside browser (Postman)
  • Version of supabase-js: 2.20.0
  • Version of Node.js: not relevant

Additional context

  1. If serving the function individually via supabase functions serve <function-name>, the bug does not happen. It only happens when serving all functions simultaneously via supabase functions serve

  2. If calling the function with the POST method directly, the bug does not happen.

  3. Inserting console.log() statements everywhere in the edge function code shows that the script reaches the point where it has to send the response to the OPTIONS request, then crashes silently.

  4. If you put some dummy data into the body of the OPTIONS request, the bug does not happen:
    Capture d’écran 2023-04-13 à 15 24 00

Unfortunately a browser-generated pre-flight request always has an empty body

To me it looks like when I call return new Response('ok', { headers: corsHeaders }) inside the edge function, this triggers the bug because probably the server-side is still waiting for the client to send its body and it does not want to reply with the Response before it can close the incoming connection - but I may be mistaken on my interpretation.

In conclusion, it looks like there may be some code inside edge-runtime that tries to enforce a non-empty body on an OPTIONS request ?

Allow fetch unstable APIs in Deno to query a TLS certificate-protected server

Is your feature request related to a problem? Please describe.
I'd like to use the fetch unstable API from Deno in order to use a client certificate to make requests to a secured server.

Describe the solution you'd like
Allow basic unstable APIs from Deno. Right now Deno on supabase is very limited, it's impossible to use for even simple use cases such as this one.

Describe alternatives you've considered
Either there is a solution or I'll have to use something other than supabase.

I've tried using Deno.createHttpClient, but it's undefined once deployed on supabase.

Thanks!

Local Edge Function times out after 30 seconds

Bug report

  • [X ] I confirm this is a bug with Supabase, not with my own application.
  • [X ] I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

When developing Edge Functions locally, the requests always time out after 60 seconds (wall clock time). In production, Edge Functions taking 80-90 seconds seem to work fine as well (afaik there's no limit there). The response I get is a 504 The upstream server is timing out.

To Reproduce

The issue can be reproduced by simply creating a new Edge functions that hangs for 60+ seconds.

serve(async () => {
    await new Promise((resolve) => setTimeout(resolve, 90 * 1000));
    return new Response(JSON.stringify({ foo: 'success' });)
  }
)

Expected behavior

The Edge Function should not time out and its behavior should mirror the deployed's.

Screenshots

System information

  • OS: macOS Ventura 13.0
  • Browser (if applies) -
  • Version of supabase-js: -
  • Version of Node.js: -

Additional context

Fix incoming requests from browser

Chore

Currently, if the request comes from a browser (ex chrome), the first request succeeds but the second fails (Note that the first request already panics)

Describe the chore

Investigate and fix this behavior

ReadableStream as Response.body causes function to stall

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

With Supabase CLI 1.57.4, the edge-runtime version 1.2.19 was rolled out.
This includes a fix for sending back null values in the HTTP 204 status code, which rquired no body to be sent. (See issue supabase/cli#1071 and its fix)

I suspect that with this change, the support for ReadableStreams has been broken, as they don't contain a .size and thus might be treated incorrectly by the fix.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to https://github.com/zcei/supabase-response-stream-bug
  2. Clone repository & setup supabase
  3. Serve functions
  4. Issue the two requests from the bottom of the README

Expected behavior

Both requests should work: one serves back a 204 with no content and the other a 200 with the text content of the stream.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS
  • Browser (if applies) [e.g. chrome, safari] reproducible with Browsers as with cURL
  • Version of supabase-js: 1.58.1
  • Version of Node.js: 18.14.1

Additional context

I suspect that the line to fix it (see here) does not account for all cases. e.g. I don't think a ReadableStream can have a .size property when it's not clear yet whether someone will write to that stream.

I was trying to hop through Deno with the debugger, but as this is my first sparring with Deno, sadly to no great success.

Some pointers that may help, or could be red herrings:

  • The 204 requests used to fail with the error that is raised here
  • This error happens when bodyWithType is not null (see here)
  • The body is created by hopping through a few layers of webidl.converters, which is where I lost track with my current debugger setup 😞 . From looking at the code in GitHub, there's a chance that converters.DOMString is called which could return 'null' rather than null.
  • Tried to reproduce with plain Deno (without supabase) but the function seems to have worked there. So I'm not sure whether Deno fixed it in their latest version already, or I chased down an incorrect assumption.

self.structuredClone is not a function in self-hosted edge functions

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Our code that contains self.structuredClone only runs when deployed to Deno Deploy and not when run in the self-hosted edge-runtime.

TypeError: self.structuredClone is not a function
    at Server.<anonymous> (file:///home/deno/functions/test-structured-clone/index.ts:57:24)
    at async Server.#respond (https://deno.land/[email protected]/http/server.ts:220:24)

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a test function that calls self.structuredClone
  2. Start the local development Supabase setup (supabase start) and serve the functions (supabase functions serve)
  3. Call the edge function you created
  4. See error

Expected behavior

This function should be available the same way it is available in Deno Deploy when I deploy the same function using supabase functions deploy.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: macOS
  • Browser: chrome and cURL
  • Version of Supabase CLI: 1.63.0 (edge runtime version v1.3.5)

Additional context

Add any other context about the problem here.

Refactor bootstrap.js into multiple files

Chore

Currently, there's a lot of boilerplate code that's not related to itself in bootstrap.js.

Describe the chore

Let's move the content from bootstrap.js into single JS file by categories.

Deployment Options

Question

Wondering if there are production deployments outside of Supabase and what the best deployment option would be. Like, besides from fly.io would something like AWS Lambda make sense?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.