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 {
135
135
dryRun ?: boolean ;
136
136
root ?: Path ;
137
137
packageManager ?: string ;
138
+ packageRegistry ?: string ;
138
139
registry ?: schema . CoreSchemaRegistry ;
139
140
resolvePaths ?: string [ ] ;
140
141
} ) ;
Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ import { Observable } from 'rxjs';
13
13
import { TaskExecutor , UnsuccessfulWorkflowExecution } from '../../src' ;
14
14
import { NodePackageTaskFactoryOptions , NodePackageTaskOptions } from './options' ;
15
15
16
- type PackageManagerProfile = {
16
+ interface PackageManagerProfile {
17
17
quietArgument ?: string ;
18
18
commands : {
19
19
installAll ?: string ;
20
20
installPackage : string ;
21
- } ,
22
- } ;
21
+ } ;
22
+ }
23
23
24
24
const packageManagers : { [ name : string ] : PackageManagerProfile } = {
25
25
'npm' : {
@@ -99,6 +99,10 @@ export default function(
99
99
args . push ( taskPackageManagerProfile . quietArgument ) ;
100
100
}
101
101
102
+ if ( factoryOptions . registry ) {
103
+ args . push ( `--registry="${ factoryOptions . registry } "` ) ;
104
+ }
105
+
102
106
return new Observable ( obs => {
103
107
const spinner = ora ( {
104
108
text : 'Installing packages...' ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ export interface NodePackageTaskFactoryOptions {
11
11
rootDirectory ?: string ;
12
12
packageManager ?: string ;
13
13
allowPackageManagerOverride ?: boolean ;
14
+ registry ?: string ;
14
15
}
15
16
16
17
export interface NodePackageTaskOptions {
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ export class NodeWorkflow extends workflow.BaseWorkflow {
24
24
dryRun ?: boolean ;
25
25
root ?: Path ;
26
26
packageManager ?: string ;
27
+ packageRegistry ?: string ;
27
28
registry ?: schema . CoreSchemaRegistry ;
28
29
resolvePaths ?: string [ ] ,
29
30
} ,
@@ -44,6 +45,7 @@ export class NodeWorkflow extends workflow.BaseWorkflow {
44
45
allowPackageManagerOverride : true ,
45
46
packageManager : options . packageManager ,
46
47
rootDirectory : options . root && getSystemPath ( options . root ) ,
48
+ registry : options . packageRegistry ,
47
49
} ,
48
50
) ;
49
51
engineHost . registerTaskExecutor (
You can’t perform that action at this time.
0 commit comments