mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-22 04:10:01 +00:00
refactor(core): Restore typechecker strictness level in @n8n/db (#16012)
This commit is contained in:
@@ -39,7 +39,6 @@ export class AddApiKeysTable1724951148974 implements ReversibleMigration {
|
|||||||
// Move the apiKey from the users table to the new table
|
// Move the apiKey from the users table to the new table
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
usersWithApiKeys.map(
|
usersWithApiKeys.map(
|
||||||
// @ts-expect-error Tech debt
|
|
||||||
async (user: { id: string; apiKey: string }) =>
|
async (user: { id: string; apiKey: string }) =>
|
||||||
await runQuery(
|
await runQuery(
|
||||||
`INSERT INTO ${userApiKeysTable} (${idColumn}, ${userIdColumn}, ${apiKeyColumn}, ${labelColumn}) VALUES (:id, :userId, :apiKey, :label)`,
|
`INSERT INTO ${userApiKeysTable} (${idColumn}, ${userIdColumn}, ${apiKeyColumn}, ${labelColumn}) VALUES (:id, :userId, :apiKey, :label)`,
|
||||||
@@ -97,7 +96,6 @@ export class AddApiKeysTable1724951148974 implements ReversibleMigration {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
oldestApiKeysPerUser.map(
|
oldestApiKeysPerUser.map(
|
||||||
// @ts-expect-error Tech debt
|
|
||||||
async (user: { userId: string; apiKey: string }) =>
|
async (user: { userId: string; apiKey: string }) =>
|
||||||
await runQuery(
|
await runQuery(
|
||||||
`UPDATE ${userTable} SET ${apiKeyColumn} = :apiKey WHERE ${idColumn} = :userId`,
|
`UPDATE ${userTable} SET ${apiKeyColumn} = :apiKey WHERE ${idColumn} = :userId`,
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ export class AddApiKeysTable1724951148974 implements ReversibleMigration {
|
|||||||
// Move the apiKey from the users table to the new table
|
// Move the apiKey from the users table to the new table
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
usersWithApiKeys.map(
|
usersWithApiKeys.map(
|
||||||
// @ts-expect-error Tech debt
|
|
||||||
async (user: { id: string; apiKey: string }) =>
|
async (user: { id: string; apiKey: string }) =>
|
||||||
await runQuery(
|
await runQuery(
|
||||||
`INSERT INTO ${tableName} ("id", "userId", "apiKey", "label") VALUES (:id, :userId, :apiKey, :label)`,
|
`INSERT INTO ${tableName} ("id", "userId", "apiKey", "label") VALUES (:id, :userId, :apiKey, :label)`,
|
||||||
@@ -115,7 +114,6 @@ export class AddApiKeysTable1724951148974 implements ReversibleMigration {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
oldestApiKeysPerUser.map(
|
oldestApiKeysPerUser.map(
|
||||||
// @ts-expect-error Tech debt
|
|
||||||
async (user: { userId: string; apiKey: string }) =>
|
async (user: { userId: string; apiKey: string }) =>
|
||||||
await runQuery(
|
await runQuery(
|
||||||
`UPDATE ${tablePrefix}user SET ${apiKeyColumn} = :apiKey WHERE ${idColumn} = :userId`,
|
`UPDATE ${tablePrefix}user SET ${apiKeyColumn} = :apiKey WHERE ${idColumn} = :userId`,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
|
|
||||||
// remove all options below this line
|
// remove all options below this line
|
||||||
|
"strict": false,
|
||||||
"strictPropertyInitialization": false
|
"strictPropertyInitialization": false
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts"],
|
"include": ["src/**/*.ts"],
|
||||||
|
|||||||
Reference in New Issue
Block a user