mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-05 05:05:08 +02:00
feat: wire Supabase credentials and expose tables via Data API
Add supabase/config.sh with project URL and publishable key (safe to commit — RLS restricts to INSERT only). Update telemetry-sync, community-dashboard, and update-check to source the config and include proper auth headers for the Supabase REST API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+15
-2
@@ -257,9 +257,22 @@ describe('gstack-telemetry-sync', () => {
|
||||
});
|
||||
|
||||
describe('gstack-community-dashboard', () => {
|
||||
test('shows unconfigured message when no Supabase URL', () => {
|
||||
const output = run(`${BIN}/gstack-community-dashboard`);
|
||||
test('shows unconfigured message when no Supabase config available', () => {
|
||||
// Use a fake GSTACK_DIR with no supabase/config.sh
|
||||
const output = run(`${BIN}/gstack-community-dashboard`, {
|
||||
GSTACK_DIR: tmpDir,
|
||||
GSTACK_SUPABASE_URL: '',
|
||||
GSTACK_SUPABASE_ANON_KEY: '',
|
||||
});
|
||||
expect(output).toContain('Supabase not configured');
|
||||
expect(output).toContain('gstack-analytics');
|
||||
});
|
||||
|
||||
test('connects to Supabase when config exists', () => {
|
||||
// Use the real GSTACK_DIR which has supabase/config.sh
|
||||
const output = run(`${BIN}/gstack-community-dashboard`);
|
||||
expect(output).toContain('gstack community dashboard');
|
||||
// Should not show "not configured" since config.sh exists
|
||||
expect(output).not.toContain('Supabase not configured');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user