added doga
This commit is contained in:
33
25_02_24/node_modules/header-range-parser/CHANGELOG.md
generated
vendored
Normal file
33
25_02_24/node_modules/header-range-parser/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
# [1.1.3] (2022-01-06)
|
||||
|
||||
### Fix
|
||||
|
||||
* 🐛🔨 Fix empty `dist` folder in package.
|
||||
|
||||
### Minor
|
||||
|
||||
* 📦🗑️ Remove unnecessary `package-lock.json` file.
|
||||
|
||||
# [1.1.2] (2021-10-22)
|
||||
|
||||
### Documentation
|
||||
|
||||
* 📚 Documentation updated
|
||||
|
||||
# [1.1.1] (2021-10-19)
|
||||
|
||||
### Documentation
|
||||
|
||||
* 📚 Documentation updated
|
||||
|
||||
# [1.1.0] (2021-10-19)
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* Minimal Node version now is `12.22.0`
|
||||
|
||||
# [1.0.0] (2021-10-02)
|
||||
|
||||
### Features
|
||||
|
||||
* Initial release
|
||||
23
25_02_24/node_modules/header-range-parser/LICENSE
generated
vendored
Normal file
23
25_02_24/node_modules/header-range-parser/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
|
||||
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
Copyright (c) 2021 Anton Trofimenko <r37r0m0d3l@protonmail.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.
|
||||
178
25_02_24/node_modules/header-range-parser/README.md
generated
vendored
Normal file
178
25_02_24/node_modules/header-range-parser/README.md
generated
vendored
Normal file
@@ -0,0 +1,178 @@
|
||||
# Header • Range • Parser
|
||||
|
||||

|
||||
|
||||
Range header field parser. Fork of a̶b̶a̶n̶d̶o̶n̶e̶d̶ [range-parser](https://github.com/jshttp/range-parser). If you write to me with a request to change or update something, I will do it. Honestly 👼.
|
||||
|
||||
[![NPM Version][npm-version-img]][npm-version-url]
|
||||
[![NPM Downloads][npm-downloads-img]][npm-downloads-url]
|
||||
[![GitHub Stars][gh-stars-img]][gh-stars-url]
|
||||
[![Node.js Version][node-image]][node-url]
|
||||
[![TypeScript Typings][ts-img]][ts-url]
|
||||
|
||||
[![GitHub Checks][gh-checks-img]][gh-checks-url]
|
||||
[![Travis CI][travis-img]][travis-url]
|
||||
[![Snyk][snyk-img]][snyk-url]
|
||||
|
||||
[![Maintainability Rating][sonarcloud-img]][sonarcloud-url]
|
||||
[![LGTM][lgtm-img]][lgtm-url]
|
||||
[![Codacy Badge][codacy-img]][codacy-url]
|
||||
[![CodeFactor][codefactor-img]][codefactor-url]
|
||||
|
||||
[comment]: <> ([![Dependabot][dependabot-img]][dependabot-url])
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
npm install header-range-parser
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
<!-- eslint-disable no-unused-vars -->
|
||||
|
||||
```js
|
||||
const {
|
||||
ERROR_INVALID_ARGUMENT,
|
||||
ERROR_STRING_IS_NOT_HEADER,
|
||||
ERROR_UNSATISFIABLE_RESULT,
|
||||
parseRange,
|
||||
} = require("header-range-parser");
|
||||
```
|
||||
|
||||
```typescript
|
||||
import {
|
||||
ERROR_INVALID_ARGUMENT,
|
||||
ERROR_STRING_IS_NOT_HEADER,
|
||||
ERROR_UNSATISFIABLE_RESULT,
|
||||
ResultInvalid,
|
||||
ResultUnsatisfiable,
|
||||
ResultWrongArgument,
|
||||
parseRange,
|
||||
} from "header-range-parser";
|
||||
```
|
||||
|
||||
### parseRange(size, header, options)
|
||||
|
||||
```typescript
|
||||
import {
|
||||
Result, Ranges, parseRange, Options,
|
||||
} from "header-range-parser";
|
||||
|
||||
declare function parseRange(
|
||||
size: number, header: string, options?: Options,
|
||||
): Ranges | Result;
|
||||
```
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| :-------- | :---------| :---------------------------------------------------- |
|
||||
| `size` | `number` | **Required**. Size in bytes. |
|
||||
| `header` | `string` | **Required**. String containing header. |
|
||||
| `options` | `object` | Optional options: combine (bool), throwError (bool). |
|
||||
|
||||
Parse the given `header` string where `size` is the size of the selected
|
||||
representation that is to be partitioned into sub-ranges. An array of sub-ranges
|
||||
will be returned or negative numbers indicating an error parsing.
|
||||
|
||||
- `-1` or `ERROR_UNSATISFIABLE_RESULT` or ` esultUnsatisfiable` signals an unsatisfiable range
|
||||
|
||||
- `-2` or `ERROR_STRING_IS_NOT_HEADER` or `ResultInvalid` signals a malformed header string
|
||||
|
||||
- `-3` or `ERROR_INVALID_ARGUMENT` or `ResultWrongArgument` invalid parameters
|
||||
|
||||
<!-- eslint-disable no-undef -->
|
||||
|
||||
```js
|
||||
// parse header from request
|
||||
const subRanges = parseRange(
|
||||
size,
|
||||
request.headers.range,
|
||||
);
|
||||
|
||||
// the type of the subranges
|
||||
if (subRanges.type === "bytes") {
|
||||
// the ranges
|
||||
subRanges.forEach((range) => {
|
||||
// do something
|
||||
// with range.start
|
||||
// and range.end
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
#### Options
|
||||
|
||||
These properties are accepted in the options object.
|
||||
|
||||
##### combine
|
||||
|
||||
Specifies if overlapping and adjacent sub-ranges should be combined, defaults to `false`.
|
||||
|
||||
When `true`, ranges will be combined and returned as if they were specified that way in the header.
|
||||
|
||||
##### throwError
|
||||
|
||||
Throw or suppress errors. Defaults to `true`.
|
||||
|
||||
<!-- eslint-disable no-undef -->
|
||||
|
||||
```js
|
||||
parseRange(
|
||||
100,
|
||||
"bytes=50-55,0-10,5-10,56-60",
|
||||
{
|
||||
combine: true,
|
||||
throwError: false,
|
||||
});
|
||||
// [
|
||||
// { start: 0, end: 10 },
|
||||
// { start: 50, end: 60 }
|
||||
// ]
|
||||
```
|
||||
|
||||
## See also
|
||||
|
||||
[💾 My other projects](https://r37r0m0d3l.icu/open_source_map)
|
||||
|
||||
<img alt="Open Source" src="https://raw.githubusercontent.com/r37r0m0d3l/r37r0m0d3l/master/osmap.svg?sanitize=true" width="960" height="520" style="display:block;height:auto;margin-left:auto;margin-right:auto;min-height:520px;min-width:960px;width:100%;">
|
||||
|
||||
<!-- Badges -->
|
||||
|
||||
[npm-version-img]: https://badgen.net/npm/v/header-range-parser?&icon=npm&label=npm&color=DD3636&v=1.1.1
|
||||
[npm-version-url]: https://npmjs.com/package/header-range-parser
|
||||
|
||||
[npm-downloads-img]: https://badgen.net/npm/dt/header-range-parser?&icon=terminal&label=downloads&color=009688&v=1.1.1
|
||||
[npm-downloads-url]: https://npmjs.com/package/header-range-parser
|
||||
|
||||
[gh-stars-img]: https://badgen.net/github/stars/r37r0m0d3l/header-range-parser?&icon=github&label=stars&color=FFCC33&v=1.1.1
|
||||
[gh-stars-url]: https://github.com/r37r0m0d3l/header-range-parser
|
||||
|
||||
[node-image]: https://badgen.net/npm/node/header-range-parser
|
||||
[node-url]: https://nodejs.org/en/download
|
||||
|
||||
[gh-checks-img]: https://badgen.net/github/checks/r37r0m0d3l/header-range-parser?&icon=github&v=1.1.1
|
||||
[gh-checks-url]: https://github.com/r37r0m0d3l/header-range-parser
|
||||
|
||||
[travis-img]: https://badgen.net/travis/r37r0m0d3l/header-range-parser?&icon=travis&label=build&v=1.1.1
|
||||
[travis-url]: https://travis-ci.com/github/r37r0m0d3l/header-range-parser
|
||||
|
||||
[ts-img]: https://badgen.net/npm/types/header-range-parser?&icon=typescript&label=types&color=1E90FF&v=1.1.1
|
||||
[ts-url]: https://github.com/r37r0m0d3l/header-range-parser/blob/main/dist/index.d.ts
|
||||
|
||||
[sonarcloud-img]: https://sonarcloud.io/api/project_badges/measure?project=r37r0m0d3l_header-range-parser&metric=sqale_rating&v=1.1.1
|
||||
[sonarcloud-url]: https://sonarcloud.io/dashboard?id=r37r0m0d3l_header-range-parser
|
||||
|
||||
[lgtm-img]: https://badgen.net/lgtm/grade/g/r37r0m0d3l/header-range-parser?&icon=lgtm&label=lgtm:js/ts&color=00C853&v=1.1.1
|
||||
[lgtm-url]: https://lgtm.com/projects/g/r37r0m0d3l/header-range-parser/context:javascript
|
||||
|
||||
[codacy-img]: https://app.codacy.com/project/badge/Grade/b3458c991041406bbe85fdfd87498006
|
||||
[codacy-url]: https://www.codacy.com/gh/r37r0m0d3l/header-range-parser/dashboard?&utm_source=github.com&utm_medium=referral&utm_content=r37r0m0d3l/header-range-parser&utm_campaign=Badge_Grade
|
||||
|
||||
[snyk-img]: https://badgen.net/snyk/r37r0m0d3l/header-range-parser?&v=1.1.1
|
||||
[snyk-url]: https://github.com/r37r0m0d3l/header-range-parser
|
||||
|
||||
[dependabot-img]: https://badgen.net/dependabot/r37r0m0d3l/header-range-parser?&icon=dependabot&v=1.1.1
|
||||
[dependabot-url]: https://github.com/r37r0m0d3l/header-range-parser
|
||||
|
||||
[codefactor-img]: https://www.codefactor.io/repository/github/r37r0m0d3l/header-range-parser/badge?&style=flat-square&v=1.1.1
|
||||
[codefactor-url]: https://www.codefactor.io/repository/github/r37r0m0d3l/header-range-parser
|
||||
1
25_02_24/node_modules/header-range-parser/dist/index.cjs
generated
vendored
Normal file
1
25_02_24/node_modules/header-range-parser/dist/index.cjs
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var o=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var m=n=>o(n,"__esModule",{value:!0});var p=(n,e)=>{for(var t in e)o(n,t,{get:e[t],enumerable:!0})},x=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of d(e))!f.call(n,s)&&(t||s!=="default")&&o(n,s,{get:()=>e[s],enumerable:!(i=c(e,s))||i.enumerable});return n};var b=(n=>(e,t)=>n&&n.get(e)||(t=x(m({}),e,1),n&&n.set(e,t),t))(typeof WeakMap!="undefined"?new WeakMap:0);var w={};p(w,{ERROR_INVALID_ARGUMENT:()=>u,ERROR_STRING_IS_NOT_HEADER:()=>g,ERROR_UNSATISFIABLE_RESULT:()=>l,Ranges:()=>R,parseRange:()=>W});var u=-3,g=-2,l=-1;function I(n){let e=n.map(h).sort(E),t=0;for(let s=1;s<e.length;s++){let a=e[s],r=e[t];a.start>r.end+1?e[++t]=a:a.end>r.end&&(r.end=a.end,r.index=Math.min(r.index,a.index))}e.length=t+1;let i=[...e].sort(N).map(y);return i.type=n.type,i}function h(n,e){return{end:n.end,index:e,start:n.start}}function y(n){return{end:n.end,start:n.start}}function N(n,e){return n.index-e.index}function E(n,e){return n.start-e.start}var R=class extends Array{constructor(){super(...arguments);this.type=""}toArray(){let e=Array.from(this);return e.type=this.type,e}};function A(n,e){let t=new R;for(let i of n){let s=i.split("-"),a=Number.parseInt(s[0],10),r=Number.parseInt(s[1],10);Number.isNaN(a)?(a=e-r,r=e-1):Number.isNaN(r)&&(r=e-1),r>e-1&&(r=e-1),!(Number.isNaN(a)||Number.isNaN(r)||a>r||a<0)&&t.push({end:r,start:a})}return t}function W(n,e,t){let i=!0;if(t&&"throwError"in t&&t.throwError===!1&&(i=!1),!Number.isInteger(n)){if(i)throw new TypeError("Argument 'size' must be an integer.");return u}if(typeof e!="string"){if(i)throw new TypeError("Argument 'header' must be a string.");return u}let s=e.indexOf("=");if(s===-1)return g;let a=e.slice(s+1).split(","),r=A(a,n);return r.length<1?l:(r.type=e.slice(0,s),t&&t.combine?I(r):r)}module.exports=b(w);
|
||||
7
25_02_24/node_modules/header-range-parser/dist/index.cjs.map
generated
vendored
Normal file
7
25_02_24/node_modules/header-range-parser/dist/index.cjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
43
25_02_24/node_modules/header-range-parser/dist/index.d.ts
generated
vendored
Normal file
43
25_02_24/node_modules/header-range-parser/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
export interface Range {
|
||||
end: number;
|
||||
start: number;
|
||||
}
|
||||
export interface Options {
|
||||
/**
|
||||
* @description The "combine" option can be set to `true`
|
||||
* and overlapping & adjacent ranges
|
||||
* will be combined into a single range.
|
||||
*/
|
||||
combine?: boolean;
|
||||
/**
|
||||
* @description Throw or suppress errors.
|
||||
*/
|
||||
throwError?: boolean;
|
||||
}
|
||||
export declare type ResultUnsatisfiable = -1;
|
||||
export declare type ResultInvalid = -2;
|
||||
export declare type ResultWrongArgument = -3;
|
||||
export declare type Result = ResultInvalid | ResultUnsatisfiable | ResultWrongArgument;
|
||||
export declare const ERROR_INVALID_ARGUMENT: ResultWrongArgument;
|
||||
export declare const ERROR_STRING_IS_NOT_HEADER: ResultInvalid;
|
||||
export declare const ERROR_UNSATISFIABLE_RESULT: ResultUnsatisfiable;
|
||||
export declare class Ranges extends Array<Range> {
|
||||
/**
|
||||
* @description Header name or type
|
||||
*/
|
||||
type: string;
|
||||
/**
|
||||
* @description Return plain JavaScript array with 'type' property
|
||||
* @returns {Array<Range>}
|
||||
*/
|
||||
toArray(): Array<Range>;
|
||||
}
|
||||
/**
|
||||
* @description Parse "Range" header `text` relative to the given file `size`.
|
||||
* @param {number} size - Size
|
||||
* @param {string} header - Header string
|
||||
* @param {Options=} options - Options
|
||||
* @returns {Ranges|Result}
|
||||
* @throws {TypeError}
|
||||
*/
|
||||
export declare function parseRange(size: number, header: string, options?: Options): Ranges | Result;
|
||||
1
25_02_24/node_modules/header-range-parser/dist/index.js
generated
vendored
Normal file
1
25_02_24/node_modules/header-range-parser/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var o=-3,R=-2,g=-1;function l(t){let e=t.map(c).sort(m),s=0;for(let a=1;a<e.length;a++){let r=e[a],n=e[s];r.start>n.end+1?e[++s]=r:r.end>n.end&&(n.end=r.end,n.index=Math.min(n.index,r.index))}e.length=s+1;let i=[...e].sort(f).map(d);return i.type=t.type,i}function c(t,e){return{end:t.end,index:e,start:t.start}}function d(t){return{end:t.end,start:t.start}}function f(t,e){return t.index-e.index}function m(t,e){return t.start-e.start}var u=class extends Array{constructor(){super(...arguments);this.type=""}toArray(){let e=Array.from(this);return e.type=this.type,e}};function p(t,e){let s=new u;for(let i of t){let a=i.split("-"),r=Number.parseInt(a[0],10),n=Number.parseInt(a[1],10);Number.isNaN(r)?(r=e-n,n=e-1):Number.isNaN(n)&&(n=e-1),n>e-1&&(n=e-1),!(Number.isNaN(r)||Number.isNaN(n)||r>n||r<0)&&s.push({end:n,start:r})}return s}function x(t,e,s){let i=!0;if(s&&"throwError"in s&&s.throwError===!1&&(i=!1),!Number.isInteger(t)){if(i)throw new TypeError("Argument 'size' must be an integer.");return o}if(typeof e!="string"){if(i)throw new TypeError("Argument 'header' must be a string.");return o}let a=e.indexOf("=");if(a===-1)return R;let r=e.slice(a+1).split(","),n=p(r,t);return n.length<1?g:(n.type=e.slice(0,a),s&&s.combine?l(n):n)}export{o as ERROR_INVALID_ARGUMENT,R as ERROR_STRING_IS_NOT_HEADER,g as ERROR_UNSATISFIABLE_RESULT,u as Ranges,x as parseRange};
|
||||
7
25_02_24/node_modules/header-range-parser/dist/index.js.map
generated
vendored
Normal file
7
25_02_24/node_modules/header-range-parser/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
77
25_02_24/node_modules/header-range-parser/package.json
generated
vendored
Normal file
77
25_02_24/node_modules/header-range-parser/package.json
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
{
|
||||
"author": "Anton Trofimenko",
|
||||
"bugs": {
|
||||
"url": "https://github.com/r37r0m0d3l/header-range-parser/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"email": "r37r0m0d3l@protonmail.com",
|
||||
"name": "Anton Trofimenko"
|
||||
}
|
||||
],
|
||||
"description": "Range header field string parser.",
|
||||
"devDependencies": {
|
||||
"@types/node": "17.0.4",
|
||||
"@typescript-eslint/eslint-plugin": "5.8.0",
|
||||
"@typescript-eslint/parser": "5.8.0",
|
||||
"esbuild": "0.14.8",
|
||||
"eslint": "8.5.0",
|
||||
"eslint-config-prettier": "8.3.0",
|
||||
"eslint-config-standard": "16.0.3",
|
||||
"eslint-plugin-import": "2.25.3",
|
||||
"eslint-plugin-jsdoc": "37.4.0",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-prettier": "4.0.0",
|
||||
"jest": "27.4.5",
|
||||
"npm-dts": "1.3.10",
|
||||
"prettier": "2.5.1",
|
||||
"typescript": "4.5.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.22.0"
|
||||
},
|
||||
"exports": {
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs",
|
||||
"default": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts"
|
||||
},
|
||||
"files": [
|
||||
"dist/index.cjs",
|
||||
"dist/index.cjs.map",
|
||||
"dist/index.d.ts",
|
||||
"dist/index.js",
|
||||
"dist/index.js.map"
|
||||
],
|
||||
"homepage": "https://github.com/r37r0m0d3l/header-range-parser",
|
||||
"keywords": [
|
||||
"header",
|
||||
"http",
|
||||
"parser",
|
||||
"range"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.cjs",
|
||||
"module": "./dist/index.js",
|
||||
"name": "header-range-parser",
|
||||
"packageManager": "npm@6",
|
||||
"private": false,
|
||||
"readmeFilename": "README.md",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/r37r0m0d3l/header-range-parser.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --config .eslintrc.json \"./src/**/*.ts\"",
|
||||
"test": "jest --collect-coverage=false",
|
||||
"test:coverage": "jest --collect-coverage=true",
|
||||
"build": "npm run build:prod",
|
||||
"build:test": "node ./build.cjs -- --minify=false --sourcemap=false",
|
||||
"build:dev": "node ./build.cjs -- --minify=false --sourcemap=true",
|
||||
"build:prod": "node ./build.cjs -- --minify=true --sourcemap=true",
|
||||
"package:upgrade": "npx npm-check --update"
|
||||
},
|
||||
"type": "module",
|
||||
"types": "./dist/index.d.ts",
|
||||
"version": "1.1.3"
|
||||
}
|
||||
Reference in New Issue
Block a user