Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--node_modules/sha/LICENSE46
-rw-r--r--node_modules/sha/README.md49
-rw-r--r--node_modules/sha/index.js107
-rw-r--r--node_modules/sha/package.json22
-rw-r--r--package-lock.json19
-rw-r--r--package.json2
6 files changed, 0 insertions, 245 deletions
diff --git a/node_modules/sha/LICENSE b/node_modules/sha/LICENSE
deleted file mode 100644
index 048a6f99d..000000000
--- a/node_modules/sha/LICENSE
+++ /dev/null
@@ -1,46 +0,0 @@
-Copyright (c) 2013 Forbes Lindesay
-
-The BSD License
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The MIT License (MIT)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/node_modules/sha/README.md b/node_modules/sha/README.md
deleted file mode 100644
index 43742bf47..000000000
--- a/node_modules/sha/README.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# sha
-
-Check and get file hashes (using any algorithm)
-
-[![Build Status](https://img.shields.io/travis/ForbesLindesay/sha/master.svg)](https://travis-ci.org/ForbesLindesay/sha)
-[![Dependency Status](https://img.shields.io/david/ForbesLindesay/sha.svg)](https://david-dm.org/ForbesLindesay/sha)
-[![NPM version](https://img.shields.io/npm/v/sha.svg)](https://www.npmjs.com/package/sha)
-
-## Installation
-
- $ npm install sha
-
-## API
-
-### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])
-
-Asynchronously check that `fileName` has a "hash" of `expected`. The callback will be called with either `null` or an error (indicating that they did not match).
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-### get(fileName, [options,] cb) / getSync(filename, [options])
-
-Asynchronously get the "hash" of `fileName`. The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-### stream(expected, [options])
-
-Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:
-
-```js
-fs.createReadStream('src')
- .pipe(sha.stream('expected'))
- .pipe(fs.createWriteStream('dest'))
-```
-
-`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.
-
-Options:
-
-- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`
-
-## License
-
-You may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request. \ No newline at end of file
diff --git a/node_modules/sha/index.js b/node_modules/sha/index.js
deleted file mode 100644
index 3aed3e9cc..000000000
--- a/node_modules/sha/index.js
+++ /dev/null
@@ -1,107 +0,0 @@
-'use strict'
-
-var Transform = require('stream').Transform
-var crypto = require('crypto')
-var fs = require('graceful-fs')
-
-exports.check = check
-exports.checkSync = checkSync
-exports.get = get
-exports.getSync = getSync
-exports.stream = stream
-
-function check(file, expected, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = undefined
- }
- expected = expected.toLowerCase().trim()
- get(file, options, function (er, actual) {
- if (er) {
- if (er.message) er.message += ' while getting shasum for ' + file
- return cb(er)
- }
- if (actual === expected) return cb(null)
- cb(new Error(
- 'shasum check failed for ' + file + '\n'
- + 'Expected: ' + expected + '\n'
- + 'Actual: ' + actual))
- })
-}
-function checkSync(file, expected, options) {
- expected = expected.toLowerCase().trim()
- var actual
- try {
- actual = getSync(file, options)
- } catch (er) {
- if (er.message) er.message += ' while getting shasum for ' + file
- throw er
- }
- if (actual !== expected) {
- var ex = new Error(
- 'shasum check failed for ' + file + '\n'
- + 'Expected: ' + expected + '\n'
- + 'Actual: ' + actual)
- throw ex
- }
-}
-
-
-function get(file, options, cb) {
- if (typeof options === 'function') {
- cb = options
- options = undefined
- }
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
- var source = fs.createReadStream(file)
- var errState = null
- source
- .on('error', function (er) {
- if (errState) return
- return cb(errState = er)
- })
- .on('data', function (chunk) {
- if (errState) return
- hash.update(chunk)
- })
- .on('end', function () {
- if (errState) return
- var actual = hash.digest("hex").toLowerCase().trim()
- cb(null, actual)
- })
-}
-
-function getSync(file, options) {
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
- var source = fs.readFileSync(file)
- hash.update(source)
- return hash.digest("hex").toLowerCase().trim()
-}
-
-function stream(expected, options) {
- expected = expected.toLowerCase().trim()
- options = options || {}
- var algorithm = options.algorithm || 'sha1'
- var hash = crypto.createHash(algorithm)
-
- var stream = new Transform()
- stream._transform = function (chunk, encoding, callback) {
- hash.update(chunk)
- stream.push(chunk)
- callback()
- }
- stream._flush = function (cb) {
- var actual = hash.digest("hex").toLowerCase().trim()
- if (actual === expected) return cb(null)
- cb(new Error(
- 'shasum check failed for:\n'
- + ' Expected: ' + expected + '\n'
- + ' Actual: ' + actual))
- this.push(null)
- }
- return stream
-} \ No newline at end of file
diff --git a/node_modules/sha/package.json b/node_modules/sha/package.json
deleted file mode 100644
index aca50948e..000000000
--- a/node_modules/sha/package.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "name": "sha",
- "version": "3.0.0",
- "description": "Check and get file hashes",
- "files": [
- "index.js"
- ],
- "scripts": {
- "test": "mocha -R spec"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/ForbesLindesay/sha.git"
- },
- "license": "(BSD-2-Clause OR MIT)",
- "dependencies": {
- "graceful-fs": "^4.1.2"
- },
- "devDependencies": {
- "mocha": "~1.9.0"
- }
-}
diff --git a/package-lock.json b/package-lock.json
index ba561f672..0a69a3fd7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -64,7 +64,6 @@
"read-package-json-fast",
"rimraf",
"semver",
- "sha",
"slide",
"sorted-object",
"ssri",
@@ -134,7 +133,6 @@
"read-package-json-fast": "^1.2.1",
"rimraf": "^3.0.2",
"semver": "^7.3.2",
- "sha": "^3.0.0",
"slide": "~1.1.6",
"sorted-object": "~2.0.1",
"ssri": "^8.0.0",
@@ -5090,15 +5088,6 @@
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
"inBundle": true
},
- "node_modules/sha": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/sha/-/sha-3.0.0.tgz",
- "integrity": "sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw==",
- "inBundle": true,
- "dependencies": {
- "graceful-fs": "^4.1.2"
- }
- },
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -12070,14 +12059,6 @@
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
- "sha": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/sha/-/sha-3.0.0.tgz",
- "integrity": "sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw==",
- "requires": {
- "graceful-fs": "^4.1.2"
- }
- },
"shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
diff --git a/package.json b/package.json
index 855a199ea..2f0f1c95d 100644
--- a/package.json
+++ b/package.json
@@ -98,7 +98,6 @@
"read-package-json-fast": "^1.2.1",
"rimraf": "^3.0.2",
"semver": "^7.3.2",
- "sha": "^3.0.0",
"slide": "~1.1.6",
"sorted-object": "~2.0.1",
"ssri": "^8.0.0",
@@ -167,7 +166,6 @@
"read-package-json-fast",
"rimraf",
"semver",
- "sha",
"slide",
"sorted-object",
"ssri",