(x: string)
| 160 | //////////////////////////////////////////////////////////////////////////////// |
| 161 | |
| 162 | export const simpleTransRemotePrefix = (x: string) => { |
| 163 | if (x === undefined) { |
| 164 | return ""; |
| 165 | } |
| 166 | let y = path.posix.normalize(x.trim()); |
| 167 | if (y === undefined || y === "" || y === "/" || y === ".") { |
| 168 | return ""; |
| 169 | } |
| 170 | if (y.startsWith("/")) { |
| 171 | y = y.slice(1); |
| 172 | } |
| 173 | if (!y.endsWith("/")) { |
| 174 | y = `${y}/`; |
| 175 | } |
| 176 | return y; |
| 177 | }; |
| 178 | |
| 179 | export const DEFAULT_S3_CONFIG: S3Config = { |
| 180 | s3Endpoint: "", |