refactor: remove comments

This commit is contained in:
Mauricio Siu 2024-05-18 03:08:30 -06:00
parent d52f66a716
commit 5a70e616e6
2 changed files with 1 additions and 29 deletions

View File

@ -101,35 +101,6 @@ const ServiceModeSwarmSchema = z.object({
const LabelsSwarmSchema = z.record(z.string());
// const stringToJSONSchema = z
// .string()
// .transform((str, ctx) => {
// try {
// return JSON.parse(str);
// } catch (e) {
// ctx.addIssue({ code: "custom", message: "Invalid JSON format" });
// return z.NEVER;
// }
// })
// .superRefine((data, ctx) => {
// const parseResult = HealthCheckSwarmSchema.safeParse(data);
// if (!parseResult.success) {
// for (const error of parseResult.error.issues) {
// const path = error.path.join(".");
// ctx.addIssue({
// code: z.ZodIssueCode.custom,
// message: `${path} ${error.message}`,
// });
// }
// // parseResult.error.errors.forEach((error) => {
// // const path = error.path.join(".");
// // ctx.addIssue({
// // code: z.ZodIssueCode.custom,
// // message: `${path} ${error.message}`,
// // });
// // });
// }
// });
const createStringToJSONSchema = (schema: z.ZodTypeAny) => {
return z
.string()

View File

@ -30,6 +30,7 @@ export const buildType = pgEnum("buildType", [
"nixpacks",
]);
// TODO: refactor this types
interface HealthCheckSwarm {
Test?: string[] | undefined;
Interval?: number | undefined;