(token)
| 62 | * the API before treating the connection as usable. |
| 63 | */ |
| 64 | export function isValidPatFormat(token) { |
| 65 | const trimmed = token?.trim() ?? ""; |
| 66 | if (trimmed.length === LEGACY_PAT_LENGTH) return true; |
| 67 | return trimmed.length === V1_PAT_LENGTH && trimmed.startsWith(V1_PAT_PREFIX); |
| 68 | } |
| 69 | |
| 70 | /** |
| 71 | * A short hash that recognises the same token entered twice (or `MARS_TOKEN` |
no outgoing calls
no test coverage detected