1
- import { addAuth , emptyUpmConfig , UPMConfig } from "../domain/upm-config" ;
1
+ import { addAuth , emptyUpmConfig , UpmConfig } from "../domain/upm-config" ;
2
2
import { LoadUpmConfig , UpmAuth , UpmConfigContent } from "../io/upm-config-io" ;
3
3
import { NpmAuth } from "another-npm-registry-client" ;
4
4
import { decodeBase64 } from "../domain/base64" ;
@@ -12,12 +12,14 @@ import { coerceRegistryUrl } from "../domain/registry-url";
12
12
* will load it from the upmconfig.toml.
13
13
* @param upmConfigPath The path to the upmconfig.toml file.
14
14
*/
15
- export type LoadRegistryAuth = ( upmConfigPath : string ) => Promise < UPMConfig > ;
15
+ export type LoadRegistryAuth = ( upmConfigPath : string ) => Promise < UpmConfig > ;
16
16
17
17
/**
18
18
* Makes a {@link LoadRegistryAuth} function.
19
19
*/
20
- export function makeLoadRegistryAuth ( loadUpmConfig : LoadUpmConfig ) : LoadRegistryAuth {
20
+ export function makeLoadRegistryAuth (
21
+ loadUpmConfig : LoadUpmConfig
22
+ ) : LoadRegistryAuth {
21
23
return async ( upmConfigPath ) => {
22
24
function importNpmAuth ( input : UpmAuth ) : NpmAuth {
23
25
// Basic auth
@@ -43,7 +45,7 @@ export function makeLoadRegistryAuth(loadUpmConfig: LoadUpmConfig): LoadRegistry
43
45
} ) ;
44
46
}
45
47
46
- function importUpmConfig ( input : UpmConfigContent ) : UPMConfig {
48
+ function importUpmConfig ( input : UpmConfigContent ) : UpmConfig {
47
49
if ( input . npmAuth === undefined ) return { } ;
48
50
return recordEntries ( input . npmAuth )
49
51
. map (
0 commit comments