mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: seeding fails
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import { Knex } from "knex";
|
||||
|
||||
import { crypto } from "@app/lib/crypto";
|
||||
import { initLogger } from "@app/lib/logger";
|
||||
import { superAdminDALFactory } from "@app/services/super-admin/super-admin-dal";
|
||||
|
||||
import { AuthMethod } from "../../services/auth/auth-type";
|
||||
import { TableName } from "../schemas";
|
||||
import { generateUserSrpKeys, seedData1 } from "../seed-data";
|
||||
@@ -10,6 +14,11 @@ export async function seed(knex: Knex): Promise<void> {
|
||||
await knex(TableName.UserEncryptionKey).del();
|
||||
await knex(TableName.SuperAdmin).del();
|
||||
|
||||
initLogger();
|
||||
|
||||
const superAdminDAL = superAdminDALFactory(knex);
|
||||
await crypto.initialize(superAdminDAL);
|
||||
|
||||
await knex(TableName.SuperAdmin).insert([
|
||||
// eslint-disable-next-line
|
||||
// @ts-ignore
|
||||
|
||||
@@ -415,6 +415,7 @@ const cryptographyFactory = () => {
|
||||
|
||||
if (process.env.FIPS_ENABLED !== "true") {
|
||||
logger.info("[FIPS]: Instance is running in non-FIPS mode.");
|
||||
$setFipsModeEnabled(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user