aboutsummaryrefslogtreecommitdiff
path: root/node_modules/global-dirs
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-06-04 08:51:19 +0200
committerMinteck <contact@minteck.org>2022-06-04 08:51:19 +0200
commitb22f6770c8bd084d66950655203c61dd701b3d90 (patch)
tree873d7fb19584ec2709b95cc1ca05a1fc7cfd0fc4 /node_modules/global-dirs
parent383285ecd5292bf9a825e05904955b937de84cc9 (diff)
downloadequestriadb-b22f6770c8bd084d66950655203c61dd701b3d90.tar.gz
equestriadb-b22f6770c8bd084d66950655203c61dd701b3d90.tar.bz2
equestriadb-b22f6770c8bd084d66950655203c61dd701b3d90.zip
Remove node_modules
Diffstat (limited to 'node_modules/global-dirs')
-rw-r--r--node_modules/global-dirs/index.d.ts60
-rw-r--r--node_modules/global-dirs/index.js120
-rw-r--r--node_modules/global-dirs/license9
-rw-r--r--node_modules/global-dirs/package.json56
-rw-r--r--node_modules/global-dirs/readme.md72
5 files changed, 0 insertions, 317 deletions
diff --git a/node_modules/global-dirs/index.d.ts b/node_modules/global-dirs/index.d.ts
deleted file mode 100644
index ac39a23..0000000
--- a/node_modules/global-dirs/index.d.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-declare namespace globalDirectories {
- interface GlobalDirectories {
- /**
- Directory with globally installed packages.
-
- Equivalent to `npm root --global`.
- */
- readonly packages: string;
-
- /**
- Directory with globally installed binaries.
-
- Equivalent to `npm bin --global`.
- */
- readonly binaries: string;
-
- /**
- Directory with directories for packages and binaries. You probably want either of the above.
-
- Equivalent to `npm prefix --global`.
- */
- readonly prefix: string;
- }
-}
-
-declare const globalDirectories: {
- /**
- Get the directory of globally installed packages and binaries.
-
- @example
- ```
- import globalDirectories = require('global-dirs');
-
- console.log(globalDirectories.npm.prefix);
- //=> '/usr/local'
-
- console.log(globalDirectories.npm.packages);
- //=> '/usr/local/lib/node_modules'
- ```
- */
- readonly npm: globalDirectories.GlobalDirectories;
-
- /**
- Get the directory of globally installed packages and binaries.
-
- @example
- ```
- import globalDirectories = require('global-dirs');
-
- console.log(globalDirectories.npm.binaries);
- //=> '/usr/local/bin'
-
- console.log(globalDirectories.yarn.packages);
- //=> '/Users/sindresorhus/.config/yarn/global/node_modules'
- ```
- */
- readonly yarn: globalDirectories.GlobalDirectories;
-};
-
-export = globalDirectories;
diff --git a/node_modules/global-dirs/index.js b/node_modules/global-dirs/index.js
deleted file mode 100644
index c5d2438..0000000
--- a/node_modules/global-dirs/index.js
+++ /dev/null
@@ -1,120 +0,0 @@
-'use strict';
-const path = require('path');
-const os = require('os');
-const fs = require('fs');
-const ini = require('ini');
-
-const isWindows = process.platform === 'win32';
-
-const readRc = filePath => {
- try {
- return ini.parse(fs.readFileSync(filePath, 'utf8')).prefix;
- } catch {}
-};
-
-const getEnvNpmPrefix = () => {
- // TODO: Remove the `.reduce` call.
- // eslint-disable-next-line unicorn/no-array-reduce
- return Object.keys(process.env).reduce((prefix, name) => {
- return /^npm_config_prefix$/i.test(name) ? process.env[name] : prefix;
- }, undefined);
-};
-
-const getGlobalNpmrc = () => {
- if (isWindows && process.env.APPDATA) {
- // Hardcoded contents of `c:\Program Files\nodejs\node_modules\npm\npmrc`
- return path.join(process.env.APPDATA, '/npm/etc/npmrc');
- }
-
- // Homebrew special case: `$(brew --prefix)/lib/node_modules/npm/npmrc`
- if (process.execPath.includes('/Cellar/node')) {
- const homebrewPrefix = process.execPath.slice(0, process.execPath.indexOf('/Cellar/node'));
- return path.join(homebrewPrefix, '/lib/node_modules/npm/npmrc');
- }
-
- if (process.execPath.endsWith('/bin/node')) {
- const installDir = path.dirname(path.dirname(process.execPath));
- return path.join(installDir, '/etc/npmrc');
- }
-};
-
-const getDefaultNpmPrefix = () => {
- if (isWindows) {
- // `c:\node\node.exe` → `prefix=c:\node\`
- return path.dirname(process.execPath);
- }
-
- // `/usr/local/bin/node` → `prefix=/usr/local`
- return path.dirname(path.dirname(process.execPath));
-};
-
-const getNpmPrefix = () => {
- const envPrefix = getEnvNpmPrefix();
- if (envPrefix) {
- return envPrefix;
- }
-
- const homePrefix = readRc(path.join(os.homedir(), '.npmrc'));
- if (homePrefix) {
- return homePrefix;
- }
-
- if (process.env.PREFIX) {
- return process.env.PREFIX;
- }
-
- const globalPrefix = readRc(getGlobalNpmrc());
- if (globalPrefix) {
- return globalPrefix;
- }
-
- return getDefaultNpmPrefix();
-};
-
-const npmPrefix = path.resolve(getNpmPrefix());
-
-const getYarnWindowsDirectory = () => {
- if (isWindows && process.env.LOCALAPPDATA) {
- const dir = path.join(process.env.LOCALAPPDATA, 'Yarn');
- if (fs.existsSync(dir)) {
- return dir;
- }
- }
-
- return false;
-};
-
-const getYarnPrefix = () => {
- if (process.env.PREFIX) {
- return process.env.PREFIX;
- }
-
- const windowsPrefix = getYarnWindowsDirectory();
- if (windowsPrefix) {
- return windowsPrefix;
- }
-
- const configPrefix = path.join(os.homedir(), '.config/yarn');
- if (fs.existsSync(configPrefix)) {
- return configPrefix;
- }
-
- const homePrefix = path.join(os.homedir(), '.yarn-config');
- if (fs.existsSync(homePrefix)) {
- return homePrefix;
- }
-
- // Yarn supports the npm conventions but the inverse is not true
- return npmPrefix;
-};
-
-exports.npm = {};
-exports.npm.prefix = npmPrefix;
-exports.npm.packages = path.join(npmPrefix, isWindows ? 'node_modules' : 'lib/node_modules');
-exports.npm.binaries = isWindows ? npmPrefix : path.join(npmPrefix, 'bin');
-
-const yarnPrefix = path.resolve(getYarnPrefix());
-exports.yarn = {};
-exports.yarn.prefix = yarnPrefix;
-exports.yarn.packages = path.join(yarnPrefix, getYarnWindowsDirectory() ? 'Data/global/node_modules' : 'global/node_modules');
-exports.yarn.binaries = path.join(exports.yarn.packages, '.bin');
diff --git a/node_modules/global-dirs/license b/node_modules/global-dirs/license
deleted file mode 100644
index fa7ceba..0000000
--- a/node_modules/global-dirs/license
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
-
-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.
diff --git a/node_modules/global-dirs/package.json b/node_modules/global-dirs/package.json
deleted file mode 100644
index 2a25131..0000000
--- a/node_modules/global-dirs/package.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "name": "global-dirs",
- "version": "3.0.0",
- "description": "Get the directory of globally installed packages and binaries",
- "license": "MIT",
- "repository": "sindresorhus/global-dirs",
- "funding": "https://github.com/sponsors/sindresorhus",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "https://sindresorhus.com"
- },
- "engines": {
- "node": ">=10"
- },
- "scripts": {
- "test": "xo && ava && tsd"
- },
- "files": [
- "index.js",
- "index.d.ts"
- ],
- "keywords": [
- "global",
- "prefix",
- "path",
- "paths",
- "npm",
- "yarn",
- "node",
- "modules",
- "node-modules",
- "package",
- "packages",
- "binary",
- "binaries",
- "bin",
- "directory",
- "directories",
- "npmrc",
- "rc",
- "config",
- "root",
- "resolve"
- ],
- "dependencies": {
- "ini": "2.0.0"
- },
- "devDependencies": {
- "ava": "^2.4.0",
- "execa": "^5.0.0",
- "import-fresh": "^3.3.0",
- "tsd": "^0.14.0",
- "xo": "^0.37.1"
- }
-}
diff --git a/node_modules/global-dirs/readme.md b/node_modules/global-dirs/readme.md
deleted file mode 100644
index 0276ee1..0000000
--- a/node_modules/global-dirs/readme.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# global-dirs
-
-> Get the directory of globally installed packages and binaries
-
-Uses the same resolution logic as `npm` and `yarn`.
-
-## Install
-
-```
-$ npm install global-dirs
-```
-
-## Usage
-
-```js
-const globalDirectories = require('global-dirs');
-
-console.log(globalDirectories.npm.prefix);
-//=> '/usr/local'
-
-console.log(globalDirectories.npm.packages);
-//=> '/usr/local/lib/node_modules'
-
-console.log(globalDirectories.npm.binaries);
-//=> '/usr/local/bin'
-
-console.log(globalDirectories.yarn.packages);
-//=> '/Users/sindresorhus/.config/yarn/global/node_modules'
-```
-
-## API
-
-### globalDirectories
-
-#### npm
-#### yarn
-
-##### packages
-
-Directory with globally installed packages.
-
-Equivalent to `npm root --global`.
-
-##### binaries
-
-Directory with globally installed binaries.
-
-Equivalent to `npm bin --global`.
-
-##### prefix
-
-Directory with directories for packages and binaries. You probably want either of the above.
-
-Equivalent to `npm prefix --global`.
-
-## Related
-
-- [import-global](https://github.com/sindresorhus/import-global) - Import a globally installed module
-- [resolve-global](https://github.com/sindresorhus/resolve-global) - Resolve the path of a globally installed module
-- [is-installed-globally](https://github.com/sindresorhus/is-installed-globally) - Check if your package was installed globally
-
----
-
-<div align="center">
- <b>
- <a href="https://tidelift.com/subscription/pkg/npm-global-dirs?utm_source=npm-global-dirs&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
- </b>
- <br>
- <sub>
- Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
- </sub>
-</div>