diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 9a19157..66fd16f 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -45,19 +45,14 @@ jobs: - name: Type-check edge functions shell: bash run: | - files=( - supabase/functions/_shared/hermes-config.ts - supabase/functions/_shared/runtime-sync.ts - supabase/functions/sync-agent-runtime/index.ts - supabase/functions/sync-agent-skills/index.ts - supabase/functions/keep-alive-agents/index.ts - supabase/functions/provision-agent/index.ts - supabase/functions/publish-skill-version/index.ts - supabase/functions/railway-webhook/index.ts - supabase/functions/update-agent-config/index.ts - supabase/functions/list-ollama-models/index.ts - supabase/functions/oauth-callback/index.ts - supabase/functions/disconnect-integration/index.ts - supabase/functions/refresh-integration-token/index.ts - ) - deno check --config supabase/functions/deno.json "${files[@]}" + files="$( + find supabase/functions \ + -path '*/node_modules/*' -prune -o \ + -type f \( -path '*/_shared/*.ts' -o -name 'index.ts' \) \ + -print | sort + )" + if [ -z "$files" ]; then + echo "No edge function files found" + exit 1 + fi + deno check --no-lock --config supabase/functions/deno.json $files diff --git a/supabase/functions/bootstrap-internal-secret/index.ts b/supabase/functions/bootstrap-internal-secret/index.ts index c8e0c5b..93b62a3 100644 --- a/supabase/functions/bootstrap-internal-secret/index.ts +++ b/supabase/functions/bootstrap-internal-secret/index.ts @@ -52,12 +52,12 @@ Deno.serve(async (req) => { // tentamos atualizar existente primeiro via SQL direto. try { // 1) Tenta achar entry existente - const { data: existing } = await admin + const { data: existingData } = await admin .from("vault.decrypted_secrets" as never) .select("id, decrypted_secret") .eq("name", "internal_function_secret") - .maybeSingle() - .returns<{ id: string; decrypted_secret: string } | null>(); + .maybeSingle(); + const existing = existingData as { id: string; decrypted_secret: string } | null; if (existing && existing.decrypted_secret === secretValue) { return json(200, { ok: true, action: "already_synced" }); diff --git a/supabase/functions/create-managed-bot/index.ts b/supabase/functions/create-managed-bot/index.ts index a281e75..49e5f43 100644 --- a/supabase/functions/create-managed-bot/index.ts +++ b/supabase/functions/create-managed-bot/index.ts @@ -25,7 +25,8 @@ function generateUsername(name: string): string { } async function usernameAvailable( - admin: ReturnType, + // deno-lint-ignore no-explicit-any + admin: any, username: string, ): Promise { const { data } = await admin