@salesforce/plugin-release-management
Version:
A plugin for preparing and publishing npm packages
33 lines (32 loc) • 1.05 kB
TypeScript
export declare class Registry {
registryUrl?: string;
authToken?: string;
registryEntryLocal: string;
registryEntryGlobal: string;
private env;
constructor(registryUrl?: string, authToken?: string);
/**
* Return a properly formatted --registry string
*/
getRegistryParameter(): string;
/**
* Compare this.registryUrl against npm configs and write registry entry "registry" entry to <packageDir>/.npmrc
* if either is not equal
*
* @param packageDirectory
*/
setNpmRegistry(packageDirectory: string): Promise<void>;
/**
* Examine the current npm configs to see if the registry has
* the authToken set.
* If not write the authToken to <packageDir>/.npmrc
*
* @param packageDirectory
*/
setNpmAuth(packageDirectory: string): Promise<void>;
loadNpmConfigs(): void;
readNpmrc(packageDir: string): Promise<string[]>;
writeNpmrc(packageDir: string, npmrc: string[]): Promise<void>;
private normalizeRegistryUrl;
private init;
}