HotupdaterHot Updater
Storage Adapters

Supabase Storage

Store your Hot Updater bundles in Supabase Storage buckets.

Installation

npm install @hot-updater/supabase --save-dev

For a deployed server, install the package as a runtime dependency instead of a development dependency.

Setup

For a complete provider deployment, follow the Supabase setup. For an existing bucket or a custom server, use the storage configuration below; you do not need to provision the provider's database and server to use this adapter.

Configuration

interface SupabaseStorageConfig {
  supabaseUrl: string; // Your Supabase project URL
  supabaseServiceRoleKey: string; // Your Supabase service role or secret key
  bucketName: string; // Storage bucket name
  basePath?: string; // Optional base path within bucket
  signedUrlExpiresIn?: number; // Default: 3600 seconds
}

Usage

hot-updater.config.ts (excerpt)
import { supabaseStorage } from "@hot-updater/supabase"; 
import { defineConfig } from "hot-updater";

export default defineConfig({
  // ... build, database, plugins, and updateStrategy
  storage: supabaseStorage({ 
    supabaseUrl: process.env.SUPABASE_URL!, 
    supabaseServiceRoleKey: process.env.SUPABASE_SERVICE_ROLE_KEY!, 
    bucketName: "hot-updater-bundles", 
    basePath: "bundles", // Optional
  }), 
});

Protocol

supabase-storage://bucket/encoded/key

For example, supabase-storage://updates/releases/1.0.0/bundle%20ios.zip is stored in the storageUri field. Keys retain their slash hierarchy and encode each segment.

Capabilities

supabaseStorage passes the upload stream to Supabase, but downloads resolve to a complete Blob before the adapter constructs its Web Response. It also implements signed download URL generation, existence checks, exact deletion, listing below a prefix, and batched deletion of exact keys, which hot-updater storage prune uses. For Supabase Edge Functions, import the same supabaseStorage name from @hot-updater/supabase/edge; that implementation captures the edge-compatible client configuration without changing the core contract.

On this page