Merge branch 'canary' into hehehai/feat-server-custom-name

This commit is contained in:
Mauricio Siu
2024-06-08 14:37:51 -06:00
295 changed files with 43807 additions and 3328 deletions

View File

@@ -46,6 +46,7 @@ export const findProjectById = async (projectId: string) => {
mysql: true,
postgres: true,
redis: true,
compose: true,
},
});
if (!project) {
@@ -120,3 +121,12 @@ export const validUniqueServerAppName = async (appName: string) => {
return nonEmptyProjects.length === 0;
};
export const slugifyProjectName = (projectName: string): string => {
return projectName
.toLowerCase()
.replace(/[0-9]/g, "")
.replace(/[^a-z\s-]/g, "")
.replace(/\s+/g, "-")
.replace(/-+/g, "-")
.replace(/^-+|-+$/g, "");
};