(raw: string)
| 2254 | }; |
| 2255 | |
| 2256 | const sanitizeProfileName = (raw: string): string => { |
| 2257 | const cleaned = raw |
| 2258 | .trim() |
| 2259 | .replace(/[^A-Za-z0-9_.-]+/g, "-") |
| 2260 | .replace(/^-+|-+$/g, ""); |
| 2261 | return cleaned.length > 0 ? cleaned : "server"; |
| 2262 | }; |
| 2263 | |
| 2264 | // The (origin, user, org) a stored oauth profile authenticates as, lets us |
| 2265 | // recognize a re-login to the SAME account (update in place) versus a |
no test coverage detected