diff --git a/Dockerfile b/Dockerfile index 4ddb12cc6..21c66b57e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,8 @@ RUN --mount=type=secret,id=TURBO_API,env=TURBO_API \ --mount=type=secret,id=TURBO_TEAM,env=TURBO_TEAM \ --mount=type=secret,id=TURBO_TOKEN,env=TURBO_TOKEN \ --mount=type=secret,id=TURBO_REMOTE_CACHE_SIGNATURE_KEY,env=TURBO_REMOTE_CACHE_SIGNATURE_KEY \ - TURBO_PLATFORM="${TARGETPLATFORM:-linux/amd64}" pnpm build + TURBO_PLATFORM="${TARGETPLATFORM:-linux/amd64}" \ + pnpm turbo build --filter=@homarr/nextjs... --filter=@homarr/cli FROM base AS runner WORKDIR /app diff --git a/packages/db/collection.ts b/packages/db/collection.ts index 00e5aba18..7449e2f79 100644 --- a/packages/db/collection.ts +++ b/packages/db/collection.ts @@ -35,8 +35,10 @@ export const createDbInsertCollectionForTransaction = { for (const [key, values] of objectEntries(context)) { if (values.length >= 1) { + // oxlint-disable-next-line import/namespace -- TableKey limits key to exported schema tables. + const table = schema[key]; transaction - .insert(schema[key]) + .insert(table) .values(values as never) .run(); } @@ -50,7 +52,9 @@ export const createDbInsertCollectionForTransaction = = 1) { // Below is actually the mysqlSchema when the driver is mysql - await transaction.insert(schema[key] as never).values(values as never); + // oxlint-disable-next-line import/namespace -- TableKey limits key to exported schema tables. + const table = schema[key] as never; + await transaction.insert(table).values(values as never); } } }); diff --git a/packages/db/test/schema.spec.ts b/packages/db/test/schema.spec.ts index 246219547..61245cca8 100644 --- a/packages/db/test/schema.spec.ts +++ b/packages/db/test/schema.spec.ts @@ -63,6 +63,7 @@ test("schemas should match", () => { if (!("uniqueName" in sqliteColumn)) return; if (!("primary" in sqliteColumn)) return; + // oxlint-disable-next-line import/namespace -- this test intentionally compares matching dynamic schema keys. const mysqlTable = mysqlSchema[tableName]; const mysqlColumn = mysqlTable[columnName as keyof typeof mysqlTable] as object; @@ -84,6 +85,7 @@ test("schemas should match", () => { ).toEqual(mysqlColumn.primary); }); + // oxlint-disable-next-line import/namespace -- this test intentionally compares matching dynamic schema keys. const mysqlTable = mysqlSchema[tableName]; const sqliteForeignKeys = sqliteTable[Symbol.for("drizzle:SQLiteInlineForeignKeys") as keyof typeof sqliteTable] as | SqliteForeignKey[] @@ -144,6 +146,7 @@ test("schemas should match for postgresql", () => { objectEntries(sqliteSchema).forEach(([tableName, sqliteTable]) => { // keys of sqliteSchema and postgresqlSchema are the same, so we can safely use tableName as key // skipcq: JS-E1007 + // oxlint-disable-next-line import/namespace -- this test intentionally compares matching dynamic schema keys. const postgresqlTable = postgresqlSchema[tableName]; Object.entries(sqliteTable).forEach(([columnName, sqliteColumn]: [string, object]) => { if (!("isUnique" in sqliteColumn)) return;