mirror of
https://github.com/musix-org/musix-oss
synced 2026-11-28 22:40:47 +00:00
Modules
This commit is contained in:
1 parent
edfcc6f474
commit
30022c7634
11800 files changed
+1984416
-1
No files matched your search
+27
@@ -0,0 +1,27 @@
|
||||
/*!
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import { Agent as HTTPAgent } from 'http';
|
||||
import { Options } from './';
|
||||
/**
|
||||
* Returns a custom request Agent if one is found, otherwise returns undefined
|
||||
* which will result in the global http(s) Agent being used.
|
||||
* @private
|
||||
* @param {string} uri The request uri
|
||||
* @param {object} reqOpts The request options
|
||||
* @returns {Agent|undefined}
|
||||
*/
|
||||
export declare function getAgent(uri: string, reqOpts: Options): HTTPAgent | undefined;
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
/*!
|
||||
* Copyright 2019 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var http_1 = require("http");
|
||||
var https_1 = require("https");
|
||||
var pool = new Map();
|
||||
/**
|
||||
* Returns a custom request Agent if one is found, otherwise returns undefined
|
||||
* which will result in the global http(s) Agent being used.
|
||||
* @private
|
||||
* @param {string} uri The request uri
|
||||
* @param {object} reqOpts The request options
|
||||
* @returns {Agent|undefined}
|
||||
*/
|
||||
function getAgent(uri, reqOpts) {
|
||||
var isHttp = uri.startsWith('http://');
|
||||
var proxy = reqOpts.proxy ||
|
||||
process.env.HTTP_PROXY ||
|
||||
process.env.http_proxy ||
|
||||
process.env.HTTPS_PROXY ||
|
||||
process.env.https_proxy;
|
||||
if (proxy) {
|
||||
// tslint:disable-next-line variable-name
|
||||
var Agent = isHttp
|
||||
? require('http-proxy-agent')
|
||||
: require('https-proxy-agent');
|
||||
return new Agent(proxy);
|
||||
}
|
||||
var key = isHttp ? 'http' : 'https';
|
||||
if (reqOpts.forever) {
|
||||
key += ':forever';
|
||||
if (!pool.has(key)) {
|
||||
// tslint:disable-next-line variable-name
|
||||
var Agent = isHttp ? http_1.Agent : https_1.Agent;
|
||||
pool.set(key, new Agent({ keepAlive: true }));
|
||||
}
|
||||
}
|
||||
return pool.get(key);
|
||||
}
|
||||
exports.getAgent = getAgent;
|
||||
//# sourceMappingURL=agents.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/agents.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;AAEH,6BAAwC;AACxC,+BAA0C;AAG1C,IAAM,IAAI,GAAG,IAAI,GAAG,EAAqB,CAAC;AAE1C;;;;;;;GAOG;AACH,SAAgB,QAAQ,CAAC,GAAW,EAAE,OAAgB;IACpD,IAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzC,IAAM,KAAK,GACT,OAAO,CAAC,KAAK;QACb,OAAO,CAAC,GAAG,CAAC,UAAU;QACtB,OAAO,CAAC,GAAG,CAAC,UAAU;QACtB,OAAO,CAAC,GAAG,CAAC,WAAW;QACvB,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC;IAE1B,IAAI,KAAK,EAAE;QACT,yCAAyC;QACzC,IAAM,KAAK,GAAG,MAAM;YAClB,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YAC7B,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QAEjC,OAAO,IAAI,KAAK,CAAC,KAAK,CAAc,CAAC;KACtC;IAED,IAAI,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAEpC,IAAI,OAAO,CAAC,OAAO,EAAE;QACnB,GAAG,IAAI,UAAU,CAAC;QAElB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;YAClB,yCAAyC;YACzC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,YAAS,CAAC,CAAC,CAAC,aAAU,CAAC;YAC9C,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,KAAK,CAAC,EAAC,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC,CAAC;SAC7C;KACF;IAED,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACvB,CAAC;AA/BD,4BA+BC"}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/*!
|
||||
* Copyright 2018 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/// <reference types="node" />
|
||||
import { Agent } from 'https';
|
||||
import { PassThrough, Readable } from 'stream';
|
||||
export interface CoreOptions {
|
||||
method?: string;
|
||||
timeout?: number;
|
||||
gzip?: boolean;
|
||||
json?: any;
|
||||
headers?: Headers;
|
||||
body?: string | {};
|
||||
useQuerystring?: boolean;
|
||||
qs?: any;
|
||||
proxy?: string;
|
||||
multipart?: RequestPart[];
|
||||
forever?: boolean;
|
||||
}
|
||||
export interface OptionsWithUri extends CoreOptions {
|
||||
uri: string;
|
||||
}
|
||||
export interface OptionsWithUrl extends CoreOptions {
|
||||
url: string;
|
||||
}
|
||||
export declare type Options = OptionsWithUri | OptionsWithUrl;
|
||||
export interface Request extends PassThrough {
|
||||
agent: Agent | false;
|
||||
headers: Headers;
|
||||
href?: string;
|
||||
}
|
||||
export interface Response<T = any> {
|
||||
statusCode: number;
|
||||
headers: Headers;
|
||||
body: T;
|
||||
request: Request;
|
||||
statusMessage?: string;
|
||||
}
|
||||
export interface RequestPart {
|
||||
body: string | Readable;
|
||||
}
|
||||
export interface RequestCallback<T = any> {
|
||||
(err: Error | null, response: Response, body?: T): void;
|
||||
}
|
||||
export declare class RequestError extends Error {
|
||||
code?: number;
|
||||
}
|
||||
interface Headers {
|
||||
[index: string]: any;
|
||||
}
|
||||
declare function teenyRequest(reqOpts: Options): Request;
|
||||
declare namespace teenyRequest {
|
||||
var defaults: (defaults: CoreOptions) => (reqOpts: Options, callback?: RequestCallback<any> | undefined) => void | Request;
|
||||
}
|
||||
declare function teenyRequest(reqOpts: Options, callback: RequestCallback): void;
|
||||
declare namespace teenyRequest {
|
||||
var defaults: (defaults: CoreOptions) => (reqOpts: Options, callback?: RequestCallback<any> | undefined) => void | Request;
|
||||
}
|
||||
export { teenyRequest };
|
||||
+252
@@ -0,0 +1,252 @@
|
||||
"use strict";
|
||||
/*!
|
||||
* Copyright 2018 Google LLC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var node_fetch_1 = require("node-fetch");
|
||||
var stream_1 = require("stream");
|
||||
var uuid = require("uuid");
|
||||
var agents_1 = require("./agents");
|
||||
var streamEvents = require('stream-events');
|
||||
var RequestError = /** @class */ (function (_super) {
|
||||
__extends(RequestError, _super);
|
||||
function RequestError() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
return RequestError;
|
||||
}(Error));
|
||||
exports.RequestError = RequestError;
|
||||
/**
|
||||
* Convert options from Request to Fetch format
|
||||
* @private
|
||||
* @param reqOpts Request options
|
||||
*/
|
||||
function requestToFetchOptions(reqOpts) {
|
||||
var options = __assign(__assign({ method: reqOpts.method || 'GET' }, (reqOpts.timeout && { timeout: reqOpts.timeout })), (typeof reqOpts.gzip === 'boolean' && { compress: reqOpts.gzip }));
|
||||
if (typeof reqOpts.json === 'object') {
|
||||
// Add Content-type: application/json header
|
||||
reqOpts.headers = reqOpts.headers || {};
|
||||
reqOpts.headers['Content-Type'] = 'application/json';
|
||||
// Set body to JSON representation of value
|
||||
options.body = JSON.stringify(reqOpts.json);
|
||||
}
|
||||
else {
|
||||
if (typeof reqOpts.body !== 'string') {
|
||||
options.body = JSON.stringify(reqOpts.body);
|
||||
}
|
||||
else {
|
||||
options.body = reqOpts.body;
|
||||
}
|
||||
}
|
||||
// tslint:disable-next-line no-any
|
||||
options.headers = reqOpts.headers;
|
||||
var uri = (reqOpts.uri ||
|
||||
reqOpts.url);
|
||||
if (reqOpts.useQuerystring === true || typeof reqOpts.qs === 'object') {
|
||||
var qs = require('querystring');
|
||||
var params = qs.stringify(reqOpts.qs);
|
||||
uri = uri + '?' + params;
|
||||
}
|
||||
options.agent = agents_1.getAgent(uri, reqOpts);
|
||||
return { uri: uri, options: options };
|
||||
}
|
||||
/**
|
||||
* Convert a response from `fetch` to `request` format.
|
||||
* @private
|
||||
* @param opts The `request` options used to create the request.
|
||||
* @param res The Fetch response
|
||||
* @returns A `request` response object
|
||||
*/
|
||||
function fetchToRequestResponse(opts, res) {
|
||||
var request = {};
|
||||
request.agent = opts.agent || false;
|
||||
request.headers = (opts.headers || {});
|
||||
request.href = res.url;
|
||||
// headers need to be converted from a map to an obj
|
||||
var resHeaders = {};
|
||||
res.headers.forEach(function (value, key) { return (resHeaders[key] = value); });
|
||||
var response = Object.assign(res.body, {
|
||||
statusCode: res.status,
|
||||
statusMessage: res.statusText,
|
||||
request: request,
|
||||
body: res.body,
|
||||
headers: resHeaders,
|
||||
toJSON: function () { return ({ headers: resHeaders }); },
|
||||
});
|
||||
return response;
|
||||
}
|
||||
/**
|
||||
* Create POST body from two parts as multipart/related content-type
|
||||
* @private
|
||||
* @param boundary
|
||||
* @param multipart
|
||||
*/
|
||||
function createMultipartStream(boundary, multipart) {
|
||||
var finale = "--" + boundary + "--";
|
||||
var stream = new stream_1.PassThrough();
|
||||
for (var _i = 0, multipart_1 = multipart; _i < multipart_1.length; _i++) {
|
||||
var part = multipart_1[_i];
|
||||
var preamble = "--" + boundary + "\r\nContent-Type: " + part['Content-Type'] + "\r\n\r\n";
|
||||
stream.write(preamble);
|
||||
if (typeof part.body === 'string') {
|
||||
stream.write(part.body);
|
||||
stream.write('\r\n');
|
||||
}
|
||||
else {
|
||||
part.body.pipe(stream, { end: false });
|
||||
part.body.on('end', function () {
|
||||
stream.write('\r\n');
|
||||
stream.write(finale);
|
||||
stream.end();
|
||||
});
|
||||
}
|
||||
}
|
||||
return stream;
|
||||
}
|
||||
function teenyRequest(reqOpts, callback) {
|
||||
var _a = requestToFetchOptions(reqOpts), uri = _a.uri, options = _a.options;
|
||||
var multipart = reqOpts.multipart;
|
||||
if (reqOpts.multipart && multipart.length === 2) {
|
||||
if (!callback) {
|
||||
// TODO: add support for multipart uploads through streaming
|
||||
throw new Error('Multipart without callback is not implemented.');
|
||||
}
|
||||
var boundary = uuid.v4();
|
||||
options.headers['Content-Type'] = "multipart/related; boundary=" + boundary;
|
||||
options.body = createMultipartStream(boundary, multipart);
|
||||
// Multipart upload
|
||||
node_fetch_1.default(uri, options).then(function (res) {
|
||||
var header = res.headers.get('content-type');
|
||||
var response = fetchToRequestResponse(options, res);
|
||||
var body = response.body;
|
||||
if (header === 'application/json' ||
|
||||
header === 'application/json; charset=utf-8') {
|
||||
res.json().then(function (json) {
|
||||
response.body = json;
|
||||
callback(null, response, json);
|
||||
}, function (err) {
|
||||
callback(err, response, body);
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.text().then(function (text) {
|
||||
response.body = text;
|
||||
callback(null, response, text);
|
||||
}, function (err) {
|
||||
callback(err, response, body);
|
||||
});
|
||||
}, function (err) {
|
||||
callback(err, null, null);
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (callback === undefined) {
|
||||
// Stream mode
|
||||
var requestStream_1 = streamEvents(new stream_1.PassThrough());
|
||||
// tslint:disable-next-line no-any
|
||||
var responseStream_1;
|
||||
requestStream_1.once('reading', function () {
|
||||
if (responseStream_1) {
|
||||
responseStream_1.pipe(requestStream_1);
|
||||
}
|
||||
else {
|
||||
requestStream_1.once('response', function () {
|
||||
responseStream_1.pipe(requestStream_1);
|
||||
});
|
||||
}
|
||||
});
|
||||
options.compress = false;
|
||||
node_fetch_1.default(uri, options).then(function (res) {
|
||||
responseStream_1 = res.body;
|
||||
responseStream_1.on('error', function (err) {
|
||||
requestStream_1.emit('error', err);
|
||||
});
|
||||
var response = fetchToRequestResponse(options, res);
|
||||
requestStream_1.emit('response', response);
|
||||
}, function (err) {
|
||||
requestStream_1.emit('error', err);
|
||||
});
|
||||
// fetch doesn't supply the raw HTTP stream, instead it
|
||||
// returns a PassThrough piped from the HTTP response
|
||||
// stream.
|
||||
return requestStream_1;
|
||||
}
|
||||
// GET or POST with callback
|
||||
node_fetch_1.default(uri, options).then(function (res) {
|
||||
var header = res.headers.get('content-type');
|
||||
var response = fetchToRequestResponse(options, res);
|
||||
var body = response.body;
|
||||
if (header === 'application/json' ||
|
||||
header === 'application/json; charset=utf-8') {
|
||||
if (response.statusCode === 204) {
|
||||
// Probably a DELETE
|
||||
callback(null, response, body);
|
||||
return;
|
||||
}
|
||||
res.json().then(function (json) {
|
||||
response.body = json;
|
||||
callback(null, response, json);
|
||||
}, function (err) {
|
||||
callback(err, response, body);
|
||||
});
|
||||
return;
|
||||
}
|
||||
res.text().then(function (text) {
|
||||
var response = fetchToRequestResponse(options, res);
|
||||
response.body = text;
|
||||
callback(null, response, text);
|
||||
}, function (err) {
|
||||
callback(err, response, body);
|
||||
});
|
||||
}, function (err) {
|
||||
callback(err, null, null);
|
||||
});
|
||||
return;
|
||||
}
|
||||
exports.teenyRequest = teenyRequest;
|
||||
teenyRequest.defaults = function (defaults) {
|
||||
return function (reqOpts, callback) {
|
||||
var opts = __assign(__assign({}, defaults), reqOpts);
|
||||
if (callback === undefined) {
|
||||
return teenyRequest(opts);
|
||||
}
|
||||
teenyRequest(opts, callback);
|
||||
};
|
||||
};
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,yCAAuC;AACvC,iCAA6C;AAC7C,2BAA6B;AAC7B,mCAAkC;AAClC,IAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAoD9C;IAAkC,gCAAK;IAAvC;;IAEA,CAAC;IAAD,mBAAC;AAAD,CAAC,AAFD,CAAkC,KAAK,GAEtC;AAFY,oCAAY;AASzB;;;;GAIG;AACH,SAAS,qBAAqB,CAAC,OAAgB;IAC7C,IAAM,OAAO,uBACX,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,IAC5B,CAAC,OAAO,CAAC,OAAO,IAAI,EAAC,OAAO,EAAE,OAAO,CAAC,OAAO,EAAC,CAAC,GAC/C,CAAC,OAAO,OAAO,CAAC,IAAI,KAAK,SAAS,IAAI,EAAC,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAC,CAAC,CACnE,CAAC;IAEF,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE;QACpC,4CAA4C;QAC5C,OAAO,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACxC,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC;QAErD,2CAA2C;QAC3C,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7C;SAAM;QACL,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE;YACpC,OAAO,CAAC,IAAI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