File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " yapi-cli" ,
3- "version" : " 1.1.4 " ,
3+ "version" : " 1.1.5 " ,
44 "description" : " " ,
55 "main" : " index.js" ,
66 "bin" : {
7- "yapi-cli" : " ./bin/yapi-cli"
7+ "yapi-cli" : " ./bin/yapi-cli" ,
8+ "yapi" : " ./bin/yapi-cli"
89 },
910 "scripts" : {
1011 "test" : " echo \" Error: no test specified\" && exit 1"
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ module.exports = {
3737 let pluginName = name . substr ( 'yapi-plugin-' . length )
3838 if ( _ . find ( config . plugins , { name : pluginName } ) ) {
3939 throw new Error ( '此插件已安装' ) ;
40- } else if ( _ . find ( config . plugins , pluginName ) ) {
40+ } else if ( _ . find ( config . plugins , p => p == pluginName ) ) {
4141 throw new Error ( '此插件已安装' ) ;
4242 }
4343 shell . cd ( 'vendors' ) ;
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ async function run(argv) {
3737 } else if ( ! _ . find ( versions . data , item => ( 'v' + item . version ) === v ) ) {
3838 throw new Error ( '不存在的版本号,请执行 yapi-cli ls 查看版本号列表' ) ;
3939 }
40+ console . log ( '更新版本为' + v ) ;
4041 let config = require ( configFilepath ) ;
4142 let npmInstall = 'npm install --production --registry https://registry.npm.taobao.org' ;
4243 if ( config . plugins && Array . isArray ( config . plugins ) && config . plugins . length > 0 ) {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const semver = require('semver')
44var utils ;
55function github ( version ) {
66 version = 'v' + utils . handleVersion ( version ) ;
7+ console . log ( 'https://github.com/YMFE/yapi/archive/' + version + '.zip' ) ;
78 return 'https://github.com/YMFE/yapi/archive/' + version + '.zip' ;
89}
910module . exports = utils = {
You can’t perform that action at this time.
0 commit comments