Fix type mismatches and missing exports in main package

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-05 23:19:28 +00:00
parent 6bd619309b
commit e6828b054b
5 changed files with 22 additions and 10 deletions
@@ -35,7 +35,7 @@ export async function GET() {
pendingMigrations: pending.length,
migrations: pending.map(m => ({
id: m.id,
packageId: m.packageId,
packageId: m.b_packageId,
status: m.status,
queuedAt: m.queuedAt,
entities: m.entities.map(e => e.name),
@@ -2,7 +2,7 @@ import { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { UIPageRenderer } from '@/components/ui-page-renderer/UIPageRenderer'
import { loadPageFromDB } from '@/lib/ui-pages/load-page-from-db'
import { loadPageFromDb } from '@/lib/ui-pages/load-page-from-db'
import { loadPageFromLuaPackages } from '@/lib/ui-pages/load-page-from-lua-packages'
interface PageProps {
@@ -28,7 +28,7 @@ export default async function DynamicUIPage({ params }: PageProps) {
const path = '/' + slug.join('/')
// Prefer Lua package-based UI pages, fallback to database-backed pages
const pageData = (await loadPageFromLuaPackages(path)) ?? (await loadPageFromDB(path))
const pageData = (await loadPageFromLuaPackages(path)) ?? (await loadPageFromDb(path))
if (!pageData) {
notFound()
@@ -48,7 +48,7 @@ export async function generateMetadata({ params }: PageProps): Promise<Metadata>
const slug = resolvedParams.slug || []
const path = '/' + slug.join('/')
const pageData = (await loadPageFromLuaPackages(path)) ?? (await loadPageFromDB(path))
const pageData = (await loadPageFromLuaPackages(path)) ?? (await loadPageFromDb(path))
if (!pageData) {
return {
+1 -1
View File
@@ -1,5 +1,5 @@
export type { AuthState, AuthUser, UseAuthReturn } from './auth/auth-types'
export { useIsMobile } from './use-mobile'
export { useMobile } from './use-mobile'
export { useAuth } from './useAuth'
export { useAutoRefresh } from './useAutoRefresh'
export type { EditorFile } from './useCodeEditor'
@@ -1,6 +1,10 @@
import type { DBALClient as _DBALClient, DBALConfig as _DBALConfig } from '@/dbal'
export function getClient(): DBALClient {
interface DBALClientState {
client?: _DBALClient
}
export function getClient(this: DBALClientState): _DBALClient {
if (!this.client) {
throw new Error('DBAL not initialized. Call initialize() first.')
}
+12 -4
View File
@@ -38,6 +38,10 @@ export interface PageConfig {
description?: string | null
icon?: string | null
component?: string | null
componentTree?: unknown // JSON: full component tree
level?: number
requiresAuth?: boolean
requiredRole?: string | null
luaScript?: string | null
accessLevel?: number | null
createdAt?: number | bigint
@@ -57,12 +61,16 @@ export interface Comment {
export interface Workflow {
id: string
name: string
tenantId?: string | null
definition: string
status: string
createdAt: number | bigint
name: string
description?: string | null
nodes?: unknown // JSON: WorkflowNode[]
edges?: unknown // JSON: WorkflowEdge[]
enabled?: boolean
version?: number
createdAt?: number | bigint
updatedAt?: number | bigint | null
createdBy?: string | null
}
export interface AppConfiguration {