mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-07 03:59:35 +00:00
Fix type mismatches and missing exports in main package
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -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,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.')
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user