@@ -14,7 +14,7 @@ import {
14
14
chain ,
15
15
} from '@angular-devkit/schematics' ;
16
16
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks' ;
17
- import * as http from 'http ' ;
17
+ import * as https from 'https ' ;
18
18
import {
19
19
EMPTY ,
20
20
Observable ,
@@ -81,14 +81,14 @@ function _getNpmPackageJson(
81
81
packageName : string ,
82
82
logger : logging . LoggerApi ,
83
83
) : Observable < JsonObject > {
84
- const url = `http ://registry.npmjs.org/${ packageName . replace ( / \/ / g, '%2F' ) } ` ;
84
+ const url = `https ://registry.npmjs.org/${ packageName . replace ( / \/ / g, '%2F' ) } ` ;
85
85
logger . debug ( `Getting package.json from ${ JSON . stringify ( packageName ) } ...` ) ;
86
86
87
87
let maybeRequest = npmPackageJsonCache . get ( url ) ;
88
88
if ( ! maybeRequest ) {
89
89
const subject = new ReplaySubject < JsonObject > ( 1 ) ;
90
90
91
- const request = http . request ( url , response => {
91
+ const request = https . request ( url , response => {
92
92
let data = '' ;
93
93
response . on ( 'data' , chunk => data += chunk ) ;
94
94
response . on ( 'end' , ( ) => {
@@ -211,7 +211,7 @@ function _getRecursiveVersions(
211
211
212
212
/**
213
213
* Use a Rule which can return an observable, but do not actually modify the Tree.
214
- * This rules perform an HTTP request to get the npm registry package.json, then resolve the
214
+ * This rules perform an HTTPS request to get the npm registry package.json, then resolve the
215
215
* version from the options, and replace the version in the options by an actual version.
216
216
* @param supportedPackages A list of packages to update (at the same version).
217
217
* @param maybeVersion A version to update those packages to.
0 commit comments