🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@saasak/tool-supa

Package Overview
Dependencies
Maintainers
5
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saasak/tool-supa

A small util to manage supabase

latest
npmnpm
Version
0.0.9
Version published
Maintainers
5
Created
Source

How to use

This is simple (albeit still barebone)

  • Add "db:deploy": "supa deploy" to your package.json at root
  • Add "db:seed": "supa seed" to your package.json at root
  • Add "db:extensions": "supa ext" to your package.json at root And finally,
  • Add "db:reset": "supabase start && supabase db reset && pnpm -s run db:extensions && pnpm -s run db:seed" to it too !

You'll obviously need to leave out the default seeding script seed.sql inside your supabase directory.

Inside your supabase directory, you will need:

  • seeds/
    • 00-configs.sql
    • 01-whatever.sql
    • 02-these-are-obviously-whatever.sql
  • extensions/
    • auth/
      • 00-first-step.sql
      • 01-second-step.sql
      • _enable.sql
    • logging/
      • 00-first-step.sql
      • _enable.sql

Notes

  • In the extensions directory, extensions will be installed in the alphabetical order of the directories, and then the files inside each directory will be executed in the order they are named.
  • In the extensions directory, the _enable.sql file will be executed first to know if the extension needs to run again. There is a --force flag to supa ext which allows to disregard the result of this script. This script must return true if the extension is already installed, and false if not.
  • The tool now uses Node.js pg library instead of the psql binary, making it more portable and easier to deploy.

Available Options

  • --debug - Enable debug output for all commands
  • --force - Force execution (for extensions, disregards enable check)

Keywords

tool

FAQs

Package last updated on 18 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts