start nodejs bot

This commit is contained in:
2021-02-11 02:38:15 +01:00
parent 968105f35d
commit 6d84704b1f
1814 changed files with 303741 additions and 0 deletions

30
node_modules/filenamify/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,30 @@
export interface Options {
/**
* String to use as replacement for reserved filename characters.
*
* Cannot contain: `<` `>` `:` `"` `/` `\` `|` `?` `*`
*
* @default '!'
*/
readonly replacement?: string;
}
/**
* Accepts a filename and returns a valid filename.
*
* @param input - A string to convert to a valid filename.
*/
export interface Filenamify {
(input: string, options?: Options): string;
/**
* Accepts a path and returns the path with a valid filename.
*
* @param input - A string to convert to a valid path with a filename.
*/
path(input: string, options?: Options): string;
}
declare const filenamify: Filenamify;
export default filenamify;

45
node_modules/filenamify/index.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
'use strict';
const path = require('path');
const trimRepeated = require('trim-repeated');
const filenameReservedRegex = require('filename-reserved-regex');
const stripOuter = require('strip-outer');
// Doesn't make sense to have longer filenames
const MAX_FILENAME_LENGTH = 100;
const reControlChars = /[\u0000-\u001f\u0080-\u009f]/g; // eslint-disable-line no-control-regex
const reRelativePath = /^\.+/;
const filenamify = (string, options = {}) => {
if (typeof string !== 'string') {
throw new TypeError('Expected a string');
}
const replacement = options.replacement === undefined ? '!' : options.replacement;
if (filenameReservedRegex().test(replacement) && reControlChars.test(replacement)) {
throw new Error('Replacement string cannot contain reserved filename characters');
}
string = string.replace(filenameReservedRegex(), replacement);
string = string.replace(reControlChars, replacement);
string = string.replace(reRelativePath, replacement);
if (replacement.length > 0) {
string = trimRepeated(string, replacement);
string = string.length > 1 ? stripOuter(string, replacement) : string;
}
string = filenameReservedRegex.windowsNames().test(string) ? string + replacement : string;
string = string.slice(0, MAX_FILENAME_LENGTH);
return string;
};
filenamify.path = (filePath, options) => {
filePath = path.resolve(filePath);
return path.join(path.dirname(filePath), filenamify(path.basename(filePath), options));
};
module.exports = filenamify;
module.exports.default = filenamify;

9
node_modules/filenamify/license generated vendored Normal file
View 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.

77
node_modules/filenamify/package.json generated vendored Normal file
View File

@@ -0,0 +1,77 @@
{
"_from": "filenamify@^3.0.0",
"_id": "filenamify@3.0.0",
"_inBundle": false,
"_integrity": "sha512-5EFZ//MsvJgXjBAFJ+Bh2YaCTRF/VP1YOmGrgt+KJ4SFRLjI87EIdwLLuT6wQX0I4F9W41xutobzczjsOKlI/g==",
"_location": "/filenamify",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "filenamify@^3.0.0",
"name": "filenamify",
"escapedName": "filenamify",
"rawSpec": "^3.0.0",
"saveSpec": null,
"fetchSpec": "^3.0.0"
},
"_requiredBy": [
"/download"
],
"_resolved": "https://registry.npmjs.org/filenamify/-/filenamify-3.0.0.tgz",
"_shasum": "9603eb688179f8c5d40d828626dcbb92c3a4672c",
"_spec": "filenamify@^3.0.0",
"_where": "C:\\Users\\MCGFX\\OneDrive\\Dokumente\\GitHub\\UnknownBot\\node_modules\\download",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/filenamify/issues"
},
"bundleDependencies": false,
"dependencies": {
"filename-reserved-regex": "^2.0.0",
"strip-outer": "^1.0.0",
"trim-repeated": "^1.0.0"
},
"deprecated": false,
"description": "Convert a string to a valid safe filename",
"devDependencies": {
"ava": "^1.3.1",
"tsd-check": "^0.3.0",
"xo": "^0.24.0"
},
"engines": {
"node": ">=6"
},
"files": [
"index.js",
"index.d.ts"
],
"homepage": "https://github.com/sindresorhus/filenamify#readme",
"keywords": [
"filename",
"safe",
"sanitize",
"file",
"name",
"string",
"path",
"filepath",
"convert",
"valid",
"dirname"
],
"license": "MIT",
"name": "filenamify",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/filenamify.git"
},
"scripts": {
"test": "xo && ava && tsd-check"
},
"version": "3.0.0"
}

69
node_modules/filenamify/readme.md generated vendored Normal file
View File

@@ -0,0 +1,69 @@
# filenamify [![Build Status](https://travis-ci.org/sindresorhus/filenamify.svg?branch=master)](https://travis-ci.org/sindresorhus/filenamify)
> Convert a string to a valid safe filename
On Unix-like systems `/` is reserved and [`<>:"/\|?*`](http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29#naming_conventions) on Windows.
## Install
```
$ npm install filenamify
```
## Usage
```js
const filenamify = require('filenamify');
filenamify('<foo/bar>');
//=> 'foo!bar'
filenamify('foo:"bar"', {replacement: '🐴'});
//=> 'foo🐴bar'
```
## API
### filenamify(input, [options])
Accepts a filename and returns a valid filename.
### filenamify.path(input, [options])
Accepts a path and returns the path with a valid filename.
#### input
Type: `string`
A string to convert to a valid filename.
#### options
Type: `Object`
##### replacement
Type: `string`<br>
Default: `'!'`
String to use as replacement for reserved filename characters.
Cannot contain: `<` `>` `:` `"` `/` `\` `|` `?` `*`
## Related
- [filenamify-cli](https://github.com/sindresorhus/filenamify-cli) - CLI for this module
- [filenamify-url](https://github.com/sindresorhus/filenamify-url) - Convert a URL to a valid filename
- [valid-filename](https://github.com/sindresorhus/valid-filename) - Check if a string is a valid filename
- [unused-filename](https://github.com/sindresorhus/unused-filename) - Get a unused filename by appending a number if it exists
- [slugify](https://github.com/sindresorhus/slugify) - Slugify a string
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)