(path: string)
| 30 | * @returns The normalized path, or undefined if invalid/empty |
| 31 | */ |
| 32 | const normalizeVaultMountPath = (path: string): string | undefined => { |
| 33 | const normalized = path.trim().replace(/^\/|\/$/g, ""); |
| 34 | if (!normalized || !vaultMountPathRegex.test(normalized)) { |
| 35 | return undefined; |
| 36 | } |
| 37 | return normalized; |
| 38 | }; |
| 39 | |
| 40 | type VaultLoginResult = { |
| 41 | client_token: string; |
no test coverage detected