Skip to content

Commit

Permalink
feat(js): added a verdaccio listen address to configuration
Browse files Browse the repository at this point in the history
Added a Verdaccio listen address to the configuration so that you are able to configure the listen address of Verdaccio.
  • Loading branch information
William van der Vegt authored and AgentEnder committed Jul 24, 2024
1 parent 918b8fb commit 382b90f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/js/src/executors/verdaccio/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export interface VerdaccioExecutorSchema {
location: 'global' | 'user' | 'project' | 'none';
storage?: string;
port?: number;
listenAddress?: string;
config?: string;
clear?: boolean;
}
4 changes: 4 additions & 0 deletions packages/js/src/executors/verdaccio/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion packages/js/src/executors/verdaccio/verdaccio.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ 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;
}
Expand Down

0 comments on commit 382b90f

Please sign in to comment.