Spelling and grammar corrections

This commit is contained in:
Dom
2024-12-29 22:34:57 +10:00
parent ba45b27608
commit 2af8d6f565
208 changed files with 397 additions and 397 deletions

View File

@@ -15,7 +15,7 @@ const clearDb = async (): Promise<void> => {
console.log(tables);
await pg.end();
} catch (error) {
console.error("Error to clean database", error);
console.error("Error cleaning database", error);
} finally {
}
};

View File

@@ -30,7 +30,7 @@ export const createInvitation = async (
if (!result) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the user",
message: "Error creating the user",
});
}
const expiresIn24Hours = new Date();

View File

@@ -86,7 +86,7 @@ export const createApplication = async (
if (!newApplication) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the application",
message: "Error creating the application",
});
}
@@ -222,7 +222,7 @@ export const deployApplication = async ({
applicationName: application.name,
applicationType: "application",
// @ts-ignore
errorMessage: error?.message || "Error to build",
errorMessage: error?.message || "Error building",
buildLink,
adminId: application.project.adminId,
});
@@ -352,7 +352,7 @@ export const deployRemoteApplication = async ({
applicationName: application.name,
applicationType: "application",
// @ts-ignore
errorMessage: error?.message || "Error to build",
errorMessage: error?.message || "Error building",
buildLink,
adminId: application.project.adminId,
});

View File

@@ -34,7 +34,7 @@ export const createAdmin = async (input: typeof apiCreateAdmin._type) => {
if (!newAuth) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the user",
message: "Error creating the user",
});
}
@@ -68,7 +68,7 @@ export const createUser = async (input: typeof apiCreateUser._type) => {
if (!res) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the user",
message: "Error creating the user",
});
}

View File

@@ -19,7 +19,7 @@ export const createBackup = async (input: typeof apiCreateBackup._type) => {
if (!newBackup) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the Backup",
message: "Error creating the Backup",
});
}

View File

@@ -28,7 +28,7 @@ export const createBitbucket = async (
if (!newGitProvider) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the git provider",
message: "Error creating the Bitbucket provider",
});
}

View File

@@ -254,7 +254,7 @@ export const deployCompose = async ({
applicationName: compose.name,
applicationType: "compose",
// @ts-ignore
errorMessage: error?.message || "Error to build",
errorMessage: error?.message || "Error building",
buildLink,
adminId: compose.project.adminId,
});
@@ -387,7 +387,7 @@ export const deployRemoteCompose = async ({
applicationName: compose.name,
applicationType: "compose",
// @ts-ignore
errorMessage: error?.message || "Error to build",
errorMessage: error?.message || "Error building",
buildLink,
adminId: compose.project.adminId,
});

View File

@@ -93,7 +93,7 @@ export const createDeployment = async (
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
return deploymentCreate[0];
@@ -102,7 +102,7 @@ export const createDeployment = async (
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
};
@@ -159,7 +159,7 @@ export const createDeploymentPreview = async (
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
return deploymentCreate[0];
@@ -170,7 +170,7 @@ export const createDeploymentPreview = async (
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
};
@@ -221,7 +221,7 @@ echo "Initializing deployment" >> ${logFilePath};
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
return deploymentCreate[0];
@@ -232,7 +232,7 @@ echo "Initializing deployment" >> ${logFilePath};
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
};
@@ -247,7 +247,7 @@ export const removeDeployment = async (deploymentId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to delete this deployment",
message: "Error deleting this deployment",
});
}
};
@@ -497,14 +497,14 @@ export const createServerDeployment = async (
if (deploymentCreate.length === 0 || !deploymentCreate[0]) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
return deploymentCreate[0];
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the deployment",
message: "Error creating the deployment",
});
}
};

View File

@@ -28,7 +28,7 @@ export const createGithub = async (
if (!newGitProvider) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the git provider",
message: "Error creating the Git provider",
});
}

View File

@@ -29,7 +29,7 @@ export const createGitlab = async (
if (!newGitProvider) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the git provider",
message: "Error creating the Git provider",
});
}

View File

@@ -52,7 +52,7 @@ export const createMount = async (input: typeof apiCreateMount._type) => {
if (!value) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error input: Inserting mount",
message: "Error inserting mount",
});
}
@@ -64,7 +64,7 @@ export const createMount = async (input: typeof apiCreateMount._type) => {
console.log(error);
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the mount",
message: "Error creating the mount",
cause: error,
});
}
@@ -88,10 +88,10 @@ export const createFileMount = async (mountId: string) => {
await createFile(baseFilePath, mount.filePath || "", mount.content || "");
}
} catch (error) {
console.log(`Error to create the file mount: ${error}`);
console.log(`Error creating the file mount: ${error}`);
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the mount",
message: "Error creating the mount",
cause: error,
});
}

View File

@@ -112,7 +112,7 @@ export const removePreviewDeployment = async (previewDeploymentId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to delete this preview deployment",
message: "Error deleting this preview deployment",
});
}
};
@@ -189,7 +189,7 @@ export const createPreviewDeployment = async (
if (!previewDeployment) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the preview deployment",
message: "Error creating the preview deployment",
});
}

View File

@@ -30,7 +30,7 @@ export const createProject = async (
if (!newProject) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the project",
message: "Error creating the project",
});
}

View File

@@ -40,7 +40,7 @@ export const createRedirect = async (
if (!redirect) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the redirect",
message: "Error creating the redirect",
});
}
@@ -53,7 +53,7 @@ export const createRedirect = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create this redirect",
message: "Error creating this redirect",
cause: error,
});
}
@@ -82,7 +82,7 @@ export const removeRedirectById = async (redirectId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to remove this redirect",
message: "Error removing this redirect",
cause: error,
});
}
@@ -116,7 +116,7 @@ export const updateRedirectById = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to update this redirect",
message: "Error updating this redirect",
});
}
};

View File

@@ -71,7 +71,7 @@ export const removeRegistry = async (registryId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to remove this registry",
message: "Error removing this registry",
cause: error,
});
}
@@ -114,7 +114,7 @@ export const updateRegistry = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to update this registry",
message: "Error updating this registry",
});
}
};

View File

@@ -41,7 +41,7 @@ export const createSecurity = async (
if (!securityResponse) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the security",
message: "Error creating the security",
});
}
await createSecurityMiddleware(application, securityResponse);
@@ -50,7 +50,7 @@ export const createSecurity = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create this security",
message: "Error creating this security",
cause: error,
});
}
@@ -78,7 +78,7 @@ export const deleteSecurityById = async (securityId: string) => {
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to remove this security",
message: "Error removing this security",
});
}
};
@@ -100,7 +100,7 @@ export const updateSecurityById = async (
} catch (error) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to update this security",
message: "Error updating this security",
});
}
};

View File

@@ -21,7 +21,7 @@ export const createServer = async (
if (!newServer) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the server",
message: "Error creating the server",
});
}

View File

@@ -21,7 +21,7 @@ export const createSshKey = async (input: typeof apiCreateSshKey._type) => {
if (!sshKey) {
throw new TRPCError({
code: "BAD_REQUEST",
message: "Error to create the ssh key",
message: "Error creating the SSH Key",
});
}
return sshKey;

View File

@@ -111,7 +111,7 @@ class LogRotationManager {
);
console.log("USR1 Signal send to Traefik");
} catch (error) {
console.error("Error to send USR1 Signal to Traefik:", error);
console.error("Error sending USR1 Signal to Traefik:", error);
}
}
public async getStatus(): Promise<boolean> {

View File

@@ -39,7 +39,7 @@ export const removeFileOrDirectory = async (path: string) => {
try {
await execAsync(`rm -rf ${path}`);
} catch (error) {
console.error(`Error to remove ${path}: ${error}`);
console.error(`Error removing ${path}: ${error}`);
throw error;
}
};
@@ -58,7 +58,7 @@ export const removeDirectoryCode = async (
await execAsync(command);
}
} catch (error) {
console.error(`Error to remove ${directoryPath}: ${error}`);
console.error(`Error removing ${directoryPath}: ${error}`);
throw error;
}
};
@@ -77,7 +77,7 @@ export const removeComposeDirectory = async (
await execAsync(command);
}
} catch (error) {
console.error(`Error to remove ${directoryPath}: ${error}`);
console.error(`Error removing ${directoryPath}: ${error}`);
throw error;
}
};
@@ -96,7 +96,7 @@ export const removeMonitoringDirectory = async (
await execAsync(command);
}
} catch (error) {
console.error(`Error to remove ${directoryPath}: ${error}`);
console.error(`Error removing ${directoryPath}: ${error}`);
throw error;
}
};

View File

@@ -19,7 +19,7 @@ export const getPublicIpWithFallback = async () => {
ip = await publicIpv4();
} catch (error) {
console.log(
"Error to obtain public IPv4 address, falling back to IPv6",
"Error obtaining public IPv4 address, falling back to IPv6",
// @ts-ignore
error.message,
);
@@ -27,7 +27,7 @@ export const getPublicIpWithFallback = async () => {
ip = await publicIpv6();
} catch (error) {
// @ts-ignore
console.error("Error to obtain public IPv6 address", error.message);
console.error("Error obtaining public IPv6 address", error.message);
ip = null;
}
}