mirror of
https://github.com/musix-org/musix-oss
synced 2026-11-01 03:35:00 +00:00
Modules
This commit is contained in:
1 parent
edfcc6f474
commit
30022c7634
11800 files changed
+1984416
-1
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (C) 2017 by fent
|
||||
|
||||
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.
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
# node-miniget
|
||||
|
||||
A small http(s) GET library with redirects, retries, reconnects, concatenating or streaming, and no dependencies. This keeps filesize small for potential browser use.
|
||||
|
||||
[](https://david-dm.org/fent/node-miniget)
|
||||
[](https://codecov.io/gh/fent/node-miniget)
|
||||
|
||||
|
||||
# Usage
|
||||
|
||||
Concatenates a response
|
||||
|
||||
```js
|
||||
const miniget = require('miniget');
|
||||
|
||||
miniget('http://mywebsite.com', (err, res, body) => {
|
||||
console.log('webpage contents: ', body);
|
||||
}));
|
||||
```
|
||||
|
||||
Request can be streamed right away
|
||||
|
||||
```js
|
||||
miniget('http://api.mywebsite.com/v1/messages.json')
|
||||
.pipe(someWritableStream());
|
||||
```
|
||||
|
||||
|
||||
# API
|
||||
|
||||
### miniget(url, [options], [callback(err, http.RequestResponse, body)])
|
||||
|
||||
Makes a GET request. `options` can have any properties from the [`http.request()` function](https://nodejs.org/api/http.html#http_http_request_options_callback), in addition to
|
||||
|
||||
* `maxRedirects` - Default is `2`.
|
||||
* `maxRetries` - Number of times to retry the request if there is a 500 or connection error. Default is `1`.
|
||||
* `maxReconnects` - During a big download, if there is a disconnect, miniget can try to reconnect and continue the download where it left off. Defaults to `0`.
|
||||
* `backoff` - An object with `inc` and `max` used to calculate how long to wait to retry a request. Defaults to `{ inc: 100, max: 10000 }`.
|
||||
* `retryOnAuthError` - In addition to retrying the request on server and connection errors, any authentication errors will trigger a retry.
|
||||
* `highWaterMark` - Amount of data to buffer when in stream mode.
|
||||
* `transform` - Use this to add additional features. Called with the object that `http.get()` or `https.get()` would be called with. Must return a transformed object.
|
||||
* `acceptEncoding` - An object with encoding name as the key, and the value as a function that returns a decoding stream.
|
||||
```js
|
||||
acceptEncoding: { gzip: () => require('zlip').createGunzip(stream) }
|
||||
```
|
||||
Given encodings will be added to the `Accept-Encoding` header, and the response will be decoded if the server responds with encoded content.
|
||||
|
||||
If `callback` is given, will concatenate the response, and call `callback` with a possible error, the response, and the response body.
|
||||
|
||||
Miniget returns a readable stream if `callback` is not given, errors will then be emitted on the stream. Returned stream also contains an `.abort()` method, and can emit the following events.
|
||||
|
||||
#### Event: redirect
|
||||
* `string` - URL redirected to.
|
||||
|
||||
Emitted when the request was redirected with a redirection status code.
|
||||
|
||||
#### Event: retry
|
||||
* `number` - Number of retry.
|
||||
* `Error` - Request or status code error.
|
||||
|
||||
Emitted when the request fails, or the response has a status code >= 500.
|
||||
|
||||
#### Event: reconnect
|
||||
* `number` - Number of reconnect.
|
||||
* `Error` - Request or response error.
|
||||
|
||||
Emitted when the request or response fails after download has started.
|
||||
|
||||
|
||||
# Install
|
||||
|
||||
npm install miniget
|
||||
|
||||
|
||||
# Tests
|
||||
Tests are written with [mocha](https://mochajs.org)
|
||||
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/// <reference types="node" />
|
||||
import { RequestOptions, IncomingMessage } from 'http';
|
||||
import { PassThrough, Transform } from 'stream';
|
||||
declare namespace Miniget {
|
||||
interface Options extends RequestOptions {
|
||||
maxRedirects?: number;
|
||||
maxRetries?: number;
|
||||
maxReconnects?: number;
|
||||
backoff?: {
|
||||
inc: number;
|
||||
max: number;
|
||||
};
|
||||
highWaterMark?: number;
|
||||
transform?: (parsedUrl: RequestOptions) => RequestOptions;
|
||||
acceptEncoding?: {
|
||||
[key: string]: () => Transform;
|
||||
};
|
||||
}
|
||||
interface Stream extends PassThrough {
|
||||
abort: () => void;
|
||||
on(event: 'reconnect', listener: (attempt: number, err?: Error) => void): this;
|
||||
on(event: 'retry', listener: (attempt: number, err?: Error) => void): this;
|
||||
on(event: 'redirect', listener: (url: string) => void): this;
|
||||
on(event: string | symbol, listener: (...args: any) => void): this;
|
||||
}
|
||||
}
|
||||
declare type Callback = (error: Error, message: IncomingMessage, body: string) => void;
|
||||
declare function Miniget(url: string, options?: Miniget.Options): Miniget.Stream;
|
||||
declare function Miniget(url: string, options: Miniget.Options, callback?: Callback): void;
|
||||
declare function Miniget(url: string, callback: Callback): Miniget.Stream;
|
||||
export = Miniget;
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
const http_1 = __importDefault(require("http"));
|
||||
const https_1 = __importDefault(require("https"));
|
||||
const url_1 = require("url");
|
||||
const stream_1 = require("stream");
|
||||
const httpLibs = { 'http:': http_1.default, 'https:': https_1.default };
|
||||
const redirectCodes = { 301: true, 302: true, 303: true, 307: true };
|
||||
const retryCodes = { 429: true, 503: true };
|
||||
const defaults = {
|
||||
maxRedirects: 2,
|
||||
maxRetries: 2,
|
||||
maxReconnects: 0,
|
||||
backoff: { inc: 100, max: 10000 },
|
||||
};
|
||||
function Miniget(url, options, callback) {
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
}
|
||||
else if (!options) {
|
||||
options = {};
|
||||
}
|
||||
const opts = Object.assign({}, defaults, options);
|
||||
const stream = new stream_1.PassThrough({ highWaterMark: opts.highWaterMark });
|
||||
let myreq, mydecoded;
|
||||
let aborted = false;
|
||||
let redirects = 0;
|
||||
let retries = 0;
|
||||
let retryTimeout;
|
||||
let reconnects = 0;
|
||||
let contentLength;
|
||||
let acceptRanges = false;
|
||||
let rangeStart = 0, rangeEnd;
|
||||
let downloaded = 0;
|
||||
// Check if this is a ranged request.
|
||||
if (opts.headers && opts.headers.Range) {
|
||||
let r = /bytes=(\d+)-(\d+)?/.exec(opts.headers.Range + '');
|
||||
if (r) {
|
||||
rangeStart = parseInt(r[1], 10);
|
||||
rangeEnd = parseInt(r[2], 10);
|
||||
}
|
||||
}
|
||||
// Add `Accept-Encoding` header.
|
||||
if (opts.acceptEncoding) {
|
||||
opts.headers = Object.assign({
|
||||
'Accept-Encoding': Object.keys(opts.acceptEncoding).join(', ')
|
||||
}, opts.headers);
|
||||
}
|
||||
const doRetry = (retryOptions = {}) => {
|
||||
if (aborted) {
|
||||
return false;
|
||||
}
|
||||
// If there is an error when the download has already started,
|
||||
// but not finished, try reconnecting.
|
||||
if (mydecoded && 0 < downloaded) {
|
||||
if (acceptRanges && downloaded < contentLength &&
|
||||
reconnects++ < opts.maxReconnects) {
|
||||
mydecoded = null;
|
||||
retries = 0;
|
||||
let inc = opts.backoff.inc;
|
||||
let ms = Math.min(inc, opts.backoff.max);
|
||||
retryTimeout = setTimeout(doDownload, ms);
|
||||
stream.emit('reconnect', reconnects, retryOptions.err);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ((!retryOptions.statusCode ||
|
||||
retryOptions.err && retryOptions.err.message === 'ENOTFOUND') &&
|
||||
retries++ < opts.maxRetries) {
|
||||
let ms = retryOptions.retryAfter ||
|
||||
Math.min(retries * opts.backoff.inc, opts.backoff.max);
|
||||
retryTimeout = setTimeout(doDownload, ms);
|
||||
stream.emit('retry', retries, retryOptions.err);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
const onRequestError = (err, statusCode) => {
|
||||
if (!doRetry({ err, statusCode })) {
|
||||
stream.emit('error', err);
|
||||
}
|
||||
};
|
||||
const doDownload = () => {
|
||||
if (aborted) {
|
||||
return;
|
||||
}
|
||||
let parsed = url_1.parse(url);
|
||||
let httpLib = httpLibs[parsed.protocol];
|
||||
if (!httpLib) {
|
||||
stream.emit('error', Error('Invalid URL: ' + url));
|
||||
return;
|
||||
}
|
||||
Object.assign(parsed, opts);
|
||||
if (acceptRanges && downloaded > 0) {
|
||||
let start = downloaded + rangeStart;
|
||||
let end = rangeEnd || '';
|
||||
parsed.headers = Object.assign({}, parsed.headers, {
|
||||
Range: `bytes=${start}-${end}`
|
||||
});
|
||||
}
|
||||
if (opts.transform) {
|
||||
parsed = opts.transform(parsed);
|
||||
if (parsed.protocol) {
|
||||
httpLib = httpLibs[parsed.protocol];
|
||||
}
|
||||
}
|
||||
myreq = httpLib.get(parsed, (res) => {
|
||||
if (res.statusCode in redirectCodes) {
|
||||
if (redirects++ >= opts.maxRedirects) {
|
||||
stream.emit('error', Error('Too many redirects'));
|
||||
}
|
||||
else {
|
||||
url = res.headers.location;
|
||||
setTimeout(doDownload, res.headers['retry-after'] ? parseInt(res.headers['retry-after'], 10) * 1000 : 0);
|
||||
stream.emit('redirect', url);
|
||||
}
|
||||
return;
|
||||
// Check for rate limiting.
|
||||
}
|
||||
else if (res.statusCode in retryCodes) {
|
||||
doRetry({ retryAfter: parseInt(res.headers['retry-after'], 10) });
|
||||
return;
|
||||
}
|
||||
else if (res.statusCode < 200 || 400 <= res.statusCode) {
|
||||
let err = Error('Status code: ' + res.statusCode);
|
||||
if (res.statusCode >= 500) {
|
||||
onRequestError(err, res.statusCode);
|
||||
}
|
||||
else {
|
||||
stream.emit('error', err);
|
||||
}
|
||||
return;
|
||||
}
|
||||
let decoded = res;
|
||||
const cleanup = () => {
|
||||
res.removeListener('data', ondata);
|
||||
decoded.removeListener('end', onend);
|
||||
decoded.removeListener('error', onerror);
|
||||
res.removeListener('error', onerror);
|
||||
};
|
||||
const ondata = (chunk) => { downloaded += chunk.length; };
|
||||
const onend = () => {
|
||||
cleanup();
|
||||
if (!doRetry()) {
|
||||
stream.end();
|
||||
}
|
||||
};
|
||||
const onerror = (err) => {
|
||||
cleanup();
|
||||
onRequestError(err);
|
||||
};
|
||||
if (opts.acceptEncoding && res.headers['content-encoding']) {
|
||||
for (let enc of res.headers['content-encoding'].split(', ').reverse()) {
|
||||
let fn = opts.acceptEncoding[enc];
|
||||
if (fn != null) {
|
||||
decoded = decoded.pipe(fn());
|
||||
decoded.on('error', onerror);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!contentLength) {
|
||||
contentLength = parseInt(res.headers['content-length'] + '', 10);
|
||||
acceptRanges = res.headers['accept-ranges'] === 'bytes' &&
|
||||
contentLength > 0 && opts.maxReconnects > 0;
|
||||
}
|
||||
res.on('data', ondata);
|
||||
decoded.on('end', onend);
|
||||
decoded.pipe(stream, { end: !acceptRanges });
|
||||
mydecoded = decoded;
|
||||
stream.emit('response', res);
|
||||
res.on('error', onerror);
|
||||
});
|
||||
myreq.on('error', onRequestError);
|
||||
stream.emit('request', myreq);
|
||||
};
|
||||
stream.abort = () => {
|
||||
aborted = true;
|
||||
stream.emit('abort');
|
||||
if (myreq) {
|
||||
myreq.abort();
|
||||
}
|
||||
if (mydecoded) {
|
||||
mydecoded.unpipe(stream);
|
||||
}
|
||||
clearTimeout(retryTimeout);
|
||||
};
|
||||
process.nextTick(doDownload);
|
||||
if (callback) {
|
||||
let body = '', myres;
|
||||
stream.setEncoding('utf8');
|
||||
stream.on('data', (chunk) => body += chunk);
|
||||
stream.on('response', (res) => myres = res);
|
||||
stream.on('end', () => callback(null, myres, body));
|
||||
stream.on('error', callback);
|
||||
}
|
||||
return callback ? null : stream;
|
||||
}
|
||||
module.exports = Miniget;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AACA,gDAAwB;AACxB,kDAA0B;AAC1B,6BAAwC;AACxC,mCAAgD;AAGhD,MAAM,QAAQ,GAIV,EAAE,OAAO,EAAE,cAAI,EAAE,QAAQ,EAAE,eAAK,EAAE,CAAC;AACvC,MAAM,aAAa,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACrE,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AAsB5C,MAAM,QAAQ,GAAoB;IAChC,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,CAAC;IACb,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE;CAClC,CAAC;AAMF,SAAS,OAAO,CAAC,GAAW,EAAE,OAAoC,EAAE,QAAmB;IACrF,IAAI,OAAO,OAAO,KAAK,UAAU,EAAE;QACjC,QAAQ,GAAG,OAAO,CAAC;QACnB,OAAO,GAAG,EAAE,CAAC;KACd;SAAM,IAAI,CAAC,OAAO,EAAE;QACnB,OAAO,GAAG,EAAE,CAAC;KACd;IACD,MAAM,IAAI,GAAoB,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,IAAI,oBAAW,CAAC,EAAE,aAAa,EAAE,IA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
"_args": [
|
||||
[
|
||||
"miniget@1.6.1",
|
||||
"C:\\Users\\matia\\Documents\\GitHub\\Musix-V3"
|
||||
]
|
||||
],
|
||||
"_from": "miniget@1.6.1",
|
||||
"_id": "miniget@1.6.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-I5oBwZmcaOuJrjQn7lpS29HM+aAZDbzKbX5ouxVyhFYdg6fA6YKOTwOCgzZQwlHuMek3FlCxz6eNrd4pOXbwOA==",
|
||||
"_location": "/miniget",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "miniget@1.6.1",
|
||||
"name": "miniget",
|
||||
"escapedName": "miniget",
|
||||
"rawSpec": "1.6.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.6.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/m3u8stream",
|
||||
"/ytdl-core"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/miniget/-/miniget-1.6.1.tgz",
|
||||
"_spec": "1.6.1",
|
||||
"_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix-V3",
|
||||
"author": {
|
||||
"name": "fent",
|
||||
"url": "https://github.com/fent"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/fent/node-miniget/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "A small HTTP(S) GET request library, with redirects and streaming.",
|
||||
"devDependencies": {
|
||||
"@types/lolex": "^3.1.1",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "^12.7.11",
|
||||
"lolex": "^5.0.0",
|
||||
"longjohn": "^0.2.12",
|
||||
"mocha": "^6.2.0",
|
||||
"nock": "^11.1.0",
|
||||
"nyc": "^14.1.1",
|
||||
"stream-equal": "^1.1.1",
|
||||
"ts-node": "^8.4.1",
|
||||
"typescript": "^3.6.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"homepage": "https://github.com/fent/node-miniget#readme",
|
||||
"keywords": [
|
||||
"request",
|
||||
"http",
|
||||
"https",
|
||||
"redirect",
|
||||
"stream"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./dist/index.js",
|
||||
"name": "miniget",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/fent/node-miniget.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.build.json",
|
||||
"test": "nyc --extension .ts --reporter=lcov --reporter=text-summary mocha -- --require ts-node/register test/*-test.ts"
|
||||
},
|
||||
"types": "./dist/index.d.ts",
|
||||
"version": "1.6.1"
|
||||
}
|
||||
Reference in new issue
Block a user