initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
34
github/codeql-action-v2/node_modules/file-url/index.d.ts
generated
vendored
Normal file
34
github/codeql-action-v2/node_modules/file-url/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
declare namespace fileUrl {
|
||||
interface Options {
|
||||
/**
|
||||
Passing `false` will make it not call `path.resolve()` on the path.
|
||||
|
||||
@default true
|
||||
*/
|
||||
readonly resolve?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Convert a file path to a file URL.
|
||||
|
||||
@param filePath - File path to convert.
|
||||
@returns The `filePath` converted to a file URL.
|
||||
|
||||
@example
|
||||
```
|
||||
import fileUrl = require('file-url');
|
||||
|
||||
fileUrl('unicorn.jpg');
|
||||
//=> 'file:///Users/sindresorhus/dev/file-url/unicorn.jpg'
|
||||
|
||||
fileUrl('/Users/pony/pics/unicorn.jpg');
|
||||
//=> 'file:///Users/pony/pics/unicorn.jpg'
|
||||
|
||||
fileUrl('unicorn.jpg', {resolve: false});
|
||||
//=> 'file:///unicorn.jpg'
|
||||
```
|
||||
*/
|
||||
declare function fileUrl(filePath: string, options?: fileUrl.Options): string;
|
||||
|
||||
export = fileUrl;
|
||||
30
github/codeql-action-v2/node_modules/file-url/index.js
generated
vendored
Normal file
30
github/codeql-action-v2/node_modules/file-url/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
'use strict';
|
||||
const path = require('path');
|
||||
|
||||
module.exports = (filePath, options) => {
|
||||
if (typeof filePath !== 'string') {
|
||||
throw new TypeError(`Expected a string, got ${typeof filePath}`);
|
||||
}
|
||||
|
||||
options = {
|
||||
resolve: true,
|
||||
...options
|
||||
};
|
||||
|
||||
let pathName = filePath;
|
||||
|
||||
if (options.resolve) {
|
||||
pathName = path.resolve(filePath);
|
||||
}
|
||||
|
||||
pathName = pathName.replace(/\\/g, '/');
|
||||
|
||||
// Windows drive letter must be prefixed with a slash
|
||||
if (pathName[0] !== '/') {
|
||||
pathName = `/${pathName}`;
|
||||
}
|
||||
|
||||
// Escape required characters for path components
|
||||
// See: https://tools.ietf.org/html/rfc3986#section-3.3
|
||||
return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent);
|
||||
};
|
||||
9
github/codeql-action-v2/node_modules/file-url/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/file-url/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.
|
||||
35
github/codeql-action-v2/node_modules/file-url/package.json
generated
vendored
Normal file
35
github/codeql-action-v2/node_modules/file-url/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "file-url",
|
||||
"version": "3.0.0",
|
||||
"description": "Convert a file path to a file url: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/file-url",
|
||||
"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": [
|
||||
"file",
|
||||
"url",
|
||||
"uri",
|
||||
"path",
|
||||
"scheme",
|
||||
"slash"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
59
github/codeql-action-v2/node_modules/file-url/readme.md
generated
vendored
Normal file
59
github/codeql-action-v2/node_modules/file-url/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# file-url [](https://travis-ci.org/sindresorhus/file-url)
|
||||
|
||||
> Convert a file path to a file url: `unicorn.jpg` → `file:///Users/sindresorhus/unicorn.jpg`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install file-url
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const fileUrl = require('file-url');
|
||||
|
||||
fileUrl('unicorn.jpg');
|
||||
//=> 'file:///Users/sindresorhus/dev/file-url/unicorn.jpg'
|
||||
|
||||
fileUrl('/Users/pony/pics/unicorn.jpg');
|
||||
//=> 'file:///Users/pony/pics/unicorn.jpg'
|
||||
|
||||
fileUrl('unicorn.jpg', {resolve: false});
|
||||
//=> 'file:///unicorn.jpg'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### fileUrl(filePath, [options])
|
||||
|
||||
Returns the `filePath` converted to a file URL.
|
||||
|
||||
#### filePath
|
||||
|
||||
Type: `string`
|
||||
|
||||
File path to convert.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### resolve
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Passing `false` will make it not call `path.resolve()` on the path.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [file-url-cli](https://github.com/sindresorhus/file-url-cli) - CLI for this module
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Loading…
Add table
Add a link
Reference in a new issue