npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

firebase-supabase-function-bridge

v1.1.0

Published

Bridge between Firebase Functions and Supabase HTTP triggers.

Readme

Firebase Supabase Function Bridge

This Node.js module lets Supabase securely call your Firebase Functions using HTTP triggers.

It also lets you automatically create Supabase HTTP triggers using your Firebase Functions.

Usage

npm i firebase-supabase-function-bridge

Then create your Firebase Function like you normally would except use our helper function. Under the covers this module creates a Firebase HTTP function for you that checks to see if Supabase really is calling it.

const {
  createSupabaseFunction,
  FunctionTypes,
} = require('firebase-supabase-function-bridge')

module.exports.myFunctionName = createSupabaseFunction(
  'photos',
  FunctionTypes.CREATE,
  (req, res) => {
    const myPhoto = req.body.record

    res.status(200)
  }
)

module.exports.myFunctionName = createSupabaseFunction(
  'users',
  FunctionTypes.UPDATE,
  (req, res) => {
    const oldProfile = req.body.old_record
    const newProfile = req.body.record

    console.log(
      `You changed your username from "${oldProfile.username}" to "${newProfile.username}"`
    )

    res.status(200)
  }
)

Your function can either return any value or a Promise with a value and the module will return a 200 status code. Or you can send any status code using Express. If you do not do anything it will always send a 200.

Then add some additional Firebase Function config:

firebase functions:config:set supabase.url="YOUR SUPABASE APP URL" supabase.service_role_secret="YOUR SERVICE ROLE SECRET" supabase.custom_api_key="YOUR CUSTOM API KEY"

Then deploy your Firebase Functions using the Firebase CLI as normal.

Custom API key

To ensure only Supabase is calling your Firebase Functions we use a simple API key system. Set any string as your API key and this module will check if a x-api-key header includes your key.

Deploy Supabase HTTP triggers

If you create your Firebase Functions using our helper function, our script can look at your functions and automatically create Supabase HTTP triggers for you (instead of doing it manually in the web console).

Note this will replace any existing triggers with the same names.

First set an environment variable so we can connect to your Postgres database:

POSTGRESQL_CONNECTION_URL=postgres://postgres:YOUR_PASSWORD@YOUR_DB_URL:5432/postgres

Then run the module and provide some details to configure your triggers:

firebase-supabase-function-bridge
    --baseUrl=https://us-central1-my-project.cloudfunctions.net
    --customApiKey=[YOUR CUSTOM API KEY]

Options

--debug

Show extra output.

--functions=myFuncName,anotherFuncName

A comma delimited list of function names to deploy.

--initApp

Initialise Firebase Admin for you. This usually conflicts with your Firebase Functions code.