mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-08 06:26:45 +02:00
feat: add gstack-upload helper for Supabase Storage
lib/upload.ts provides uploadScreenshot() that uploads to Supabase Storage and returns a public CDN URL. Falls back gracefully to local path with stderr warning on any failure (no config, expired auth, network error). Exit code 0 always — never breaks calling templates. bin/gstack-upload is a thin bash wrapper for CLI use. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
# gstack-upload — upload a file to Supabase Storage, print public URL
|
||||
# Falls back to local path on failure (exit 0 always)
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
exec bun run "$SCRIPT_DIR/../lib/upload.ts" "$@"
|
||||
Reference in New Issue
Block a user