(remoteRoot: string)
| 10 | } |
| 11 | |
| 12 | export function sanitizeS3RemoteRoot(remoteRoot: string): string { |
| 13 | return stripControlChars(remoteRoot) |
| 14 | .trim() |
| 15 | .replace(/^\/+|\/+$/g, "") |
| 16 | .replace(/\/{2,}/g, "/") |
| 17 | .toLowerCase(); |
| 18 | } |
| 19 | |
| 20 | export function normalizeS3Key(remoteRoot: string, path: string): string { |
| 21 | const root = sanitizeS3RemoteRoot(remoteRoot) || DEFAULT_S3_REMOTE_ROOT; |
no test coverage detected