@verdaccio/config
Version:
Verdaccio Configuration
35 lines (34 loc) • 1.2 kB
TypeScript
import type { ListenAddress as ConfigListenAddress, Logger } from '@verdaccio/types';
export interface ListenAddress {
proto: string;
host?: string;
port?: string;
path?: string;
}
/**
* Parse an internet address
* Allow:
- https:localhost:1234 - protocol + host + port
- localhost:1234 - host + port
- 1234 - port
- http::1234 - protocol + port
- https://localhost:443/ - full url + https
- http://[::1]:443/ - ipv6
- unix:/tmp/http.sock - unix sockets
- https://unix:/tmp/http.sock - unix sockets (https)
* @param {*} urlAddress the internet address definition
* @return {Object|Null} literal object that represent the address parsed
*/
export declare function parseAddress(urlAddress: string): ListenAddress | null;
/**
* Retrieve all addresses defined in the config file.
* Verdaccio is able to listen multiple ports
* @param {String} argListen
* @param {String} configListen
* eg:
* listen:
- localhost:5555
- localhost:5557
@return {Array}
*/
export declare function getListenAddress(listen: ConfigListenAddress | string | undefined, logger: Logger): ListenAddress;