fix(config): 🐛 Expand contexts in which the config will autogenerate keys

This commit is contained in:
Jesse Wierzbinski 2025-04-01 20:32:43 +02:00
parent 14855b9dfe
commit 9840b5e10f
No known key found for this signature in database

View file

@ -136,12 +136,12 @@ export const filePathString = z
export const keyPair = z
.strictObject({
public: sensitiveString,
private: sensitiveString,
public: sensitiveString.optional(),
private: sensitiveString.optional(),
})
.optional()
.transform(async (k, ctx) => {
if (!k) {
if (!(k?.public && k?.private)) {
const keys = await crypto.subtle.generateKey("Ed25519", true, [
"sign",
"verify",