(npmRegistry: string, npmRegistryUrl: string)
| 132 | }; |
| 133 | |
| 134 | const getNpmAuthToken = async (npmRegistry: string, npmRegistryUrl: string) => { |
| 135 | let npmAuthToken = process.env.NPM_TOKEN; |
| 136 | if (npmRegistry === 'local') { |
| 137 | npmAuthToken = await registerUser(npmRegistryUrl); |
| 138 | } |
| 139 | |
| 140 | if (!npmAuthToken) { |
| 141 | throw new Error('Missing NPM authentication token'); |
| 142 | } |
| 143 | |
| 144 | return npmAuthToken; |
| 145 | }; |
| 146 | |
| 147 | const prePublishSetup = async (npmRegistry: string, releaseBranch?: string) => { |
| 148 | const npmRegistryUrl = getNpmRegistryUrl(npmRegistry); |
no test coverage detected