simple-docker-registry-client
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -21,3 +21,3 @@ 'use strict'; | ||
var getToken = function () { | ||
var _ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee(challenge, creds, opts) { | ||
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(challenge, creds, opts) { | ||
var auth, res; | ||
@@ -68,3 +68,3 @@ return _regenerator2.default.wrap(function _callee$(_context) { | ||
var registryRequest = function () { | ||
var _ref2 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark(function _callee2(endpoint, opts) { | ||
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(endpoint, opts) { | ||
var creds, url, initialAuth, res, authChallenge, token, err; | ||
@@ -94,3 +94,3 @@ return _regenerator2.default.wrap(function _callee2$(_context2) { | ||
authChallenge = new _parsers2.default.WWW_Authenticate(res.headers.get('WWW-Authenticate')); | ||
authChallenge = new _parsers2.default.WWW_Authenticate(res.headers.get('WWW-Authenticate').split(',')[0]); | ||
@@ -135,28 +135,30 @@ if (!(authChallenge.scheme === 'Basic')) { | ||
if (!(res.status === 404)) { | ||
_context2.next = 29; | ||
_context2.next = 30; | ||
break; | ||
} | ||
_context2.next = 24; | ||
return res.text(); | ||
_context2.t0 = tryJSON; | ||
_context2.next = 25; | ||
return res.textConverted(); | ||
case 24: | ||
_context2.t0 = _context2.sent; | ||
_context2.t1 = url; | ||
_context2.t2 = tryJSON(_context2.t0, _context2.t1); | ||
case 25: | ||
_context2.t1 = _context2.sent; | ||
_context2.t2 = url; | ||
_context2.t3 = (0, _context2.t0)(_context2.t1, _context2.t2); | ||
err = { | ||
body: _context2.t2 | ||
body: _context2.t3 | ||
}; | ||
throw err; | ||
case 29: | ||
_context2.next = 31; | ||
return res.text(); | ||
case 30: | ||
_context2.t4 = tryJSON; | ||
_context2.next = 33; | ||
return res.textConverted(); | ||
case 31: | ||
_context2.t3 = _context2.sent; | ||
_context2.t4 = url; | ||
return _context2.abrupt('return', tryJSON(_context2.t3, _context2.t4)); | ||
case 33: | ||
_context2.t5 = _context2.sent; | ||
_context2.t6 = url; | ||
return _context2.abrupt('return', (0, _context2.t4)(_context2.t5, _context2.t6)); | ||
case 34: | ||
case 36: | ||
case 'end': | ||
@@ -203,3 +205,3 @@ return _context2.stop(); | ||
function tryJSON(input) { | ||
var url = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1]; | ||
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | ||
@@ -206,0 +208,0 @@ try { |
{ | ||
"name": "simple-docker-registry-client", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "A simple docker registry client for Node", | ||
@@ -29,3 +29,3 @@ "main": "lib/index.js", | ||
"babel-runtime": "^6.9.2", | ||
"node-fetch": "^1.5.3", | ||
"node-fetch": "^2.6.1", | ||
"www-authenticate": "^0.6.2" | ||
@@ -32,0 +32,0 @@ }, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11782
235
6
2
+ Addednode-fetch@2.7.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedencoding@0.1.13(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-stream@1.1.0(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedsafer-buffer@2.1.2(transitive)
Updatednode-fetch@^2.6.1