uawdijnntqw1x1x1
IP : 216.73.216.110
Hostname : 6.87.74.97.host.secureserver.net
Kernel : Linux 6.87.74.97.host.secureserver.net 4.18.0-553.83.1.el8_10.x86_64 #1 SMP Mon Nov 10 04:22:44 EST 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
emeraadmin
/
.caldav
/
..
/
.
/
www
/
node_modules
/
array-each
/
..
/
..
/
4d695
/
which.tar
/
/
home/emeraadmin/public_html/node_modules/.bin/which000064400000000474151677257510016455 0ustar00#!/bin/sh basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") case `uname` in *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; esac if [ -x "$basedir/node" ]; then "$basedir/node" "$basedir/../which/bin/which" "$@" ret=$? else node "$basedir/../which/bin/which" "$@" ret=$? fi exit $ret package.json000064400000003346151701461620007043 0ustar00{ "_from": "which@^1.2.14", "_id": "which@1.3.1", "_inBundle": false, "_integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "_location": "/which", "_phantomChildren": {}, "_requested": { "type": "range", "registry": true, "raw": "which@^1.2.14", "name": "which", "escapedName": "which", "rawSpec": "^1.2.14", "saveSpec": null, "fetchSpec": "^1.2.14" }, "_requiredBy": [ "/global-prefix" ], "_resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "_shasum": "a45043d54f5805316da8d62f9f50918d3da70b0a", "_spec": "which@^1.2.14", "_where": "C:\\xampp\\htdocs\\emeraltd\\node_modules\\global-prefix", "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me" }, "bin": { "which": "bin/which" }, "bugs": { "url": "https://github.com/isaacs/node-which/issues" }, "bundleDependencies": false, "dependencies": { "isexe": "^2.0.0" }, "deprecated": false, "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", "devDependencies": { "mkdirp": "^0.5.0", "rimraf": "^2.6.2", "tap": "^12.0.1" }, "files": [ "which.js", "bin/which" ], "homepage": "https://github.com/isaacs/node-which#readme", "license": "ISC", "main": "which.js", "name": "which", "repository": { "type": "git", "url": "git://github.com/isaacs/node-which.git" }, "scripts": { "changelog": "bash gen-changelog.sh", "postversion": "npm run changelog && git add CHANGELOG.md && git commit -m 'update changelog - '${npm_package_version}", "test": "tap test/*.js --cov" }, "version": "1.3.1" } node_modules/isexe/package.json000064400000005353151701461620012635 0ustar00{ "_id": "isexe@3.1.1", "_inBundle": true, "_location": "/npm/which/isexe", "_phantomChildren": {}, "_requiredBy": [ "/npm/which" ], "author": { "name": "Isaac Z. Schlueter", "email": "i@izs.me", "url": "http://blog.izs.me/" }, "bugs": { "url": "https://github.com/isaacs/isexe/issues" }, "description": "Minimal module to check if a file is executable.", "devDependencies": { "@types/node": "^20.4.5", "@types/tap": "^15.0.8", "c8": "^8.0.1", "mkdirp": "^0.5.1", "prettier": "^2.8.8", "rimraf": "^2.5.0", "sync-content": "^1.0.2", "tap": "^16.3.8", "ts-node": "^10.9.1", "typedoc": "^0.24.8", "typescript": "^5.1.6" }, "engines": { "node": ">=16" }, "exports": { ".": { "import": { "types": "./dist/mjs/index.d.ts", "default": "./dist/mjs/index.js" }, "require": { "types": "./dist/cjs/index.d.ts", "default": "./dist/cjs/index.js" } }, "./posix": { "import": { "types": "./dist/mjs/posix.d.ts", "default": "./dist/mjs/posix.js" }, "require": { "types": "./dist/cjs/posix.d.ts", "default": "./dist/cjs/posix.js" } }, "./win32": { "import": { "types": "./dist/mjs/win32.d.ts", "default": "./dist/mjs/win32.js" }, "require": { "types": "./dist/cjs/win32.d.ts", "default": "./dist/cjs/win32.js" } }, "./package.json": "./package.json" }, "files": [ "dist" ], "homepage": "https://github.com/isaacs/isexe#readme", "license": "ISC", "main": "./dist/cjs/index.js", "module": "./dist/mjs/index.js", "name": "isexe", "prettier": { "semi": false, "printWidth": 75, "tabWidth": 2, "useTabs": false, "singleQuote": true, "jsxSingleQuote": false, "bracketSameLine": true, "arrowParens": "avoid", "endOfLine": "lf" }, "repository": { "type": "git", "url": "git+https://github.com/isaacs/isexe.git" }, "scripts": { "format": "prettier --write . --loglevel warn --ignore-path ../../.prettierignore --cache", "postversion": "npm publish", "prepare": "tsc -p tsconfig/cjs.json && tsc -p tsconfig/esm.json && bash ./scripts/fixup.sh", "prepublishOnly": "git push origin --follow-tags", "presnap": "npm run prepare", "pretest": "npm run prepare", "preversion": "npm test", "snap": "c8 tap", "test": "c8 tap", "typedoc": "typedoc --tsconfig tsconfig/esm.json ./src/*.ts" }, "tap": { "coverage": false, "node-arg": [ "--enable-source-maps", "--no-warnings", "--loader", "ts-node/esm" ], "ts": false }, "types": "./dist/cjs/index.js", "version": "3.1.1" } node_modules/isexe/LICENSE000064400000001407151701461620011350 0ustar00The ISC License Copyright (c) 2016-2022 Isaac Z. Schlueter and Contributors 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. node_modules/isexe/dist/mjs/package.json000064400000000027151701461620014362 0ustar00{ "type": "module" } node_modules/isexe/dist/mjs/index.js000064400000001004151701461620013535 0ustar00import * as posix from './posix.js'; import * as win32 from './win32.js'; export * from './options.js'; export { win32, posix }; const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; const impl = platform === 'win32' ? win32 : posix; /** * Determine whether a path is executable on the current platform. */ export const isexe = impl.isexe; /** * Synchronously determine whether a path is executable on the * current platform. */ export const sync = impl.sync; //# sourceMappingURL=index.js.mapnode_modules/isexe/dist/mjs/posix.js000064400000003550151701461620013600 0ustar00/** * This is the Posix implementation of isexe, which uses the file * mode and uid/gid values. * * @module */ import { statSync } from 'fs'; import { stat } from 'fs/promises'; /** * Determine whether a path is executable according to the mode and * current (or specified) user and group IDs. */ export const isexe = async (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat(await stat(path), options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; /** * Synchronously determine whether a path is executable according to * the mode and current (or specified) user and group IDs. */ export const sync = (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat(statSync(path), options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); const checkMode = (stat, options) => { const myUid = options.uid ?? process.getuid?.(); const myGroups = options.groups ?? process.getgroups?.() ?? []; const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; if (myUid === undefined || myGid === undefined) { throw new Error('cannot get uid or gid'); } const groups = new Set([myGid, ...myGroups]); const mod = stat.mode; const uid = stat.uid; const gid = stat.gid; const u = parseInt('100', 8); const g = parseInt('010', 8); const o = parseInt('001', 8); const ug = u | g; return !!(mod & o || (mod & g && groups.has(gid)) || (mod & u && uid === myUid) || (mod & ug && myUid === 0)); }; //# sourceMappingURL=posix.js.mapnode_modules/isexe/dist/mjs/options.js000064400000000056151701461620014127 0ustar00export {}; //# sourceMappingURL=options.js.mapnode_modules/isexe/dist/mjs/win32.js000064400000003245151701461620013401 0ustar00/** * This is the Windows implementation of isexe, which uses the file * extension and PATHEXT setting. * * @module */ import { statSync } from 'fs'; import { stat } from 'fs/promises'; /** * Determine whether a path is executable based on the file extension * and PATHEXT environment variable (or specified pathExt option) */ export const isexe = async (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat(await stat(path), path, options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; /** * Synchronously determine whether a path is executable based on the file * extension and PATHEXT environment variable (or specified pathExt option) */ export const sync = (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat(statSync(path), path, options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; const checkPathExt = (path, options) => { const { pathExt = process.env.PATHEXT || '' } = options; const peSplit = pathExt.split(';'); if (peSplit.indexOf('') !== -1) { return true; } for (let i = 0; i < peSplit.length; i++) { const p = peSplit[i].toLowerCase(); const ext = path.substring(path.length - p.length).toLowerCase(); if (p && ext === p) { return true; } } return false; }; const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); //# sourceMappingURL=win32.js.mapnode_modules/isexe/dist/cjs/package.json000064400000000031151701461620014343 0ustar00{ "type": "commonjs" } node_modules/isexe/dist/cjs/index.js000064400000003637151701461620013541 0ustar00"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.sync = exports.isexe = exports.posix = exports.win32 = void 0; const posix = __importStar(require("./posix.js")); exports.posix = posix; const win32 = __importStar(require("./win32.js")); exports.win32 = win32; __exportStar(require("./options.js"), exports); const platform = process.env._ISEXE_TEST_PLATFORM_ || process.platform; const impl = platform === 'win32' ? win32 : posix; /** * Determine whether a path is executable on the current platform. */ exports.isexe = impl.isexe; /** * Synchronously determine whether a path is executable on the * current platform. */ exports.sync = impl.sync; //# sourceMappingURL=index.js.mapnode_modules/isexe/dist/cjs/posix.js000064400000004030151701461620013560 0ustar00"use strict"; /** * This is the Posix implementation of isexe, which uses the file * mode and uid/gid values. * * @module */ Object.defineProperty(exports, "__esModule", { value: true }); exports.sync = exports.isexe = void 0; const fs_1 = require("fs"); const promises_1 = require("fs/promises"); /** * Determine whether a path is executable according to the mode and * current (or specified) user and group IDs. */ const isexe = async (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat(await (0, promises_1.stat)(path), options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; exports.isexe = isexe; /** * Synchronously determine whether a path is executable according to * the mode and current (or specified) user and group IDs. */ const sync = (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat((0, fs_1.statSync)(path), options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; exports.sync = sync; const checkStat = (stat, options) => stat.isFile() && checkMode(stat, options); const checkMode = (stat, options) => { const myUid = options.uid ?? process.getuid?.(); const myGroups = options.groups ?? process.getgroups?.() ?? []; const myGid = options.gid ?? process.getgid?.() ?? myGroups[0]; if (myUid === undefined || myGid === undefined) { throw new Error('cannot get uid or gid'); } const groups = new Set([myGid, ...myGroups]); const mod = stat.mode; const uid = stat.uid; const gid = stat.gid; const u = parseInt('100', 8); const g = parseInt('010', 8); const o = parseInt('001', 8); const ug = u | g; return !!(mod & o || (mod & g && groups.has(gid)) || (mod & u && uid === myUid) || (mod & ug && myUid === 0)); }; //# sourceMappingURL=posix.js.mapnode_modules/isexe/dist/cjs/options.js000064400000000160151701461620014111 0ustar00"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); //# sourceMappingURL=options.js.mapnode_modules/isexe/dist/cjs/win32.js000064400000003525151701461620013370 0ustar00"use strict"; /** * This is the Windows implementation of isexe, which uses the file * extension and PATHEXT setting. * * @module */ Object.defineProperty(exports, "__esModule", { value: true }); exports.sync = exports.isexe = void 0; const fs_1 = require("fs"); const promises_1 = require("fs/promises"); /** * Determine whether a path is executable based on the file extension * and PATHEXT environment variable (or specified pathExt option) */ const isexe = async (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat(await (0, promises_1.stat)(path), path, options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; exports.isexe = isexe; /** * Synchronously determine whether a path is executable based on the file * extension and PATHEXT environment variable (or specified pathExt option) */ const sync = (path, options = {}) => { const { ignoreErrors = false } = options; try { return checkStat((0, fs_1.statSync)(path), path, options); } catch (e) { const er = e; if (ignoreErrors || er.code === 'EACCES') return false; throw er; } }; exports.sync = sync; const checkPathExt = (path, options) => { const { pathExt = process.env.PATHEXT || '' } = options; const peSplit = pathExt.split(';'); if (peSplit.indexOf('') !== -1) { return true; } for (let i = 0; i < peSplit.length; i++) { const p = peSplit[i].toLowerCase(); const ext = path.substring(path.length - p.length).toLowerCase(); if (p && ext === p) { return true; } } return false; }; const checkStat = (stat, path, options) => stat.isFile() && checkPathExt(path, options); //# sourceMappingURL=win32.js.maplib/index.js000064400000006071151701461620006766 0ustar00const { isexe, sync: isexeSync } = require('isexe') const { join, delimiter, sep, posix } = require('path') const isWindows = process.platform === 'win32' // used to check for slashed in commands passed in. always checks for the posix // seperator on all platforms, and checks for the current separator when not on // a posix platform. don't use the isWindows check for this since that is mocked // in tests but we still need the code to actually work when called. that is also // why it is ignored from coverage. /* istanbul ignore next */ const rSlash = new RegExp(`[${posix.sep}${sep === posix.sep ? '' : sep}]`.replace(/(\\)/g, '\\$1')) const rRel = new RegExp(`^\\.${rSlash.source}`) const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: 'ENOENT' }) const getPathInfo = (cmd, { path: optPath = process.env.PATH, pathExt: optPathExt = process.env.PATHEXT, delimiter: optDelimiter = delimiter, }) => { // If it has a slash, then we don't bother searching the pathenv. // just check the file itself, and that's it. const pathEnv = cmd.match(rSlash) ? [''] : [ // windows always checks the cwd first ...(isWindows ? [process.cwd()] : []), ...(optPath || /* istanbul ignore next: very unusual */ '').split(optDelimiter), ] if (isWindows) { const pathExtExe = optPathExt || ['.EXE', '.CMD', '.BAT', '.COM'].join(optDelimiter) const pathExt = pathExtExe.split(optDelimiter).flatMap((item) => [item, item.toLowerCase()]) if (cmd.includes('.') && pathExt[0] !== '') { pathExt.unshift('') } return { pathEnv, pathExt, pathExtExe } } return { pathEnv, pathExt: [''] } } const getPathPart = (raw, cmd) => { const pathPart = /^".*"$/.test(raw) ? raw.slice(1, -1) : raw const prefix = !pathPart && rRel.test(cmd) ? cmd.slice(0, 2) : '' return prefix + join(pathPart, cmd) } const which = async (cmd, opt = {}) => { const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) const found = [] for (const envPart of pathEnv) { const p = getPathPart(envPart, cmd) for (const ext of pathExt) { const withExt = p + ext const is = await isexe(withExt, { pathExt: pathExtExe, ignoreErrors: true }) if (is) { if (!opt.all) { return withExt } found.push(withExt) } } } if (opt.all && found.length) { return found } if (opt.nothrow) { return null } throw getNotFoundError(cmd) } const whichSync = (cmd, opt = {}) => { const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt) const found = [] for (const pathEnvPart of pathEnv) { const p = getPathPart(pathEnvPart, cmd) for (const ext of pathExt) { const withExt = p + ext const is = isexeSync(withExt, { pathExt: pathExtExe, ignoreErrors: true }) if (is) { if (!opt.all) { return withExt } found.push(withExt) } } } if (opt.all && found.length) { return found } if (opt.nothrow) { return null } throw getNotFoundError(cmd) } module.exports = which which.sync = whichSync LICENSE000064400000001375151701461620005562 0ustar00The ISC License Copyright (c) Isaac Z. Schlueter and Contributors 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. bin/which.js000064400000001700151701461620006755 0ustar00#!/usr/bin/env node const which = require('../lib') const argv = process.argv.slice(2) const usage = (err) => { if (err) { console.error(`which: ${err}`) } console.error('usage: which [-as] program ...') process.exit(1) } if (!argv.length) { return usage() } let dashdash = false const [commands, flags] = argv.reduce((acc, arg) => { if (dashdash || arg === '--') { dashdash = true return acc } if (!/^-/.test(arg)) { acc[0].push(arg) return acc } for (const flag of arg.slice(1).split('')) { if (flag === 's') { acc[1].silent = true } else if (flag === 'a') { acc[1].all = true } else { usage(`illegal option -- ${flag}`) } } return acc }, [[], {}]) for (const command of commands) { try { const res = which.sync(command, { all: flags.all }) if (!flags.silent) { console.log([].concat(res).join('\n')) } } catch (err) { process.exitCode = 1 } } README.md000064400000002352151701461620006030 0ustar00# which Like the unix `which` utility. Finds the first instance of a specified executable in the PATH environment variable. Does not cache the results, so `hash -r` is not needed when the PATH changes. ## USAGE ```javascript var which = require('which') // async usage which('node', function (er, resolvedPath) { // er is returned if no "node" is found on the PATH // if it is found, then the absolute path to the exec is returned }) // sync usage // throws if not found var resolved = which.sync('node') // if nothrow option is used, returns null if not found resolved = which.sync('node', {nothrow: true}) // Pass options to override the PATH and PATHEXT environment vars. which('node', { path: someOtherPath }, function (er, resolved) { if (er) throw er console.log('found at %j', resolved) }) ``` ## CLI USAGE Same as the BSD `which(1)` binary. ``` usage: which [-as] program ... ``` ## OPTIONS You may pass an options object as the second argument. - `path`: Use instead of the `PATH` environment variable. - `pathExt`: Use instead of the `PATHEXT` environment variable. - `all`: Return all matches, instead of just the first one. Note that this means the function returns an array of strings instead of a single string. bin/which000064400000001731151701471250006346 0ustar00#!/usr/bin/env node var which = require("../") if (process.argv.length < 3) usage() function usage () { console.error('usage: which [-as] program ...') process.exit(1) } var all = false var silent = false var dashdash = false var args = process.argv.slice(2).filter(function (arg) { if (dashdash || !/^-/.test(arg)) return true if (arg === '--') { dashdash = true return false } var flags = arg.substr(1).split('') for (var f = 0; f < flags.length; f++) { var flag = flags[f] switch (flag) { case 's': silent = true break case 'a': all = true break default: console.error('which: illegal option -- ' + flag) usage() } } return false }) process.exit(args.reduce(function (pv, current) { try { var f = which.sync(current, { all: all }) if (all) f = f.join('\n') if (!silent) console.log(f) return pv; } catch (e) { return 1; } }, 0)) which.js000064400000006160151701471250006212 0ustar00module.exports = which which.sync = whichSync var isWindows = process.platform === 'win32' || process.env.OSTYPE === 'cygwin' || process.env.OSTYPE === 'msys' var path = require('path') var COLON = isWindows ? ';' : ':' var isexe = require('isexe') function getNotFoundError (cmd) { var er = new Error('not found: ' + cmd) er.code = 'ENOENT' return er } function getPathInfo (cmd, opt) { var colon = opt.colon || COLON var pathEnv = opt.path || process.env.PATH || '' var pathExt = [''] pathEnv = pathEnv.split(colon) var pathExtExe = '' if (isWindows) { pathEnv.unshift(process.cwd()) pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM') pathExt = pathExtExe.split(colon) // Always test the cmd itself first. isexe will check to make sure // it's found in the pathExt set. if (cmd.indexOf('.') !== -1 && pathExt[0] !== '') pathExt.unshift('') } // If it has a slash, then we don't bother searching the pathenv. // just check the file itself, and that's it. if (cmd.match(/\//) || isWindows && cmd.match(/\\/)) pathEnv = [''] return { env: pathEnv, ext: pathExt, extExe: pathExtExe } } function which (cmd, opt, cb) { if (typeof opt === 'function') { cb = opt opt = {} } var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext var pathExtExe = info.extExe var found = [] ;(function F (i, l) { if (i === l) { if (opt.all && found.length) return cb(null, found) else return cb(getNotFoundError(cmd)) } var pathPart = pathEnv[i] if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1) var p = path.join(pathPart, cmd) if (!pathPart && (/^\.[\\\/]/).test(cmd)) { p = cmd.slice(0, 2) + p } ;(function E (ii, ll) { if (ii === ll) return F(i + 1, l) var ext = pathExt[ii] isexe(p + ext, { pathExt: pathExtExe }, function (er, is) { if (!er && is) { if (opt.all) found.push(p + ext) else return cb(null, p + ext) } return E(ii + 1, ll) }) })(0, pathExt.length) })(0, pathEnv.length) } function whichSync (cmd, opt) { opt = opt || {} var info = getPathInfo(cmd, opt) var pathEnv = info.env var pathExt = info.ext var pathExtExe = info.extExe var found = [] for (var i = 0, l = pathEnv.length; i < l; i ++) { var pathPart = pathEnv[i] if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"') pathPart = pathPart.slice(1, -1) var p = path.join(pathPart, cmd) if (!pathPart && /^\.[\\\/]/.test(cmd)) { p = cmd.slice(0, 2) + p } for (var j = 0, ll = pathExt.length; j < ll; j ++) { var cur = p + pathExt[j] var is try { is = isexe.sync(cur, { pathExt: pathExtExe }) if (is) { if (opt.all) found.push(cur) else return cur } } catch (ex) {} } } if (opt.all && found.length) return found if (opt.nothrow) return null throw getNotFoundError(cmd) } CHANGELOG.md000064400000004610151701471250006361 0ustar00# Changes ## 1.3.1 * update deps * update travis ## v1.3.0 * Add nothrow option to which.sync * update tap ## v1.2.14 * appveyor: drop node 5 and 0.x * travis-ci: add node 6, drop 0.x ## v1.2.13 * test: Pass missing option to pass on windows * update tap * update isexe to 2.0.0 * neveragain.tech pledge request ## v1.2.12 * Removed unused require ## v1.2.11 * Prevent changelog script from being included in package ## v1.2.10 * Use env.PATH only, not env.Path ## v1.2.9 * fix for paths starting with ../ * Remove unused `is-absolute` module ## v1.2.8 * bullet items in changelog that contain (but don't start with) # ## v1.2.7 * strip 'update changelog' changelog entries out of changelog ## v1.2.6 * make the changelog bulleted ## v1.2.5 * make a changelog, and keep it up to date * don't include tests in package * Properly handle relative-path executables * appveyor * Attach error code to Not Found error * Make tests pass on Windows ## v1.2.4 * Fix typo ## v1.2.3 * update isexe, fix regression in pathExt handling ## v1.2.2 * update deps, use isexe module, test windows ## v1.2.1 * Sometimes windows PATH entries are quoted * Fixed a bug in the check for group and user mode bits. This bug was introduced during refactoring for supporting strict mode. * doc cli ## v1.2.0 * Add support for opt.all and -as cli flags * test the bin * update travis * Allow checking for multiple programs in bin/which * tap 2 ## v1.1.2 * travis * Refactored and fixed undefined error on Windows * Support strict mode ## v1.1.1 * test +g exes against secondary groups, if available * Use windows exe semantics on cygwin & msys * cwd should be first in path on win32, not last * Handle lower-case 'env.Path' on Windows * Update docs * use single-quotes ## v1.1.0 * Add tests, depend on is-absolute ## v1.0.9 * which.js: root is allowed to execute files owned by anyone ## v1.0.8 * don't use graceful-fs ## v1.0.7 * add license to package.json ## v1.0.6 * isc license ## 1.0.5 * Awful typo ## 1.0.4 * Test for path absoluteness properly * win: Allow '' as a pathext if cmd has a . in it ## 1.0.3 * Remove references to execPath * Make `which.sync()` work on Windows by honoring the PATHEXT variable. * Make `isExe()` always return true on Windows. * MIT ## 1.0.2 * Only files can be exes ## 1.0.1 * Respect the PATHEXT env for win32 support * should 0755 the bin * binary * guts * package * 1st
/home/emeraadmin/.caldav/.././www/node_modules/array-each/../../4d695/which.tar