This commit is contained in:
Anton Medvedev 2020-11-10 23:12:02 +01:00
parent d2f712fdfb
commit 9087c4d893
137 changed files with 8838 additions and 1 deletions

40
node_modules/path-key/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,40 @@
/// <reference types="node" />
declare namespace pathKey {
interface Options {
/**
Use a custom environment variables object. Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env).
*/
readonly env?: {[key: string]: string | undefined};
/**
Get the PATH key for a specific platform. Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform).
*/
readonly platform?: NodeJS.Platform;
}
}
declare const pathKey: {
/**
Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform.
@example
```
import pathKey = require('path-key');
const key = pathKey();
//=> 'PATH'
const PATH = process.env[key];
//=> '/usr/local/bin:/usr/bin:/bin'
```
*/
(options?: pathKey.Options): string;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function pathKey(options?: pathKey.Options): string;
// export = pathKey;
default: typeof pathKey;
};
export = pathKey;

16
node_modules/path-key/index.js generated vendored Normal file
View file

@ -0,0 +1,16 @@
'use strict';
const pathKey = (options = {}) => {
const environment = options.env || process.env;
const platform = options.platform || process.platform;
if (platform !== 'win32') {
return 'PATH';
}
return Object.keys(environment).reverse().find(key => key.toUpperCase() === 'PATH') || 'Path';
};
module.exports = pathKey;
// TODO: Remove this for the next major release
module.exports.default = pathKey;

9
node_modules/path-key/license generated vendored Normal file
View file

@ -0,0 +1,9 @@
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.

72
node_modules/path-key/package.json generated vendored Normal file
View file

@ -0,0 +1,72 @@
{
"_from": "path-key@^3.1.0",
"_id": "path-key@3.1.1",
"_inBundle": false,
"_integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"_location": "/path-key",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "path-key@^3.1.0",
"name": "path-key",
"escapedName": "path-key",
"rawSpec": "^3.1.0",
"saveSpec": null,
"fetchSpec": "^3.1.0"
},
"_requiredBy": [
"/cross-spawn",
"/npm-run-path"
],
"_resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"_shasum": "581f6ade658cbba65a0d3380de7753295054f375",
"_spec": "path-key@^3.1.0",
"_where": "/Users/anton/dev/action/node_modules/cross-spawn",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/path-key/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Get the PATH environment variable key cross-platform",
"devDependencies": {
"@types/node": "^11.13.0",
"ava": "^1.4.1",
"tsd": "^0.7.2",
"xo": "^0.24.0"
},
"engines": {
"node": ">=8"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/sindresorhus/path-key#readme",
"keywords": [
"path",
"key",
"environment",
"env",
"variable",
"var",
"get",
"cross-platform",
"windows"
],
"license": "MIT",
"name": "path-key",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/path-key.git"
},
"scripts": {
"test": "xo && ava && tsd"
},
"version": "3.1.1"
}

61
node_modules/path-key/readme.md generated vendored Normal file
View file

@ -0,0 +1,61 @@
# path-key [![Build Status](https://travis-ci.org/sindresorhus/path-key.svg?branch=master)](https://travis-ci.org/sindresorhus/path-key)
> Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform
It's usually `PATH`, but on Windows it can be any casing like `Path`...
## Install
```
$ npm install path-key
```
## Usage
```js
const pathKey = require('path-key');
const key = pathKey();
//=> 'PATH'
const PATH = process.env[key];
//=> '/usr/local/bin:/usr/bin:/bin'
```
## API
### pathKey(options?)
#### options
Type: `object`
##### env
Type: `object`<br>
Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env)
Use a custom environment variables object.
#### platform
Type: `string`<br>
Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
Get the PATH key for a specific platform.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-path-key?utm_source=npm-path-key&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>