@angular-devkit/core 9.1.4 → 9.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-devkit/core",
3
- "version": "9.1.4",
3
+ "version": "9.1.8",
4
4
  "description": "Angular DevKit - Core Utility Library",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  */
10
10
  const ajv = require("ajv");
11
11
  const http = require("http");
12
+ const https = require("https");
12
13
  const rxjs_1 = require("rxjs");
13
14
  const operators_1 = require("rxjs/operators");
14
15
  const Url = require("url");
@@ -81,7 +82,9 @@ class CoreSchemaRegistry {
81
82
  }
82
83
  // If none are found, handle using http client.
83
84
  return new Promise((resolve, reject) => {
84
- http.get(uri, res => {
85
+ const url = new Url.URL(uri);
86
+ const client = url.protocol === 'https:' ? https : http;
87
+ client.get(url, res => {
85
88
  if (!res.statusCode || res.statusCode >= 300) {
86
89
  // Consume the rest of the data to free memory.
87
90
  res.resume();