File tree Expand file tree Collapse file tree
packages/cli/src/commands/publish Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ interface PublishOptions {
1616 publishDir : string ;
1717 access : AccessType ;
1818 tag : string ;
19+ registry ?: string ;
1920}
2021
2122const npmRequestLimit = pLimit ( 40 ) ;
@@ -169,6 +170,10 @@ async function internalPublish(
169170 let publishFlags = opts . access ? [ "--access" , opts . access ] : [ ] ;
170171 publishFlags . push ( "--tag" , opts . tag ) ;
171172
173+ if ( opts . registry ) {
174+ publishFlags . push ( "--registry" , opts . registry ) ;
175+ }
176+
172177 if ( ( await twoFactorState . isRequired ) && ! isCI ) {
173178 let otpCode = await getOtpCode ( twoFactorState ) ;
174179 publishFlags . push ( "--otp" , otpCode ) ;
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ async function publishAPackage(
135135 : pkg . dir ,
136136 access : publishConfig ?. access || access ,
137137 tag,
138+ registry : publishConfig ?. registry ,
138139 } ,
139140 twoFactorState
140141 ) ;
You can’t perform that action at this time.
0 commit comments