├── .gitignore ├── .idea ├── KerasServer.iml ├── misc.xml ├── modules.xml ├── vcs.xml └── workspace.xml ├── LICENSE ├── README.md ├── client └── nodejs-client │ ├── demo.js │ └── node_modules │ ├── .npminstall.done │ ├── _axios@0.18.0@axios │ ├── .npminstall.done │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── UPGRADE_GUIDE.md │ ├── dist │ │ ├── axios.js │ │ ├── axios.map │ │ ├── axios.min.js │ │ └── axios.min.map │ ├── index.d.ts │ ├── index.js │ ├── lib │ │ ├── adapters │ │ │ ├── README.md │ │ │ ├── http.js │ │ │ └── xhr.js │ │ ├── axios.js │ │ ├── cancel │ │ │ ├── Cancel.js │ │ │ ├── CancelToken.js │ │ │ └── isCancel.js │ │ ├── core │ │ │ ├── Axios.js │ │ │ ├── InterceptorManager.js │ │ │ ├── README.md │ │ │ ├── createError.js │ │ │ ├── dispatchRequest.js │ │ │ ├── enhanceError.js │ │ │ ├── settle.js │ │ │ └── transformData.js │ │ ├── defaults.js │ │ ├── helpers │ │ │ ├── README.md │ │ │ ├── bind.js │ │ │ ├── btoa.js │ │ │ ├── buildURL.js │ │ │ ├── combineURLs.js │ │ │ ├── cookies.js │ │ │ ├── deprecatedMethod.js │ │ │ ├── isAbsoluteURL.js │ │ │ ├── isURLSameOrigin.js │ │ │ ├── normalizeHeaderName.js │ │ │ ├── parseHeaders.js │ │ │ └── spread.js │ │ └── utils.js │ ├── node_modules │ │ ├── follow-redirects │ │ │ ├── .npminstall.done │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── http.js │ │ │ ├── https.js │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── debug │ │ │ │ │ ├── .coveralls.yml │ │ │ │ │ ├── .eslintrc │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── .npminstall.done │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── karma.conf.js │ │ │ │ │ ├── node.js │ │ │ │ │ ├── node_modules │ │ │ │ │ └── ms │ │ │ │ │ │ ├── .npminstall.done │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── license.md │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── readme.md │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ ├── browser.js │ │ │ │ │ ├── debug.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── node.js │ │ │ └── package.json │ │ └── is-buffer │ │ │ ├── .npminstall.done │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ └── basic.js │ └── package.json │ ├── _debug@3.1.0@debug │ ├── .coveralls.yml │ ├── .eslintrc │ ├── .npmignore │ ├── .npminstall.done │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── karma.conf.js │ ├── node.js │ ├── node_modules │ │ └── ms │ │ │ ├── .npminstall.done │ │ │ ├── index.js │ │ │ ├── license.md │ │ │ ├── package.json │ │ │ └── readme.md │ ├── package.json │ └── src │ │ ├── browser.js │ │ ├── debug.js │ │ ├── index.js │ │ └── node.js │ ├── _follow-redirects@1.4.1@follow-redirects │ ├── .npminstall.done │ ├── LICENSE │ ├── README.md │ ├── http.js │ ├── https.js │ ├── index.js │ ├── node_modules │ │ └── debug │ │ │ ├── .coveralls.yml │ │ │ ├── .eslintrc │ │ │ ├── .npmignore │ │ │ ├── .npminstall.done │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── karma.conf.js │ │ │ ├── node.js │ │ │ ├── node_modules │ │ │ └── ms │ │ │ │ ├── .npminstall.done │ │ │ │ ├── index.js │ │ │ │ ├── license.md │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── package.json │ │ │ └── src │ │ │ ├── browser.js │ │ │ ├── debug.js │ │ │ ├── index.js │ │ │ └── node.js │ └── package.json │ ├── _is-buffer@1.1.6@is-buffer │ ├── .npminstall.done │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ └── basic.js │ ├── _ms@2.0.0@ms │ ├── .npminstall.done │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md │ ├── axios │ ├── .npminstall.done │ ├── CHANGELOG.md │ ├── LICENSE │ ├── README.md │ ├── UPGRADE_GUIDE.md │ ├── dist │ │ ├── axios.js │ │ ├── axios.map │ │ ├── axios.min.js │ │ └── axios.min.map │ ├── index.d.ts │ ├── index.js │ ├── lib │ │ ├── adapters │ │ │ ├── README.md │ │ │ ├── http.js │ │ │ └── xhr.js │ │ ├── axios.js │ │ ├── cancel │ │ │ ├── Cancel.js │ │ │ ├── CancelToken.js │ │ │ └── isCancel.js │ │ ├── core │ │ │ ├── Axios.js │ │ │ ├── InterceptorManager.js │ │ │ ├── README.md │ │ │ ├── createError.js │ │ │ ├── dispatchRequest.js │ │ │ ├── enhanceError.js │ │ │ ├── settle.js │ │ │ └── transformData.js │ │ ├── defaults.js │ │ ├── helpers │ │ │ ├── README.md │ │ │ ├── bind.js │ │ │ ├── btoa.js │ │ │ ├── buildURL.js │ │ │ ├── combineURLs.js │ │ │ ├── cookies.js │ │ │ ├── deprecatedMethod.js │ │ │ ├── isAbsoluteURL.js │ │ │ ├── isURLSameOrigin.js │ │ │ ├── normalizeHeaderName.js │ │ │ ├── parseHeaders.js │ │ │ └── spread.js │ │ └── utils.js │ ├── node_modules │ │ ├── follow-redirects │ │ │ ├── .npminstall.done │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── http.js │ │ │ ├── https.js │ │ │ ├── index.js │ │ │ ├── node_modules │ │ │ │ └── debug │ │ │ │ │ ├── .coveralls.yml │ │ │ │ │ ├── .eslintrc │ │ │ │ │ ├── .npmignore │ │ │ │ │ ├── .npminstall.done │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── karma.conf.js │ │ │ │ │ ├── node.js │ │ │ │ │ ├── node_modules │ │ │ │ │ └── ms │ │ │ │ │ │ ├── .npminstall.done │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── license.md │ │ │ │ │ │ ├── package.json │ │ │ │ │ │ └── readme.md │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ ├── browser.js │ │ │ │ │ ├── debug.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── node.js │ │ │ └── package.json │ │ └── is-buffer │ │ │ ├── .npminstall.done │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── test │ │ │ └── basic.js │ └── package.json │ ├── debug │ ├── .coveralls.yml │ ├── .eslintrc │ ├── .npmignore │ ├── .npminstall.done │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── karma.conf.js │ ├── node.js │ ├── node_modules │ │ └── ms │ │ │ ├── .npminstall.done │ │ │ ├── index.js │ │ │ ├── license.md │ │ │ ├── package.json │ │ │ └── readme.md │ ├── package.json │ └── src │ │ ├── browser.js │ │ ├── debug.js │ │ ├── index.js │ │ └── node.js │ ├── follow-redirects │ ├── .npminstall.done │ ├── LICENSE │ ├── README.md │ ├── http.js │ ├── https.js │ ├── index.js │ ├── node_modules │ │ └── debug │ │ │ ├── .coveralls.yml │ │ │ ├── .eslintrc │ │ │ ├── .npmignore │ │ │ ├── .npminstall.done │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── karma.conf.js │ │ │ ├── node.js │ │ │ ├── node_modules │ │ │ └── ms │ │ │ │ ├── .npminstall.done │ │ │ │ ├── index.js │ │ │ │ ├── license.md │ │ │ │ ├── package.json │ │ │ │ └── readme.md │ │ │ ├── package.json │ │ │ └── src │ │ │ ├── browser.js │ │ │ ├── debug.js │ │ │ ├── index.js │ │ │ └── node.js │ └── package.json │ ├── is-buffer │ ├── .npminstall.done │ ├── LICENSE │ ├── README.md │ ├── index.js │ ├── package.json │ └── test │ │ └── basic.js │ └── ms │ ├── .npminstall.done │ ├── index.js │ ├── license.md │ ├── package.json │ └── readme.md └── server └── keras_server ├── __init__.py ├── flask_test.py ├── keras_client.py └── keras_server.py /.gitignore: -------------------------------------------------------------------------------- 1 | */node_modules/ -------------------------------------------------------------------------------- /.idea/KerasServer.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KerasServer 2 | 3 | KerasServer is a framework for deploying Keras/Tensorflow code and models. 4 | -------------------------------------------------------------------------------- /client/nodejs-client/demo.js: -------------------------------------------------------------------------------- 1 | var axios = require('axios') 2 | 3 | 4 | var baseUrl = "http://127.0.0.1:5000/" 5 | 6 | data = { 7 | features: [ 8 | [1,2,3,4,5,6,7,8,9,10] 9 | ] 10 | } 11 | 12 | 13 | axios.get(baseUrl, { 14 | params: { 15 | data: JSON.stringify(data) 16 | } 17 | }).then(response=>{ 18 | console.log(response["data"]["data"]["predict"]) 19 | }) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/.npminstall.done: -------------------------------------------------------------------------------- 1 | All packages installed at Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-present Matt Zabriskie 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/axios'); -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/adapters/README.md: -------------------------------------------------------------------------------- 1 | # axios // adapters 2 | 3 | The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. 4 | 5 | ## Example 6 | 7 | ```js 8 | var settle = require('./../core/settle'); 9 | 10 | module.exports = function myAdapter(config) { 11 | // At this point: 12 | // - config has been merged with defaults 13 | // - request transformers have already run 14 | // - request interceptors have already run 15 | 16 | // Make the request using config provided 17 | // Upon response settle the Promise 18 | 19 | return new Promise(function(resolve, reject) { 20 | 21 | var response = { 22 | data: responseData, 23 | status: request.status, 24 | statusText: request.statusText, 25 | headers: responseHeaders, 26 | config: config, 27 | request: request 28 | }; 29 | 30 | settle(resolve, reject, response); 31 | 32 | // From here: 33 | // - response transformers will run 34 | // - response interceptors will run 35 | }); 36 | } 37 | ``` 38 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/axios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./utils'); 4 | var bind = require('./helpers/bind'); 5 | var Axios = require('./core/Axios'); 6 | var defaults = require('./defaults'); 7 | 8 | /** 9 | * Create an instance of Axios 10 | * 11 | * @param {Object} defaultConfig The default config for the instance 12 | * @return {Axios} A new instance of Axios 13 | */ 14 | function createInstance(defaultConfig) { 15 | var context = new Axios(defaultConfig); 16 | var instance = bind(Axios.prototype.request, context); 17 | 18 | // Copy axios.prototype to instance 19 | utils.extend(instance, Axios.prototype, context); 20 | 21 | // Copy context to instance 22 | utils.extend(instance, context); 23 | 24 | return instance; 25 | } 26 | 27 | // Create the default instance to be exported 28 | var axios = createInstance(defaults); 29 | 30 | // Expose Axios class to allow class inheritance 31 | axios.Axios = Axios; 32 | 33 | // Factory for creating new instances 34 | axios.create = function create(instanceConfig) { 35 | return createInstance(utils.merge(defaults, instanceConfig)); 36 | }; 37 | 38 | // Expose Cancel & CancelToken 39 | axios.Cancel = require('./cancel/Cancel'); 40 | axios.CancelToken = require('./cancel/CancelToken'); 41 | axios.isCancel = require('./cancel/isCancel'); 42 | 43 | // Expose all/spread 44 | axios.all = function all(promises) { 45 | return Promise.all(promises); 46 | }; 47 | axios.spread = require('./helpers/spread'); 48 | 49 | module.exports = axios; 50 | 51 | // Allow use of default import syntax in TypeScript 52 | module.exports.default = axios; 53 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/cancel/Cancel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * A `Cancel` is an object that is thrown when an operation is canceled. 5 | * 6 | * @class 7 | * @param {string=} message The message. 8 | */ 9 | function Cancel(message) { 10 | this.message = message; 11 | } 12 | 13 | Cancel.prototype.toString = function toString() { 14 | return 'Cancel' + (this.message ? ': ' + this.message : ''); 15 | }; 16 | 17 | Cancel.prototype.__CANCEL__ = true; 18 | 19 | module.exports = Cancel; 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/cancel/CancelToken.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Cancel = require('./Cancel'); 4 | 5 | /** 6 | * A `CancelToken` is an object that can be used to request cancellation of an operation. 7 | * 8 | * @class 9 | * @param {Function} executor The executor function. 10 | */ 11 | function CancelToken(executor) { 12 | if (typeof executor !== 'function') { 13 | throw new TypeError('executor must be a function.'); 14 | } 15 | 16 | var resolvePromise; 17 | this.promise = new Promise(function promiseExecutor(resolve) { 18 | resolvePromise = resolve; 19 | }); 20 | 21 | var token = this; 22 | executor(function cancel(message) { 23 | if (token.reason) { 24 | // Cancellation has already been requested 25 | return; 26 | } 27 | 28 | token.reason = new Cancel(message); 29 | resolvePromise(token.reason); 30 | }); 31 | } 32 | 33 | /** 34 | * Throws a `Cancel` if cancellation has been requested. 35 | */ 36 | CancelToken.prototype.throwIfRequested = function throwIfRequested() { 37 | if (this.reason) { 38 | throw this.reason; 39 | } 40 | }; 41 | 42 | /** 43 | * Returns an object that contains a new `CancelToken` and a function that, when called, 44 | * cancels the `CancelToken`. 45 | */ 46 | CancelToken.source = function source() { 47 | var cancel; 48 | var token = new CancelToken(function executor(c) { 49 | cancel = c; 50 | }); 51 | return { 52 | token: token, 53 | cancel: cancel 54 | }; 55 | }; 56 | 57 | module.exports = CancelToken; 58 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/cancel/isCancel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function isCancel(value) { 4 | return !!(value && value.__CANCEL__); 5 | }; 6 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/Axios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var defaults = require('./../defaults'); 4 | var utils = require('./../utils'); 5 | var InterceptorManager = require('./InterceptorManager'); 6 | var dispatchRequest = require('./dispatchRequest'); 7 | 8 | /** 9 | * Create a new instance of Axios 10 | * 11 | * @param {Object} instanceConfig The default config for the instance 12 | */ 13 | function Axios(instanceConfig) { 14 | this.defaults = instanceConfig; 15 | this.interceptors = { 16 | request: new InterceptorManager(), 17 | response: new InterceptorManager() 18 | }; 19 | } 20 | 21 | /** 22 | * Dispatch a request 23 | * 24 | * @param {Object} config The config specific for this request (merged with this.defaults) 25 | */ 26 | Axios.prototype.request = function request(config) { 27 | /*eslint no-param-reassign:0*/ 28 | // Allow for axios('example/url'[, config]) a la fetch API 29 | if (typeof config === 'string') { 30 | config = utils.merge({ 31 | url: arguments[0] 32 | }, arguments[1]); 33 | } 34 | 35 | config = utils.merge(defaults, {method: 'get'}, this.defaults, config); 36 | config.method = config.method.toLowerCase(); 37 | 38 | // Hook up interceptors middleware 39 | var chain = [dispatchRequest, undefined]; 40 | var promise = Promise.resolve(config); 41 | 42 | this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { 43 | chain.unshift(interceptor.fulfilled, interceptor.rejected); 44 | }); 45 | 46 | this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { 47 | chain.push(interceptor.fulfilled, interceptor.rejected); 48 | }); 49 | 50 | while (chain.length) { 51 | promise = promise.then(chain.shift(), chain.shift()); 52 | } 53 | 54 | return promise; 55 | }; 56 | 57 | // Provide aliases for supported request methods 58 | utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { 59 | /*eslint func-names:0*/ 60 | Axios.prototype[method] = function(url, config) { 61 | return this.request(utils.merge(config || {}, { 62 | method: method, 63 | url: url 64 | })); 65 | }; 66 | }); 67 | 68 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 69 | /*eslint func-names:0*/ 70 | Axios.prototype[method] = function(url, data, config) { 71 | return this.request(utils.merge(config || {}, { 72 | method: method, 73 | url: url, 74 | data: data 75 | })); 76 | }; 77 | }); 78 | 79 | module.exports = Axios; 80 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/InterceptorManager.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | function InterceptorManager() { 6 | this.handlers = []; 7 | } 8 | 9 | /** 10 | * Add a new interceptor to the stack 11 | * 12 | * @param {Function} fulfilled The function to handle `then` for a `Promise` 13 | * @param {Function} rejected The function to handle `reject` for a `Promise` 14 | * 15 | * @return {Number} An ID used to remove interceptor later 16 | */ 17 | InterceptorManager.prototype.use = function use(fulfilled, rejected) { 18 | this.handlers.push({ 19 | fulfilled: fulfilled, 20 | rejected: rejected 21 | }); 22 | return this.handlers.length - 1; 23 | }; 24 | 25 | /** 26 | * Remove an interceptor from the stack 27 | * 28 | * @param {Number} id The ID that was returned by `use` 29 | */ 30 | InterceptorManager.prototype.eject = function eject(id) { 31 | if (this.handlers[id]) { 32 | this.handlers[id] = null; 33 | } 34 | }; 35 | 36 | /** 37 | * Iterate over all the registered interceptors 38 | * 39 | * This method is particularly useful for skipping over any 40 | * interceptors that may have become `null` calling `eject`. 41 | * 42 | * @param {Function} fn The function to call for each interceptor 43 | */ 44 | InterceptorManager.prototype.forEach = function forEach(fn) { 45 | utils.forEach(this.handlers, function forEachHandler(h) { 46 | if (h !== null) { 47 | fn(h); 48 | } 49 | }); 50 | }; 51 | 52 | module.exports = InterceptorManager; 53 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/README.md: -------------------------------------------------------------------------------- 1 | # axios // core 2 | 3 | The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: 4 | 5 | - Dispatching requests 6 | - Managing interceptors 7 | - Handling config 8 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/createError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var enhanceError = require('./enhanceError'); 4 | 5 | /** 6 | * Create an Error with the specified message, config, error code, request and response. 7 | * 8 | * @param {string} message The error message. 9 | * @param {Object} config The config. 10 | * @param {string} [code] The error code (for example, 'ECONNABORTED'). 11 | * @param {Object} [request] The request. 12 | * @param {Object} [response] The response. 13 | * @returns {Error} The created error. 14 | */ 15 | module.exports = function createError(message, config, code, request, response) { 16 | var error = new Error(message); 17 | return enhanceError(error, config, code, request, response); 18 | }; 19 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/dispatchRequest.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | var transformData = require('./transformData'); 5 | var isCancel = require('../cancel/isCancel'); 6 | var defaults = require('../defaults'); 7 | var isAbsoluteURL = require('./../helpers/isAbsoluteURL'); 8 | var combineURLs = require('./../helpers/combineURLs'); 9 | 10 | /** 11 | * Throws a `Cancel` if cancellation has been requested. 12 | */ 13 | function throwIfCancellationRequested(config) { 14 | if (config.cancelToken) { 15 | config.cancelToken.throwIfRequested(); 16 | } 17 | } 18 | 19 | /** 20 | * Dispatch a request to the server using the configured adapter. 21 | * 22 | * @param {object} config The config that is to be used for the request 23 | * @returns {Promise} The Promise to be fulfilled 24 | */ 25 | module.exports = function dispatchRequest(config) { 26 | throwIfCancellationRequested(config); 27 | 28 | // Support baseURL config 29 | if (config.baseURL && !isAbsoluteURL(config.url)) { 30 | config.url = combineURLs(config.baseURL, config.url); 31 | } 32 | 33 | // Ensure headers exist 34 | config.headers = config.headers || {}; 35 | 36 | // Transform request data 37 | config.data = transformData( 38 | config.data, 39 | config.headers, 40 | config.transformRequest 41 | ); 42 | 43 | // Flatten headers 44 | config.headers = utils.merge( 45 | config.headers.common || {}, 46 | config.headers[config.method] || {}, 47 | config.headers || {} 48 | ); 49 | 50 | utils.forEach( 51 | ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], 52 | function cleanHeaderConfig(method) { 53 | delete config.headers[method]; 54 | } 55 | ); 56 | 57 | var adapter = config.adapter || defaults.adapter; 58 | 59 | return adapter(config).then(function onAdapterResolution(response) { 60 | throwIfCancellationRequested(config); 61 | 62 | // Transform response data 63 | response.data = transformData( 64 | response.data, 65 | response.headers, 66 | config.transformResponse 67 | ); 68 | 69 | return response; 70 | }, function onAdapterRejection(reason) { 71 | if (!isCancel(reason)) { 72 | throwIfCancellationRequested(config); 73 | 74 | // Transform response data 75 | if (reason && reason.response) { 76 | reason.response.data = transformData( 77 | reason.response.data, 78 | reason.response.headers, 79 | config.transformResponse 80 | ); 81 | } 82 | } 83 | 84 | return Promise.reject(reason); 85 | }); 86 | }; 87 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/enhanceError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Update an Error with the specified config, error code, and response. 5 | * 6 | * @param {Error} error The error to update. 7 | * @param {Object} config The config. 8 | * @param {string} [code] The error code (for example, 'ECONNABORTED'). 9 | * @param {Object} [request] The request. 10 | * @param {Object} [response] The response. 11 | * @returns {Error} The error. 12 | */ 13 | module.exports = function enhanceError(error, config, code, request, response) { 14 | error.config = config; 15 | if (code) { 16 | error.code = code; 17 | } 18 | error.request = request; 19 | error.response = response; 20 | return error; 21 | }; 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/settle.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var createError = require('./createError'); 4 | 5 | /** 6 | * Resolve or reject a Promise based on response status. 7 | * 8 | * @param {Function} resolve A function that resolves the promise. 9 | * @param {Function} reject A function that rejects the promise. 10 | * @param {object} response The response. 11 | */ 12 | module.exports = function settle(resolve, reject, response) { 13 | var validateStatus = response.config.validateStatus; 14 | // Note: status is not exposed by XDomainRequest 15 | if (!response.status || !validateStatus || validateStatus(response.status)) { 16 | resolve(response); 17 | } else { 18 | reject(createError( 19 | 'Request failed with status code ' + response.status, 20 | response.config, 21 | null, 22 | response.request, 23 | response 24 | )); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/core/transformData.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | /** 6 | * Transform the data for a request or a response 7 | * 8 | * @param {Object|String} data The data to be transformed 9 | * @param {Array} headers The headers for the request or response 10 | * @param {Array|Function} fns A single function or Array of functions 11 | * @returns {*} The resulting transformed data 12 | */ 13 | module.exports = function transformData(data, headers, fns) { 14 | /*eslint no-param-reassign:0*/ 15 | utils.forEach(fns, function transform(fn) { 16 | data = fn(data, headers); 17 | }); 18 | 19 | return data; 20 | }; 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/defaults.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./utils'); 4 | var normalizeHeaderName = require('./helpers/normalizeHeaderName'); 5 | 6 | var DEFAULT_CONTENT_TYPE = { 7 | 'Content-Type': 'application/x-www-form-urlencoded' 8 | }; 9 | 10 | function setContentTypeIfUnset(headers, value) { 11 | if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { 12 | headers['Content-Type'] = value; 13 | } 14 | } 15 | 16 | function getDefaultAdapter() { 17 | var adapter; 18 | if (typeof XMLHttpRequest !== 'undefined') { 19 | // For browsers use XHR adapter 20 | adapter = require('./adapters/xhr'); 21 | } else if (typeof process !== 'undefined') { 22 | // For node use HTTP adapter 23 | adapter = require('./adapters/http'); 24 | } 25 | return adapter; 26 | } 27 | 28 | var defaults = { 29 | adapter: getDefaultAdapter(), 30 | 31 | transformRequest: [function transformRequest(data, headers) { 32 | normalizeHeaderName(headers, 'Content-Type'); 33 | if (utils.isFormData(data) || 34 | utils.isArrayBuffer(data) || 35 | utils.isBuffer(data) || 36 | utils.isStream(data) || 37 | utils.isFile(data) || 38 | utils.isBlob(data) 39 | ) { 40 | return data; 41 | } 42 | if (utils.isArrayBufferView(data)) { 43 | return data.buffer; 44 | } 45 | if (utils.isURLSearchParams(data)) { 46 | setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); 47 | return data.toString(); 48 | } 49 | if (utils.isObject(data)) { 50 | setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); 51 | return JSON.stringify(data); 52 | } 53 | return data; 54 | }], 55 | 56 | transformResponse: [function transformResponse(data) { 57 | /*eslint no-param-reassign:0*/ 58 | if (typeof data === 'string') { 59 | try { 60 | data = JSON.parse(data); 61 | } catch (e) { /* Ignore */ } 62 | } 63 | return data; 64 | }], 65 | 66 | /** 67 | * A timeout in milliseconds to abort a request. If set to 0 (default) a 68 | * timeout is not created. 69 | */ 70 | timeout: 0, 71 | 72 | xsrfCookieName: 'XSRF-TOKEN', 73 | xsrfHeaderName: 'X-XSRF-TOKEN', 74 | 75 | maxContentLength: -1, 76 | 77 | validateStatus: function validateStatus(status) { 78 | return status >= 200 && status < 300; 79 | } 80 | }; 81 | 82 | defaults.headers = { 83 | common: { 84 | 'Accept': 'application/json, text/plain, */*' 85 | } 86 | }; 87 | 88 | utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { 89 | defaults.headers[method] = {}; 90 | }); 91 | 92 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 93 | defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); 94 | }); 95 | 96 | module.exports = defaults; 97 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/README.md: -------------------------------------------------------------------------------- 1 | # axios // helpers 2 | 3 | The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: 4 | 5 | - Browser polyfills 6 | - Managing cookies 7 | - Parsing HTTP headers 8 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/bind.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function bind(fn, thisArg) { 4 | return function wrap() { 5 | var args = new Array(arguments.length); 6 | for (var i = 0; i < args.length; i++) { 7 | args[i] = arguments[i]; 8 | } 9 | return fn.apply(thisArg, args); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/btoa.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js 4 | 5 | var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 6 | 7 | function E() { 8 | this.message = 'String contains an invalid character'; 9 | } 10 | E.prototype = new Error; 11 | E.prototype.code = 5; 12 | E.prototype.name = 'InvalidCharacterError'; 13 | 14 | function btoa(input) { 15 | var str = String(input); 16 | var output = ''; 17 | for ( 18 | // initialize result and counter 19 | var block, charCode, idx = 0, map = chars; 20 | // if the next str index does not exist: 21 | // change the mapping table to "=" 22 | // check if d has no fractional digits 23 | str.charAt(idx | 0) || (map = '=', idx % 1); 24 | // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 25 | output += map.charAt(63 & block >> 8 - idx % 1 * 8) 26 | ) { 27 | charCode = str.charCodeAt(idx += 3 / 4); 28 | if (charCode > 0xFF) { 29 | throw new E(); 30 | } 31 | block = block << 8 | charCode; 32 | } 33 | return output; 34 | } 35 | 36 | module.exports = btoa; 37 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/buildURL.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | function encode(val) { 6 | return encodeURIComponent(val). 7 | replace(/%40/gi, '@'). 8 | replace(/%3A/gi, ':'). 9 | replace(/%24/g, '$'). 10 | replace(/%2C/gi, ','). 11 | replace(/%20/g, '+'). 12 | replace(/%5B/gi, '['). 13 | replace(/%5D/gi, ']'); 14 | } 15 | 16 | /** 17 | * Build a URL by appending params to the end 18 | * 19 | * @param {string} url The base of the url (e.g., http://www.google.com) 20 | * @param {object} [params] The params to be appended 21 | * @returns {string} The formatted url 22 | */ 23 | module.exports = function buildURL(url, params, paramsSerializer) { 24 | /*eslint no-param-reassign:0*/ 25 | if (!params) { 26 | return url; 27 | } 28 | 29 | var serializedParams; 30 | if (paramsSerializer) { 31 | serializedParams = paramsSerializer(params); 32 | } else if (utils.isURLSearchParams(params)) { 33 | serializedParams = params.toString(); 34 | } else { 35 | var parts = []; 36 | 37 | utils.forEach(params, function serialize(val, key) { 38 | if (val === null || typeof val === 'undefined') { 39 | return; 40 | } 41 | 42 | if (utils.isArray(val)) { 43 | key = key + '[]'; 44 | } else { 45 | val = [val]; 46 | } 47 | 48 | utils.forEach(val, function parseValue(v) { 49 | if (utils.isDate(v)) { 50 | v = v.toISOString(); 51 | } else if (utils.isObject(v)) { 52 | v = JSON.stringify(v); 53 | } 54 | parts.push(encode(key) + '=' + encode(v)); 55 | }); 56 | }); 57 | 58 | serializedParams = parts.join('&'); 59 | } 60 | 61 | if (serializedParams) { 62 | url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; 63 | } 64 | 65 | return url; 66 | }; 67 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/combineURLs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Creates a new URL by combining the specified URLs 5 | * 6 | * @param {string} baseURL The base URL 7 | * @param {string} relativeURL The relative URL 8 | * @returns {string} The combined URL 9 | */ 10 | module.exports = function combineURLs(baseURL, relativeURL) { 11 | return relativeURL 12 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') 13 | : baseURL; 14 | }; 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/cookies.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | module.exports = ( 6 | utils.isStandardBrowserEnv() ? 7 | 8 | // Standard browser envs support document.cookie 9 | (function standardBrowserEnv() { 10 | return { 11 | write: function write(name, value, expires, path, domain, secure) { 12 | var cookie = []; 13 | cookie.push(name + '=' + encodeURIComponent(value)); 14 | 15 | if (utils.isNumber(expires)) { 16 | cookie.push('expires=' + new Date(expires).toGMTString()); 17 | } 18 | 19 | if (utils.isString(path)) { 20 | cookie.push('path=' + path); 21 | } 22 | 23 | if (utils.isString(domain)) { 24 | cookie.push('domain=' + domain); 25 | } 26 | 27 | if (secure === true) { 28 | cookie.push('secure'); 29 | } 30 | 31 | document.cookie = cookie.join('; '); 32 | }, 33 | 34 | read: function read(name) { 35 | var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); 36 | return (match ? decodeURIComponent(match[3]) : null); 37 | }, 38 | 39 | remove: function remove(name) { 40 | this.write(name, '', Date.now() - 86400000); 41 | } 42 | }; 43 | })() : 44 | 45 | // Non standard browser env (web workers, react-native) lack needed support. 46 | (function nonStandardBrowserEnv() { 47 | return { 48 | write: function write() {}, 49 | read: function read() { return null; }, 50 | remove: function remove() {} 51 | }; 52 | })() 53 | ); 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/deprecatedMethod.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*eslint no-console:0*/ 4 | 5 | /** 6 | * Supply a warning to the developer that a method they are using 7 | * has been deprecated. 8 | * 9 | * @param {string} method The name of the deprecated method 10 | * @param {string} [instead] The alternate method to use if applicable 11 | * @param {string} [docs] The documentation URL to get further details 12 | */ 13 | module.exports = function deprecatedMethod(method, instead, docs) { 14 | try { 15 | console.warn( 16 | 'DEPRECATED method `' + method + '`.' + 17 | (instead ? ' Use `' + instead + '` instead.' : '') + 18 | ' This method will be removed in a future release.'); 19 | 20 | if (docs) { 21 | console.warn('For more information about usage see ' + docs); 22 | } 23 | } catch (e) { /* Ignore */ } 24 | }; 25 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/isAbsoluteURL.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Determines whether the specified URL is absolute 5 | * 6 | * @param {string} url The URL to test 7 | * @returns {boolean} True if the specified URL is absolute, otherwise false 8 | */ 9 | module.exports = function isAbsoluteURL(url) { 10 | // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). 11 | // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed 12 | // by any combination of letters, digits, plus, period, or hyphen. 13 | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); 14 | }; 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/isURLSameOrigin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | module.exports = ( 6 | utils.isStandardBrowserEnv() ? 7 | 8 | // Standard browser envs have full support of the APIs needed to test 9 | // whether the request URL is of the same origin as current location. 10 | (function standardBrowserEnv() { 11 | var msie = /(msie|trident)/i.test(navigator.userAgent); 12 | var urlParsingNode = document.createElement('a'); 13 | var originURL; 14 | 15 | /** 16 | * Parse a URL to discover it's components 17 | * 18 | * @param {String} url The URL to be parsed 19 | * @returns {Object} 20 | */ 21 | function resolveURL(url) { 22 | var href = url; 23 | 24 | if (msie) { 25 | // IE needs attribute set twice to normalize properties 26 | urlParsingNode.setAttribute('href', href); 27 | href = urlParsingNode.href; 28 | } 29 | 30 | urlParsingNode.setAttribute('href', href); 31 | 32 | // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils 33 | return { 34 | href: urlParsingNode.href, 35 | protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', 36 | host: urlParsingNode.host, 37 | search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', 38 | hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', 39 | hostname: urlParsingNode.hostname, 40 | port: urlParsingNode.port, 41 | pathname: (urlParsingNode.pathname.charAt(0) === '/') ? 42 | urlParsingNode.pathname : 43 | '/' + urlParsingNode.pathname 44 | }; 45 | } 46 | 47 | originURL = resolveURL(window.location.href); 48 | 49 | /** 50 | * Determine if a URL shares the same origin as the current location 51 | * 52 | * @param {String} requestURL The URL to test 53 | * @returns {boolean} True if URL shares the same origin, otherwise false 54 | */ 55 | return function isURLSameOrigin(requestURL) { 56 | var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; 57 | return (parsed.protocol === originURL.protocol && 58 | parsed.host === originURL.host); 59 | }; 60 | })() : 61 | 62 | // Non standard browser envs (web workers, react-native) lack needed support. 63 | (function nonStandardBrowserEnv() { 64 | return function isURLSameOrigin() { 65 | return true; 66 | }; 67 | })() 68 | ); 69 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/normalizeHeaderName.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../utils'); 4 | 5 | module.exports = function normalizeHeaderName(headers, normalizedName) { 6 | utils.forEach(headers, function processHeader(value, name) { 7 | if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { 8 | headers[normalizedName] = value; 9 | delete headers[name]; 10 | } 11 | }); 12 | }; 13 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/parseHeaders.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | // Headers whose duplicates are ignored by node 6 | // c.f. https://nodejs.org/api/http.html#http_message_headers 7 | var ignoreDuplicateOf = [ 8 | 'age', 'authorization', 'content-length', 'content-type', 'etag', 9 | 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 10 | 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 11 | 'referer', 'retry-after', 'user-agent' 12 | ]; 13 | 14 | /** 15 | * Parse headers into an object 16 | * 17 | * ``` 18 | * Date: Wed, 27 Aug 2014 08:58:49 GMT 19 | * Content-Type: application/json 20 | * Connection: keep-alive 21 | * Transfer-Encoding: chunked 22 | * ``` 23 | * 24 | * @param {String} headers Headers needing to be parsed 25 | * @returns {Object} Headers parsed into an object 26 | */ 27 | module.exports = function parseHeaders(headers) { 28 | var parsed = {}; 29 | var key; 30 | var val; 31 | var i; 32 | 33 | if (!headers) { return parsed; } 34 | 35 | utils.forEach(headers.split('\n'), function parser(line) { 36 | i = line.indexOf(':'); 37 | key = utils.trim(line.substr(0, i)).toLowerCase(); 38 | val = utils.trim(line.substr(i + 1)); 39 | 40 | if (key) { 41 | if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { 42 | return; 43 | } 44 | if (key === 'set-cookie') { 45 | parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); 46 | } else { 47 | parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; 48 | } 49 | } 50 | }); 51 | 52 | return parsed; 53 | }; 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/lib/helpers/spread.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Syntactic sugar for invoking a function and expanding an array for arguments. 5 | * 6 | * Common use case would be to use `Function.prototype.apply`. 7 | * 8 | * ```js 9 | * function f(x, y, z) {} 10 | * var args = [1, 2, 3]; 11 | * f.apply(null, args); 12 | * ``` 13 | * 14 | * With `spread` this example can be re-written. 15 | * 16 | * ```js 17 | * spread(function(x, y, z) {})([1, 2, 3]); 18 | * ``` 19 | * 20 | * @param {Function} callback 21 | * @returns {Function} 22 | */ 23 | module.exports = function spread(callback) { 24 | return function wrap(arr) { 25 | return callback.apply(null, arr); 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017 Olivier Lalonde , James Talmage , Ruben Verborgh 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/http.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").http; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/https.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").https; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "globals": { 7 | "chrome": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "no-empty": [1, { "allowEmptyCatch": true }] 12 | }, 13 | "extends": "eslint:recommended" 14 | } 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "8" 9 | 10 | install: 11 | - make install 12 | 13 | script: 14 | - make lint 15 | - make test 16 | 17 | matrix: 18 | include: 19 | - node_js: '8' 20 | env: BROWSER=1 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | install: node_modules 19 | 20 | browser: dist/debug.js 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | dist/debug.js: src/*.js node_modules 27 | @mkdir -p dist 28 | @$(BROWSERIFY) \ 29 | --standalone debug \ 30 | . > dist/debug.js 31 | 32 | lint: 33 | @eslint *.js src/*.js 34 | 35 | test-node: 36 | @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 37 | @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 38 | 39 | test-browser: 40 | @$(MAKE) browser 41 | @karma start --single-run 42 | 43 | test-all: 44 | @concurrently \ 45 | "make test-node" \ 46 | "make test-browser" 47 | 48 | test: 49 | @if [ "x$(BROWSER)" = "x" ]; then \ 50 | $(MAKE) test-node; \ 51 | else \ 52 | $(MAKE) test-browser; \ 53 | fi 54 | 55 | clean: 56 | rimraf dist coverage 57 | 58 | .PHONY: browser install clean lint test test-all test-node test-browser 59 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "version": "3.1.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/visionmedia/debug.git" 7 | }, 8 | "description": "small debugging utility", 9 | "keywords": [ 10 | "debug", 11 | "log", 12 | "debugger" 13 | ], 14 | "author": "TJ Holowaychuk ", 15 | "contributors": [ 16 | "Nathan Rajlich (http://n8.io)", 17 | "Andrew Rhyne " 18 | ], 19 | "license": "MIT", 20 | "dependencies": { 21 | "ms": "2.0.0" 22 | }, 23 | "devDependencies": { 24 | "browserify": "14.4.0", 25 | "chai": "^3.5.0", 26 | "concurrently": "^3.1.0", 27 | "coveralls": "^2.11.15", 28 | "eslint": "^3.12.1", 29 | "istanbul": "^0.4.5", 30 | "karma": "^1.3.0", 31 | "karma-chai": "^0.1.0", 32 | "karma-mocha": "^1.3.0", 33 | "karma-phantomjs-launcher": "^1.0.2", 34 | "karma-sinon": "^1.0.5", 35 | "mocha": "^3.2.0", 36 | "mocha-lcov-reporter": "^1.2.0", 37 | "rimraf": "^2.5.4", 38 | "sinon": "^1.17.6", 39 | "sinon-chai": "^2.8.0" 40 | }, 41 | "main": "./src/index.js", 42 | "browser": "./src/browser.js", 43 | "_from": "debug@3.1.0", 44 | "_resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz" 45 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process === 'undefined' || process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/follow-redirects/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "follow-redirects", 3 | "version": "1.4.1", 4 | "description": "HTTP and HTTPS modules that follow redirects.", 5 | "main": "index.js", 6 | "engines": { 7 | "node": ">=4.0" 8 | }, 9 | "scripts": { 10 | "test": "npm run lint && npm run mocha", 11 | "lint": "eslint *.js test", 12 | "mocha": "nyc mocha" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git@github.com:olalonde/follow-redirects.git" 17 | }, 18 | "homepage": "https://github.com/olalonde/follow-redirects", 19 | "bugs": { 20 | "url": "https://github.com/olalonde/follow-redirects/issues" 21 | }, 22 | "keywords": [ 23 | "http", 24 | "https", 25 | "url", 26 | "redirect", 27 | "client", 28 | "location", 29 | "utility" 30 | ], 31 | "author": { 32 | "name": "Olivier Lalonde", 33 | "email": "olalonde@gmail.com", 34 | "url": "http://www.syskall.com" 35 | }, 36 | "contributors": [ 37 | "James Talmage ", 38 | "Ruben Verborgh (https://ruben.verborgh.org/)" 39 | ], 40 | "files": [ 41 | "index.js", 42 | "create.js", 43 | "http.js", 44 | "https.js" 45 | ], 46 | "dependencies": { 47 | "debug": "^3.1.0" 48 | }, 49 | "devDependencies": { 50 | "bluebird": "^3.5.1", 51 | "concat-stream": "^1.6.0", 52 | "coveralls": "^3.0.0", 53 | "eslint": "^4.16.0", 54 | "express": "^4.16.2", 55 | "mocha": "^5.0.0", 56 | "nyc": "^11.4.1" 57 | }, 58 | "license": "MIT", 59 | "nyc": { 60 | "reporter": [ 61 | "lcov", 62 | "text" 63 | ] 64 | }, 65 | "_from": "follow-redirects@1.4.1", 66 | "_resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.4.1.tgz" 67 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/is-buffer/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/is-buffer/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/is-buffer/README.md: -------------------------------------------------------------------------------- 1 | # is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] 2 | 3 | [travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg 4 | [travis-url]: https://travis-ci.org/feross/is-buffer 5 | [npm-image]: https://img.shields.io/npm/v/is-buffer.svg 6 | [npm-url]: https://npmjs.org/package/is-buffer 7 | [downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg 8 | [downloads-url]: https://npmjs.org/package/is-buffer 9 | [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg 10 | [standard-url]: https://standardjs.com 11 | 12 | #### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) 13 | 14 | [![saucelabs][saucelabs-image]][saucelabs-url] 15 | 16 | [saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg 17 | [saucelabs-url]: https://saucelabs.com/u/is-buffer 18 | 19 | ## Why not use `Buffer.isBuffer`? 20 | 21 | This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). 22 | 23 | It's future-proof and works in node too! 24 | 25 | ## install 26 | 27 | ```bash 28 | npm install is-buffer 29 | ``` 30 | 31 | ## usage 32 | 33 | ```js 34 | var isBuffer = require('is-buffer') 35 | 36 | isBuffer(new Buffer(4)) // true 37 | 38 | isBuffer(undefined) // false 39 | isBuffer(null) // false 40 | isBuffer('') // false 41 | isBuffer(true) // false 42 | isBuffer(false) // false 43 | isBuffer(0) // false 44 | isBuffer(1) // false 45 | isBuffer(1.0) // false 46 | isBuffer('string') // false 47 | isBuffer({}) // false 48 | isBuffer(function foo () {}) // false 49 | ``` 50 | 51 | ## license 52 | 53 | MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/is-buffer/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Determine if an object is a Buffer 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | // The _isBuffer check is for Safari 5-7 support, because it's missing 9 | // Object.prototype.constructor. Remove this eventually 10 | module.exports = function (obj) { 11 | return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) 12 | } 13 | 14 | function isBuffer (obj) { 15 | return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) 16 | } 17 | 18 | // For Node v0.10 support. Remove this eventually. 19 | function isSlowBuffer (obj) { 20 | return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) 21 | } 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/is-buffer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-buffer", 3 | "description": "Determine if an object is a Buffer", 4 | "version": "1.1.6", 5 | "author": { 6 | "name": "Feross Aboukhadijeh", 7 | "email": "feross@feross.org", 8 | "url": "http://feross.org/" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/feross/is-buffer/issues" 12 | }, 13 | "dependencies": {}, 14 | "devDependencies": { 15 | "standard": "*", 16 | "tape": "^4.0.0", 17 | "zuul": "^3.0.0" 18 | }, 19 | "keywords": [ 20 | "buffer", 21 | "buffers", 22 | "type", 23 | "core buffer", 24 | "browser buffer", 25 | "browserify", 26 | "typed array", 27 | "uint32array", 28 | "int16array", 29 | "int32array", 30 | "float32array", 31 | "float64array", 32 | "browser", 33 | "arraybuffer", 34 | "dataview" 35 | ], 36 | "license": "MIT", 37 | "main": "index.js", 38 | "repository": { 39 | "type": "git", 40 | "url": "git://github.com/feross/is-buffer.git" 41 | }, 42 | "scripts": { 43 | "test": "standard && npm run test-node && npm run test-browser", 44 | "test-browser": "zuul -- test/*.js", 45 | "test-browser-local": "zuul --local -- test/*.js", 46 | "test-node": "tape test/*.js" 47 | }, 48 | "testling": { 49 | "files": "test/*.js" 50 | }, 51 | "_from": "is-buffer@1.1.6", 52 | "_resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz" 53 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/node_modules/is-buffer/test/basic.js: -------------------------------------------------------------------------------- 1 | var isBuffer = require('../') 2 | var test = require('tape') 3 | 4 | test('is-buffer', function (t) { 5 | t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') 6 | t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') 7 | 8 | t.equal(isBuffer(undefined), false, 'undefined') 9 | t.equal(isBuffer(null), false, 'null') 10 | t.equal(isBuffer(''), false, 'empty string') 11 | t.equal(isBuffer(true), false, 'true') 12 | t.equal(isBuffer(false), false, 'false') 13 | t.equal(isBuffer(0), false, '0') 14 | t.equal(isBuffer(1), false, '1') 15 | t.equal(isBuffer(1.0), false, '1.0') 16 | t.equal(isBuffer('string'), false, 'string') 17 | t.equal(isBuffer({}), false, '{}') 18 | t.equal(isBuffer([]), false, '[]') 19 | t.equal(isBuffer(function foo () {}), false, 'function foo () {}') 20 | t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') 21 | t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') 22 | 23 | t.end() 24 | }) 25 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_axios@0.18.0@axios/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "axios", 3 | "version": "0.18.0", 4 | "description": "Promise based HTTP client for the browser and node.js", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "grunt test && bundlesize", 8 | "start": "node ./sandbox/server.js", 9 | "build": "NODE_ENV=production grunt build", 10 | "preversion": "npm test", 11 | "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json", 12 | "postversion": "git push && git push --tags", 13 | "examples": "node ./examples/server.js", 14 | "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/axios/axios.git" 19 | }, 20 | "keywords": [ 21 | "xhr", 22 | "http", 23 | "ajax", 24 | "promise", 25 | "node" 26 | ], 27 | "author": "Matt Zabriskie", 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/axios/axios/issues" 31 | }, 32 | "homepage": "https://github.com/axios/axios", 33 | "devDependencies": { 34 | "bundlesize": "^0.5.7", 35 | "coveralls": "^2.11.9", 36 | "es6-promise": "^4.0.5", 37 | "grunt": "^1.0.1", 38 | "grunt-banner": "^0.6.0", 39 | "grunt-cli": "^1.2.0", 40 | "grunt-contrib-clean": "^1.0.0", 41 | "grunt-contrib-nodeunit": "^1.0.0", 42 | "grunt-contrib-watch": "^1.0.0", 43 | "grunt-eslint": "^19.0.0", 44 | "grunt-karma": "^2.0.0", 45 | "grunt-ts": "^6.0.0-beta.3", 46 | "grunt-webpack": "^1.0.18", 47 | "istanbul-instrumenter-loader": "^1.0.0", 48 | "jasmine-core": "^2.4.1", 49 | "karma": "^1.3.0", 50 | "karma-chrome-launcher": "^2.0.0", 51 | "karma-coverage": "^1.0.0", 52 | "karma-firefox-launcher": "^1.0.0", 53 | "karma-jasmine": "^1.0.2", 54 | "karma-jasmine-ajax": "^0.1.13", 55 | "karma-opera-launcher": "^1.0.0", 56 | "karma-safari-launcher": "^1.0.0", 57 | "karma-sauce-launcher": "^1.1.0", 58 | "karma-sinon": "^1.0.5", 59 | "karma-sourcemap-loader": "^0.3.7", 60 | "karma-webpack": "^1.7.0", 61 | "load-grunt-tasks": "^3.5.2", 62 | "minimist": "^1.2.0", 63 | "sinon": "^1.17.4", 64 | "webpack": "^1.13.1", 65 | "webpack-dev-server": "^1.14.1", 66 | "url-search-params": "^0.6.1", 67 | "typescript": "^2.0.3" 68 | }, 69 | "browser": { 70 | "./lib/adapters/http.js": "./lib/adapters/xhr.js" 71 | }, 72 | "typings": "./index.d.ts", 73 | "dependencies": { 74 | "follow-redirects": "^1.3.0", 75 | "is-buffer": "^1.1.5" 76 | }, 77 | "bundlesize": [ 78 | { 79 | "path": "./dist/axios.min.js", 80 | "threshold": "5kB" 81 | } 82 | ], 83 | "_from": "axios@0.18.0", 84 | "_resolved": "http://registry.npm.taobao.org/axios/download/axios-0.18.0.tgz" 85 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "globals": { 7 | "chrome": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "no-empty": [1, { "allowEmptyCatch": true }] 12 | }, 13 | "extends": "eslint:recommended" 14 | } 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "8" 9 | 10 | install: 11 | - make install 12 | 13 | script: 14 | - make lint 15 | - make test 16 | 17 | matrix: 18 | include: 19 | - node_js: '8' 20 | env: BROWSER=1 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | install: node_modules 19 | 20 | browser: dist/debug.js 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | dist/debug.js: src/*.js node_modules 27 | @mkdir -p dist 28 | @$(BROWSERIFY) \ 29 | --standalone debug \ 30 | . > dist/debug.js 31 | 32 | lint: 33 | @eslint *.js src/*.js 34 | 35 | test-node: 36 | @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 37 | @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 38 | 39 | test-browser: 40 | @$(MAKE) browser 41 | @karma start --single-run 42 | 43 | test-all: 44 | @concurrently \ 45 | "make test-node" \ 46 | "make test-browser" 47 | 48 | test: 49 | @if [ "x$(BROWSER)" = "x" ]; then \ 50 | $(MAKE) test-node; \ 51 | else \ 52 | $(MAKE) test-browser; \ 53 | fi 54 | 55 | clean: 56 | rimraf dist coverage 57 | 58 | .PHONY: browser install clean lint test test-all test-node test-browser 59 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/node_modules/ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "version": "3.1.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/visionmedia/debug.git" 7 | }, 8 | "description": "small debugging utility", 9 | "keywords": [ 10 | "debug", 11 | "log", 12 | "debugger" 13 | ], 14 | "author": "TJ Holowaychuk ", 15 | "contributors": [ 16 | "Nathan Rajlich (http://n8.io)", 17 | "Andrew Rhyne " 18 | ], 19 | "license": "MIT", 20 | "dependencies": { 21 | "ms": "2.0.0" 22 | }, 23 | "devDependencies": { 24 | "browserify": "14.4.0", 25 | "chai": "^3.5.0", 26 | "concurrently": "^3.1.0", 27 | "coveralls": "^2.11.15", 28 | "eslint": "^3.12.1", 29 | "istanbul": "^0.4.5", 30 | "karma": "^1.3.0", 31 | "karma-chai": "^0.1.0", 32 | "karma-mocha": "^1.3.0", 33 | "karma-phantomjs-launcher": "^1.0.2", 34 | "karma-sinon": "^1.0.5", 35 | "mocha": "^3.2.0", 36 | "mocha-lcov-reporter": "^1.2.0", 37 | "rimraf": "^2.5.4", 38 | "sinon": "^1.17.6", 39 | "sinon-chai": "^2.8.0" 40 | }, 41 | "main": "./src/index.js", 42 | "browser": "./src/browser.js", 43 | "_from": "debug@3.1.0", 44 | "_resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz" 45 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_debug@3.1.0@debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process === 'undefined' || process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017 Olivier Lalonde , James Talmage , Ruben Verborgh 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/http.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").http; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/https.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").https; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "globals": { 7 | "chrome": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "no-empty": [1, { "allowEmptyCatch": true }] 12 | }, 13 | "extends": "eslint:recommended" 14 | } 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "8" 9 | 10 | install: 11 | - make install 12 | 13 | script: 14 | - make lint 15 | - make test 16 | 17 | matrix: 18 | include: 19 | - node_js: '8' 20 | env: BROWSER=1 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | install: node_modules 19 | 20 | browser: dist/debug.js 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | dist/debug.js: src/*.js node_modules 27 | @mkdir -p dist 28 | @$(BROWSERIFY) \ 29 | --standalone debug \ 30 | . > dist/debug.js 31 | 32 | lint: 33 | @eslint *.js src/*.js 34 | 35 | test-node: 36 | @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 37 | @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 38 | 39 | test-browser: 40 | @$(MAKE) browser 41 | @karma start --single-run 42 | 43 | test-all: 44 | @concurrently \ 45 | "make test-node" \ 46 | "make test-browser" 47 | 48 | test: 49 | @if [ "x$(BROWSER)" = "x" ]; then \ 50 | $(MAKE) test-node; \ 51 | else \ 52 | $(MAKE) test-browser; \ 53 | fi 54 | 55 | clean: 56 | rimraf dist coverage 57 | 58 | .PHONY: browser install clean lint test test-all test-node test-browser 59 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/node_modules/ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "version": "3.1.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/visionmedia/debug.git" 7 | }, 8 | "description": "small debugging utility", 9 | "keywords": [ 10 | "debug", 11 | "log", 12 | "debugger" 13 | ], 14 | "author": "TJ Holowaychuk ", 15 | "contributors": [ 16 | "Nathan Rajlich (http://n8.io)", 17 | "Andrew Rhyne " 18 | ], 19 | "license": "MIT", 20 | "dependencies": { 21 | "ms": "2.0.0" 22 | }, 23 | "devDependencies": { 24 | "browserify": "14.4.0", 25 | "chai": "^3.5.0", 26 | "concurrently": "^3.1.0", 27 | "coveralls": "^2.11.15", 28 | "eslint": "^3.12.1", 29 | "istanbul": "^0.4.5", 30 | "karma": "^1.3.0", 31 | "karma-chai": "^0.1.0", 32 | "karma-mocha": "^1.3.0", 33 | "karma-phantomjs-launcher": "^1.0.2", 34 | "karma-sinon": "^1.0.5", 35 | "mocha": "^3.2.0", 36 | "mocha-lcov-reporter": "^1.2.0", 37 | "rimraf": "^2.5.4", 38 | "sinon": "^1.17.6", 39 | "sinon-chai": "^2.8.0" 40 | }, 41 | "main": "./src/index.js", 42 | "browser": "./src/browser.js", 43 | "_from": "debug@3.1.0", 44 | "_resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz" 45 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process === 'undefined' || process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_follow-redirects@1.4.1@follow-redirects/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "follow-redirects", 3 | "version": "1.4.1", 4 | "description": "HTTP and HTTPS modules that follow redirects.", 5 | "main": "index.js", 6 | "engines": { 7 | "node": ">=4.0" 8 | }, 9 | "scripts": { 10 | "test": "npm run lint && npm run mocha", 11 | "lint": "eslint *.js test", 12 | "mocha": "nyc mocha" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git@github.com:olalonde/follow-redirects.git" 17 | }, 18 | "homepage": "https://github.com/olalonde/follow-redirects", 19 | "bugs": { 20 | "url": "https://github.com/olalonde/follow-redirects/issues" 21 | }, 22 | "keywords": [ 23 | "http", 24 | "https", 25 | "url", 26 | "redirect", 27 | "client", 28 | "location", 29 | "utility" 30 | ], 31 | "author": { 32 | "name": "Olivier Lalonde", 33 | "email": "olalonde@gmail.com", 34 | "url": "http://www.syskall.com" 35 | }, 36 | "contributors": [ 37 | "James Talmage ", 38 | "Ruben Verborgh (https://ruben.verborgh.org/)" 39 | ], 40 | "files": [ 41 | "index.js", 42 | "create.js", 43 | "http.js", 44 | "https.js" 45 | ], 46 | "dependencies": { 47 | "debug": "^3.1.0" 48 | }, 49 | "devDependencies": { 50 | "bluebird": "^3.5.1", 51 | "concat-stream": "^1.6.0", 52 | "coveralls": "^3.0.0", 53 | "eslint": "^4.16.0", 54 | "express": "^4.16.2", 55 | "mocha": "^5.0.0", 56 | "nyc": "^11.4.1" 57 | }, 58 | "license": "MIT", 59 | "nyc": { 60 | "reporter": [ 61 | "lcov", 62 | "text" 63 | ] 64 | }, 65 | "_from": "follow-redirects@1.4.1", 66 | "_resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.4.1.tgz" 67 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_is-buffer@1.1.6@is-buffer/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_is-buffer@1.1.6@is-buffer/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_is-buffer@1.1.6@is-buffer/README.md: -------------------------------------------------------------------------------- 1 | # is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] 2 | 3 | [travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg 4 | [travis-url]: https://travis-ci.org/feross/is-buffer 5 | [npm-image]: https://img.shields.io/npm/v/is-buffer.svg 6 | [npm-url]: https://npmjs.org/package/is-buffer 7 | [downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg 8 | [downloads-url]: https://npmjs.org/package/is-buffer 9 | [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg 10 | [standard-url]: https://standardjs.com 11 | 12 | #### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) 13 | 14 | [![saucelabs][saucelabs-image]][saucelabs-url] 15 | 16 | [saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg 17 | [saucelabs-url]: https://saucelabs.com/u/is-buffer 18 | 19 | ## Why not use `Buffer.isBuffer`? 20 | 21 | This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). 22 | 23 | It's future-proof and works in node too! 24 | 25 | ## install 26 | 27 | ```bash 28 | npm install is-buffer 29 | ``` 30 | 31 | ## usage 32 | 33 | ```js 34 | var isBuffer = require('is-buffer') 35 | 36 | isBuffer(new Buffer(4)) // true 37 | 38 | isBuffer(undefined) // false 39 | isBuffer(null) // false 40 | isBuffer('') // false 41 | isBuffer(true) // false 42 | isBuffer(false) // false 43 | isBuffer(0) // false 44 | isBuffer(1) // false 45 | isBuffer(1.0) // false 46 | isBuffer('string') // false 47 | isBuffer({}) // false 48 | isBuffer(function foo () {}) // false 49 | ``` 50 | 51 | ## license 52 | 53 | MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_is-buffer@1.1.6@is-buffer/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Determine if an object is a Buffer 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | // The _isBuffer check is for Safari 5-7 support, because it's missing 9 | // Object.prototype.constructor. Remove this eventually 10 | module.exports = function (obj) { 11 | return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) 12 | } 13 | 14 | function isBuffer (obj) { 15 | return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) 16 | } 17 | 18 | // For Node v0.10 support. Remove this eventually. 19 | function isSlowBuffer (obj) { 20 | return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) 21 | } 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_is-buffer@1.1.6@is-buffer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-buffer", 3 | "description": "Determine if an object is a Buffer", 4 | "version": "1.1.6", 5 | "author": { 6 | "name": "Feross Aboukhadijeh", 7 | "email": "feross@feross.org", 8 | "url": "http://feross.org/" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/feross/is-buffer/issues" 12 | }, 13 | "dependencies": {}, 14 | "devDependencies": { 15 | "standard": "*", 16 | "tape": "^4.0.0", 17 | "zuul": "^3.0.0" 18 | }, 19 | "keywords": [ 20 | "buffer", 21 | "buffers", 22 | "type", 23 | "core buffer", 24 | "browser buffer", 25 | "browserify", 26 | "typed array", 27 | "uint32array", 28 | "int16array", 29 | "int32array", 30 | "float32array", 31 | "float64array", 32 | "browser", 33 | "arraybuffer", 34 | "dataview" 35 | ], 36 | "license": "MIT", 37 | "main": "index.js", 38 | "repository": { 39 | "type": "git", 40 | "url": "git://github.com/feross/is-buffer.git" 41 | }, 42 | "scripts": { 43 | "test": "standard && npm run test-node && npm run test-browser", 44 | "test-browser": "zuul -- test/*.js", 45 | "test-browser-local": "zuul --local -- test/*.js", 46 | "test-node": "tape test/*.js" 47 | }, 48 | "testling": { 49 | "files": "test/*.js" 50 | }, 51 | "_from": "is-buffer@1.1.6", 52 | "_resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz" 53 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_is-buffer@1.1.6@is-buffer/test/basic.js: -------------------------------------------------------------------------------- 1 | var isBuffer = require('../') 2 | var test = require('tape') 3 | 4 | test('is-buffer', function (t) { 5 | t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') 6 | t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') 7 | 8 | t.equal(isBuffer(undefined), false, 'undefined') 9 | t.equal(isBuffer(null), false, 'null') 10 | t.equal(isBuffer(''), false, 'empty string') 11 | t.equal(isBuffer(true), false, 'true') 12 | t.equal(isBuffer(false), false, 'false') 13 | t.equal(isBuffer(0), false, '0') 14 | t.equal(isBuffer(1), false, '1') 15 | t.equal(isBuffer(1.0), false, '1.0') 16 | t.equal(isBuffer('string'), false, 'string') 17 | t.equal(isBuffer({}), false, '{}') 18 | t.equal(isBuffer([]), false, '[]') 19 | t.equal(isBuffer(function foo () {}), false, 'function foo () {}') 20 | t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') 21 | t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') 22 | 23 | t.end() 24 | }) 25 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_ms@2.0.0@ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_ms@2.0.0@ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_ms@2.0.0@ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/_ms@2.0.0@ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-present Matt Zabriskie 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/index.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/axios'); -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/adapters/README.md: -------------------------------------------------------------------------------- 1 | # axios // adapters 2 | 3 | The modules under `adapters/` are modules that handle dispatching a request and settling a returned `Promise` once a response is received. 4 | 5 | ## Example 6 | 7 | ```js 8 | var settle = require('./../core/settle'); 9 | 10 | module.exports = function myAdapter(config) { 11 | // At this point: 12 | // - config has been merged with defaults 13 | // - request transformers have already run 14 | // - request interceptors have already run 15 | 16 | // Make the request using config provided 17 | // Upon response settle the Promise 18 | 19 | return new Promise(function(resolve, reject) { 20 | 21 | var response = { 22 | data: responseData, 23 | status: request.status, 24 | statusText: request.statusText, 25 | headers: responseHeaders, 26 | config: config, 27 | request: request 28 | }; 29 | 30 | settle(resolve, reject, response); 31 | 32 | // From here: 33 | // - response transformers will run 34 | // - response interceptors will run 35 | }); 36 | } 37 | ``` 38 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/axios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./utils'); 4 | var bind = require('./helpers/bind'); 5 | var Axios = require('./core/Axios'); 6 | var defaults = require('./defaults'); 7 | 8 | /** 9 | * Create an instance of Axios 10 | * 11 | * @param {Object} defaultConfig The default config for the instance 12 | * @return {Axios} A new instance of Axios 13 | */ 14 | function createInstance(defaultConfig) { 15 | var context = new Axios(defaultConfig); 16 | var instance = bind(Axios.prototype.request, context); 17 | 18 | // Copy axios.prototype to instance 19 | utils.extend(instance, Axios.prototype, context); 20 | 21 | // Copy context to instance 22 | utils.extend(instance, context); 23 | 24 | return instance; 25 | } 26 | 27 | // Create the default instance to be exported 28 | var axios = createInstance(defaults); 29 | 30 | // Expose Axios class to allow class inheritance 31 | axios.Axios = Axios; 32 | 33 | // Factory for creating new instances 34 | axios.create = function create(instanceConfig) { 35 | return createInstance(utils.merge(defaults, instanceConfig)); 36 | }; 37 | 38 | // Expose Cancel & CancelToken 39 | axios.Cancel = require('./cancel/Cancel'); 40 | axios.CancelToken = require('./cancel/CancelToken'); 41 | axios.isCancel = require('./cancel/isCancel'); 42 | 43 | // Expose all/spread 44 | axios.all = function all(promises) { 45 | return Promise.all(promises); 46 | }; 47 | axios.spread = require('./helpers/spread'); 48 | 49 | module.exports = axios; 50 | 51 | // Allow use of default import syntax in TypeScript 52 | module.exports.default = axios; 53 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/cancel/Cancel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * A `Cancel` is an object that is thrown when an operation is canceled. 5 | * 6 | * @class 7 | * @param {string=} message The message. 8 | */ 9 | function Cancel(message) { 10 | this.message = message; 11 | } 12 | 13 | Cancel.prototype.toString = function toString() { 14 | return 'Cancel' + (this.message ? ': ' + this.message : ''); 15 | }; 16 | 17 | Cancel.prototype.__CANCEL__ = true; 18 | 19 | module.exports = Cancel; 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/cancel/CancelToken.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var Cancel = require('./Cancel'); 4 | 5 | /** 6 | * A `CancelToken` is an object that can be used to request cancellation of an operation. 7 | * 8 | * @class 9 | * @param {Function} executor The executor function. 10 | */ 11 | function CancelToken(executor) { 12 | if (typeof executor !== 'function') { 13 | throw new TypeError('executor must be a function.'); 14 | } 15 | 16 | var resolvePromise; 17 | this.promise = new Promise(function promiseExecutor(resolve) { 18 | resolvePromise = resolve; 19 | }); 20 | 21 | var token = this; 22 | executor(function cancel(message) { 23 | if (token.reason) { 24 | // Cancellation has already been requested 25 | return; 26 | } 27 | 28 | token.reason = new Cancel(message); 29 | resolvePromise(token.reason); 30 | }); 31 | } 32 | 33 | /** 34 | * Throws a `Cancel` if cancellation has been requested. 35 | */ 36 | CancelToken.prototype.throwIfRequested = function throwIfRequested() { 37 | if (this.reason) { 38 | throw this.reason; 39 | } 40 | }; 41 | 42 | /** 43 | * Returns an object that contains a new `CancelToken` and a function that, when called, 44 | * cancels the `CancelToken`. 45 | */ 46 | CancelToken.source = function source() { 47 | var cancel; 48 | var token = new CancelToken(function executor(c) { 49 | cancel = c; 50 | }); 51 | return { 52 | token: token, 53 | cancel: cancel 54 | }; 55 | }; 56 | 57 | module.exports = CancelToken; 58 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/cancel/isCancel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function isCancel(value) { 4 | return !!(value && value.__CANCEL__); 5 | }; 6 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/Axios.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var defaults = require('./../defaults'); 4 | var utils = require('./../utils'); 5 | var InterceptorManager = require('./InterceptorManager'); 6 | var dispatchRequest = require('./dispatchRequest'); 7 | 8 | /** 9 | * Create a new instance of Axios 10 | * 11 | * @param {Object} instanceConfig The default config for the instance 12 | */ 13 | function Axios(instanceConfig) { 14 | this.defaults = instanceConfig; 15 | this.interceptors = { 16 | request: new InterceptorManager(), 17 | response: new InterceptorManager() 18 | }; 19 | } 20 | 21 | /** 22 | * Dispatch a request 23 | * 24 | * @param {Object} config The config specific for this request (merged with this.defaults) 25 | */ 26 | Axios.prototype.request = function request(config) { 27 | /*eslint no-param-reassign:0*/ 28 | // Allow for axios('example/url'[, config]) a la fetch API 29 | if (typeof config === 'string') { 30 | config = utils.merge({ 31 | url: arguments[0] 32 | }, arguments[1]); 33 | } 34 | 35 | config = utils.merge(defaults, {method: 'get'}, this.defaults, config); 36 | config.method = config.method.toLowerCase(); 37 | 38 | // Hook up interceptors middleware 39 | var chain = [dispatchRequest, undefined]; 40 | var promise = Promise.resolve(config); 41 | 42 | this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) { 43 | chain.unshift(interceptor.fulfilled, interceptor.rejected); 44 | }); 45 | 46 | this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) { 47 | chain.push(interceptor.fulfilled, interceptor.rejected); 48 | }); 49 | 50 | while (chain.length) { 51 | promise = promise.then(chain.shift(), chain.shift()); 52 | } 53 | 54 | return promise; 55 | }; 56 | 57 | // Provide aliases for supported request methods 58 | utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) { 59 | /*eslint func-names:0*/ 60 | Axios.prototype[method] = function(url, config) { 61 | return this.request(utils.merge(config || {}, { 62 | method: method, 63 | url: url 64 | })); 65 | }; 66 | }); 67 | 68 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 69 | /*eslint func-names:0*/ 70 | Axios.prototype[method] = function(url, data, config) { 71 | return this.request(utils.merge(config || {}, { 72 | method: method, 73 | url: url, 74 | data: data 75 | })); 76 | }; 77 | }); 78 | 79 | module.exports = Axios; 80 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/InterceptorManager.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | function InterceptorManager() { 6 | this.handlers = []; 7 | } 8 | 9 | /** 10 | * Add a new interceptor to the stack 11 | * 12 | * @param {Function} fulfilled The function to handle `then` for a `Promise` 13 | * @param {Function} rejected The function to handle `reject` for a `Promise` 14 | * 15 | * @return {Number} An ID used to remove interceptor later 16 | */ 17 | InterceptorManager.prototype.use = function use(fulfilled, rejected) { 18 | this.handlers.push({ 19 | fulfilled: fulfilled, 20 | rejected: rejected 21 | }); 22 | return this.handlers.length - 1; 23 | }; 24 | 25 | /** 26 | * Remove an interceptor from the stack 27 | * 28 | * @param {Number} id The ID that was returned by `use` 29 | */ 30 | InterceptorManager.prototype.eject = function eject(id) { 31 | if (this.handlers[id]) { 32 | this.handlers[id] = null; 33 | } 34 | }; 35 | 36 | /** 37 | * Iterate over all the registered interceptors 38 | * 39 | * This method is particularly useful for skipping over any 40 | * interceptors that may have become `null` calling `eject`. 41 | * 42 | * @param {Function} fn The function to call for each interceptor 43 | */ 44 | InterceptorManager.prototype.forEach = function forEach(fn) { 45 | utils.forEach(this.handlers, function forEachHandler(h) { 46 | if (h !== null) { 47 | fn(h); 48 | } 49 | }); 50 | }; 51 | 52 | module.exports = InterceptorManager; 53 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/README.md: -------------------------------------------------------------------------------- 1 | # axios // core 2 | 3 | The modules found in `core/` should be modules that are specific to the domain logic of axios. These modules would most likely not make sense to be consumed outside of the axios module, as their logic is too specific. Some examples of core modules are: 4 | 5 | - Dispatching requests 6 | - Managing interceptors 7 | - Handling config 8 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/createError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var enhanceError = require('./enhanceError'); 4 | 5 | /** 6 | * Create an Error with the specified message, config, error code, request and response. 7 | * 8 | * @param {string} message The error message. 9 | * @param {Object} config The config. 10 | * @param {string} [code] The error code (for example, 'ECONNABORTED'). 11 | * @param {Object} [request] The request. 12 | * @param {Object} [response] The response. 13 | * @returns {Error} The created error. 14 | */ 15 | module.exports = function createError(message, config, code, request, response) { 16 | var error = new Error(message); 17 | return enhanceError(error, config, code, request, response); 18 | }; 19 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/dispatchRequest.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | var transformData = require('./transformData'); 5 | var isCancel = require('../cancel/isCancel'); 6 | var defaults = require('../defaults'); 7 | var isAbsoluteURL = require('./../helpers/isAbsoluteURL'); 8 | var combineURLs = require('./../helpers/combineURLs'); 9 | 10 | /** 11 | * Throws a `Cancel` if cancellation has been requested. 12 | */ 13 | function throwIfCancellationRequested(config) { 14 | if (config.cancelToken) { 15 | config.cancelToken.throwIfRequested(); 16 | } 17 | } 18 | 19 | /** 20 | * Dispatch a request to the server using the configured adapter. 21 | * 22 | * @param {object} config The config that is to be used for the request 23 | * @returns {Promise} The Promise to be fulfilled 24 | */ 25 | module.exports = function dispatchRequest(config) { 26 | throwIfCancellationRequested(config); 27 | 28 | // Support baseURL config 29 | if (config.baseURL && !isAbsoluteURL(config.url)) { 30 | config.url = combineURLs(config.baseURL, config.url); 31 | } 32 | 33 | // Ensure headers exist 34 | config.headers = config.headers || {}; 35 | 36 | // Transform request data 37 | config.data = transformData( 38 | config.data, 39 | config.headers, 40 | config.transformRequest 41 | ); 42 | 43 | // Flatten headers 44 | config.headers = utils.merge( 45 | config.headers.common || {}, 46 | config.headers[config.method] || {}, 47 | config.headers || {} 48 | ); 49 | 50 | utils.forEach( 51 | ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], 52 | function cleanHeaderConfig(method) { 53 | delete config.headers[method]; 54 | } 55 | ); 56 | 57 | var adapter = config.adapter || defaults.adapter; 58 | 59 | return adapter(config).then(function onAdapterResolution(response) { 60 | throwIfCancellationRequested(config); 61 | 62 | // Transform response data 63 | response.data = transformData( 64 | response.data, 65 | response.headers, 66 | config.transformResponse 67 | ); 68 | 69 | return response; 70 | }, function onAdapterRejection(reason) { 71 | if (!isCancel(reason)) { 72 | throwIfCancellationRequested(config); 73 | 74 | // Transform response data 75 | if (reason && reason.response) { 76 | reason.response.data = transformData( 77 | reason.response.data, 78 | reason.response.headers, 79 | config.transformResponse 80 | ); 81 | } 82 | } 83 | 84 | return Promise.reject(reason); 85 | }); 86 | }; 87 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/enhanceError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Update an Error with the specified config, error code, and response. 5 | * 6 | * @param {Error} error The error to update. 7 | * @param {Object} config The config. 8 | * @param {string} [code] The error code (for example, 'ECONNABORTED'). 9 | * @param {Object} [request] The request. 10 | * @param {Object} [response] The response. 11 | * @returns {Error} The error. 12 | */ 13 | module.exports = function enhanceError(error, config, code, request, response) { 14 | error.config = config; 15 | if (code) { 16 | error.code = code; 17 | } 18 | error.request = request; 19 | error.response = response; 20 | return error; 21 | }; 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/settle.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var createError = require('./createError'); 4 | 5 | /** 6 | * Resolve or reject a Promise based on response status. 7 | * 8 | * @param {Function} resolve A function that resolves the promise. 9 | * @param {Function} reject A function that rejects the promise. 10 | * @param {object} response The response. 11 | */ 12 | module.exports = function settle(resolve, reject, response) { 13 | var validateStatus = response.config.validateStatus; 14 | // Note: status is not exposed by XDomainRequest 15 | if (!response.status || !validateStatus || validateStatus(response.status)) { 16 | resolve(response); 17 | } else { 18 | reject(createError( 19 | 'Request failed with status code ' + response.status, 20 | response.config, 21 | null, 22 | response.request, 23 | response 24 | )); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/core/transformData.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | /** 6 | * Transform the data for a request or a response 7 | * 8 | * @param {Object|String} data The data to be transformed 9 | * @param {Array} headers The headers for the request or response 10 | * @param {Array|Function} fns A single function or Array of functions 11 | * @returns {*} The resulting transformed data 12 | */ 13 | module.exports = function transformData(data, headers, fns) { 14 | /*eslint no-param-reassign:0*/ 15 | utils.forEach(fns, function transform(fn) { 16 | data = fn(data, headers); 17 | }); 18 | 19 | return data; 20 | }; 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/defaults.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./utils'); 4 | var normalizeHeaderName = require('./helpers/normalizeHeaderName'); 5 | 6 | var DEFAULT_CONTENT_TYPE = { 7 | 'Content-Type': 'application/x-www-form-urlencoded' 8 | }; 9 | 10 | function setContentTypeIfUnset(headers, value) { 11 | if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) { 12 | headers['Content-Type'] = value; 13 | } 14 | } 15 | 16 | function getDefaultAdapter() { 17 | var adapter; 18 | if (typeof XMLHttpRequest !== 'undefined') { 19 | // For browsers use XHR adapter 20 | adapter = require('./adapters/xhr'); 21 | } else if (typeof process !== 'undefined') { 22 | // For node use HTTP adapter 23 | adapter = require('./adapters/http'); 24 | } 25 | return adapter; 26 | } 27 | 28 | var defaults = { 29 | adapter: getDefaultAdapter(), 30 | 31 | transformRequest: [function transformRequest(data, headers) { 32 | normalizeHeaderName(headers, 'Content-Type'); 33 | if (utils.isFormData(data) || 34 | utils.isArrayBuffer(data) || 35 | utils.isBuffer(data) || 36 | utils.isStream(data) || 37 | utils.isFile(data) || 38 | utils.isBlob(data) 39 | ) { 40 | return data; 41 | } 42 | if (utils.isArrayBufferView(data)) { 43 | return data.buffer; 44 | } 45 | if (utils.isURLSearchParams(data)) { 46 | setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8'); 47 | return data.toString(); 48 | } 49 | if (utils.isObject(data)) { 50 | setContentTypeIfUnset(headers, 'application/json;charset=utf-8'); 51 | return JSON.stringify(data); 52 | } 53 | return data; 54 | }], 55 | 56 | transformResponse: [function transformResponse(data) { 57 | /*eslint no-param-reassign:0*/ 58 | if (typeof data === 'string') { 59 | try { 60 | data = JSON.parse(data); 61 | } catch (e) { /* Ignore */ } 62 | } 63 | return data; 64 | }], 65 | 66 | /** 67 | * A timeout in milliseconds to abort a request. If set to 0 (default) a 68 | * timeout is not created. 69 | */ 70 | timeout: 0, 71 | 72 | xsrfCookieName: 'XSRF-TOKEN', 73 | xsrfHeaderName: 'X-XSRF-TOKEN', 74 | 75 | maxContentLength: -1, 76 | 77 | validateStatus: function validateStatus(status) { 78 | return status >= 200 && status < 300; 79 | } 80 | }; 81 | 82 | defaults.headers = { 83 | common: { 84 | 'Accept': 'application/json, text/plain, */*' 85 | } 86 | }; 87 | 88 | utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) { 89 | defaults.headers[method] = {}; 90 | }); 91 | 92 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) { 93 | defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE); 94 | }); 95 | 96 | module.exports = defaults; 97 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/README.md: -------------------------------------------------------------------------------- 1 | # axios // helpers 2 | 3 | The modules found in `helpers/` should be generic modules that are _not_ specific to the domain logic of axios. These modules could theoretically be published to npm on their own and consumed by other modules or apps. Some examples of generic modules are things like: 4 | 5 | - Browser polyfills 6 | - Managing cookies 7 | - Parsing HTTP headers 8 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/bind.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = function bind(fn, thisArg) { 4 | return function wrap() { 5 | var args = new Array(arguments.length); 6 | for (var i = 0; i < args.length; i++) { 7 | args[i] = arguments[i]; 8 | } 9 | return fn.apply(thisArg, args); 10 | }; 11 | }; 12 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/btoa.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js 4 | 5 | var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; 6 | 7 | function E() { 8 | this.message = 'String contains an invalid character'; 9 | } 10 | E.prototype = new Error; 11 | E.prototype.code = 5; 12 | E.prototype.name = 'InvalidCharacterError'; 13 | 14 | function btoa(input) { 15 | var str = String(input); 16 | var output = ''; 17 | for ( 18 | // initialize result and counter 19 | var block, charCode, idx = 0, map = chars; 20 | // if the next str index does not exist: 21 | // change the mapping table to "=" 22 | // check if d has no fractional digits 23 | str.charAt(idx | 0) || (map = '=', idx % 1); 24 | // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 25 | output += map.charAt(63 & block >> 8 - idx % 1 * 8) 26 | ) { 27 | charCode = str.charCodeAt(idx += 3 / 4); 28 | if (charCode > 0xFF) { 29 | throw new E(); 30 | } 31 | block = block << 8 | charCode; 32 | } 33 | return output; 34 | } 35 | 36 | module.exports = btoa; 37 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/buildURL.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | function encode(val) { 6 | return encodeURIComponent(val). 7 | replace(/%40/gi, '@'). 8 | replace(/%3A/gi, ':'). 9 | replace(/%24/g, '$'). 10 | replace(/%2C/gi, ','). 11 | replace(/%20/g, '+'). 12 | replace(/%5B/gi, '['). 13 | replace(/%5D/gi, ']'); 14 | } 15 | 16 | /** 17 | * Build a URL by appending params to the end 18 | * 19 | * @param {string} url The base of the url (e.g., http://www.google.com) 20 | * @param {object} [params] The params to be appended 21 | * @returns {string} The formatted url 22 | */ 23 | module.exports = function buildURL(url, params, paramsSerializer) { 24 | /*eslint no-param-reassign:0*/ 25 | if (!params) { 26 | return url; 27 | } 28 | 29 | var serializedParams; 30 | if (paramsSerializer) { 31 | serializedParams = paramsSerializer(params); 32 | } else if (utils.isURLSearchParams(params)) { 33 | serializedParams = params.toString(); 34 | } else { 35 | var parts = []; 36 | 37 | utils.forEach(params, function serialize(val, key) { 38 | if (val === null || typeof val === 'undefined') { 39 | return; 40 | } 41 | 42 | if (utils.isArray(val)) { 43 | key = key + '[]'; 44 | } else { 45 | val = [val]; 46 | } 47 | 48 | utils.forEach(val, function parseValue(v) { 49 | if (utils.isDate(v)) { 50 | v = v.toISOString(); 51 | } else if (utils.isObject(v)) { 52 | v = JSON.stringify(v); 53 | } 54 | parts.push(encode(key) + '=' + encode(v)); 55 | }); 56 | }); 57 | 58 | serializedParams = parts.join('&'); 59 | } 60 | 61 | if (serializedParams) { 62 | url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams; 63 | } 64 | 65 | return url; 66 | }; 67 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/combineURLs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Creates a new URL by combining the specified URLs 5 | * 6 | * @param {string} baseURL The base URL 7 | * @param {string} relativeURL The relative URL 8 | * @returns {string} The combined URL 9 | */ 10 | module.exports = function combineURLs(baseURL, relativeURL) { 11 | return relativeURL 12 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') 13 | : baseURL; 14 | }; 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/cookies.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | module.exports = ( 6 | utils.isStandardBrowserEnv() ? 7 | 8 | // Standard browser envs support document.cookie 9 | (function standardBrowserEnv() { 10 | return { 11 | write: function write(name, value, expires, path, domain, secure) { 12 | var cookie = []; 13 | cookie.push(name + '=' + encodeURIComponent(value)); 14 | 15 | if (utils.isNumber(expires)) { 16 | cookie.push('expires=' + new Date(expires).toGMTString()); 17 | } 18 | 19 | if (utils.isString(path)) { 20 | cookie.push('path=' + path); 21 | } 22 | 23 | if (utils.isString(domain)) { 24 | cookie.push('domain=' + domain); 25 | } 26 | 27 | if (secure === true) { 28 | cookie.push('secure'); 29 | } 30 | 31 | document.cookie = cookie.join('; '); 32 | }, 33 | 34 | read: function read(name) { 35 | var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); 36 | return (match ? decodeURIComponent(match[3]) : null); 37 | }, 38 | 39 | remove: function remove(name) { 40 | this.write(name, '', Date.now() - 86400000); 41 | } 42 | }; 43 | })() : 44 | 45 | // Non standard browser env (web workers, react-native) lack needed support. 46 | (function nonStandardBrowserEnv() { 47 | return { 48 | write: function write() {}, 49 | read: function read() { return null; }, 50 | remove: function remove() {} 51 | }; 52 | })() 53 | ); 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/deprecatedMethod.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /*eslint no-console:0*/ 4 | 5 | /** 6 | * Supply a warning to the developer that a method they are using 7 | * has been deprecated. 8 | * 9 | * @param {string} method The name of the deprecated method 10 | * @param {string} [instead] The alternate method to use if applicable 11 | * @param {string} [docs] The documentation URL to get further details 12 | */ 13 | module.exports = function deprecatedMethod(method, instead, docs) { 14 | try { 15 | console.warn( 16 | 'DEPRECATED method `' + method + '`.' + 17 | (instead ? ' Use `' + instead + '` instead.' : '') + 18 | ' This method will be removed in a future release.'); 19 | 20 | if (docs) { 21 | console.warn('For more information about usage see ' + docs); 22 | } 23 | } catch (e) { /* Ignore */ } 24 | }; 25 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/isAbsoluteURL.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Determines whether the specified URL is absolute 5 | * 6 | * @param {string} url The URL to test 7 | * @returns {boolean} True if the specified URL is absolute, otherwise false 8 | */ 9 | module.exports = function isAbsoluteURL(url) { 10 | // A URL is considered absolute if it begins with "://" or "//" (protocol-relative URL). 11 | // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed 12 | // by any combination of letters, digits, plus, period, or hyphen. 13 | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); 14 | }; 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/isURLSameOrigin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | module.exports = ( 6 | utils.isStandardBrowserEnv() ? 7 | 8 | // Standard browser envs have full support of the APIs needed to test 9 | // whether the request URL is of the same origin as current location. 10 | (function standardBrowserEnv() { 11 | var msie = /(msie|trident)/i.test(navigator.userAgent); 12 | var urlParsingNode = document.createElement('a'); 13 | var originURL; 14 | 15 | /** 16 | * Parse a URL to discover it's components 17 | * 18 | * @param {String} url The URL to be parsed 19 | * @returns {Object} 20 | */ 21 | function resolveURL(url) { 22 | var href = url; 23 | 24 | if (msie) { 25 | // IE needs attribute set twice to normalize properties 26 | urlParsingNode.setAttribute('href', href); 27 | href = urlParsingNode.href; 28 | } 29 | 30 | urlParsingNode.setAttribute('href', href); 31 | 32 | // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils 33 | return { 34 | href: urlParsingNode.href, 35 | protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '', 36 | host: urlParsingNode.host, 37 | search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '', 38 | hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '', 39 | hostname: urlParsingNode.hostname, 40 | port: urlParsingNode.port, 41 | pathname: (urlParsingNode.pathname.charAt(0) === '/') ? 42 | urlParsingNode.pathname : 43 | '/' + urlParsingNode.pathname 44 | }; 45 | } 46 | 47 | originURL = resolveURL(window.location.href); 48 | 49 | /** 50 | * Determine if a URL shares the same origin as the current location 51 | * 52 | * @param {String} requestURL The URL to test 53 | * @returns {boolean} True if URL shares the same origin, otherwise false 54 | */ 55 | return function isURLSameOrigin(requestURL) { 56 | var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL; 57 | return (parsed.protocol === originURL.protocol && 58 | parsed.host === originURL.host); 59 | }; 60 | })() : 61 | 62 | // Non standard browser envs (web workers, react-native) lack needed support. 63 | (function nonStandardBrowserEnv() { 64 | return function isURLSameOrigin() { 65 | return true; 66 | }; 67 | })() 68 | ); 69 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/normalizeHeaderName.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('../utils'); 4 | 5 | module.exports = function normalizeHeaderName(headers, normalizedName) { 6 | utils.forEach(headers, function processHeader(value, name) { 7 | if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) { 8 | headers[normalizedName] = value; 9 | delete headers[name]; 10 | } 11 | }); 12 | }; 13 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/parseHeaders.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var utils = require('./../utils'); 4 | 5 | // Headers whose duplicates are ignored by node 6 | // c.f. https://nodejs.org/api/http.html#http_message_headers 7 | var ignoreDuplicateOf = [ 8 | 'age', 'authorization', 'content-length', 'content-type', 'etag', 9 | 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 10 | 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 11 | 'referer', 'retry-after', 'user-agent' 12 | ]; 13 | 14 | /** 15 | * Parse headers into an object 16 | * 17 | * ``` 18 | * Date: Wed, 27 Aug 2014 08:58:49 GMT 19 | * Content-Type: application/json 20 | * Connection: keep-alive 21 | * Transfer-Encoding: chunked 22 | * ``` 23 | * 24 | * @param {String} headers Headers needing to be parsed 25 | * @returns {Object} Headers parsed into an object 26 | */ 27 | module.exports = function parseHeaders(headers) { 28 | var parsed = {}; 29 | var key; 30 | var val; 31 | var i; 32 | 33 | if (!headers) { return parsed; } 34 | 35 | utils.forEach(headers.split('\n'), function parser(line) { 36 | i = line.indexOf(':'); 37 | key = utils.trim(line.substr(0, i)).toLowerCase(); 38 | val = utils.trim(line.substr(i + 1)); 39 | 40 | if (key) { 41 | if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) { 42 | return; 43 | } 44 | if (key === 'set-cookie') { 45 | parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]); 46 | } else { 47 | parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val; 48 | } 49 | } 50 | }); 51 | 52 | return parsed; 53 | }; 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/lib/helpers/spread.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Syntactic sugar for invoking a function and expanding an array for arguments. 5 | * 6 | * Common use case would be to use `Function.prototype.apply`. 7 | * 8 | * ```js 9 | * function f(x, y, z) {} 10 | * var args = [1, 2, 3]; 11 | * f.apply(null, args); 12 | * ``` 13 | * 14 | * With `spread` this example can be re-written. 15 | * 16 | * ```js 17 | * spread(function(x, y, z) {})([1, 2, 3]); 18 | * ``` 19 | * 20 | * @param {Function} callback 21 | * @returns {Function} 22 | */ 23 | module.exports = function spread(callback) { 24 | return function wrap(arr) { 25 | return callback.apply(null, arr); 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017 Olivier Lalonde , James Talmage , Ruben Verborgh 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/http.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").http; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/https.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").https; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "globals": { 7 | "chrome": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "no-empty": [1, { "allowEmptyCatch": true }] 12 | }, 13 | "extends": "eslint:recommended" 14 | } 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "8" 9 | 10 | install: 11 | - make install 12 | 13 | script: 14 | - make lint 15 | - make test 16 | 17 | matrix: 18 | include: 19 | - node_js: '8' 20 | env: BROWSER=1 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | install: node_modules 19 | 20 | browser: dist/debug.js 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | dist/debug.js: src/*.js node_modules 27 | @mkdir -p dist 28 | @$(BROWSERIFY) \ 29 | --standalone debug \ 30 | . > dist/debug.js 31 | 32 | lint: 33 | @eslint *.js src/*.js 34 | 35 | test-node: 36 | @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 37 | @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 38 | 39 | test-browser: 40 | @$(MAKE) browser 41 | @karma start --single-run 42 | 43 | test-all: 44 | @concurrently \ 45 | "make test-node" \ 46 | "make test-browser" 47 | 48 | test: 49 | @if [ "x$(BROWSER)" = "x" ]; then \ 50 | $(MAKE) test-node; \ 51 | else \ 52 | $(MAKE) test-browser; \ 53 | fi 54 | 55 | clean: 56 | rimraf dist coverage 57 | 58 | .PHONY: browser install clean lint test test-all test-node test-browser 59 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "version": "3.1.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/visionmedia/debug.git" 7 | }, 8 | "description": "small debugging utility", 9 | "keywords": [ 10 | "debug", 11 | "log", 12 | "debugger" 13 | ], 14 | "author": "TJ Holowaychuk ", 15 | "contributors": [ 16 | "Nathan Rajlich (http://n8.io)", 17 | "Andrew Rhyne " 18 | ], 19 | "license": "MIT", 20 | "dependencies": { 21 | "ms": "2.0.0" 22 | }, 23 | "devDependencies": { 24 | "browserify": "14.4.0", 25 | "chai": "^3.5.0", 26 | "concurrently": "^3.1.0", 27 | "coveralls": "^2.11.15", 28 | "eslint": "^3.12.1", 29 | "istanbul": "^0.4.5", 30 | "karma": "^1.3.0", 31 | "karma-chai": "^0.1.0", 32 | "karma-mocha": "^1.3.0", 33 | "karma-phantomjs-launcher": "^1.0.2", 34 | "karma-sinon": "^1.0.5", 35 | "mocha": "^3.2.0", 36 | "mocha-lcov-reporter": "^1.2.0", 37 | "rimraf": "^2.5.4", 38 | "sinon": "^1.17.6", 39 | "sinon-chai": "^2.8.0" 40 | }, 41 | "main": "./src/index.js", 42 | "browser": "./src/browser.js", 43 | "_from": "debug@3.1.0", 44 | "_resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz" 45 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process === 'undefined' || process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/follow-redirects/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "follow-redirects", 3 | "version": "1.4.1", 4 | "description": "HTTP and HTTPS modules that follow redirects.", 5 | "main": "index.js", 6 | "engines": { 7 | "node": ">=4.0" 8 | }, 9 | "scripts": { 10 | "test": "npm run lint && npm run mocha", 11 | "lint": "eslint *.js test", 12 | "mocha": "nyc mocha" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git@github.com:olalonde/follow-redirects.git" 17 | }, 18 | "homepage": "https://github.com/olalonde/follow-redirects", 19 | "bugs": { 20 | "url": "https://github.com/olalonde/follow-redirects/issues" 21 | }, 22 | "keywords": [ 23 | "http", 24 | "https", 25 | "url", 26 | "redirect", 27 | "client", 28 | "location", 29 | "utility" 30 | ], 31 | "author": { 32 | "name": "Olivier Lalonde", 33 | "email": "olalonde@gmail.com", 34 | "url": "http://www.syskall.com" 35 | }, 36 | "contributors": [ 37 | "James Talmage ", 38 | "Ruben Verborgh (https://ruben.verborgh.org/)" 39 | ], 40 | "files": [ 41 | "index.js", 42 | "create.js", 43 | "http.js", 44 | "https.js" 45 | ], 46 | "dependencies": { 47 | "debug": "^3.1.0" 48 | }, 49 | "devDependencies": { 50 | "bluebird": "^3.5.1", 51 | "concat-stream": "^1.6.0", 52 | "coveralls": "^3.0.0", 53 | "eslint": "^4.16.0", 54 | "express": "^4.16.2", 55 | "mocha": "^5.0.0", 56 | "nyc": "^11.4.1" 57 | }, 58 | "license": "MIT", 59 | "nyc": { 60 | "reporter": [ 61 | "lcov", 62 | "text" 63 | ] 64 | }, 65 | "_from": "follow-redirects@1.4.1", 66 | "_resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.4.1.tgz" 67 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/is-buffer/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/is-buffer/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/is-buffer/README.md: -------------------------------------------------------------------------------- 1 | # is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] 2 | 3 | [travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg 4 | [travis-url]: https://travis-ci.org/feross/is-buffer 5 | [npm-image]: https://img.shields.io/npm/v/is-buffer.svg 6 | [npm-url]: https://npmjs.org/package/is-buffer 7 | [downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg 8 | [downloads-url]: https://npmjs.org/package/is-buffer 9 | [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg 10 | [standard-url]: https://standardjs.com 11 | 12 | #### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) 13 | 14 | [![saucelabs][saucelabs-image]][saucelabs-url] 15 | 16 | [saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg 17 | [saucelabs-url]: https://saucelabs.com/u/is-buffer 18 | 19 | ## Why not use `Buffer.isBuffer`? 20 | 21 | This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). 22 | 23 | It's future-proof and works in node too! 24 | 25 | ## install 26 | 27 | ```bash 28 | npm install is-buffer 29 | ``` 30 | 31 | ## usage 32 | 33 | ```js 34 | var isBuffer = require('is-buffer') 35 | 36 | isBuffer(new Buffer(4)) // true 37 | 38 | isBuffer(undefined) // false 39 | isBuffer(null) // false 40 | isBuffer('') // false 41 | isBuffer(true) // false 42 | isBuffer(false) // false 43 | isBuffer(0) // false 44 | isBuffer(1) // false 45 | isBuffer(1.0) // false 46 | isBuffer('string') // false 47 | isBuffer({}) // false 48 | isBuffer(function foo () {}) // false 49 | ``` 50 | 51 | ## license 52 | 53 | MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/is-buffer/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Determine if an object is a Buffer 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | // The _isBuffer check is for Safari 5-7 support, because it's missing 9 | // Object.prototype.constructor. Remove this eventually 10 | module.exports = function (obj) { 11 | return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) 12 | } 13 | 14 | function isBuffer (obj) { 15 | return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) 16 | } 17 | 18 | // For Node v0.10 support. Remove this eventually. 19 | function isSlowBuffer (obj) { 20 | return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) 21 | } 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/is-buffer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-buffer", 3 | "description": "Determine if an object is a Buffer", 4 | "version": "1.1.6", 5 | "author": { 6 | "name": "Feross Aboukhadijeh", 7 | "email": "feross@feross.org", 8 | "url": "http://feross.org/" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/feross/is-buffer/issues" 12 | }, 13 | "dependencies": {}, 14 | "devDependencies": { 15 | "standard": "*", 16 | "tape": "^4.0.0", 17 | "zuul": "^3.0.0" 18 | }, 19 | "keywords": [ 20 | "buffer", 21 | "buffers", 22 | "type", 23 | "core buffer", 24 | "browser buffer", 25 | "browserify", 26 | "typed array", 27 | "uint32array", 28 | "int16array", 29 | "int32array", 30 | "float32array", 31 | "float64array", 32 | "browser", 33 | "arraybuffer", 34 | "dataview" 35 | ], 36 | "license": "MIT", 37 | "main": "index.js", 38 | "repository": { 39 | "type": "git", 40 | "url": "git://github.com/feross/is-buffer.git" 41 | }, 42 | "scripts": { 43 | "test": "standard && npm run test-node && npm run test-browser", 44 | "test-browser": "zuul -- test/*.js", 45 | "test-browser-local": "zuul --local -- test/*.js", 46 | "test-node": "tape test/*.js" 47 | }, 48 | "testling": { 49 | "files": "test/*.js" 50 | }, 51 | "_from": "is-buffer@1.1.6", 52 | "_resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz" 53 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/node_modules/is-buffer/test/basic.js: -------------------------------------------------------------------------------- 1 | var isBuffer = require('../') 2 | var test = require('tape') 3 | 4 | test('is-buffer', function (t) { 5 | t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') 6 | t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') 7 | 8 | t.equal(isBuffer(undefined), false, 'undefined') 9 | t.equal(isBuffer(null), false, 'null') 10 | t.equal(isBuffer(''), false, 'empty string') 11 | t.equal(isBuffer(true), false, 'true') 12 | t.equal(isBuffer(false), false, 'false') 13 | t.equal(isBuffer(0), false, '0') 14 | t.equal(isBuffer(1), false, '1') 15 | t.equal(isBuffer(1.0), false, '1.0') 16 | t.equal(isBuffer('string'), false, 'string') 17 | t.equal(isBuffer({}), false, '{}') 18 | t.equal(isBuffer([]), false, '[]') 19 | t.equal(isBuffer(function foo () {}), false, 'function foo () {}') 20 | t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') 21 | t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') 22 | 23 | t.end() 24 | }) 25 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/axios/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "axios", 3 | "version": "0.18.0", 4 | "description": "Promise based HTTP client for the browser and node.js", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "grunt test && bundlesize", 8 | "start": "node ./sandbox/server.js", 9 | "build": "NODE_ENV=production grunt build", 10 | "preversion": "npm test", 11 | "version": "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json", 12 | "postversion": "git push && git push --tags", 13 | "examples": "node ./examples/server.js", 14 | "coveralls": "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/axios/axios.git" 19 | }, 20 | "keywords": [ 21 | "xhr", 22 | "http", 23 | "ajax", 24 | "promise", 25 | "node" 26 | ], 27 | "author": "Matt Zabriskie", 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/axios/axios/issues" 31 | }, 32 | "homepage": "https://github.com/axios/axios", 33 | "devDependencies": { 34 | "bundlesize": "^0.5.7", 35 | "coveralls": "^2.11.9", 36 | "es6-promise": "^4.0.5", 37 | "grunt": "^1.0.1", 38 | "grunt-banner": "^0.6.0", 39 | "grunt-cli": "^1.2.0", 40 | "grunt-contrib-clean": "^1.0.0", 41 | "grunt-contrib-nodeunit": "^1.0.0", 42 | "grunt-contrib-watch": "^1.0.0", 43 | "grunt-eslint": "^19.0.0", 44 | "grunt-karma": "^2.0.0", 45 | "grunt-ts": "^6.0.0-beta.3", 46 | "grunt-webpack": "^1.0.18", 47 | "istanbul-instrumenter-loader": "^1.0.0", 48 | "jasmine-core": "^2.4.1", 49 | "karma": "^1.3.0", 50 | "karma-chrome-launcher": "^2.0.0", 51 | "karma-coverage": "^1.0.0", 52 | "karma-firefox-launcher": "^1.0.0", 53 | "karma-jasmine": "^1.0.2", 54 | "karma-jasmine-ajax": "^0.1.13", 55 | "karma-opera-launcher": "^1.0.0", 56 | "karma-safari-launcher": "^1.0.0", 57 | "karma-sauce-launcher": "^1.1.0", 58 | "karma-sinon": "^1.0.5", 59 | "karma-sourcemap-loader": "^0.3.7", 60 | "karma-webpack": "^1.7.0", 61 | "load-grunt-tasks": "^3.5.2", 62 | "minimist": "^1.2.0", 63 | "sinon": "^1.17.4", 64 | "webpack": "^1.13.1", 65 | "webpack-dev-server": "^1.14.1", 66 | "url-search-params": "^0.6.1", 67 | "typescript": "^2.0.3" 68 | }, 69 | "browser": { 70 | "./lib/adapters/http.js": "./lib/adapters/xhr.js" 71 | }, 72 | "typings": "./index.d.ts", 73 | "dependencies": { 74 | "follow-redirects": "^1.3.0", 75 | "is-buffer": "^1.1.5" 76 | }, 77 | "bundlesize": [ 78 | { 79 | "path": "./dist/axios.min.js", 80 | "threshold": "5kB" 81 | } 82 | ], 83 | "_from": "axios@0.18.0", 84 | "_resolved": "http://registry.npm.taobao.org/axios/download/axios-0.18.0.tgz" 85 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "globals": { 7 | "chrome": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "no-empty": [1, { "allowEmptyCatch": true }] 12 | }, 13 | "extends": "eslint:recommended" 14 | } 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "8" 9 | 10 | install: 11 | - make install 12 | 13 | script: 14 | - make lint 15 | - make test 16 | 17 | matrix: 18 | include: 19 | - node_js: '8' 20 | env: BROWSER=1 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | install: node_modules 19 | 20 | browser: dist/debug.js 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | dist/debug.js: src/*.js node_modules 27 | @mkdir -p dist 28 | @$(BROWSERIFY) \ 29 | --standalone debug \ 30 | . > dist/debug.js 31 | 32 | lint: 33 | @eslint *.js src/*.js 34 | 35 | test-node: 36 | @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 37 | @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 38 | 39 | test-browser: 40 | @$(MAKE) browser 41 | @karma start --single-run 42 | 43 | test-all: 44 | @concurrently \ 45 | "make test-node" \ 46 | "make test-browser" 47 | 48 | test: 49 | @if [ "x$(BROWSER)" = "x" ]; then \ 50 | $(MAKE) test-node; \ 51 | else \ 52 | $(MAKE) test-browser; \ 53 | fi 54 | 55 | clean: 56 | rimraf dist coverage 57 | 58 | .PHONY: browser install clean lint test test-all test-node test-browser 59 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/node_modules/ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "version": "3.1.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/visionmedia/debug.git" 7 | }, 8 | "description": "small debugging utility", 9 | "keywords": [ 10 | "debug", 11 | "log", 12 | "debugger" 13 | ], 14 | "author": "TJ Holowaychuk ", 15 | "contributors": [ 16 | "Nathan Rajlich (http://n8.io)", 17 | "Andrew Rhyne " 18 | ], 19 | "license": "MIT", 20 | "dependencies": { 21 | "ms": "2.0.0" 22 | }, 23 | "devDependencies": { 24 | "browserify": "14.4.0", 25 | "chai": "^3.5.0", 26 | "concurrently": "^3.1.0", 27 | "coveralls": "^2.11.15", 28 | "eslint": "^3.12.1", 29 | "istanbul": "^0.4.5", 30 | "karma": "^1.3.0", 31 | "karma-chai": "^0.1.0", 32 | "karma-mocha": "^1.3.0", 33 | "karma-phantomjs-launcher": "^1.0.2", 34 | "karma-sinon": "^1.0.5", 35 | "mocha": "^3.2.0", 36 | "mocha-lcov-reporter": "^1.2.0", 37 | "rimraf": "^2.5.4", 38 | "sinon": "^1.17.6", 39 | "sinon-chai": "^2.8.0" 40 | }, 41 | "main": "./src/index.js", 42 | "browser": "./src/browser.js", 43 | "_from": "debug@3.1.0", 44 | "_resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz" 45 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process === 'undefined' || process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2017 Olivier Lalonde , James Talmage , Ruben Verborgh 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 7 | of the Software, and to permit persons to whom the Software is furnished to do 8 | so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/http.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").http; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/https.js: -------------------------------------------------------------------------------- 1 | module.exports = require("./").https; 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: SIAeZjKYlHK74rbcFvNHMUzjRiMpflxve 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "node": true 5 | }, 6 | "globals": { 7 | "chrome": true 8 | }, 9 | "rules": { 10 | "no-console": 0, 11 | "no-empty": [1, { "allowEmptyCatch": true }] 12 | }, 13 | "extends": "eslint:recommended" 14 | } 15 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/.npmignore: -------------------------------------------------------------------------------- 1 | support 2 | test 3 | examples 4 | example 5 | *.sock 6 | dist 7 | yarn.lock 8 | coverage 9 | bower.json 10 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - "4" 7 | - "6" 8 | - "8" 9 | 10 | install: 11 | - make install 12 | 13 | script: 14 | - make lint 15 | - make test 16 | 17 | matrix: 18 | include: 19 | - node_js: '8' 20 | env: BROWSER=1 21 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2014 TJ Holowaychuk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 7 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all copies or substantial 12 | portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 15 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 16 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 18 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | 20 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/Makefile: -------------------------------------------------------------------------------- 1 | # get Makefile directory name: http://stackoverflow.com/a/5982798/376773 2 | THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) 3 | THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) 4 | 5 | # BIN directory 6 | BIN := $(THIS_DIR)/node_modules/.bin 7 | 8 | # Path 9 | PATH := node_modules/.bin:$(PATH) 10 | SHELL := /bin/bash 11 | 12 | # applications 13 | NODE ?= $(shell which node) 14 | YARN ?= $(shell which yarn) 15 | PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm)) 16 | BROWSERIFY ?= $(NODE) $(BIN)/browserify 17 | 18 | install: node_modules 19 | 20 | browser: dist/debug.js 21 | 22 | node_modules: package.json 23 | @NODE_ENV= $(PKG) install 24 | @touch node_modules 25 | 26 | dist/debug.js: src/*.js node_modules 27 | @mkdir -p dist 28 | @$(BROWSERIFY) \ 29 | --standalone debug \ 30 | . > dist/debug.js 31 | 32 | lint: 33 | @eslint *.js src/*.js 34 | 35 | test-node: 36 | @istanbul cover node_modules/mocha/bin/_mocha -- test/**.js 37 | @cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 38 | 39 | test-browser: 40 | @$(MAKE) browser 41 | @karma start --single-run 42 | 43 | test-all: 44 | @concurrently \ 45 | "make test-node" \ 46 | "make test-browser" 47 | 48 | test: 49 | @if [ "x$(BROWSER)" = "x" ]; then \ 50 | $(MAKE) test-node; \ 51 | else \ 52 | $(MAKE) test-browser; \ 53 | fi 54 | 55 | clean: 56 | rimraf dist coverage 57 | 58 | .PHONY: browser install clean lint test test-all test-node test-browser 59 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // Generated on Fri Dec 16 2016 13:09:51 GMT+0000 (UTC) 3 | 4 | module.exports = function(config) { 5 | config.set({ 6 | 7 | // base path that will be used to resolve all patterns (eg. files, exclude) 8 | basePath: '', 9 | 10 | 11 | // frameworks to use 12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter 13 | frameworks: ['mocha', 'chai', 'sinon'], 14 | 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'dist/debug.js', 19 | 'test/*spec.js' 20 | ], 21 | 22 | 23 | // list of files to exclude 24 | exclude: [ 25 | 'src/node.js' 26 | ], 27 | 28 | 29 | // preprocess matching files before serving them to the browser 30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor 31 | preprocessors: { 32 | }, 33 | 34 | // test results reporter to use 35 | // possible values: 'dots', 'progress' 36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter 37 | reporters: ['progress'], 38 | 39 | 40 | // web server port 41 | port: 9876, 42 | 43 | 44 | // enable / disable colors in the output (reporters and logs) 45 | colors: true, 46 | 47 | 48 | // level of logging 49 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 50 | logLevel: config.LOG_INFO, 51 | 52 | 53 | // enable / disable watching file and executing tests whenever any file changes 54 | autoWatch: true, 55 | 56 | 57 | // start these browsers 58 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher 59 | browsers: ['PhantomJS'], 60 | 61 | 62 | // Continuous Integration mode 63 | // if true, Karma captures browsers, runs the tests and exits 64 | singleRun: false, 65 | 66 | // Concurrency level 67 | // how many browser should be started simultaneous 68 | concurrency: Infinity 69 | }) 70 | } 71 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/node.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./src/node'); 2 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/node_modules/ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "debug", 3 | "version": "3.1.0", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/visionmedia/debug.git" 7 | }, 8 | "description": "small debugging utility", 9 | "keywords": [ 10 | "debug", 11 | "log", 12 | "debugger" 13 | ], 14 | "author": "TJ Holowaychuk ", 15 | "contributors": [ 16 | "Nathan Rajlich (http://n8.io)", 17 | "Andrew Rhyne " 18 | ], 19 | "license": "MIT", 20 | "dependencies": { 21 | "ms": "2.0.0" 22 | }, 23 | "devDependencies": { 24 | "browserify": "14.4.0", 25 | "chai": "^3.5.0", 26 | "concurrently": "^3.1.0", 27 | "coveralls": "^2.11.15", 28 | "eslint": "^3.12.1", 29 | "istanbul": "^0.4.5", 30 | "karma": "^1.3.0", 31 | "karma-chai": "^0.1.0", 32 | "karma-mocha": "^1.3.0", 33 | "karma-phantomjs-launcher": "^1.0.2", 34 | "karma-sinon": "^1.0.5", 35 | "mocha": "^3.2.0", 36 | "mocha-lcov-reporter": "^1.2.0", 37 | "rimraf": "^2.5.4", 38 | "sinon": "^1.17.6", 39 | "sinon-chai": "^2.8.0" 40 | }, 41 | "main": "./src/index.js", 42 | "browser": "./src/browser.js", 43 | "_from": "debug@3.1.0", 44 | "_resolved": "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz" 45 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/node_modules/debug/src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Detect Electron renderer process, which is node, but we should 3 | * treat as a browser. 4 | */ 5 | 6 | if (typeof process === 'undefined' || process.type === 'renderer') { 7 | module.exports = require('./browser.js'); 8 | } else { 9 | module.exports = require('./node.js'); 10 | } 11 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/follow-redirects/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "follow-redirects", 3 | "version": "1.4.1", 4 | "description": "HTTP and HTTPS modules that follow redirects.", 5 | "main": "index.js", 6 | "engines": { 7 | "node": ">=4.0" 8 | }, 9 | "scripts": { 10 | "test": "npm run lint && npm run mocha", 11 | "lint": "eslint *.js test", 12 | "mocha": "nyc mocha" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git@github.com:olalonde/follow-redirects.git" 17 | }, 18 | "homepage": "https://github.com/olalonde/follow-redirects", 19 | "bugs": { 20 | "url": "https://github.com/olalonde/follow-redirects/issues" 21 | }, 22 | "keywords": [ 23 | "http", 24 | "https", 25 | "url", 26 | "redirect", 27 | "client", 28 | "location", 29 | "utility" 30 | ], 31 | "author": { 32 | "name": "Olivier Lalonde", 33 | "email": "olalonde@gmail.com", 34 | "url": "http://www.syskall.com" 35 | }, 36 | "contributors": [ 37 | "James Talmage ", 38 | "Ruben Verborgh (https://ruben.verborgh.org/)" 39 | ], 40 | "files": [ 41 | "index.js", 42 | "create.js", 43 | "http.js", 44 | "https.js" 45 | ], 46 | "dependencies": { 47 | "debug": "^3.1.0" 48 | }, 49 | "devDependencies": { 50 | "bluebird": "^3.5.1", 51 | "concat-stream": "^1.6.0", 52 | "coveralls": "^3.0.0", 53 | "eslint": "^4.16.0", 54 | "express": "^4.16.2", 55 | "mocha": "^5.0.0", 56 | "nyc": "^11.4.1" 57 | }, 58 | "license": "MIT", 59 | "nyc": { 60 | "reporter": [ 61 | "lcov", 62 | "text" 63 | ] 64 | }, 65 | "_from": "follow-redirects@1.4.1", 66 | "_resolved": "http://registry.npm.taobao.org/follow-redirects/download/follow-redirects-1.4.1.tgz" 67 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/is-buffer/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:51 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/is-buffer/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Feross Aboukhadijeh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/is-buffer/README.md: -------------------------------------------------------------------------------- 1 | # is-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] 2 | 3 | [travis-image]: https://img.shields.io/travis/feross/is-buffer/master.svg 4 | [travis-url]: https://travis-ci.org/feross/is-buffer 5 | [npm-image]: https://img.shields.io/npm/v/is-buffer.svg 6 | [npm-url]: https://npmjs.org/package/is-buffer 7 | [downloads-image]: https://img.shields.io/npm/dm/is-buffer.svg 8 | [downloads-url]: https://npmjs.org/package/is-buffer 9 | [standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg 10 | [standard-url]: https://standardjs.com 11 | 12 | #### Determine if an object is a [`Buffer`](http://nodejs.org/api/buffer.html) (including the [browserify Buffer](https://github.com/feross/buffer)) 13 | 14 | [![saucelabs][saucelabs-image]][saucelabs-url] 15 | 16 | [saucelabs-image]: https://saucelabs.com/browser-matrix/is-buffer.svg 17 | [saucelabs-url]: https://saucelabs.com/u/is-buffer 18 | 19 | ## Why not use `Buffer.isBuffer`? 20 | 21 | This module lets you check if an object is a `Buffer` without using `Buffer.isBuffer` (which includes the whole [buffer](https://github.com/feross/buffer) module in [browserify](http://browserify.org/)). 22 | 23 | It's future-proof and works in node too! 24 | 25 | ## install 26 | 27 | ```bash 28 | npm install is-buffer 29 | ``` 30 | 31 | ## usage 32 | 33 | ```js 34 | var isBuffer = require('is-buffer') 35 | 36 | isBuffer(new Buffer(4)) // true 37 | 38 | isBuffer(undefined) // false 39 | isBuffer(null) // false 40 | isBuffer('') // false 41 | isBuffer(true) // false 42 | isBuffer(false) // false 43 | isBuffer(0) // false 44 | isBuffer(1) // false 45 | isBuffer(1.0) // false 46 | isBuffer('string') // false 47 | isBuffer({}) // false 48 | isBuffer(function foo () {}) // false 49 | ``` 50 | 51 | ## license 52 | 53 | MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org). 54 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/is-buffer/index.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Determine if an object is a Buffer 3 | * 4 | * @author Feross Aboukhadijeh 5 | * @license MIT 6 | */ 7 | 8 | // The _isBuffer check is for Safari 5-7 support, because it's missing 9 | // Object.prototype.constructor. Remove this eventually 10 | module.exports = function (obj) { 11 | return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) 12 | } 13 | 14 | function isBuffer (obj) { 15 | return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) 16 | } 17 | 18 | // For Node v0.10 support. Remove this eventually. 19 | function isSlowBuffer (obj) { 20 | return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) 21 | } 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/is-buffer/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "is-buffer", 3 | "description": "Determine if an object is a Buffer", 4 | "version": "1.1.6", 5 | "author": { 6 | "name": "Feross Aboukhadijeh", 7 | "email": "feross@feross.org", 8 | "url": "http://feross.org/" 9 | }, 10 | "bugs": { 11 | "url": "https://github.com/feross/is-buffer/issues" 12 | }, 13 | "dependencies": {}, 14 | "devDependencies": { 15 | "standard": "*", 16 | "tape": "^4.0.0", 17 | "zuul": "^3.0.0" 18 | }, 19 | "keywords": [ 20 | "buffer", 21 | "buffers", 22 | "type", 23 | "core buffer", 24 | "browser buffer", 25 | "browserify", 26 | "typed array", 27 | "uint32array", 28 | "int16array", 29 | "int32array", 30 | "float32array", 31 | "float64array", 32 | "browser", 33 | "arraybuffer", 34 | "dataview" 35 | ], 36 | "license": "MIT", 37 | "main": "index.js", 38 | "repository": { 39 | "type": "git", 40 | "url": "git://github.com/feross/is-buffer.git" 41 | }, 42 | "scripts": { 43 | "test": "standard && npm run test-node && npm run test-browser", 44 | "test-browser": "zuul -- test/*.js", 45 | "test-browser-local": "zuul --local -- test/*.js", 46 | "test-node": "tape test/*.js" 47 | }, 48 | "testling": { 49 | "files": "test/*.js" 50 | }, 51 | "_from": "is-buffer@1.1.6", 52 | "_resolved": "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.6.tgz" 53 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/is-buffer/test/basic.js: -------------------------------------------------------------------------------- 1 | var isBuffer = require('../') 2 | var test = require('tape') 3 | 4 | test('is-buffer', function (t) { 5 | t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)') 6 | t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)') 7 | 8 | t.equal(isBuffer(undefined), false, 'undefined') 9 | t.equal(isBuffer(null), false, 'null') 10 | t.equal(isBuffer(''), false, 'empty string') 11 | t.equal(isBuffer(true), false, 'true') 12 | t.equal(isBuffer(false), false, 'false') 13 | t.equal(isBuffer(0), false, '0') 14 | t.equal(isBuffer(1), false, '1') 15 | t.equal(isBuffer(1.0), false, '1.0') 16 | t.equal(isBuffer('string'), false, 'string') 17 | t.equal(isBuffer({}), false, '{}') 18 | t.equal(isBuffer([]), false, '[]') 19 | t.equal(isBuffer(function foo () {}), false, 'function foo () {}') 20 | t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }') 21 | t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }') 22 | 23 | t.end() 24 | }) 25 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/ms/.npminstall.done: -------------------------------------------------------------------------------- 1 | Fri Apr 20 2018 15:30:52 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/ms/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Helpers. 3 | */ 4 | 5 | var s = 1000; 6 | var m = s * 60; 7 | var h = m * 60; 8 | var d = h * 24; 9 | var y = d * 365.25; 10 | 11 | /** 12 | * Parse or format the given `val`. 13 | * 14 | * Options: 15 | * 16 | * - `long` verbose formatting [false] 17 | * 18 | * @param {String|Number} val 19 | * @param {Object} [options] 20 | * @throws {Error} throw an error if val is not a non-empty string or a number 21 | * @return {String|Number} 22 | * @api public 23 | */ 24 | 25 | module.exports = function(val, options) { 26 | options = options || {}; 27 | var type = typeof val; 28 | if (type === 'string' && val.length > 0) { 29 | return parse(val); 30 | } else if (type === 'number' && isNaN(val) === false) { 31 | return options.long ? fmtLong(val) : fmtShort(val); 32 | } 33 | throw new Error( 34 | 'val is not a non-empty string or a valid number. val=' + 35 | JSON.stringify(val) 36 | ); 37 | }; 38 | 39 | /** 40 | * Parse the given `str` and return milliseconds. 41 | * 42 | * @param {String} str 43 | * @return {Number} 44 | * @api private 45 | */ 46 | 47 | function parse(str) { 48 | str = String(str); 49 | if (str.length > 100) { 50 | return; 51 | } 52 | var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( 53 | str 54 | ); 55 | if (!match) { 56 | return; 57 | } 58 | var n = parseFloat(match[1]); 59 | var type = (match[2] || 'ms').toLowerCase(); 60 | switch (type) { 61 | case 'years': 62 | case 'year': 63 | case 'yrs': 64 | case 'yr': 65 | case 'y': 66 | return n * y; 67 | case 'days': 68 | case 'day': 69 | case 'd': 70 | return n * d; 71 | case 'hours': 72 | case 'hour': 73 | case 'hrs': 74 | case 'hr': 75 | case 'h': 76 | return n * h; 77 | case 'minutes': 78 | case 'minute': 79 | case 'mins': 80 | case 'min': 81 | case 'm': 82 | return n * m; 83 | case 'seconds': 84 | case 'second': 85 | case 'secs': 86 | case 'sec': 87 | case 's': 88 | return n * s; 89 | case 'milliseconds': 90 | case 'millisecond': 91 | case 'msecs': 92 | case 'msec': 93 | case 'ms': 94 | return n; 95 | default: 96 | return undefined; 97 | } 98 | } 99 | 100 | /** 101 | * Short format for `ms`. 102 | * 103 | * @param {Number} ms 104 | * @return {String} 105 | * @api private 106 | */ 107 | 108 | function fmtShort(ms) { 109 | if (ms >= d) { 110 | return Math.round(ms / d) + 'd'; 111 | } 112 | if (ms >= h) { 113 | return Math.round(ms / h) + 'h'; 114 | } 115 | if (ms >= m) { 116 | return Math.round(ms / m) + 'm'; 117 | } 118 | if (ms >= s) { 119 | return Math.round(ms / s) + 's'; 120 | } 121 | return ms + 'ms'; 122 | } 123 | 124 | /** 125 | * Long format for `ms`. 126 | * 127 | * @param {Number} ms 128 | * @return {String} 129 | * @api private 130 | */ 131 | 132 | function fmtLong(ms) { 133 | return plural(ms, d, 'day') || 134 | plural(ms, h, 'hour') || 135 | plural(ms, m, 'minute') || 136 | plural(ms, s, 'second') || 137 | ms + ' ms'; 138 | } 139 | 140 | /** 141 | * Pluralization helper. 142 | */ 143 | 144 | function plural(ms, n, name) { 145 | if (ms < n) { 146 | return; 147 | } 148 | if (ms < n * 1.5) { 149 | return Math.floor(ms / n) + ' ' + name; 150 | } 151 | return Math.ceil(ms / n) + ' ' + name + 's'; 152 | } 153 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/ms/license.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Zeit, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/ms/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ms", 3 | "version": "2.0.0", 4 | "description": "Tiny milisecond conversion utility", 5 | "repository": "zeit/ms", 6 | "main": "./index", 7 | "files": [ 8 | "index.js" 9 | ], 10 | "scripts": { 11 | "precommit": "lint-staged", 12 | "lint": "eslint lib/* bin/*", 13 | "test": "mocha tests.js" 14 | }, 15 | "eslintConfig": { 16 | "extends": "eslint:recommended", 17 | "env": { 18 | "node": true, 19 | "es6": true 20 | } 21 | }, 22 | "lint-staged": { 23 | "*.js": [ 24 | "npm run lint", 25 | "prettier --single-quote --write", 26 | "git add" 27 | ] 28 | }, 29 | "license": "MIT", 30 | "devDependencies": { 31 | "eslint": "3.19.0", 32 | "expect.js": "0.3.1", 33 | "husky": "0.13.3", 34 | "lint-staged": "3.4.1", 35 | "mocha": "3.4.1" 36 | }, 37 | "_from": "ms@2.0.0", 38 | "_resolved": "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz" 39 | } -------------------------------------------------------------------------------- /client/nodejs-client/node_modules/ms/readme.md: -------------------------------------------------------------------------------- 1 | # ms 2 | 3 | [![Build Status](https://travis-ci.org/zeit/ms.svg?branch=master)](https://travis-ci.org/zeit/ms) 4 | [![Slack Channel](http://zeit-slackin.now.sh/badge.svg)](https://zeit.chat/) 5 | 6 | Use this package to easily convert various time formats to milliseconds. 7 | 8 | ## Examples 9 | 10 | ```js 11 | ms('2 days') // 172800000 12 | ms('1d') // 86400000 13 | ms('10h') // 36000000 14 | ms('2.5 hrs') // 9000000 15 | ms('2h') // 7200000 16 | ms('1m') // 60000 17 | ms('5s') // 5000 18 | ms('1y') // 31557600000 19 | ms('100') // 100 20 | ``` 21 | 22 | ### Convert from milliseconds 23 | 24 | ```js 25 | ms(60000) // "1m" 26 | ms(2 * 60000) // "2m" 27 | ms(ms('10 hours')) // "10h" 28 | ``` 29 | 30 | ### Time format written-out 31 | 32 | ```js 33 | ms(60000, { long: true }) // "1 minute" 34 | ms(2 * 60000, { long: true }) // "2 minutes" 35 | ms(ms('10 hours'), { long: true }) // "10 hours" 36 | ``` 37 | 38 | ## Features 39 | 40 | - Works both in [node](https://nodejs.org) and in the browser. 41 | - If a number is supplied to `ms`, a string with a unit is returned. 42 | - If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`). 43 | - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. 44 | 45 | ## Caught a bug? 46 | 47 | 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device 48 | 2. Link the package to the global module directory: `npm link` 49 | 3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms! 50 | 51 | As always, you can run the tests using: `npm test` 52 | -------------------------------------------------------------------------------- /server/keras_server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CrawlScript/KerasServer/b748092ecbdde148d0cf29e0b26ef78ffb42ff2e/server/keras_server/__init__.py -------------------------------------------------------------------------------- /server/keras_server/flask_test.py: -------------------------------------------------------------------------------- 1 | #coding=utf-8 2 | # 3 | # from flask import Flask 4 | # 5 | # app = Flask("test") 6 | # 7 | # @app.route("/") 8 | # def test(a): 9 | # return "haha" 10 | # 11 | # app.run(host="127.0.0.1",port=12321) 12 | 13 | def test(a,b,c, d=5): 14 | x=5 15 | y=6 16 | print(a,b,c) 17 | 18 | import inspect 19 | sig = inspect.signature(test) 20 | print() -------------------------------------------------------------------------------- /server/keras_server/keras_client.py: -------------------------------------------------------------------------------- 1 | #coding=utf-8 2 | import requests 3 | import json 4 | import numpy as np 5 | base_url = "http://127.0.0.1:5000" 6 | 7 | data = { 8 | "features": np.random.randn(5,10).tolist() 9 | } 10 | params = { 11 | "data": json.dumps(data) 12 | } 13 | 14 | # print(data) 15 | 16 | 17 | for i in range(100): 18 | content = requests.get(base_url, params).content 19 | print(content) -------------------------------------------------------------------------------- /server/keras_server/keras_server.py: -------------------------------------------------------------------------------- 1 | #coding=utf-8 2 | 3 | import flask 4 | from flask import Flask 5 | from flask import request 6 | from flask_cors import CORS 7 | import json 8 | import tensorflow as tf 9 | 10 | import keras 11 | from keras import Input 12 | from keras.layers import Dense 13 | import inspect 14 | import numpy as np 15 | 16 | class NumpyEncoder(json.JSONEncoder): 17 | def default(self, obj): 18 | if isinstance(obj, np.ndarray): 19 | return obj.tolist() 20 | return json.JSONEncoder.default(self, obj) 21 | 22 | 23 | class KerasServer(Flask): 24 | # def __init__(self, flask_app=None, **kwargs): 25 | # # self.flask_app = flask_app 26 | # if flask_app is not None: 27 | # self.flask_app=flask_app 28 | # else: 29 | # app = Flask(**kwargs) 30 | 31 | def __init__(self, *args, **kwargs): 32 | super(KerasServer, self).__init__(*args, **kwargs) 33 | self.default_graph = None 34 | 35 | 36 | 37 | def _wrap_response(self, result_data): 38 | response = { 39 | "data": result_data 40 | } 41 | return json.dumps(response, cls=NumpyEncoder) 42 | 43 | def remote_api(self, rule, data_param_name="data", **kwargs): 44 | def make_view_func(func): 45 | def created_api(): 46 | json_params_str = request.args.get(data_param_name) 47 | json_params = json.loads(json_params_str) 48 | # var_names = func.__code__.co_varnames 49 | sig = inspect.signature(func) 50 | var_names = sig._parameters.keys() 51 | params = [json_params[var_name] for var_name in var_names] 52 | result_data = func(*params) 53 | return self._wrap_response(result_data) 54 | 55 | def created_api_with_graph(): 56 | if self.default_graph is None: 57 | return created_api() 58 | else: 59 | with self.default_graph.as_default(): 60 | return created_api() 61 | 62 | self.route(rule=rule, **kwargs)(created_api) 63 | return func 64 | 65 | # self.add_url_rule(rule, endpoint=created_endpoint) 66 | return make_view_func 67 | 68 | 69 | def run(self, *args, **kwargs): 70 | self.default_graph = tf.get_default_graph() 71 | super(KerasServer, self).run(*args, **kwargs) 72 | 73 | 74 | 75 | server = KerasServer("test") 76 | 77 | 78 | # x = tf.get_variable("x", initializer=5.0) 79 | # sess = tf.Session() 80 | # sess.run(tf.initialize_all_variables()) 81 | 82 | model = keras.models.Sequential() 83 | model.add(Dense(5, activation="sigmoid", input_shape=(10,))) 84 | 85 | 86 | 87 | 88 | 89 | @server.remote_api(rule="/") 90 | def predict_label(features): 91 | features = np.array(features) 92 | return { 93 | "predict": model.predict(features),#.astype(np.float64), 94 | "msg": "good" 95 | } 96 | 97 | 98 | 99 | server.run(host="127.0.0.1") 100 | 101 | --------------------------------------------------------------------------------