mirror of
https://github.com/actions/setup-java.git
synced 2025-04-21 02:16:45 +00:00
Fix.
This commit is contained in:
parent
596a6da241
commit
c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions
42
node_modules/path-type/index.js
generated
vendored
Normal file
42
node_modules/path-type/index.js
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
'use strict';
|
||||
const fs = require('fs');
|
||||
const pify = require('pify');
|
||||
|
||||
function type(fn, fn2, fp) {
|
||||
if (typeof fp !== 'string') {
|
||||
return Promise.reject(new TypeError(`Expected a string, got ${typeof fp}`));
|
||||
}
|
||||
|
||||
return pify(fs[fn])(fp)
|
||||
.then(stats => stats[fn2]())
|
||||
.catch(err => {
|
||||
if (err.code === 'ENOENT') {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
function typeSync(fn, fn2, fp) {
|
||||
if (typeof fp !== 'string') {
|
||||
throw new TypeError(`Expected a string, got ${typeof fp}`);
|
||||
}
|
||||
|
||||
try {
|
||||
return fs[fn](fp)[fn2]();
|
||||
} catch (err) {
|
||||
if (err.code === 'ENOENT') {
|
||||
return false;
|
||||
}
|
||||
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
|
||||
exports.file = type.bind(null, 'stat', 'isFile');
|
||||
exports.dir = type.bind(null, 'stat', 'isDirectory');
|
||||
exports.symlink = type.bind(null, 'lstat', 'isSymbolicLink');
|
||||
exports.fileSync = typeSync.bind(null, 'statSync', 'isFile');
|
||||
exports.dirSync = typeSync.bind(null, 'statSync', 'isDirectory');
|
||||
exports.symlinkSync = typeSync.bind(null, 'lstatSync', 'isSymbolicLink');
|
9
node_modules/path-type/license
generated
vendored
Normal file
9
node_modules/path-type/license
generated
vendored
Normal 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.
|
77
node_modules/path-type/package.json
generated
vendored
Normal file
77
node_modules/path-type/package.json
generated
vendored
Normal file
|
@ -0,0 +1,77 @@
|
|||
{
|
||||
"_from": "path-type@^3.0.0",
|
||||
"_id": "path-type@3.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
|
||||
"_location": "/path-type",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "path-type@^3.0.0",
|
||||
"name": "path-type",
|
||||
"escapedName": "path-type",
|
||||
"rawSpec": "^3.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/read-pkg-up/read-pkg"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
|
||||
"_shasum": "cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f",
|
||||
"_spec": "path-type@^3.0.0",
|
||||
"_where": "E:\\github\\setup-java\\node_modules\\read-pkg-up\\node_modules\\read-pkg",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/path-type/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"pify": "^3.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Check if a path is a file, directory, or symlink",
|
||||
"devDependencies": {
|
||||
"ava": "*",
|
||||
"xo": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/sindresorhus/path-type#readme",
|
||||
"keywords": [
|
||||
"path",
|
||||
"fs",
|
||||
"type",
|
||||
"is",
|
||||
"check",
|
||||
"directory",
|
||||
"dir",
|
||||
"file",
|
||||
"filepath",
|
||||
"symlink",
|
||||
"symbolic",
|
||||
"link",
|
||||
"stat",
|
||||
"stats",
|
||||
"filesystem"
|
||||
],
|
||||
"license": "MIT",
|
||||
"name": "path-type",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/sindresorhus/path-type.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"version": "3.0.0"
|
||||
}
|
42
node_modules/path-type/readme.md
generated
vendored
Normal file
42
node_modules/path-type/readme.md
generated
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
# path-type [](https://travis-ci.org/sindresorhus/path-type)
|
||||
|
||||
> Check if a path is a file, directory, or symlink
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install path-type
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const pathType = require('path-type');
|
||||
|
||||
pathType.file('package.json').then(isFile => {
|
||||
console.log(isFile);
|
||||
//=> true
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### .file(path)
|
||||
### .dir(path)
|
||||
### .symlink(path)
|
||||
|
||||
Returns a `Promise` for a `boolean` of whether the path is the checked type.
|
||||
|
||||
### .fileSync(path)
|
||||
### .dirSync(path)
|
||||
### .symlinkSync(path)
|
||||
|
||||
Returns a `boolean` of whether the path is the checked type.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
Loading…
Add table
Add a link
Reference in a new issue