mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 13:54:57 +00:00
Fix DBAL build: Add generated types and fix InstalledPackage creation
- Created types.generated.ts with all entity types from Prisma schema - Added index signatures to types for compatibility - Fixed InstalledPackage creation to include id and updatedAt fields - DBAL now builds successfully - Tests can start but have tenant ID and operation issues to fix Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
@@ -56,9 +56,11 @@ const assertValidId = (id: string) => {
|
||||
const withInstalledPackageDefaults = (data: CreatePackageInput): InstalledPackage => {
|
||||
const installedAt = data.installedAt ?? BigInt(Date.now())
|
||||
return {
|
||||
id: data.packageId, // Use packageId as id
|
||||
packageId: data.packageId,
|
||||
tenantId: data.tenantId ?? null,
|
||||
installedAt,
|
||||
updatedAt: installedAt, // Set updatedAt to installedAt initially
|
||||
version: data.version,
|
||||
enabled: data.enabled,
|
||||
config: data.config ?? null,
|
||||
|
||||
@@ -15,9 +15,11 @@ export const createPackage = async (
|
||||
): Promise<Result<InstalledPackage>> => {
|
||||
const installedAt = input.installedAt ?? BigInt(Date.now())
|
||||
const payload: InstalledPackage = {
|
||||
id: input.packageId, // Use packageId as id
|
||||
packageId: input.packageId,
|
||||
tenantId: input.tenantId ?? null,
|
||||
installedAt,
|
||||
updatedAt: installedAt, // Set updatedAt to installedAt initially
|
||||
version: input.version,
|
||||
enabled: input.enabled,
|
||||
config: input.config ?? null
|
||||
|
||||
Reference in New Issue
Block a user