aboutsummaryrefslogtreecommitdiff
path: root/node_modules/typed-rest-client
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/typed-rest-client')
-rw-r--r--node_modules/typed-rest-client/Handlers.d.ts4
-rw-r--r--node_modules/typed-rest-client/Handlers.js10
-rw-r--r--node_modules/typed-rest-client/HttpClient.d.ts103
-rw-r--r--node_modules/typed-rest-client/HttpClient.js455
-rw-r--r--node_modules/typed-rest-client/Index.d.ts0
-rw-r--r--node_modules/typed-rest-client/Index.js2
-rw-r--r--node_modules/typed-rest-client/Interfaces.d.ts62
-rw-r--r--node_modules/typed-rest-client/Interfaces.js5
-rw-r--r--node_modules/typed-rest-client/LICENSE21
-rw-r--r--node_modules/typed-rest-client/README.md100
-rw-r--r--node_modules/typed-rest-client/RestClient.d.ts77
-rw-r--r--node_modules/typed-rest-client/RestClient.js217
-rw-r--r--node_modules/typed-rest-client/ThirdPartyNotice.txt1318
-rw-r--r--node_modules/typed-rest-client/Util.d.ts7
-rw-r--r--node_modules/typed-rest-client/Util.js35
-rw-r--r--node_modules/typed-rest-client/handlers/basiccreds.d.ts9
-rw-r--r--node_modules/typed-rest-client/handlers/basiccreds.js24
-rw-r--r--node_modules/typed-rest-client/handlers/bearertoken.d.ts8
-rw-r--r--node_modules/typed-rest-client/handlers/bearertoken.js23
-rw-r--r--node_modules/typed-rest-client/handlers/ntlm.d.ts13
-rw-r--r--node_modules/typed-rest-client/handlers/ntlm.js137
-rw-r--r--node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts8
-rw-r--r--node_modules/typed-rest-client/handlers/personalaccesstoken.js23
-rw-r--r--node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js389
-rw-r--r--node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt6
-rw-r--r--node_modules/typed-rest-client/package.json73
26 files changed, 3129 insertions, 0 deletions
diff --git a/node_modules/typed-rest-client/Handlers.d.ts b/node_modules/typed-rest-client/Handlers.d.ts
new file mode 100644
index 0000000..780935d
--- /dev/null
+++ b/node_modules/typed-rest-client/Handlers.d.ts
@@ -0,0 +1,4 @@
+export { BasicCredentialHandler } from "./handlers/basiccreds";
+export { BearerCredentialHandler } from "./handlers/bearertoken";
+export { NtlmCredentialHandler } from "./handlers/ntlm";
+export { PersonalAccessTokenCredentialHandler } from "./handlers/personalaccesstoken";
diff --git a/node_modules/typed-rest-client/Handlers.js b/node_modules/typed-rest-client/Handlers.js
new file mode 100644
index 0000000..0b9e040
--- /dev/null
+++ b/node_modules/typed-rest-client/Handlers.js
@@ -0,0 +1,10 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+var basiccreds_1 = require("./handlers/basiccreds");
+exports.BasicCredentialHandler = basiccreds_1.BasicCredentialHandler;
+var bearertoken_1 = require("./handlers/bearertoken");
+exports.BearerCredentialHandler = bearertoken_1.BearerCredentialHandler;
+var ntlm_1 = require("./handlers/ntlm");
+exports.NtlmCredentialHandler = ntlm_1.NtlmCredentialHandler;
+var personalaccesstoken_1 = require("./handlers/personalaccesstoken");
+exports.PersonalAccessTokenCredentialHandler = personalaccesstoken_1.PersonalAccessTokenCredentialHandler;
diff --git a/node_modules/typed-rest-client/HttpClient.d.ts b/node_modules/typed-rest-client/HttpClient.d.ts
new file mode 100644
index 0000000..f5cd014
--- /dev/null
+++ b/node_modules/typed-rest-client/HttpClient.d.ts
@@ -0,0 +1,103 @@
+/// <reference types="node" />
+import url = require("url");
+import http = require("http");
+import ifm = require('./Interfaces');
+export declare enum HttpCodes {
+ OK = 200,
+ MultipleChoices = 300,
+ MovedPermanently = 301,
+ ResourceMoved = 302,
+ SeeOther = 303,
+ NotModified = 304,
+ UseProxy = 305,
+ SwitchProxy = 306,
+ TemporaryRedirect = 307,
+ PermanentRedirect = 308,
+ BadRequest = 400,
+ Unauthorized = 401,
+ PaymentRequired = 402,
+ Forbidden = 403,
+ NotFound = 404,
+ MethodNotAllowed = 405,
+ NotAcceptable = 406,
+ ProxyAuthenticationRequired = 407,
+ RequestTimeout = 408,
+ Conflict = 409,
+ Gone = 410,
+ InternalServerError = 500,
+ NotImplemented = 501,
+ BadGateway = 502,
+ ServiceUnavailable = 503,
+ GatewayTimeout = 504,
+}
+export declare class HttpClientResponse implements ifm.IHttpClientResponse {
+ constructor(message: http.IncomingMessage);
+ message: http.IncomingMessage;
+ readBody(): Promise<string>;
+}
+export interface RequestInfo {
+ options: http.RequestOptions;
+ parsedUrl: url.Url;
+ httpModule: any;
+}
+export declare function isHttps(requestUrl: string): boolean;
+export declare class HttpClient implements ifm.IHttpClient {
+ userAgent: string;
+ handlers: ifm.IRequestHandler[];
+ requestOptions: ifm.IRequestOptions;
+ private _ignoreSslError;
+ private _socketTimeout;
+ private _httpProxy;
+ private _httpProxyBypassHosts;
+ private _allowRedirects;
+ private _maxRedirects;
+ private _allowRetries;
+ private _maxRetries;
+ private _agent;
+ private _proxyAgent;
+ private _keepAlive;
+ private _disposed;
+ private _certConfig;
+ private _ca;
+ private _cert;
+ private _key;
+ constructor(userAgent: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions);
+ options(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ get(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ del(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ post(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ patch(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ put(requestUrl: string, data: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ head(requestUrl: string, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ /**
+ * Makes a raw http request.
+ * All other methods such as get, post, patch, and request ultimately call this.
+ * Prefer get, del, post and patch
+ */
+ request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: ifm.IHeaders): Promise<ifm.IHttpClientResponse>;
+ /**
+ * Needs to be called if keepAlive is set to true in request options.
+ */
+ dispose(): void;
+ /**
+ * Raw request.
+ * @param info
+ * @param data
+ */
+ requestRaw(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream): Promise<ifm.IHttpClientResponse>;
+ /**
+ * Raw request with callback.
+ * @param info
+ * @param data
+ * @param onResult
+ */
+ requestRawWithCallback(info: ifm.IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: ifm.IHttpClientResponse) => void): void;
+ private _prepareRequest(method, requestUrl, headers);
+ private _isPresigned(requestUrl);
+ private _mergeHeaders(headers);
+ private _getAgent(requestUrl);
+ private _getProxy(requestUrl);
+ private _isBypassProxy(requestUrl);
+ private _performExponentialBackoff(retryNumber);
+}
diff --git a/node_modules/typed-rest-client/HttpClient.js b/node_modules/typed-rest-client/HttpClient.js
new file mode 100644
index 0000000..169b8f7
--- /dev/null
+++ b/node_modules/typed-rest-client/HttpClient.js
@@ -0,0 +1,455 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const url = require("url");
+const http = require("http");
+const https = require("https");
+let fs;
+let tunnel;
+var HttpCodes;
+(function (HttpCodes) {
+ HttpCodes[HttpCodes["OK"] = 200] = "OK";
+ HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
+ HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
+ HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
+ HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
+ HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
+ HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
+ HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
+ HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
+ HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
+ HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
+ HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
+ HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
+ HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
+ HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
+ HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
+ HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
+ HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
+ HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
+ HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
+ HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
+ HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
+ HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
+ HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
+ HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
+ HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
+})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
+const HttpRedirectCodes = [HttpCodes.MovedPermanently, HttpCodes.ResourceMoved, HttpCodes.SeeOther, HttpCodes.TemporaryRedirect, HttpCodes.PermanentRedirect];
+const HttpResponseRetryCodes = [HttpCodes.BadGateway, HttpCodes.ServiceUnavailable, HttpCodes.GatewayTimeout];
+const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
+const ExponentialBackoffCeiling = 10;
+const ExponentialBackoffTimeSlice = 5;
+class HttpClientResponse {
+ constructor(message) {
+ this.message = message;
+ }
+ readBody() {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ let output = '';
+ this.message.on('data', (chunk) => {
+ output += chunk;
+ });
+ this.message.on('end', () => {
+ resolve(output);
+ });
+ }));
+ }
+}
+exports.HttpClientResponse = HttpClientResponse;
+function isHttps(requestUrl) {
+ let parsedUrl = url.parse(requestUrl);
+ return parsedUrl.protocol === 'https:';
+}
+exports.isHttps = isHttps;
+var EnvironmentVariables;
+(function (EnvironmentVariables) {
+ EnvironmentVariables["HTTP_PROXY"] = "HTTP_PROXY";
+ EnvironmentVariables["HTTPS_PROXY"] = "HTTPS_PROXY";
+})(EnvironmentVariables || (EnvironmentVariables = {}));
+class HttpClient {
+ constructor(userAgent, handlers, requestOptions) {
+ this._ignoreSslError = false;
+ this._allowRedirects = true;
+ this._maxRedirects = 50;
+ this._allowRetries = false;
+ this._maxRetries = 1;
+ this._keepAlive = false;
+ this._disposed = false;
+ this.userAgent = userAgent;
+ this.handlers = handlers || [];
+ this.requestOptions = requestOptions;
+ if (requestOptions) {
+ if (requestOptions.ignoreSslError != null) {
+ this._ignoreSslError = requestOptions.ignoreSslError;
+ }
+ this._socketTimeout = requestOptions.socketTimeout;
+ this._httpProxy = requestOptions.proxy;
+ if (requestOptions.proxy && requestOptions.proxy.proxyBypassHosts) {
+ this._httpProxyBypassHosts = [];
+ requestOptions.proxy.proxyBypassHosts.forEach(bypass => {
+ this._httpProxyBypassHosts.push(new RegExp(bypass, 'i'));
+ });
+ }
+ this._certConfig = requestOptions.cert;
+ if (this._certConfig) {
+ // If using cert, need fs
+ fs = require('fs');
+ // cache the cert content into memory, so we don't have to read it from disk every time
+ if (this._certConfig.caFile && fs.existsSync(this._certConfig.caFile)) {
+ this._ca = fs.readFileSync(this._certConfig.caFile, 'utf8');
+ }
+ if (this._certConfig.certFile && fs.existsSync(this._certConfig.certFile)) {
+ this._cert = fs.readFileSync(this._certConfig.certFile, 'utf8');
+ }
+ if (this._certConfig.keyFile && fs.existsSync(this._certConfig.keyFile)) {
+ this._key = fs.readFileSync(this._certConfig.keyFile, 'utf8');
+ }
+ }
+ if (requestOptions.allowRedirects != null) {
+ this._allowRedirects = requestOptions.allowRedirects;
+ }
+ if (requestOptions.maxRedirects != null) {
+ this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
+ }
+ if (requestOptions.keepAlive != null) {
+ this._keepAlive = requestOptions.keepAlive;
+ }
+ if (requestOptions.allowRetries != null) {
+ this._allowRetries = requestOptions.allowRetries;
+ }
+ if (requestOptions.maxRetries != null) {
+ this._maxRetries = requestOptions.maxRetries;
+ }
+ }
+ }
+ options(requestUrl, additionalHeaders) {
+ return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
+ }
+ get(requestUrl, additionalHeaders) {
+ return this.request('GET', requestUrl, null, additionalHeaders || {});
+ }
+ del(requestUrl, additionalHeaders) {
+ return this.request('DELETE', requestUrl, null, additionalHeaders || {});
+ }
+ post(requestUrl, data, additionalHeaders) {
+ return this.request('POST', requestUrl, data, additionalHeaders || {});
+ }
+ patch(requestUrl, data, additionalHeaders) {
+ return this.request('PATCH', requestUrl, data, additionalHeaders || {});
+ }
+ put(requestUrl, data, additionalHeaders) {
+ return this.request('PUT', requestUrl, data, additionalHeaders || {});
+ }
+ head(requestUrl, additionalHeaders) {
+ return this.request('HEAD', requestUrl, null, additionalHeaders || {});
+ }
+ sendStream(verb, requestUrl, stream, additionalHeaders) {
+ return this.request(verb, requestUrl, stream, additionalHeaders);
+ }
+ /**
+ * Makes a raw http request.
+ * All other methods such as get, post, patch, and request ultimately call this.
+ * Prefer get, del, post and patch
+ */
+ request(verb, requestUrl, data, headers) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this._disposed) {
+ throw new Error("Client has already been disposed.");
+ }
+ let info = this._prepareRequest(verb, requestUrl, headers);
+ // Only perform retries on reads since writes may not be idempotent.
+ let maxTries = (this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1) ? this._maxRetries + 1 : 1;
+ let numTries = 0;
+ let response;
+ while (numTries < maxTries) {
+ response = yield this.requestRaw(info, data);
+ // Check if it's an authentication challenge
+ if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) {
+ let authenticationHandler;
+ for (let i = 0; i < this.handlers.length; i++) {
+ if (this.handlers[i].canHandleAuthentication(response)) {
+ authenticationHandler = this.handlers[i];
+ break;
+ }
+ }
+ if (authenticationHandler) {
+ return authenticationHandler.handleAuthentication(this, info, data);
+ }
+ else {
+ // We have received an unauthorized response but have no handlers to handle it.
+ // Let the response return to the caller.
+ return response;
+ }
+ }
+ let redirectsRemaining = this._maxRedirects;
+ while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1
+ && this._allowRedirects
+ && redirectsRemaining > 0) {
+ const redirectUrl = response.message.headers["location"];
+ if (!redirectUrl) {
+ // if there's no location to redirect to, we won't
+ break;
+ }
+ // we need to finish reading the response before reassigning response
+ // which will leak the open socket.
+ yield response.readBody();
+ // let's make the request with the new redirectUrl
+ info = this._prepareRequest(verb, redirectUrl, headers);
+ response = yield this.requestRaw(info, data);
+ redirectsRemaining--;
+ }
+ if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
+ // If not a retry code, return immediately instead of retrying
+ return response;
+ }
+ numTries += 1;
+ if (numTries < maxTries) {
+ yield response.readBody();
+ yield this._performExponentialBackoff(numTries);
+ }
+ }
+ return response;
+ });
+ }
+ /**
+ * Needs to be called if keepAlive is set to true in request options.
+ */
+ dispose() {
+ if (this._agent) {
+ this._agent.destroy();
+ }
+ this._disposed = true;
+ }
+ /**
+ * Raw request.
+ * @param info
+ * @param data
+ */
+ requestRaw(info, data) {
+ return new Promise((resolve, reject) => {
+ let callbackForResult = function (err, res) {
+ if (err) {
+ reject(err);
+ }
+ resolve(res);
+ };
+ this.requestRawWithCallback(info, data, callbackForResult);
+ });
+ }
+ /**
+ * Raw request with callback.
+ * @param info
+ * @param data
+ * @param onResult
+ */
+ requestRawWithCallback(info, data, onResult) {
+ let socket;
+ let isDataString = typeof (data) === 'string';
+ if (typeof (data) === 'string') {
+ info.options.headers["Content-Length"] = Buffer.byteLength(data, 'utf8');
+ }
+ let callbackCalled = false;
+ let handleResult = (err, res) => {
+ if (!callbackCalled) {
+ callbackCalled = true;
+ onResult(err, res);
+ }
+ };
+ let req = info.httpModule.request(info.options, (msg) => {
+ let res = new HttpClientResponse(msg);
+ handleResult(null, res);
+ });
+ req.on('socket', (sock) => {
+ socket = sock;
+ });
+ // If we ever get disconnected, we want the socket to timeout eventually
+ req.setTimeout(this._socketTimeout || 3 * 60000, () => {
+ if (socket) {
+ socket.end();
+ }
+ handleResult(new Error('Request timeout: ' + info.options.path), null);
+ });
+ req.on('error', function (err) {
+ // err has statusCode property
+ // res should have headers
+ handleResult(err, null);
+ });
+ if (data && typeof (data) === 'string') {
+ req.write(data, 'utf8');
+ }
+ if (data && typeof (data) !== 'string') {
+ data.on('close', function () {
+ req.end();
+ });
+ data.pipe(req);
+ }
+ else {
+ req.end();
+ }
+ }
+ _prepareRequest(method, requestUrl, headers) {
+ const info = {};
+ info.parsedUrl = url.parse(requestUrl);
+ const usingSsl = info.parsedUrl.protocol === 'https:';
+ info.httpModule = usingSsl ? https : http;
+ const defaultPort = usingSsl ? 443 : 80;
+ info.options = {};
+ info.options.host = info.parsedUrl.hostname;
+ info.options.port = info.parsedUrl.port ? parseInt(info.parsedUrl.port) : defaultPort;
+ info.options.path = (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
+ info.options.method = method;
+ info.options.headers = this._mergeHeaders(headers);
+ info.options.headers["user-agent"] = this.userAgent;
+ info.options.agent = this._getAgent(requestUrl);
+ // gives handlers an opportunity to participate
+ if (this.handlers && !this._isPresigned(requestUrl)) {
+ this.handlers.forEach((handler) => {
+ handler.prepareRequest(info.options);
+ });
+ }
+ return info;
+ }
+ _isPresigned(requestUrl) {
+ if (this.requestOptions && this.requestOptions.presignedUrlPatterns) {
+ const patterns = this.requestOptions.presignedUrlPatterns;
+ for (let i = 0; i < patterns.length; i++) {
+ if (requestUrl.match(patterns[i])) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ _mergeHeaders(headers) {
+ const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {});
+ if (this.requestOptions && this.requestOptions.headers) {
+ return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
+ }
+ return lowercaseKeys(headers || {});
+ }
+ _getAgent(requestUrl) {
+ let agent;
+ let proxy = this._getProxy(requestUrl);
+ let useProxy = proxy.proxyUrl && proxy.proxyUrl.hostname && !this._isBypassProxy(requestUrl);
+ if (this._keepAlive && useProxy) {
+ agent = this._proxyAgent;
+ }
+ if (this._keepAlive && !useProxy) {
+ agent = this._agent;
+ }
+ // if agent is already assigned use that agent.
+ if (!!agent) {
+ return agent;
+ }
+ let parsedUrl = url.parse(requestUrl);
+ const usingSsl = parsedUrl.protocol === 'https:';
+ let maxSockets = 100;
+ if (!!this.requestOptions) {
+ maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
+ }
+ if (useProxy) {
+ // If using proxy, need tunnel
+ if (!tunnel) {
+ tunnel = require('tunnel');
+ }
+ const agentOptions = {
+ maxSockets: maxSockets,
+ keepAlive: this._keepAlive,
+ proxy: {
+ proxyAuth: proxy.proxyAuth,
+ host: proxy.proxyUrl.hostname,
+ port: proxy.proxyUrl.port
+ },
+ };
+ let tunnelAgent;
+ const overHttps = proxy.proxyUrl.protocol === 'https:';
+ if (usingSsl) {
+ tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
+ }
+ else {
+ tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
+ }
+ agent = tunnelAgent(agentOptions);
+ this._proxyAgent = agent;
+ }
+ // if reusing agent across request and tunneling agent isn't assigned create a new agent
+ if (this._keepAlive && !agent) {
+ const options = { keepAlive: this._keepAlive, maxSockets: maxSockets };
+ agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
+ this._agent = agent;
+ }
+ // if not using private agent and tunnel agent isn't setup then use global agent
+ if (!agent) {
+ agent = usingSsl ? https.globalAgent : http.globalAgent;
+ }
+ if (usingSsl && this._ignoreSslError) {
+ // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
+ // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
+ // we have to cast it to any and change it directly
+ agent.options = Object.assign(agent.options || {}, { rejectUnauthorized: false });
+ }
+ if (usingSsl && this._certConfig) {
+ agent.options = Object.assign(agent.options || {}, { ca: this._ca, cert: this._cert, key: this._key, passphrase: this._certConfig.passphrase });
+ }
+ return agent;
+ }
+ _getProxy(requestUrl) {
+ const parsedUrl = url.parse(requestUrl);
+ let usingSsl = parsedUrl.protocol === 'https:';
+ let proxyConfig = this._httpProxy;
+ // fallback to http_proxy and https_proxy env
+ let https_proxy = process.env[EnvironmentVariables.HTTPS_PROXY];
+ let http_proxy = process.env[EnvironmentVariables.HTTP_PROXY];
+ if (!proxyConfig) {
+ if (https_proxy && usingSsl) {
+ proxyConfig = {
+ proxyUrl: https_proxy
+ };
+ }
+ else if (http_proxy) {
+ proxyConfig = {
+ proxyUrl: http_proxy
+ };
+ }
+ }
+ let proxyUrl;
+ let proxyAuth;
+ if (proxyConfig) {
+ if (proxyConfig.proxyUrl.length > 0) {
+ proxyUrl = url.parse(proxyConfig.proxyUrl);
+ }
+ if (proxyConfig.proxyUsername || proxyConfig.proxyPassword) {
+ proxyAuth = proxyConfig.proxyUsername + ":" + proxyConfig.proxyPassword;
+ }
+ }
+ return { proxyUrl: proxyUrl, proxyAuth: proxyAuth };
+ }
+ _isBypassProxy(requestUrl) {
+ if (!this._httpProxyBypassHosts) {
+ return false;
+ }
+ let bypass = false;
+ this._httpProxyBypassHosts.forEach(bypassHost => {
+ if (bypassHost.test(requestUrl)) {
+ bypass = true;
+ }
+ });
+ return bypass;
+ }
+ _performExponentialBackoff(retryNumber) {
+ retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
+ const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
+ return new Promise(resolve => setTimeout(() => resolve(), ms));
+ }
+}
+exports.HttpClient = HttpClient;
diff --git a/node_modules/typed-rest-client/Index.d.ts b/node_modules/typed-rest-client/Index.d.ts
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/node_modules/typed-rest-client/Index.d.ts
diff --git a/node_modules/typed-rest-client/Index.js b/node_modules/typed-rest-client/Index.js
new file mode 100644
index 0000000..c8ad2e5
--- /dev/null
+++ b/node_modules/typed-rest-client/Index.js
@@ -0,0 +1,2 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/node_modules/typed-rest-client/Interfaces.d.ts b/node_modules/typed-rest-client/Interfaces.d.ts
new file mode 100644
index 0000000..5900e26
--- /dev/null
+++ b/node_modules/typed-rest-client/Interfaces.d.ts
@@ -0,0 +1,62 @@
+/// <reference types="node" />
+import http = require("http");
+import url = require("url");
+export interface IHeaders {
+ [key: string]: any;
+}
+export interface IBasicCredentials {
+ username: string;
+ password: string;
+}
+export interface IHttpClient {
+ options(requestUrl: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
+ get(requestUrl: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
+ del(requestUrl: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
+ post(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
+ patch(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
+ put(requestUrl: string, data: string, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
+ sendStream(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, additionalHeaders?: IHeaders): Promise<IHttpClientResponse>;
+ request(verb: string, requestUrl: string, data: string | NodeJS.ReadableStream, headers: IHeaders): Promise<IHttpClientResponse>;
+ requestRaw(info: IRequestInfo, data: string | NodeJS.ReadableStream): Promise<IHttpClientResponse>;
+ requestRawWithCallback(info: IRequestInfo, data: string | NodeJS.ReadableStream, onResult: (err: any, res: IHttpClientResponse) => void): void;
+}
+export interface IRequestHandler {
+ prepareRequest(options: http.RequestOptions): void;
+ canHandleAuthentication(response: IHttpClientResponse): boolean;
+ handleAuthentication(httpClient: IHttpClient, requestInfo: IRequestInfo, objs: any): Promise<IHttpClientResponse>;
+}
+export interface IHttpClientResponse {
+ message: http.IncomingMessage;
+ readBody(): Promise<string>;
+}
+export interface IRequestInfo {
+ options: http.RequestOptions;
+ parsedUrl: url.Url;
+ httpModule: any;
+}
+export interface IRequestOptions {
+ headers?: IHeaders;
+ socketTimeout?: number;
+ ignoreSslError?: boolean;
+ proxy?: IProxyConfiguration;
+ cert?: ICertConfiguration;
+ allowRedirects?: boolean;
+ maxRedirects?: number;
+ maxSockets?: number;
+ keepAlive?: boolean;
+ presignedUrlPatterns?: RegExp[];
+ allowRetries?: boolean;
+ maxRetries?: number;
+}
+export interface IProxyConfiguration {
+ proxyUrl: string;
+ proxyUsername?: string;
+ proxyPassword?: string;
+ proxyBypassHosts?: string[];
+}
+export interface ICertConfiguration {
+ caFile?: string;
+ certFile?: string;
+ keyFile?: string;
+ passphrase?: string;
+}
diff --git a/node_modules/typed-rest-client/Interfaces.js b/node_modules/typed-rest-client/Interfaces.js
new file mode 100644
index 0000000..2bc6be2
--- /dev/null
+++ b/node_modules/typed-rest-client/Interfaces.js
@@ -0,0 +1,5 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+Object.defineProperty(exports, "__esModule", { value: true });
+;
diff --git a/node_modules/typed-rest-client/LICENSE b/node_modules/typed-rest-client/LICENSE
new file mode 100644
index 0000000..8cddf7e
--- /dev/null
+++ b/node_modules/typed-rest-client/LICENSE
@@ -0,0 +1,21 @@
+Typed Rest Client for Node.js
+
+Copyright (c) Microsoft Corporation
+
+All rights reserved.
+
+MIT License
+
+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.
diff --git a/node_modules/typed-rest-client/README.md b/node_modules/typed-rest-client/README.md
new file mode 100644
index 0000000..0c2b768
--- /dev/null
+++ b/node_modules/typed-rest-client/README.md
@@ -0,0 +1,100 @@
+[![Build Status](https://dev.azure.com/ms/typed-rest-client/_apis/build/status/Microsoft.typed-rest-client?branchName=master)](https://dev.azure.com/ms/typed-rest-client/_build/latest?definitionId=42&branchName=master)
+
+# Typed REST and HTTP Client with TypeScript Typings
+
+A lightweight REST and HTTP client optimized for use with TypeScript with generics and async await.
+
+## Features
+
+ - REST and HTTP client with TypeScript generics and async/await/Promises
+ - Typings included so no need to acquire separately (great for intellisense and no versioning drift)
+ - Basic, Bearer and NTLM Support out of the box. Extensible handlers for others.
+ - Proxy support
+ - Certificate support (Self-signed server and client cert)
+ - Redirects supported
+
+Intellisense and compile support:
+
+![intellisense](./docs/intellisense.png)
+
+## Install
+
+```
+npm install typed-rest-client --save
+```
+
+Or to install the latest preview:
+```
+npm install typed-rest-client@preview --save
+```
+
+## Samples
+
+See the [samples](./samples) for complete coding examples. Also see the [REST](./test/tests/resttests.ts) and [HTTP](./test/tests/httptests.ts) tests for detailed examples.
+
+## Errors
+
+### HTTP
+
+The HTTP client does not throw unless truly exceptional.
+
+* A request that successfully executes resulting in a 404, 500 etc... will return a response object with a status code and a body.
+* Redirects (3xx) will be followed by default.
+
+
+See [HTTP tests](./test/tests/httptests.ts) for detailed examples.
+
+### REST
+
+The REST client is a high-level client which uses the HTTP client. Its responsibility is to turn a body into a typed resource object.
+
+* A 200 will be success.
+* Redirects (3xx) will be followed.
+* A 404 will not throw but the result object will be null and the result statusCode will be set.
+* Other 4xx and 5xx errors will throw. The status code will be attached to the error object. If a RESTful error object is returned (`{ message: xxx}`), then the error message will be that. Otherwise, it will be a generic, `Failed Request: (xxx)`.
+
+See [REST tests](./test/tests/resttests.ts) for detailed examples.
+
+## Debugging
+
+To enable detailed console logging of all HTTP requests and responses, set the NODE_DEBUG environment varible:
+
+```
+export NODE_DEBUG=http
+```
+
+or
+
+```
+set NODE_DEBUG=http
+```
+
+
+
+## Node support
+
+The typed-rest-client is built using the latest LTS version of Node 8. We also support the latest LTS for Node 4 and Node 6.
+
+## Contributing
+
+To contribute to this repository, see the [contribution guide](./CONTRIBUTING.md)
+
+To build:
+
+```bash
+$ npm run build
+```
+
+To run all tests:
+```bash
+$ npm test
+```
+
+To just run unit tests:
+```bash
+$ npm run units
+```
+
+## Code of Conduct
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
diff --git a/node_modules/typed-rest-client/RestClient.d.ts b/node_modules/typed-rest-client/RestClient.d.ts
new file mode 100644
index 0000000..74b33cb
--- /dev/null
+++ b/node_modules/typed-rest-client/RestClient.d.ts
@@ -0,0 +1,77 @@
+/// <reference types="node" />
+import httpm = require('./HttpClient');
+import ifm = require("./Interfaces");
+export interface IRestResponse<T> {
+ statusCode: number;
+ result: T | null;
+ headers: Object;
+}
+export interface IRequestOptions {
+ acceptHeader?: string;
+ additionalHeaders?: ifm.IHeaders;
+ responseProcessor?: Function;
+ deserializeDates?: boolean;
+}
+export declare class RestClient {
+ client: httpm.HttpClient;
+ versionParam: string;
+ /**
+ * Creates an instance of the RestClient
+ * @constructor
+ * @param {string} userAgent - userAgent for requests
+ * @param {string} baseUrl - (Optional) If not specified, use full urls per request. If supplied and a function passes a relative url, it will be appended to this
+ * @param {ifm.IRequestHandler[]} handlers - handlers are typically auth handlers (basic, bearer, ntlm supplied)
+ * @param {ifm.IRequestOptions} requestOptions - options for each http requests (http proxy setting, socket timeout)
+ */
+ constructor(userAgent: string, baseUrl?: string, handlers?: ifm.IRequestHandler[], requestOptions?: ifm.IRequestOptions);
+ private _baseUrl;
+ /**
+ * Gets a resource from an endpoint
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} requestUrl - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ options<T>(requestUrl: string, options?: IRequestOptions): Promise<IRestResponse<T>>;
+ /**
+ * Gets a resource from an endpoint
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified url or relative path
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ get<T>(resource: string, options?: IRequestOptions): Promise<IRestResponse<T>>;
+ /**
+ * Deletes a resource from an endpoint
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ del<T>(resource: string, options?: IRequestOptions): Promise<IRestResponse<T>>;
+ /**
+ * Creates resource(s) from an endpoint
+ * T type of object returned.
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ create<T>(resource: string, resources: any, options?: IRequestOptions): Promise<IRestResponse<T>>;
+ /**
+ * Updates resource(s) from an endpoint
+ * T type of object returned.
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ update<T>(resource: string, resources: any, options?: IRequestOptions): Promise<IRestResponse<T>>;
+ /**
+ * Replaces resource(s) from an endpoint
+ * T type of object returned.
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ replace<T>(resource: string, resources: any, options?: IRequestOptions): Promise<IRestResponse<T>>;
+ uploadStream<T>(verb: string, requestUrl: string, stream: NodeJS.ReadableStream, options?: IRequestOptions): Promise<IRestResponse<T>>;
+ private _headersFromOptions(options, contentType?);
+ private static dateTimeDeserializer(key, value);
+ private _processResponse<T>(res, options);
+}
diff --git a/node_modules/typed-rest-client/RestClient.js b/node_modules/typed-rest-client/RestClient.js
new file mode 100644
index 0000000..1548b8f
--- /dev/null
+++ b/node_modules/typed-rest-client/RestClient.js
@@ -0,0 +1,217 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const httpm = require("./HttpClient");
+const util = require("./Util");
+class RestClient {
+ /**
+ * Creates an instance of the RestClient
+ * @constructor
+ * @param {string} userAgent - userAgent for requests
+ * @param {string} baseUrl - (Optional) If not specified, use full urls per request. If supplied and a function passes a relative url, it will be appended to this
+ * @param {ifm.IRequestHandler[]} handlers - handlers are typically auth handlers (basic, bearer, ntlm supplied)
+ * @param {ifm.IRequestOptions} requestOptions - options for each http requests (http proxy setting, socket timeout)
+ */
+ constructor(userAgent, baseUrl, handlers, requestOptions) {
+ this.client = new httpm.HttpClient(userAgent, handlers, requestOptions);
+ if (baseUrl) {
+ this._baseUrl = baseUrl;
+ }
+ }
+ /**
+ * Gets a resource from an endpoint
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} requestUrl - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ options(requestUrl, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let url = util.getUrl(requestUrl, this._baseUrl);
+ let res = yield this.client.options(url, this._headersFromOptions(options));
+ return this._processResponse(res, options);
+ });
+ }
+ /**
+ * Gets a resource from an endpoint
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified url or relative path
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ get(resource, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let url = util.getUrl(resource, this._baseUrl);
+ let res = yield this.client.get(url, this._headersFromOptions(options));
+ return this._processResponse(res, options);
+ });
+ }
+ /**
+ * Deletes a resource from an endpoint
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ del(resource, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let url = util.getUrl(resource, this._baseUrl);
+ let res = yield this.client.del(url, this._headersFromOptions(options));
+ return this._processResponse(res, options);
+ });
+ }
+ /**
+ * Creates resource(s) from an endpoint
+ * T type of object returned.
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ create(resource, resources, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let url = util.getUrl(resource, this._baseUrl);
+ let headers = this._headersFromOptions(options, true);
+ let data = JSON.stringify(resources, null, 2);
+ let res = yield this.client.post(url, data, headers);
+ return this._processResponse(res, options);
+ });
+ }
+ /**
+ * Updates resource(s) from an endpoint
+ * T type of object returned.
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ update(resource, resources, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let url = util.getUrl(resource, this._baseUrl);
+ let headers = this._headersFromOptions(options, true);
+ let data = JSON.stringify(resources, null, 2);
+ let res = yield this.client.patch(url, data, headers);
+ return this._processResponse(res, options);
+ });
+ }
+ /**
+ * Replaces resource(s) from an endpoint
+ * T type of object returned.
+ * Be aware that not found returns a null. Other error conditions reject the promise
+ * @param {string} resource - fully qualified or relative url
+ * @param {IRequestOptions} requestOptions - (optional) requestOptions object
+ */
+ replace(resource, resources, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let url = util.getUrl(resource, this._baseUrl);
+ let headers = this._headersFromOptions(options, true);
+ let data = JSON.stringify(resources, null, 2);
+ let res = yield this.client.put(url, data, headers);
+ return this._processResponse(res, options);
+ });
+ }
+ uploadStream(verb, requestUrl, stream, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ let url = util.getUrl(requestUrl, this._baseUrl);
+ let headers = this._headersFromOptions(options, true);
+ let res = yield this.client.sendStream(verb, url, stream, headers);
+ return this._processResponse(res, options);
+ });
+ }
+ _headersFromOptions(options, contentType) {
+ options = options || {};
+ let headers = options.additionalHeaders || {};
+ headers["Accept"] = options.acceptHeader || "application/json";
+ if (contentType) {
+ let found = false;
+ for (let header in headers) {
+ if (header.toLowerCase() == "content-type") {
+ found = true;
+ }
+ }
+ if (!found) {
+ headers["Content-Type"] = 'application/json; charset=utf-8';
+ }
+ }
+ return headers;
+ }
+ static dateTimeDeserializer(key, value) {
+ if (typeof value === 'string') {
+ let a = new Date(value);
+ if (!isNaN(a.valueOf())) {
+ return a;
+ }
+ }
+ return value;
+ }
+ _processResponse(res, options) {
+ return __awaiter(this, void 0, void 0, function* () {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ const statusCode = res.message.statusCode;
+ const response = {
+ statusCode: statusCode,
+ result: null,
+ headers: {}
+ };
+ // not found leads to null obj returned
+ if (statusCode == httpm.HttpCodes.NotFound) {
+ resolve(response);
+ }
+ let obj;
+ let contents;
+ // get the result from the body
+ try {
+ contents = yield res.readBody();
+ if (contents && contents.length > 0) {
+ if (options && options.deserializeDates) {
+ obj = JSON.parse(contents, RestClient.dateTimeDeserializer);
+ }
+ else {
+ obj = JSON.parse(contents);
+ }
+ if (options && options.responseProcessor) {
+ response.result = options.responseProcessor(obj);
+ }
+ else {
+ response.result = obj;
+ }
+ }
+ response.headers = res.message.headers;
+ }
+ catch (err) {
+ // Invalid resource (contents not json); leaving result obj null
+ }
+ // note that 3xx redirects are handled by the http layer.
+ if (statusCode > 299) {
+ let msg;
+ // if exception/error in body, attempt to get better error
+ if (obj && obj.message) {
+ msg = obj.message;
+ }
+ else if (contents && contents.length > 0) {
+ // it may be the case that the exception is in the body message as string
+ msg = contents;
+ }
+ else {
+ msg = "Failed request: (" + statusCode + ")";
+ }
+ let err = new Error(msg);
+ // attach statusCode and body obj (if available) to the error object
+ err['statusCode'] = statusCode;
+ if (response.result) {
+ err['result'] = response.result;
+ }
+ reject(err);
+ }
+ else {
+ resolve(response);
+ }
+ }));
+ });
+ }
+}
+exports.RestClient = RestClient;
diff --git a/node_modules/typed-rest-client/ThirdPartyNotice.txt b/node_modules/typed-rest-client/ThirdPartyNotice.txt
new file mode 100644
index 0000000..7bd6774
--- /dev/null
+++ b/node_modules/typed-rest-client/ThirdPartyNotice.txt
@@ -0,0 +1,1318 @@
+
+THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
+Do Not Translate or Localize
+
+This Visual Studio Team Services extension (vsts-task-lib) is based on or incorporates material from the projects listed below (Third Party IP). The original copyright notice and the license under which Microsoft received such Third Party IP, are set forth below. Such licenses and notices are provided for informational purposes only. Microsoft licenses the Third Party IP to you under the licensing terms for the Visual Studio Team Services extension. Microsoft reserves all other rights not expressly granted under this agreement, whether by implication, estoppel or otherwise.
+
+1. @types/glob (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
+2. @types/minimatch (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
+3. @types/mocha (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
+4. @types/node (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
+5. @types/shelljs (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git)
+6. balanced-match (git://github.com/juliangruber/balanced-match.git)
+7. brace-expansion (git://github.com/juliangruber/brace-expansion.git)
+8. browser-stdout (git+ssh://git@github.com/kumavis/browser-stdout.git)
+9. commander (git+https://github.com/tj/commander.js.git)
+10. concat-map (git://github.com/substack/node-concat-map.git)
+11. debug (git://github.com/visionmedia/debug.git)
+12. diff (git://github.com/kpdecker/jsdiff.git)
+13. escape-string-regexp (git+https://github.com/sindresorhus/escape-string-regexp.git)
+14. fs.realpath (git+https://github.com/isaacs/fs.realpath.git)
+15. glob (git://github.com/isaacs/node-glob.git)
+16. graceful-readlink (git://github.com/zhiyelee/graceful-readlink.git)
+17. growl (git://github.com/tj/node-growl.git)
+18. has-flag (git+https://github.com/sindresorhus/has-flag.git)
+19. he (git+https://github.com/mathiasbynens/he.git)
+20. inflight (git+https://github.com/npm/inflight.git)
+21. inherits (git://github.com/isaacs/inherits.git)
+22. interpret (git://github.com/tkellen/node-interpret.git)
+23. json3 (git://github.com/bestiejs/json3.git)
+24. lodash.create (git+https://github.com/lodash/lodash.git)
+25. lodash.isarguments (git+https://github.com/lodash/lodash.git)
+26. lodash.isarray (git+https://github.com/lodash/lodash.git)
+27. lodash.keys (git+https://github.com/lodash/lodash.git)
+28. lodash._baseassign (git+https://github.com/lodash/lodash.git)
+29. lodash._basecopy (git+https://github.com/lodash/lodash.git)
+30. lodash._basecreate (git+https://github.com/lodash/lodash.git)
+31. lodash._getnative (git+https://github.com/lodash/lodash.git)
+32. lodash._isiterateecall (git+https://github.com/lodash/lodash.git)
+33. minimatch (git://github.com/isaacs/minimatch.git)
+34. minimist (git://github.com/substack/minimist.git)
+35. mkdirp (git+https://github.com/substack/node-mkdirp.git)
+36. mocha (git+https://github.com/mochajs/mocha.git)
+37. ms (git+https://github.com/zeit/ms.git)
+38. once (git://github.com/isaacs/once.git)
+39. path-is-absolute (git+https://github.com/sindresorhus/path-is-absolute.git)
+40. path-parse (git+https://github.com/jbgutierrez/path-parse.git)
+41. rechoir (git://github.com/tkellen/node-rechoir.git)
+42. resolve (git://github.com/substack/node-resolve.git)
+43. semver (git://github.com/npm/node-semver.git)
+44. shelljs (git://github.com/shelljs/shelljs.git)
+45. supports-color (git+https://github.com/chalk/supports-color.git)
+46. tunnel (git+https://github.com/koichik/node-tunnel.git)
+47. typescript (git+https://github.com/Microsoft/TypeScript.git)
+48. underscore (git://github.com/jashkenas/underscore.git)
+49. wrappy (git+https://github.com/npm/wrappy.git)
+
+
+%% @types/glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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
+=========================================
+END OF @types/glob NOTICES, INFORMATION, AND LICENSE
+
+%% @types/minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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
+=========================================
+END OF @types/minimatch NOTICES, INFORMATION, AND LICENSE
+
+%% @types/mocha NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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
+=========================================
+END OF @types/mocha NOTICES, INFORMATION, AND LICENSE
+
+%% @types/node NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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
+=========================================
+END OF @types/node NOTICES, INFORMATION, AND LICENSE
+
+%% @types/shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+MIT License
+
+ Copyright (c) Microsoft Corporation. All rights reserved.
+
+ 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
+=========================================
+END OF @types/shelljs NOTICES, INFORMATION, AND LICENSE
+
+%% balanced-match NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+(MIT)
+
+Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
+
+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.
+=========================================
+END OF balanced-match NOTICES, INFORMATION, AND LICENSE
+
+%% brace-expansion NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+No license text available.
+=========================================
+END OF brace-expansion NOTICES, INFORMATION, AND LICENSE
+
+%% browser-stdout NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+No license text available.
+=========================================
+END OF browser-stdout NOTICES, INFORMATION, AND LICENSE
+
+%% commander NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+(The MIT License)
+
+Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
+
+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.
+=========================================
+END OF commander NOTICES, INFORMATION, AND LICENSE
+
+%% concat-map NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+This software is released under the MIT license:
+
+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.
+=========================================
+END OF concat-map NOTICES, INFORMATION, AND LICENSE
+
+%% debug NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+(The MIT License)
+
+Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
+
+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.
+=========================================
+END OF debug NOTICES, INFORMATION, AND LICENSE
+
+%% diff NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Software License Agreement (BSD License)
+
+Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
+
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the
+ following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+* Neither the name of Kevin Decker nor the names of its
+ contributors may be used to endorse or promote products
+ derived from this software without specific prior
+ written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+=========================================
+END OF diff NOTICES, INFORMATION, AND LICENSE
+
+%% escape-string-regexp NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+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.
+=========================================
+END OF escape-string-regexp NOTICES, INFORMATION, AND LICENSE
+
+%% fs.realpath NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+----
+
+This library bundles a version of the `fs.realpath` and `fs.realpathSync`
+methods from Node.js v0.10 under the terms of the Node.js MIT license.
+
+Node's license follows, also included at the header of `old.js` which contains
+the licensed code:
+
+ Copyright Joyent, Inc. and other Node contributors.
+
+ 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.
+=========================================
+END OF fs.realpath NOTICES, INFORMATION, AND LICENSE
+
+%% glob NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+=========================================
+END OF glob NOTICES, INFORMATION, AND LICENSE
+
+%% graceful-readlink NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+Copyright (c) 2015 Zhiye Li
+
+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.
+=========================================
+END OF graceful-readlink NOTICES, INFORMATION, AND LICENSE
+
+%% growl NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+No license text available.
+=========================================
+END OF growl NOTICES, INFORMATION, AND LICENSE
+
+%% has-flag NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+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.
+=========================================
+END OF has-flag NOTICES, INFORMATION, AND LICENSE
+
+%% he NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright Mathias Bynens <https://mathiasbynens.be/>
+
+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.
+=========================================
+END OF he NOTICES, INFORMATION, AND LICENSE
+
+%% inflight NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+=========================================
+END OF inflight NOTICES, INFORMATION, AND LICENSE
+
+%% inherits NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+=========================================
+END OF inherits NOTICES, INFORMATION, AND LICENSE
+
+%% interpret NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright (c) 2014 Tyler Kellen
+
+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.
+=========================================
+END OF interpret NOTICES, INFORMATION, AND LICENSE
+
+%% json3 NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright (c) 2012-2014 Kit Cambridge.
+http://kitcambridge.be/
+
+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.
+=========================================
+END OF json3 NOTICES, INFORMATION, AND LICENSE
+
+%% lodash.create NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash.create NOTICES, INFORMATION, AND LICENSE
+
+%% lodash.isarguments NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright jQuery Foundation and other contributors <https://jquery.org/>
+
+Based on Underscore.js, copyright Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+This software consists of voluntary contributions made by many
+individuals. For exact contribution history, see the revision history
+available at https://github.com/lodash/lodash
+
+The following license applies to all parts of this software except as
+documented below:
+
+====
+
+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.
+
+====
+
+Copyright and related rights for sample code are waived via CC0. Sample
+code is defined as all source code displayed within the prose of the
+documentation.
+
+CC0: http://creativecommons.org/publicdomain/zero/1.0/
+
+====
+
+Files located in the node_modules and vendor directories are externally
+maintained libraries used by this software which have their own
+licenses; we recommend you read them, as their terms may differ from the
+terms above.
+=========================================
+END OF lodash.isarguments NOTICES, INFORMATION, AND LICENSE
+
+%% lodash.isarray NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash.isarray NOTICES, INFORMATION, AND LICENSE
+
+%% lodash.keys NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash.keys NOTICES, INFORMATION, AND LICENSE
+
+%% lodash._baseassign NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash._baseassign NOTICES, INFORMATION, AND LICENSE
+
+%% lodash._basecopy NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash._basecopy NOTICES, INFORMATION, AND LICENSE
+
+%% lodash._basecreate NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash._basecreate NOTICES, INFORMATION, AND LICENSE
+
+%% lodash._getnative NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash._getnative NOTICES, INFORMATION, AND LICENSE
+
+%% lodash._isiterateecall NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
+Based on Underscore.js, copyright 2009-2015 Jeremy Ashkenas,
+DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
+
+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.
+=========================================
+END OF lodash._isiterateecall NOTICES, INFORMATION, AND LICENSE
+
+%% minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+=========================================
+END OF minimatch NOTICES, INFORMATION, AND LICENSE
+
+%% minimist NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+This software is released under the MIT license:
+
+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.
+=========================================
+END OF minimist NOTICES, INFORMATION, AND LICENSE
+
+%% mkdirp NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright 2010 James Halliday (mail@substack.net)
+
+This project is free software released under the MIT/X11 license:
+
+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.
+=========================================
+END OF mkdirp NOTICES, INFORMATION, AND LICENSE
+
+%% mocha NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+(The MIT License)
+
+Copyright (c) 2011-2017 JS Foundation and contributors, https://js.foundation
+
+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.
+=========================================
+END OF mocha NOTICES, INFORMATION, AND LICENSE
+
+%% ms NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+Copyright (c) 2016 Zeit, Inc.
+
+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.
+=========================================
+END OF ms NOTICES, INFORMATION, AND LICENSE
+
+%% once NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+=========================================
+END OF once NOTICES, INFORMATION, AND LICENSE
+
+%% path-is-absolute NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+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.
+=========================================
+END OF path-is-absolute NOTICES, INFORMATION, AND LICENSE
+
+%% path-parse NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+No license text available.
+=========================================
+END OF path-parse NOTICES, INFORMATION, AND LICENSE
+
+%% rechoir NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright (c) 2015 Tyler Kellen
+
+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.
+=========================================
+END OF rechoir NOTICES, INFORMATION, AND LICENSE
+
+%% resolve NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+This software is released under the MIT license:
+
+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.
+=========================================
+END OF resolve NOTICES, INFORMATION, AND LICENSE
+
+%% semver NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright (c) Isaac Z. Schlueter ("Author")
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+=========================================
+END OF semver NOTICES, INFORMATION, AND LICENSE
+
+%% shelljs NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright (c) 2012, Artur Adib <arturadib@gmail.com>
+All rights reserved.
+
+You may use this project under the terms of the New BSD license as follows:
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Artur Adib nor the
+ names of the contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+=========================================
+END OF shelljs NOTICES, INFORMATION, AND LICENSE
+
+%% supports-color NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+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.
+=========================================
+END OF supports-color NOTICES, INFORMATION, AND LICENSE
+
+%% tunnel NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The MIT License (MIT)
+
+Copyright (c) 2012 Koichi Kobayashi
+
+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.
+=========================================
+END OF tunnel NOTICES, INFORMATION, AND LICENSE
+
+%% typescript NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+=========================================
+END OF typescript NOTICES, INFORMATION, AND LICENSE
+
+%% underscore NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+Copyright (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative
+Reporters & Editors
+
+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.
+=========================================
+END OF underscore NOTICES, INFORMATION, AND LICENSE
+
+%% wrappy NOTICES, INFORMATION, AND LICENSE BEGIN HERE
+=========================================
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+=========================================
+END OF wrappy NOTICES, INFORMATION, AND LICENSE
+
diff --git a/node_modules/typed-rest-client/Util.d.ts b/node_modules/typed-rest-client/Util.d.ts
new file mode 100644
index 0000000..32757e8
--- /dev/null
+++ b/node_modules/typed-rest-client/Util.d.ts
@@ -0,0 +1,7 @@
+/**
+ * creates an url from a request url and optional base url (http://server:8080)
+ * @param {string} resource - a fully qualified url or relative path
+ * @param {string} baseUrl - an optional baseUrl (http://server:8080)
+ * @return {string} - resultant url
+ */
+export declare function getUrl(resource: string, baseUrl?: string): string;
diff --git a/node_modules/typed-rest-client/Util.js b/node_modules/typed-rest-client/Util.js
new file mode 100644
index 0000000..32981d1
--- /dev/null
+++ b/node_modules/typed-rest-client/Util.js
@@ -0,0 +1,35 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+Object.defineProperty(exports, "__esModule", { value: true });
+const url = require("url");
+const path = require("path");
+/**
+ * creates an url from a request url and optional base url (http://server:8080)
+ * @param {string} resource - a fully qualified url or relative path
+ * @param {string} baseUrl - an optional baseUrl (http://server:8080)
+ * @return {string} - resultant url
+ */
+function getUrl(resource, baseUrl) {
+ const pathApi = path.posix || path;
+ if (!baseUrl) {
+ return resource;
+ }
+ else if (!resource) {
+ return baseUrl;
+ }
+ else {
+ const base = url.parse(baseUrl);
+ const resultantUrl = url.parse(resource);
+ // resource (specific per request) elements take priority
+ resultantUrl.protocol = resultantUrl.protocol || base.protocol;
+ resultantUrl.auth = resultantUrl.auth || base.auth;
+ resultantUrl.host = resultantUrl.host || base.host;
+ resultantUrl.pathname = pathApi.resolve(base.pathname, resultantUrl.pathname);
+ if (!resultantUrl.pathname.endsWith('/') && resource.endsWith('/')) {
+ resultantUrl.pathname += '/';
+ }
+ return url.format(resultantUrl);
+ }
+}
+exports.getUrl = getUrl;
diff --git a/node_modules/typed-rest-client/handlers/basiccreds.d.ts b/node_modules/typed-rest-client/handlers/basiccreds.d.ts
new file mode 100644
index 0000000..17ade55
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/basiccreds.d.ts
@@ -0,0 +1,9 @@
+import ifm = require('../Interfaces');
+export declare class BasicCredentialHandler implements ifm.IRequestHandler {
+ username: string;
+ password: string;
+ constructor(username: string, password: string);
+ prepareRequest(options: any): void;
+ canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
+ handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
+}
diff --git a/node_modules/typed-rest-client/handlers/basiccreds.js b/node_modules/typed-rest-client/handlers/basiccreds.js
new file mode 100644
index 0000000..384a39c
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/basiccreds.js
@@ -0,0 +1,24 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+Object.defineProperty(exports, "__esModule", { value: true });
+class BasicCredentialHandler {
+ constructor(username, password) {
+ this.username = username;
+ this.password = password;
+ }
+ // currently implements pre-authorization
+ // TODO: support preAuth = false where it hooks on 401
+ prepareRequest(options) {
+ options.headers['Authorization'] = 'Basic ' + new Buffer(this.username + ':' + this.password).toString('base64');
+ options.headers['X-TFS-FedAuthRedirect'] = 'Suppress';
+ }
+ // This handler cannot handle 401
+ canHandleAuthentication(response) {
+ return false;
+ }
+ handleAuthentication(httpClient, requestInfo, objs) {
+ return null;
+ }
+}
+exports.BasicCredentialHandler = BasicCredentialHandler;
diff --git a/node_modules/typed-rest-client/handlers/bearertoken.d.ts b/node_modules/typed-rest-client/handlers/bearertoken.d.ts
new file mode 100644
index 0000000..c08496f
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/bearertoken.d.ts
@@ -0,0 +1,8 @@
+import ifm = require('../Interfaces');
+export declare class BearerCredentialHandler implements ifm.IRequestHandler {
+ token: string;
+ constructor(token: string);
+ prepareRequest(options: any): void;
+ canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
+ handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
+}
diff --git a/node_modules/typed-rest-client/handlers/bearertoken.js b/node_modules/typed-rest-client/handlers/bearertoken.js
new file mode 100644
index 0000000..dad27a7
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/bearertoken.js
@@ -0,0 +1,23 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+Object.defineProperty(exports, "__esModule", { value: true });
+class BearerCredentialHandler {
+ constructor(token) {
+ this.token = token;
+ }
+ // currently implements pre-authorization
+ // TODO: support preAuth = false where it hooks on 401
+ prepareRequest(options) {
+ options.headers['Authorization'] = 'Bearer ' + this.token;
+ options.headers['X-TFS-FedAuthRedirect'] = 'Suppress';
+ }
+ // This handler cannot handle 401
+ canHandleAuthentication(response) {
+ return false;
+ }
+ handleAuthentication(httpClient, requestInfo, objs) {
+ return null;
+ }
+}
+exports.BearerCredentialHandler = BearerCredentialHandler;
diff --git a/node_modules/typed-rest-client/handlers/ntlm.d.ts b/node_modules/typed-rest-client/handlers/ntlm.d.ts
new file mode 100644
index 0000000..2f509b0
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/ntlm.d.ts
@@ -0,0 +1,13 @@
+/// <reference types="node" />
+import ifm = require('../Interfaces');
+import http = require("http");
+export declare class NtlmCredentialHandler implements ifm.IRequestHandler {
+ private _ntlmOptions;
+ constructor(username: string, password: string, workstation?: string, domain?: string);
+ prepareRequest(options: http.RequestOptions): void;
+ canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
+ handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
+ private handleAuthenticationPrivate(httpClient, requestInfo, objs, finalCallback);
+ private sendType1Message(httpClient, requestInfo, objs, finalCallback);
+ private sendType3Message(httpClient, requestInfo, objs, res, callback);
+}
diff --git a/node_modules/typed-rest-client/handlers/ntlm.js b/node_modules/typed-rest-client/handlers/ntlm.js
new file mode 100644
index 0000000..5fbca82
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/ntlm.js
@@ -0,0 +1,137 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+Object.defineProperty(exports, "__esModule", { value: true });
+const http = require("http");
+const https = require("https");
+const _ = require("underscore");
+const ntlm = require("../opensource/node-http-ntlm/ntlm");
+class NtlmCredentialHandler {
+ constructor(username, password, workstation, domain) {
+ this._ntlmOptions = {};
+ this._ntlmOptions.username = username;
+ this._ntlmOptions.password = password;
+ if (domain !== undefined) {
+ this._ntlmOptions.domain = domain;
+ }
+ else {
+ this._ntlmOptions.domain = '';
+ }
+ if (workstation !== undefined) {
+ this._ntlmOptions.workstation = workstation;
+ }
+ else {
+ this._ntlmOptions.workstation = '';
+ }
+ }
+ prepareRequest(options) {
+ // No headers or options need to be set. We keep the credentials on the handler itself.
+ // If a (proxy) agent is set, remove it as we don't support proxy for NTLM at this time
+ if (options.agent) {
+ delete options.agent;
+ }
+ }
+ canHandleAuthentication(response) {
+ if (response && response.message && response.message.statusCode === 401) {
+ // Ensure that we're talking NTLM here
+ // Once we have the www-authenticate header, split it so we can ensure we can talk NTLM
+ const wwwAuthenticate = response.message.headers['www-authenticate'];
+ if (wwwAuthenticate) {
+ const mechanisms = wwwAuthenticate.split(', ');
+ const index = mechanisms.indexOf("NTLM");
+ if (index >= 0) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ handleAuthentication(httpClient, requestInfo, objs) {
+ return new Promise((resolve, reject) => {
+ const callbackForResult = function (err, res) {
+ if (err) {
+ reject(err);
+ }
+ // We have to readbody on the response before continuing otherwise there is a hang.
+ res.readBody().then(() => {
+ resolve(res);
+ });
+ };
+ this.handleAuthenticationPrivate(httpClient, requestInfo, objs, callbackForResult);
+ });
+ }
+ handleAuthenticationPrivate(httpClient, requestInfo, objs, finalCallback) {
+ // Set up the headers for NTLM authentication
+ requestInfo.options = _.extend(requestInfo.options, {
+ username: this._ntlmOptions.username,
+ password: this._ntlmOptions.password,
+ domain: this._ntlmOptions.domain,
+ workstation: this._ntlmOptions.workstation
+ });
+ if (httpClient.isSsl === true) {
+ requestInfo.options.agent = new https.Agent({ keepAlive: true });
+ }
+ else {
+ requestInfo.options.agent = new http.Agent({ keepAlive: true });
+ }
+ let self = this;
+ // The following pattern of sending the type1 message following immediately (in a setImmediate) is
+ // critical for the NTLM exchange to happen. If we removed setImmediate (or call in a different manner)
+ // the NTLM exchange will always fail with a 401.
+ this.sendType1Message(httpClient, requestInfo, objs, function (err, res) {
+ if (err) {
+ return finalCallback(err, null, null);
+ }
+ /// We have to readbody on the response before continuing otherwise there is a hang.
+ res.readBody().then(() => {
+ // It is critical that we have setImmediate here due to how connection requests are queued.
+ // If setImmediate is removed then the NTLM handshake will not work.
+ // setImmediate allows us to queue a second request on the same connection. If this second
+ // request is not queued on the connection when the first request finishes then node closes
+ // the connection. NTLM requires both requests to be on the same connection so we need this.
+ setImmediate(function () {
+ self.sendType3Message(httpClient, requestInfo, objs, res, finalCallback);
+ });
+ });
+ });
+ }
+ // The following method is an adaptation of code found at https://github.com/SamDecrock/node-http-ntlm/blob/master/httpntlm.js
+ sendType1Message(httpClient, requestInfo, objs, finalCallback) {
+ const type1msg = ntlm.createType1Message(this._ntlmOptions);
+ const type1options = {
+ headers: {
+ 'Connection': 'keep-alive',
+ 'Authorization': type1msg
+ },
+ timeout: requestInfo.options.timeout || 0,
+ agent: requestInfo.httpModule,
+ };
+ const type1info = {};
+ type1info.httpModule = requestInfo.httpModule;
+ type1info.parsedUrl = requestInfo.parsedUrl;
+ type1info.options = _.extend(type1options, _.omit(requestInfo.options, 'headers'));
+ return httpClient.requestRawWithCallback(type1info, objs, finalCallback);
+ }
+ // The following method is an adaptation of code found at https://github.com/SamDecrock/node-http-ntlm/blob/master/httpntlm.js
+ sendType3Message(httpClient, requestInfo, objs, res, callback) {
+ if (!res.message.headers && !res.message.headers['www-authenticate']) {
+ throw new Error('www-authenticate not found on response of second request');
+ }
+ const type2msg = ntlm.parseType2Message(res.message.headers['www-authenticate']);
+ const type3msg = ntlm.createType3Message(type2msg, this._ntlmOptions);
+ const type3options = {
+ headers: {
+ 'Authorization': type3msg,
+ 'Connection': 'Close'
+ },
+ agent: requestInfo.httpModule,
+ };
+ const type3info = {};
+ type3info.httpModule = requestInfo.httpModule;
+ type3info.parsedUrl = requestInfo.parsedUrl;
+ type3options.headers = _.extend(type3options.headers, requestInfo.options.headers);
+ type3info.options = _.extend(type3options, _.omit(requestInfo.options, 'headers'));
+ return httpClient.requestRawWithCallback(type3info, objs, callback);
+ }
+}
+exports.NtlmCredentialHandler = NtlmCredentialHandler;
diff --git a/node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts b/node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts
new file mode 100644
index 0000000..4bb77fd
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/personalaccesstoken.d.ts
@@ -0,0 +1,8 @@
+import ifm = require('../Interfaces');
+export declare class PersonalAccessTokenCredentialHandler implements ifm.IRequestHandler {
+ token: string;
+ constructor(token: string);
+ prepareRequest(options: any): void;
+ canHandleAuthentication(response: ifm.IHttpClientResponse): boolean;
+ handleAuthentication(httpClient: ifm.IHttpClient, requestInfo: ifm.IRequestInfo, objs: any): Promise<ifm.IHttpClientResponse>;
+}
diff --git a/node_modules/typed-rest-client/handlers/personalaccesstoken.js b/node_modules/typed-rest-client/handlers/personalaccesstoken.js
new file mode 100644
index 0000000..4bb88f8
--- /dev/null
+++ b/node_modules/typed-rest-client/handlers/personalaccesstoken.js
@@ -0,0 +1,23 @@
+"use strict";
+// Copyright (c) Microsoft. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+Object.defineProperty(exports, "__esModule", { value: true });
+class PersonalAccessTokenCredentialHandler {
+ constructor(token) {
+ this.token = token;
+ }
+ // currently implements pre-authorization
+ // TODO: support preAuth = false where it hooks on 401
+ prepareRequest(options) {
+ options.headers['Authorization'] = 'Basic ' + new Buffer('PAT:' + this.token).toString('base64');
+ options.headers['X-TFS-FedAuthRedirect'] = 'Suppress';
+ }
+ // This handler cannot handle 401
+ canHandleAuthentication(response) {
+ return false;
+ }
+ handleAuthentication(httpClient, requestInfo, objs) {
+ return null;
+ }
+}
+exports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;
diff --git a/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js b/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js
new file mode 100644
index 0000000..adf7602
--- /dev/null
+++ b/node_modules/typed-rest-client/opensource/node-http-ntlm/ntlm.js
@@ -0,0 +1,389 @@
+var crypto = require('crypto');
+
+var flags = {
+ NTLM_NegotiateUnicode : 0x00000001,
+ NTLM_NegotiateOEM : 0x00000002,
+ NTLM_RequestTarget : 0x00000004,
+ NTLM_Unknown9 : 0x00000008,
+ NTLM_NegotiateSign : 0x00000010,
+ NTLM_NegotiateSeal : 0x00000020,
+ NTLM_NegotiateDatagram : 0x00000040,
+ NTLM_NegotiateLanManagerKey : 0x00000080,
+ NTLM_Unknown8 : 0x00000100,
+ NTLM_NegotiateNTLM : 0x00000200,
+ NTLM_NegotiateNTOnly : 0x00000400,
+ NTLM_Anonymous : 0x00000800,
+ NTLM_NegotiateOemDomainSupplied : 0x00001000,
+ NTLM_NegotiateOemWorkstationSupplied : 0x00002000,
+ NTLM_Unknown6 : 0x00004000,
+ NTLM_NegotiateAlwaysSign : 0x00008000,
+ NTLM_TargetTypeDomain : 0x00010000,
+ NTLM_TargetTypeServer : 0x00020000,
+ NTLM_TargetTypeShare : 0x00040000,
+ NTLM_NegotiateExtendedSecurity : 0x00080000,
+ NTLM_NegotiateIdentify : 0x00100000,
+ NTLM_Unknown5 : 0x00200000,
+ NTLM_RequestNonNTSessionKey : 0x00400000,
+ NTLM_NegotiateTargetInfo : 0x00800000,
+ NTLM_Unknown4 : 0x01000000,
+ NTLM_NegotiateVersion : 0x02000000,
+ NTLM_Unknown3 : 0x04000000,
+ NTLM_Unknown2 : 0x08000000,
+ NTLM_Unknown1 : 0x10000000,
+ NTLM_Negotiate128 : 0x20000000,
+ NTLM_NegotiateKeyExchange : 0x40000000,
+ NTLM_Negotiate56 : 0x80000000
+};
+var typeflags = {
+ NTLM_TYPE1_FLAGS : flags.NTLM_NegotiateUnicode
+ + flags.NTLM_NegotiateOEM
+ + flags.NTLM_RequestTarget
+ + flags.NTLM_NegotiateNTLM
+ + flags.NTLM_NegotiateOemDomainSupplied
+ + flags.NTLM_NegotiateOemWorkstationSupplied
+ + flags.NTLM_NegotiateAlwaysSign
+ + flags.NTLM_NegotiateExtendedSecurity
+ + flags.NTLM_NegotiateVersion
+ + flags.NTLM_Negotiate128
+ + flags.NTLM_Negotiate56,
+
+ NTLM_TYPE2_FLAGS : flags.NTLM_NegotiateUnicode
+ + flags.NTLM_RequestTarget
+ + flags.NTLM_NegotiateNTLM
+ + flags.NTLM_NegotiateAlwaysSign
+ + flags.NTLM_NegotiateExtendedSecurity
+ + flags.NTLM_NegotiateTargetInfo
+ + flags.NTLM_NegotiateVersion
+ + flags.NTLM_Negotiate128
+ + flags.NTLM_Negotiate56
+};
+
+function createType1Message(options){
+ var domain = escape(options.domain.toUpperCase());
+ var workstation = escape(options.workstation.toUpperCase());
+ var protocol = 'NTLMSSP\0';
+
+ var BODY_LENGTH = 40;
+
+ var type1flags = typeflags.NTLM_TYPE1_FLAGS;
+ if(!domain || domain === '')
+ type1flags = type1flags - flags.NTLM_NegotiateOemDomainSupplied;
+
+ var pos = 0;
+ var buf = new Buffer(BODY_LENGTH + domain.length + workstation.length);
+
+
+ buf.write(protocol, pos, protocol.length); pos += protocol.length; // protocol
+ buf.writeUInt32LE(1, pos); pos += 4; // type 1
+ buf.writeUInt32LE(type1flags, pos); pos += 4; // TYPE1 flag
+
+ buf.writeUInt16LE(domain.length, pos); pos += 2; // domain length
+ buf.writeUInt16LE(domain.length, pos); pos += 2; // domain max length
+ buf.writeUInt32LE(BODY_LENGTH + workstation.length, pos); pos += 4; // domain buffer offset
+
+ buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation length
+ buf.writeUInt16LE(workstation.length, pos); pos += 2; // workstation max length
+ buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // workstation buffer offset
+
+ buf.writeUInt8(5, pos); pos += 1; //ProductMajorVersion
+ buf.writeUInt8(1, pos); pos += 1; //ProductMinorVersion
+ buf.writeUInt16LE(2600, pos); pos += 2; //ProductBuild
+
+ buf.writeUInt8(0 , pos); pos += 1; //VersionReserved1
+ buf.writeUInt8(0 , pos); pos += 1; //VersionReserved2
+ buf.writeUInt8(0 , pos); pos += 1; //VersionReserved3
+ buf.writeUInt8(15, pos); pos += 1; //NTLMRevisionCurrent
+
+ buf.write(workstation, pos, workstation.length, 'ascii'); pos += workstation.length; // workstation string
+ buf.write(domain , pos, domain.length , 'ascii'); pos += domain.length;
+
+ return 'NTLM ' + buf.toString('base64');
+}
+
+function parseType2Message(rawmsg, callback){
+ var match = rawmsg.match(/NTLM (.+)?/);
+ if(!match || !match[1])
+ return callback(new Error("Couldn't find NTLM in the message type2 comming from the server"));
+
+ var buf = new Buffer(match[1], 'base64');
+
+ var msg = {};
+
+ msg.signature = buf.slice(0, 8);
+ msg.type = buf.readInt16LE(8);
+
+ if(msg.type != 2)
+ return callback(new Error("Server didn't return a type 2 message"));
+
+ msg.targetNameLen = buf.readInt16LE(12);
+ msg.targetNameMaxLen = buf.readInt16LE(14);
+ msg.targetNameOffset = buf.readInt32LE(16);
+ msg.targetName = buf.slice(msg.targetNameOffset, msg.targetNameOffset + msg.targetNameMaxLen);
+
+ msg.negotiateFlags = buf.readInt32LE(20);
+ msg.serverChallenge = buf.slice(24, 32);
+ msg.reserved = buf.slice(32, 40);
+
+ if(msg.negotiateFlags & flags.NTLM_NegotiateTargetInfo){
+ msg.targetInfoLen = buf.readInt16LE(40);
+ msg.targetInfoMaxLen = buf.readInt16LE(42);
+ msg.targetInfoOffset = buf.readInt32LE(44);
+ msg.targetInfo = buf.slice(msg.targetInfoOffset, msg.targetInfoOffset + msg.targetInfoLen);
+ }
+ return msg;
+}
+
+function createType3Message(msg2, options){
+ var nonce = msg2.serverChallenge;
+ var username = options.username;
+ var password = options.password;
+ var negotiateFlags = msg2.negotiateFlags;
+
+ var isUnicode = negotiateFlags & flags.NTLM_NegotiateUnicode;
+ var isNegotiateExtendedSecurity = negotiateFlags & flags.NTLM_NegotiateExtendedSecurity;
+
+ var BODY_LENGTH = 72;
+
+ var domainName = escape(options.domain.toUpperCase());
+ var workstation = escape(options.workstation.toUpperCase());
+
+ var workstationBytes, domainNameBytes, usernameBytes, encryptedRandomSessionKeyBytes;
+
+ var encryptedRandomSessionKey = "";
+ if(isUnicode){
+ workstationBytes = new Buffer(workstation, 'utf16le');
+ domainNameBytes = new Buffer(domainName, 'utf16le');
+ usernameBytes = new Buffer(username, 'utf16le');
+ encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'utf16le');
+ }else{
+ workstationBytes = new Buffer(workstation, 'ascii');
+ domainNameBytes = new Buffer(domainName, 'ascii');
+ usernameBytes = new Buffer(username, 'ascii');
+ encryptedRandomSessionKeyBytes = new Buffer(encryptedRandomSessionKey, 'ascii');
+ }
+
+ var lmChallengeResponse = calc_resp(create_LM_hashed_password_v1(password), nonce);
+ var ntChallengeResponse = calc_resp(create_NT_hashed_password_v1(password), nonce);
+
+ if(isNegotiateExtendedSecurity){
+ var pwhash = create_NT_hashed_password_v1(password);
+ var clientChallenge = "";
+ for(var i=0; i < 8; i++){
+ clientChallenge += String.fromCharCode( Math.floor(Math.random()*256) );
+ }
+ var clientChallengeBytes = new Buffer(clientChallenge, 'ascii');
+ var challenges = ntlm2sr_calc_resp(pwhash, nonce, clientChallengeBytes);
+ lmChallengeResponse = challenges.lmChallengeResponse;
+ ntChallengeResponse = challenges.ntChallengeResponse;
+ }
+
+ var signature = 'NTLMSSP\0';
+
+ var pos = 0;
+ var buf = new Buffer(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length + encryptedRandomSessionKeyBytes.length);
+
+ buf.write(signature, pos, signature.length); pos += signature.length;
+ buf.writeUInt32LE(3, pos); pos += 4; // type 1
+
+ buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseLen
+ buf.writeUInt16LE(lmChallengeResponse.length, pos); pos += 2; // LmChallengeResponseMaxLen
+ buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length, pos); pos += 4; // LmChallengeResponseOffset
+
+ buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseLen
+ buf.writeUInt16LE(ntChallengeResponse.length, pos); pos += 2; // NtChallengeResponseMaxLen
+ buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length, pos); pos += 4; // NtChallengeResponseOffset
+
+ buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameLen
+ buf.writeUInt16LE(domainNameBytes.length, pos); pos += 2; // DomainNameMaxLen
+ buf.writeUInt32LE(BODY_LENGTH, pos); pos += 4; // DomainNameOffset
+
+ buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameLen
+ buf.writeUInt16LE(usernameBytes.length, pos); pos += 2; // UserNameMaxLen
+ buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length, pos); pos += 4; // UserNameOffset
+
+ buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationLen
+ buf.writeUInt16LE(workstationBytes.length, pos); pos += 2; // WorkstationMaxLen
+ buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length, pos); pos += 4; // WorkstationOffset
+
+ buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyLen
+ buf.writeUInt16LE(encryptedRandomSessionKeyBytes.length, pos); pos += 2; // EncryptedRandomSessionKeyMaxLen
+ buf.writeUInt32LE(BODY_LENGTH + domainNameBytes.length + usernameBytes.length + workstationBytes.length + lmChallengeResponse.length + ntChallengeResponse.length, pos); pos += 4; // EncryptedRandomSessionKeyOffset
+
+ buf.writeUInt32LE(typeflags.NTLM_TYPE2_FLAGS, pos); pos += 4; // NegotiateFlags
+
+ buf.writeUInt8(5, pos); pos++; // ProductMajorVersion
+ buf.writeUInt8(1, pos); pos++; // ProductMinorVersion
+ buf.writeUInt16LE(2600, pos); pos += 2; // ProductBuild
+ buf.writeUInt8(0, pos); pos++; // VersionReserved1
+ buf.writeUInt8(0, pos); pos++; // VersionReserved2
+ buf.writeUInt8(0, pos); pos++; // VersionReserved3
+ buf.writeUInt8(15, pos); pos++; // NTLMRevisionCurrent
+
+ domainNameBytes.copy(buf, pos); pos += domainNameBytes.length;
+ usernameBytes.copy(buf, pos); pos += usernameBytes.length;
+ workstationBytes.copy(buf, pos); pos += workstationBytes.length;
+ lmChallengeResponse.copy(buf, pos); pos += lmChallengeResponse.length;
+ ntChallengeResponse.copy(buf, pos); pos += ntChallengeResponse.length;
+ encryptedRandomSessionKeyBytes.copy(buf, pos); pos += encryptedRandomSessionKeyBytes.length;
+
+ return 'NTLM ' + buf.toString('base64');
+}
+
+function create_LM_hashed_password_v1(password){
+ // fix the password length to 14 bytes
+ password = password.toUpperCase();
+ var passwordBytes = new Buffer(password, 'ascii');
+
+ var passwordBytesPadded = new Buffer(14);
+ passwordBytesPadded.fill("\0");
+ var sourceEnd = 14;
+ if(passwordBytes.length < 14) sourceEnd = passwordBytes.length;
+ passwordBytes.copy(passwordBytesPadded, 0, 0, sourceEnd);
+
+ // split into 2 parts of 7 bytes:
+ var firstPart = passwordBytesPadded.slice(0,7);
+ var secondPart = passwordBytesPadded.slice(7);
+
+ function encrypt(buf){
+ var key = insertZerosEvery7Bits(buf);
+ var des = crypto.createCipheriv('DES-ECB', key, '');
+ return des.update("KGS!@#$%"); // page 57 in [MS-NLMP]);
+ }
+
+ var firstPartEncrypted = encrypt(firstPart);
+ var secondPartEncrypted = encrypt(secondPart);
+
+ return Buffer.concat([firstPartEncrypted, secondPartEncrypted]);
+}
+
+function insertZerosEvery7Bits(buf){
+ var binaryArray = bytes2binaryArray(buf);
+ var newBinaryArray = [];
+ for(var i=0; i<binaryArray.length; i++){
+ newBinaryArray.push(binaryArray[i]);
+
+ if((i+1)%7 === 0){
+ newBinaryArray.push(0);
+ }
+ }
+ return binaryArray2bytes(newBinaryArray);
+}
+
+function bytes2binaryArray(buf){
+ var hex2binary = {
+ 0: [0,0,0,0],
+ 1: [0,0,0,1],
+ 2: [0,0,1,0],
+ 3: [0,0,1,1],
+ 4: [0,1,0,0],
+ 5: [0,1,0,1],
+ 6: [0,1,1,0],
+ 7: [0,1,1,1],
+ 8: [1,0,0,0],
+ 9: [1,0,0,1],
+ A: [1,0,1,0],
+ B: [1,0,1,1],
+ C: [1,1,0,0],
+ D: [1,1,0,1],
+ E: [1,1,1,0],
+ F: [1,1,1,1]
+ };
+
+ var hexString = buf.toString('hex').toUpperCase();
+ var array = [];
+ for(var i=0; i<hexString.length; i++){
+ var hexchar = hexString.charAt(i);
+ array = array.concat(hex2binary[hexchar]);
+ }
+ return array;
+}
+
+function binaryArray2bytes(array){
+ var binary2hex = {
+ '0000': 0,
+ '0001': 1,
+ '0010': 2,
+ '0011': 3,
+ '0100': 4,
+ '0101': 5,
+ '0110': 6,
+ '0111': 7,
+ '1000': 8,
+ '1001': 9,
+ '1010': 'A',
+ '1011': 'B',
+ '1100': 'C',
+ '1101': 'D',
+ '1110': 'E',
+ '1111': 'F'
+ };
+
+ var bufArray = [];
+
+ for(var i=0; i<array.length; i +=8 ){
+ if((i+7) > array.length)
+ break;
+
+ var binString1 = '' + array[i] + '' + array[i+1] + '' + array[i+2] + '' + array[i+3];
+ var binString2 = '' + array[i+4] + '' + array[i+5] + '' + array[i+6] + '' + array[i+7];
+ var hexchar1 = binary2hex[binString1];
+ var hexchar2 = binary2hex[binString2];
+
+ var buf = new Buffer(hexchar1 + '' + hexchar2, 'hex');
+ bufArray.push(buf);
+ }
+
+ return Buffer.concat(bufArray);
+}
+
+function create_NT_hashed_password_v1(password){
+ var buf = new Buffer(password, 'utf16le');
+ var md4 = crypto.createHash('md4');
+ md4.update(buf);
+ return new Buffer(md4.digest());
+}
+
+function calc_resp(password_hash, server_challenge){
+ // padding with zeros to make the hash 21 bytes long
+ var passHashPadded = new Buffer(21);
+ passHashPadded.fill("\0");
+ password_hash.copy(passHashPadded, 0, 0, password_hash.length);
+
+ var resArray = [];
+
+ var des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(0,7)), '');
+ resArray.push( des.update(server_challenge.slice(0,8)) );
+
+ des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(7,14)), '');
+ resArray.push( des.update(server_challenge.slice(0,8)) );
+
+ des = crypto.createCipheriv('DES-ECB', insertZerosEvery7Bits(passHashPadded.slice(14,21)), '');
+ resArray.push( des.update(server_challenge.slice(0,8)) );
+
+ return Buffer.concat(resArray);
+}
+
+function ntlm2sr_calc_resp(responseKeyNT, serverChallenge, clientChallenge){
+ // padding with zeros to make the hash 16 bytes longer
+ var lmChallengeResponse = new Buffer(clientChallenge.length + 16);
+ lmChallengeResponse.fill("\0");
+ clientChallenge.copy(lmChallengeResponse, 0, 0, clientChallenge.length);
+
+ var buf = Buffer.concat([serverChallenge, clientChallenge]);
+ var md5 = crypto.createHash('md5');
+ md5.update(buf);
+ var sess = md5.digest();
+ var ntChallengeResponse = calc_resp(responseKeyNT, sess.slice(0,8));
+
+ return {
+ lmChallengeResponse: lmChallengeResponse,
+ ntChallengeResponse: ntChallengeResponse
+ };
+}
+
+exports.createType1Message = createType1Message;
+exports.parseType2Message = parseType2Message;
+exports.createType3Message = createType3Message;
+
+
+
diff --git a/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt b/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt
new file mode 100644
index 0000000..b341600
--- /dev/null
+++ b/node_modules/typed-rest-client/opensource/node-http-ntlm/readme.txt
@@ -0,0 +1,6 @@
+// This software (ntlm.js) was copied from a file of the same name at https://github.com/SamDecrock/node-http-ntlm/blob/master/ntlm.js.
+//
+// As of this writing, it is a part of the node-http-ntlm module produced by SamDecrock.
+//
+// It is used as a part of the NTLM support provided by the vso-node-api library.
+//
diff --git a/node_modules/typed-rest-client/package.json b/node_modules/typed-rest-client/package.json
new file mode 100644
index 0000000..c773bdf
--- /dev/null
+++ b/node_modules/typed-rest-client/package.json
@@ -0,0 +1,73 @@
+{
+ "_from": "typed-rest-client@^1.4.0",
+ "_id": "typed-rest-client@1.5.0",
+ "_inBundle": false,
+ "_integrity": "sha512-DVZRlmsfnTjp6ZJaatcdyvvwYwbWvR4YDNFDqb+qdTxpvaVP99YCpBkA8rxsLtAPjBVoDe4fNsnMIdZTiPuKWg==",
+ "_location": "/typed-rest-client",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "typed-rest-client@^1.4.0",
+ "name": "typed-rest-client",
+ "escapedName": "typed-rest-client",
+ "rawSpec": "^1.4.0",
+ "saveSpec": null,
+ "fetchSpec": "^1.4.0"
+ },
+ "_requiredBy": [
+ "/@actions/tool-cache"
+ ],
+ "_resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.5.0.tgz",
+ "_shasum": "c0dda6e775b942fd46a2d99f2160a94953206fc2",
+ "_spec": "typed-rest-client@^1.4.0",
+ "_where": "/home/jodersky/p/setup-scala-2/node_modules/@actions/tool-cache",
+ "author": {
+ "name": "Microsoft Corporation"
+ },
+ "bugs": {
+ "url": "https://github.com/Microsoft/typed-rest-client/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "tunnel": "0.0.4",
+ "underscore": "1.8.3"
+ },
+ "deprecated": false,
+ "description": "Node Rest and Http Clients for use with TypeScript",
+ "devDependencies": {
+ "@types/mocha": "^2.2.44",
+ "@types/node": "^6.0.92",
+ "@types/shelljs": "0.7.4",
+ "mocha": "^3.5.3",
+ "nock": "9.6.1",
+ "react-scripts": "1.1.5",
+ "semver": "4.3.3",
+ "shelljs": "0.7.6",
+ "typescript": "3.1.5"
+ },
+ "homepage": "https://github.com/Microsoft/typed-rest-client#readme",
+ "keywords": [
+ "rest",
+ "http",
+ "client",
+ "typescript",
+ "node"
+ ],
+ "license": "MIT",
+ "main": "./RestClient.js",
+ "name": "typed-rest-client",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/Microsoft/typed-rest-client.git"
+ },
+ "scripts": {
+ "bt": "node make.js buildtest",
+ "build": "node make.js build",
+ "samples": "node make.js samples",
+ "test": "node make.js test",
+ "units": "node make.js units",
+ "validate": "node make.js validate"
+ },
+ "version": "1.5.0"
+}