File tree Expand file tree Collapse file tree 4 files changed +11
-3
lines changed
etc/api/angular_devkit/schematics/tools
packages/angular_devkit/schematics Expand file tree Collapse file tree 4 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ export declare class NodeWorkflow extends workflow.BaseWorkflow {
135135 dryRun ?: boolean ;
136136 root ?: Path ;
137137 packageManager ?: string ;
138+ packageRegistry ?: string ;
138139 registry ?: schema . CoreSchemaRegistry ;
139140 resolvePaths ?: string [ ] ;
140141 } ) ;
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ import { Observable } from 'rxjs';
1313import { TaskExecutor , UnsuccessfulWorkflowExecution } from '../../src' ;
1414import { NodePackageTaskFactoryOptions , NodePackageTaskOptions } from './options' ;
1515
16- type PackageManagerProfile = {
16+ interface PackageManagerProfile {
1717 quietArgument ?: string ;
1818 commands : {
1919 installAll ?: string ;
2020 installPackage : string ;
21- } ,
22- } ;
21+ } ;
22+ }
2323
2424const packageManagers : { [ name : string ] : PackageManagerProfile } = {
2525 'npm' : {
@@ -99,6 +99,10 @@ export default function(
9999 args . push ( taskPackageManagerProfile . quietArgument ) ;
100100 }
101101
102+ if ( factoryOptions . registry ) {
103+ args . push ( `--registry="${ factoryOptions . registry } "` ) ;
104+ }
105+
102106 return new Observable ( obs => {
103107 const spinner = ora ( {
104108 text : 'Installing packages...' ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export interface NodePackageTaskFactoryOptions {
1111 rootDirectory ?: string ;
1212 packageManager ?: string ;
1313 allowPackageManagerOverride ?: boolean ;
14+ registry ?: string ;
1415}
1516
1617export interface NodePackageTaskOptions {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export class NodeWorkflow extends workflow.BaseWorkflow {
2424 dryRun ?: boolean ;
2525 root ?: Path ;
2626 packageManager ?: string ;
27+ packageRegistry ?: string ;
2728 registry ?: schema . CoreSchemaRegistry ;
2829 resolvePaths ?: string [ ] ,
2930 } ,
@@ -44,6 +45,7 @@ export class NodeWorkflow extends workflow.BaseWorkflow {
4445 allowPackageManagerOverride : true ,
4546 packageManager : options . packageManager ,
4647 rootDirectory : options . root && getSystemPath ( options . root ) ,
48+ registry : options . packageRegistry ,
4749 } ,
4850 ) ;
4951 engineHost . registerTaskExecutor (
You can’t perform that action at this time.
0 commit comments