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