initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
68
github/codeql-action-v2/node_modules/date-time/index.d.ts
generated
vendored
Normal file
68
github/codeql-action-v2/node_modules/date-time/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
declare namespace dateTime {
|
||||
interface Options {
|
||||
/**
|
||||
Custom date.
|
||||
|
||||
@default new Date()
|
||||
*/
|
||||
date?: Date;
|
||||
|
||||
/**
|
||||
Show the date in the local time zone.
|
||||
|
||||
@default false
|
||||
*/
|
||||
local?: boolean;
|
||||
|
||||
/**
|
||||
Show the UTC time zone postfix.
|
||||
|
||||
@default false
|
||||
*/
|
||||
showTimeZone?: boolean;
|
||||
|
||||
/**
|
||||
Show the milliseconds in the date if any.
|
||||
|
||||
@default false
|
||||
*/
|
||||
showMilliseconds?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
declare const dateTime: {
|
||||
/**
|
||||
Pretty datetime: `2014-01-09 06:46:01`.
|
||||
|
||||
@example
|
||||
```
|
||||
import dateTime = require('date-time');
|
||||
|
||||
dateTime();
|
||||
//=> '2017-05-20 17:07:05'
|
||||
|
||||
dateTime({date: new Date(1989, 2, 4, 10)});
|
||||
//=> '1989-03-04 09:00:00'
|
||||
|
||||
dateTime({showTimeZone: true});
|
||||
//=> '2017-05-20 17:07:05 UTC+7'
|
||||
|
||||
dateTime({local: false});
|
||||
//=> '2017-05-20 10:07:05'
|
||||
|
||||
dateTime({local: false, showTimeZone: true});
|
||||
//=> '2017-05-20 10:07:05 UTC'
|
||||
|
||||
dateTime({showMilliseconds: true});
|
||||
//=> '2017-05-20 17:07:05 6ms'
|
||||
```
|
||||
*/
|
||||
(options?: dateTime.Options): string;
|
||||
|
||||
// TODO: Remove this for the next major release, refactor the whole definition to:
|
||||
// declare function dateTime(options?: dateTime.Options): string;
|
||||
// export = dateTime;
|
||||
default: typeof dateTime;
|
||||
};
|
||||
|
||||
export = dateTime;
|
||||
37
github/codeql-action-v2/node_modules/date-time/index.js
generated
vendored
Normal file
37
github/codeql-action-v2/node_modules/date-time/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
'use strict';
|
||||
const timeZone = require('time-zone');
|
||||
|
||||
const dateTime = options => {
|
||||
options = Object.assign({
|
||||
date: new Date(),
|
||||
local: true,
|
||||
showTimeZone: false,
|
||||
showMilliseconds: false
|
||||
}, options);
|
||||
|
||||
let {date} = options;
|
||||
|
||||
if (options.local) {
|
||||
// Offset the date so it will return the correct value when getting the ISO string
|
||||
date = new Date(date.getTime() - (date.getTimezoneOffset() * 60000));
|
||||
}
|
||||
|
||||
let end = '';
|
||||
|
||||
if (options.showTimeZone) {
|
||||
end = ' UTC' + (options.local ? timeZone(date) : '');
|
||||
}
|
||||
|
||||
if (options.showMilliseconds && date.getUTCMilliseconds() > 0) {
|
||||
end = ` ${date.getUTCMilliseconds()}ms${end}`;
|
||||
}
|
||||
|
||||
return date
|
||||
.toISOString()
|
||||
.replace(/T/, ' ')
|
||||
.replace(/\..+/, end);
|
||||
};
|
||||
|
||||
module.exports = dateTime;
|
||||
// TODO: Remove this for the next major release
|
||||
module.exports.default = dateTime;
|
||||
9
github/codeql-action-v2/node_modules/date-time/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/date-time/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.
|
||||
41
github/codeql-action-v2/node_modules/date-time/package.json
generated
vendored
Normal file
41
github/codeql-action-v2/node_modules/date-time/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "date-time",
|
||||
"version": "3.1.0",
|
||||
"description": "Pretty datetime: `2014-01-09 06:46:01`",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/date-time",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"datetime",
|
||||
"date-time",
|
||||
"date",
|
||||
"time",
|
||||
"utc",
|
||||
"iso",
|
||||
"timezone",
|
||||
"zone",
|
||||
"timestamp"
|
||||
],
|
||||
"dependencies": {
|
||||
"time-zone": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.1",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
77
github/codeql-action-v2/node_modules/date-time/readme.md
generated
vendored
Normal file
77
github/codeql-action-v2/node_modules/date-time/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
# date-time [](https://travis-ci.org/sindresorhus/date-time)
|
||||
|
||||
> Pretty datetime: `2014-01-09 06:46:01`
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install date-time
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const dateTime = require('date-time');
|
||||
|
||||
dateTime();
|
||||
//=> '2017-05-20 17:07:05'
|
||||
|
||||
dateTime({date: new Date(1989, 2, 4, 10)});
|
||||
//=> '1989-03-04 09:00:00'
|
||||
|
||||
dateTime({showTimeZone: true});
|
||||
//=> '2017-05-20 17:07:05 UTC+7'
|
||||
|
||||
dateTime({local: false});
|
||||
//=> '2017-05-20 10:07:05'
|
||||
|
||||
dateTime({local: false, showTimeZone: true});
|
||||
//=> '2017-05-20 10:07:05 UTC'
|
||||
|
||||
dateTime({showMilliseconds: true});
|
||||
//=> '2017-05-20 17:07:05 6ms'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### dateTime([options])
|
||||
|
||||
### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
#### date
|
||||
|
||||
Type: `Date`<br>
|
||||
Default: `new Date()`
|
||||
|
||||
Custom date.
|
||||
|
||||
#### local
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `true`
|
||||
|
||||
Show the date in the local time zone.
|
||||
|
||||
#### showTimeZone
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Show the UTC time zone postfix.
|
||||
|
||||
#### showMilliseconds
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Show the milliseconds in the date if any.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
Loading…
Add table
Add a link
Reference in a new issue