├── .editorconfig ├── .eslintrc ├── .gitignore ├── LICENSE.md ├── README.md ├── alipay.md ├── index.js ├── package.json ├── src ├── alipay │ ├── gateways │ │ ├── app.gateway.js │ │ ├── pos.gateway.js │ │ ├── scan.gateway.js │ │ ├── transfer.gateway.js │ │ ├── wap.gateway.js │ │ └── web.gateway.js │ ├── index.js │ └── util.js ├── error.js └── wechat │ ├── gateways │ ├── app.gateway.js │ ├── miniapp.gateway.js │ ├── mp.gateway.js │ ├── pos.gateway.js │ ├── scan.gateway.js │ ├── transfer.gateway.js │ └── wap.gateway.js │ ├── index.js │ └── util.js ├── wechat.md └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-egg" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log* 3 | /info/ 4 | /test/ 5 | todo.md 6 | .DS_Store -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 shmy@KnowhowTeam 914111374@qq.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 提示 2 | > 微信部分功能由于没有测试商户账号,还未完成,敬请关注。 3 | 4 | [![npm](https://img.shields.io/npm/v/cn-pay.svg?style=flat-square)](https://www.npmjs.com/package/cn-pay) 5 | [![npm](https://img.shields.io/npm/dt/cn-pay.svg?style=flat-square)](https://www.npmjs.com/package/cn-pay) 6 | [![taonpm](https://npm.taobao.org/badge/v/cn-pay.svg)](https://npm.taobao.org/package/cn-pay) 7 | [![taonpm](https://npm.taobao.org/badge/d/cn-pay.svg)](https://npm.taobao.org/package/cn-pay) 8 | [![cnpm](https://cnpmjs.org/badge/v/cn-pay.svg)](https://cnpmjs.org/package/cn-pay) 9 | [![cnpm](https://cnpmjs.org/badge/d/cn-pay.svg)](https://cnpmjs.org/package/cn-pay) 10 | [![license](https://img.shields.io/github/license/shmy/cn-pay.svg?style=flat-square)](https://github.com/shmy/cn-pay/blob/master/LICENSE.md) 11 | [![GitHub stars](https://img.shields.io/github/stars/shmy/cn-pay.svg?style=social&label=Star)](https://github.com/shmy/cn-pay) 12 | [![GitHub downloads](https://img.shields.io/github/downloads/shmy/cn-pay/total.svg)](https://github.com/shmy/cn-pay) 13 | 14 | ## 环境要求 15 | > 警告:本模块大量采用`ES6`语法编写,最低支持到**Node.js v6.0.0** 16 | 17 | ## 进度 18 | ### 支付宝 19 | + 电脑网页支付 -ok 20 | + 手机网页支付 -ok 21 | + 手机App支付 -ok 22 | + 刷卡支付 -ok 23 | + 扫码支付 -ok 24 | + 账户转账 -ok 25 | + 交易查询 -ok 26 | + 交易撤销 -ok 27 | + 交易关闭 -ok 28 | + 交易退款 -ok 29 | + 对服务器数据验签 -ok 30 | 31 | ----------------- 32 | 33 | ### 微信 34 | + 公众号网页支付 -ok 35 | + 手机网页(h5)支付 -ok 36 | + 手机App支付 -ok 37 | + 小程序支付 -ok 38 | + 刷卡支付 -ok 39 | + 扫码支付 -ok 40 | + 账户转账 41 | + 交易查询 -ok 42 | + 交易撤销 -ok 43 | + 交易关闭 -ok 44 | + 交易退款 45 | + 对服务器数据验签 -ok 46 | 47 | ------------------- 48 | 49 | ## 安装 50 | ```bash 51 | npm install cn-pay --save # or yarn add cn-pay 52 | ``` 53 | 54 | ------------------- 55 | 56 | ## 通用异常类型 57 | 58 | | 名称 | 说明 | 59 | | :-------- | :------ | 60 | | GatewayException | 表示支付宝服务器返回的数据非正常结果,例如,参数错误等。可通过读取错误对象的`raw`属性获取真实的返回数据 | 61 | | InvalidSignException | 表示验签失败。 | 62 | 63 | ## 使用 64 | 🔥[支付宝支付](alipay.md) 65 | 66 | ⛄[微信支付](wechat.md) 67 | -------------------------------------------------------------------------------- /alipay.md: -------------------------------------------------------------------------------- 1 | ## 支付宝 2 | ### 初始化实例 3 | ```javascript 4 | const Pay = require('cn-pay') 5 | const config = { 6 | app_id: 'app_id', // appid 7 | private_key: 'private_key', // 商户私钥 注意:此处不是文件路径,一定要是文件内容 8 | public_key: 'public_key', // 支付宝公钥 注意:此处不是文件路径,一定要是文件内容 9 | notify_url: 'notify_url', // 通知地址 10 | return_url: 'return_url', // 跳转地址 11 | dev: false // 设置为true 将启用开发环境的支付宝网关 12 | } 13 | const alipay = Pay.alipay(config) 14 | ``` 15 | ### 支付订单 16 | #### 一、电脑支付 17 | ##### 例子 18 | ```javascript 19 | const order = { 20 | out_trade_no: '00000001', 21 | total_amount: 0.01, // 单位 元 22 | subject: '测试支付' 23 | } 24 | const { html, payload, endpoint } = await alipay.web(order) // 此方法返回Promise 25 | 26 | ``` 27 | ##### 返回 28 | 成功时`html`返回类似以下数据: 29 | ```html 30 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 42 | 43 | 45 | 46 |
47 | 48 | 49 | ``` 50 | 如果你不喜欢生成的`html`代码,也可以使用`payload`属性,返回如下: 51 | ```javascript 52 | { 53 | app_id: '2016084560151484', 54 | notify_url: 'http://xxx.com/notify', 55 | return_url: 'http://xxx.com/return', 56 | charset: 'utf-8', 57 | sign_type: 'RSA2', 58 | version: '1.0', 59 | format: 'JSON', 60 | method: 'alipay.trade.page.pay', 61 | biz_content: '{"out_trade_no":"1516099080395","total_amount":10,"subject":"测试支付","product_code":"FAST_INSTANT_TRADE_PAY"}', 62 | timestamp: '2018-01-16 18:38:00', 63 | sign: 'Ec9no7LXl5UF6GhW4UFNIT8lG6pmtGizHVmVVQrt2NW3x4E/wmLu1VDw00exod9INjreK3OcU6/Y4PFvP5QUNALh986sGAPpqx2hr6BwmI8GeNWcCJ78Da7Fsp4fwGmusr56wYeBnKwcTaMCO0K3EV7YDIKqXAkfb4l8rxNrDJztdEOZCaN1ChkJZLzwEKZzt8q5gw4IYcKkYPCbWnHqUhapPLBbSyaL0O6RAG5N+gfpZNMxQeMbO5VwyV1iHsPtl9MZv77gSizLTHqLUTfdb5VC2phxQ08EYan46bFUtDqS6Sl6QkyzVUsyfAisuDrklBpGiYVMR4dk3vwkZ+yUXw==' 64 | } 65 | 66 | ``` 67 | `endpoint`属性代表当前配置的网关地址,可结合`payload`自定义提交 68 | ```text 69 | https://openapi.alipaydev.com/gateway.do 70 | ``` 71 | 72 | ##### 订单配置参数 73 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`product_code` 等参数。** 74 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/270/alipay.trade.page.pay),查看「请求参数」一栏。 75 | 76 | ------------------ 77 | 78 | #### 二、手机网页支付 79 | ##### 例子 80 | ```javascript 81 | const order = { 82 | out_trade_no: '00000001', 83 | total_amount: 0.01, // 单位 元 84 | subject: '测试支付' 85 | } 86 | const { html, payload, endpoint } = await alipay.wap(order) // 此方法返回Promise 87 | 88 | ``` 89 | ##### 返回 90 | 成功时`html`返回类似以下数据: 91 | ```html 92 |
94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 104 | 105 | 107 | 108 |
109 | 110 | 111 | ``` 112 | 如果你不喜欢生成的`html`代码,也可以使用`payload`属性,返回如下: 113 | ```javascript 114 | { 115 | app_id: '2016084560151484', 116 | notify_url: 'http://xxx.com/notify', 117 | return_url: 'http://xxx.com/return', 118 | charset: 'utf-8', 119 | sign_type: 'RSA2', 120 | version: '1.0', 121 | format: 'JSON', 122 | method: 'alipay.trade.wap.pay', 123 | biz_content: '{"out_trade_no":"1516099080395","total_amount":10,"subject":"测试支付","product_code":"QUICK_WAP_WAY"}', 124 | timestamp: '2018-01-16 18:38:00', 125 | sign: 'Ec9no7LXl5UF6GhW4UFNIT8lG6pmtGizHVmVVQrt2NW3x4E/wmLu1VDw00exod9INjreK3OcU6/Y4PFvP5QUNALh986sGAPpqx2hr6BwmI8GeNWcCJ78Da7Fsp4fwGmusr56wYeBnKwcTaMCO0K3EV7YDIKqXAkfb4l8rxNrDJztdEOZCaN1ChkJZLzwEKZzt8q5gw4IYcKkYPCbWnHqUhapPLBbSyaL0O6RAG5N+gfpZNMxQeMbO5VwyV1iHsPtl9MZv77gSizLTHqLUTfdb5VC2phxQ08EYan46bFUtDqS6Sl6QkyzVUsyfAisuDrklBpGiYVMR4dk3vwkZ+yUXw==' 126 | } 127 | 128 | ``` 129 | `endpoint`属性代表当前配置的网关地址,可结合`payload`自定义提交 130 | ```text 131 | https://openapi.alipaydev.com/gateway.do 132 | ``` 133 | 134 | ##### 订单配置参数 135 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`product_code` 等参数。** 136 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/203/107090/),查看「请求参数」一栏。 137 | 138 | ------------------ 139 | 140 | #### 三、App支付 141 | ##### 例子 142 | ```javascript 143 | const order = { 144 | out_trade_no: '00000001', 145 | total_amount: 0.01, // 单位 元 146 | subject: '测试支付' 147 | } 148 | const result = await alipay.app(order) // 此方法返回Promise 149 | 150 | ``` 151 | ##### 返回 152 | 成功时`result`返回类似以下数据: 153 | ```text 154 | app_id=2016080200151484¬ify_url=http%3A%2F%2Fshmy.free.ngrok.cc%2Fnotify&return_url=http%3A%2F%2Fxxx.com.cc%2Freturn&charset=utf-8&sign_type=RSA2&version=1.0&format=JSON&method=alipay.trade.app 155 | .pay&biz_content=%7B%22out_trade_no%22%3A%221515983521858%22%2C%22total_amount%22%3A10000%2C%22subject%22%3A%22te'%5C%22%5C%22%5C%22%5C%22%5C%22%5C%22st%22%2C%22auth_code%22%3A%22289756915257123456%22%2C%22product_code%22%3A%22QUICK_MSECURITY_PAY%22%7D×tamp=2018-01-15%2010%3A32%3A01&sign=HRDLsB7zHCHmGQgaRmBpYnRKJencrYS%2FQ5LMOQvgc09955Ta7x34EkaPolXyrXcn9u7lV0Y1EsoCQX16TK6zQm2Bh91dt1KMjlaUZ0hK8X6rUcCrD0ijxkYxZTHfBXeGrX0OaBe33sWa7ZDrk%2FbYzFtZ5trEUSBQYgTl6AReYAw7CpyjylZWSLxkPFTnefDHODhqXJpjdtbd1ABCU61GxxC%2Fe3KBeiA7N%2FtS8JF6OC3wJa9fXxrCdQtpefUJkkdr5vYj6cbW6W8334Z%2FUgZ5smYjuYUHbHmlWggvkmC9ETnloi4iT%2Bgjyi5Q4EezLWG5HsO8VuAPumomc%2Bo4vwvEgA%3D%3D 156 | ``` 157 | ##### 订单配置参数 158 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`product_code` 等参数。** 159 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/204/105465/),查看「请求参数」一栏。 160 | 161 | ------------------ 162 | 163 | #### 四、刷卡/条码支付 164 | ##### 例子 165 | ```javascript 166 | const order = { 167 | out_trade_no: '00000001', 168 | total_amount: 0.01, // 单位 元 169 | subject: '测试支付', 170 | auth_code: '289756915257123456' 171 | } 172 | const result = await alipay.pos(order) // 此方法返回Promise 173 | 174 | ``` 175 | ##### 返回 176 | 成功时`result`返回类似以下数据: 177 | ```javascript 178 | { 179 | code: '10000', 180 | msg: 'Success', 181 | buyer_logon_id: 'rlq***@sandbox.com', 182 | buyer_pay_amount: '1.00', 183 | buyer_user_id: '2088102171352233', 184 | buyer_user_type: 'PRIVATE', 185 | fund_bill_list: [ { amount: '1.00', fund_channel: 'ALIPAYACCOUNT' } ], 186 | gmt_payment: '2018-01-15 13:21:24', 187 | invoice_amount: '1.00', 188 | out_trade_no: '1515993679354', 189 | point_amount: '0.00', 190 | receipt_amount: '1.00', 191 | total_amount: '1.00', 192 | trade_no: '2018011521001004230200245643' 193 | } 194 | ``` 195 | 本接口有可能返回`10003`代码,代表等待用户付款中,此时返回如下: 196 | ```javascript 197 | { 198 | code: '10003', 199 | msg: ' order success pay inprocess', 200 | buyer_logon_id: 'rlq***@sandbox.com', 201 | buyer_pay_amount: '0.00', 202 | buyer_user_id: '2088102171352233', 203 | buyer_user_type: 'PRIVATE', 204 | invoice_amount: '0.00', 205 | out_trade_no: '1515993611620', 206 | point_amount: '0.00', 207 | receipt_amount: '0.00', 208 | total_amount: '10000.00', 209 | trade_no: '2018011521001004230200245782', 210 | } 211 | 212 | ``` 213 | 214 | ##### 订单配置参数 215 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`product_code` 等参数。** 216 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/api_1/alipay.trade.pay),查看「请求参数」一栏。 217 | 218 | ------------------ 219 | 220 | #### 五、扫码支付 221 | ##### 例子 222 | ```javascript 223 | const order = { 224 | out_trade_no: '00000001', 225 | total_amount: 0.01, // 单位 元 226 | subject: '测试支付' 227 | } 228 | const result = await alipay.scan(order) // 此方法返回Promise 229 | 230 | ``` 231 | ##### 返回 232 | 成功时`result`返回类似以下数据: 233 | ```javascript 234 | { 235 | code: '10000', 236 | msg: 'Success', 237 | out_trade_no: '1515983595882', 238 | qr_code: 'https://qr.alipay.com/bax07154nst0cjb0ckqq004d' 239 | } 240 | ``` 241 | ##### 订单配置参数 242 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`product_code` 等参数。** 243 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/api_1/alipay.trade.precreate),查看「请求参数」一栏。 244 | 245 | ------------------ 246 | 247 | #### 六、账户转账 248 | ##### 例子 249 | ```javascript 250 | const order = { 251 | out_biz_no: '00000001', 252 | payee_type: 'ALIPAY_LOGONID', 253 | payee_account: 'ghdhjw7124@sandbox.com', 254 | amount: 0.01 // 单位 元 255 | } 256 | const result = await alipay.transfer(order) // 此方法返回Promise 257 | 258 | ``` 259 | ##### 订单配置参数 260 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`product_code` 等参数。** 261 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/api_28/alipay.fund.trans.toaccount.transfer),查看「请求参数」一栏。 262 | 263 | ------------------ 264 | ### 订单退款 265 | #### 例子 266 | ```javascript 267 | const order = { 268 | out_trade_no: '1514027114', 269 | refund_amount: '0.01' 270 | } 271 | 272 | const result = await alipay.refund(order) // 此方法返回Promise 273 | 274 | ``` 275 | #### 订单配置参数 276 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/api_1/alipay.trade.refund),查看「请求参数」一栏。 277 | 278 | ------------------- 279 | 280 | ### 查询订单 281 | #### 例子 282 | ```javascript 283 | const order = { 284 | out_trade_no: '1514027114' 285 | } 286 | // 或者直接传递字符串 287 | // const order = '1514027114' 288 | 289 | const result = await alipay.find(order) // 此方法返回Promise 290 | 291 | ``` 292 | #### 订单配置参数 293 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/api_1/alipay.trade.query/),查看「请求参数」一栏。 294 | 295 | ------------------- 296 | 297 | ### 取消订单 298 | #### 例子 299 | ```javascript 300 | const order = { 301 | out_trade_no: '1514027114' 302 | } 303 | // 或者直接传递字符串 304 | // const order = '1514027114' 305 | 306 | const result = await alipay.cancel(order) // 此方法返回Promise 307 | 308 | ``` 309 | #### 订单配置参数 310 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/api_1/alipay.trade.cancel/),查看「请求参数」一栏。 311 | 312 | ------------------- 313 | 314 | ### 关闭订单 315 | #### 例子 316 | ```javascript 317 | const order = { 318 | out_trade_no: '1514027114' 319 | } 320 | // 或者直接传递字符串 321 | // const order = '1514027114' 322 | 323 | const result = await alipay.close(order) // 此方法返回Promise 324 | 325 | ``` 326 | #### 订单配置参数 327 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://docs.open.alipay.com/api_1/alipay.trade.close/),查看「请求参数」一栏。 328 | 329 | ------------------- 330 | 331 | ### 返回地址与异步通知的验签 332 | #### 例子 333 | ```javascript 334 | 335 | app.get('/return', (req, res) => { 336 | if (alipay.verify(req.query)) { // 一句话验签,就这么简单 337 | res.send('支付成功!!!' + JSON.stringify(req.query)) 338 | } else { 339 | res.send('支付失败!!!' + JSON.stringify(req.query)) 340 | } 341 | }) 342 | 343 | app.post('/notify', (req, res) => { 344 | if (alipay.verify(req.body)) { // 一句话验签,就这么简单 345 | console.log('支付宝异步验签成功:') 346 | res.send('SUCCESS') 347 | } else { 348 | console.log('支付宝异步验签失败:') 349 | res.send('ERROR') 350 | } 351 | }) 352 | ``` 353 | 354 | -------------------- 355 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const Alipay = require('./src/alipay'); 4 | const Wechat = require('./src/wechat'); 5 | 6 | module.exports = class { 7 | static alipay(...args) { 8 | return new Alipay(...args); 9 | } 10 | static wechat(...args) { 11 | return new Wechat(...args); 12 | } 13 | }; 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cn-pay", 3 | "version": "0.0.4", 4 | "description": "a alipay wechat pay lib", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "lint": "eslint src --fix" 9 | }, 10 | "keywords": [ 11 | "wechat", 12 | "alipay", 13 | "pay" 14 | ], 15 | "author": "shmy", 16 | "homepage": "https://github.com/shmy/cn-pay", 17 | "license": "MIT", 18 | "dependencies": { 19 | "xml2js": "^0.4.19" 20 | }, 21 | "devDependencies": { 22 | "eslint": "^4.15.0", 23 | "eslint-config-egg": "^6.0.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/alipay/gateways/app.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const util = require('../util'); 4 | 5 | module.exports = class { 6 | constructor(config) { 7 | this.config = config; 8 | } 9 | pay(endpoint, payload) { 10 | payload.method = 'alipay.trade.app.pay'; 11 | payload.biz_content.product_code = 'QUICK_MSECURITY_PAY'; 12 | payload.biz_content = JSON.stringify(payload.biz_content); 13 | payload.sign = util.generateSign(payload, this.config.private_key); 14 | const result = util.stringify(payload, '&', '='); 15 | return Promise.resolve(result); 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /src/alipay/gateways/pos.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const util = require('../util'); 4 | 5 | module.exports = class { 6 | constructor(config) { 7 | this.config = config; 8 | } 9 | pay(endpoint, payload) { 10 | payload.method = this.getMethod(); 11 | payload.biz_content.product_code = this.getProductCode(); 12 | payload.biz_content.scene = this.getScene(); 13 | payload.biz_content = JSON.stringify(payload.biz_content); 14 | payload.sign = util.generateSign(payload, this.config.private_key); 15 | return util.request(endpoint, payload, this.config.public_key); 16 | } 17 | getScene() { 18 | return 'bar_code'; 19 | } 20 | getMethod() { 21 | return 'alipay.trade.pay'; 22 | } 23 | getProductCode() { 24 | return 'FACE_TO_FACE_PAYMENT'; 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /src/alipay/gateways/scan.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const PosGateway = require('./pos.gateway'); 4 | 5 | module.exports = class extends PosGateway { 6 | getScene() { 7 | return ''; 8 | } 9 | getMethod() { 10 | return 'alipay.trade.precreate'; 11 | } 12 | getProductCode() { 13 | return ''; 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /src/alipay/gateways/transfer.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const PosGateway = require('./pos.gateway'); 4 | 5 | module.exports = class extends PosGateway { 6 | getMethod() { 7 | return 'alipay.fund.trans.toaccount.transfer'; 8 | } 9 | getProductCode() { 10 | return ''; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /src/alipay/gateways/wap.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const WebGateway = require('./web.gateway'); 4 | 5 | module.exports = class extends WebGateway { 6 | getMethod() { 7 | return 'alipay.trade.wap.pay'; 8 | } 9 | getProductCode() { 10 | return 'QUICK_WAP_WAY'; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /src/alipay/gateways/web.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const util = require('../util'); 4 | 5 | module.exports = class { 6 | constructor(config) { 7 | this.config = config; 8 | } 9 | pay(endpoint, payload) { 10 | payload.method = this.getMethod(); 11 | payload.biz_content.product_code = this.getProductCode(); 12 | payload.biz_content = JSON.stringify(payload.biz_content); 13 | payload.sign = util.generateSign(payload, this.config.private_key); 14 | const html = util.buildFormHTML(endpoint, payload); 15 | return Promise.resolve({ html, payload, endpoint }); 16 | } 17 | getMethod() { 18 | return 'alipay.trade.page.pay'; 19 | } 20 | getProductCode() { 21 | return 'FAST_INSTANT_TRADE_PAY'; 22 | } 23 | }; 24 | -------------------------------------------------------------------------------- /src/alipay/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const util = require('./util'); 4 | const Gateways = {}; 5 | const methods = [ 6 | 'app', 7 | 'web', 8 | 'wap', 9 | 'pos', 10 | 'scan', 11 | 'transfer', 12 | ]; 13 | methods.forEach(name => (Gateways[`${name}Gateway`] = require(`./gateways/${name}.gateway`))); 14 | 15 | class Alipay { 16 | /** 17 | * 18 | * @param {Object} config 构造参数 19 | * @param {String} config.app_id 商户app_id 20 | * @param {String} config.private_key 商户私钥 21 | * @param {String} config.public_key 支付宝公钥 22 | * @param {String} config.notify_url 通知地址 23 | * @param {String} config.return_url 回跳地址 24 | * @param {String} [config.dev] 设置此参数,将进入沙箱模式 25 | */ 26 | constructor(config) { 27 | this.config = config; 28 | this.payload = { 29 | app_id: this.config.app_id, 30 | notify_url: this.config.notify_url, 31 | return_url: this.config.return_url, 32 | charset: 'utf-8', 33 | sign_type: 'RSA2', 34 | version: '1.0', 35 | format: 'JSON', 36 | method: '', 37 | biz_content: '', 38 | // sign: '' 39 | }; 40 | } 41 | verify(body, sign) { 42 | return util.verifySign(body, this.config.public_key, sign); 43 | } 44 | find(order) { 45 | return this.__trade('query', order); 46 | } 47 | cancel(order) { 48 | return this.__trade('cancel', order); 49 | } 50 | close(order) { 51 | return this.__trade('close', order); 52 | } 53 | refund(order) { 54 | return this.__trade('refund', order); 55 | } 56 | __trade(method, biz_content) { 57 | const payload = Object.assign({}, this.payload); 58 | biz_content = typeof biz_content === 'string' ? { out_trade_no: biz_content } : biz_content; 59 | payload.method = 'alipay.trade.' + method; 60 | payload.biz_content = JSON.stringify(biz_content); 61 | payload.timestamp = util.getDateTime(); 62 | payload.sign = util.generateSign(payload, this.config.private_key); 63 | return util.request(util.getGateway(this.config.dev), payload, this.config.public_key); 64 | } 65 | } 66 | 67 | function __call(name, biz_content) { 68 | const payload = Object.assign({}, this.payload); 69 | payload.biz_content = biz_content; 70 | payload.timestamp = util.getDateTime(); 71 | return new Gateways[`${name}Gateway`](this.config) 72 | .pay(util.getGateway(this.config.dev), payload); 73 | } 74 | 75 | methods.forEach(name => { 76 | Alipay.prototype[name] = function(...args) { 77 | return __call.call(this, name, ...args); 78 | }; 79 | }); 80 | 81 | module.exports = Alipay; 82 | -------------------------------------------------------------------------------- /src/alipay/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { createSign, createVerify } = require('crypto'); 4 | const { stringify } = require('querystring'); 5 | const { request } = require('http'); 6 | const { parse } = require('url'); 7 | 8 | const { GatewayException, InvalidSignException } = require('../error'); 9 | 10 | module.exports = class Util { 11 | static getGateway(isDev = false) { 12 | return `https://openapi.alipay${isDev ? 'dev' : ''}.com/gateway.do`; 13 | } 14 | static getDateTime(timestamp) { 15 | timestamp = timestamp || Date.now(); 16 | const _ = [ '00', '01', '02', '03', '04', '05', '06', '07', '08', '09' ]; // 补零 17 | const timer = new Date(timestamp); 18 | const y = timer.getFullYear(); 19 | const mon = timer.getMonth() + 1; 20 | const d = timer.getDate(); 21 | const h = timer.getHours(); 22 | const m = timer.getMinutes(); 23 | const s = timer.getSeconds(); 24 | return `${y}-${_[mon] || mon}-${_[d] || d} ${_[h] || h}:${_[m] || m}:${_[s] || s}`; 25 | } 26 | static insertStr(str, insert_str, sn) { 27 | let newstr = ''; 28 | for (let i = 0; i < str.length; i += sn) { 29 | const tmp = str.substring(i, i + sn); 30 | newstr += tmp + insert_str; 31 | } 32 | return newstr; 33 | } 34 | static httpPost(url, data) { 35 | return new Promise((resolve, reject) => { 36 | data = stringify(data); 37 | const { hostname, path } = parse(url); 38 | const options = { 39 | hostname, 40 | path, 41 | method: 'POST', 42 | headers: { 43 | 'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8', 44 | }, 45 | }; 46 | const req = request(options, res => { 47 | res.setEncoding('utf8'); 48 | let data = ''; 49 | res.on('data', chunk => { 50 | data += chunk; 51 | }); 52 | res.on('end', () => { 53 | try { 54 | resolve(JSON.parse(data)); 55 | } catch (error) { 56 | error.message = 'Cannot resolve the interface returned data'; 57 | reject(error); 58 | } 59 | }); 60 | }); 61 | req.on('error', error => { 62 | reject(error); 63 | }); 64 | req.write(data); 65 | req.end(); 66 | }); 67 | } 68 | static request(url, payload, public_key) { 69 | return new Promise((resolve, reject) => { 70 | Util.httpPost(url, payload) 71 | .then(data => { 72 | const sign = data.sign; 73 | data = data[payload.method.replace(/\./g, '_') + '_response']; 74 | // 开始验签 75 | if (!Util.verifySign(data, public_key, sign, true)) { 76 | return reject(new InvalidSignException('验签失败', data)); 77 | } 78 | if (data.code && (data.code === '10003' || data.code === '10000')) { 79 | return resolve(data); 80 | } 81 | return reject(new GatewayException(data.sub_msg || data.msg, data)); 82 | }) 83 | .catch(error => { 84 | reject(new GatewayException(error.message, null)); 85 | }); 86 | }); 87 | } 88 | static stringify(...args) { 89 | return stringify(...args); 90 | } 91 | static generateSign(payload, private_key) { 92 | const dispose = Util.getSignContent(payload); 93 | // 使用商户私钥进行RSA2签名 94 | const sign = createSign('RSA-SHA256'); 95 | sign.write(dispose); 96 | sign.end(); 97 | private_key = Util.getPemString(private_key, false); 98 | return sign.sign(private_key, 'base64'); 99 | } 100 | static verifySign(payload, public_key, sign = null, isSync = false) { 101 | sign = sign || payload.sign; 102 | if (payload.sign) { 103 | delete payload.sign; 104 | } 105 | if (payload.sign_type) { 106 | delete payload.sign_type; 107 | } 108 | const dispose = isSync ? JSON.stringify(payload).replace(/\//g, '\\\/') 109 | : Util.getSignContent(payload); 110 | // 使用支付宝公钥进行RSA2验签 111 | const verify = createVerify('RSA-SHA256'); 112 | verify.update(dispose); 113 | public_key = Util.getPemString(public_key); 114 | // 返回验签结果 115 | return verify.verify(public_key, sign, 'base64'); 116 | } 117 | static getSignContent(payload) { 118 | const dispose = {}; 119 | Object.keys(payload).sort().forEach(key => (dispose[key] = payload[key])); 120 | return decodeURIComponent(stringify(dispose, '&', '=')); 121 | } 122 | static getPemString(key, isPublic = true) { 123 | if (key.startsWith('-----BEGIN')) { 124 | return key; 125 | } 126 | const type = isPublic ? 'PUBLIC' : 'PRIVATE'; 127 | return `-----BEGIN ${type} KEY-----\n${Util.insertStr(key, '\n', 64)}-----END ${type} KEY-----`; 128 | } 129 | static buildFormHTML(endpoint, payload) { 130 | let html = `
`; 131 | Object.keys(payload).forEach(key => { 132 | const val = payload[key] 133 | .replace(/'/g, '''); 134 | html += ``; 135 | }); 136 | html += '
'; 137 | html += ''; 138 | return html; 139 | } 140 | 141 | }; 142 | -------------------------------------------------------------------------------- /src/error.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | class PayError extends Error { 4 | constructor(message, raw) { 5 | super(message); 6 | this.message = message; 7 | this.name = this.constructor.name; 8 | this.raw = raw; 9 | } 10 | } 11 | 12 | exports.GatewayException = class GatewayException extends PayError {}; 13 | exports.InvalidSignException = class InvalidSignException extends PayError {}; 14 | -------------------------------------------------------------------------------- /src/wechat/gateways/app.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const util = require('../util'); 4 | const mpGateway = require('./mp.gateway'); 5 | 6 | module.exports = class extends mpGateway { 7 | getAppId() { 8 | return this.config.appid; 9 | } 10 | getTradeType() { 11 | return 'APP'; 12 | } 13 | getOutPut(data) { 14 | const output = { 15 | appid: data.appid, 16 | partnerid: data.mch_id, 17 | prepayid: data.prepay_id, 18 | package: 'Sign=WXPay', 19 | noncestr: util.createNonceStr(), 20 | timestamp: parseInt(Date.now() / 1000).toString(), 21 | }; 22 | output.sign = util.generateSign(output, this.config.key); 23 | return output; 24 | } 25 | }; 26 | -------------------------------------------------------------------------------- /src/wechat/gateways/miniapp.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mpGateway = require('./mp.gateway'); 4 | 5 | module.exports = class extends mpGateway { 6 | getAppId() { 7 | return this.config.miniapp_id; 8 | } 9 | getTradeType() { 10 | return 'JSAPI'; 11 | } 12 | }; 13 | -------------------------------------------------------------------------------- /src/wechat/gateways/mp.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const util = require('../util'); 4 | 5 | module.exports = class { 6 | constructor(config) { 7 | this.config = config; 8 | } 9 | pay(payload) { 10 | payload.appid = this.getAppId(); 11 | payload.trade_type = this.getTradeType(); 12 | payload.sign = util.generateSign(payload, this.config.key); 13 | return new Promise((resolve, reject) => { 14 | util.request('/pay/unifiedorder', payload, this.config.key) 15 | .then(data => resolve(this.getOutPut(data))) 16 | .catch(reject); 17 | }); 18 | } 19 | getAppId() { 20 | return this.config.app_id; 21 | } 22 | getTradeType() { 23 | return 'JSAPI'; 24 | } 25 | getOutPut(data) { 26 | const output = { 27 | appId: data.appid, 28 | package: 'prepay_id=' + data.prepay_id, 29 | timeStamp: parseInt(Date.now() / 1000).toString(), 30 | nonceStr: util.createNonceStr(), 31 | signType: 'MD5', 32 | }; 33 | output.paySign = util.generateSign(output, this.config.key); 34 | return output; 35 | } 36 | }; 37 | -------------------------------------------------------------------------------- /src/wechat/gateways/pos.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const util = require('../util'); 4 | 5 | module.exports = class { 6 | constructor(config) { 7 | this.config = config; 8 | } 9 | pay(payload) { 10 | delete payload.notify_url; 11 | delete payload.trade_type; 12 | payload.appid = this.config.app_id; 13 | payload.sign = util.generateSign(payload, this.config.key); 14 | return new Promise((resolve, reject) => { 15 | util.request('/pay/micropay', payload, this.config.key) 16 | .then(data => resolve(data)) 17 | .catch(reject); 18 | }); 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /src/wechat/gateways/scan.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mpGateway = require('./mp.gateway'); 4 | module.exports = class extends mpGateway { 5 | getOutPut(data) { 6 | return data; 7 | } 8 | getTradeType() { 9 | return 'NATIVE'; 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /src/wechat/gateways/transfer.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = class { 4 | 5 | }; 6 | -------------------------------------------------------------------------------- /src/wechat/gateways/wap.gateway.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mpGateway = require('./mp.gateway'); 4 | 5 | module.exports = class extends mpGateway { 6 | getOutPut(data) { 7 | if (this.config.return_url) { 8 | data.mweb_url += '&redirect_url=' + encodeURIComponent(this.config.return_url); 9 | } 10 | return data; 11 | } 12 | getTradeType() { 13 | return 'MWEB'; 14 | } 15 | }; 16 | -------------------------------------------------------------------------------- /src/wechat/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { GatewayException } = require('../error'); 4 | 5 | const util = require('./util'); 6 | const Gateways = {}; 7 | const methods = [ 8 | 'app', 9 | 'mp', 10 | 'wap', 11 | 'pos', 12 | 'scan', 13 | 'miniapp', 14 | 'transfer', 15 | ]; 16 | methods.forEach(name => (Gateways[`${name}Gateway`] = require(`./gateways/${name}.gateway`))); 17 | 18 | class Wechat { 19 | 20 | /** 21 | * 22 | * @param {Object} config 构造参数 23 | * @param {String} config.app_id 公众号的appid 24 | * @param {String} config.appid App 的appid 25 | * @param {String} config.miniapp_id 小程序的appid 26 | * @param {String} config.mch_id 商户id 27 | * @param {String} config.key 密钥 28 | * @param {String} config.notify_url 通知地址 29 | * @param {String} config.return_url h5支付回跳地址 30 | * @param {String} [config.pfx] p12证书文件内容 31 | */ 32 | constructor(config) { 33 | this.config = config; 34 | this.payload = { 35 | // appid: this.config.app_id, 36 | mch_id: this.config.mch_id, 37 | notify_url: this.config.notify_url, 38 | sign_type: 'MD5', 39 | nonce_str: '', 40 | trade_type: '', 41 | spbill_create_ip: '', 42 | // sign: '', 43 | }; 44 | } 45 | 46 | verify(body, sign) { 47 | body = typeof body === 'string' ? util.parseXML(body) : body; 48 | sign = sign || body.sign; 49 | return sign === util.generateSign(body, this.config.key); 50 | } 51 | success() { 52 | return 'SUCCESSOK'; 53 | } 54 | fail(msg = 'error') { 55 | return `FAIL`; 56 | } 57 | find(order, type) { 58 | return this.__trade('/pay/orderquery', order, type); 59 | } 60 | cancel() { 61 | throw new GatewayException('Wechat Do Not Have Cancel API! Plase use Close API!'); 62 | } 63 | close(order, type) { 64 | return this.__trade('/pay/closeorder', order, type); 65 | } 66 | refund(order, type) { 67 | if (order.total_fee) { 68 | order.total_fee = +(order.total_fee * 100).toFixed(2); 69 | } 70 | if (order.refund_fee) { 71 | order.refund_fee = +(order.refund_fee * 100).toFixed(2); 72 | } 73 | 74 | return this.__trade('/secapi/pay/refund', order, type, this.config.pfx, this.config.mch_id); 75 | } 76 | __trade(pathinfo, order, type, pfx, passphrase) { 77 | const appids = { 78 | APP: this.config.appid, 79 | MINIAPP: this.config.miniapp_id, 80 | }; 81 | order = typeof order === 'string' ? { out_trade_no: order } : order; 82 | let payload = Object.assign({}, this.payload); 83 | delete payload.notify_url; 84 | delete payload.spbill_create_ip; 85 | delete payload.trade_type; 86 | payload.appid = appids[type] || this.config.app_id; 87 | payload.nonce_str = util.createNonceStr(); 88 | payload = Object.assign({}, payload, order); 89 | payload.sign = util.generateSign(payload, this.config.key); 90 | return util.request(pathinfo, payload, this.config.key, pfx, passphrase); 91 | } 92 | } 93 | 94 | function __call(name, params) { 95 | // 转换成分 96 | params.total_fee = +(params.total_fee * 100).toFixed(2); 97 | params.nonce_str = util.createNonceStr(); 98 | const payload = Object.assign({}, this.payload, params); 99 | return new Gateways[`${name}Gateway`](this.config) 100 | .pay(payload); 101 | } 102 | 103 | methods.forEach(name => { 104 | Wechat.prototype[name] = function(...args) { 105 | return __call.call(this, name, ...args); 106 | }; 107 | }); 108 | 109 | module.exports = Wechat; 110 | -------------------------------------------------------------------------------- /src/wechat/util.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { createHash } = require('crypto'); 4 | const { parseString, Builder } = require('xml2js'); 5 | const { parse } = require('url'); 6 | const { stringify } = require('querystring'); 7 | const { request } = require('https'); 8 | 9 | const { GatewayException, InvalidSignException } = require('../error'); 10 | 11 | class Util { 12 | static createNonceStr(length = 15) { 13 | return Math.random().toString(36).substr(2, length); 14 | } 15 | static request(url, data, key, pfx, passphrase) { 16 | url = 'https://api.mch.weixin.qq.com' + url; 17 | data = Util.buildObject(data); 18 | return new Promise((resolve, reject) => { 19 | const { hostname, path } = parse(url); 20 | const options = { 21 | hostname, 22 | path, 23 | pfx, 24 | passphrase, 25 | protocol: 'https:', 26 | method: 'POST', 27 | headers: { 28 | 'Content-Type': 'application/xml; charset=utf-8', 29 | }, 30 | }; 31 | const req = request(options, res => { 32 | res.setEncoding('utf8'); 33 | let data = ''; 34 | res.on('data', chunk => { 35 | data += chunk; 36 | }); 37 | res.on('end', () => { 38 | Util.parseXML(data) 39 | .then(data => { 40 | if (data.return_code !== 'SUCCESS' || (data.result_code !== 'SUCCESS' && data.err_code !== 'USERPAYING')) { 41 | return reject(new GatewayException(data.err_code_des || data.return_msg || '', data)); 42 | } 43 | const sign = data.sign; 44 | if (Util.generateSign(data, key) !== sign) { 45 | return reject(new InvalidSignException('验签失败', data)); 46 | } 47 | return resolve(data); 48 | }) 49 | .catch(error => { 50 | reject(error); 51 | }); 52 | }); 53 | }); 54 | req.on('error', error => { 55 | reject(error); 56 | }); 57 | req.write(data); 58 | req.end(); 59 | }); 60 | } 61 | // 把js对象转换成xml字符串 62 | static buildObject(obj) { 63 | return new Builder({ 64 | rootName: 'xml', 65 | cdata: true, 66 | headless: true, 67 | }).buildObject(obj); 68 | } 69 | 70 | // 把xml字符串转换成js对象 71 | static parseXML(xmlString) { 72 | return new Promise((resolve, reject) => { 73 | parseString(xmlString, { trim: true }, (error, result) => { 74 | if (error) return reject(error); 75 | result = result.xml; 76 | // 内容会被解析一个数组,应该取下标0 77 | Object.keys(result).forEach(key => (result[key] = result[key][0])); 78 | resolve(result); 79 | }); 80 | }); 81 | } 82 | 83 | // 转换成md5 84 | static createMD5(source) { 85 | return createHash('md5').update(source).digest('hex'); 86 | } 87 | // 签名 88 | static generateSign(payload, key) { 89 | if (payload.sign) { 90 | delete payload.sign; 91 | } 92 | const dispose = {}; 93 | // 第一步: 按 key 值进行自然排序 94 | Object.keys(payload).sort().forEach(key => { 95 | // 去除空值 #1 96 | if (payload[key]) { 97 | dispose[key] = payload[key]; 98 | } 99 | }); 100 | // 第二步: 把对象转换为类似HTTP Query 参数 并去除URL转义符号 101 | let str = decodeURIComponent(stringify(dispose, '&', '=')); 102 | // 第三步: 加入私钥字段进行MD5转码并大写 103 | str += '&key=' + key; 104 | return Util.createMD5(str).toUpperCase(); 105 | } 106 | 107 | // static getSignkey(payload) { 108 | // return Util.httpPost('/pay/getsignkey', payload, true) 109 | // } 110 | } 111 | 112 | module.exports = Util; 113 | -------------------------------------------------------------------------------- /wechat.md: -------------------------------------------------------------------------------- 1 | ## 微信 2 | 3 | ### 初始化实例 4 | ```javascript 5 | const Pay = require('cn-pay') 6 | const config = { 7 | app_id: 'app_id', // 公众号appid 8 | appid: 'appid', // app的appid 9 | miniapp_id: 'miniapp_id', // 小程序的appid 10 | mch_id: 'mch_id', // 商户Id 11 | key: 'key', // 商户密钥 12 | notify_url: 'notify_url', // 通知地址 13 | return_url: 'return_url', // 跳转地址 14 | pfx: fs.readFileSync('') // 可选, 退款等情况时需要用到 15 | } 16 | const wechat = Pay.wechat(config) 17 | ``` 18 | 19 | ### 支付订单 20 | #### 一、公众号网页支付 21 | ##### 例子 22 | ```javascript 23 | const order = { 24 | out_trade_no: '0000001', 25 | body: 'subject-测试', 26 | total_fee: 1, // 直接以元为单位 27 | openid: 'onkVf1FjWS5SBxxxxxxxx', // openid 28 | spbill_create_ip: 'spbill_create_ip' // 客户端ip 29 | } 30 | 31 | const result = await wechat.mp(order) // 此方法返回Promise 32 | ``` 33 | ##### 成功返回 34 | 成功后`result`的值为类似以下结果: 35 | ```javascript 36 | { 37 | appId: 'wx1c198f2cad228bee', 38 | package: 'prepay_id=wx20180115094744ab552e649c0025010603', 39 | timeStamp: '1515980861', 40 | nonceStr: 'sqax2vmws3', 41 | signType: 'MD5', 42 | paySign: 'D79BD1F0E4B12D1DFBA010E5DAE77DFE' 43 | } 44 | ``` 45 | ##### 订单配置参数 46 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`trade_type`, `appid`, `sign` 等参数。** 47 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_1),查看「请求参数」一栏。 48 | 49 | ------------------------- 50 | 51 | #### 二、手机网页(h5)支付 52 | ##### 例子 53 | ```javascript 54 | const order = { 55 | out_trade_no: '0000001', 56 | body: 'subject-测试', 57 | total_fee: 1, // 直接以元为单位 58 | spbill_create_ip: 'spbill_create_ip' // 客户端ip 59 | } 60 | 61 | const result = await wechat.wap(order) // 此方法返回Promise 62 | ``` 63 | ##### 成功返回 64 | 成功后`result`的值为类似以下结果: 65 | ```javascript 66 | { 67 | return_code: 'SUCCESS', 68 | return_msg: 'OK', 69 | appid: 'wx2421b1c4370ec43b', 70 | mch_id: '10000100', 71 | nonce_str: 'IITRi8Iabbblz1Jc', 72 | sign: '7921E432F65EB8ED0CE9755F0E86D72F', 73 | result_code: 'SUCCESS', 74 | prepay_id: 'wx201411101639507cbf6ffd8b0779950874', 75 | trade_type: 'MWEB', 76 | mweb_url: 'https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx2016121516420242444321ca0631331346&package=1405458241&redirect_url=return_url' 77 | } 78 | ``` 79 | ##### 订单配置参数 80 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`trade_type`, `appid`, `sign` 等参数。** 81 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/H5.php?chapter=9_20&index=1),查看「请求参数」一栏。 82 | 83 | -------------------- 84 | 85 | #### 三、App支付 86 | ##### 例子 87 | ```javascript 88 | const order = { 89 | out_trade_no: '0000001', 90 | body: 'subject-测试', 91 | total_fee: 1, // 直接以元为单位 92 | spbill_create_ip: 'spbill_create_ip' // 客户端ip 93 | } 94 | 95 | const result = await wechat.app(order) // 此方法返回Promise 96 | ``` 97 | ##### 成功返回 98 | 成功后`result`的值为类似以下结果: 99 | ```javascript 100 | { 101 | appid: 'wx1c198g4ad228bee', 102 | partnerid: '1460444802', 103 | prepayid: 'wx20180115100912c407d7dbf70493145721', 104 | package: 'Sign=WXPay', 105 | noncestr: 'kuo1z1qmy3m', 106 | timestamp: '1515982149', 107 | sign: '5C6BE57C28EE8B3BA950BF6E799A443F' 108 | } 109 | ``` 110 | ##### 订单配置参数 111 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`trade_type`, `appid`, `sign` 等参数。** 112 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_1),查看「请求参数」一栏。 113 | 114 | -------------------- 115 | 116 | #### 四、小程序支付(未实现) 117 | ##### 例子 118 | ```javascript 119 | const order = { 120 | out_trade_no: '0000001', 121 | body: 'subject-测试', 122 | total_fee: 1, // 直接以元为单位 123 | openid: 'onkVf1FjWS5SBxxxxxxxx', // openid 124 | spbill_create_ip: 'spbill_create_ip' // 客户端ip 125 | } 126 | 127 | const result = await wechat.miniapp(order) // 此方法返回Promise 128 | ``` 129 | ##### 成功返回 130 | 成功后`result`的值为类似以下结果: 131 | ```javascript 132 | // 未实现 133 | ``` 134 | ##### 订单配置参数 135 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`trade_type`, `appid`, `sign` 等参数。** 136 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_1),查看「请求参数」一栏。 137 | 138 | -------------------- 139 | 140 | #### 五、刷卡/条码支付 141 | ##### 例子 142 | ```javascript 143 | const order = { 144 | out_trade_no: '0000001', 145 | body: 'subject-测试', 146 | total_fee: 1, // 直接以元为单位 147 | auth_code: '1354804793001231564897', 148 | spbill_create_ip: 'spbill_create_ip' // 客户端ip 149 | } 150 | 151 | const result = await wechat.pos(order) // 此方法返回Promise 152 | ``` 153 | ##### 成功返回 154 | 成功后`result`的值为类似以下结果: 155 | 请根据`err_code` = `USERPAYING`,做定时查询,以确保真正支付成功 156 | ```javascript 157 | { 158 | return_code: 'SUCCESS', 159 | return_msg: 'OK', 160 | appid: 'wx1c298f2cfg928bee', 161 | mch_id: '1483272902', 162 | nonce_str: 'F05AC0JnYL9QYX50', 163 | sign: 'F0B7082E9E57BFB590D58CE7C0B3E25A', 164 | result_code: 'FAIL', 165 | err_code: 'USERPAYING', 166 | err_code_des: '需要用户输入支付密码' 167 | } 168 | ``` 169 | ##### 订单配置参数 170 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`trade_type`, `appid`, `sign` 等参数。** 171 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_10&index=1),查看「请求参数」一栏。 172 | 173 | -------------------- 174 | 175 | #### 六、扫码支付 176 | ##### 例子 177 | ```javascript 178 | const order = { 179 | out_trade_no: '0000001', 180 | body: 'subject-测试', 181 | total_fee: 1, // 直接以元为单位 182 | spbill_create_ip: 'spbill_create_ip' // 客户端ip 183 | } 184 | 185 | const result = await wechat.scan(order) // 此方法返回Promise 186 | ``` 187 | ##### 成功返回 188 | 成功后`result`的值为类似以下结果: 189 | ```javascript 190 | { 191 | return_code: 'SUCCESS', 192 | return_msg: 'OK', 193 | appid: 'wx1c298f2cfg928bee', 194 | mch_id: '1483272902', 195 | nonce_str: 'zqdbp8QhMA7lSpfP', 196 | result_code: 'SUCCESS', 197 | prepay_id: 'wx20180116101212517d3471fa0624769084', 198 | trade_type: 'NATIVE', 199 | code_url: 'weixin://wxpay/bizpayurl?pr=JxsXSLO' 200 | } 201 | ``` 202 | ##### 订单配置参数 203 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`trade_type`, `appid`, `sign` 等参数。** 204 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=9_1),查看「请求参数」一栏。 205 | 206 | -------------------- 207 | 208 | #### 七、账户转账/企业付款(未实现) 209 | ##### 例子 210 | ```javascript 211 | const order = { 212 | partner_trade_no: '0000001', // 商户订单号 213 | openid: 'openid', // 收款人openid 214 | check_name: 'NO_CHECK', // NO_CHECK:不校验真实姓名\FORCE_CHECK:强校验真实姓名 215 | amount: 1, // 直接以元为单位 216 | desc: '账户提现', // 付款说明 217 | spbill_create_ip: 'spbill_create_ip' // 客户端ip 218 | } 219 | 220 | const result = await wechat.transfer(order) // 此方法返回Promise 221 | ``` 222 | ##### 成功返回 223 | 成功后`result`的值为类似以下结果: 224 | ```javascript 225 | // 未实现 226 | ``` 227 | ##### 订单配置参数 228 | **所有订单配置中,客观参数均不用配置,扩展包已经为大家自动处理了,比如,`trade_type`, `appid`, `sign` 等参数。** 229 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_2),查看「请求参数」一栏。 230 | 231 | -------------------- 232 | 233 | ### 订单退款(未实现) 234 | #### 例子 235 | ```javascript 236 | const order = { 237 | out_trade_no: '1514027114', 238 | out_refund_no: '1516000270202', 239 | total_fee: 1, // 单位元 240 | refund_fee: 1, // 单位元 241 | refund_desc: '退款测试' 242 | } 243 | const result = await wechat.refund(order) // 此方法返回Promise 244 | 245 | // APP/小程序退款 246 | // 如果您需要退款 APP/小程序 的订单,请传入第二个字符串参数APP 或 MINIAPP 247 | const result = await wechat.refund(order, 'APP') // APP订单 此方法返回Promise 248 | const result = await wechat.refund(order, 'MINIAPP') // 小程序订单 此方法返回Promise 249 | ``` 250 | #### 订单配置参数 251 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4),查看「请求参数」一栏。 252 | 253 | ---------------- 254 | 255 | ### 查询订单 256 | #### 例子 257 | ```javascript 258 | const order = { 259 | out_trade_no: '1514027114' 260 | } 261 | // 或者直接传递字符串 262 | // const order = '1514027114' 263 | const result = await wechat.find(order) // 此方法返回Promise 264 | 265 | // APP/小程序查询 266 | // 如果您需要查询 APP/小程序 的订单,请传入第二个字符串参数APP 或 MINIAPP 267 | const result = await wechat.find(order, 'APP') // APP订单 此方法返回Promise 268 | const result = await wechat.find(order, 'MINIAPP') // 小程序订单 此方法返回Promise 269 | ``` 270 | #### 订单配置参数 271 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_2),查看「请求参数」一栏。 272 | 273 | ------------------- 274 | 275 | ### 取消订单 276 | **微信官方无此 `API`,请调用 `close` 关闭订单。** 277 | 278 | ### 关闭订单 279 | #### 例子 280 | ```javascript 281 | const order = { 282 | out_trade_no: '1514027114' 283 | } 284 | // 或者直接传递字符串 285 | // const order = '1514027114' 286 | const result = await wechat.close(order) // 此方法返回Promise 287 | 288 | // APP/小程序关闭 289 | // 如果您需要关闭 APP/小程序 的订单,请传入第二个字符串参数APP 或 MINIAPP 290 | const result = await wechat.close(order, 'APP') // APP订单 此方法返回Promise 291 | const result = await wechat.close(order, 'MINIAPP') // 小程序订单 此方法返回Promise 292 | ``` 293 | #### 订单配置参数 294 | 所有订单配置参数和官方无任何差别,兼容所有功能,所有参数请[参考这里](https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_3),查看「请求参数」一栏。 295 | 296 | -------------------- 297 | 298 | ### 异步通知的验签 299 | #### 例子 300 | ```javascript 301 | app.post('/notify', (req, res) => { 302 | if (wechat.verify(req.body)) { // 一句话验签,就这么简单 303 | console.log('微信支付异步验签成功:') 304 | // 业务逻辑 305 | res.send(wechat.success()) // 可以调用success或fail方法 返回结果 306 | } else { 307 | console.log('微信支付异步验签失败:') 308 | res.send(wechat.fail('验签失败')) 309 | } 310 | }) 311 | ``` 312 | 313 | -------------------- 314 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | "@babel/code-frame@7.0.0-beta.36": 6 | version "7.0.0-beta.36" 7 | resolved "http://registry.npm.taobao.org/@babel/code-frame/download/@babel/code-frame-7.0.0-beta.36.tgz#2349d7ec04b3a06945ae173280ef8579b63728e4" 8 | dependencies: 9 | chalk "^2.0.0" 10 | esutils "^2.0.2" 11 | js-tokens "^3.0.0" 12 | 13 | "@babel/helper-function-name@7.0.0-beta.36": 14 | version "7.0.0-beta.36" 15 | resolved "http://registry.npm.taobao.org/@babel/helper-function-name/download/@babel/helper-function-name-7.0.0-beta.36.tgz#366e3bc35147721b69009f803907c4d53212e88d" 16 | dependencies: 17 | "@babel/helper-get-function-arity" "7.0.0-beta.36" 18 | "@babel/template" "7.0.0-beta.36" 19 | "@babel/types" "7.0.0-beta.36" 20 | 21 | "@babel/helper-get-function-arity@7.0.0-beta.36": 22 | version "7.0.0-beta.36" 23 | resolved "http://registry.npm.taobao.org/@babel/helper-get-function-arity/download/@babel/helper-get-function-arity-7.0.0-beta.36.tgz#f5383bac9a96b274828b10d98900e84ee43e32b8" 24 | dependencies: 25 | "@babel/types" "7.0.0-beta.36" 26 | 27 | "@babel/template@7.0.0-beta.36": 28 | version "7.0.0-beta.36" 29 | resolved "http://registry.npm.taobao.org/@babel/template/download/@babel/template-7.0.0-beta.36.tgz#02e903de5d68bd7899bce3c5b5447e59529abb00" 30 | dependencies: 31 | "@babel/code-frame" "7.0.0-beta.36" 32 | "@babel/types" "7.0.0-beta.36" 33 | babylon "7.0.0-beta.36" 34 | lodash "^4.2.0" 35 | 36 | "@babel/traverse@7.0.0-beta.36": 37 | version "7.0.0-beta.36" 38 | resolved "http://registry.npm.taobao.org/@babel/traverse/download/@babel/traverse-7.0.0-beta.36.tgz#1dc6f8750e89b6b979de5fe44aa993b1a2192261" 39 | dependencies: 40 | "@babel/code-frame" "7.0.0-beta.36" 41 | "@babel/helper-function-name" "7.0.0-beta.36" 42 | "@babel/types" "7.0.0-beta.36" 43 | babylon "7.0.0-beta.36" 44 | debug "^3.0.1" 45 | globals "^11.1.0" 46 | invariant "^2.2.0" 47 | lodash "^4.2.0" 48 | 49 | "@babel/types@7.0.0-beta.36": 50 | version "7.0.0-beta.36" 51 | resolved "http://registry.npm.taobao.org/@babel/types/download/@babel/types-7.0.0-beta.36.tgz#64f2004353de42adb72f9ebb4665fc35b5499d23" 52 | dependencies: 53 | esutils "^2.0.2" 54 | lodash "^4.2.0" 55 | to-fast-properties "^2.0.0" 56 | 57 | acorn-jsx@^3.0.0: 58 | version "3.0.1" 59 | resolved "http://registry.npm.taobao.org/acorn-jsx/download/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" 60 | dependencies: 61 | acorn "^3.0.4" 62 | 63 | acorn@^3.0.4: 64 | version "3.3.0" 65 | resolved "http://registry.npm.taobao.org/acorn/download/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" 66 | 67 | acorn@^5.2.1: 68 | version "5.3.0" 69 | resolved "http://registry.npm.taobao.org/acorn/download/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" 70 | 71 | ajv-keywords@^2.1.0: 72 | version "2.1.1" 73 | resolved "http://registry.npm.taobao.org/ajv-keywords/download/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" 74 | 75 | ajv@^5.2.3, ajv@^5.3.0: 76 | version "5.5.2" 77 | resolved "http://registry.npm.taobao.org/ajv/download/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" 78 | dependencies: 79 | co "^4.6.0" 80 | fast-deep-equal "^1.0.0" 81 | fast-json-stable-stringify "^2.0.0" 82 | json-schema-traverse "^0.3.0" 83 | 84 | ansi-escapes@^3.0.0: 85 | version "3.0.0" 86 | resolved "http://registry.npm.taobao.org/ansi-escapes/download/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" 87 | 88 | ansi-regex@^2.0.0: 89 | version "2.1.1" 90 | resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" 91 | 92 | ansi-regex@^3.0.0: 93 | version "3.0.0" 94 | resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" 95 | 96 | ansi-styles@^2.2.1: 97 | version "2.2.1" 98 | resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" 99 | 100 | ansi-styles@^3.1.0: 101 | version "3.2.0" 102 | resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" 103 | dependencies: 104 | color-convert "^1.9.0" 105 | 106 | argparse@^1.0.7: 107 | version "1.0.9" 108 | resolved "http://registry.npm.taobao.org/argparse/download/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" 109 | dependencies: 110 | sprintf-js "~1.0.2" 111 | 112 | aria-query@^0.7.0: 113 | version "0.7.0" 114 | resolved "http://registry.npm.taobao.org/aria-query/download/aria-query-0.7.0.tgz#4af10a1e61573ddea0cf3b99b51c52c05b424d24" 115 | dependencies: 116 | ast-types-flow "0.0.7" 117 | 118 | array-includes@^3.0.3: 119 | version "3.0.3" 120 | resolved "http://registry.npm.taobao.org/array-includes/download/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" 121 | dependencies: 122 | define-properties "^1.1.2" 123 | es-abstract "^1.7.0" 124 | 125 | array-union@^1.0.1: 126 | version "1.0.2" 127 | resolved "http://registry.npm.taobao.org/array-union/download/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" 128 | dependencies: 129 | array-uniq "^1.0.1" 130 | 131 | array-uniq@^1.0.1: 132 | version "1.0.3" 133 | resolved "http://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" 134 | 135 | arrify@^1.0.0: 136 | version "1.0.1" 137 | resolved "http://registry.npm.taobao.org/arrify/download/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" 138 | 139 | asap@~2.0.3: 140 | version "2.0.6" 141 | resolved "http://registry.npm.taobao.org/asap/download/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" 142 | 143 | ast-types-flow@0.0.7: 144 | version "0.0.7" 145 | resolved "http://registry.npm.taobao.org/ast-types-flow/download/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" 146 | 147 | axobject-query@^0.1.0: 148 | version "0.1.0" 149 | resolved "http://registry.npm.taobao.org/axobject-query/download/axobject-query-0.1.0.tgz#62f59dbc59c9f9242759ca349960e7a2fe3c36c0" 150 | dependencies: 151 | ast-types-flow "0.0.7" 152 | 153 | babel-code-frame@^6.22.0: 154 | version "6.26.0" 155 | resolved "http://registry.npm.taobao.org/babel-code-frame/download/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" 156 | dependencies: 157 | chalk "^1.1.3" 158 | esutils "^2.0.2" 159 | js-tokens "^3.0.2" 160 | 161 | babel-eslint@^8.1.2: 162 | version "8.2.1" 163 | resolved "http://registry.npm.taobao.org/babel-eslint/download/babel-eslint-8.2.1.tgz#136888f3c109edc65376c23ebf494f36a3e03951" 164 | dependencies: 165 | "@babel/code-frame" "7.0.0-beta.36" 166 | "@babel/traverse" "7.0.0-beta.36" 167 | "@babel/types" "7.0.0-beta.36" 168 | babylon "7.0.0-beta.36" 169 | eslint-scope "~3.7.1" 170 | eslint-visitor-keys "^1.0.0" 171 | 172 | babylon@7.0.0-beta.36: 173 | version "7.0.0-beta.36" 174 | resolved "http://registry.npm.taobao.org/babylon/download/babylon-7.0.0-beta.36.tgz#3a3683ba6a9a1e02b0aa507c8e63435e39305b9e" 175 | 176 | balanced-match@^1.0.0: 177 | version "1.0.0" 178 | resolved "http://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 179 | 180 | brace-expansion@^1.1.7: 181 | version "1.1.8" 182 | resolved "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" 183 | dependencies: 184 | balanced-match "^1.0.0" 185 | concat-map "0.0.1" 186 | 187 | builtin-modules@^1.0.0, builtin-modules@^1.1.1: 188 | version "1.1.1" 189 | resolved "http://registry.npm.taobao.org/builtin-modules/download/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" 190 | 191 | caller-path@^0.1.0: 192 | version "0.1.0" 193 | resolved "http://registry.npm.taobao.org/caller-path/download/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" 194 | dependencies: 195 | callsites "^0.2.0" 196 | 197 | callsites@^0.2.0: 198 | version "0.2.0" 199 | resolved "http://registry.npm.taobao.org/callsites/download/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" 200 | 201 | chalk@^1.1.3: 202 | version "1.1.3" 203 | resolved "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" 204 | dependencies: 205 | ansi-styles "^2.2.1" 206 | escape-string-regexp "^1.0.2" 207 | has-ansi "^2.0.0" 208 | strip-ansi "^3.0.0" 209 | supports-color "^2.0.0" 210 | 211 | chalk@^2.0.0, chalk@^2.1.0: 212 | version "2.3.0" 213 | resolved "http://registry.npm.taobao.org/chalk/download/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" 214 | dependencies: 215 | ansi-styles "^3.1.0" 216 | escape-string-regexp "^1.0.5" 217 | supports-color "^4.0.0" 218 | 219 | chardet@^0.4.0: 220 | version "0.4.2" 221 | resolved "http://registry.npm.taobao.org/chardet/download/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" 222 | 223 | circular-json@^0.3.1: 224 | version "0.3.3" 225 | resolved "http://registry.npm.taobao.org/circular-json/download/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" 226 | 227 | cli-cursor@^2.1.0: 228 | version "2.1.0" 229 | resolved "http://registry.npm.taobao.org/cli-cursor/download/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" 230 | dependencies: 231 | restore-cursor "^2.0.0" 232 | 233 | cli-width@^2.0.0: 234 | version "2.2.0" 235 | resolved "http://registry.npm.taobao.org/cli-width/download/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" 236 | 237 | co@^4.6.0: 238 | version "4.6.0" 239 | resolved "http://registry.npm.taobao.org/co/download/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" 240 | 241 | color-convert@^1.9.0: 242 | version "1.9.1" 243 | resolved "http://registry.npm.taobao.org/color-convert/download/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" 244 | dependencies: 245 | color-name "^1.1.1" 246 | 247 | color-name@^1.1.1: 248 | version "1.1.3" 249 | resolved "http://registry.npm.taobao.org/color-name/download/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 250 | 251 | concat-map@0.0.1: 252 | version "0.0.1" 253 | resolved "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 254 | 255 | concat-stream@^1.6.0: 256 | version "1.6.0" 257 | resolved "http://registry.npm.taobao.org/concat-stream/download/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" 258 | dependencies: 259 | inherits "^2.0.3" 260 | readable-stream "^2.2.2" 261 | typedarray "^0.0.6" 262 | 263 | contains-path@^0.1.0: 264 | version "0.1.0" 265 | resolved "http://registry.npm.taobao.org/contains-path/download/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" 266 | 267 | core-js@^1.0.0: 268 | version "1.2.7" 269 | resolved "http://registry.npm.taobao.org/core-js/download/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" 270 | 271 | core-util-is@~1.0.0: 272 | version "1.0.2" 273 | resolved "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 274 | 275 | cross-spawn@^5.1.0: 276 | version "5.1.0" 277 | resolved "http://registry.npm.taobao.org/cross-spawn/download/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" 278 | dependencies: 279 | lru-cache "^4.0.1" 280 | shebang-command "^1.2.0" 281 | which "^1.2.9" 282 | 283 | damerau-levenshtein@^1.0.0: 284 | version "1.0.4" 285 | resolved "http://registry.npm.taobao.org/damerau-levenshtein/download/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" 286 | 287 | debug@^2.6.8, debug@^2.6.9: 288 | version "2.6.9" 289 | resolved "http://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 290 | dependencies: 291 | ms "2.0.0" 292 | 293 | debug@^3.0.1, debug@^3.1.0: 294 | version "3.1.0" 295 | resolved "http://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" 296 | dependencies: 297 | ms "2.0.0" 298 | 299 | deep-is@~0.1.3: 300 | version "0.1.3" 301 | resolved "http://registry.npm.taobao.org/deep-is/download/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" 302 | 303 | define-properties@^1.1.2: 304 | version "1.1.2" 305 | resolved "http://registry.npm.taobao.org/define-properties/download/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" 306 | dependencies: 307 | foreach "^2.0.5" 308 | object-keys "^1.0.8" 309 | 310 | del@^2.0.2: 311 | version "2.2.2" 312 | resolved "http://registry.npm.taobao.org/del/download/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" 313 | dependencies: 314 | globby "^5.0.0" 315 | is-path-cwd "^1.0.0" 316 | is-path-in-cwd "^1.0.0" 317 | object-assign "^4.0.1" 318 | pify "^2.0.0" 319 | pinkie-promise "^2.0.0" 320 | rimraf "^2.2.8" 321 | 322 | doctrine@1.5.0: 323 | version "1.5.0" 324 | resolved "http://registry.npm.taobao.org/doctrine/download/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" 325 | dependencies: 326 | esutils "^2.0.2" 327 | isarray "^1.0.0" 328 | 329 | doctrine@^2.0.0, doctrine@^2.0.2: 330 | version "2.1.0" 331 | resolved "http://registry.npm.taobao.org/doctrine/download/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" 332 | dependencies: 333 | esutils "^2.0.2" 334 | 335 | emoji-regex@^6.1.0: 336 | version "6.5.1" 337 | resolved "http://registry.npm.taobao.org/emoji-regex/download/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2" 338 | 339 | encoding@^0.1.11: 340 | version "0.1.12" 341 | resolved "http://registry.npm.taobao.org/encoding/download/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" 342 | dependencies: 343 | iconv-lite "~0.4.13" 344 | 345 | error-ex@^1.2.0: 346 | version "1.3.1" 347 | resolved "http://registry.npm.taobao.org/error-ex/download/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" 348 | dependencies: 349 | is-arrayish "^0.2.1" 350 | 351 | es-abstract@^1.7.0: 352 | version "1.10.0" 353 | resolved "http://registry.npm.taobao.org/es-abstract/download/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" 354 | dependencies: 355 | es-to-primitive "^1.1.1" 356 | function-bind "^1.1.1" 357 | has "^1.0.1" 358 | is-callable "^1.1.3" 359 | is-regex "^1.0.4" 360 | 361 | es-to-primitive@^1.1.1: 362 | version "1.1.1" 363 | resolved "http://registry.npm.taobao.org/es-to-primitive/download/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" 364 | dependencies: 365 | is-callable "^1.1.1" 366 | is-date-object "^1.0.1" 367 | is-symbol "^1.0.1" 368 | 369 | escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: 370 | version "1.0.5" 371 | resolved "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 372 | 373 | eslint-config-egg@^6.0.0: 374 | version "6.0.0" 375 | resolved "http://registry.npm.taobao.org/eslint-config-egg/download/eslint-config-egg-6.0.0.tgz#f71353b0056470e2033f9a9600c7a1b040e4ee8b" 376 | dependencies: 377 | babel-eslint "^8.1.2" 378 | eslint-plugin-import "^2.8.0" 379 | eslint-plugin-jsx-a11y "^6.0.3" 380 | eslint-plugin-react "^7.5.1" 381 | 382 | eslint-import-resolver-node@^0.3.1: 383 | version "0.3.2" 384 | resolved "http://registry.npm.taobao.org/eslint-import-resolver-node/download/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" 385 | dependencies: 386 | debug "^2.6.9" 387 | resolve "^1.5.0" 388 | 389 | eslint-module-utils@^2.1.1: 390 | version "2.1.1" 391 | resolved "http://registry.npm.taobao.org/eslint-module-utils/download/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449" 392 | dependencies: 393 | debug "^2.6.8" 394 | pkg-dir "^1.0.0" 395 | 396 | eslint-plugin-import@^2.8.0: 397 | version "2.8.0" 398 | resolved "http://registry.npm.taobao.org/eslint-plugin-import/download/eslint-plugin-import-2.8.0.tgz#fa1b6ef31fcb3c501c09859c1b86f1fc5b986894" 399 | dependencies: 400 | builtin-modules "^1.1.1" 401 | contains-path "^0.1.0" 402 | debug "^2.6.8" 403 | doctrine "1.5.0" 404 | eslint-import-resolver-node "^0.3.1" 405 | eslint-module-utils "^2.1.1" 406 | has "^1.0.1" 407 | lodash.cond "^4.3.0" 408 | minimatch "^3.0.3" 409 | read-pkg-up "^2.0.0" 410 | 411 | eslint-plugin-jsx-a11y@^6.0.3: 412 | version "6.0.3" 413 | resolved "http://registry.npm.taobao.org/eslint-plugin-jsx-a11y/download/eslint-plugin-jsx-a11y-6.0.3.tgz#54583d1ae442483162e040e13cc31865465100e5" 414 | dependencies: 415 | aria-query "^0.7.0" 416 | array-includes "^3.0.3" 417 | ast-types-flow "0.0.7" 418 | axobject-query "^0.1.0" 419 | damerau-levenshtein "^1.0.0" 420 | emoji-regex "^6.1.0" 421 | jsx-ast-utils "^2.0.0" 422 | 423 | eslint-plugin-react@^7.5.1: 424 | version "7.5.1" 425 | resolved "http://registry.npm.taobao.org/eslint-plugin-react/download/eslint-plugin-react-7.5.1.tgz#52e56e8d80c810de158859ef07b880d2f56ee30b" 426 | dependencies: 427 | doctrine "^2.0.0" 428 | has "^1.0.1" 429 | jsx-ast-utils "^2.0.0" 430 | prop-types "^15.6.0" 431 | 432 | eslint-scope@^3.7.1, eslint-scope@~3.7.1: 433 | version "3.7.1" 434 | resolved "http://registry.npm.taobao.org/eslint-scope/download/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" 435 | dependencies: 436 | esrecurse "^4.1.0" 437 | estraverse "^4.1.1" 438 | 439 | eslint-visitor-keys@^1.0.0: 440 | version "1.0.0" 441 | resolved "http://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" 442 | 443 | eslint@^4.15.0: 444 | version "4.15.0" 445 | resolved "http://registry.npm.taobao.org/eslint/download/eslint-4.15.0.tgz#89ab38c12713eec3d13afac14e4a89e75ef08145" 446 | dependencies: 447 | ajv "^5.3.0" 448 | babel-code-frame "^6.22.0" 449 | chalk "^2.1.0" 450 | concat-stream "^1.6.0" 451 | cross-spawn "^5.1.0" 452 | debug "^3.1.0" 453 | doctrine "^2.0.2" 454 | eslint-scope "^3.7.1" 455 | eslint-visitor-keys "^1.0.0" 456 | espree "^3.5.2" 457 | esquery "^1.0.0" 458 | esutils "^2.0.2" 459 | file-entry-cache "^2.0.0" 460 | functional-red-black-tree "^1.0.1" 461 | glob "^7.1.2" 462 | globals "^11.0.1" 463 | ignore "^3.3.3" 464 | imurmurhash "^0.1.4" 465 | inquirer "^3.0.6" 466 | is-resolvable "^1.0.0" 467 | js-yaml "^3.9.1" 468 | json-stable-stringify-without-jsonify "^1.0.1" 469 | levn "^0.3.0" 470 | lodash "^4.17.4" 471 | minimatch "^3.0.2" 472 | mkdirp "^0.5.1" 473 | natural-compare "^1.4.0" 474 | optionator "^0.8.2" 475 | path-is-inside "^1.0.2" 476 | pluralize "^7.0.0" 477 | progress "^2.0.0" 478 | require-uncached "^1.0.3" 479 | semver "^5.3.0" 480 | strip-ansi "^4.0.0" 481 | strip-json-comments "~2.0.1" 482 | table "^4.0.1" 483 | text-table "~0.2.0" 484 | 485 | espree@^3.5.2: 486 | version "3.5.2" 487 | resolved "http://registry.npm.taobao.org/espree/download/espree-3.5.2.tgz#756ada8b979e9dcfcdb30aad8d1a9304a905e1ca" 488 | dependencies: 489 | acorn "^5.2.1" 490 | acorn-jsx "^3.0.0" 491 | 492 | esprima@^4.0.0: 493 | version "4.0.0" 494 | resolved "http://registry.npm.taobao.org/esprima/download/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" 495 | 496 | esquery@^1.0.0: 497 | version "1.0.0" 498 | resolved "http://registry.npm.taobao.org/esquery/download/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" 499 | dependencies: 500 | estraverse "^4.0.0" 501 | 502 | esrecurse@^4.1.0: 503 | version "4.2.0" 504 | resolved "http://registry.npm.taobao.org/esrecurse/download/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163" 505 | dependencies: 506 | estraverse "^4.1.0" 507 | object-assign "^4.0.1" 508 | 509 | estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1: 510 | version "4.2.0" 511 | resolved "http://registry.npm.taobao.org/estraverse/download/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" 512 | 513 | esutils@^2.0.2: 514 | version "2.0.2" 515 | resolved "http://registry.npm.taobao.org/esutils/download/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" 516 | 517 | external-editor@^2.0.4: 518 | version "2.1.0" 519 | resolved "http://registry.npm.taobao.org/external-editor/download/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" 520 | dependencies: 521 | chardet "^0.4.0" 522 | iconv-lite "^0.4.17" 523 | tmp "^0.0.33" 524 | 525 | fast-deep-equal@^1.0.0: 526 | version "1.0.0" 527 | resolved "http://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" 528 | 529 | fast-json-stable-stringify@^2.0.0: 530 | version "2.0.0" 531 | resolved "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" 532 | 533 | fast-levenshtein@~2.0.4: 534 | version "2.0.6" 535 | resolved "http://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" 536 | 537 | fbjs@^0.8.16: 538 | version "0.8.16" 539 | resolved "http://registry.npm.taobao.org/fbjs/download/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" 540 | dependencies: 541 | core-js "^1.0.0" 542 | isomorphic-fetch "^2.1.1" 543 | loose-envify "^1.0.0" 544 | object-assign "^4.1.0" 545 | promise "^7.1.1" 546 | setimmediate "^1.0.5" 547 | ua-parser-js "^0.7.9" 548 | 549 | figures@^2.0.0: 550 | version "2.0.0" 551 | resolved "http://registry.npm.taobao.org/figures/download/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" 552 | dependencies: 553 | escape-string-regexp "^1.0.5" 554 | 555 | file-entry-cache@^2.0.0: 556 | version "2.0.0" 557 | resolved "http://registry.npm.taobao.org/file-entry-cache/download/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" 558 | dependencies: 559 | flat-cache "^1.2.1" 560 | object-assign "^4.0.1" 561 | 562 | find-up@^1.0.0: 563 | version "1.1.2" 564 | resolved "http://registry.npm.taobao.org/find-up/download/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" 565 | dependencies: 566 | path-exists "^2.0.0" 567 | pinkie-promise "^2.0.0" 568 | 569 | find-up@^2.0.0: 570 | version "2.1.0" 571 | resolved "http://registry.npm.taobao.org/find-up/download/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" 572 | dependencies: 573 | locate-path "^2.0.0" 574 | 575 | flat-cache@^1.2.1: 576 | version "1.3.0" 577 | resolved "http://registry.npm.taobao.org/flat-cache/download/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481" 578 | dependencies: 579 | circular-json "^0.3.1" 580 | del "^2.0.2" 581 | graceful-fs "^4.1.2" 582 | write "^0.2.1" 583 | 584 | foreach@^2.0.5: 585 | version "2.0.5" 586 | resolved "http://registry.npm.taobao.org/foreach/download/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" 587 | 588 | fs.realpath@^1.0.0: 589 | version "1.0.0" 590 | resolved "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 591 | 592 | function-bind@^1.0.2, function-bind@^1.1.1: 593 | version "1.1.1" 594 | resolved "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 595 | 596 | functional-red-black-tree@^1.0.1: 597 | version "1.0.1" 598 | resolved "http://registry.npm.taobao.org/functional-red-black-tree/download/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" 599 | 600 | glob@^7.0.3, glob@^7.0.5, glob@^7.1.2: 601 | version "7.1.2" 602 | resolved "http://registry.npm.taobao.org/glob/download/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" 603 | dependencies: 604 | fs.realpath "^1.0.0" 605 | inflight "^1.0.4" 606 | inherits "2" 607 | minimatch "^3.0.4" 608 | once "^1.3.0" 609 | path-is-absolute "^1.0.0" 610 | 611 | globals@^11.0.1, globals@^11.1.0: 612 | version "11.1.0" 613 | resolved "http://registry.npm.taobao.org/globals/download/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4" 614 | 615 | globby@^5.0.0: 616 | version "5.0.0" 617 | resolved "http://registry.npm.taobao.org/globby/download/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" 618 | dependencies: 619 | array-union "^1.0.1" 620 | arrify "^1.0.0" 621 | glob "^7.0.3" 622 | object-assign "^4.0.1" 623 | pify "^2.0.0" 624 | pinkie-promise "^2.0.0" 625 | 626 | graceful-fs@^4.1.2: 627 | version "4.1.11" 628 | resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" 629 | 630 | has-ansi@^2.0.0: 631 | version "2.0.0" 632 | resolved "http://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" 633 | dependencies: 634 | ansi-regex "^2.0.0" 635 | 636 | has-flag@^2.0.0: 637 | version "2.0.0" 638 | resolved "http://registry.npm.taobao.org/has-flag/download/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" 639 | 640 | has@^1.0.1: 641 | version "1.0.1" 642 | resolved "http://registry.npm.taobao.org/has/download/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" 643 | dependencies: 644 | function-bind "^1.0.2" 645 | 646 | hosted-git-info@^2.1.4: 647 | version "2.5.0" 648 | resolved "http://registry.npm.taobao.org/hosted-git-info/download/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" 649 | 650 | iconv-lite@^0.4.17, iconv-lite@~0.4.13: 651 | version "0.4.19" 652 | resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" 653 | 654 | ignore@^3.3.3: 655 | version "3.3.7" 656 | resolved "http://registry.npm.taobao.org/ignore/download/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021" 657 | 658 | imurmurhash@^0.1.4: 659 | version "0.1.4" 660 | resolved "http://registry.npm.taobao.org/imurmurhash/download/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" 661 | 662 | inflight@^1.0.4: 663 | version "1.0.6" 664 | resolved "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 665 | dependencies: 666 | once "^1.3.0" 667 | wrappy "1" 668 | 669 | inherits@2, inherits@^2.0.3, inherits@~2.0.3: 670 | version "2.0.3" 671 | resolved "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 672 | 673 | inquirer@^3.0.6: 674 | version "3.3.0" 675 | resolved "http://registry.npm.taobao.org/inquirer/download/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" 676 | dependencies: 677 | ansi-escapes "^3.0.0" 678 | chalk "^2.0.0" 679 | cli-cursor "^2.1.0" 680 | cli-width "^2.0.0" 681 | external-editor "^2.0.4" 682 | figures "^2.0.0" 683 | lodash "^4.3.0" 684 | mute-stream "0.0.7" 685 | run-async "^2.2.0" 686 | rx-lite "^4.0.8" 687 | rx-lite-aggregates "^4.0.8" 688 | string-width "^2.1.0" 689 | strip-ansi "^4.0.0" 690 | through "^2.3.6" 691 | 692 | invariant@^2.2.0: 693 | version "2.2.2" 694 | resolved "http://registry.npm.taobao.org/invariant/download/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" 695 | dependencies: 696 | loose-envify "^1.0.0" 697 | 698 | is-arrayish@^0.2.1: 699 | version "0.2.1" 700 | resolved "http://registry.npm.taobao.org/is-arrayish/download/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" 701 | 702 | is-builtin-module@^1.0.0: 703 | version "1.0.0" 704 | resolved "http://registry.npm.taobao.org/is-builtin-module/download/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" 705 | dependencies: 706 | builtin-modules "^1.0.0" 707 | 708 | is-callable@^1.1.1, is-callable@^1.1.3: 709 | version "1.1.3" 710 | resolved "http://registry.npm.taobao.org/is-callable/download/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" 711 | 712 | is-date-object@^1.0.1: 713 | version "1.0.1" 714 | resolved "http://registry.npm.taobao.org/is-date-object/download/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" 715 | 716 | is-fullwidth-code-point@^2.0.0: 717 | version "2.0.0" 718 | resolved "http://registry.npm.taobao.org/is-fullwidth-code-point/download/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" 719 | 720 | is-path-cwd@^1.0.0: 721 | version "1.0.0" 722 | resolved "http://registry.npm.taobao.org/is-path-cwd/download/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" 723 | 724 | is-path-in-cwd@^1.0.0: 725 | version "1.0.0" 726 | resolved "http://registry.npm.taobao.org/is-path-in-cwd/download/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" 727 | dependencies: 728 | is-path-inside "^1.0.0" 729 | 730 | is-path-inside@^1.0.0: 731 | version "1.0.1" 732 | resolved "http://registry.npm.taobao.org/is-path-inside/download/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" 733 | dependencies: 734 | path-is-inside "^1.0.1" 735 | 736 | is-promise@^2.1.0: 737 | version "2.1.0" 738 | resolved "http://registry.npm.taobao.org/is-promise/download/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" 739 | 740 | is-regex@^1.0.4: 741 | version "1.0.4" 742 | resolved "http://registry.npm.taobao.org/is-regex/download/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" 743 | dependencies: 744 | has "^1.0.1" 745 | 746 | is-resolvable@^1.0.0: 747 | version "1.0.1" 748 | resolved "http://registry.npm.taobao.org/is-resolvable/download/is-resolvable-1.0.1.tgz#acca1cd36dbe44b974b924321555a70ba03b1cf4" 749 | 750 | is-stream@^1.0.1: 751 | version "1.1.0" 752 | resolved "http://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" 753 | 754 | is-symbol@^1.0.1: 755 | version "1.0.1" 756 | resolved "http://registry.npm.taobao.org/is-symbol/download/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" 757 | 758 | isarray@^1.0.0, isarray@~1.0.0: 759 | version "1.0.0" 760 | resolved "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 761 | 762 | isexe@^2.0.0: 763 | version "2.0.0" 764 | resolved "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" 765 | 766 | isomorphic-fetch@^2.1.1: 767 | version "2.2.1" 768 | resolved "http://registry.npm.taobao.org/isomorphic-fetch/download/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" 769 | dependencies: 770 | node-fetch "^1.0.1" 771 | whatwg-fetch ">=0.10.0" 772 | 773 | js-tokens@^3.0.0, js-tokens@^3.0.2: 774 | version "3.0.2" 775 | resolved "http://registry.npm.taobao.org/js-tokens/download/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" 776 | 777 | js-yaml@^3.9.1: 778 | version "3.10.0" 779 | resolved "http://registry.npm.taobao.org/js-yaml/download/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" 780 | dependencies: 781 | argparse "^1.0.7" 782 | esprima "^4.0.0" 783 | 784 | json-schema-traverse@^0.3.0: 785 | version "0.3.1" 786 | resolved "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" 787 | 788 | json-stable-stringify-without-jsonify@^1.0.1: 789 | version "1.0.1" 790 | resolved "http://registry.npm.taobao.org/json-stable-stringify-without-jsonify/download/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" 791 | 792 | jsx-ast-utils@^2.0.0: 793 | version "2.0.1" 794 | resolved "http://registry.npm.taobao.org/jsx-ast-utils/download/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" 795 | dependencies: 796 | array-includes "^3.0.3" 797 | 798 | levn@^0.3.0, levn@~0.3.0: 799 | version "0.3.0" 800 | resolved "http://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" 801 | dependencies: 802 | prelude-ls "~1.1.2" 803 | type-check "~0.3.2" 804 | 805 | load-json-file@^2.0.0: 806 | version "2.0.0" 807 | resolved "http://registry.npm.taobao.org/load-json-file/download/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" 808 | dependencies: 809 | graceful-fs "^4.1.2" 810 | parse-json "^2.2.0" 811 | pify "^2.0.0" 812 | strip-bom "^3.0.0" 813 | 814 | locate-path@^2.0.0: 815 | version "2.0.0" 816 | resolved "http://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" 817 | dependencies: 818 | p-locate "^2.0.0" 819 | path-exists "^3.0.0" 820 | 821 | lodash.cond@^4.3.0: 822 | version "4.5.2" 823 | resolved "http://registry.npm.taobao.org/lodash.cond/download/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" 824 | 825 | lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: 826 | version "4.17.4" 827 | resolved "http://registry.npm.taobao.org/lodash/download/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" 828 | 829 | loose-envify@^1.0.0, loose-envify@^1.3.1: 830 | version "1.3.1" 831 | resolved "http://registry.npm.taobao.org/loose-envify/download/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" 832 | dependencies: 833 | js-tokens "^3.0.0" 834 | 835 | lru-cache@^4.0.1: 836 | version "4.1.1" 837 | resolved "http://registry.npm.taobao.org/lru-cache/download/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55" 838 | dependencies: 839 | pseudomap "^1.0.2" 840 | yallist "^2.1.2" 841 | 842 | mimic-fn@^1.0.0: 843 | version "1.1.0" 844 | resolved "http://registry.npm.taobao.org/mimic-fn/download/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" 845 | 846 | minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: 847 | version "3.0.4" 848 | resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 849 | dependencies: 850 | brace-expansion "^1.1.7" 851 | 852 | minimist@0.0.8: 853 | version "0.0.8" 854 | resolved "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 855 | 856 | mkdirp@^0.5.1: 857 | version "0.5.1" 858 | resolved "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 859 | dependencies: 860 | minimist "0.0.8" 861 | 862 | ms@2.0.0: 863 | version "2.0.0" 864 | resolved "http://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 865 | 866 | mute-stream@0.0.7: 867 | version "0.0.7" 868 | resolved "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" 869 | 870 | natural-compare@^1.4.0: 871 | version "1.4.0" 872 | resolved "http://registry.npm.taobao.org/natural-compare/download/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" 873 | 874 | node-fetch@^1.0.1: 875 | version "1.7.3" 876 | resolved "http://registry.npm.taobao.org/node-fetch/download/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" 877 | dependencies: 878 | encoding "^0.1.11" 879 | is-stream "^1.0.1" 880 | 881 | normalize-package-data@^2.3.2: 882 | version "2.4.0" 883 | resolved "http://registry.npm.taobao.org/normalize-package-data/download/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" 884 | dependencies: 885 | hosted-git-info "^2.1.4" 886 | is-builtin-module "^1.0.0" 887 | semver "2 || 3 || 4 || 5" 888 | validate-npm-package-license "^3.0.1" 889 | 890 | object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: 891 | version "4.1.1" 892 | resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 893 | 894 | object-keys@^1.0.8: 895 | version "1.0.11" 896 | resolved "http://registry.npm.taobao.org/object-keys/download/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" 897 | 898 | once@^1.3.0: 899 | version "1.4.0" 900 | resolved "http://registry.npm.taobao.org/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 901 | dependencies: 902 | wrappy "1" 903 | 904 | onetime@^2.0.0: 905 | version "2.0.1" 906 | resolved "http://registry.npm.taobao.org/onetime/download/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" 907 | dependencies: 908 | mimic-fn "^1.0.0" 909 | 910 | optionator@^0.8.2: 911 | version "0.8.2" 912 | resolved "http://registry.npm.taobao.org/optionator/download/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" 913 | dependencies: 914 | deep-is "~0.1.3" 915 | fast-levenshtein "~2.0.4" 916 | levn "~0.3.0" 917 | prelude-ls "~1.1.2" 918 | type-check "~0.3.2" 919 | wordwrap "~1.0.0" 920 | 921 | os-tmpdir@~1.0.2: 922 | version "1.0.2" 923 | resolved "http://registry.npm.taobao.org/os-tmpdir/download/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" 924 | 925 | p-limit@^1.1.0: 926 | version "1.2.0" 927 | resolved "http://registry.npm.taobao.org/p-limit/download/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" 928 | dependencies: 929 | p-try "^1.0.0" 930 | 931 | p-locate@^2.0.0: 932 | version "2.0.0" 933 | resolved "http://registry.npm.taobao.org/p-locate/download/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" 934 | dependencies: 935 | p-limit "^1.1.0" 936 | 937 | p-try@^1.0.0: 938 | version "1.0.0" 939 | resolved "http://registry.npm.taobao.org/p-try/download/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" 940 | 941 | parse-json@^2.2.0: 942 | version "2.2.0" 943 | resolved "http://registry.npm.taobao.org/parse-json/download/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" 944 | dependencies: 945 | error-ex "^1.2.0" 946 | 947 | path-exists@^2.0.0: 948 | version "2.1.0" 949 | resolved "http://registry.npm.taobao.org/path-exists/download/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" 950 | dependencies: 951 | pinkie-promise "^2.0.0" 952 | 953 | path-exists@^3.0.0: 954 | version "3.0.0" 955 | resolved "http://registry.npm.taobao.org/path-exists/download/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" 956 | 957 | path-is-absolute@^1.0.0: 958 | version "1.0.1" 959 | resolved "http://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 960 | 961 | path-is-inside@^1.0.1, path-is-inside@^1.0.2: 962 | version "1.0.2" 963 | resolved "http://registry.npm.taobao.org/path-is-inside/download/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" 964 | 965 | path-parse@^1.0.5: 966 | version "1.0.5" 967 | resolved "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" 968 | 969 | path-type@^2.0.0: 970 | version "2.0.0" 971 | resolved "http://registry.npm.taobao.org/path-type/download/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" 972 | dependencies: 973 | pify "^2.0.0" 974 | 975 | pify@^2.0.0: 976 | version "2.3.0" 977 | resolved "http://registry.npm.taobao.org/pify/download/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" 978 | 979 | pinkie-promise@^2.0.0: 980 | version "2.0.1" 981 | resolved "http://registry.npm.taobao.org/pinkie-promise/download/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" 982 | dependencies: 983 | pinkie "^2.0.0" 984 | 985 | pinkie@^2.0.0: 986 | version "2.0.4" 987 | resolved "http://registry.npm.taobao.org/pinkie/download/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" 988 | 989 | pkg-dir@^1.0.0: 990 | version "1.0.0" 991 | resolved "http://registry.npm.taobao.org/pkg-dir/download/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" 992 | dependencies: 993 | find-up "^1.0.0" 994 | 995 | pluralize@^7.0.0: 996 | version "7.0.0" 997 | resolved "http://registry.npm.taobao.org/pluralize/download/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" 998 | 999 | prelude-ls@~1.1.2: 1000 | version "1.1.2" 1001 | resolved "http://registry.npm.taobao.org/prelude-ls/download/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" 1002 | 1003 | process-nextick-args@~1.0.6: 1004 | version "1.0.7" 1005 | resolved "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" 1006 | 1007 | progress@^2.0.0: 1008 | version "2.0.0" 1009 | resolved "http://registry.npm.taobao.org/progress/download/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" 1010 | 1011 | promise@^7.1.1: 1012 | version "7.3.1" 1013 | resolved "http://registry.npm.taobao.org/promise/download/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" 1014 | dependencies: 1015 | asap "~2.0.3" 1016 | 1017 | prop-types@^15.6.0: 1018 | version "15.6.0" 1019 | resolved "http://registry.npm.taobao.org/prop-types/download/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" 1020 | dependencies: 1021 | fbjs "^0.8.16" 1022 | loose-envify "^1.3.1" 1023 | object-assign "^4.1.1" 1024 | 1025 | pseudomap@^1.0.2: 1026 | version "1.0.2" 1027 | resolved "http://registry.npm.taobao.org/pseudomap/download/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" 1028 | 1029 | read-pkg-up@^2.0.0: 1030 | version "2.0.0" 1031 | resolved "http://registry.npm.taobao.org/read-pkg-up/download/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" 1032 | dependencies: 1033 | find-up "^2.0.0" 1034 | read-pkg "^2.0.0" 1035 | 1036 | read-pkg@^2.0.0: 1037 | version "2.0.0" 1038 | resolved "http://registry.npm.taobao.org/read-pkg/download/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" 1039 | dependencies: 1040 | load-json-file "^2.0.0" 1041 | normalize-package-data "^2.3.2" 1042 | path-type "^2.0.0" 1043 | 1044 | readable-stream@^2.2.2: 1045 | version "2.3.3" 1046 | resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" 1047 | dependencies: 1048 | core-util-is "~1.0.0" 1049 | inherits "~2.0.3" 1050 | isarray "~1.0.0" 1051 | process-nextick-args "~1.0.6" 1052 | safe-buffer "~5.1.1" 1053 | string_decoder "~1.0.3" 1054 | util-deprecate "~1.0.1" 1055 | 1056 | require-uncached@^1.0.3: 1057 | version "1.0.3" 1058 | resolved "http://registry.npm.taobao.org/require-uncached/download/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" 1059 | dependencies: 1060 | caller-path "^0.1.0" 1061 | resolve-from "^1.0.0" 1062 | 1063 | resolve-from@^1.0.0: 1064 | version "1.0.1" 1065 | resolved "http://registry.npm.taobao.org/resolve-from/download/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" 1066 | 1067 | resolve@^1.5.0: 1068 | version "1.5.0" 1069 | resolved "http://registry.npm.taobao.org/resolve/download/resolve-1.5.0.tgz#1f09acce796c9a762579f31b2c1cc4c3cddf9f36" 1070 | dependencies: 1071 | path-parse "^1.0.5" 1072 | 1073 | restore-cursor@^2.0.0: 1074 | version "2.0.0" 1075 | resolved "http://registry.npm.taobao.org/restore-cursor/download/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" 1076 | dependencies: 1077 | onetime "^2.0.0" 1078 | signal-exit "^3.0.2" 1079 | 1080 | rimraf@^2.2.8: 1081 | version "2.6.2" 1082 | resolved "http://registry.npm.taobao.org/rimraf/download/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" 1083 | dependencies: 1084 | glob "^7.0.5" 1085 | 1086 | run-async@^2.2.0: 1087 | version "2.3.0" 1088 | resolved "http://registry.npm.taobao.org/run-async/download/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" 1089 | dependencies: 1090 | is-promise "^2.1.0" 1091 | 1092 | rx-lite-aggregates@^4.0.8: 1093 | version "4.0.8" 1094 | resolved "http://registry.npm.taobao.org/rx-lite-aggregates/download/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" 1095 | dependencies: 1096 | rx-lite "*" 1097 | 1098 | rx-lite@*, rx-lite@^4.0.8: 1099 | version "4.0.8" 1100 | resolved "http://registry.npm.taobao.org/rx-lite/download/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" 1101 | 1102 | safe-buffer@~5.1.0, safe-buffer@~5.1.1: 1103 | version "5.1.1" 1104 | resolved "http://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" 1105 | 1106 | sax@>=0.6.0: 1107 | version "1.2.4" 1108 | resolved "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" 1109 | 1110 | "semver@2 || 3 || 4 || 5", semver@^5.3.0: 1111 | version "5.4.1" 1112 | resolved "http://registry.npm.taobao.org/semver/download/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" 1113 | 1114 | setimmediate@^1.0.5: 1115 | version "1.0.5" 1116 | resolved "http://registry.npm.taobao.org/setimmediate/download/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" 1117 | 1118 | shebang-command@^1.2.0: 1119 | version "1.2.0" 1120 | resolved "http://registry.npm.taobao.org/shebang-command/download/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" 1121 | dependencies: 1122 | shebang-regex "^1.0.0" 1123 | 1124 | shebang-regex@^1.0.0: 1125 | version "1.0.0" 1126 | resolved "http://registry.npm.taobao.org/shebang-regex/download/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" 1127 | 1128 | signal-exit@^3.0.2: 1129 | version "3.0.2" 1130 | resolved "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 1131 | 1132 | slice-ansi@1.0.0: 1133 | version "1.0.0" 1134 | resolved "http://registry.npm.taobao.org/slice-ansi/download/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" 1135 | dependencies: 1136 | is-fullwidth-code-point "^2.0.0" 1137 | 1138 | spdx-correct@~1.0.0: 1139 | version "1.0.2" 1140 | resolved "http://registry.npm.taobao.org/spdx-correct/download/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" 1141 | dependencies: 1142 | spdx-license-ids "^1.0.2" 1143 | 1144 | spdx-expression-parse@~1.0.0: 1145 | version "1.0.4" 1146 | resolved "http://registry.npm.taobao.org/spdx-expression-parse/download/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" 1147 | 1148 | spdx-license-ids@^1.0.2: 1149 | version "1.2.2" 1150 | resolved "http://registry.npm.taobao.org/spdx-license-ids/download/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" 1151 | 1152 | sprintf-js@~1.0.2: 1153 | version "1.0.3" 1154 | resolved "http://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" 1155 | 1156 | string-width@^2.1.0, string-width@^2.1.1: 1157 | version "2.1.1" 1158 | resolved "http://registry.npm.taobao.org/string-width/download/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" 1159 | dependencies: 1160 | is-fullwidth-code-point "^2.0.0" 1161 | strip-ansi "^4.0.0" 1162 | 1163 | string_decoder@~1.0.3: 1164 | version "1.0.3" 1165 | resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" 1166 | dependencies: 1167 | safe-buffer "~5.1.0" 1168 | 1169 | strip-ansi@^3.0.0: 1170 | version "3.0.1" 1171 | resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" 1172 | dependencies: 1173 | ansi-regex "^2.0.0" 1174 | 1175 | strip-ansi@^4.0.0: 1176 | version "4.0.0" 1177 | resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" 1178 | dependencies: 1179 | ansi-regex "^3.0.0" 1180 | 1181 | strip-bom@^3.0.0: 1182 | version "3.0.0" 1183 | resolved "http://registry.npm.taobao.org/strip-bom/download/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" 1184 | 1185 | strip-json-comments@~2.0.1: 1186 | version "2.0.1" 1187 | resolved "http://registry.npm.taobao.org/strip-json-comments/download/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" 1188 | 1189 | supports-color@^2.0.0: 1190 | version "2.0.0" 1191 | resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" 1192 | 1193 | supports-color@^4.0.0: 1194 | version "4.5.0" 1195 | resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" 1196 | dependencies: 1197 | has-flag "^2.0.0" 1198 | 1199 | table@^4.0.1: 1200 | version "4.0.2" 1201 | resolved "http://registry.npm.taobao.org/table/download/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" 1202 | dependencies: 1203 | ajv "^5.2.3" 1204 | ajv-keywords "^2.1.0" 1205 | chalk "^2.1.0" 1206 | lodash "^4.17.4" 1207 | slice-ansi "1.0.0" 1208 | string-width "^2.1.1" 1209 | 1210 | text-table@~0.2.0: 1211 | version "0.2.0" 1212 | resolved "http://registry.npm.taobao.org/text-table/download/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" 1213 | 1214 | through@^2.3.6: 1215 | version "2.3.8" 1216 | resolved "http://registry.npm.taobao.org/through/download/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 1217 | 1218 | tmp@^0.0.33: 1219 | version "0.0.33" 1220 | resolved "http://registry.npm.taobao.org/tmp/download/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" 1221 | dependencies: 1222 | os-tmpdir "~1.0.2" 1223 | 1224 | to-fast-properties@^2.0.0: 1225 | version "2.0.0" 1226 | resolved "http://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" 1227 | 1228 | type-check@~0.3.2: 1229 | version "0.3.2" 1230 | resolved "http://registry.npm.taobao.org/type-check/download/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" 1231 | dependencies: 1232 | prelude-ls "~1.1.2" 1233 | 1234 | typedarray@^0.0.6: 1235 | version "0.0.6" 1236 | resolved "http://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" 1237 | 1238 | ua-parser-js@^0.7.9: 1239 | version "0.7.17" 1240 | resolved "http://registry.npm.taobao.org/ua-parser-js/download/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" 1241 | 1242 | util-deprecate@~1.0.1: 1243 | version "1.0.2" 1244 | resolved "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 1245 | 1246 | validate-npm-package-license@^3.0.1: 1247 | version "3.0.1" 1248 | resolved "http://registry.npm.taobao.org/validate-npm-package-license/download/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" 1249 | dependencies: 1250 | spdx-correct "~1.0.0" 1251 | spdx-expression-parse "~1.0.0" 1252 | 1253 | whatwg-fetch@>=0.10.0: 1254 | version "2.0.3" 1255 | resolved "http://registry.npm.taobao.org/whatwg-fetch/download/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" 1256 | 1257 | which@^1.2.9: 1258 | version "1.3.0" 1259 | resolved "http://registry.npm.taobao.org/which/download/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" 1260 | dependencies: 1261 | isexe "^2.0.0" 1262 | 1263 | wordwrap@~1.0.0: 1264 | version "1.0.0" 1265 | resolved "http://registry.npm.taobao.org/wordwrap/download/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" 1266 | 1267 | wrappy@1: 1268 | version "1.0.2" 1269 | resolved "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 1270 | 1271 | write@^0.2.1: 1272 | version "0.2.1" 1273 | resolved "http://registry.npm.taobao.org/write/download/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" 1274 | dependencies: 1275 | mkdirp "^0.5.1" 1276 | 1277 | xml2js@^0.4.19: 1278 | version "0.4.19" 1279 | resolved "http://registry.npm.taobao.org/xml2js/download/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" 1280 | dependencies: 1281 | sax ">=0.6.0" 1282 | xmlbuilder "~9.0.1" 1283 | 1284 | xmlbuilder@~9.0.1: 1285 | version "9.0.4" 1286 | resolved "http://registry.npm.taobao.org/xmlbuilder/download/xmlbuilder-9.0.4.tgz#519cb4ca686d005a8420d3496f3f0caeecca580f" 1287 | 1288 | yallist@^2.1.2: 1289 | version "2.1.2" 1290 | resolved "http://registry.npm.taobao.org/yallist/download/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" 1291 | --------------------------------------------------------------------------------