├── src ├── types.d.ts ├── consts.ts ├── interface │ ├── index.ts │ ├── base.ts │ └── task.ts ├── index.ts └── datafactory.ts ├── CHANGELOG.md ├── test ├── mocha.opts └── datafactory │ └── jobslice.test.ts ├── .gitmessage.text ├── lib ├── consts.js ├── interface │ ├── index.js │ ├── base.js │ └── task.js ├── index.js └── datafactory.js ├── .travis.yml ├── tsconfig.json ├── index.d.ts ├── tslint.json ├── package.json ├── .gitignore ├── README.md └── yarn.lock /src/types.d.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/consts.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | POST_CREATE_TASK_NORMAL: 'api.teambition.com/tasks' 3 | } -------------------------------------------------------------------------------- /src/interface/index.ts: -------------------------------------------------------------------------------- 1 | import Task from './task' 2 | 3 | export default { 4 | Task 5 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### v0.0.4 2019-01-08 2 | - fix: 分片处理机制 等差数列 => 恒等 3 | 4 | ### v0.0.3 2018-10-23 5 | - 数据工厂支持数据分片请求func 6 | -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --require ts-node/register 2 | --require source-map-support/register 3 | --recursive test/**/*.test.ts 4 | --exit 5 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { DataFactory } from './datafactory' 2 | import Client from './interface' 3 | 4 | export { 5 | DataFactory, 6 | Client 7 | } -------------------------------------------------------------------------------- /.gitmessage.text: -------------------------------------------------------------------------------- 1 | # 类型可选值: feat / fix / docs / style / refactor / perf / test / chore / deps 2 | # 标题: ( what ) 3 | # 类型: 标题 4 | 5 | # 标题和描述之间需空一行 6 | 7 | # 描述 ( why and how ) 8 | -------------------------------------------------------------------------------- /lib/consts.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | exports.default = { 4 | POST_CREATE_TASK_NORMAL: 'api.teambition.com/tasks' 5 | }; 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '8' 4 | - '10' 5 | sudo: false 6 | cache: 7 | directories: 8 | - node_modules 9 | script: 10 | - npm run lint 11 | - npm test -------------------------------------------------------------------------------- /lib/interface/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const task_1 = require("./task"); 4 | exports.default = { 5 | Task: task_1.default 6 | }; 7 | -------------------------------------------------------------------------------- /lib/index.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const datafactory_1 = require("./datafactory"); 4 | exports.DataFactory = datafactory_1.DataFactory; 5 | const interface_1 = require("./interface"); 6 | exports.Client = interface_1.default; 7 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "noUnusedLocals": true, 5 | "rootDir": "src", 6 | "outDir": "lib", 7 | "module": "commonjs", 8 | "moduleResolution": "node", 9 | "experimentalDecorators": true 10 | }, 11 | "include": [ 12 | "src/**/*" 13 | ] 14 | } -------------------------------------------------------------------------------- /lib/interface/base.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | class Base { 4 | setHeader(header) { 5 | if (!header.cookie && header.Authorization) { 6 | throw new Error('cookie or Authorization must be set'); 7 | } 8 | this.header = header; 9 | return this; 10 | } 11 | setUrl(url) { 12 | this.url = url; 13 | return this; 14 | } 15 | setClient(client) { 16 | this.client = client; 17 | return this; 18 | } 19 | } 20 | exports.default = Base; 21 | -------------------------------------------------------------------------------- /src/interface/base.ts: -------------------------------------------------------------------------------- 1 | 2 | interface Header { 3 | cookie: string 4 | 'request-server': string 5 | Authorization: string 6 | } 7 | 8 | export default class Base { 9 | protected url: string 10 | protected header: Header 11 | protected client: any 12 | 13 | setHeader(header: Header) { 14 | if (!header.cookie && header.Authorization) { 15 | throw new Error('cookie or Authorization must be set') 16 | } 17 | 18 | this.header = header 19 | return this 20 | } 21 | 22 | setUrl (url: string) { 23 | this.url = url 24 | return this 25 | } 26 | 27 | setClient (client: any) { 28 | this.client = client 29 | return this 30 | } 31 | } -------------------------------------------------------------------------------- /src/interface/task.ts: -------------------------------------------------------------------------------- 1 | import * as client from 'request-promise' 2 | import Base from './base' 3 | import consts from '../consts' 4 | 5 | export default class Task extends Base { 6 | /** 7 | * 创建单个任务 8 | * @param {Object} body 9 | * @memberof Task 10 | */ 11 | createOne (body: Object, projectType?: string) { 12 | switch (projectType) { 13 | case 'taskflow': 14 | break 15 | default: 16 | this.client = this.client || client 17 | return client.post(this.url || consts.POST_CREATE_TASK_NORMAL, { 18 | headers: this.header, 19 | body, 20 | timeout: 5000, 21 | strictSSL: false, 22 | json: true, 23 | }) 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | declare module "teambition-server-sdk" { 2 | export = TeambitionServerSDK 3 | } 4 | 5 | declare namespace TeambitionServerSDK { 6 | namespace Client { 7 | class Base { 8 | setHeader(header: Header): this 9 | setUrl(url: string): this 10 | setClient(client) 11 | } 12 | 13 | class DataFactory { 14 | 15 | } 16 | 17 | class Task extends Base { 18 | url: string 19 | header: Header 20 | client: any 21 | 22 | createOne(body: Object, projectType?: string) 23 | } 24 | } 25 | 26 | namespace DataFactory { 27 | class DataFactory { 28 | JobSlice(job: any, capacity: number): Promise 29 | } 30 | } 31 | } 32 | 33 | interface Header { 34 | cookie?: string 35 | 'request-server'?: string 36 | Authorization?: string 37 | } -------------------------------------------------------------------------------- /lib/interface/task.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | const client = require("request-promise"); 4 | const base_1 = require("./base"); 5 | const consts_1 = require("../consts"); 6 | class Task extends base_1.default { 7 | /** 8 | * 创建单个任务 9 | * @param {Object} body 10 | * @memberof Task 11 | */ 12 | createOne(body, projectType) { 13 | switch (projectType) { 14 | case 'taskflow': 15 | break; 16 | default: 17 | this.client = this.client || client; 18 | return client.post(this.url || consts_1.default.POST_CREATE_TASK_NORMAL, { 19 | headers: this.header, 20 | body, 21 | timeout: 5000, 22 | strictSSL: false, 23 | json: true, 24 | }); 25 | } 26 | } 27 | } 28 | exports.default = Task; 29 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "align": [ 4 | true, 5 | "parameters", 6 | "statements" 7 | ], 8 | "class-name": true, 9 | "comment-format": [ 10 | true, 11 | "check-space", 12 | "check-lowercase" 13 | ], 14 | "import-spacing": true, 15 | "indent": [ 16 | true, 17 | "spaces", 18 | 2 19 | ], 20 | "max-line-length": [ 21 | true, 22 | 250 23 | ], 24 | "no-consecutive-blank-lines": true, 25 | "no-console": [ 26 | true, 27 | "log", 28 | "trace" 29 | ], 30 | "no-duplicate-variable": true, 31 | "no-empty": true, 32 | "no-eval": true, 33 | "no-trailing-whitespace": true, 34 | "no-var-keyword": true, 35 | "prefer-const": true, 36 | "quotemark": [ 37 | true, 38 | "single" 39 | ], 40 | "semicolon": [ 41 | true, 42 | "never" 43 | ], 44 | "array-type": [ 45 | true, 46 | "array-simple" 47 | ], 48 | "arrow-parens": true 49 | } 50 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teambition-server-sdk", 3 | "version": "0.0.4", 4 | "description": "Javascript SDK for teambition server", 5 | "main": "lib/index.js", 6 | "scripts": { 7 | "build": "tsc", 8 | "test": "NODE_ENV=test mocha", 9 | "lint": "tslint -p tsconfig.json -t stylish 'src/**/*.ts' 'test/**/*.ts'" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/teambition/teambition-server-sdk.git" 14 | }, 15 | "author": "richardwei1995@gmail.com", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/teambition/teambition-server-sdk/issues" 19 | }, 20 | "homepage": "https://github.com/teambition/teambition-server-sdk#readme", 21 | "devDependencies": { 22 | "@types/mocha": "^5.2.5", 23 | "@types/request-promise": "^4.1.42", 24 | "mocha": "^5.2.0", 25 | "should": "^13.2.3", 26 | "ts-node": "^7.0.1", 27 | "tslint": "^5.11.0", 28 | "typescript": "^3.1.3" 29 | }, 30 | "dependencies": { 31 | "request-promise": "^4.2.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /test/datafactory/jobslice.test.ts: -------------------------------------------------------------------------------- 1 | import { DataFactory } from '../../src/datafactory' 2 | import * as expect from 'should' 3 | 4 | describe('src/datafactory.ts', () => { 5 | it('should use jobslice success', async () => { 6 | const array = new Array(20) 7 | const datafactory = new DataFactory(array) 8 | 9 | let count = 0 10 | const job = (raw) => { 11 | ++count 12 | } 13 | await datafactory.JobSlice(job, 5) 14 | expect(count).equal(4) 15 | }) 16 | 17 | it('should throw error if raw not an array', async () => { 18 | try { 19 | const datafactory = new DataFactory('array') 20 | 21 | let count = 0 22 | const job = (raw) => { 23 | count += count 24 | } 25 | await datafactory.JobSlice(job, 5) 26 | } catch (error) { 27 | expect(error).be.Error() 28 | } 29 | }) 30 | 31 | it('should throw error if job not a func', async () => { 32 | try { 33 | const array = new Array(20) 34 | const datafactory = new DataFactory(array) 35 | 36 | await datafactory.JobSlice('a', 5) 37 | } catch (error) { 38 | expect(error).be.Error() 39 | } 40 | }) 41 | }) -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # parcel-bundler cache (https://parceljs.org/) 61 | .cache 62 | 63 | # Serverless directories 64 | .serverless 65 | .idea -------------------------------------------------------------------------------- /src/datafactory.ts: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 数据工厂,对数据进行加工、处理 4 | * @class DataFactory 5 | */ 6 | export class DataFactory { 7 | private raw: any 8 | private opts: object 9 | 10 | constructor (raw: any, opts?: object) { 11 | this.raw = raw 12 | this.opts = opts 13 | } 14 | 15 | /** 16 | * 数据分片请求获取 17 | * @param {function} job 18 | * @param {number} [capacity=200] 19 | * @returns {Promise} 20 | * @memberof DataFactory 21 | */ 22 | async JobSlice(job: any, capacity: number = 200, needReturn: boolean = true): Promise { 23 | if (!Array.isArray(this.raw)) { 24 | throw new Error('raw must be an array') 25 | } 26 | if (typeof job !== 'function') { 27 | throw new Error('job must be a func') 28 | } 29 | 30 | // 分片请求 31 | const rawSize: number = this.raw.length 32 | let ret = [] 33 | let result: [any] 34 | let cursor = 0 35 | 36 | // 保证顺序性 37 | while (true) { 38 | if (cursor >= rawSize) { 39 | break 40 | } else { 41 | result = await job(this.raw.slice(cursor, cursor + capacity), this.opts) 42 | cursor += capacity 43 | if (needReturn) { 44 | ret = ret.concat(result) 45 | } 46 | } 47 | } 48 | return ret 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /lib/datafactory.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | /** 4 | * 数据工厂,对数据进行加工、处理 5 | * @class DataFactory 6 | */ 7 | class DataFactory { 8 | constructor(raw, opts) { 9 | this.raw = raw; 10 | this.opts = opts; 11 | } 12 | /** 13 | * 数据分片请求获取 14 | * @param {function} job 15 | * @param {number} [capacity=200] 16 | * @returns {Promise} 17 | * @memberof DataFactory 18 | */ 19 | async JobSlice(job, capacity = 200, needReturn = true) { 20 | if (!Array.isArray(this.raw)) { 21 | throw new Error('raw must be an array'); 22 | } 23 | if (typeof job !== 'function') { 24 | throw new Error('job must be a func'); 25 | } 26 | // 分片请求 27 | const rawSize = this.raw.length; 28 | let ret = []; 29 | let result; 30 | let cursor = 0; 31 | // 保证顺序性 32 | while (true) { 33 | if (cursor >= rawSize) { 34 | break; 35 | } 36 | else { 37 | result = await job(this.raw.slice(cursor, cursor + capacity), this.opts); 38 | cursor += capacity; 39 | if (needReturn) { 40 | ret = ret.concat(result); 41 | } 42 | } 43 | } 44 | return ret; 45 | } 46 | } 47 | exports.DataFactory = DataFactory; 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![NPM version][npm-image]][npm-url] 2 | ![Build Status][travis-image] 3 | [![Downloads][downloads-image]][downloads-url] 4 | 5 | ## Teambition Server SDK 6 | Teambition 服务端 Node SDK,封装如下方法: 7 | 8 | - [ ] 数据处理: 常用的数据加工处理方法 9 | - [ ] 官方 API: 常用的 `Teambition` 主站官方 API 封装,使用者不应该关注具体 URL 的变动 10 | - [ ] 工具函数: 封装与 `Teambition` 强相关的业务需要使用到的工具函数 11 | 12 | ### 数据处理 13 | 14 | **JobSlice(分片执行)** 15 | 16 | ```js 17 | // JS Demo 18 | function request (sliceRaw) { 19 | // do anything 20 | } 21 | const raw = new Array(20) 22 | const datafactory = new TeambitionSDK.DataFactory(raw) 23 | 24 | datafactory.JobSlice(request) 25 | ``` 26 | 27 | ### 官方 API 28 | 29 | 封装 Teambition API,请至 [https://docs.teambition.com/](https://docs.teambition.com/) 查阅 API 目录 30 | 31 | 如果你是第三方开发者,需要自建应用,请前往 [Teambition 开发者中心](https://developer.teambition.com/) 32 | 33 | ```js 34 | // TS DEMO 35 | import * as TeambitionSDK from 'teambition-server-sdk' 36 | 37 | const teambitionSDK = new TeambitionSDK.Client.Task() 38 | return teambitionSDK 39 | // optional 可选的,假如你是私有部署或其它,请填入正确的地址 40 | .setUrl('add your custom url') 41 | // optional 42 | .setHeader({ 43 | // optional 44 | cookie: 'your cookie' 45 | // optional 46 | Authorization: 'your access token', 47 | }) 48 | .createOne(task) 49 | ``` 50 | 51 | [npm-url]: https://www.npmjs.com/package/teambition-server-sdk 52 | [npm-image]: https://img.shields.io/npm/v/teambition-server-sdk.svg 53 | 54 | [travis-image]: https://travis-ci.org/teambition/teambition-server-sdk.svg 55 | 56 | [downloads-url]: https://npmjs.org/package/teambition-server-sdk 57 | [downloads-image]: https://img.shields.io/npm/dm/teambition-server-sdk.svg?style=flat-square -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@types/bluebird@*": 6 | version "3.5.24" 7 | resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.24.tgz#11f76812531c14f793b8ecbf1de96f672905de8a" 8 | 9 | "@types/caseless@*": 10 | version "0.12.1" 11 | resolved "https://registry.yarnpkg.com/@types/caseless/-/caseless-0.12.1.tgz#9794c69c8385d0192acc471a540d1f8e0d16218a" 12 | 13 | "@types/form-data@*": 14 | version "2.2.1" 15 | resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-2.2.1.tgz#ee2b3b8eaa11c0938289953606b745b738c54b1e" 16 | dependencies: 17 | "@types/node" "*" 18 | 19 | "@types/mocha@^5.2.5": 20 | version "5.2.5" 21 | resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.5.tgz#8a4accfc403c124a0bafe8a9fc61a05ec1032073" 22 | 23 | "@types/node@*": 24 | version "10.12.0" 25 | resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.0.tgz#ea6dcbddbc5b584c83f06c60e82736d8fbb0c235" 26 | 27 | "@types/request-promise@^4.1.42": 28 | version "4.1.42" 29 | resolved "https://registry.yarnpkg.com/@types/request-promise/-/request-promise-4.1.42.tgz#a70a6777429531e60ed09faa077ead9b995204cd" 30 | dependencies: 31 | "@types/bluebird" "*" 32 | "@types/request" "*" 33 | 34 | "@types/request@*": 35 | version "2.48.0" 36 | resolved "https://registry.yarnpkg.com/@types/request/-/request-2.48.0.tgz#837d0c4002f6b63d77999d7fe6f945ffb94406c1" 37 | dependencies: 38 | "@types/caseless" "*" 39 | "@types/form-data" "*" 40 | "@types/node" "*" 41 | "@types/tough-cookie" "*" 42 | 43 | "@types/tough-cookie@*": 44 | version "2.3.3" 45 | resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.3.tgz#7f226d67d654ec9070e755f46daebf014628e9d9" 46 | 47 | ansi-regex@^2.0.0: 48 | version "2.1.1" 49 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 50 | 51 | ansi-styles@^2.2.1: 52 | version "2.2.1" 53 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 54 | 55 | ansi-styles@^3.2.1: 56 | version "3.2.1" 57 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 58 | dependencies: 59 | color-convert "^1.9.0" 60 | 61 | argparse@^1.0.7: 62 | version "1.0.10" 63 | resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" 64 | dependencies: 65 | sprintf-js "~1.0.2" 66 | 67 | arrify@^1.0.0: 68 | version "1.0.1" 69 | resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 70 | 71 | babel-code-frame@^6.22.0: 72 | version "6.26.0" 73 | resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" 74 | dependencies: 75 | chalk "^1.1.3" 76 | esutils "^2.0.2" 77 | js-tokens "^3.0.2" 78 | 79 | balanced-match@^1.0.0: 80 | version "1.0.0" 81 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 82 | 83 | bluebird@^3.5.0: 84 | version "3.5.2" 85 | resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.2.tgz#1be0908e054a751754549c270489c1505d4ab15a" 86 | 87 | brace-expansion@^1.1.7: 88 | version "1.1.11" 89 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 90 | dependencies: 91 | balanced-match "^1.0.0" 92 | concat-map "0.0.1" 93 | 94 | browser-stdout@1.3.1: 95 | version "1.3.1" 96 | resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" 97 | 98 | buffer-from@^1.0.0, buffer-from@^1.1.0: 99 | version "1.1.1" 100 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" 101 | 102 | builtin-modules@^1.1.1: 103 | version "1.1.1" 104 | resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 105 | 106 | chalk@^1.1.3: 107 | version "1.1.3" 108 | resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 109 | dependencies: 110 | ansi-styles "^2.2.1" 111 | escape-string-regexp "^1.0.2" 112 | has-ansi "^2.0.0" 113 | strip-ansi "^3.0.0" 114 | supports-color "^2.0.0" 115 | 116 | chalk@^2.3.0: 117 | version "2.4.1" 118 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" 119 | dependencies: 120 | ansi-styles "^3.2.1" 121 | escape-string-regexp "^1.0.5" 122 | supports-color "^5.3.0" 123 | 124 | color-convert@^1.9.0: 125 | version "1.9.3" 126 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 127 | dependencies: 128 | color-name "1.1.3" 129 | 130 | color-name@1.1.3: 131 | version "1.1.3" 132 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 133 | 134 | commander@2.15.1: 135 | version "2.15.1" 136 | resolved "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" 137 | 138 | commander@^2.12.1: 139 | version "2.19.0" 140 | resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" 141 | 142 | concat-map@0.0.1: 143 | version "0.0.1" 144 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 145 | 146 | debug@3.1.0: 147 | version "3.1.0" 148 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" 149 | dependencies: 150 | ms "2.0.0" 151 | 152 | diff@3.5.0, diff@^3.1.0, diff@^3.2.0: 153 | version "3.5.0" 154 | resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" 155 | 156 | escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 157 | version "1.0.5" 158 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 159 | 160 | esprima@^4.0.0: 161 | version "4.0.1" 162 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" 163 | 164 | esutils@^2.0.2: 165 | version "2.0.2" 166 | resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 167 | 168 | fs.realpath@^1.0.0: 169 | version "1.0.0" 170 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 171 | 172 | glob@7.1.2: 173 | version "7.1.2" 174 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" 175 | dependencies: 176 | fs.realpath "^1.0.0" 177 | inflight "^1.0.4" 178 | inherits "2" 179 | minimatch "^3.0.4" 180 | once "^1.3.0" 181 | path-is-absolute "^1.0.0" 182 | 183 | glob@^7.1.1: 184 | version "7.1.3" 185 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" 186 | dependencies: 187 | fs.realpath "^1.0.0" 188 | inflight "^1.0.4" 189 | inherits "2" 190 | minimatch "^3.0.4" 191 | once "^1.3.0" 192 | path-is-absolute "^1.0.0" 193 | 194 | growl@1.10.5: 195 | version "1.10.5" 196 | resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" 197 | 198 | has-ansi@^2.0.0: 199 | version "2.0.0" 200 | resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 201 | dependencies: 202 | ansi-regex "^2.0.0" 203 | 204 | has-flag@^3.0.0: 205 | version "3.0.0" 206 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 207 | 208 | he@1.1.1: 209 | version "1.1.1" 210 | resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" 211 | 212 | inflight@^1.0.4: 213 | version "1.0.6" 214 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 215 | dependencies: 216 | once "^1.3.0" 217 | wrappy "1" 218 | 219 | inherits@2: 220 | version "2.0.3" 221 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 222 | 223 | js-tokens@^3.0.2: 224 | version "3.0.2" 225 | resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" 226 | 227 | js-yaml@^3.7.0: 228 | version "3.12.0" 229 | resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" 230 | dependencies: 231 | argparse "^1.0.7" 232 | esprima "^4.0.0" 233 | 234 | lodash@^4.13.1: 235 | version "4.17.11" 236 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" 237 | 238 | make-error@^1.1.1: 239 | version "1.3.5" 240 | resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" 241 | 242 | minimatch@3.0.4, minimatch@^3.0.4: 243 | version "3.0.4" 244 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 245 | dependencies: 246 | brace-expansion "^1.1.7" 247 | 248 | minimist@0.0.8: 249 | version "0.0.8" 250 | resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 251 | 252 | minimist@^1.2.0: 253 | version "1.2.0" 254 | resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 255 | 256 | mkdirp@0.5.1, mkdirp@^0.5.1: 257 | version "0.5.1" 258 | resolved "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 259 | dependencies: 260 | minimist "0.0.8" 261 | 262 | mocha@^5.2.0: 263 | version "5.2.0" 264 | resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" 265 | dependencies: 266 | browser-stdout "1.3.1" 267 | commander "2.15.1" 268 | debug "3.1.0" 269 | diff "3.5.0" 270 | escape-string-regexp "1.0.5" 271 | glob "7.1.2" 272 | growl "1.10.5" 273 | he "1.1.1" 274 | minimatch "3.0.4" 275 | mkdirp "0.5.1" 276 | supports-color "5.4.0" 277 | 278 | ms@2.0.0: 279 | version "2.0.0" 280 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 281 | 282 | once@^1.3.0: 283 | version "1.4.0" 284 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 285 | dependencies: 286 | wrappy "1" 287 | 288 | path-is-absolute@^1.0.0: 289 | version "1.0.1" 290 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 291 | 292 | path-parse@^1.0.5: 293 | version "1.0.6" 294 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 295 | 296 | psl@^1.1.24: 297 | version "1.1.29" 298 | resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" 299 | 300 | punycode@^1.4.1: 301 | version "1.4.1" 302 | resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" 303 | 304 | request-promise-core@1.1.1: 305 | version "1.1.1" 306 | resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" 307 | dependencies: 308 | lodash "^4.13.1" 309 | 310 | request-promise@^4.2.2: 311 | version "4.2.2" 312 | resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.2.tgz#d1ea46d654a6ee4f8ee6a4fea1018c22911904b4" 313 | dependencies: 314 | bluebird "^3.5.0" 315 | request-promise-core "1.1.1" 316 | stealthy-require "^1.1.0" 317 | tough-cookie ">=2.3.3" 318 | 319 | resolve@^1.3.2: 320 | version "1.8.1" 321 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" 322 | dependencies: 323 | path-parse "^1.0.5" 324 | 325 | semver@^5.3.0: 326 | version "5.6.0" 327 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" 328 | 329 | should-equal@^2.0.0: 330 | version "2.0.0" 331 | resolved "https://registry.yarnpkg.com/should-equal/-/should-equal-2.0.0.tgz#6072cf83047360867e68e98b09d71143d04ee0c3" 332 | dependencies: 333 | should-type "^1.4.0" 334 | 335 | should-format@^3.0.3: 336 | version "3.0.3" 337 | resolved "https://registry.yarnpkg.com/should-format/-/should-format-3.0.3.tgz#9bfc8f74fa39205c53d38c34d717303e277124f1" 338 | dependencies: 339 | should-type "^1.3.0" 340 | should-type-adaptors "^1.0.1" 341 | 342 | should-type-adaptors@^1.0.1: 343 | version "1.1.0" 344 | resolved "https://registry.yarnpkg.com/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz#401e7f33b5533033944d5cd8bf2b65027792e27a" 345 | dependencies: 346 | should-type "^1.3.0" 347 | should-util "^1.0.0" 348 | 349 | should-type@^1.3.0, should-type@^1.4.0: 350 | version "1.4.0" 351 | resolved "https://registry.yarnpkg.com/should-type/-/should-type-1.4.0.tgz#0756d8ce846dfd09843a6947719dfa0d4cff5cf3" 352 | 353 | should-util@^1.0.0: 354 | version "1.0.0" 355 | resolved "https://registry.yarnpkg.com/should-util/-/should-util-1.0.0.tgz#c98cda374aa6b190df8ba87c9889c2b4db620063" 356 | 357 | should@^13.2.3: 358 | version "13.2.3" 359 | resolved "https://registry.yarnpkg.com/should/-/should-13.2.3.tgz#96d8e5acf3e97b49d89b51feaa5ae8d07ef58f10" 360 | dependencies: 361 | should-equal "^2.0.0" 362 | should-format "^3.0.3" 363 | should-type "^1.4.0" 364 | should-type-adaptors "^1.0.1" 365 | should-util "^1.0.0" 366 | 367 | source-map-support@^0.5.6: 368 | version "0.5.9" 369 | resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" 370 | dependencies: 371 | buffer-from "^1.0.0" 372 | source-map "^0.6.0" 373 | 374 | source-map@^0.6.0: 375 | version "0.6.1" 376 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 377 | 378 | sprintf-js@~1.0.2: 379 | version "1.0.3" 380 | resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 381 | 382 | stealthy-require@^1.1.0: 383 | version "1.1.1" 384 | resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" 385 | 386 | strip-ansi@^3.0.0: 387 | version "3.0.1" 388 | resolved "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 389 | dependencies: 390 | ansi-regex "^2.0.0" 391 | 392 | supports-color@5.4.0: 393 | version "5.4.0" 394 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" 395 | dependencies: 396 | has-flag "^3.0.0" 397 | 398 | supports-color@^2.0.0: 399 | version "2.0.0" 400 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 401 | 402 | supports-color@^5.3.0: 403 | version "5.5.0" 404 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 405 | dependencies: 406 | has-flag "^3.0.0" 407 | 408 | tough-cookie@>=2.3.3: 409 | version "2.4.3" 410 | resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" 411 | dependencies: 412 | psl "^1.1.24" 413 | punycode "^1.4.1" 414 | 415 | ts-node@^7.0.1: 416 | version "7.0.1" 417 | resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" 418 | dependencies: 419 | arrify "^1.0.0" 420 | buffer-from "^1.1.0" 421 | diff "^3.1.0" 422 | make-error "^1.1.1" 423 | minimist "^1.2.0" 424 | mkdirp "^0.5.1" 425 | source-map-support "^0.5.6" 426 | yn "^2.0.0" 427 | 428 | tslib@^1.8.0, tslib@^1.8.1: 429 | version "1.9.3" 430 | resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" 431 | 432 | tslint@^5.11.0: 433 | version "5.11.0" 434 | resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.11.0.tgz#98f30c02eae3cde7006201e4c33cb08b48581eed" 435 | dependencies: 436 | babel-code-frame "^6.22.0" 437 | builtin-modules "^1.1.1" 438 | chalk "^2.3.0" 439 | commander "^2.12.1" 440 | diff "^3.2.0" 441 | glob "^7.1.1" 442 | js-yaml "^3.7.0" 443 | minimatch "^3.0.4" 444 | resolve "^1.3.2" 445 | semver "^5.3.0" 446 | tslib "^1.8.0" 447 | tsutils "^2.27.2" 448 | 449 | tsutils@^2.27.2: 450 | version "2.29.0" 451 | resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" 452 | dependencies: 453 | tslib "^1.8.1" 454 | 455 | typescript@^3.1.3: 456 | version "3.1.3" 457 | resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.3.tgz#01b70247a6d3c2467f70c45795ef5ea18ce191d5" 458 | 459 | wrappy@1: 460 | version "1.0.2" 461 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 462 | 463 | yn@^2.0.0: 464 | version "2.0.0" 465 | resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" 466 | --------------------------------------------------------------------------------