diff --git a/docs/generated/packages/js/executors/verdaccio.json b/docs/generated/packages/js/executors/verdaccio.json index 2591b416bc69f..7bf72585df9aa 100644 --- a/docs/generated/packages/js/executors/verdaccio.json +++ b/docs/generated/packages/js/executors/verdaccio.json @@ -23,6 +23,10 @@ "type": "number", "description": "Port of local registry that Verdaccio should listen to" }, + "listenAddress": { + "type": "string", + "description": "Listen address that Verdaccio should listen to" + }, "config": { "type": "string", "description": "Path to the custom Verdaccio config file" diff --git a/packages/js/src/executors/verdaccio/schema.d.ts b/packages/js/src/executors/verdaccio/schema.d.ts index 3af9bfc76a952..a8a47e1937507 100644 --- a/packages/js/src/executors/verdaccio/schema.d.ts +++ b/packages/js/src/executors/verdaccio/schema.d.ts @@ -2,6 +2,7 @@ export interface VerdaccioExecutorSchema { location: 'global' | 'user' | 'project' | 'none'; storage?: string; port?: number; + listenAddress?: string; config?: string; clear?: boolean; scopes?: string[]; diff --git a/packages/js/src/executors/verdaccio/schema.json b/packages/js/src/executors/verdaccio/schema.json index bb619f8b0f4e2..4bd7a0ee83e1d 100644 --- a/packages/js/src/executors/verdaccio/schema.json +++ b/packages/js/src/executors/verdaccio/schema.json @@ -20,6 +20,10 @@ "type": "number", "description": "Port of local registry that Verdaccio should listen to" }, + "listenAddress": { + "type": "string", + "description": "Listen address that Verdaccio should listen to" + }, "config": { "type": "string", "description": "Path to the custom Verdaccio config file" diff --git a/packages/js/src/executors/verdaccio/verdaccio.impl.ts b/packages/js/src/executors/verdaccio/verdaccio.impl.ts index 7667c95bc7f10..f8db563666c2f 100644 --- a/packages/js/src/executors/verdaccio/verdaccio.impl.ts +++ b/packages/js/src/executors/verdaccio/verdaccio.impl.ts @@ -126,7 +126,10 @@ function createVerdaccioOptions( options.port ??= 4873; // set default port if config is not provided } if (options.port) { - verdaccioArgs.push('--listen', options.port.toString()); + const listenAddress = options.listenAddress + ? `${options.listenAddress}:${options.port.toString()}` + : options.port.toString(); + verdaccioArgs.push('--listen', listenAddress); } return verdaccioArgs; }