diff --git a/.dev.vars.example b/.dev.vars.example deleted file mode 100644 index 7208033c8b..0000000000 --- a/.dev.vars.example +++ /dev/null @@ -1,23 +0,0 @@ -# This should be the same as .env from "supabase" - -STRIPE_WEBHOOK_SECRET=test -STRIPE_SECRET_KEY=test -API_SECRET=testsecret -PLAN_MAKER=test -PLAN_SOLO=test -PLAN_TEAM=test -# minio s3 -S3_ENDPOINT=host.docker.internal -S3_REGION=dev-region -S3_PORT=9000 -S3_SSL=false -S3_ACCESS_KEY_ID=ROOTUSER -S3_SECRET_ACCESS_KEY=CHANGEME123 -S3_BUCKET=capgo - -# Also supabase vars -SUPABASE_URL=http://127.0.0.1:54321 -SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU -SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 - -SUPABASE_DB_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres diff --git a/.env.example b/.env.example deleted file mode 100644 index 2239f768cf..0000000000 --- a/.env.example +++ /dev/null @@ -1,41 +0,0 @@ -# LOCAL - -VITE_VAPID_KEY = xxxx -VITE_FIREBASE_CONFIG = {"apiKey": "xxx", "authDomain": "capacitorgo.firebaseapp.com", "projectId": "capacitorgo", "storageBucket": "capacitorgo.comspot.com", "messagingSenderId": "846798480151", "appId": "xxx"} -API_SECRET=123456789 -LANDING_URL=https://capgo.app - -SUPABASE_DB_URL=postgres://postgres:****@db.****.supabase.co:5432/postgres?sslmode=disable -SUPABASE_URL=http://localhost:54321 -SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 -SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU - -WEBAPP_URL=http://localhost:8881 - -TEST_APIKEY=c591b04e-cf29-4945-b9a0-776d0672061a - -LOGSNAG_TOKEN= -LOGSNAG_PROJECT= - -S3_ENDPOINT=***.r2.cloudflarestorage.com -S3_SSL=true -S3_REGION=auto - -# PROD -S3_ACCESS_KEY_ID=*** -S3_ACCESS_KEY_ID_UPLOAD=*** -S3_SECRET_ACCESS_KEY=*** -S3_SECRET_ACCESS_KEY_UPLOAD=*** -S3_BUCKET=capgo - -PLUNK_API_KEY= - -LIMITED_APPS=[{"id": "***.**.**", "ignore": 1}] -DEFAULT_SIGN_KEY= - -STRIPE_WEBHOOK_SECRET= -STRIPE_SECRET_KEY= - -SENTRY_DSN= -CF_ACCOUNT_ANALYTICS_ID= -CF_ANALYTICS_TOKEN= diff --git a/.env.test b/.env.test index b0a3fbe843..e0fca8e6d2 100644 --- a/.env.test +++ b/.env.test @@ -1,19 +1,3 @@ -S3_ENDPOINT=host.docker.internal:9000 -S3_REGION=dev-region -S3_PORT=9000 -S3_SSL=false -S3_ACCESS_KEY_ID=ROOTUSER -S3_SECRET_ACCESS_KEY=CHANGEME123 -S3_ACCESS_KEY_ID_UPLOAD=ROOTUSER -S3_SECRET_ACCESS_KEY_UPLOAD=CHANGEME123 -S3_BUCKET=capgo -STRIPE_WEBHOOK_SECRET=test -STRIPE_SECRET_KEY=test -API_SECRET=testsecret -WEBAPP_URL=https://web.capgo.app -LANDING_URL=https://capgo.app -TEST_APIKEY==***** -PLUNK_API_KEY=*** SUPABASE_URL=http://localhost:54321 SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 SUPABASE_SERVICE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU diff --git a/supabase/.env.backend.test b/supabase/.env.backend.test deleted file mode 100644 index f18d944a30..0000000000 --- a/supabase/.env.backend.test +++ /dev/null @@ -1,8 +0,0 @@ - -S3_ENDPOINT=host.docker.internal -S3_REGION=dev-region -S3_PORT=9000 -S3_SSL=false -S3_ACCESS_KEY_ID=ROOTUSER -S3_SECRET_ACCESS_KEY=CHANGEME123 -S3_BUCKET=capgo diff --git a/supabase/.env.example b/supabase/.env.example deleted file mode 100644 index 042aee1416..0000000000 --- a/supabase/.env.example +++ /dev/null @@ -1,30 +0,0 @@ -STRIPE_WEBHOOK_SECRET=test -STRIPE_SECRET_KEY=test -API_SECRET=testsecret -WEBAPP_URL=https://web.capgo.app -LANDING_URL=https://capgo.app -TEST_APIKEY==***** -PLUNK_API_KEY=*** - - -# Required for test framework to work ;-) -S3_ENDPOINT=host.docker.internal -#S3_ACCOUNT_ID=*** -S3_REGION=dev-region -S3_PORT=9000 -S3_SSL=false - -# This setting is specific to minio (see tests_backend/gh_actions/minio.sh) -S3_ACCESS_KEY_ID=ROOTUSER -S3_SECRET_ACCESS_KEY=CHANGEME123 -S3_SECRET_ACCESS_KEY_UPLOAD=CHANGEME125 -S3_BUCKET=capgo - -# minio s3, those values can be used when deploying capgo to prod -#S3_ACCOUNT_ID=*** -#S3_ACCESS_KEY_ID=*** -#S3_SECRET_ACCESS_KEY=*** - -#SUPABASE_URL=http://localhost:54321 -#SUPABASE_ANON_KEY=**** -#SUPABASE_SERVICE_ROLE_KEY=**** diff --git a/supabase/.env.example.s3 b/supabase/.env.example.s3 deleted file mode 100644 index 28c48cc014..0000000000 --- a/supabase/.env.example.s3 +++ /dev/null @@ -1,13 +0,0 @@ -STRIPE_WEBHOOK_SECRET=test # whsec_.... -STRIPE_SECRET_KEY=test # sk_test_... -API_SECRET=testsecret -PLAN_MAKER=test -PLAN_SOLO=test -PLAN_TEAM=test -# minio s3 -S3_ENDPOINT=host.docker.internal -S3_REGION=dev-region -S3_PORT=9000 -S3_SSL=false -S3_ACCESS_KEY_ID=ROOTUSER -S3_BUCKET=capgo diff --git a/supabase/.env.test b/supabase/.env.test deleted file mode 100644 index e0fca8e6d2..0000000000 --- a/supabase/.env.test +++ /dev/null @@ -1,3 +0,0 @@ -SUPABASE_URL=http://localhost:54321 -SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 -SUPABASE_SERVICE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU diff --git a/supabase/functions/_backend/private/create_device.ts b/supabase/functions/_backend/private/create_device.ts index 54eee768dc..899c327e9b 100644 --- a/supabase/functions/_backend/private/create_device.ts +++ b/supabase/functions/_backend/private/create_device.ts @@ -50,7 +50,7 @@ app.post('/', middlewareAuth, async (c: Context) => { if (appError) { console.error({ requestId: c.get('requestId'), context: 'app error', error: appError }) - return c.json({ status: 'app_not_found' }, 400) + return c.json({ status: 'app_not_found', app_id: safeBody.app_id }, 400) } const userId = clientData.data.user.id diff --git a/supabase/functions/_backend/utils/update.ts b/supabase/functions/_backend/utils/update.ts index 0286e552bd..617c9b01a8 100644 --- a/supabase/functions/_backend/utils/update.ts +++ b/supabase/functions/_backend/utils/update.ts @@ -67,6 +67,7 @@ export async function updateWithPG(c: Context, body: AppInfos, drizzleCient: Ret return c.json({ message: 'App not found', error: 'app_not_found', + app_id, }, 200) } if (coerce) { diff --git a/supabase/functions/import_map.json b/supabase/functions/import_map.json index 2b18690178..c407e4c78f 100644 --- a/supabase/functions/import_map.json +++ b/supabase/functions/import_map.json @@ -19,7 +19,7 @@ "@logsnag/node": "https://esm.sh/@logsnag/node@1.0.1?target=deno", "cron-schedule": "https://esm.sh/cron-schedule@5.0.1?target=deno", "drizzle-orm": "https://esm.sh/drizzle-orm@0.35.3?target=deno", - "drizzle-orm/d1": "https://esm.sh/drizzle-orm@0./d1?target=deno", + "drizzle-orm/d1": "https://esm.sh/drizzle-orm@0.35.3/d1?target=deno", "drizzle-orm/pg-core": "https://esm.sh/drizzle-orm@0.35.3/pg-core?target=deno", "drizzle-orm/sqlite-core": "https://esm.sh/drizzle-orm@0.35.3/sqlite-core?target=deno", "drizzle-orm/postgres-js": "https://esm.sh/drizzle-orm@0.35.3/postgres-js?target=deno",