(raw: string)
| 2332 | }; |
| 2333 | |
| 2334 | const sanitizeProfileName = (raw: string): string => { |
| 2335 | const cleaned = raw |
| 2336 | .trim() |
| 2337 | .replace(/[^A-Za-z0-9_.-]+/g, "-") |
| 2338 | .replace(/^-+|-+$/g, ""); |
| 2339 | return cleaned.length > 0 ? cleaned : "server"; |
| 2340 | }; |
| 2341 | |
| 2342 | // The (origin, user, org) a stored oauth profile authenticates as, lets us |
| 2343 | // recognize a re-login to the SAME account (update in place) versus a |
no test coverage detected