From 1a655f4dd34307af8098023571fb366737585927 Mon Sep 17 00:00:00 2001 From: sunnylost Date: Wed, 8 Jul 2015 17:45:21 +0800 Subject: [PATCH] update to 1.2.4 --- CHANGELOG.md | 12 ++++++++++ dist/cli/config.js | 8 ++++--- dist/cli/setup.js | 13 ++++++----- dist/core/config.js | 6 +++-- dist/core/setup.js | 53 +++++++++++++++++++++++++++++++-------------- package.json | 2 +- 6 files changed, 67 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5e972..8223571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Cage ChangeLog +## 2015-07-08, Version 1.2.4 + +### Fix + +- `cage config` 执行完毕后,会打开错误的 url +- npm 安装的包位置错误 +- svn 用户名或密码输入错误给出提示 + +### Improvement + +- 改进 `setup` 命令覆盖已存在文件夹的选择方式 + ## 2015-07-08, Version 1.2.0 ### Notable changes diff --git a/dist/cli/config.js b/dist/cli/config.js index d79166d..26fd689 100644 --- a/dist/cli/config.js +++ b/dist/cli/config.js @@ -164,7 +164,7 @@ var ConfigCLI = (function () { key: 'finish', value: _bluebird.coroutine(function* () { var workspace = new WorkSpace(this.config.getPath()), - domain = this.config.getSavedDomains()[0]; + domain = this.config.getSavedDomains()[0].key; workspace.active(); yield workspace.start(); @@ -173,7 +173,9 @@ var ConfigCLI = (function () { log('===================='); log('whornbill 环境配置完毕'); log('Cage 的详细使用请查看文档:\nhttps://github.com/mls-fe/cage'); - Open('http://' + domain + '.fedevot.meilishuo.com'); + setTimeout(function () { + Open('http://' + domain + '.fedevot.meilishuo.com'); + }, 1000); }) }]); @@ -181,4 +183,4 @@ var ConfigCLI = (function () { })(); module.exports = ConfigCLI; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaS9jb25maWcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxJQUFJLFFBQVEsR0F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TUFBTSw0QkFBMEIsQ0FBQTtTQUNuRDs7O1dBdklDLFNBQVM7OztBQTBJZixNQUFNLENBQUMsT0FBTyxHQUFHLFNBQVMsQ0FBQSIsImZpbGUiOiJjbGkvY29uZmlnLmpzIiwic291cmNlc0NvbnRlbnQiOlsibGV0IElucXVpcmVyICAgICAgPSByZXF1aXJlKCAnaW5xdWlyZXInICksXG4gICAgUGF0aCAgICAgICAgICA9IHJlcXVpcmUoICdwYXRoJyApLFxuICAgIE9wZW4gICAgICAgICAgPSByZXF1aXJlKCAnb3BlbicgKSxcbiAgICBDb25maWcgICAgICAgID0gcmVxdWlyZSggJy4uL2NvcmUvY29uZmlnJyApLFxuICAgIFdvcmtTcGFjZSAgICAgPSByZXF1aXJlKCAnLi4vY29yZS93b3Jrc3BhY2UnICksXG4gICAgU2xvZ2FuICAgICAgICA9IHJlcXVpcmUoICcuLi9zbG9nYW4nICksXG4gICAgVXRpbCAgICAgICAgICA9IHJlcXVpcmUoICcuLi91dGlsJyApLFxuICAgIEtleSAgICAgICAgICAgPSByZXF1aXJlKCAnLi4va2V5JyApLFxuICAgIENvbnN0ICAgICAgICAgPSByZXF1aXJlKCAnLi4vY29uc3QnICksXG4gICAgSW5kaWNhdG9yICAgICA9IFV0aWwuaW5kaWNhdG9yLFxuXG4gICAgZGVmYXVsdFBoYXNlcyA9IFsgJ2NvbmZpZ1BvcnQnLCAnY29uZmlnRG9tYWluJywgJ2NvbmZpZ0FkZHJlc3MnLCAnY29uZmlnUHJveHknLCAnZmluaXNoJyBdXG5cbmNvbnN0IFJBTkRPTSA9IEtleS5yYW5kb20sXG4gICAgICBOT1JNQUwgPSBLZXkubm9ybWFsLFxuICAgICAgWUVTICAgID0gJ+aYrycsXG4gICAgICBOTyAgICAgPSAn5ZCmJyxcbiAgICAgIE4gICAgICA9ICduJ1xuXG5jbGFzcyBDb25maWdDTEkge1xuICAgIGNvbnN0cnVjdG9yKCBwYXRoICkge1xuICAgICAgICB0aGlzLmluaXQoIFBhdGgucmVzb2x2ZSggcGF0aCApIClcbiAgICB9XG5cbiAgICBhc3luYyBpbml0KCBwYXRoICkge1xuICAgICAgICBsZXQgcGhhc2VzID0gZGVmYXVsdFBoYXNlcy5jb25jYXQoKSxcbiAgICAgICAgICAgIG5leHQgICA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgcGhhc2UgPSBwaGFzZXMuc2hpZnQoKVxuICAgICAgICAgICAgICAgIGlmICggcGhhc2UgKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXNbIHBoYXNlIF0oIG5leHQgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICBsZXQgaXNWYWxpZCA9IGF3YWl0IFdvcmtTcGFjZS5pc1ZhbGlkV29ya1NwYWNlKCBwYXRoIClcbiAgICAgICAgaWYgKCAhaXNWYWxpZCApIHtcbiAgICAgICAgICAgIGxvZyggYCR7cGF0aH0g5LiN5piv5ZCI5rOV55qE5bel5L2c56m66Ze077yB6K+36YeN5paw5oyH5a6aYCwgJ3dhcm4nIClcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG4gICAgICAgIHRoaXMuY29uZmlnID0gbmV3IENvbmZpZyggcGF0aCApXG5cbiAgICAgICAgbmV4dCgpXG4gICAgfVxuXG4gICAgY29uZmlnUG9ydCggbmV4dCApIHtcbiAgICAgICAgSW5xdWlyZXJcbiAgICAgICAgICAgIC5wcm9tcHQoIFsge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdsaXN0JyxcbiAgICAgICAgICAgICAgICBuYW1lOiAncG9ydE9wdGlvbicsXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogJ+mAieaLqeerr+WPo+WPtycsXG4gICAgICAgICAgICAgICAgY2hvaWNlczogWyBOT1JNQUwsIFJBTkRPTSBdLFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IFJBTkRPTVxuICAgICAgICAgICAgfSBdLCBhbnN3ZXIgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLnNldFBvcnRPcHRpb24oIGFuc3dlci5wb3J0T3B0aW9uIClcbiAgICAgICAgICAgICAgICBuZXh0KClcbiAgICAgICAgICAgIH0gKVxuICAgIH1cblxuICAgIGNvbmZpZ0RvbWFpbiggbmV4dCApIHtcbiAgICAgICAgbGV0IGMgICAgICAgICAgICA9IHRoaXMuY29uZmlnLFxuICAgICAgICAgICAgc2F2ZWREb21haW5zID0gYy5nZXRTYXZlZERvbWFpbnMoKSxcbiAgICAgICAgICAgIGRvbWFpbnNTaXplICA9IHNhdmVkRG9tYWlucy5sZW5ndGhcblxuICAgICAgICBpZiAoIGRvbWFpbnNTaXplICkge1xuICAgICAgICAgICAgSW5xdWlyZXJcbiAgICAgICAgICAgICAgICAucHJvbXB0KCBbIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2xpc3QnLFxuICAgICAgICAgICAgICAgICAgICBuYW1lOiAnb3ZlcnJpZGUnLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiAn5piv5ZCm6YeN5paw6K6+572u5Z+f5ZCNPycsXG4gICAgICAgICAgICAgICAgICAgIGNob2ljZXM6IFsgWUVTLCBOTyBdLFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiBOT1xuICAgICAgICAgICAgICAgIH0gXSwgYW5zd2VyID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBhbnN3ZXIub3ZlcnJpZGUgPT0gWUVTICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYy5jbGVhckRvbWFpbnMoKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29uZmlnRG9tYWluKCBuZXh0IClcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIG5leHQoKVxuICAgICAgICAgICAgICAgIH0gKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jb2xsZWN0RG9tYWluKCBuZXh0IClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNvbGxlY3REb21haW4oIG5leHQgKSB7XG4gICAgICAgIElucXVpcmVyXG4gICAgICAgICAgICAucHJvbXB0KCBbIHtcbiAgICAgICAgICAgICAgICBuYW1lOiAnZG9tYWluJyxcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiAn6K6+572u5Z+f5ZCNKOi+k+WFpSBuIOWPr+i3s+i/h+atpOatpemqpCknLFxuICAgICAgICAgICAgICAgIHZhbGlkYXRlKCBkb21haW4gKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbiA9IGRvbWFpbi50cmltKClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRvbWFpbi5zcGxpdCggJyAnICkubGVuZ3RoID09IDIgfHwgZG9tYWluID09IE5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IF0sIGFuc3dlciA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IGMgICAgICAgICAgID0gdGhpcy5jb25maWcsXG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbiAgICAgID0gYW5zd2VyLmRvbWFpbi50cmltKCksXG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbkFyciAgID0gZG9tYWluLnNwbGl0KCAnICcgKSxcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluc1NpemUgPSBjLmdldERvbWFpbnNTaXplKClcblxuICAgICAgICAgICAgICAgIGlmICggZG9tYWluID09IE4gKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICggZG9tYWluc1NpemUgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0KClcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyggJ+iHs+WwkemcgOimgemFjee9ruS4gOS4quWfn+WQjScsICd3YXJuJyApXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbGxlY3REb21haW4oIG5leHQgKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYy5hZGREb21haW4oIGRvbWFpbkFyciApXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbGxlY3REb21haW4oIG5leHQgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gKVxuICAgIH1cblxuICAgIGFzeW5jIGNvbmZpZ0FkZHJlc3MoIG5leHQgKSB7XG4gICAgICAgIGxvZyggJ+iuvue9riBJUCcgKVxuICAgICAgICBsZXQgYyAgICAgICAgPSB0aGlzLmNvbmZpZyxcbiAgICAgICAgICAgIGlzQ2hhbmdlID0gYXdhaXQgYy5pc0lQQ2hhbmdlKClcblxuICAgICAgICBpZiAoIGlzQ2hhbmdlICkge1xuICAgICAgICAgICAgbG9nKCAnSVAg6ZyA6KaB5pu05pawLi4uJyApXG4gICAgICAgICAgICBJbmRpY2F0b3Iuc3RhcnQoICfmm7TmlrAgSVAg5Zyw5Z2AJyApXG5cbiAgICAgICAgICAgIGxldCBpc09LICA9IGF3YWl0IGMudXBkYXRlSVAoKSxcbiAgICAgICAgICAgICAgICBzdGF0ZSA9IGlzT0sgPyAnc3VjY2VzcycgOiAnZXJyb3InLFxuICAgICAgICAgICAgICAgIHRleHQgID0gaXNPSyA/ICfmiJDlip8nIDogJ+Wksei0pSdcblxuICAgICAgICAgICAgbG9nKCBgXFxu5pu05pawIElQIOWcsOWdgCR7dGV4dH1gLCBzdGF0ZSApXG4gICAgICAgICAgICBJbmRpY2F0b3Iuc3RvcCgpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsb2coICdJUCDlnLDlnYDml6Dlj5jljJbvvIzkuI3pnIDopoHmm7TmlrAnIClcbiAgICAgICAgfVxuXG4gICAgICAgIG5leHQoKVxuICAgIH1cblxuICAgIGFzeW5jIGNvbmZpZ1Byb3h5KCBuZXh0ICkge1xuICAgICAgICBJbmRpY2F0b3Iuc3RhcnQoICfmm7TmlrDku6PnkIbmnI3liqHlmagnIClcbiAgICAgICAgYXdhaXQgdGhpcy5jb25maWcudXBkYXRlUHJveHkoKVxuICAgICAgICBJbmRpY2F0b3Iuc3RvcCgpXG4gICAgICAgIGxvZyggJ+abtOaWsOS7o+eQhuacjeWKoeWZqOaIkOWKnycsICdzdWNjZXNzJyApXG4gICAgICAgIG5leHQoKVxuICAgIH1cblxuICAgIGFzeW5jIGZpbmlzaCgpIHtcbiAgICAgICAgbGV0IHdvcmtzcGFjZSA9IG5ldyBXb3JrU3BhY2UoIHRoaXMuY29uZmlnLmdldFBhdGgoKSApLFxuICAgICAgICAgICAgZG9tYWluICAgID0gdGhpcy5jb25maWcuZ2V0U2F2ZWREb21haW5zKClbIDAgXVxuXG4gICAgICAgIHdvcmtzcGFjZS5hY3RpdmUoKVxuICAgICAgICBhd2FpdCB3b3Jrc3BhY2Uuc3RhcnQoKVxuXG4gICAgICAgIFNsb2dhbi55ZWxsKClcbiAgICAgICAgbG9nKCAnPT09PT09PT09PT09PT09PT09PT0nIClcbiAgICAgICAgbG9nKCAnd2hvcm5iaWxsIOeOr+Wig+mFjee9ruWujOavlScgKVxuICAgICAgICBsb2coICdDYWdlIOeahOivpue7huS9v+eUqOivt+afpeeci+aWh+aho++8mlxcbmh0dHBzOi8vZ2l0aHViLmNvbS9tbHMtZmUvY2FnZScgKVxuICAgICAgICBPcGVuKCBgaHR0cDovLyR7ZG9tYWlufS5mZWRldm90Lm1laWxpc2h1by5jb21gIClcbiAgICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0gQ29uZmlnQ0xJXG4iXX0= \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaS9jb25maWcuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxJQUFJLFFBQVEsR0FBUSxPQUFPLENBQUUsVUFBVSxDQUFFO0lBQ3JDLElBQUksR0FBWSxPQUFP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E4gICAgICA9ICduJ1xuXG5jbGFzcyBDb25maWdDTEkge1xuICAgIGNvbnN0cnVjdG9yKCBwYXRoICkge1xuICAgICAgICB0aGlzLmluaXQoIFBhdGgucmVzb2x2ZSggcGF0aCApIClcbiAgICB9XG5cbiAgICBhc3luYyBpbml0KCBwYXRoICkge1xuICAgICAgICBsZXQgcGhhc2VzID0gZGVmYXVsdFBoYXNlcy5jb25jYXQoKSxcbiAgICAgICAgICAgIG5leHQgICA9ICgpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgcGhhc2UgPSBwaGFzZXMuc2hpZnQoKVxuICAgICAgICAgICAgICAgIGlmICggcGhhc2UgKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXNbIHBoYXNlIF0oIG5leHQgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICBsZXQgaXNWYWxpZCA9IGF3YWl0IFdvcmtTcGFjZS5pc1ZhbGlkV29ya1NwYWNlKCBwYXRoIClcbiAgICAgICAgaWYgKCAhaXNWYWxpZCApIHtcbiAgICAgICAgICAgIGxvZyggYCR7cGF0aH0g5LiN5piv5ZCI5rOV55qE5bel5L2c56m66Ze077yB6K+36YeN5paw5oyH5a6aYCwgJ3dhcm4nIClcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICB9XG4gICAgICAgIHRoaXMuY29uZmlnID0gbmV3IENvbmZpZyggcGF0aCApXG5cbiAgICAgICAgbmV4dCgpXG4gICAgfVxuXG4gICAgY29uZmlnUG9ydCggbmV4dCApIHtcbiAgICAgICAgSW5xdWlyZXJcbiAgICAgICAgICAgIC5wcm9tcHQoIFsge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdsaXN0JyxcbiAgICAgICAgICAgICAgICBuYW1lOiAncG9ydE9wdGlvbicsXG4gICAgICAgICAgICAgICAgbWVzc2FnZTogJ+mAieaLqeerr+WPo+WPtycsXG4gICAgICAgICAgICAgICAgY2hvaWNlczogWyBOT1JNQUwsIFJBTkRPTSBdLFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6IFJBTkRPTVxuICAgICAgICAgICAgfSBdLCBhbnN3ZXIgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuY29uZmlnLnNldFBvcnRPcHRpb24oIGFuc3dlci5wb3J0T3B0aW9uIClcbiAgICAgICAgICAgICAgICBuZXh0KClcbiAgICAgICAgICAgIH0gKVxuICAgIH1cblxuICAgIGNvbmZpZ0RvbWFpbiggbmV4dCApIHtcbiAgICAgICAgbGV0IGMgICAgICAgICAgICA9IHRoaXMuY29uZmlnLFxuICAgICAgICAgICAgc2F2ZWREb21haW5zID0gYy5nZXRTYXZlZERvbWFpbnMoKSxcbiAgICAgICAgICAgIGRvbWFpbnNTaXplICA9IHNhdmVkRG9tYWlucy5sZW5ndGhcblxuICAgICAgICBpZiAoIGRvbWFpbnNTaXplICkge1xuICAgICAgICAgICAgSW5xdWlyZXJcbiAgICAgICAgICAgICAgICAucHJvbXB0KCBbIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2xpc3QnLFxuICAgICAgICAgICAgICAgICAgICBuYW1lOiAnb3ZlcnJpZGUnLFxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiAn5piv5ZCm6YeN5paw6K6+572u5Z+f5ZCNPycsXG4gICAgICAgICAgICAgICAgICAgIGNob2ljZXM6IFsgWUVTLCBOTyBdLFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiBOT1xuICAgICAgICAgICAgICAgIH0gXSwgYW5zd2VyID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBhbnN3ZXIub3ZlcnJpZGUgPT0gWUVTICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYy5jbGVhckRvbWFpbnMoKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY29uZmlnRG9tYWluKCBuZXh0IClcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIG5leHQoKVxuICAgICAgICAgICAgICAgIH0gKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5jb2xsZWN0RG9tYWluKCBuZXh0IClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNvbGxlY3REb21haW4oIG5leHQgKSB7XG4gICAgICAgIElucXVpcmVyXG4gICAgICAgICAgICAucHJvbXB0KCBbIHtcbiAgICAgICAgICAgICAgICBuYW1lOiAnZG9tYWluJyxcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiAn6K6+572u5Z+f5ZCNKOi+k+WFpSBuIOWPr+i3s+i/h+atpOatpemqpCknLFxuICAgICAgICAgICAgICAgIHZhbGlkYXRlKCBkb21haW4gKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbiA9IGRvbWFpbi50cmltKClcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRvbWFpbi5zcGxpdCggJyAnICkubGVuZ3RoID09IDIgfHwgZG9tYWluID09IE5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IF0sIGFuc3dlciA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IGMgICAgICAgICAgID0gdGhpcy5jb25maWcsXG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbiAgICAgID0gYW5zd2VyLmRvbWFpbi50cmltKCksXG4gICAgICAgICAgICAgICAgICAgIGRvbWFpbkFyciAgID0gZG9tYWluLnNwbGl0KCAnICcgKSxcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluc1NpemUgPSBjLmdldERvbWFpbnNTaXplKClcblxuICAgICAgICAgICAgICAgIGlmICggZG9tYWluID09IE4gKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICggZG9tYWluc1NpemUgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0KClcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyggJ+iHs+WwkemcgOimgemFjee9ruS4gOS4quWfn+WQjScsICd3YXJuJyApXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNvbGxlY3REb21haW4oIG5leHQgKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYy5hZGREb21haW4oIGRvbWFpbkFyciApXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbGxlY3REb21haW4oIG5leHQgKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gKVxuICAgIH1cblxuICAgIGFzeW5jIGNvbmZpZ0FkZHJlc3MoIG5leHQgKSB7XG4gICAgICAgIGxvZyggJ+iuvue9riBJUCcgKVxuICAgICAgICBsZXQgYyAgICAgICAgPSB0aGlzLmNvbmZpZyxcbiAgICAgICAgICAgIGlzQ2hhbmdlID0gYXdhaXQgYy5pc0lQQ2hhbmdlKClcblxuICAgICAgICBpZiAoIGlzQ2hhbmdlICkge1xuICAgICAgICAgICAgbG9nKCAnSVAg6ZyA6KaB5pu05pawLi4uJyApXG4gICAgICAgICAgICBJbmRpY2F0b3Iuc3RhcnQoICfmm7TmlrAgSVAg5Zyw5Z2AJyApXG5cbiAgICAgICAgICAgIGxldCBpc09LICA9IGF3YWl0IGMudXBkYXRlSVAoKSxcbiAgICAgICAgICAgICAgICBzdGF0ZSA9IGlzT0sgPyAnc3VjY2VzcycgOiAnZXJyb3InLFxuICAgICAgICAgICAgICAgIHRleHQgID0gaXNPSyA/ICfmiJDlip8nIDogJ+Wksei0pSdcblxuICAgICAgICAgICAgbG9nKCBgXFxu5pu05pawIElQIOWcsOWdgCR7dGV4dH1gLCBzdGF0ZSApXG4gICAgICAgICAgICBJbmRpY2F0b3Iuc3RvcCgpXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBsb2coICdJUCDlnLDlnYDml6Dlj5jljJbvvIzkuI3pnIDopoHmm7TmlrAnIClcbiAgICAgICAgfVxuXG4gICAgICAgIG5leHQoKVxuICAgIH1cblxuICAgIGFzeW5jIGNvbmZpZ1Byb3h5KCBuZXh0ICkge1xuICAgICAgICBJbmRpY2F0b3Iuc3RhcnQoICfmm7TmlrDku6PnkIbmnI3liqHlmagnIClcbiAgICAgICAgYXdhaXQgdGhpcy5jb25maWcudXBkYXRlUHJveHkoKVxuICAgICAgICBJbmRpY2F0b3Iuc3RvcCgpXG4gICAgICAgIGxvZyggJ+abtOaWsOS7o+eQhuacjeWKoeWZqOaIkOWKnycsICdzdWNjZXNzJyApXG4gICAgICAgIG5leHQoKVxuICAgIH1cblxuICAgIGFzeW5jIGZpbmlzaCgpIHtcbiAgICAgICAgbGV0IHdvcmtzcGFjZSA9IG5ldyBXb3JrU3BhY2UoIHRoaXMuY29uZmlnLmdldFBhdGgoKSApLFxuICAgICAgICAgICAgZG9tYWluICAgID0gdGhpcy5jb25maWcuZ2V0U2F2ZWREb21haW5zKClbIDAgXS5rZXlcblxuICAgICAgICB3b3Jrc3BhY2UuYWN0aXZlKClcbiAgICAgICAgYXdhaXQgd29ya3NwYWNlLnN0YXJ0KClcblxuICAgICAgICBTbG9nYW4ueWVsbCgpXG4gICAgICAgIGxvZyggJz09PT09PT09PT09PT09PT09PT09JyApXG4gICAgICAgIGxvZyggJ3dob3JuYmlsbCDnjq/looPphY3nva7lrozmr5UnIClcbiAgICAgICAgbG9nKCAnQ2FnZSDnmoTor6bnu4bkvb/nlKjor7fmn6XnnIvmlofmoaPvvJpcXG5odHRwczovL2dpdGh1Yi5jb20vbWxzLWZlL2NhZ2UnIClcbiAgICAgICAgc2V0VGltZW91dCggKCkgPT4ge1xuICAgICAgICAgICAgT3BlbiggYGh0dHA6Ly8ke2RvbWFpbn0uZmVkZXZvdC5tZWlsaXNodW8uY29tYCApXG4gICAgICAgIH0sIDEwMDAgKVxuICAgIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBDb25maWdDTElcbiJdfQ== \ No newline at end of file diff --git a/dist/cli/setup.js b/dist/cli/setup.js index 52075ca..cd397fa 100644 --- a/dist/cli/setup.js +++ b/dist/cli/setup.js @@ -16,7 +16,9 @@ var Inquirer = require('inquirer'), Key = require('../key'); var USERNAME = Key.username, - PASSWORD = Key.password; + PASSWORD = Key.password, + YES = '是', + NO = '否'; var notNull = function notNull(content) { return !!content || '内容不能为空!'; @@ -90,14 +92,15 @@ var SetupCLI = (function () { var _this3 = this; Inquirer.prompt([{ - type: 'confirm', + type: 'list', name: 'override', message: '文件夹已存在,是否覆盖', - 'default': false + choices: [YES, NO], + 'default': NO }], function (answer) { var path = _this3._path; - if (answer.override) { + if (answer.override === YES) { Rimraf(path, _bluebird.coroutine(function* (err) { if (!err) { _this3._setup = new Setup(); @@ -116,4 +119,4 @@ var SetupCLI = (function () { })(); module.exports = SetupCLI; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaS9zZXR1cC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBLElBQUksUUFBUSxHQUFJLE9BQU8sQ0FBRSxVQUFVLENBQUU7SUFDakMsSUFBSSxHQUFRLE9BQU8sQ0FBRSxNQUFNLENBQUU7SUFDN0IsT0FBTyxHQUFLLE9BQU8sQ0FBRSxVQUFVLENBQUU7SUFDakMsTUFBTSxHQUFNLE9BQU8sQ0FBRSxRQUFRLENBQUU7SUFDL0IsRUFBRSxHQUFVLE9BQU8sQ0FBQyxZQUFZLENBQUUsT0FBTyxDQUFFLElBQUksQ0FBRSxDQUFFO0lBQ25ELEtBQUssR0FBTyxPQUFPLENBQUUsZUFBZSxDQUFFO0lBQ3RDLFNBQVMsR0FBRyxPQUFPLENBQUUsVUFBVSxDQUFFO0lBQ2pDLEdBQUcsR0FBUyxPQUFPLENBQUUsUUFBUSxDQUFFLENBQUE7O0FBRW5DLElBQU0sUUFBUSxHQUFHLEdBQUcsQ0FBQyxRQUFRO0lBQ3ZCLFFBQVEsR0FBRyxHQUFHLENBQUMsU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250ZW50ID0+ICEhY29udGVudCB8fCAn5YaF5a655LiN6IO95Li656m677yBJ1xuXG5jbGFzcyBTZXR1cENMSSB7XG4gICAgY29uc3RydWN0b3IoKSB7XG4gICAgICAgIHRoaXMuaW5pdCgpXG4gICAgfVxuXG4gICAgaW5pdCgpIHtcbiAgICAgICAgSW5xdWlyZXIucHJvbXB0KCBbIHtcbiAgICAgICAgICAgIG5hbWU6ICdkaXInLFxuICAgICAgICAgICAgbWVzc2FnZTogJ+iuvue9ruebruW9lScsXG4gICAgICAgICAgICBkZWZhdWx0OiAnbWFzdGVyJ1xuICAgICAgICB9IF0sIGFzeW5jIGFuc3dlciA9PiB7XG4gICAgICAgICAgICBsZXQgcGF0aCAgICA9IFBhdGgucmVzb2x2ZSggYW5zd2VyLmRpciApLFxuICAgICAgICAgICAgICAgIGlzRXhpc3QgPSBmYWxzZVxuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIC8vaHR0cHM6Ly9naXRodWIuY29tL3BldGthYW50b25vdi9ibHVlYmlyZC9ibG9iL21hc3Rlci9BUEkubWQjcHJvbWlzaWZpY2F0aW9uXG4gICAgICAgICAgICAgICAgaXNFeGlzdCA9IGF3YWl0IEZTLnN0YXRBc3luYyggcGF0aCApXG4gICAgICAgICAgICB9IGNhdGNoICggZSApIHtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdGhpcy5fcGF0aCA9IHBhdGhcblxuICAgICAgICAgICAgbG9nKCBg55uu5b2V5Zyw5Z2AOiR7cGF0aH1gLCAnZGVidWcnIClcblxuICAgICAgICAgICAgaWYgKCBpc0V4aXN0ICkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2xlYW51cCgpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRoaXMuX3NldHVwID0gbmV3IFNldHVwKClcbiAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLl9zZXR1cC5pbml0KCBwYXRoIClcbiAgICAgICAgICAgICAgICB0aGlzLmNoZWNrb3V0KClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSApXG4gICAgfVxuXG4gICAgY2hlY2tvdXQoKSB7XG4gICAgICAgIElucXVpcmVyLnByb21wdCggWyB7XG4gICAgICAgICAgICBuYW1lOiBVU0VSTkFNRSxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICdTVk4g55So5oi35ZCNJyxcbiAgICAgICAgICAgIGRlZmF1bHQ6IFByb2ZpbGUuZ2V0KCBVU0VSTkFNRSApIHx8ICcnLFxuICAgICAgICAgICAgdmFsaWRhdGU6IG5vdE51bGxcbiAgICAgICAgfSwge1xuICAgICAgICAgICAgdHlwZTogUEFTU1dPUkQsXG4gICAgICAgICAgICBuYW1lOiBQQVNTV09SRCxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICdTVk4g5a+G56CBJyxcbiAgICAgICAgICAgIHZhbGlkYXRlOiBub3ROdWxsXG4gICAgICAgIH0gXSwgYXN5bmMgYW5zd2VyID0+IHtcbiAgICAgICAgICAgIGxldCB1c2VybmFtZSA9IGFuc3dlclsgVVNFUk5BTUUgXSxcbiAgICAgICAgICAgICAgICBwYXNzd29yZCA9IGFuc3dlclsgUEFTU1dPUkQgXVxuXG4gICAgICAgICAgICBQcm9maWxlLnNldCggVVNFUk5BTUUsIHVzZXJuYW1lIClcbiAgICAgICAgICAgIGF3YWl0IHRoaXMuX3NldHVwLmNoZWNrb3V0U291cmNlKCB1c2VybmFtZSwgcGFzc3dvcmQgKVxuICAgICAgICAgICAgbmV3IENvbmZpZ0NMSSggdGhpcy5fcGF0aCApXG4gICAgICAgIH0gKVxuICAgIH1cblxuICAgIGNsZWFudXAoKSB7XG4gICAgICAgIElucXVpcmVyLnByb21wdCggWyB7XG4gICAgICAgICAgICB0eXBlOiAnY29uZmlybScsXG4gICAgICAgICAgICBuYW1lOiAnb3ZlcnJpZGUnLFxuICAgICAgICAgICAgbWVzc2FnZTogJ+aWh+S7tuWkueW3suWtmOWcqO+8jOaYr+WQpuimhueblicsXG4gICAgICAgICAgICBkZWZhdWx0OiBmYWxzZVxuICAgICAgICB9IF0sIGFuc3dlciA9PiB7XG4gICAgICAgICAgICBsZXQgcGF0aCA9IHRoaXMuX3BhdGhcblxuICAgICAgICAgICAgaWYgKCBhbnN3ZXIub3ZlcnJpZGUgKSB7XG4gICAgICAgICAgICAgICAgUmltcmFmKCBwYXRoLCBhc3luYyBlcnIgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoICFlcnIgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9zZXR1cCA9IG5ldyBTZXR1cCgpXG4gICAgICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLl9zZXR1cC5pbml0KCBwYXRoIClcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuY2hlY2tvdXQoKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSApXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ldyBDb25maWdDTEkoIHBhdGggKVxuICAgICAgICAgICAgfVxuICAgICAgICB9IClcbiAgICB9XG59XG5cbm1vZHVsZS5leHBvcnRzID0gU2V0dXBDTElcbiJdfQ== \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNsaS9zZXR1cC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUFBLElBQUksUUFBUSxHQUFJLE9BQU8sQ0FBRSxVQUFVLENBQUU7SUFDakMsSUFBSSxHQUFRLE9BQU8sQ0FBRSxNQUFNLENBQUU7SUFDN0IsT0FBTyxHQUFLLE9BQU8sQ0FBRSxVQUFVLENBQUU7SUFDakMsTUFBTSxHQUFNLE9BQU8sQ0FBRSxRQUFRLENBQUU7SUFDL0IsRUFBRSxHQUFVLE9BQU8sQ0FBQyxZQUFZLENBQUUsT0FBTyxDQUFFLElBQUksQ0FBRSxDQU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VxdWlyZSggJ3JpbXJhZicgKSxcbiAgICBGUyAgICAgICAgPSBQcm9taXNlLnByb21pc2lmeUFsbCggcmVxdWlyZSggJ2ZzJyApICksXG4gICAgU2V0dXAgICAgID0gcmVxdWlyZSggJy4uL2NvcmUvc2V0dXAnICksXG4gICAgQ29uZmlnQ0xJID0gcmVxdWlyZSggJy4vY29uZmlnJyApLFxuICAgIEtleSAgICAgICA9IHJlcXVpcmUoICcuLi9rZXknIClcblxuY29uc3QgVVNFUk5BTUUgPSBLZXkudXNlcm5hbWUsXG4gICAgICBQQVNTV09SRCA9IEtleS5wYXNzd29yZCxcbiAgICAgIFlFUyAgICAgID0gJ+aYrycsXG4gICAgICBOTyAgICAgICA9ICflkKYnXG5cbmxldCBub3ROdWxsID0gY29udGVudCA9PiAhIWNvbnRlbnQgfHwgJ+WGheWuueS4jeiDveS4uuepuu+8gSdcblxuY2xhc3MgU2V0dXBDTEkge1xuICAgIGNvbnN0cnVjdG9yKCkge1xuICAgICAgICB0aGlzLmluaXQoKVxuICAgIH1cblxuICAgIGluaXQoKSB7XG4gICAgICAgIElucXVpcmVyLnByb21wdCggWyB7XG4gICAgICAgICAgICBuYW1lOiAnZGlyJyxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICforr7nva7nm67lvZUnLFxuICAgICAgICAgICAgZGVmYXVsdDogJ21hc3RlcidcbiAgICAgICAgfSBdLCBhc3luYyBhbnN3ZXIgPT4ge1xuICAgICAgICAgICAgbGV0IHBhdGggICAgPSBQYXRoLnJlc29sdmUoIGFuc3dlci5kaXIgKSxcbiAgICAgICAgICAgICAgICBpc0V4aXN0ID0gZmFsc2VcblxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAvL2h0dHBzOi8vZ2l0aHViLmNvbS9wZXRrYWFudG9ub3YvYmx1ZWJpcmQvYmxvYi9tYXN0ZXIvQVBJLm1kI3Byb21pc2lmaWNhdGlvblxuICAgICAgICAgICAgICAgIGlzRXhpc3QgPSBhd2FpdCBGUy5zdGF0QXN5bmMoIHBhdGggKVxuICAgICAgICAgICAgfSBjYXRjaCAoIGUgKSB7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuX3BhdGggPSBwYXRoXG5cbiAgICAgICAgICAgIGxvZyggYOebruW9leWcsOWdgDoke3BhdGh9YCwgJ2RlYnVnJyApXG5cbiAgICAgICAgICAgIGlmICggaXNFeGlzdCApIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNsZWFudXAoKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9zZXR1cCA9IG5ldyBTZXR1cCgpXG4gICAgICAgICAgICAgICAgYXdhaXQgdGhpcy5fc2V0dXAuaW5pdCggcGF0aCApXG4gICAgICAgICAgICAgICAgdGhpcy5jaGVja291dCgpXG4gICAgICAgICAgICB9XG4gICAgICAgIH0gKVxuICAgIH1cblxuICAgIGNoZWNrb3V0KCkge1xuICAgICAgICBJbnF1aXJlci5wcm9tcHQoIFsge1xuICAgICAgICAgICAgbmFtZTogVVNFUk5BTUUsXG4gICAgICAgICAgICBtZXNzYWdlOiAnU1ZOIOeUqOaIt+WQjScsXG4gICAgICAgICAgICBkZWZhdWx0OiBQcm9maWxlLmdldCggVVNFUk5BTUUgKSB8fCAnJyxcbiAgICAgICAgICAgIHZhbGlkYXRlOiBub3ROdWxsXG4gICAgICAgIH0sIHtcbiAgICAgICAgICAgIHR5cGU6IFBBU1NXT1JELFxuICAgICAgICAgICAgbmFtZTogUEFTU1dPUkQsXG4gICAgICAgICAgICBtZXNzYWdlOiAnU1ZOIOWvhueggScsXG4gICAgICAgICAgICB2YWxpZGF0ZTogbm90TnVsbFxuICAgICAgICB9IF0sIGFzeW5jIGFuc3dlciA9PiB7XG4gICAgICAgICAgICBsZXQgdXNlcm5hbWUgPSBhbnN3ZXJbIFVTRVJOQU1FIF0sXG4gICAgICAgICAgICAgICAgcGFzc3dvcmQgPSBhbnN3ZXJbIFBBU1NXT1JEIF1cblxuICAgICAgICAgICAgUHJvZmlsZS5zZXQoIFVTRVJOQU1FLCB1c2VybmFtZSApXG4gICAgICAgICAgICBhd2FpdCB0aGlzLl9zZXR1cC5jaGVja291dFNvdXJjZSggdXNlcm5hbWUsIHBhc3N3b3JkIClcbiAgICAgICAgICAgIG5ldyBDb25maWdDTEkoIHRoaXMuX3BhdGggKVxuICAgICAgICB9IClcbiAgICB9XG5cbiAgICBjbGVhbnVwKCkge1xuICAgICAgICBJbnF1aXJlci5wcm9tcHQoIFsge1xuICAgICAgICAgICAgdHlwZTogJ2xpc3QnLFxuICAgICAgICAgICAgbmFtZTogJ292ZXJyaWRlJyxcbiAgICAgICAgICAgIG1lc3NhZ2U6ICfmlofku7blpLnlt7LlrZjlnKjvvIzmmK/lkKbopobnm5YnLFxuICAgICAgICAgICAgY2hvaWNlczogWyBZRVMsIE5PIF0sXG4gICAgICAgICAgICBkZWZhdWx0OiBOT1xuICAgICAgICB9IF0sIGFuc3dlciA9PiB7XG4gICAgICAgICAgICBsZXQgcGF0aCA9IHRoaXMuX3BhdGhcblxuICAgICAgICAgICAgaWYgKCBhbnN3ZXIub3ZlcnJpZGUgPT09IFlFUyApIHtcbiAgICAgICAgICAgICAgICBSaW1yYWYoIHBhdGgsIGFzeW5jIGVyciA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICggIWVyciApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX3NldHVwID0gbmV3IFNldHVwKClcbiAgICAgICAgICAgICAgICAgICAgICAgIGF3YWl0IHRoaXMuX3NldHVwLmluaXQoIHBhdGggKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGVja291dCgpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IClcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbmV3IENvbmZpZ0NMSSggcGF0aCApXG4gICAgICAgICAgICB9XG4gICAgICAgIH0gKVxuICAgIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBTZXR1cENMSVxuIl19 \ No newline at end of file diff --git a/dist/core/config.js b/dist/core/config.js index 6903e54..7739f3a 100644 --- a/dist/core/config.js +++ b/dist/core/config.js @@ -92,7 +92,9 @@ var Config = (function () { if (!(key in domainsObj)) { domainsObj[key] = value; - domains.push(key); + domains.push({ + key: key, value: value + }); Profile.set(DOMAINS, domainsObj); } } @@ -186,4 +188,4 @@ var Config = (function () { })(); module.exports = Config; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUvY29uZmlnLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSxJQUFJLEdBQUcsR0FBTyxPQUFPLENBQUUsUUFBUSxDQUFFO0lBQzdCLElBQUksR0FBTSxPQUFPLENBQUUsU0FBUyxDQUFFO0lBQzlCLEtBQUssR0FBSyxPQUFPLENBQUUsVUFBVSxDQUFFO0lBQy9CLE9BQU8sR0FBRyxNQUFNLENBQUMsT0FBTyxDQUFBOztBQUU1QixJQUFNLE9BQU8sR0FBTSxHQUFHLENBQUMsT0FBTztJQUN4QixNQUFNLEdBQU8sR0FBRyxDQUFDLE1BQU07SUFDdkIsVUFBVSxHQUFHLEtBQUssQ0FBQyxVQUFVO0lBQzdCLEVBQUUsR0FBVyxHQUFHLENBQUMsRUFBRSxDQUFBOztJQUVuQixNQUFNO0FBQ0csYUFEVCxNQUFNLENBQ0ssSUFBSSxFQUFHOzhCQURsQixNQUFNOztBQUVKLFlBQUksQ0FBQyxLQUFLLEdBQUcsRUFBRSxJQUFJLEVBQUosSUFBSSxFQUFFLENBQUE7S0FDeEI7O2lCQUhDLE1BQU07O2VBS0QsbUJBQUc7QUFDTixtQkFBTyxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksQ0FBQTtTQUN6Qjs7O2VBRVkseUJBQUc7QUFDWixtQkFBTyxJQUFJLENBQU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vcnRPcHRpb25cbiAgICB9XG5cbiAgICBzZXRQb3J0KCBwb3J0ICkge1xuICAgICAgICB0aGlzLnBhcmFtLnBvcnQgPSBwb3J0XG4gICAgfVxuXG4gICAgZ2V0UG9ydCgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucGFyYW0ucG9ydFxuICAgIH1cblxuICAgIHNldFBvcnRPcHRpb24oIHBvcnQgKSB7XG4gICAgICAgIHRoaXMucGFyYW0ucG9ydE9wdGlvbiA9IHBvcnRcbiAgICB9XG5cbiAgICBhc3luYyBnZW5lcmF0ZVBvcnQoKSB7XG4gICAgICAgIGxldCBpcCAgID0gUHJvZmlsZS5nZXQoIElQICksXG4gICAgICAgICAgICBwYXRoID0gdGhpcy5nZXRQYXRoKCksXG4gICAgICAgICAgICBwb3J0LCB1cmxcblxuICAgICAgICBpZiAoIHRoaXMuZ2V0UG9ydE9wdGlvbigpID09IFJBTkRPTSApIHtcbiAgICAgICAgICAgIHBvcnQgPSBNYXRoLnJhbmRvbSgpICogMTAwMCB8IDAgKyA2MDAwXG4gICAgICAgICAgICB0aGlzLnNldFBvcnQoIHBvcnQgKVxuXG4gICAgICAgICAgICB1cmwgPSBgaHR0cDovLyR7aXB9OiR7cG9ydCArIDF9L2BcblxuICAgICAgICAgICAgYXdhaXQgVXRpbC51cGRhdGVKU09ORmlsZSggcGF0aCArIENvbnN0LkZJTEVfU0lURSwge1xuICAgICAgICAgICAgICAgICdKQ1NUQVRJQ19CQVNFJzogdXJsLFxuICAgICAgICAgICAgICAgICdNX0pDU1RBVElDX0JBU0UnOiB1cmxcbiAgICAgICAgICAgIH0gKVxuXG4gICAgICAgICAgICBhd2FpdCBVdGlsLnVwZGF0ZUpTT05GaWxlKCBwYXRoICsgQ29uc3QuRklMRV9FVEMsIHtcbiAgICAgICAgICAgICAgICBvblBvcnQ6IHBvcnRcbiAgICAgICAgICAgIH0gKVxuXG4gICAgICAgICAgICBhd2FpdCBVdGlsLnVwZGF0ZUpTT05GaWxlKCBwYXRoICsgQ29uc3QuRklMRV9TRVJWSUNFLCB7XG4gICAgICAgICAgICAgICAgb25Qb3J0OiBwb3J0ICsgMVxuICAgICAgICAgICAgfSApXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhZGREb21haW4oIGRvbWFpbiApIHtcbiAgICAgICAgbGV0IHBhcmFtICAgICAgPSB0aGlzLnBhcmFtLFxuICAgICAgICAgICAgZG9tYWluc09iaiA9IHBhcmFtLmRvbWFpbnNPYmosXG4gICAgICAgICAgICBkb21haW5zICAgID0gcGFyYW0uZG9tYWluc1xuXG4gICAgICAgIGxldCBbIGtleSwgdmFsdWUgXSA9IGRvbWFpblxuXG4gICAgICAgIGlmICggIShrZXkgaW4gZG9tYWluc09iaiApICkge1xuICAgICAgICAgICAgZG9tYWluc09ialsga2V5IF0gPSB2YWx1ZVxuICAgICAgICAgICAgZG9tYWlucy5wdXNoKCBrZXkgKVxuICAgICAgICAgICAgUHJvZmlsZS5zZXQoIERPTUFJTlMsIGRvbWFpbnNPYmogKVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0U2F2ZWREb21haW5zKCkge1xuICAgICAgICBsZXQgcGFyYW0gICAgICAgICAgPSB0aGlzLnBhcmFtLFxuICAgICAgICAgICAgZGVmYXVsdERvbWFpbnMgPSBwYXJhbS5kb21haW5zT2JqLFxuICAgICAgICAgICAgZG9tYWluc0FyciAgICAgPSBwYXJhbS5kb21haW5zXG5cbiAgICAgICAgaWYgKCBkb21haW5zQXJyICkge1xuICAgICAgICAgICAgcmV0dXJuIGRvbWFpbnNBcnJcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGRlZmF1bHREb21haW5zID0gUHJvZmlsZS5nZXQoIERPTUFJTlMgKSB8fCB7fVxuICAgICAgICAgICAgZG9tYWluc0FyciAgICAgPSBbXVxuICAgICAgICB9XG5cbiAgICAgICAgZm9yICggbGV0IGtleSBpbiBkZWZhdWx0RG9tYWlucyApIHtcbiAgICAgICAgICAgIGRvbWFpbnNBcnIucHVzaCgge1xuICAgICAgICAgICAgICAgIGtleSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogZGVmYXVsdERvbWFpbnNbIGtleSBdXG4gICAgICAgICAgICB9IClcbiAgICAgICAgfVxuXG4gICAgICAgIHBhcmFtLmRvbWFpbnNPYmogPSBkZWZhdWx0RG9tYWluc1xuICAgICAgICByZXR1cm4gcGFyYW0uZG9tYWlucyA9IGRvbWFpbnNBcnJcbiAgICB9XG5cbiAgICBnZXREb21haW5zU2l6ZSgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucGFyYW0uZG9tYWlucy5sZW5ndGhcbiAgICB9XG5cbiAgICBjbGVhckRvbWFpbnMoKSB7XG4gICAgICAgIGxldCBwYXJhbSAgICAgICAgPSB0aGlzLnBhcmFtXG5cbiAgICAgICAgUHJvZmlsZS5kZWwoIERPTUFJTlMgKVxuICAgICAgICBwYXJhbS5kb21haW5zT2JqID0ge31cbiAgICAgICAgcGFyYW0uZG9tYWlucyAgICA9IFtdXG4gICAgfVxuXG4gICAgYXN5bmMgaXNJUENoYW5nZSgpIHtcbiAgICAgICAgbGV0IGlwID0gdGhpcy5wYXJhbS5pcCA9IGF3YWl0IFV0aWwuZ2V0SVAoKVxuICAgICAgICByZXR1cm4gUHJvZmlsZS5nZXQoIElQICkgIT0gaXBcbiAgICB9XG5cbiAgICBhc3luYyB1cGRhdGVJUCgpIHtcbiAgICAgICAgbGV0IG1hYyA9IGF3YWl0IFV0aWwuZ2V0TWFjKCksXG4gICAgICAgICAgICByZXMgPSBhd2FpdCBVdGlsLnVwZGF0ZU1hYyggbWFjIClcblxuICAgICAgICBpZiAoIHJlcyApIHtcbiAgICAgICAgICAgIGxldCBwb3J0ID0gVXRpbC5nZXRQb3J0KCB0aGlzLmdldFBhdGgoKSApICsgMSxcbiAgICAgICAgICAgICAgICBpcCAgID0gUHJvZmlsZS5nZXQoIElQICksXG4gICAgICAgICAgICAgICAgdXJsICA9IGBodHRwOi8vJHt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AgICAgICByZXR1cm4gdGhpcy5wYXJhbS5wb3J0XG4gICAgfVxuXG4gICAgc2V0UG9ydE9wdGlvbiggcG9ydCApIHtcbiAgICAgICAgdGhpcy5wYXJhbS5wb3J0T3B0aW9uID0gcG9ydFxuICAgIH1cblxuICAgIGFzeW5jIGdlbmVyYXRlUG9ydCgpIHtcbiAgICAgICAgbGV0IGlwICAgPSBQcm9maWxlLmdldCggSVAgKSxcbiAgICAgICAgICAgIHBhdGggPSB0aGlzLmdldFBhdGgoKSxcbiAgICAgICAgICAgIHBvcnQsIHVybFxuXG4gICAgICAgIGlmICggdGhpcy5nZXRQb3J0T3B0aW9uKCkgPT0gUkFORE9NICkge1xuICAgICAgICAgICAgcG9ydCA9IE1hdGgucmFuZG9tKCkgKiAxMDAwIHwgMCArIDYwMDBcbiAgICAgICAgICAgIHRoaXMuc2V0UG9ydCggcG9ydCApXG5cbiAgICAgICAgICAgIHVybCA9IGBodHRwOi8vJHtpcH06JHtwb3J0ICsgMX0vYFxuXG4gICAgICAgICAgICBhd2FpdCBVdGlsLnVwZGF0ZUpTT05GaWxlKCBwYXRoICsgQ29uc3QuRklMRV9TSVRFLCB7XG4gICAgICAgICAgICAgICAgJ0pDU1RBVElDX0JBU0UnOiB1cmwsXG4gICAgICAgICAgICAgICAgJ01fSkNTVEFUSUNfQkFTRSc6IHVybFxuICAgICAgICAgICAgfSApXG5cbiAgICAgICAgICAgIGF3YWl0IFV0aWwudXBkYXRlSlNPTkZpbGUoIHBhdGggKyBDb25zdC5GSUxFX0VUQywge1xuICAgICAgICAgICAgICAgIG9uUG9ydDogcG9ydFxuICAgICAgICAgICAgfSApXG5cbiAgICAgICAgICAgIGF3YWl0IFV0aWwudXBkYXRlSlNPTkZpbGUoIHBhdGggKyBDb25zdC5GSUxFX1NFUlZJQ0UsIHtcbiAgICAgICAgICAgICAgICBvblBvcnQ6IHBvcnQgKyAxXG4gICAgICAgICAgICB9IClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFkZERvbWFpbiggZG9tYWluICkge1xuICAgICAgICBsZXQgcGFyYW0gICAgICA9IHRoaXMucGFyYW0sXG4gICAgICAgICAgICBkb21haW5zT2JqID0gcGFyYW0uZG9tYWluc09iaixcbiAgICAgICAgICAgIGRvbWFpbnMgICAgPSBwYXJhbS5kb21haW5zXG5cbiAgICAgICAgbGV0IFsga2V5LCB2YWx1ZSBdID0gZG9tYWluXG5cbiAgICAgICAgaWYgKCAhKGtleSBpbiBkb21haW5zT2JqICkgKSB7XG4gICAgICAgICAgICBkb21haW5zT2JqWyBrZXkgXSA9IHZhbHVlXG4gICAgICAgICAgICBkb21haW5zLnB1c2goIHtcbiAgICAgICAgICAgICAgICBrZXksIHZhbHVlXG4gICAgICAgICAgICB9IClcbiAgICAgICAgICAgIFByb2ZpbGUuc2V0KCBET01BSU5TLCBkb21haW5zT2JqIClcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGdldFNhdmVkRG9tYWlucygpIHtcbiAgICAgICAgbGV0IHBhcmFtICAgICAgICAgID0gdGhpcy5wYXJhbSxcbiAgICAgICAgICAgIGRlZmF1bHREb21haW5zID0gcGFyYW0uZG9tYWluc09iaixcbiAgICAgICAgICAgIGRvbWFpbnNBcnIgICAgID0gcGFyYW0uZG9tYWluc1xuXG4gICAgICAgIGlmICggZG9tYWluc0FyciApIHtcbiAgICAgICAgICAgIHJldHVybiBkb21haW5zQXJyXG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkZWZhdWx0RG9tYWlucyA9IFByb2ZpbGUuZ2V0KCBET01BSU5TICkgfHwge31cbiAgICAgICAgICAgIGRvbWFpbnNBcnIgICAgID0gW11cbiAgICAgICAgfVxuXG4gICAgICAgIGZvciAoIGxldCBrZXkgaW4gZGVmYXVsdERvbWFpbnMgKSB7XG4gICAgICAgICAgICBkb21haW5zQXJyLnB1c2goIHtcbiAgICAgICAgICAgICAgICBrZXksXG4gICAgICAgICAgICAgICAgdmFsdWU6IGRlZmF1bHREb21haW5zW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ArIENvbnN0LkZJTEVfU0lURSwge1xuICAgICAgICAgICAgICAgICdKQ1NUQVRJQ19CQVNFJzogdXJsLFxuICAgICAgICAgICAgICAgICdNX0pDU1RBVElDX0JBU0UnOiB1cmxcbiAgICAgICAgICAgIH0gKVxuXG4gICAgICAgICAgICBQcm9maWxlLnNldCggSVAsIHRoaXMucGFyYW0uaXAgKVxuICAgICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFzeW5jIHVwZGF0ZVByb3h5KCkge1xuICAgICAgICBsZXQgZG9tYWlucyAgID0gdGhpcy5nZXRTYXZlZERvbWFpbnMoKSxcbiAgICAgICAgICAgIGhvc3RzICAgICA9IHt9LFxuICAgICAgICAgICAgaG9zdFBhcmFtID0gW10sXG4gICAgICAgICAgICBwb3J0XG5cbiAgICAgICAgZG9tYWlucy5mb3JFYWNoKCBkb21haW4gPT4ge1xuICAgICAgICAgICAgaG9zdFBhcmFtLnB1c2goICdob3N0PScgKyBkb21haW4ua2V5IClcbiAgICAgICAgICAgIGhvc3RzWyBkb21haW4ua2V5ICsgQ29uc3QuU0lURV9TVUZGSVggXSA9IGRvbWFpbi52YWx1ZVxuICAgICAgICB9IClcblxuICAgICAgICBhd2FpdCB0aGlzLmdlbmVyYXRlUG9ydCgpXG5cbiAgICAgICAgcG9ydCA9IHRoaXMuZ2V0UG9ydCgpIHx8IFV0aWwuZ2V0UG9ydCggdGhpcy5nZXRQYXRoKCkgKVxuXG4gICAgICAgIGF3YWl0IFV0aWwudXBkYXRlSlNPTkZpbGUoIHRoaXMuZ2V0UGF0aCgpICsgQ29uc3QuRklMRV9WSE9TVCwgaG9zdHMgKVxuICAgICAgICBhd2FpdCBVdGlsLnVwZGF0ZVByb3h5KCBwb3J0LCBob3N0UGFyYW0uam9pbiggJyYnICkgKVxuICAgIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBDb25maWdcbiJdfQ== \ No newline at end of file diff --git a/dist/core/setup.js b/dist/core/setup.js index fdc52f1..7b41834 100644 --- a/dist/core/setup.js +++ b/dist/core/setup.js @@ -42,33 +42,47 @@ var Setup = (function () { }, { key: 'checkoutSource', value: _bluebird.coroutine(function* (username, password) { - var phaseObj = phases.shift(), - name = undefined, - path = undefined; + var _this = this; + + yield Promise.all(phases.map(_bluebird.coroutine(function* (phaseObj) { + var name = undefined, + path = undefined; - if (phaseObj) { name = phaseObj.name; - path = this._path + phaseObj.dir; + path = _this._path + phaseObj.dir; log('\n初始化 ' + name + ' 文件夹'); Util.indicator.start(); yield FS.mkdirAsync(path); - yield SVN.coAsync(phaseObj.url, path, { - username: username, password: password + + return new Promise(function (resolve, reject) { + var childProcess = SVN.co(phaseObj.url, path, { + username: username, password: password + }, function (err) { + if (!err) { + Util.indicator.stop(); + log(name + ' 设置成功!', 'success'); + resolve(); + } + }); + + childProcess.stderr.on('data', function (data) { + if (!_this.hasError) { + reject(); + childProcess.kill(); + _this.hasError = true; + _this.error(data.toString()); + } + }); }); + }))); - Util.indicator.stop(); - log(name + ' 设置成功!', 'success'); - return this.checkoutSource(username, password); - } else { - return this.installDependencies(); - } + return this.installDependencies(); }) }, { key: 'installDependencies', value: _bluebird.coroutine(function* () { - var deptPath = this._path + DIR_NODEMODULES; - yield FS.mkdirAsync(deptPath); + var deptPath = this._path + DIR_NEST; return new Promise(function (resolve) { NPM.load({}, function (err, npm) { @@ -79,10 +93,17 @@ var Setup = (function () { }); }); }) + }, { + key: 'error', + value: function error(msg) { + Util.indicator.stop(); + log('下载源码失败,以下为 svn 打印的错误消息', 'error'); + log(msg); + } }]); return Setup; })(); module.exports = Setup; -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUvc2V0dXAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxJQUFJLE9BQU8sR0FBRyxPQUFPLENBQUUsVUFBVSxDQUFFO0lBQy9CLEVBQUUsR0FBUSxPQ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3RydW5rLycsXG4gICAgZGlyOiBESVJfTkVTVFxufSwge1xuICAgIG5hbWU6ICdBcHBzJyxcbiAgICB1cmw6ICdodHRwOi8vc3ZuLm1laWxpc2h1by5jb20vcmVwb3MvbWVpbGlzaHVvL2ZleC91c2VyL3RydW5rLycsXG4gICAgZGlyOiBESVJfQVBQU1xufSBdXG5cbmNsYXNzIFNldHVwIHtcbiAgICBpbml0KCBwYXRoICkge1xuICAgICAgICB0aGlzLl9wYXRoID0gcGF0aFxuICAgICAgICByZXR1cm4gRlMubWtkaXJBc3luYyggcGF0aCApXG4gICAgfVxuXG4gICAgYXN5bmMgY2hlY2tvdXRTb3VyY2UoIHVzZXJuYW1lLCBwYXNzd29yZCApIHtcbiAgICAgICAgbGV0IHBoYXNlT2JqID0gcGhhc2VzLnNoaWZ0KCksXG4gICAgICAgICAgICBuYW1lLCBwYXRoXG5cbiAgICAgICAgaWYgKCBwaGFzZU9iaiApIHtcbiAgICAgICAgICAgIG5hbWUgPSBwaGFzZU9iai5uYW1lXG4gICAgICAgICAgICBwYXRoID0gdGhpcy5fcGF0aCArIHBoYXNlT2JqLmRpclxuICAgICAgICAgICAgbG9nKCBgXFxu5Yid5aeL5YyWICR7bmFtZX0g5paH5Lu25aS5YCApXG4gICAgICAgICAgICBVdGlsLmluZGljYXRvci5zdGFydCgpXG5cbiAgICAgICAgICAgIGF3YWl0IEZTLm1rZGlyQXN5bmMoIHBhdGggKVxuICAgICAgICAgICAgYXdhaXQgU1ZOLmNvQXN5bmMoIHBoYXNlT2JqLnVybCwgcGF0aCwge1xuICAgICAgICAgICAgICAgIHVzZXJuYW1lLCBwYXNzd29yZFxuICAgICAgICAgICAgfSApXG5cbiAgICAgICAgICAgIFV0aWwuaW5kaWNhdG9yLnN0b3AoKVxuICAgICAgICAgICAgbG9nKCBgJHtuYW1lfSDorr7nva7miJDlip8hYCwgJ3N1Y2Nlc3MnIClcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNoZWNrb3V0U291cmNlKCB1c2VybmFtZSwgcGFzc3dvcmQgKVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuaW5zdGFsbERlcGVuZGVuY2llcygpXG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBhc3luYyBpbnN0YWxsRGVwZW5kZW5jaWVzKCkge1xuICAgICAgICBsZXQgZGVwdFBhdGggPSB0aGlzLl9wYXRoICsgRElSX05PREVNT0RVTEVTXG4gICAgICAgIGF3YWl0IEZTLm1rZGlyQXN5bmMoIGRlcHRQYXRoIClcblxuICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoIHJlc29sdmUgPT4ge1xuICAgICAgICAgICAgTlBNLmxvYWQoIHt9LCBmdW5jdGlvbiggZXJyLCBucG0gKSB7XG4gICAgICAgICAgICAgICAgbnBtLmNvbW1hbmRzLmluc3RhbGwoIGRlcHRQYXRoLCBERVBFTkRFTkNJRVMsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbG9nKCAnXFxu5L6d6LWW5bqT5a6J6KOF5oiQ5YqfIScsICdzdWNjZXNzJyApXG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUoKVxuICAgICAgICAgICAgICAgIH0gKVxuICAgICAgICAgICAgfSApXG4gICAgICAgIH0gKVxuICAgIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBTZXR1cFxuIl19 \ No newline at end of file +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUvc2V0dXAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7QUFBQSxJQUFJLE9BQU8sR0FBRyxPQUFPLENBQUUsVUFBVSxDQUFFO0lBQy9CLEVBQUUsR0FBUSxPQUFPLENBQUMsWUFBWSxDQUFFLE9BQU8sQ0FBRSxJQUFJLENBQUUsQ0FBRTtJQUNqRCxHQUFHLEdBQU8sT0FBTyxDQUFDLFlBQVksQ0FBRSxPQUFPLENB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gICAgICAgICAgICBwYXRoID0gdGhpcy5fcGF0aCArIHBoYXNlT2JqLmRpclxuICAgICAgICAgICAgbG9nKCBgXFxu5Yid5aeL5YyWICR7bmFtZX0g5paH5Lu25aS5YCApXG4gICAgICAgICAgICBVdGlsLmluZGljYXRvci5zdGFydCgpXG5cbiAgICAgICAgICAgIGF3YWl0IEZTLm1rZGlyQXN5bmMoIHBhdGggKVxuXG4gICAgICAgICAgICByZXR1cm4gbmV3IFByb21pc2UoICggcmVzb2x2ZSwgcmVqZWN0ICkgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBjaGlsZFByb2Nlc3MgPSBTVk4uY28oIHBoYXNlT2JqLnVybCwgcGF0aCwge1xuICAgICAgICAgICAgICAgICAgICB1c2VybmFtZSwgcGFzc3dvcmRcbiAgICAgICAgICAgICAgICB9LCBlcnIgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoICFlcnIgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBVdGlsLmluZGljYXRvci5zdG9wKClcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyggYCR7bmFtZX0g6K6+572u5oiQ5YqfIWAsICdzdWNjZXNzJyApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXNvbHZlKClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gKVxuXG4gICAgICAgICAgICAgICAgY2hpbGRQcm9jZXNzLnN0ZGVyci5vbiggJ2RhdGEnLCBkYXRhID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCAhdGhpcy5oYXNFcnJvciApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdCgpXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGlsZFByb2Nlc3Mua2lsbCgpXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmhhc0Vycm9yID0gdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5lcnJvciggZGF0YS50b1N0cmluZygpIClcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gKVxuICAgICAgICAgICAgfSApXG4gICAgICAgIH0gKSApXG5cbiAgICAgICAgcmV0dXJuIHRoaXMuaW5zdGFsbERlcGVuZGVuY2llcygpXG4gICAgfVxuXG4gICAgYXN5bmMgaW5zdGFsbERlcGVuZGVuY2llcygpIHtcbiAgICAgICAgbGV0IGRlcHRQYXRoID0gdGhpcy5fcGF0aCArIERJUl9ORVNUXG5cbiAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKCByZXNvbHZlID0+IHtcbiAgICAgICAgICAgIE5QTS5sb2FkKCB7fSwgZnVuY3Rpb24oIGVyciwgbnBtICkge1xuICAgICAgICAgICAgICAgIG5wbS5jb21tYW5kcy5pbnN0YWxsKCBkZXB0UGF0aCwgREVQRU5ERU5DSUVTLCAoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGxvZyggJ1xcbuS+nei1luW6k+WuieijheaIkOWKnyEnLCAnc3VjY2VzcycgKVxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKClcbiAgICAgICAgICAgICAgICB9IClcbiAgICAgICAgICAgIH0gKVxuICAgICAgICB9IClcbiAgICB9XG5cbiAgICBlcnJvciggbXNnICkge1xuICAgICAgICBVdGlsLmluZGljYXRvci5zdG9wKClcbiAgICAgICAgbG9nKCAn5LiL6L295rqQ56CB5aSx6LSl77yM5Lul5LiL5Li6IHN2biDmiZPljbDnmoTplJnor6/mtojmga8nLCAnZXJyb3InIClcbiAgICAgICAgbG9nKCBtc2cgKVxuICAgIH1cbn1cblxubW9kdWxlLmV4cG9ydHMgPSBTZXR1cFxuIl19 \ No newline at end of file diff --git a/package.json b/package.json index e0029c3..dd2a4af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cage", - "version": "1.2.0", + "version": "1.2.4", "description": "whornbill environment utility.", "bin": "bin/index.js", "keywords": [