Add production dependencies

This commit is contained in:
Jay Trees 2022-01-21 09:28:41 +01:00
parent 5a0114f3e2
commit 579ccdc29f
12113 changed files with 978046 additions and 3 deletions

21
node_modules/fined/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016, 2017, 2018 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
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.

81
node_modules/fined/README.md generated vendored Normal file
View file

@ -0,0 +1,81 @@
<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
# fined
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
Find a file given a declaration of locations.
## Usage
```js
var fined = require('fined');
fined({ path: 'path/to/file', extensions: ['.js', '.json'] });
// => { path: '/absolute/path/to/file.js', extension: '.js' } (if file exists)
// => null (if file does not exist)
var opts = {
name: '.app',
cwd: '.',
extensions: {
'rc': 'default-rc-loader',
'.yml': 'default-yml-loader',
},
};
fined({ path: '.' }, opts);
// => { path: '/absolute/of/cwd/.app.yml', extension: { '.yml': 'default-yml-loader' } }
fined({ path: '~', extensions: { 'rc': 'some-special-rc-loader' } }, opts);
// => { path: '/User/home/.apprc', extension: { 'rc': 'some-special-rc-loader' } }
```
## API
### fined(pathObj, opts) => object | null
#### Arguments:
* **pathObj** [string | object] : a path setting for finding a file.
* **opts** [object] : a plain object supplements `pathObj`.
`pathObj` and `opts` can have same properties:
* **path** [string] : a path string.
* **name** [string] : a basename.
* **extensions**: [string | array | object] : extensions.
* **cwd**: a base directory of `path` and for finding up.
* **findUp**: [boolean] : a flag to find up.
#### Return:
This function returns a plain object which consists of following properties if a file exists otherwise null.
* **path** : an absolute path
* **extension** : a string or a plain object of extension.
## License
MIT
[downloads-image]: http://img.shields.io/npm/dm/fined.svg
[npm-url]: https://www.npmjs.com/package/fined
[npm-image]: http://img.shields.io/npm/v/fined.svg
[travis-url]: https://travis-ci.org/gulpjs/fined
[travis-image]: http://img.shields.io/travis/gulpjs/fined.svg?label=travis-ci
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fined
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fined.svg?label=appveyor
[coveralls-url]: https://coveralls.io/r/gulpjs/fined
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fined/master.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg

174
node_modules/fined/index.js generated vendored Normal file
View file

@ -0,0 +1,174 @@
'use strict';
var fs = require('fs');
var path = require('path');
var isPlainObject = require('is-plain-object');
var pick = require('object.pick');
var defaults = require('object.defaults/immutable');
var expandTilde = require('expand-tilde');
var parsePath = require('parse-filepath');
function fined(pathObj, defaultObj) {
var expandedPath = expandPath(pathObj, defaultObj);
return expandedPath ? findWithExpandedPath(expandedPath) : null;
}
function expandPath(pathObj, defaultObj) {
if (!isPlainObject(defaultObj)) {
defaultObj = {};
}
if (isString(pathObj)) {
pathObj = { path: pathObj };
}
if (!isPlainObject(pathObj)) {
pathObj = {};
}
pathObj = defaults(pathObj, defaultObj);
var filePath;
if (!isString(pathObj.path)) {
return null;
}
// Execution of toString is for a String object.
if (isString(pathObj.name) && pathObj.name) {
if (pathObj.path) {
filePath = expandTilde(pathObj.path.toString());
filePath = path.join(filePath, pathObj.name.toString());
} else {
filePath = pathObj.name.toString();
}
} else {
filePath = expandTilde(pathObj.path.toString());
}
var extArr = createExtensionArray(pathObj.extensions);
var extMap = createExtensionMap(pathObj.extensions);
var basedir = isString(pathObj.cwd) ? pathObj.cwd.toString() : '.';
basedir = path.resolve(expandTilde(basedir));
var findUp = !!pathObj.findUp;
var parsed = parsePath(filePath);
if (parsed.isAbsolute) {
filePath = filePath.slice(parsed.root.length);
findUp = false;
basedir = parsed.root;
/* istanbul ignore if */
} else if (parsed.root) { // Expanded path has a drive letter on Windows.
filePath = filePath.slice(parsed.root.length);
basedir = path.resolve(parsed.root);
}
if (parsed.ext) {
filePath = filePath.slice(0, -parsed.ext.length);
// This ensures that only the original extension is matched.
extArr = [parsed.ext];
}
return {
path: filePath,
basedir: basedir,
findUp: findUp,
extArr: extArr,
extMap: extMap,
};
}
function findWithExpandedPath(expanded) {
var found = expanded.findUp ?
findUpFile(expanded.basedir, expanded.path, expanded.extArr) :
findFile(expanded.basedir, expanded.path, expanded.extArr);
if (!found) {
return null;
}
if (expanded.extMap) {
found.extension = pick(expanded.extMap, found.extension);
}
return found;
}
function findFile(basedir, relpath, extArr) {
var noExtPath = path.resolve(basedir, relpath);
for (var i = 0, n = extArr.length; i < n; i++) {
var filepath = noExtPath + extArr[i];
try {
fs.statSync(filepath);
return { path: filepath, extension: extArr[i] };
} catch (e) {
// Ignore error
}
}
return null;
}
function findUpFile(basedir, filepath, extArr) {
var lastdir;
do {
var found = findFile(basedir, filepath, extArr);
if (found) {
return found;
}
lastdir = basedir;
basedir = path.dirname(basedir);
} while (lastdir !== basedir);
return null;
}
function createExtensionArray(exts) {
if (isString(exts)) {
return [exts];
}
if (Array.isArray(exts)) {
exts = exts.filter(isString);
return (exts.length > 0) ? exts : [''];
}
if (isPlainObject(exts)) {
exts = Object.keys(exts);
return (exts.length > 0) ? exts : [''];
}
return [''];
}
function createExtensionMap(exts) {
if (!isPlainObject(exts)) {
return null;
}
if (isEmpty(exts)) {
return { '': null };
}
return exts;
}
function isEmpty(object) {
return !Object.keys(object).length;
}
function isString(value) {
if (typeof value === 'string') {
return true;
}
if (Object.prototype.toString.call(value) === '[object String]') {
return true;
}
return false;
}
module.exports = fined;

View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014-2017, 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.

View file

@ -0,0 +1,104 @@
# is-plain-object [![NPM version](https://img.shields.io/npm/v/is-plain-object.svg?style=flat)](https://www.npmjs.com/package/is-plain-object) [![NPM monthly downloads](https://img.shields.io/npm/dm/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![NPM total downloads](https://img.shields.io/npm/dt/is-plain-object.svg?style=flat)](https://npmjs.org/package/is-plain-object) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/is-plain-object.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/is-plain-object)
> Returns true if an object was created by the `Object` constructor.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-plain-object
```
Use [isobject](https://github.com/jonschlinkert/isobject) if you only want to check if the value is an object and not an array or null.
## Usage
```js
var isPlainObject = require('is-plain-object');
```
**true** when created by the `Object` constructor.
```js
isPlainObject(Object.create({}));
//=> true
isPlainObject(Object.create(Object.prototype));
//=> true
isPlainObject({foo: 'bar'});
//=> true
isPlainObject({});
//=> true
```
**false** when not created by the `Object` constructor.
```js
isPlainObject(1);
//=> false
isPlainObject(['foo', 'bar']);
//=> false
isPlainObject([]);
//=> false
isPlainObject(new Foo);
//=> false
isPlainObject(null);
//=> false
isPlainObject(Object.create(null));
//=> false
```
## About
### Related projects
* [is-number](https://www.npmjs.com/package/is-number): Returns true if the value is a number. comprehensive tests. | [homepage](https://github.com/jonschlinkert/is-number "Returns true if the value is a number. comprehensive tests.")
* [isobject](https://www.npmjs.com/package/isobject): Returns true if the value is an object and not an array or null. | [homepage](https://github.com/jonschlinkert/isobject "Returns true if the value is an object and not an array or null.")
* [kind-of](https://www.npmjs.com/package/kind-of): Get the native type of a value. | [homepage](https://github.com/jonschlinkert/kind-of "Get the native type of a value.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 17 | [jonschlinkert](https://github.com/jonschlinkert) |
| 6 | [stevenvachon](https://github.com/stevenvachon) |
| 3 | [onokumus](https://github.com/onokumus) |
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
### Building docs
_(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
```
### Running tests
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
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
### License
Copyright © 2017, [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 July 11, 2017._

View file

@ -0,0 +1,5 @@
export = isPlainObject;
declare function isPlainObject(o: any): boolean;
declare namespace isPlainObject {}

View file

@ -0,0 +1,37 @@
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isObject = require('isobject');
function isObjectObject(o) {
return isObject(o) === true
&& Object.prototype.toString.call(o) === '[object Object]';
}
module.exports = function isPlainObject(o) {
var ctor,prot;
if (isObjectObject(o) === false) return false;
// If has modified constructor
ctor = o.constructor;
if (typeof ctor !== 'function') return false;
// If has modified prototype
prot = ctor.prototype;
if (isObjectObject(prot) === false) return false;
// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
}
// Most likely a plain Object
return true;
};

View file

@ -0,0 +1,79 @@
{
"name": "is-plain-object",
"description": "Returns true if an object was created by the `Object` constructor.",
"version": "2.0.4",
"homepage": "https://github.com/jonschlinkert/is-plain-object",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"Osman Nuri Okumuş (http://onokumus.com)",
"Steven Vachon (https://svachon.com)",
"(https://github.com/wtgtybhertgeghgtwtg)"
],
"repository": "jonschlinkert/is-plain-object",
"bugs": {
"url": "https://github.com/jonschlinkert/is-plain-object/issues"
},
"license": "MIT",
"files": [
"index.d.ts",
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"browserify": "browserify index.js --standalone isPlainObject | uglifyjs --compress --mangle -o browser/is-plain-object.js",
"test_browser": "mocha-phantomjs test/browser.html",
"test_node": "mocha",
"test": "npm run test_node && npm run browserify && npm run test_browser"
},
"dependencies": {
"isobject": "^3.0.1"
},
"devDependencies": {
"browserify": "^14.4.0",
"chai": "^4.0.2",
"gulp-format-md": "^1.0.0",
"mocha": "^3.4.2",
"mocha-phantomjs": "^4.1.0",
"phantomjs": "^2.1.7",
"uglify-js": "^3.0.24"
},
"keywords": [
"check",
"is",
"is-object",
"isobject",
"javascript",
"kind",
"kind-of",
"object",
"plain",
"type",
"typeof",
"value"
],
"types": "index.d.ts",
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"is-number",
"isobject",
"kind-of"
]
},
"lint": {
"reflinks": true
}
}
}

47
node_modules/fined/package.json generated vendored Normal file
View file

@ -0,0 +1,47 @@
{
"name": "fined",
"version": "1.2.0",
"description": "Find a file given a declaration of locations.",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"contributors": [
"Takayuki Sato <sttk.xslet@gmail.com>",
"Blaine Bublitz <blaine.bublitz@gmail.com>"
],
"repository": "gulpjs/fined",
"license": "MIT",
"engines": {
"node": ">= 0.10"
},
"main": "index.js",
"files": [
"index.js",
"LICENSE"
],
"scripts": {
"lint": "eslint .",
"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
},
"dependencies": {
"expand-tilde": "^2.0.2",
"is-plain-object": "^2.0.3",
"object.defaults": "^1.1.0",
"object.pick": "^1.2.0",
"parse-filepath": "^1.0.1"
},
"devDependencies": {
"eslint": "^2.13.0",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"mocha": "^3.5.3"
},
"keywords": [
"find",
"lookup",
"config"
]
}