mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
update secretsDef in useMonacoCustomizations
The enum generated by the previous template string would have had syntax errors if the secret contained hyphens. This commit fixes it.
This commit is contained in:
@@ -314,10 +314,10 @@ export default function useMonacoCustomizations({
|
||||
if (!secretNames.secretNames) return;
|
||||
const secretsDef = `type SecretNames = ${secretNames.secretNames
|
||||
.map((secret: string) => `"${secret}"`)
|
||||
.join(" | ")}
|
||||
.join(" | ")} \n
|
||||
enum secrets {
|
||||
${secretNames.secretNames
|
||||
.map((secret: string) => `${secret} = "${secret}"`)
|
||||
.map((secret: string) => `"${secret}" = "${secret}"`)
|
||||
.join("\n")}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user