diff --git a/node_modules/uid-number/LICENSE b/node_modules/uid-number/LICENSE deleted file mode 100644 index 05eeeb88c2ef4..0000000000000 --- a/node_modules/uid-number/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/uid-number/README.md b/node_modules/uid-number/README.md deleted file mode 100644 index 81166753aba55..0000000000000 --- a/node_modules/uid-number/README.md +++ /dev/null @@ -1,17 +0,0 @@ -Use this module to convert a username/groupname to a uid/gid number. - -Usage: - -``` -npm install uid-number -``` - -Then, in your node program: - -```javascript -var uidNumber = require("uid-number") -uidNumber("isaacs", function (er, uid, gid) { - // gid is null because we didn't ask for a group name - // uid === 24561 because that's my number. -}) -``` diff --git a/node_modules/uid-number/get-uid-gid.js b/node_modules/uid-number/get-uid-gid.js deleted file mode 100755 index 0b391748a9327..0000000000000 --- a/node_modules/uid-number/get-uid-gid.js +++ /dev/null @@ -1,24 +0,0 @@ -if (module !== require.main) { - throw new Error("This file should not be loaded with require()") -} - -if (!process.getuid || !process.getgid) { - throw new Error("this file should not be called without uid/gid support") -} - -var argv = process.argv.slice(2) - , user = argv[0] || process.getuid() - , group = argv[1] || process.getgid() - -if (!isNaN(user)) user = +user -if (!isNaN(group)) group = +group - -console.error([user, group]) - -try { - process.setgid(group) - process.setuid(user) - console.log(JSON.stringify({uid:+process.getuid(), gid:+process.getgid()})) -} catch (ex) { - console.log(JSON.stringify({error:ex.message,errno:ex.errno})) -} diff --git a/node_modules/uid-number/package.json b/node_modules/uid-number/package.json deleted file mode 100644 index 616223f68bcc9..0000000000000 --- a/node_modules/uid-number/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "name": "uid-number", - "description": "Convert a username/group name to a uid/gid number", - "version": "0.0.6", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/uid-number.git" - }, - "main": "uid-number.js", - "dependencies": {}, - "devDependencies": {}, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "license": "ISC" -} diff --git a/node_modules/uid-number/uid-number.js b/node_modules/uid-number/uid-number.js deleted file mode 100644 index bd62184fda7a9..0000000000000 --- a/node_modules/uid-number/uid-number.js +++ /dev/null @@ -1,59 +0,0 @@ -module.exports = uidNumber - -// This module calls into get-uid-gid.js, which sets the -// uid and gid to the supplied argument, in order to find out their -// numeric value. This can't be done in the main node process, -// because otherwise node would be running as that user from this -// point on. - -var child_process = require("child_process") - , path = require("path") - , uidSupport = process.getuid && process.setuid - , uidCache = {} - , gidCache = {} - -function uidNumber (uid, gid, cb) { - if (!uidSupport) return cb() - if (typeof cb !== "function") cb = gid, gid = null - if (typeof cb !== "function") cb = uid, uid = null - if (gid == null) gid = process.getgid() - if (uid == null) uid = process.getuid() - if (!isNaN(gid)) gid = gidCache[gid] = +gid - if (!isNaN(uid)) uid = uidCache[uid] = +uid - - if (uidCache.hasOwnProperty(uid)) uid = uidCache[uid] - if (gidCache.hasOwnProperty(gid)) gid = gidCache[gid] - - if (typeof gid === "number" && typeof uid === "number") { - return process.nextTick(cb.bind(null, null, uid, gid)) - } - - var getter = require.resolve("./get-uid-gid.js") - - child_process.execFile( process.execPath - , [getter, uid, gid] - , function (code, out, stderr) { - if (code) { - var er = new Error("could not get uid/gid\n" + stderr) - er.code = code - return cb(er) - } - - try { - out = JSON.parse(out+"") - } catch (ex) { - return cb(ex) - } - - if (out.error) { - var er = new Error(out.error) - er.errno = out.errno - return cb(er) - } - - if (isNaN(out.uid) || isNaN(out.gid)) return cb(new Error( - "Could not get uid/gid: "+JSON.stringify(out))) - - cb(null, uidCache[uid] = +out.uid, gidCache[gid] = +out.gid) - }) -} diff --git a/package-lock.json b/package-lock.json index fa3cb383ac988..8b42fe9d0fdf7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,7 +78,6 @@ "tar", "text-table", "tiny-relative-date", - "uid-number", "umask", "uuid", "validate-npm-package-name", @@ -157,7 +156,6 @@ "tar": "^6.0.5", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", - "uid-number": "0.0.6", "umask": "~1.1.0", "uuid": "^8.3.0", "validate-npm-package-name": "~3.0.0", @@ -7922,15 +7920,6 @@ "node": ">=4.2.0" } }, - "node_modules/uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=", - "inBundle": true, - "engines": { - "node": "*" - } - }, "node_modules/umask": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", @@ -14277,11 +14266,6 @@ "integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==", "dev": true }, - "uid-number": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz", - "integrity": "sha1-DqEOgDXo61uOREnwbaHHMGY7qoE=" - }, "umask": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz", diff --git a/package.json b/package.json index 63c355888802b..9e01314557199 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,6 @@ "tar": "^6.0.5", "text-table": "~0.2.0", "tiny-relative-date": "^1.3.0", - "uid-number": "0.0.6", "umask": "~1.1.0", "uuid": "^8.3.0", "validate-npm-package-name": "~3.0.0", @@ -190,7 +189,6 @@ "tar", "text-table", "tiny-relative-date", - "uid-number", "umask", "uuid", "validate-npm-package-name",