initial commit of actions

This commit is contained in:
Dominik Polakovics Polakovics 2026-01-31 18:56:04 +01:00
commit 949ece5785
44660 changed files with 12034344 additions and 0 deletions

144
github/codeql-action-v2/node_modules/matcher/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,144 @@
export interface Options {
/**
Treat uppercase and lowercase characters as being the same.
Ensure you use this correctly. For example, files and directories should be matched case-insensitively, while most often, object keys should be matched case-sensitively.
@default false
@example
```
import {isMatch} from 'matcher';
isMatch('UNICORN', 'UNI*', {caseSensitive: true});
//=> true
isMatch('UNICORN', 'unicorn', {caseSensitive: true});
//=> false
isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true});
//=> false
```
*/
readonly caseSensitive?: boolean;
/**
Require all negated patterns to not match and any normal patterns to match at least once. Otherwise, it will be a no-match condition.
@default false
@example
```
import {matcher} from 'matcher';
// Find text strings containing both "edge" and "tiger" in arbitrary order, but not "stunt".
const demo = (strings) => matcher(strings, ['*edge*', '*tiger*', '!*stunt*'], {allPatterns: true});
demo(['Hey, tiger!', 'tiger has edge over hyenas', 'pushing a tiger over the edge is a stunt']);
//=> ['tiger has edge over hyenas']
```
@example
```
import {matcher} from 'matcher';
matcher(['foo', 'for', 'bar'], ['f*', 'b*', '!x*'], {allPatterns: true});
//=> ['foo', 'for', 'bar']
matcher(['foo', 'for', 'bar'], ['f*'], {allPatterns: true});
//=> []
```
*/
readonly allPatterns?: boolean;
}
/**
Simple [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matching.
It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
@param inputs - The string or array of strings to match.
@param patterns - The string or array of string patterns. Use `*` to match zero or more characters. A leading `!` negates the pattern.
@returns An array of `inputs` filtered based on the `patterns`.
@example
```
import {matcher} from 'matcher';
matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']);
//=> ['moo']
matcher(['foo', 'bar', 'moo'], ['!*oo']);
//=> ['bar']
matcher('moo', ['']);
//=> []
matcher('moo', []);
//=> []
matcher([''], ['']);
//=> ['']
```
*/
export function matcher(
inputs: string | readonly string[],
patterns: string | readonly string[],
options?: Options,
): string[];
/**
It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
@param inputs - The string or array of strings to match.
@param patterns - The string or array of string patterns. Use `*` to match zero or more characters. A leading `!` negates the pattern.
@returns A `boolean` of whether any of given `inputs` matches all the `patterns`.
@example
```
import {isMatch} from 'matcher';
isMatch('unicorn', 'uni*');
//=> true
isMatch('unicorn', '*corn');
//=> true
isMatch('unicorn', 'un*rn');
//=> true
isMatch('rainbow', '!unicorn');
//=> true
isMatch('foo bar baz', 'foo b* b*');
//=> true
isMatch('unicorn', 'uni\\*');
//=> false
isMatch(['foo', 'bar'], 'f*');
//=> true
isMatch(['foo', 'bar'], ['a*', 'b*']);
//=> true
isMatch('unicorn', ['']);
//=> false
isMatch('unicorn', []);
//=> false
isMatch([], 'bar');
//=> false
isMatch([], []);
//=> false
isMatch([''], ['']);
//=> true
```
*/
export function isMatch(
inputs: string | readonly string[],
patterns: string | readonly string[],
options?: Options,
): boolean;

114
github/codeql-action-v2/node_modules/matcher/index.js generated vendored Normal file
View file

@ -0,0 +1,114 @@
import escapeStringRegexp from 'escape-string-regexp';
const regexpCache = new Map();
const sanitizeArray = (input, inputName) => {
if (!Array.isArray(input)) {
switch (typeof input) {
case 'string':
input = [input];
break;
case 'undefined':
input = [];
break;
default:
throw new TypeError(`Expected '${inputName}' to be a string or an array, but got a type of '${typeof input}'`);
}
}
return input.filter(string => {
if (typeof string !== 'string') {
if (typeof string === 'undefined') {
return false;
}
throw new TypeError(`Expected '${inputName}' to be an array of strings, but found a type of '${typeof string}' in the array`);
}
return true;
});
};
const makeRegexp = (pattern, options) => {
options = {
caseSensitive: false,
...options,
};
const cacheKey = pattern + JSON.stringify(options);
if (regexpCache.has(cacheKey)) {
return regexpCache.get(cacheKey);
}
const negated = pattern[0] === '!';
if (negated) {
pattern = pattern.slice(1);
}
pattern = escapeStringRegexp(pattern).replace(/\\\*/g, '[\\s\\S]*');
const regexp = new RegExp(`^${pattern}$`, options.caseSensitive ? '' : 'i');
regexp.negated = negated;
regexpCache.set(cacheKey, regexp);
return regexp;
};
const baseMatcher = (inputs, patterns, options, firstMatchOnly) => {
inputs = sanitizeArray(inputs, 'inputs');
patterns = sanitizeArray(patterns, 'patterns');
if (patterns.length === 0) {
return [];
}
patterns = patterns.map(pattern => makeRegexp(pattern, options));
const {allPatterns} = options || {};
const result = [];
for (const input of inputs) {
// String is included only if it matches at least one non-negated pattern supplied.
// Note: the `allPatterns` option requires every non-negated pattern to be matched once.
// Matching a negated pattern excludes the string.
let matches;
const didFit = [...patterns].fill(false);
for (const [index, pattern] of patterns.entries()) {
if (pattern.test(input)) {
didFit[index] = true;
matches = !pattern.negated;
if (!matches) {
break;
}
}
}
if (
!(
matches === false
|| (matches === undefined && patterns.some(pattern => !pattern.negated))
|| (allPatterns && didFit.some((yes, index) => !yes && !patterns[index].negated))
)
) {
result.push(input);
if (firstMatchOnly) {
break;
}
}
}
return result;
};
export function matcher(inputs, patterns, options) {
return baseMatcher(inputs, patterns, options, false);
}
export function isMatch(inputs, patterns, options) {
return baseMatcher(inputs, patterns, options, true).length > 0;
}

9
github/codeql-action-v2/node_modules/matcher/license generated vendored Normal file
View 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.

View file

@ -0,0 +1,16 @@
/**
Escape RegExp special characters.
You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
@example
```
import escapeStringRegexp from 'escape-string-regexp';
const escapedString = escapeStringRegexp('How much $ for a 🦄?');
//=> 'How much \\$ for a 🦄\\?'
new RegExp(escapedString);
```
*/
export default function escapeStringRegexp(string: string): string;

View file

@ -0,0 +1,11 @@
export default function escapeStringRegexp(string) {
if (typeof string !== 'string') {
throw new TypeError('Expected a string');
}
// Escape characters with special meaning either inside or outside character sets.
// Use a simple backslash escape when its always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns stricter grammar.
return string
.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&')
.replace(/-/g, '\\x2d');
}

View 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.

View file

@ -0,0 +1,40 @@
{
"name": "escape-string-regexp",
"version": "5.0.0",
"description": "Escape RegExp special characters",
"license": "MIT",
"repository": "sindresorhus/escape-string-regexp",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"escape",
"regex",
"regexp",
"regular",
"expression",
"string",
"special",
"characters"
],
"devDependencies": {
"ava": "^3.15.0",
"tsd": "^0.14.0",
"xo": "^0.38.2"
}
}

View file

@ -0,0 +1,34 @@
# escape-string-regexp
> Escape RegExp special characters
## Install
```
$ npm install escape-string-regexp
```
## Usage
```js
import escapeStringRegexp from 'escape-string-regexp';
const escapedString = escapeStringRegexp('How much $ for a 🦄?');
//=> 'How much \\$ for a 🦄\\?'
new RegExp(escapedString);
```
You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-escape-string-regexp?utm_source=npm-escape-string-regexp&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View file

@ -0,0 +1,52 @@
{
"name": "matcher",
"version": "5.0.0",
"description": "Simple wildcard matching",
"license": "MIT",
"repository": "sindresorhus/matcher",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"test": "xo && ava && tsd",
"bench": "matcha bench.js"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"matcher",
"matching",
"match",
"regex",
"regexp",
"regular",
"expression",
"wildcard",
"pattern",
"string",
"filter",
"glob",
"globber",
"globbing",
"minimatch"
],
"dependencies": {
"escape-string-regexp": "^5.0.0"
},
"devDependencies": {
"ava": "^3.15.0",
"matcha": "^0.7.0",
"tsd": "^0.17.0",
"xo": "^0.45.0"
}
}

179
github/codeql-action-v2/node_modules/matcher/readme.md generated vendored Normal file
View file

@ -0,0 +1,179 @@
# matcher
> Simple [wildcard](https://en.wikipedia.org/wiki/Wildcard_character) matching
Useful when you want to accept loose string input and regexes/globs are too convoluted.
## Install
```sh
npm install matcher
```
## Usage
```js
import {matcher, isMatch} from 'matcher';
matcher(['foo', 'bar', 'moo'], ['*oo', '!foo']);
//=> ['moo']
matcher(['foo', 'bar', 'moo'], ['!*oo']);
//=> ['bar']
matcher('moo', ['']);
//=> []
matcher('moo', []);
//=> []
matcher([''], ['']);
//=> ['']
isMatch('unicorn', 'uni*');
//=> true
isMatch('unicorn', '*corn');
//=> true
isMatch('unicorn', 'un*rn');
//=> true
isMatch('rainbow', '!unicorn');
//=> true
isMatch('foo bar baz', 'foo b* b*');
//=> true
isMatch('unicorn', 'uni\\*');
//=> false
isMatch(['foo', 'bar'], 'f*');
//=> true
isMatch(['foo', 'bar'], ['a*', 'b*']);
//=> true
isMatch('unicorn', ['']);
//=> false
isMatch('unicorn', []);
//=> false
isMatch([], 'bar');
//=> false
isMatch([], []);
//=> false
isMatch('', '');
//=> true
```
## API
It matches even across newlines. For example, `foo*r` will match `foo\nbar`.
### matcher(inputs, patterns, options?)
Accepts a string or an array of strings for both `inputs` and `patterns`.
Returns an array of `inputs` filtered based on the `patterns`.
### isMatch(inputs, patterns, options?)
Accepts a string or an array of strings for both `inputs` and `patterns`.
Returns a `boolean` of whether any of given `inputs` matches all the `patterns`.
#### inputs
Type: `string | string[]`
The string or array of strings to match.
#### options
Type: `object`
##### caseSensitive
Type: `boolean`\
Default: `false`
Treat uppercase and lowercase characters as being the same.
Ensure you use this correctly. For example, files and directories should be matched case-insensitively, while most often, object keys should be matched case-sensitively.
```js
import {isMatch} from 'matcher';
isMatch('UNICORN', 'UNI*', {caseSensitive: true});
//=> true
isMatch('UNICORN', 'unicorn', {caseSensitive: true});
//=> false
isMatch('unicorn', ['tri*', 'UNI*'], {caseSensitive: true});
//=> false
```
##### allPatterns
Type: `boolean`\
Default: `false`
Require all negated patterns to not match and any normal patterns to match at least once. Otherwise, it will be a no-match condition.
```js
import {matcher} from 'matcher';
// Find text strings containing both "edge" and "tiger" in arbitrary order, but not "stunt".
const demo = (strings) => matcher(strings, ['*edge*', '*tiger*', '!*stunt*'], {allPatterns: true});
demo(['Hey, tiger!', 'tiger has edge over hyenas', 'pushing a tiger over the edge is a stunt']);
//=> ['tiger has edge over hyenas']
```
```js
import {matcher} from 'matcher';
matcher(['foo', 'for', 'bar'], ['f*', 'b*', '!x*'], {allPatterns: true});
//=> ['foo', 'for', 'bar']
matcher(['foo', 'for', 'bar'], ['f*'], {allPatterns: true});
//=> []
```
#### patterns
Type: `string | string[]`
Use `*` to match zero or more characters.
A leading `!` negates the pattern.
An input string will be omitted, if it does not match any non-negated patterns present, or if it matches a negated pattern, or if no pattern is present.
## Benchmark
```sh
npm run bench
```
## Related
- [matcher-cli](https://github.com/sindresorhus/matcher-cli) - CLI for this module
- [multimatch](https://github.com/sindresorhus/multimatch) - Extends `minimatch.match()` with support for multiple patterns
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-matcher?utm_source=npm-matcher&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>