mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 20:28:54 +00:00
make skipMultilineEncoding null|undefined|bool
This commit is contained in:
@@ -23,7 +23,7 @@ export const SecretsSchema = z.object({
|
|||||||
secretCommentTag: z.string().nullable().optional(),
|
secretCommentTag: z.string().nullable().optional(),
|
||||||
secretReminderNote: z.string().nullable().optional(),
|
secretReminderNote: z.string().nullable().optional(),
|
||||||
secretReminderRepeatDays: z.number().nullable().optional(),
|
secretReminderRepeatDays: z.number().nullable().optional(),
|
||||||
skipMultilineEncoding: z.boolean().default(false).optional(),
|
skipMultilineEncoding: z.boolean().default(false).nullable().optional(),
|
||||||
algorithm: z.string().default("aes-256-gcm"),
|
algorithm: z.string().default("aes-256-gcm"),
|
||||||
keyEncoding: z.string().default("utf8"),
|
keyEncoding: z.string().default("utf8"),
|
||||||
metadata: z.unknown().nullable().optional(),
|
metadata: z.unknown().nullable().optional(),
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ export const interpolateSecrets = ({ projectId, secretEncKey, secretDAL, folderD
|
|||||||
};
|
};
|
||||||
|
|
||||||
const expandSecrets = async (
|
const expandSecrets = async (
|
||||||
secrets: Record<string, { value: string; comment?: string; skipMultilineEncoding?: boolean }>
|
secrets: Record<string, { value: string; comment?: string; skipMultilineEncoding: boolean | null | undefined }>
|
||||||
) => {
|
) => {
|
||||||
const expandedSec: Record<string, string> = {};
|
const expandedSec: Record<string, string> = {};
|
||||||
const interpolatedSec: Record<string, string> = {};
|
const interpolatedSec: Record<string, string> = {};
|
||||||
|
|||||||
@@ -976,13 +976,18 @@ export const secretServiceFactory = ({
|
|||||||
secretValue: string;
|
secretValue: string;
|
||||||
secretComment?: string;
|
secretComment?: string;
|
||||||
secretPath: string;
|
secretPath: string;
|
||||||
skipMultilineEncoding?: boolean;
|
skipMultilineEncoding: boolean | null | undefined;
|
||||||
}[]
|
}[]
|
||||||
) => {
|
) => {
|
||||||
// Group secrets by secretPath
|
// Group secrets by secretPath
|
||||||
const secretsByPath: Record<
|
const secretsByPath: Record<
|
||||||
string,
|
string,
|
||||||
{ secretKey: string; secretValue: string; secretComment?: string; skipMultilineEncoding?: boolean }[]
|
{
|
||||||
|
secretKey: string;
|
||||||
|
secretValue: string;
|
||||||
|
secretComment?: string;
|
||||||
|
skipMultilineEncoding: boolean | null | undefined;
|
||||||
|
}[]
|
||||||
> = {};
|
> = {};
|
||||||
|
|
||||||
secretBatch.forEach((secret) => {
|
secretBatch.forEach((secret) => {
|
||||||
@@ -999,7 +1004,10 @@ export const secretServiceFactory = ({
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const secretRecord: Record<string, { value: string; comment?: string; skipMultilineEncoding?: boolean }> = {};
|
const secretRecord: Record<
|
||||||
|
string,
|
||||||
|
{ value: string; comment?: string; skipMultilineEncoding: boolean | null | undefined }
|
||||||
|
> = {};
|
||||||
secretsByPath[secPath].forEach((decryptedSecret) => {
|
secretsByPath[secPath].forEach((decryptedSecret) => {
|
||||||
secretRecord[decryptedSecret.secretKey] = {
|
secretRecord[decryptedSecret.secretKey] = {
|
||||||
value: decryptedSecret.secretValue,
|
value: decryptedSecret.secretValue,
|
||||||
|
|||||||
Reference in New Issue
Block a user