(raw: string)
| 2413 | }; |
| 2414 | |
| 2415 | const sanitizeProfileName = (raw: string): string => { |
| 2416 | const cleaned = raw |
| 2417 | .trim() |
| 2418 | .replace(/[^A-Za-z0-9_.-]+/g, "-") |
| 2419 | .replace(/^-+|-+$/g, ""); |
| 2420 | return cleaned.length > 0 ? cleaned : "server"; |
| 2421 | }; |
| 2422 | |
| 2423 | // The (origin, user, org) a stored oauth profile authenticates as, lets us |
| 2424 | // recognize a re-login to the SAME account (update in place) versus a |
no test coverage detected