Update dependencies
This commit is contained in:
parent
3ef2272400
commit
18c85cdef0
684 changed files with 4798 additions and 3530 deletions
28
node_modules/path-exists/index.d.ts
generated
vendored
Normal file
28
node_modules/path-exists/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
declare const pathExists: {
|
||||
/**
|
||||
Check if a path exists.
|
||||
|
||||
@returns Whether the path exists.
|
||||
|
||||
@example
|
||||
```
|
||||
// foo.ts
|
||||
import pathExists = require('path-exists');
|
||||
|
||||
(async () => {
|
||||
console.log(await pathExists('foo.ts'));
|
||||
//=> true
|
||||
})();
|
||||
```
|
||||
*/
|
||||
(path: string): Promise<boolean>;
|
||||
|
||||
/**
|
||||
Synchronously check if a path exists.
|
||||
|
||||
@returns Whether the path exists.
|
||||
*/
|
||||
sync(path: string): boolean;
|
||||
};
|
||||
|
||||
export = pathExists;
|
31
node_modules/path-exists/index.js
generated
vendored
31
node_modules/path-exists/index.js
generated
vendored
|
@ -1,24 +1,23 @@
|
|||
'use strict';
|
||||
var fs = require('fs');
|
||||
var Promise = require('pinkie-promise');
|
||||
const fs = require('fs');
|
||||
const {promisify} = require('util');
|
||||
|
||||
module.exports = function (fp) {
|
||||
var fn = typeof fs.access === 'function' ? fs.access : fs.stat;
|
||||
|
||||
return new Promise(function (resolve) {
|
||||
fn(fp, function (err) {
|
||||
resolve(!err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.sync = function (fp) {
|
||||
var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync;
|
||||
const pAccess = promisify(fs.access);
|
||||
|
||||
module.exports = async path => {
|
||||
try {
|
||||
fn(fp);
|
||||
await pAccess(path);
|
||||
return true;
|
||||
} catch (err) {
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports.sync = path => {
|
||||
try {
|
||||
fs.accessSync(path);
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
20
node_modules/path-exists/license
generated
vendored
20
node_modules/path-exists/license
generated
vendored
|
@ -1,21 +1,9 @@
|
|||
The MIT License (MIT)
|
||||
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:
|
||||
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 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.
|
||||
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.
|
||||
|
|
110
node_modules/path-exists/package.json
generated
vendored
110
node_modules/path-exists/package.json
generated
vendored
|
@ -1,75 +1,39 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
"path-exists@2.1.0",
|
||||
"F:\\laragon\\www\\wishthis"
|
||||
]
|
||||
],
|
||||
"_from": "path-exists@2.1.0",
|
||||
"_id": "path-exists@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
|
||||
"_location": "/path-exists",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "path-exists@2.1.0",
|
||||
"name": "path-exists",
|
||||
"escapedName": "path-exists",
|
||||
"rawSpec": "2.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "2.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/find-up"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
|
||||
"_spec": "2.1.0",
|
||||
"_where": "F:\\laragon\\www\\wishthis",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/path-exists/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"pinkie-promise": "^2.0.0"
|
||||
},
|
||||
"description": "Check if a path exists",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/path-exists#readme",
|
||||
"keywords": [
|
||||
"path",
|
||||
"exists",
|
||||
"exist",
|
||||
"file",
|
||||
"filepath",
|
||||
"fs",
|
||||
"filesystem",
|
||||
"file-system",
|
||||
"access",
|
||||
"stat"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "path-exists",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/path-exists.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
"name": "path-exists",
|
||||
"version": "4.0.0",
|
||||
"description": "Check if a path exists",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/path-exists",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"path",
|
||||
"exists",
|
||||
"exist",
|
||||
"file",
|
||||
"filepath",
|
||||
"fs",
|
||||
"filesystem",
|
||||
"file-system",
|
||||
"access",
|
||||
"stat"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
|
|
25
node_modules/path-exists/readme.md
generated
vendored
25
node_modules/path-exists/readme.md
generated
vendored
|
@ -2,7 +2,9 @@
|
|||
|
||||
> Check if a path exists
|
||||
|
||||
Because [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), but there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
|
||||
NOTE: `fs.existsSync` has been un-deprecated in Node.js since 6.8.0. If you only need to check synchronously, this module is not needed.
|
||||
|
||||
While [`fs.exists()`](https://nodejs.org/api/fs.html#fs_fs_exists_path_callback) is being [deprecated](https://github.com/iojs/io.js/issues/103), there's still a genuine use-case of being able to check if a path exists for other purposes than doing IO with it.
|
||||
|
||||
Never use this before handling a file though:
|
||||
|
||||
|
@ -12,7 +14,7 @@ Never use this before handling a file though:
|
|||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save path-exists
|
||||
$ npm install path-exists
|
||||
```
|
||||
|
||||
|
||||
|
@ -20,12 +22,12 @@ $ npm install --save path-exists
|
|||
|
||||
```js
|
||||
// foo.js
|
||||
var pathExists = require('path-exists');
|
||||
const pathExists = require('path-exists');
|
||||
|
||||
pathExists('foo.js').then(function (exists) {
|
||||
console.log(exists);
|
||||
(async () => {
|
||||
console.log(await pathExists('foo.js'));
|
||||
//=> true
|
||||
});
|
||||
})();
|
||||
```
|
||||
|
||||
|
||||
|
@ -33,13 +35,18 @@ pathExists('foo.js').then(function (exists) {
|
|||
|
||||
### pathExists(path)
|
||||
|
||||
Returns a promise that resolves to a boolean of whether the path exists.
|
||||
Returns a `Promise<boolean>` of whether the path exists.
|
||||
|
||||
### pathExists.sync(path)
|
||||
|
||||
Returns a boolean of whether the path exists.
|
||||
Returns a `boolean` of whether the path exists.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [path-exists-cli](https://github.com/sindresorhus/path-exists-cli) - CLI for this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue