initial commit of actions
This commit is contained in:
commit
949ece5785
44660 changed files with 12034344 additions and 0 deletions
116
github/codeql-action-v2/node_modules/del/index.d.ts
generated
vendored
Normal file
116
github/codeql-action-v2/node_modules/del/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
import {GlobbyOptions} from 'globby';
|
||||
|
||||
declare namespace del {
|
||||
interface ProgressData {
|
||||
/**
|
||||
Deleted files and directories count.
|
||||
*/
|
||||
deletedCount: number;
|
||||
|
||||
/**
|
||||
Total files and directories count.
|
||||
*/
|
||||
totalCount: number;
|
||||
|
||||
/**
|
||||
Completed percentage. A value between `0` and `1`.
|
||||
*/
|
||||
percent: number;
|
||||
}
|
||||
|
||||
interface Options extends GlobbyOptions {
|
||||
/**
|
||||
Allow deleting the current working directory and outside.
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly force?: boolean;
|
||||
|
||||
/**
|
||||
See what would be deleted.
|
||||
|
||||
@default false
|
||||
|
||||
@example
|
||||
```
|
||||
import del = require('del');
|
||||
|
||||
(async () => {
|
||||
const deletedPaths = await del(['temp/*.js'], {dryRun: true});
|
||||
|
||||
console.log('Files and directories that would be deleted:\n', deletedPaths.join('\n'));
|
||||
})();
|
||||
```
|
||||
*/
|
||||
readonly dryRun?: boolean;
|
||||
|
||||
/**
|
||||
Concurrency limit. Minimum: `1`.
|
||||
|
||||
@default Infinity
|
||||
*/
|
||||
readonly concurrency?: number;
|
||||
|
||||
/**
|
||||
Called after each file or directory is deleted.
|
||||
|
||||
@example
|
||||
```
|
||||
import del from 'del';
|
||||
|
||||
await del(patterns, {
|
||||
onProgress: progress => {
|
||||
// …
|
||||
}});
|
||||
```
|
||||
*/
|
||||
readonly onProgress?: (progress: ProgressData) => void;
|
||||
}
|
||||
}
|
||||
|
||||
declare const del: {
|
||||
/**
|
||||
Synchronously delete files and directories using glob patterns.
|
||||
|
||||
Note that glob patterns can only contain forward-slashes, not backward-slashes. Windows file paths can use backward-slashes as long as the path does not contain any glob-like characters, otherwise use `path.posix.join()` instead of `path.join()`.
|
||||
|
||||
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)
|
||||
- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
|
||||
@param options - You can specify any of the [`globby` options](https://github.com/sindresorhus/globby#options) in addition to the `del` options. In contrast to the `globby` defaults, `expandDirectories`, `onlyFiles`, and `followSymbolicLinks` are `false` by default.
|
||||
@returns The deleted paths.
|
||||
*/
|
||||
sync: (
|
||||
patterns: string | readonly string[],
|
||||
options?: del.Options
|
||||
) => string[];
|
||||
|
||||
/**
|
||||
Delete files and directories using glob patterns.
|
||||
|
||||
Note that glob patterns can only contain forward-slashes, not backward-slashes. Windows file paths can use backward-slashes as long as the path does not contain any glob-like characters, otherwise use `path.posix.join()` instead of `path.join()`.
|
||||
|
||||
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)
|
||||
- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
|
||||
@param options - You can specify any of the [`globby` options](https://github.com/sindresorhus/globby#options) in addition to the `del` options. In contrast to the `globby` defaults, `expandDirectories`, `onlyFiles`, and `followSymbolicLinks` are `false` by default.
|
||||
@returns The deleted paths.
|
||||
|
||||
@example
|
||||
```
|
||||
import del = require('del');
|
||||
|
||||
(async () => {
|
||||
const deletedPaths = await del(['temp/*.js', '!temp/unicorn.js']);
|
||||
|
||||
console.log('Deleted files and directories:\n', deletedPaths.join('\n'));
|
||||
})();
|
||||
```
|
||||
*/
|
||||
(
|
||||
patterns: string | readonly string[],
|
||||
options?: del.Options
|
||||
): Promise<string[]>;
|
||||
};
|
||||
|
||||
export = del;
|
||||
139
github/codeql-action-v2/node_modules/del/index.js
generated
vendored
Normal file
139
github/codeql-action-v2/node_modules/del/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
'use strict';
|
||||
const {promisify} = require('util');
|
||||
const path = require('path');
|
||||
const globby = require('globby');
|
||||
const isGlob = require('is-glob');
|
||||
const slash = require('slash');
|
||||
const gracefulFs = require('graceful-fs');
|
||||
const isPathCwd = require('is-path-cwd');
|
||||
const isPathInside = require('is-path-inside');
|
||||
const rimraf = require('rimraf');
|
||||
const pMap = require('p-map');
|
||||
|
||||
const rimrafP = promisify(rimraf);
|
||||
|
||||
const rimrafOptions = {
|
||||
glob: false,
|
||||
unlink: gracefulFs.unlink,
|
||||
unlinkSync: gracefulFs.unlinkSync,
|
||||
chmod: gracefulFs.chmod,
|
||||
chmodSync: gracefulFs.chmodSync,
|
||||
stat: gracefulFs.stat,
|
||||
statSync: gracefulFs.statSync,
|
||||
lstat: gracefulFs.lstat,
|
||||
lstatSync: gracefulFs.lstatSync,
|
||||
rmdir: gracefulFs.rmdir,
|
||||
rmdirSync: gracefulFs.rmdirSync,
|
||||
readdir: gracefulFs.readdir,
|
||||
readdirSync: gracefulFs.readdirSync
|
||||
};
|
||||
|
||||
function safeCheck(file, cwd) {
|
||||
if (isPathCwd(file)) {
|
||||
throw new Error('Cannot delete the current working directory. Can be overridden with the `force` option.');
|
||||
}
|
||||
|
||||
if (!isPathInside(file, cwd)) {
|
||||
throw new Error('Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option.');
|
||||
}
|
||||
}
|
||||
|
||||
function normalizePatterns(patterns) {
|
||||
patterns = Array.isArray(patterns) ? patterns : [patterns];
|
||||
|
||||
patterns = patterns.map(pattern => {
|
||||
if (process.platform === 'win32' && isGlob(pattern) === false) {
|
||||
return slash(pattern);
|
||||
}
|
||||
|
||||
return pattern;
|
||||
});
|
||||
|
||||
return patterns;
|
||||
}
|
||||
|
||||
module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), onProgress = () => {}, ...options} = {}) => {
|
||||
options = {
|
||||
expandDirectories: false,
|
||||
onlyFiles: false,
|
||||
followSymbolicLinks: false,
|
||||
cwd,
|
||||
...options
|
||||
};
|
||||
|
||||
patterns = normalizePatterns(patterns);
|
||||
|
||||
const files = (await globby(patterns, options))
|
||||
.sort((a, b) => b.localeCompare(a));
|
||||
|
||||
if (files.length === 0) {
|
||||
onProgress({
|
||||
totalCount: 0,
|
||||
deletedCount: 0,
|
||||
percent: 1
|
||||
});
|
||||
}
|
||||
|
||||
let deletedCount = 0;
|
||||
|
||||
const mapper = async file => {
|
||||
file = path.resolve(cwd, file);
|
||||
|
||||
if (!force) {
|
||||
safeCheck(file, cwd);
|
||||
}
|
||||
|
||||
if (!dryRun) {
|
||||
await rimrafP(file, rimrafOptions);
|
||||
}
|
||||
|
||||
deletedCount += 1;
|
||||
|
||||
onProgress({
|
||||
totalCount: files.length,
|
||||
deletedCount,
|
||||
percent: deletedCount / files.length
|
||||
});
|
||||
|
||||
return file;
|
||||
};
|
||||
|
||||
const removedFiles = await pMap(files, mapper, options);
|
||||
|
||||
removedFiles.sort((a, b) => a.localeCompare(b));
|
||||
|
||||
return removedFiles;
|
||||
};
|
||||
|
||||
module.exports.sync = (patterns, {force, dryRun, cwd = process.cwd(), ...options} = {}) => {
|
||||
options = {
|
||||
expandDirectories: false,
|
||||
onlyFiles: false,
|
||||
followSymbolicLinks: false,
|
||||
cwd,
|
||||
...options
|
||||
};
|
||||
|
||||
patterns = normalizePatterns(patterns);
|
||||
|
||||
const files = globby.sync(patterns, options)
|
||||
.sort((a, b) => b.localeCompare(a));
|
||||
|
||||
const removedFiles = files.map(file => {
|
||||
file = path.resolve(cwd, file);
|
||||
|
||||
if (!force) {
|
||||
safeCheck(file, cwd);
|
||||
}
|
||||
|
||||
if (!dryRun) {
|
||||
rimraf.sync(file, rimrafOptions);
|
||||
}
|
||||
|
||||
return file;
|
||||
});
|
||||
|
||||
removedFiles.sort((a, b) => a.localeCompare(b));
|
||||
|
||||
return removedFiles;
|
||||
};
|
||||
9
github/codeql-action-v2/node_modules/del/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/del/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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.
|
||||
51
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/index.d.ts
generated
vendored
Normal file
51
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/**
|
||||
Create an error from multiple errors.
|
||||
*/
|
||||
declare class AggregateError<T extends Error = Error> extends Error implements Iterable<T> {
|
||||
readonly name: 'AggregateError';
|
||||
|
||||
/**
|
||||
@param errors - If a string, a new `Error` is created with the string as the error message. If a non-Error object, a new `Error` is created with all properties from the object copied over.
|
||||
@returns An Error that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors.
|
||||
|
||||
@example
|
||||
```
|
||||
import AggregateError = require('aggregate-error');
|
||||
|
||||
const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]);
|
||||
|
||||
throw error;
|
||||
|
||||
// AggregateError:
|
||||
// Error: foo
|
||||
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:33)
|
||||
// Error: bar
|
||||
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
||||
// Error: baz
|
||||
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
||||
// at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3)
|
||||
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
||||
// at Module._compile (module.js:556:32)
|
||||
// at Object.Module._extensions..js (module.js:565:10)
|
||||
// at Module.load (module.js:473:32)
|
||||
// at tryModuleLoad (module.js:432:12)
|
||||
// at Function.Module._load (module.js:424:3)
|
||||
// at Module.runMain (module.js:590:10)
|
||||
// at run (bootstrap_node.js:394:7)
|
||||
// at startup (bootstrap_node.js:149:9)
|
||||
|
||||
|
||||
for (const individualError of error) {
|
||||
console.log(individualError);
|
||||
}
|
||||
//=> [Error: foo]
|
||||
//=> [Error: bar]
|
||||
//=> [Error: baz]
|
||||
```
|
||||
*/
|
||||
constructor(errors: ReadonlyArray<T | {[key: string]: any} | string>);
|
||||
|
||||
[Symbol.iterator](): IterableIterator<T>;
|
||||
}
|
||||
|
||||
export = AggregateError;
|
||||
47
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/index.js
generated
vendored
Normal file
47
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
'use strict';
|
||||
const indentString = require('indent-string');
|
||||
const cleanStack = require('clean-stack');
|
||||
|
||||
const cleanInternalStack = stack => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, '');
|
||||
|
||||
class AggregateError extends Error {
|
||||
constructor(errors) {
|
||||
if (!Array.isArray(errors)) {
|
||||
throw new TypeError(`Expected input to be an Array, got ${typeof errors}`);
|
||||
}
|
||||
|
||||
errors = [...errors].map(error => {
|
||||
if (error instanceof Error) {
|
||||
return error;
|
||||
}
|
||||
|
||||
if (error !== null && typeof error === 'object') {
|
||||
// Handle plain error objects with message property and/or possibly other metadata
|
||||
return Object.assign(new Error(error.message), error);
|
||||
}
|
||||
|
||||
return new Error(error);
|
||||
});
|
||||
|
||||
let message = errors
|
||||
.map(error => {
|
||||
// The `stack` property is not standardized, so we can't assume it exists
|
||||
return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error);
|
||||
})
|
||||
.join('\n');
|
||||
message = '\n' + indentString(message, 4);
|
||||
super(message);
|
||||
|
||||
this.name = 'AggregateError';
|
||||
|
||||
Object.defineProperty(this, '_errors', {value: errors});
|
||||
}
|
||||
|
||||
* [Symbol.iterator]() {
|
||||
for (const error of this._errors) {
|
||||
yield error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AggregateError;
|
||||
9
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/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/del/node_modules/aggregate-error/package.json
generated
vendored
Normal file
41
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "aggregate-error",
|
||||
"version": "3.1.0",
|
||||
"description": "Create an error from multiple errors",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/aggregate-error",
|
||||
"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": [
|
||||
"aggregate",
|
||||
"error",
|
||||
"combine",
|
||||
"multiple",
|
||||
"many",
|
||||
"collection",
|
||||
"iterable",
|
||||
"iterator"
|
||||
],
|
||||
"dependencies": {
|
||||
"clean-stack": "^2.0.0",
|
||||
"indent-string": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^2.4.0",
|
||||
"tsd": "^0.7.1",
|
||||
"xo": "^0.25.3"
|
||||
}
|
||||
}
|
||||
61
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/readme.md
generated
vendored
Normal file
61
github/codeql-action-v2/node_modules/del/node_modules/aggregate-error/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# aggregate-error [](https://travis-ci.org/sindresorhus/aggregate-error)
|
||||
|
||||
> Create an error from multiple errors
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install aggregate-error
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const AggregateError = require('aggregate-error');
|
||||
|
||||
const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]);
|
||||
|
||||
throw error;
|
||||
/*
|
||||
AggregateError:
|
||||
Error: foo
|
||||
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:33)
|
||||
Error: bar
|
||||
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
||||
Error: baz
|
||||
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
||||
at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3)
|
||||
at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
|
||||
at Module._compile (module.js:556:32)
|
||||
at Object.Module._extensions..js (module.js:565:10)
|
||||
at Module.load (module.js:473:32)
|
||||
at tryModuleLoad (module.js:432:12)
|
||||
at Function.Module._load (module.js:424:3)
|
||||
at Module.runMain (module.js:590:10)
|
||||
at run (bootstrap_node.js:394:7)
|
||||
at startup (bootstrap_node.js:149:9)
|
||||
*/
|
||||
|
||||
for (const individualError of error) {
|
||||
console.log(individualError);
|
||||
}
|
||||
//=> [Error: foo]
|
||||
//=> [Error: bar]
|
||||
//=> [Error: baz]
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### AggregateError(errors)
|
||||
|
||||
Returns an `Error` that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors.
|
||||
|
||||
#### errors
|
||||
|
||||
Type: `Array<Error|Object|string>`
|
||||
|
||||
If a string, a new `Error` is created with the string as the error message.<br>
|
||||
If a non-Error object, a new `Error` is created with all properties from the object copied over.
|
||||
47
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/index.d.ts
generated
vendored
Normal file
47
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
declare namespace cleanStack {
|
||||
interface Options {
|
||||
/**
|
||||
Prettify the file paths in the stack:
|
||||
|
||||
`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15`
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly pretty?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Clean up error stack traces. Removes the mostly unhelpful internal Node.js entries.
|
||||
|
||||
@param stack - The `stack` property of an `Error`.
|
||||
|
||||
@example
|
||||
```
|
||||
import cleanStack = require('clean-stack');
|
||||
|
||||
const error = new Error('Missing unicorn');
|
||||
|
||||
console.log(error.stack);
|
||||
|
||||
// Error: Missing unicorn
|
||||
// at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
|
||||
// at Module._compile (module.js:409:26)
|
||||
// at Object.Module._extensions..js (module.js:416:10)
|
||||
// at Module.load (module.js:343:32)
|
||||
// at Function.Module._load (module.js:300:12)
|
||||
// at Function.Module.runMain (module.js:441:10)
|
||||
// at startup (node.js:139:18)
|
||||
|
||||
console.log(cleanStack(error.stack));
|
||||
|
||||
// Error: Missing unicorn
|
||||
// at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
|
||||
```
|
||||
*/
|
||||
declare function cleanStack(
|
||||
stack: string,
|
||||
options?: cleanStack.Options
|
||||
): string;
|
||||
|
||||
export = cleanStack;
|
||||
40
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/index.js
generated
vendored
Normal file
40
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
'use strict';
|
||||
const os = require('os');
|
||||
|
||||
const extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/;
|
||||
const pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/;
|
||||
const homeDir = typeof os.homedir === 'undefined' ? '' : os.homedir();
|
||||
|
||||
module.exports = (stack, options) => {
|
||||
options = Object.assign({pretty: false}, options);
|
||||
|
||||
return stack.replace(/\\/g, '/')
|
||||
.split('\n')
|
||||
.filter(line => {
|
||||
const pathMatches = line.match(extractPathRegex);
|
||||
if (pathMatches === null || !pathMatches[1]) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const match = pathMatches[1];
|
||||
|
||||
// Electron
|
||||
if (
|
||||
match.includes('.app/Contents/Resources/electron.asar') ||
|
||||
match.includes('.app/Contents/Resources/default_app.asar')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !pathRegex.test(match);
|
||||
})
|
||||
.filter(line => line.trim() !== '')
|
||||
.map(line => {
|
||||
if (options.pretty) {
|
||||
return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, '~')));
|
||||
}
|
||||
|
||||
return line;
|
||||
})
|
||||
.join('\n');
|
||||
};
|
||||
9
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/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.
|
||||
39
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/package.json
generated
vendored
Normal file
39
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"name": "clean-stack",
|
||||
"version": "2.2.0",
|
||||
"description": "Clean up error stack traces",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/clean-stack",
|
||||
"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": [
|
||||
"clean",
|
||||
"stack",
|
||||
"trace",
|
||||
"traces",
|
||||
"error",
|
||||
"err",
|
||||
"electron"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"browser": {
|
||||
"os": false
|
||||
}
|
||||
}
|
||||
76
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/readme.md
generated
vendored
Normal file
76
github/codeql-action-v2/node_modules/del/node_modules/clean-stack/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# clean-stack [](https://travis-ci.org/sindresorhus/clean-stack)
|
||||
|
||||
> Clean up error stack traces
|
||||
|
||||
Removes the mostly unhelpful internal Node.js entries.
|
||||
|
||||
Also works in Electron.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install clean-stack
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const cleanStack = require('clean-stack');
|
||||
|
||||
const error = new Error('Missing unicorn');
|
||||
|
||||
console.log(error.stack);
|
||||
/*
|
||||
Error: Missing unicorn
|
||||
at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
|
||||
at Module._compile (module.js:409:26)
|
||||
at Object.Module._extensions..js (module.js:416:10)
|
||||
at Module.load (module.js:343:32)
|
||||
at Function.Module._load (module.js:300:12)
|
||||
at Function.Module.runMain (module.js:441:10)
|
||||
at startup (node.js:139:18)
|
||||
*/
|
||||
|
||||
console.log(cleanStack(error.stack));
|
||||
/*
|
||||
Error: Missing unicorn
|
||||
at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
|
||||
*/
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### cleanStack(stack, [options])
|
||||
|
||||
#### stack
|
||||
|
||||
Type: `string`
|
||||
|
||||
The `stack` property of an `Error`.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `Object`
|
||||
|
||||
##### pretty
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Prettify the file paths in the stack:
|
||||
|
||||
`/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15` → `~/dev/clean-stack/unicorn.js:2:15`
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [extrack-stack](https://github.com/sindresorhus/extract-stack) - Extract the actual stack of an error
|
||||
- [stack-utils](https://github.com/tapjs/stack-utils) - Captures and cleans stack traces
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
42
github/codeql-action-v2/node_modules/del/node_modules/indent-string/index.d.ts
generated
vendored
Normal file
42
github/codeql-action-v2/node_modules/del/node_modules/indent-string/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
declare namespace indentString {
|
||||
interface Options {
|
||||
/**
|
||||
The string to use for the indent.
|
||||
|
||||
@default ' '
|
||||
*/
|
||||
readonly indent?: string;
|
||||
|
||||
/**
|
||||
Also indent empty lines.
|
||||
|
||||
@default false
|
||||
*/
|
||||
readonly includeEmptyLines?: boolean;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Indent each line in a string.
|
||||
|
||||
@param string - The string to indent.
|
||||
@param count - How many times you want `options.indent` repeated. Default: `1`.
|
||||
|
||||
@example
|
||||
```
|
||||
import indentString = require('indent-string');
|
||||
|
||||
indentString('Unicorns\nRainbows', 4);
|
||||
//=> ' Unicorns\n Rainbows'
|
||||
|
||||
indentString('Unicorns\nRainbows', 4, {indent: '♥'});
|
||||
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'
|
||||
```
|
||||
*/
|
||||
declare function indentString(
|
||||
string: string,
|
||||
count?: number,
|
||||
options?: indentString.Options
|
||||
): string;
|
||||
|
||||
export = indentString;
|
||||
35
github/codeql-action-v2/node_modules/del/node_modules/indent-string/index.js
generated
vendored
Normal file
35
github/codeql-action-v2/node_modules/del/node_modules/indent-string/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = (string, count = 1, options) => {
|
||||
options = {
|
||||
indent: ' ',
|
||||
includeEmptyLines: false,
|
||||
...options
|
||||
};
|
||||
|
||||
if (typeof string !== 'string') {
|
||||
throw new TypeError(
|
||||
`Expected \`input\` to be a \`string\`, got \`${typeof string}\``
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof count !== 'number') {
|
||||
throw new TypeError(
|
||||
`Expected \`count\` to be a \`number\`, got \`${typeof count}\``
|
||||
);
|
||||
}
|
||||
|
||||
if (typeof options.indent !== 'string') {
|
||||
throw new TypeError(
|
||||
`Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\``
|
||||
);
|
||||
}
|
||||
|
||||
if (count === 0) {
|
||||
return string;
|
||||
}
|
||||
|
||||
const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm;
|
||||
|
||||
return string.replace(regex, options.indent.repeat(count));
|
||||
};
|
||||
9
github/codeql-action-v2/node_modules/del/node_modules/indent-string/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/del/node_modules/indent-string/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.
|
||||
37
github/codeql-action-v2/node_modules/del/node_modules/indent-string/package.json
generated
vendored
Normal file
37
github/codeql-action-v2/node_modules/del/node_modules/indent-string/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "indent-string",
|
||||
"version": "4.0.0",
|
||||
"description": "Indent each line in a string",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/indent-string",
|
||||
"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": [
|
||||
"indent",
|
||||
"string",
|
||||
"pad",
|
||||
"align",
|
||||
"line",
|
||||
"text",
|
||||
"each",
|
||||
"every"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
70
github/codeql-action-v2/node_modules/del/node_modules/indent-string/readme.md
generated
vendored
Normal file
70
github/codeql-action-v2/node_modules/del/node_modules/indent-string/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# indent-string [](https://travis-ci.org/sindresorhus/indent-string)
|
||||
|
||||
> Indent each line in a string
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install indent-string
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const indentString = require('indent-string');
|
||||
|
||||
indentString('Unicorns\nRainbows', 4);
|
||||
//=> ' Unicorns\n Rainbows'
|
||||
|
||||
indentString('Unicorns\nRainbows', 4, {indent: '♥'});
|
||||
//=> '♥♥♥♥Unicorns\n♥♥♥♥Rainbows'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### indentString(string, [count], [options])
|
||||
|
||||
#### string
|
||||
|
||||
Type: `string`
|
||||
|
||||
The string to indent.
|
||||
|
||||
#### count
|
||||
|
||||
Type: `number`<br>
|
||||
Default: `1`
|
||||
|
||||
How many times you want `options.indent` repeated.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### indent
|
||||
|
||||
Type: `string`<br>
|
||||
Default: `' '`
|
||||
|
||||
The string to use for the indent.
|
||||
|
||||
##### includeEmptyLines
|
||||
|
||||
Type: `boolean`<br>
|
||||
Default: `false`
|
||||
|
||||
Also indent empty lines.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [indent-string-cli](https://github.com/sindresorhus/indent-string-cli) - CLI for this module
|
||||
- [strip-indent](https://github.com/sindresorhus/strip-indent) - Strip leading whitespace from every line in a string
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
67
github/codeql-action-v2/node_modules/del/node_modules/p-map/index.d.ts
generated
vendored
Normal file
67
github/codeql-action-v2/node_modules/del/node_modules/p-map/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
declare namespace pMap {
|
||||
interface Options {
|
||||
/**
|
||||
Number of concurrently pending promises returned by `mapper`.
|
||||
|
||||
Must be an integer from 1 and up or `Infinity`.
|
||||
|
||||
@default Infinity
|
||||
*/
|
||||
readonly concurrency?: number;
|
||||
|
||||
/**
|
||||
When set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises.
|
||||
|
||||
@default true
|
||||
*/
|
||||
readonly stopOnError?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
Function which is called for every item in `input`. Expected to return a `Promise` or value.
|
||||
|
||||
@param element - Iterated element.
|
||||
@param index - Index of the element in the source array.
|
||||
*/
|
||||
type Mapper<Element = any, NewElement = unknown> = (
|
||||
element: Element,
|
||||
index: number
|
||||
) => NewElement | Promise<NewElement>;
|
||||
}
|
||||
|
||||
/**
|
||||
@param input - Iterated over concurrently in the `mapper` function.
|
||||
@param mapper - Function which is called for every item in `input`. Expected to return a `Promise` or value.
|
||||
@returns A `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order.
|
||||
|
||||
@example
|
||||
```
|
||||
import pMap = require('p-map');
|
||||
import got = require('got');
|
||||
|
||||
const sites = [
|
||||
getWebsiteFromUsername('https://sindresorhus'), //=> Promise
|
||||
'https://ava.li',
|
||||
'https://github.com'
|
||||
];
|
||||
|
||||
(async () => {
|
||||
const mapper = async site => {
|
||||
const {requestUrl} = await got.head(site);
|
||||
return requestUrl;
|
||||
};
|
||||
|
||||
const result = await pMap(sites, mapper, {concurrency: 2});
|
||||
|
||||
console.log(result);
|
||||
//=> ['https://sindresorhus.com/', 'https://ava.li/', 'https://github.com/']
|
||||
})();
|
||||
```
|
||||
*/
|
||||
declare function pMap<Element, NewElement>(
|
||||
input: Iterable<Element>,
|
||||
mapper: pMap.Mapper<Element, NewElement>,
|
||||
options?: pMap.Options
|
||||
): Promise<NewElement[]>;
|
||||
|
||||
export = pMap;
|
||||
81
github/codeql-action-v2/node_modules/del/node_modules/p-map/index.js
generated
vendored
Normal file
81
github/codeql-action-v2/node_modules/del/node_modules/p-map/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
'use strict';
|
||||
const AggregateError = require('aggregate-error');
|
||||
|
||||
module.exports = async (
|
||||
iterable,
|
||||
mapper,
|
||||
{
|
||||
concurrency = Infinity,
|
||||
stopOnError = true
|
||||
} = {}
|
||||
) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (typeof mapper !== 'function') {
|
||||
throw new TypeError('Mapper function is required');
|
||||
}
|
||||
|
||||
if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) {
|
||||
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
|
||||
}
|
||||
|
||||
const result = [];
|
||||
const errors = [];
|
||||
const iterator = iterable[Symbol.iterator]();
|
||||
let isRejected = false;
|
||||
let isIterableDone = false;
|
||||
let resolvingCount = 0;
|
||||
let currentIndex = 0;
|
||||
|
||||
const next = () => {
|
||||
if (isRejected) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nextItem = iterator.next();
|
||||
const index = currentIndex;
|
||||
currentIndex++;
|
||||
|
||||
if (nextItem.done) {
|
||||
isIterableDone = true;
|
||||
|
||||
if (resolvingCount === 0) {
|
||||
if (!stopOnError && errors.length !== 0) {
|
||||
reject(new AggregateError(errors));
|
||||
} else {
|
||||
resolve(result);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
resolvingCount++;
|
||||
|
||||
(async () => {
|
||||
try {
|
||||
const element = await nextItem.value;
|
||||
result[index] = await mapper(element, index);
|
||||
resolvingCount--;
|
||||
next();
|
||||
} catch (error) {
|
||||
if (stopOnError) {
|
||||
isRejected = true;
|
||||
reject(error);
|
||||
} else {
|
||||
errors.push(error);
|
||||
resolvingCount--;
|
||||
next();
|
||||
}
|
||||
}
|
||||
})();
|
||||
};
|
||||
|
||||
for (let i = 0; i < concurrency; i++) {
|
||||
next();
|
||||
|
||||
if (isIterableDone) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
9
github/codeql-action-v2/node_modules/del/node_modules/p-map/license
generated
vendored
Normal file
9
github/codeql-action-v2/node_modules/del/node_modules/p-map/license
generated
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://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.
|
||||
53
github/codeql-action-v2/node_modules/del/node_modules/p-map/package.json
generated
vendored
Normal file
53
github/codeql-action-v2/node_modules/del/node_modules/p-map/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"name": "p-map",
|
||||
"version": "4.0.0",
|
||||
"description": "Map over promises concurrently",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/p-map",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"promise",
|
||||
"map",
|
||||
"resolved",
|
||||
"wait",
|
||||
"collection",
|
||||
"iterable",
|
||||
"iterator",
|
||||
"race",
|
||||
"fulfilled",
|
||||
"async",
|
||||
"await",
|
||||
"promises",
|
||||
"concurrently",
|
||||
"concurrency",
|
||||
"parallel",
|
||||
"bluebird"
|
||||
],
|
||||
"dependencies": {
|
||||
"aggregate-error": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^2.2.0",
|
||||
"delay": "^4.1.0",
|
||||
"in-range": "^2.0.0",
|
||||
"random-int": "^2.0.0",
|
||||
"time-span": "^3.1.0",
|
||||
"tsd": "^0.7.4",
|
||||
"xo": "^0.27.2"
|
||||
}
|
||||
}
|
||||
89
github/codeql-action-v2/node_modules/del/node_modules/p-map/readme.md
generated
vendored
Normal file
89
github/codeql-action-v2/node_modules/del/node_modules/p-map/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
# p-map [](https://travis-ci.org/sindresorhus/p-map)
|
||||
|
||||
> Map over promises concurrently
|
||||
|
||||
Useful when you need to run promise-returning & async functions multiple times with different inputs concurrently.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install p-map
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const pMap = require('p-map');
|
||||
const got = require('got');
|
||||
|
||||
const sites = [
|
||||
getWebsiteFromUsername('https://sindresorhus'), //=> Promise
|
||||
'https://ava.li',
|
||||
'https://github.com'
|
||||
];
|
||||
|
||||
(async () => {
|
||||
const mapper = async site => {
|
||||
const {requestUrl} = await got.head(site);
|
||||
return requestUrl;
|
||||
};
|
||||
|
||||
const result = await pMap(sites, mapper, {concurrency: 2});
|
||||
|
||||
console.log(result);
|
||||
//=> ['https://sindresorhus.com/', 'https://ava.li/', 'https://github.com/']
|
||||
})();
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### pMap(input, mapper, options?)
|
||||
|
||||
Returns a `Promise` that is fulfilled when all promises in `input` and ones returned from `mapper` are fulfilled, or rejects if any of the promises reject. The fulfilled value is an `Array` of the fulfilled values returned from `mapper` in `input` order.
|
||||
|
||||
#### input
|
||||
|
||||
Type: `Iterable<Promise | unknown>`
|
||||
|
||||
Iterated over concurrently in the `mapper` function.
|
||||
|
||||
#### mapper(element, index)
|
||||
|
||||
Type: `Function`
|
||||
|
||||
Expected to return a `Promise` or value.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### concurrency
|
||||
|
||||
Type: `number` (Integer)\
|
||||
Default: `Infinity`\
|
||||
Minimum: `1`
|
||||
|
||||
Number of concurrently pending promises returned by `mapper`.
|
||||
|
||||
##### stopOnError
|
||||
|
||||
Type: `boolean`\
|
||||
Default: `true`
|
||||
|
||||
When set to `false`, instead of stopping when a promise rejects, it will wait for all the promises to settle and then reject with an [aggregated error](https://github.com/sindresorhus/aggregate-error) containing all the errors from the rejected promises.
|
||||
|
||||
## p-map for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of p-map and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-p-map?utm_source=npm-p-map&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
## Related
|
||||
|
||||
- [p-all](https://github.com/sindresorhus/p-all) - Run promise-returning & async functions concurrently with optional limited concurrency
|
||||
- [p-filter](https://github.com/sindresorhus/p-filter) - Filter promises concurrently
|
||||
- [p-times](https://github.com/sindresorhus/p-times) - Run promise-returning & async functions a specific number of times concurrently
|
||||
- [p-props](https://github.com/sindresorhus/p-props) - Like `Promise.all()` but for `Map` and `Object`
|
||||
- [p-map-series](https://github.com/sindresorhus/p-map-series) - Map over promises serially
|
||||
- [p-queue](https://github.com/sindresorhus/p-queue) - Promise queue with concurrency control
|
||||
- [More…](https://github.com/sindresorhus/promise-fun)
|
||||
66
github/codeql-action-v2/node_modules/del/package.json
generated
vendored
Normal file
66
github/codeql-action-v2/node_modules/del/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"name": "del",
|
||||
"version": "6.1.1",
|
||||
"description": "Delete files and directories",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/del",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd",
|
||||
"bench": "node benchmark.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"delete",
|
||||
"files",
|
||||
"folders",
|
||||
"directories",
|
||||
"remove",
|
||||
"destroy",
|
||||
"trash",
|
||||
"unlink",
|
||||
"clean",
|
||||
"cleaning",
|
||||
"cleanup",
|
||||
"rm",
|
||||
"rmrf",
|
||||
"rimraf",
|
||||
"rmdir",
|
||||
"glob",
|
||||
"gulpfriendly",
|
||||
"file",
|
||||
"folder",
|
||||
"directory",
|
||||
"fs",
|
||||
"filesystem"
|
||||
],
|
||||
"dependencies": {
|
||||
"globby": "^11.0.1",
|
||||
"graceful-fs": "^4.2.4",
|
||||
"is-glob": "^4.0.1",
|
||||
"is-path-cwd": "^2.2.0",
|
||||
"is-path-inside": "^3.0.2",
|
||||
"p-map": "^4.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"slash": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^2.4.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"make-dir": "^3.1.0",
|
||||
"tempy": "^0.7.0",
|
||||
"tsd": "^0.13.1",
|
||||
"xo": "^0.33.1"
|
||||
}
|
||||
}
|
||||
151
github/codeql-action-v2/node_modules/del/readme.md
generated
vendored
Normal file
151
github/codeql-action-v2/node_modules/del/readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
# del
|
||||
|
||||
> Delete files and directories using [globs](https://github.com/sindresorhus/globby#globbing-patterns)
|
||||
|
||||
Similar to [rimraf](https://github.com/isaacs/rimraf), but with a Promise API and support for multiple files and globbing. It also protects you against deleting the current working directory and above.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install del
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const del = require('del');
|
||||
|
||||
(async () => {
|
||||
const deletedFilePaths = await del(['temp/*.js', '!temp/unicorn.js']);
|
||||
const deletedDirectoryPaths = await del(['temp', 'public']);
|
||||
|
||||
console.log('Deleted files:\n', deletedFilePaths.join('\n'));
|
||||
console.log('\n\n');
|
||||
console.log('Deleted directories:\n', deletedDirectoryPaths.join('\n'));
|
||||
})();
|
||||
```
|
||||
|
||||
## Beware
|
||||
|
||||
The glob pattern `**` matches all children and *the parent*.
|
||||
|
||||
So this won't work:
|
||||
|
||||
```js
|
||||
del.sync(['public/assets/**', '!public/assets/goat.png']);
|
||||
```
|
||||
|
||||
You have to explicitly ignore the parent directories too:
|
||||
|
||||
```js
|
||||
del.sync(['public/assets/**', '!public/assets', '!public/assets/goat.png']);
|
||||
```
|
||||
|
||||
To delete all subdirectories inside `public/`, you can do:
|
||||
|
||||
```js
|
||||
del.sync(['public/*/']);
|
||||
```
|
||||
|
||||
Suggestions on how to improve this welcome!
|
||||
|
||||
## API
|
||||
|
||||
Note that glob patterns can only contain forward-slashes, not backward-slashes. Windows file paths can use backward-slashes as long as the path does not contain any glob-like characters, otherwise use `path.posix.join()` instead of `path.join()`.
|
||||
|
||||
### del(patterns, options?)
|
||||
|
||||
Returns `Promise<string[]>` with the deleted paths.
|
||||
|
||||
### del.sync(patterns, options?)
|
||||
|
||||
Returns `string[]` with the deleted paths.
|
||||
|
||||
#### patterns
|
||||
|
||||
Type: `string | string[]`
|
||||
|
||||
See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
||||
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)
|
||||
- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
You can specify any of the [`globby` options](https://github.com/sindresorhus/globby#options) in addition to the below options. In contrast to the `globby` defaults, `expandDirectories`, `onlyFiles`, and `followSymbolicLinks` are `false` by default.
|
||||
|
||||
##### force
|
||||
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
Allow deleting the current working directory and outside.
|
||||
|
||||
##### dryRun
|
||||
|
||||
Type: `boolean`\
|
||||
Default: `false`
|
||||
|
||||
See what would be deleted.
|
||||
|
||||
```js
|
||||
const del = require('del');
|
||||
|
||||
(async () => {
|
||||
const deletedPaths = await del(['temp/*.js'], {dryRun: true});
|
||||
|
||||
console.log('Files and directories that would be deleted:\n', deletedPaths.join('\n'));
|
||||
})();
|
||||
```
|
||||
|
||||
##### concurrency
|
||||
|
||||
Type: `number`\
|
||||
Default: `Infinity`\
|
||||
Minimum: `1`
|
||||
|
||||
Concurrency limit.
|
||||
|
||||
##### onProgress
|
||||
|
||||
Type: `(progress: ProgressData) => void`
|
||||
|
||||
Called after each file or directory is deleted.
|
||||
|
||||
```js
|
||||
import del from 'del';
|
||||
|
||||
await del(patterns, {
|
||||
onProgress: progress => {
|
||||
// …
|
||||
}});
|
||||
```
|
||||
|
||||
###### ProgressData
|
||||
|
||||
```js
|
||||
{
|
||||
totalCount: number,
|
||||
deletedCount: number,
|
||||
percent: number
|
||||
}
|
||||
```
|
||||
|
||||
- `percent` is a value between `0` and `1`
|
||||
|
||||
## CLI
|
||||
|
||||
See [del-cli](https://github.com/sindresorhus/del-cli) for a CLI for this module and [trash-cli](https://github.com/sindresorhus/trash-cli) for a safe version that is suitable for running by hand.
|
||||
|
||||
## del for enterprise
|
||||
|
||||
Available as part of the Tidelift Subscription.
|
||||
|
||||
The maintainers of del and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-del?utm_source=npm-del&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
|
||||
|
||||
## Related
|
||||
|
||||
- [make-dir](https://github.com/sindresorhus/make-dir) - Make a directory and its parents if needed
|
||||
- [globby](https://github.com/sindresorhus/globby) - User-friendly glob matching
|
||||
Loading…
Add table
Add a link
Reference in a new issue