Fix project seed (seeds old projects that can be upgraded)

This commit is contained in:
Daniel Hougaard
2024-02-22 05:00:25 +01:00
parent f47fdfe386
commit f2c36c58f9
3 changed files with 57 additions and 7 deletions
+11 -1
View File
@@ -1,3 +1,4 @@
/* eslint-disable import/no-mutable-exports */
import crypto from "node:crypto";
import argon2, { argon2id } from "argon2";
@@ -15,9 +16,12 @@ import {
import { TSecrets, TUserEncryptionKeys } from "./schemas";
export let userPrivateKey: string | undefined;
export let userPublicKey: string | undefined;
export const seedData1 = {
id: "3dafd81d-4388-432b-a4c5-f735616868c1",
email: "[email protected]",
email: process.env.TEST_USER_EMAIL || "[email protected]",
password: process.env.TEST_USER_PASSWORD || "testInfisical@1",
organization: {
id: "180870b7-f464-4740-8ffe-9d11c9245ea7",
@@ -42,6 +46,12 @@ export const seedData1 = {
},
token: {
id: "a9dfafba-a3b7-42e3-8618-91abb702fd36"
},
// We set these values during user creation, and later re-use them during project seeding.
encryptionKeys: {
publicKey: "",
privateKey: ""
}
};