1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-python synced 2025-06-09 12:52:20 +02:00

Initial pass

This commit is contained in:
Danny McCormick 2019-06-26 21:12:00 -04:00
commit 39c08a0eaa
7242 changed files with 1886006 additions and 0 deletions

28
node_modules/path-exists/index.d.ts generated vendored Normal file
View 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;

23
node_modules/path-exists/index.js generated vendored Normal file
View file

@ -0,0 +1,23 @@
'use strict';
const fs = require('fs');
const {promisify} = require('util');
const pAccess = promisify(fs.access);
module.exports = async path => {
try {
await pAccess(path);
return true;
} catch (_) {
return false;
}
};
module.exports.sync = path => {
try {
fs.accessSync(path);
return true;
} catch (_) {
return false;
}
};

9
node_modules/path-exists/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.

75
node_modules/path-exists/package.json generated vendored Normal file
View file

@ -0,0 +1,75 @@
{
"_args": [
[
"path-exists@4.0.0",
"C:\\Users\\Administrator\\Documents\\setup-python"
]
],
"_development": true,
"_from": "path-exists@4.0.0",
"_id": "path-exists@4.0.0",
"_inBundle": false,
"_integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"_location": "/path-exists",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "path-exists@4.0.0",
"name": "path-exists",
"escapedName": "path-exists",
"rawSpec": "4.0.0",
"saveSpec": null,
"fetchSpec": "4.0.0"
},
"_requiredBy": [
"/find-up"
],
"_resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
"_spec": "4.0.0",
"_where": "C:\\Users\\Administrator\\Documents\\setup-python",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/path-exists/issues"
},
"description": "Check if a path exists",
"devDependencies": {
"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-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 && tsd"
},
"version": "4.0.0"
}

52
node_modules/path-exists/readme.md generated vendored Normal file
View file

@ -0,0 +1,52 @@
# path-exists [![Build Status](https://travis-ci.org/sindresorhus/path-exists.svg?branch=master)](https://travis-ci.org/sindresorhus/path-exists)
> Check if a path exists
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:
> In particular, checking if a file exists before opening it is an anti-pattern that leaves you vulnerable to race conditions: another process may remove the file between the calls to `fs.exists()` and `fs.open()`. Just open the file and handle the error when it's not there.
## Install
```
$ npm install path-exists
```
## Usage
```js
// foo.js
const pathExists = require('path-exists');
(async () => {
console.log(await pathExists('foo.js'));
//=> true
})();
```
## API
### pathExists(path)
Returns a `Promise<boolean>` of whether the path exists.
### pathExists.sync(path)
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](https://sindresorhus.com)