MCPcopy
hub / github.com/Dokploy/dokploy / normalizeS3Path

Function normalizeS3Path

packages/server/src/utils/backups/utils.ts:62–67  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

60 new Date().toISOString().replace(/[:.]/g, "-");
61
62export const normalizeS3Path = (prefix: string) => {
63 // Trim whitespace and remove leading/trailing slashes
64 const normalizedPrefix = prefix.trim().replace(/^\/+|\/+$/g, "");
65 // Return empty string if prefix is empty, otherwise append trailing slash
66 return normalizedPrefix ? `${normalizedPrefix}/` : "";
67};
68
69export const getS3Credentials = (destination: Destination) => {
70 const { accessKey, secretAccessKey, region, endpoint, provider } =

Callers 12

backupVolumeFunction · 0.90
cleanupOldVolumeBackupsFunction · 0.90
runMySqlBackupFunction · 0.90
runMongoBackupFunction · 0.90
keepLatestNBackupsFunction · 0.90
runWebServerBackupFunction · 0.90
runComposeBackupFunction · 0.90
runLibsqlBackupFunction · 0.90
runPostgresBackupFunction · 0.90
runMariadbBackupFunction · 0.90
backups.test.tsFile · 0.90
backup.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected