fix(shared): drop .js extensions from relative imports for Metro
packages/shared/src/index.ts and all sub-modules used .js extensions on relative imports (e.g. './admin/index.js') pointing at .ts source files. TypeScript with moduleResolution: "Bundler" doesn't need them, and Metro's eager exporter (used for preview / production builds) reads them literally and fails — only the dev-server Metro fell back to .ts. Workspace typecheck remains 8/8 green; Vite and TS Bundler resolution already accept both styles, so desktop is unaffected.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Admin-only helpers. Every call is RLS-gated server-side via the
|
||||
// Admin-only helpers. Every call is RLS-gated server-side via the
|
||||
// `current_user_is_admin()` helper + admin-specific policies. Non-admins
|
||||
// trying to call these still get clean PostgREST 403/empty-result responses.
|
||||
|
||||
import type { AppSupabaseClient } from '../supabase/client.js';
|
||||
import type { AppSupabaseClient } from '../supabase/client';
|
||||
|
||||
// --- Admin settings -------------------------------------------------------
|
||||
|
||||
@@ -189,7 +189,7 @@ export async function setUserFlag(
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Conversations (admin view — reads all regardless of membership)
|
||||
// Conversations (admin view — reads all regardless of membership)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface AdminConversationRow {
|
||||
|
||||
Reference in New Issue
Block a user