(raw: string)
| 2403 | }; |
| 2404 | |
| 2405 | const sanitizeProfileName = (raw: string): string => { |
| 2406 | const cleaned = raw |
| 2407 | .trim() |
| 2408 | .replace(/[^A-Za-z0-9_.-]+/g, "-") |
| 2409 | .replace(/^-+|-+$/g, ""); |
| 2410 | return cleaned.length > 0 ? cleaned : "server"; |
| 2411 | }; |
| 2412 | |
| 2413 | // The (origin, user, org) a stored oauth profile authenticates as, lets us |
| 2414 | // recognize a re-login to the SAME account (update in place) versus a |
no test coverage detected