It appears you have a well-structured Git repository with various files, including SVG icons and HTML documents. Here's a brief overview:

This commit is contained in:
2025-06-11 09:05:15 +02:00
parent 36c2466e53
commit 6d6aa954dd
15556 changed files with 1076330 additions and 1 deletions

55
backend/node_modules/minimist-options/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,55 @@
import {Opts as MinimistOptions} from 'minimist';
export type OptionType = 'string' | 'boolean' | 'number' | 'array' | 'string-array' | 'boolean-array' | 'number-array';
export interface BaseOption<
TypeOptionType extends OptionType,
DefaultOptionType
> {
/**
* The data type the option should be parsed to.
*/
readonly type?: TypeOptionType;
/**
* An alias/list of aliases for the option.
*/
readonly alias?: string | ReadonlyArray<string>;
/**
* The default value for the option.
*/
readonly default?: DefaultOptionType;
}
export type StringOption = BaseOption<'string', string>;
export type BooleanOption = BaseOption<'boolean', boolean>;
export type NumberOption = BaseOption<'number', number>;
export type DefaultArrayOption = BaseOption<'array', ReadonlyArray<string>>;
export type StringArrayOption = BaseOption<'string-array', ReadonlyArray<string>>;
export type BooleanArrayOption = BaseOption<'boolean-array', ReadonlyArray<boolean>>;
export type NumberArrayOption = BaseOption<'number-array', ReadonlyArray<number>>;
type MinimistOption = NonNullable<
| MinimistOptions['stopEarly']
| MinimistOptions['unknown']
| MinimistOptions['--']
>;
export type Options = {
[key: string]:
| OptionType
| StringOption
| BooleanOption
| NumberOption
| DefaultArrayOption
| StringArrayOption
| BooleanArrayOption
| NumberArrayOption
| MinimistOption; // Workaround for https://github.com/microsoft/TypeScript/issues/17867
};
/**
* Write options for [minimist](https://npmjs.org/package/minimist) in a comfortable way. Support string, boolean, number and array options.
*/
export default function buildOptions(options?: Options): MinimistOptions;

117
backend/node_modules/minimist-options/index.js generated vendored Normal file
View File

@ -0,0 +1,117 @@
'use strict';
const isPlainObject = require('is-plain-obj');
const arrify = require('arrify');
const kindOf = require('kind-of');
const push = (obj, prop, value) => {
if (!obj[prop]) {
obj[prop] = [];
}
obj[prop].push(value);
};
const insert = (obj, prop, key, value) => {
if (!obj[prop]) {
obj[prop] = {};
}
obj[prop][key] = value;
};
const prettyPrint = output => {
return Array.isArray(output) ?
`[${output.map(prettyPrint).join(', ')}]` :
kindOf(output) === 'string' ? JSON.stringify(output) : output;
};
const resolveType = value => {
if (Array.isArray(value) && value.length > 0) {
const [element] = value;
return `${kindOf(element)}-array`;
}
return kindOf(value);
};
const normalizeExpectedType = (type, defaultValue) => {
const inferredType = type === 'array' ? 'string-array' : type;
if (arrayTypes.includes(inferredType) && Array.isArray(defaultValue) && defaultValue.length === 0) {
return 'array';
}
return inferredType;
};
const passthroughOptions = ['stopEarly', 'unknown', '--'];
const primitiveTypes = ['string', 'boolean', 'number'];
const arrayTypes = primitiveTypes.map(t => `${t}-array`);
const availableTypes = [...primitiveTypes, 'array', ...arrayTypes];
const buildOptions = options => {
options = options || {};
const result = {};
passthroughOptions.forEach(key => {
if (options[key]) {
result[key] = options[key];
}
});
Object.keys(options).forEach(key => {
let value = options[key];
if (key === 'arguments') {
key = '_';
}
// If short form is used
// convert it to long form
// e.g. { 'name': 'string' }
if (typeof value === 'string') {
value = {type: value};
}
if (isPlainObject(value)) {
const props = value;
const {type} = props;
if (type) {
if (!availableTypes.includes(type)) {
throw new TypeError(`Expected type of "${key}" to be one of ${prettyPrint(availableTypes)}, got ${prettyPrint(type)}`);
}
if (arrayTypes.includes(type)) {
const [elementType] = type.split('-');
push(result, 'array', {key, [elementType]: true});
} else {
push(result, type, key);
}
}
if ({}.hasOwnProperty.call(props, 'default')) {
const {default: defaultValue} = props;
const defaultType = resolveType(defaultValue);
const expectedType = normalizeExpectedType(type, defaultValue);
if (expectedType && expectedType !== defaultType) {
throw new TypeError(`Expected "${key}" default value to be of type "${expectedType}", got ${prettyPrint(defaultType)}`);
}
insert(result, 'default', key, defaultValue);
}
arrify(props.alias).forEach(alias => {
insert(result, 'alias', alias, key);
});
}
});
return result;
};
module.exports = buildOptions;
module.exports.default = buildOptions;

21
backend/node_modules/minimist-options/license generated vendored Normal file
View File

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Vadim Demedes <vdemedes@gmail.com> (vadimdemedes.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.

34
backend/node_modules/minimist-options/package.json generated vendored Normal file
View File

@ -0,0 +1,34 @@
{
"name": "minimist-options",
"version": "4.1.0",
"description": "Pretty options for minimist",
"repository": "vadimdemedes/minimist-options",
"author": "Vadim Demedes <vdemedes@gmail.com>",
"license": "MIT",
"keywords": [
"minimist",
"argv",
"args"
],
"scripts": {
"test": "xo && ava && tsd-check"
},
"engines": {
"node": ">= 6"
},
"files": [
"index.js",
"index.d.ts"
],
"dependencies": {
"arrify": "^1.0.1",
"is-plain-obj": "^1.1.0",
"kind-of": "^6.0.3"
},
"devDependencies": {
"@types/minimist": "^1.2.0",
"ava": "^1.0.1",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
}
}

112
backend/node_modules/minimist-options/readme.md generated vendored Normal file
View File

@ -0,0 +1,112 @@
# minimist-options ![test](https://github.com/vadimdemedes/minimist-options/workflows/test/badge.svg)
> Write options for [minimist](https://npmjs.org/package/minimist) and [yargs](https://npmjs.org/package/yargs) in a comfortable way.
> Supports string, boolean, number and array options.
## Installation
```
$ npm install --save minimist-options
```
## Usage
```js
const buildOptions = require('minimist-options');
const minimist = require('minimist');
const options = buildOptions({
name: {
type: 'string',
alias: 'n',
default: 'john'
},
force: {
type: 'boolean',
alias: ['f', 'o'],
default: false
},
score: {
type: 'number',
alias: 's',
default: 0
},
arr: {
type: 'array',
alias: 'a',
default: []
},
strings: {
type: 'string-array',
alias: 's',
default: ['a', 'b']
},
booleans: {
type: 'boolean-array',
alias: 'b',
default: [true, false]
},
numbers: {
type: 'number-array',
alias: 'n',
default: [0, 1]
},
published: 'boolean',
// Special option for positional arguments (`_` in minimist)
arguments: 'string'
});
const args = minimist(process.argv.slice(2), options);
```
instead of:
```js
const minimist = require('minimist');
const options = {
string: ['name', '_'],
number: ['score'],
array: [
'arr',
{key: 'strings', string: true},
{key: 'booleans', boolean: true},
{key: 'numbers', number: true}
],
boolean: ['force', 'published'],
alias: {
n: 'name',
f: 'force',
s: 'score',
a: 'arr'
},
default: {
name: 'john',
f: false,
score: 0,
arr: []
}
};
const args = minimist(process.argv.slice(2), options);
```
## Array options
The `array` types are only supported by [yargs](https://npmjs.org/package/yargs).
[minimist](https://npmjs.org/package/minimist) does _not_ explicitly support array type options. If you set an option multiple times, it will indeed yield an array of values. However, if you only set it once, it will simply give the value as is, without wrapping it in an array. Thus, effectively ignoring `{type: 'array'}`.
`{type: 'array'}` is shorthand for `{type: 'string-array'}`. To have values coerced to `boolean` or `number`, use `boolean-array` or `number-array`, respectively.
## License
MIT © [Vadim Demedes](https://vadimdemedes.com)