Maps the prefix of an NVM API key (<prefix>:<jwt>) to the environment the
key targets. This is the inverse of the backend's addPrefixToToken: a key
minted for staging_sandbox carries the prefix sandbox-staging, i.e.
{env}-{deployment} on the wire maps to {deployment}_{env} here.
Parameters
nvmApiKey: string
The full NVM API key (<prefix>:<jwt>), or a bare JWT.
The mapped EnvironmentName, or undefined when the key has
no prefix or the prefix is not recognized (caller falls back to the
deprecated environment option, else custom).
Maps the prefix of an NVM API key (
<prefix>:<jwt>) to the environment the key targets. This is the inverse of the backend'saddPrefixToToken: a key minted forstaging_sandboxcarries the prefixsandbox-staging, i.e.{env}-{deployment}on the wire maps to{deployment}_{env}here.