-
-
Notifications
You must be signed in to change notification settings - Fork 67
fix: delta updload #1249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: delta updload #1249
Conversation
WalkthroughReplace Supabase RPC lookups with PostgreSQL/Drizzle queries and clients; add Postgres enums/tables for API keys and org users; introduce pg-backed utilities for user/app/permission resolution; extend middleware to optionally use Postgres; update file routes to use pg helpers, manage PG client lifecycle, and add two routes. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant PGService as Postgres/Drizzle
participant PGClient as PG Client
participant OldFlow as Supabase_RPC
Client->>Router: Request + API Key
alt usePostgres = false
Router->>OldFlow: get_user_id RPC / hasAppRight / query app
OldFlow-->>Router: user_id / permission / app
else usePostgres = true
Router->>PGService: getPgClient()
PGService-->>Router: PGClient
Router->>PGService: getUserIdFromApikey(apikey)
PGService->>PGClient: query apikeys
PGClient-->>PGService: apikey row
PGService-->>Router: user_id
Router->>PGService: hasAppRightApikeyPg(appId, right, ...)
PGService->>PGClient: query apikeys, org_users, apps
PGClient-->>PGService: rights result
PGService-->>Router: permission boolean
Router->>PGService: getAppByAppIdPg(appId)
PGService->>PGClient: query apps
PGClient-->>PGService: app record
PGService-->>Router: app details
Router->>PGService: closeClient(PGClient) [finally]
PGService-->>Router: closed
end
Router-->>Client: Response (200 / 400 / 403 / 404)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
supabase/functions/_backend/utils/hono_middleware.ts (1)
198-291:middlewareKeyPG path looks solid; consider reusing the PG client for subkeysThe new
usePostgresbranch inmiddlewareKeycorrectly:
- Reads the key from
capgkey/authorization.- Uses
checkKeyPg/checkKeyByIdPgfor main key and subkeys.- Closes the pools via
pgClient.end().catch(...)infinally.- Preserves the existing behavior for the Supabase path.
One minor optimization to consider later: reuse the same
pgClient/drizzleClientfor both the main key and the subkey, instead of creating a second pool for subkey lookups. That would reduce connection churn per request at the cost of slightly more plumbing.supabase/functions/_backend/utils/pg_files.ts (2)
105-117: Clean uprightHierarchykeys and keep them in sync with enum valuesThe structure of
rightHierarchymatches the comment and its intended ordering, but ESLint is complaining about quoted property names, and this map must stay aligned with the actualuser_min_rightenum values.You can both satisfy the linter and keep the mapping explicit by removing the unnecessary quotes:
- const rightHierarchy: Record<Database['public']['Enums']['user_min_right'], number> = { - 'invite_read': 0, - 'invite_upload': 1, - 'invite_write': 2, - 'invite_admin': 3, - 'invite_super_admin': 3.5, - 'read': 4, - 'upload': 5, - 'write': 6, - 'admin': 7, - 'super_admin': 8, - } + const rightHierarchy: Record<Database['public']['Enums']['user_min_right'], number> = { + invite_read: 0, + invite_upload: 1, + invite_write: 2, + invite_admin: 3, + invite_super_admin: 3.5, + read: 4, + upload: 5, + write: 6, + admin: 7, + super_admin: 8, + }Combined with the enum alignment comment in
postgres_schema.ts, this keeps the rights ordering consistent across DB, types, and application logic while clearing thestyle/quote-propswarning.
295-295: Remove trailing blank line to satisfyno-multiple-empty-linesESLint is flagging an extra empty line at the end of this file. Trimming the trailing blank line so the file ends right after the closing brace will clear the
style/no-multiple-empty-lineswarning.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
supabase/functions/_backend/private/files.ts(2 hunks)supabase/functions/_backend/utils/hono_middleware.ts(4 hunks)supabase/functions/_backend/utils/pg_files.ts(1 hunks)supabase/functions/_backend/utils/postgres_schema.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
supabase/functions/_backend/utils/pg_files.ts (3)
supabase/functions/_backend/utils/pg.ts (2)
getDrizzleClient(146-148)logPgError(151-199)supabase/functions/_backend/utils/logging.ts (1)
cloudlog(3-15)supabase/functions/_backend/utils/supabase.ts (1)
hasAppRight(204-217)
supabase/functions/_backend/utils/hono_middleware.ts (4)
supabase/functions/_backend/utils/pg.ts (2)
getDrizzleClient(146-148)logPgError(151-199)supabase/functions/_backend/utils/hono.ts (2)
honoFactory(49-49)quickError(224-237)supabase/functions/_backend/utils/logging.ts (1)
cloudlog(3-15)supabase/functions/_backend/utils/supabase.ts (3)
checkKey(999-1019)supabaseAdmin(74-83)checkKeyById(1021-1039)
supabase/functions/_backend/private/files.ts (3)
supabase/functions/_backend/utils/pg.ts (3)
getPgClient(115-144)getDrizzleClient(146-148)closeClient(201-206)supabase/functions/_backend/utils/pg_files.ts (3)
getUserIdFromApikey(12-43)hasAppRightApikeyPg(178-267)getAppByAppIdPg(272-294)supabase/functions/_backend/utils/hono_middleware.ts (1)
middlewareKey(198-292)
🪛 ESLint
supabase/functions/_backend/utils/pg_files.ts
[error] 5-5: Imports "getDrizzleClient" are only used as type.
(ts/consistent-type-imports)
🪛 GitHub Actions: Run tests
supabase/functions/_backend/utils/pg_files.ts
[error] 5-5: ts/consistent-type-imports: Imports 'getDrizzleClient' are only used as type.
[error] 107-116: style/quote-props: Properties shouldn't be quoted as all quotes are redundant.
[error] 295-295: style/no-multiple-empty-lines: Too many blank lines at the end of file. Max of 0 allowed.
🔇 Additional comments (5)
supabase/functions/_backend/utils/postgres_schema.ts (1)
108-129: Newapikeysandorg_usersschemas look consistent with usagesThe
apikeysandorg_userstable definitions (IDs asbigint, nullable timestamps withdefaultNow(), and array fields forlimited_to_orgs/limited_to_apps) match how they're consumed inpg_files.tsandhono_middleware.ts(array checks, optional dates, nullableuser_rightetc.). I don’t see functional issues here.supabase/functions/_backend/private/files.ts (1)
460-471: Route wiring to PG-backed key checks looks coherentUsing
middlewareKey(['all', 'write', 'upload'], true)on the upload-related routes (POST,GETfor/upload, andPATCH) lines them up with the new PG-backed API key verification, while leaving/readas-is. The sequencemiddlewareKey → setKeyFrom* → checkWriteAppAccess → upload/getHandleris consistent.supabase/functions/_backend/utils/hono_middleware.ts (1)
29-113: PG-basedcheckKeyhelpers mirror Supabase behavior correctly
checkKeyPgandcheckKeyByIdPgreplicate the existing Supabase-based checks: they filter bykey/idand allowedmode, return a normalizedapikeysrow (ISO timestamps, array defaults), and log any PG errors vialogPgError. This should be a drop-in replacement for the Supabase RPC path.supabase/functions/_backend/utils/pg_files.ts (2)
174-267: PG rights checks and scoped API key restrictions look correctThe combination of
checkMinRightsPgandhasAppRightApikeyPgis well-structured:
checkMinRightsPg:
- Short-circuits on missing
userId.- Fetches all
org_usersrows for the(orgId, userId)pair.- Applies an ordered
rightHierarchyover org-wide, app-wide, and channel-specific scopes with clear logging and early return on success.
hasAppRightApikeyPg:
- Resolves
orgIdviagetOwnerOrgByAppId.- Enforces
limited_to_orgsandlimited_to_appsconstraints before checking rights.- Delegates to
checkMinRightsPgand logs the final decision.This is a solid replacement for the previous RPC-based helpers and should behave predictably under different org/app scoping combinations.
1-6: FixgetDrizzleClientimport to satisfyts/consistent-type-importsESLint is right that
getDrizzleClientis only used in type positions (ReturnType<typeof getDrizzleClient>), so importing it as a value is unnecessary and violatests/consistent-type-imports.You can avoid a value import entirely by introducing a local type alias based on a type-only import expression, then using that alias in your function signatures:
-import type { Context } from 'hono' -import type { Database } from './supabase.types.ts' -import { and, eq } from 'drizzle-orm' -import { cloudlog } from './logging.ts' -import { getDrizzleClient, logPgError } from './pg.ts' -import * as schema from './postgres_schema.ts' +import type { Context } from 'hono' +import type { Database } from './supabase.types.ts' +import { and, eq } from 'drizzle-orm' +import { cloudlog } from './logging.ts' +import { logPgError } from './pg.ts' +import * as schema from './postgres_schema.ts' + +type DrizzleClient = ReturnType<typeof import('./pg.ts').getDrizzleClient>Then update the parameter types:
- drizzleClient: ReturnType<typeof getDrizzleClient>, + drizzleClient: DrizzleClient,and likewise in
getOwnerOrgByAppId,checkMinRightsPg,hasAppRightApikeyPg, andgetAppByAppIdPg(lines 52, 81, 184, 275). This keeps type safety without pulling the function into the runtime bundle.
| export const keyModePgEnum = pgEnum('key_mode', ['read', 'write', 'all', 'upload']) | ||
| export const userMinRightPgEnum = pgEnum('user_min_right', [ | ||
| 'invite_read', | ||
| 'invite_upload', | ||
| 'invite_write', | ||
| 'invite_admin', | ||
| 'read', | ||
| 'upload', | ||
| 'write', | ||
| 'admin', | ||
| 'super_admin', | ||
| ]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Align user_min_right enum with rights hierarchy
userMinRightPgEnum defines 9 values and omits 'invite_super_admin', while checkMinRightsPg in pg_files.ts includes invite_super_admin in its rightHierarchy. That mismatch can cause drift between the DB enum, Drizzle schema, and your rights logic.
Consider explicitly aligning them, e.g. by adding the missing value here (if it exists in the DB) so that Drizzle, Database['public']['Enums']['user_min_right'], and rightHierarchy stay in sync:
export const userMinRightPgEnum = pgEnum('user_min_right', [
'invite_read',
'invite_upload',
'invite_write',
'invite_admin',
+ 'invite_super_admin',
'read',
'upload',
'write',
'admin',
'super_admin',
])If invite_super_admin is not a real right anymore, then the alternative is to remove it from rightHierarchy and from the Supabase-generated enum type instead of adding it here.
🏁 Script executed:
#!/bin/bash
# Search for rightHierarchy in pg_files.ts
echo "=== Searching for rightHierarchy in pg_files.ts ==="
rg -n "rightHierarchy" --type=ts -A 15
# Search for userMinRightPgEnum in postgres_schema.ts
echo -e "\n=== Searching for userMinRightPgEnum definition ==="
rg -n "userMinRightPgEnum" --type=ts -B 2 -A 12
# Search for all 'invite_super_admin' references in the codebase
echo -e "\n=== Searching for 'invite_super_admin' references ==="
rg -n "invite_super_admin" --type=ts
# Check for hono_middleware.ts and any enum usage there
echo -e "\n=== Searching for rights-related logic in hono_middleware.ts ==="
rg -n "hono_middleware" --type=ts -l | head -5
fd "hono_middleware" --type=f
# Search for user rights or role hierarchy comments/definitions
echo -e "\n=== Searching for user_min_right enum in database or migration files ==="
fd "migration\|schema\|sql" --type=f | head -10Length of output: 5437
🏁 Script executed:
#!/bin/bash
# Search for rightHierarchy in pg_files.ts
echo "=== Searching for rightHierarchy definition ==="
rg -n "rightHierarchy" --type=ts -A 15
# Search for userMinRightPgEnum in postgres_schema.ts
echo -e "\n=== Searching for userMinRightPgEnum definition ==="
rg -n "userMinRightPgEnum" --type=ts -B 2 -A 12
# Search for all 'invite_super_admin' references in the codebase
echo -e "\n=== Searching for 'invite_super_admin' references ==="
rg -n "invite_super_admin" --type=ts
# Search for user_min_right in schema files
echo -e "\n=== Searching for user_min_right references ==="
rg -n "user_min_right" --type=ts -B 2 -A 2Length of output: 9787
🏁 Script executed:
#!/bin/bash
# Check context around line 21 in organization/members/get.ts
echo "=== Context around 'invite_super_admin' in organization/members/get.ts ==="
cat supabase/functions/_backend/public/organization/members/get.ts | head -30
# Search for any SQL or migration files that might define user_min_right enum
echo -e "\n=== Searching for SQL or Supabase schema files ==="
fd -e sql -e pgsql || echo "No SQL files found"
fd "types\|index" --type=f -path "*supabase*" | grep -E "(types|index)" | head -5
# Check if there are any type definitions auto-generated from Supabase
echo -e "\n=== Searching for Database type definitions ==="
rg -n "type Database" --type=ts | head -5
rg -n "user_min_right" --type=ts -B 1 -A 1 | grep -E "(enum|type|interface)" | head -10Length of output: 5561
🏁 Script executed:
#!/bin/bash
# Check context around line 21 in organization/members/get.ts
echo "=== Context around 'invite_super_admin' in organization/members/get.ts ==="
cat supabase/functions/_backend/public/organization/members/get.ts | head -35
# Check if there are Supabase generated types
echo -e "\n=== Searching for Database type imports ==="
rg -n "from.*Database\|Database\['public'\]\['Enums'\]" --type=ts supabase/functions/_backend/utils/pg_files.ts | head -3
# Check for type generation files
echo -e "\n=== Checking for Supabase type generation or schema ==="
fd "database\|types" --type=f -path "*supabase*" | head -10Length of output: 1368
Add 'invite_super_admin' to userMinRightPgEnum
The enum at postgres_schema.ts:7-17 omits 'invite_super_admin', but it is actively used in two places:
rightHierarchyinpg_files.ts:111assigns it a hierarchy level of 3.5memberSchemainorganization/members/get.ts:21includes it as a valid role enum value
This creates a type mismatch: rightHierarchy is typed as Record<Database['public']['Enums']['user_min_right'], number>, yet contains a key not defined in the enum. Apply the suggested fix:
export const userMinRightPgEnum = pgEnum('user_min_right', [
'invite_read',
'invite_upload',
'invite_write',
'invite_admin',
+ 'invite_super_admin',
'read',
'upload',
'write',
'admin',
'super_admin',
])📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const keyModePgEnum = pgEnum('key_mode', ['read', 'write', 'all', 'upload']) | |
| export const userMinRightPgEnum = pgEnum('user_min_right', [ | |
| 'invite_read', | |
| 'invite_upload', | |
| 'invite_write', | |
| 'invite_admin', | |
| 'read', | |
| 'upload', | |
| 'write', | |
| 'admin', | |
| 'super_admin', | |
| ]) | |
| export const keyModePgEnum = pgEnum('key_mode', ['read', 'write', 'all', 'upload']) | |
| export const userMinRightPgEnum = pgEnum('user_min_right', [ | |
| 'invite_read', | |
| 'invite_upload', | |
| 'invite_write', | |
| 'invite_admin', | |
| 'invite_super_admin', | |
| 'read', | |
| 'upload', | |
| 'write', | |
| 'admin', | |
| 'super_admin', | |
| ]) |
🤖 Prompt for AI Agents
In supabase/functions/_backend/utils/postgres_schema.ts around lines 6 to 17,
the exported userMinRightPgEnum is missing the 'invite_super_admin' value which
causes a type mismatch with usages in rightHierarchy and memberSchema; add
'invite_super_admin' to the array of enum values in userMinRightPgEnum so the
Postgres enum and TypeScript types include that key (ensure it's placed
alongside the other invite_* entries).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (5)
supabase/functions/_backend/utils/pg_files.ts (5)
11-42:getUserIdFromApikeywrapper looks correct; consider log payloadThe PG call + null-safe handling look good and fail closed on errors. The
apikeyPrefixlogging for observability is useful, but double‑check that logging the first 15 chars of the key is acceptable from a secrets/PII standpoint; if not, consider hashing or truncating further.
47-64:getOwnerOrgByAppIdis straightforward; optional logging for parityThe function is a thin, correct wrapper over
get_user_main_org_id_by_app_idand returnsnullon error, which is consistent with the other helpers. For easier debugging, you might want to add a smallcloudlogcall (start/result) similar togetUserIdFromApikey, but that’s optional.
69-111:checkMinRightsPglogic is sound; consider guarding other IDs before hitting PGThe rights check wrapper is implemented correctly and fails closed on error. You already short‑circuit when
userIdis falsy; consider doing the same for obviously invalidorgId(and maybeappId/channelIdif they are required in some call paths) to avoid avoidable UUID cast errors in Postgres and to keep logs cleaner:if (!userId || !orgId) { cloudlog({ requestId: c.get('requestId'), message: 'checkMinRightsPg - missing userId/orgId', userId, orgId }) return false }Not strictly required, but can reduce noisy PG errors.
116-153:hasAppRightApikeyPgwrapper looks goodThe function mirrors the pattern of the other helpers, logs start/result, and returns
falseon PG errors, which is appropriate for access control. Just keep the earlier note in mind about whether loggingapikeyPrefixis acceptable in your threat model.
158-180: Minor ergonomic refactor forgetAppByAppIdPgThe query is correct and typed via
schema.apps. You can simplify thethenchaining by using array destructuring, which some find a bit clearer:- const app = await drizzleClient - .select({ - app_id: schema.apps.app_id, - owner_org: schema.apps.owner_org, - }) - .from(schema.apps) - .where(eq(schema.apps.app_id, appId)) - .limit(1) - .then(data => data[0]) + const [app] = await drizzleClient + .select({ + app_id: schema.apps.app_id, + owner_org: schema.apps.owner_org, + }) + .from(schema.apps) + .where(eq(schema.apps.app_id, appId)) + .limit(1)Behavior is the same; this is just a readability tweak.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
supabase/functions/_backend/utils/pg_files.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Cap-go/capgo PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-22T17:04:10.729Z
Learning: Applies to supabase/seed.sql : Update supabase/seed.sql to back new or evolved tests; keep fixtures focused on current behavior while leaving committed migrations unchanged
🧬 Code graph analysis (1)
supabase/functions/_backend/utils/pg_files.ts (2)
supabase/functions/_backend/utils/pg.ts (2)
getDrizzleClient(146-148)logPgError(151-199)supabase/functions/_backend/utils/logging.ts (1)
cloudlog(3-15)
🪛 ESLint
supabase/functions/_backend/utils/pg_files.ts
[error] 5-5: Imports "getDrizzleClient" are only used as type.
(ts/consistent-type-imports)
[error] 12-12: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 13-13: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 14-14: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 16-16: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 17-17: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 18-18: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 19-19: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 20-20: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 21-21: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 23-23: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 24-24: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 25-25: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 26-26: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 28-28: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 30-30: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 31-31: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 32-32: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 33-33: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 34-34: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 36-36: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 37-37: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 38-38: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 39-39: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 40-40: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 41-41: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 48-48: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 49-49: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 50-50: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 52-52: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 53-53: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 54-54: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 55-55: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 56-56: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 58-58: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 59-59: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 60-60: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 61-61: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 62-62: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 63-63: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 70-70: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 71-71: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 72-72: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 73-73: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 74-74: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 75-75: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 76-76: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 78-78: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 79-79: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 80-80: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 81-81: Expected indentation of 8 spaces but found 16.
(style/indent)
[error] 82-82: Expected indentation of 8 spaces but found 16.
(style/indent)
[error] 83-83: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 84-84: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 85-85: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 87-87: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 88-88: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 89-89: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 90-90: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 92-92: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 94-94: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 95-95: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 96-96: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 97-97: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 98-98: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 99-99: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 100-100: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 101-101: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 102-102: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 103-103: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 105-105: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 106-106: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 107-107: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 108-108: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 109-109: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 110-110: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 117-117: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 118-118: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 119-119: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 120-120: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 121-121: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 122-122: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 124-124: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 125-125: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 126-126: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 127-127: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 128-128: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 129-129: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 130-130: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 131-131: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 132-132: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 134-134: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 135-135: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 136-136: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 137-137: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 139-139: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 141-141: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 142-142: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 143-143: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 144-144: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 145-145: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 147-147: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 148-148: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 149-149: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 150-150: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 151-151: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 152-152: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 159-159: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 160-160: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 161-161: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 163-163: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 164-164: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 165-165: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 166-166: Expected indentation of 8 spaces but found 16.
(style/indent)
[error] 167-167: Expected indentation of 8 spaces but found 16.
(style/indent)
[error] 168-168: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 169-169: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 170-170: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 171-171: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 172-172: Expected indentation of 6 spaces but found 12.
(style/indent)
[error] 174-174: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 175-175: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 176-176: Expected indentation of 2 spaces but found 4.
(style/indent)
[error] 177-177: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 178-178: Expected indentation of 4 spaces but found 8.
(style/indent)
[error] 179-179: Expected indentation of 2 spaces but found 4.
(style/indent)
🪛 GitHub Actions: Run tests
supabase/functions/_backend/utils/pg_files.ts
[error] 1-181: ESLint: 127 problems detected in pg_files.ts (127 errors, 0 warnings). Includes issues like incorrect indentation and unexpected imports. Example: 'Imports "getDrizzleClient" are only used as type' (ts/consistent-type-imports) and numerous style/indent and style/no-multiple-empty-lines errors.
|


Summary by CodeRabbit
New Features
Chores