mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 06:16:42 +00:00
fix: type-check all edge functions in ci (#7)
This commit is contained in:
parent
871b3f809a
commit
6b3943807c
3 changed files with 16 additions and 20 deletions
27
.github/workflows/validate.yml
vendored
27
.github/workflows/validate.yml
vendored
|
|
@ -45,19 +45,14 @@ jobs:
|
||||||
- name: Type-check edge functions
|
- name: Type-check edge functions
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
files=(
|
files="$(
|
||||||
supabase/functions/_shared/hermes-config.ts
|
find supabase/functions \
|
||||||
supabase/functions/_shared/runtime-sync.ts
|
-path '*/node_modules/*' -prune -o \
|
||||||
supabase/functions/sync-agent-runtime/index.ts
|
-type f \( -path '*/_shared/*.ts' -o -name 'index.ts' \) \
|
||||||
supabase/functions/sync-agent-skills/index.ts
|
-print | sort
|
||||||
supabase/functions/keep-alive-agents/index.ts
|
)"
|
||||||
supabase/functions/provision-agent/index.ts
|
if [ -z "$files" ]; then
|
||||||
supabase/functions/publish-skill-version/index.ts
|
echo "No edge function files found"
|
||||||
supabase/functions/railway-webhook/index.ts
|
exit 1
|
||||||
supabase/functions/update-agent-config/index.ts
|
fi
|
||||||
supabase/functions/list-ollama-models/index.ts
|
deno check --no-lock --config supabase/functions/deno.json $files
|
||||||
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[@]}"
|
|
||||||
|
|
|
||||||
|
|
@ -52,12 +52,12 @@ Deno.serve(async (req) => {
|
||||||
// tentamos atualizar existente primeiro via SQL direto.
|
// tentamos atualizar existente primeiro via SQL direto.
|
||||||
try {
|
try {
|
||||||
// 1) Tenta achar entry existente
|
// 1) Tenta achar entry existente
|
||||||
const { data: existing } = await admin
|
const { data: existingData } = await admin
|
||||||
.from("vault.decrypted_secrets" as never)
|
.from("vault.decrypted_secrets" as never)
|
||||||
.select("id, decrypted_secret")
|
.select("id, decrypted_secret")
|
||||||
.eq("name", "internal_function_secret")
|
.eq("name", "internal_function_secret")
|
||||||
.maybeSingle()
|
.maybeSingle();
|
||||||
.returns<{ id: string; decrypted_secret: string } | null>();
|
const existing = existingData as { id: string; decrypted_secret: string } | null;
|
||||||
|
|
||||||
if (existing && existing.decrypted_secret === secretValue) {
|
if (existing && existing.decrypted_secret === secretValue) {
|
||||||
return json(200, { ok: true, action: "already_synced" });
|
return json(200, { ok: true, action: "already_synced" });
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,8 @@ function generateUsername(name: string): string {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function usernameAvailable(
|
async function usernameAvailable(
|
||||||
admin: ReturnType<typeof createClient>,
|
// deno-lint-ignore no-explicit-any
|
||||||
|
admin: any,
|
||||||
username: string,
|
username: string,
|
||||||
): Promise<boolean> {
|
): Promise<boolean> {
|
||||||
const { data } = await admin
|
const { data } = await admin
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue