Skip to content

Commit

Permalink
feat(js): added a verdaccio listen address to configuration (#26976)
Browse files Browse the repository at this point in the history
Co-authored-by: William van der Vegt <[email protected]>
Co-authored-by: Craigory Coppola <[email protected]>
  • Loading branch information
3 people authored Jul 25, 2024
1 parent a9c2f16 commit 50e08aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/generated/packages/js/executors/verdaccio.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
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;
scopes?: string[];
Expand Down
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
5 changes: 4 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,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;
}
Expand Down

0 comments on commit 50e08aa

Please sign in to comment.