summaryrefslogtreecommitdiff
path: root/chromium/third_party/devtools-frontend/src/node_modules/global-prefix
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/third_party/devtools-frontend/src/node_modules/global-prefix
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-c30a6232df03e1efbd9f3b226777b07e087a1122.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/devtools-frontend/src/node_modules/global-prefix')
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/global-prefix/LICENSE21
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/global-prefix/README.md92
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/global-prefix/index.js85
-rw-r--r--chromium/third_party/devtools-frontend/src/node_modules/global-prefix/package.json50
4 files changed, 248 insertions, 0 deletions
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/LICENSE b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/LICENSE
new file mode 100644
index 00000000000..7cccaf9e345
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015-present, Jon Schlinkert.
+
+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/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/README.md b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/README.md
new file mode 100644
index 00000000000..fd116ca4c08
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/README.md
@@ -0,0 +1,92 @@
+# global-prefix [![NPM version](https://img.shields.io/npm/v/global-prefix.svg?style=flat)](https://www.npmjs.com/package/global-prefix) [![NPM monthly downloads](https://img.shields.io/npm/dm/global-prefix.svg?style=flat)](https://npmjs.org/package/global-prefix) [![NPM total downloads](https://img.shields.io/npm/dt/global-prefix.svg?style=flat)](https://npmjs.org/package/global-prefix) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/global-prefix.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/global-prefix) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/global-prefix.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/global-prefix)
+
+> Get the npm global path prefix.
+
+Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
+
+## Install
+
+Install with [npm](https://www.npmjs.com/):
+
+```sh
+$ npm install --save global-prefix
+```
+
+This is partially based on the code used by npm internally to resolve the global prefix.
+
+## Usage
+
+```js
+var prefix = require('global-prefix');
+//=> '/usr/local' (this path will differ by system and user-defined config)
+```
+
+## About
+
+<details>
+<summary><strong>Contributing</strong></summary>
+
+Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
+
+</details>
+
+<details>
+<summary><strong>Running Tests</strong></summary>
+
+Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
+
+```sh
+$ npm install && npm test
+```
+
+</details>
+
+<details>
+<summary><strong>Building docs</strong></summary>
+
+_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
+
+To generate the readme, run the following command:
+
+```sh
+$ npm install -g verbose/verb#dev verb-generate-readme && verb
+```
+
+</details>
+
+### Related projects
+
+You might also be interested in these projects:
+
+* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules "The directory used by npm for globally installed npm modules.")
+* [global-paths](https://www.npmjs.com/package/global-paths): Returns an array of unique "global" directories based on the user's platform and environment. The… [more](https://github.com/jonschlinkert/global-paths) | [homepage](https://github.com/jonschlinkert/global-paths "Returns an array of unique "global" directories based on the user's platform and environment. The resulting paths can be used for doing lookups for generators or other globally installed npm packages. Node.js / JavaScript.")
+
+### Contributors
+
+| **Commits** | **Contributor** |
+| --- | --- |
+| 23 | [jonschlinkert](https://github.com/jonschlinkert) |
+| 15 | [doowb](https://github.com/doowb) |
+| 2 | [phated](https://github.com/phated) |
+| 1 | [rmbaad](https://github.com/rmbaad) |
+| 1 | [avengerpenguin](https://github.com/avengerpenguin) |
+| 1 | [jorrit](https://github.com/jorrit) |
+| 1 | [mathiasvr](https://github.com/mathiasvr) |
+| 1 | [tunnckoCore](https://github.com/tunnckoCore) |
+
+### Author
+
+**Jon Schlinkert**
+
+* [GitHub Profile](https://github.com/jonschlinkert)
+* [Twitter Profile](https://twitter.com/jonschlinkert)
+* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
+
+### License
+
+Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
+Released under the [MIT License](LICENSE).
+
+***
+
+_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on October 11, 2018._ \ No newline at end of file
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/index.js b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/index.js
new file mode 100644
index 00000000000..1defb6870cf
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/index.js
@@ -0,0 +1,85 @@
+/*!
+ * global-prefix <https://github.com/jonschlinkert/global-prefix>
+ *
+ * Copyright (c) 2015-present Jon Schlinkert.
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+const ini = require('ini');
+let prefix;
+
+const getPrefix = () => {
+ if (process.env.PREFIX) return process.env.PREFIX;
+ if (prefix) return prefix;
+
+ // Start by checking if the global prefix is set by the user
+ let home = os.homedir();
+
+ // os.homedir() returns undefined if $HOME is not set; path.resolve requires strings
+ if (home) {
+ prefix = tryConfigPath(path.resolve(home, '.npmrc'));
+ }
+
+ if (prefix) {
+ return prefix;
+ }
+
+ // Otherwise find the path of npm
+ let npm = tryNpmPath();
+ if (npm) {
+ // Check the built-in npm config file
+ prefix = tryConfigPath(path.resolve(npm, '..', '..', 'npmrc'));
+
+ if (prefix) {
+ // Now the global npm config can also be checked.
+ prefix = tryConfigPath(path.resolve(prefix, 'etc', 'npmrc')) || prefix;
+ }
+ }
+
+ if (!prefix) {
+ let { APPDATA, DESTDIR, OSTYPE } = process.env;
+
+ // c:\node\node.exe --> prefix=c:\node\
+ if (process.platform === 'win32' || OSTYPE === 'msys' || OSTYPE === 'cygwin') {
+ prefix = APPDATA ? path.join(APPDATA, 'npm') : path.dirname(process.execPath);
+ return prefix;
+ }
+
+ // /usr/local/bin/node --> prefix=/usr/local
+ prefix = path.dirname(path.dirname(process.execPath));
+
+ // destdir only is respected on Unix
+ if (DESTDIR) {
+ prefix = path.join(DESTDIR, prefix);
+ }
+ }
+
+ return prefix;
+}
+
+function tryNpmPath() {
+ try {
+ return fs.realpathSync(require('which').sync('npm'));
+ } catch (err) { /* do nothing */ }
+}
+
+function tryConfigPath(configPath) {
+ try {
+ return ini.parse(fs.readFileSync(configPath, 'utf-8')).prefix;
+ } catch (err) { /* do nothing */ }
+}
+
+/**
+ * Expose `prefix`
+ */
+
+Reflect.defineProperty(module, 'exports', {
+ get() {
+ return getPrefix();
+ }
+});
diff --git a/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/package.json b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/package.json
new file mode 100644
index 00000000000..78508d67db5
--- /dev/null
+++ b/chromium/third_party/devtools-frontend/src/node_modules/global-prefix/package.json
@@ -0,0 +1,50 @@
+{
+ "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
+ "bugs": {
+ "url": "https://github.com/jonschlinkert/global-prefix/issues"
+ },
+ "contributors": [
+ "Alexandr Bogachev (https://github.com/rmbaad)",
+ "Brian Woodward (https://twitter.com/doowb)",
+ "Charlike Mike Reagent (https://i.am.charlike.online)",
+ "JasonChang (https://packagist.org/packages/jason-chang)",
+ "Jon Schlinkert (http://twitter.com/jonschlinkert)",
+ "Jorrit Schippers (https://www.ncode.nl)",
+ "Mathias Rasmussen (chrome://dino)",
+ "Ross Fenning (http://rossfenning.co.uk)"
+ ],
+ "dependencies": {
+ "ini": "^1.3.5",
+ "kind-of": "^6.0.2",
+ "which": "^1.3.1"
+ },
+ "description": "Get the npm global path prefix.",
+ "devDependencies": {
+ "gulp-format-md": "^2.0.0",
+ "mocha": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/jonschlinkert/global-prefix",
+ "keywords": [
+ "global",
+ "module",
+ "modules",
+ "npm",
+ "path",
+ "prefix",
+ "resolve"
+ ],
+ "license": "MIT",
+ "main": "index.js",
+ "name": "global-prefix",
+ "repository": "jonschlinkert/global-prefix",
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "3.0.0"
+}