[add] 熱更新
This commit is contained in:
35
packages/hot-update-tools/CommonIssue.md
Normal file
35
packages/hot-update-tools/CommonIssue.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# 常见问题
|
||||
## 说明
|
||||
这里是作者热更新过程中遇到的一些问题,仅供参考
|
||||
|
||||
### 局域网测试时,为啥我的热更新请求地址是bogon(127.0.0.1)
|
||||

|
||||
- 导致原因
|
||||
- 开发环境所在的局域网路由器可能设置了ip虚拟化导致这个问题
|
||||
- 此时你可以ping一下同局域网的电脑,如果和下图一样,主机ip为bogon,那么很有可能是ip虚拟化导致看不到主机名字
|
||||

|
||||
- 解决办法:
|
||||
- 可以发布到公网测试下,如果在公网环境仍然存在这个问题,那么很有可能就是代码的问题!
|
||||
- 如果仍然想在局域网环境测试,Windows的话,务必确认已经关闭本机防火墙,再次尝试
|
||||
### 热更新黑屏,报错如图
|
||||

|
||||
尝试着使用gradle:2.3.0 也许能够解决问题
|
||||
文件地址: proj.android-studio/build.gradle
|
||||
```
|
||||
classpath 'com.android.tools.build:gradle:2.3.0'
|
||||
```
|
||||
|
||||
### 插件全局安装目录在哪里?
|
||||
- 在win上
|
||||
```
|
||||
C:\Users\用户名\.CocosCreator\packages
|
||||
```
|
||||
比如
|
||||
```
|
||||
C:\Users\Administrator\.CocosCreator\packages
|
||||
```
|
||||
- mac上
|
||||
```
|
||||
~/.CocosCreator
|
||||
```
|
||||
|
81
packages/hot-update-tools/README.md
Normal file
81
packages/hot-update-tools/README.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# hot-update-tools
|
||||
## 工具说明
|
||||
本工具仅仅是对官方的热更新方案的一个可视化解决方案,可以帮助你快速生成project.manifest和version.manifest文件,并且提供了本地测试的一些常用操作
|
||||
使用前请移步官方热更新教程 https://github.com/cocos-creator/tutorial-hot-update
|
||||
|
||||
|
||||
## 使用说明
|
||||
使用该工具前,必须执行 **项目=>构建** ,插件自身带有构建提示,仅仅作为构建参考!
|
||||

|
||||
|
||||
|
||||
### 界面一共包含4部分,下边是具体的说明
|
||||
#### 第1部分:生成Manifest操作
|
||||
在这部分你可以看到有2个需要你填写的参数:
|
||||
- 版本号:
|
||||
```
|
||||
游戏热更新版本号,这个版本号建议是x.x的格式,例如1.2, 2.01等
|
||||
```
|
||||
|
||||
- 资源服务器url:
|
||||
```
|
||||
游戏热更新资源的服务器url,即客户端发起热更新http请求的url
|
||||
例如你的服务器地址为100.200.300.400,那么这里你需要填写 http://100.200.300.400
|
||||
如果你有目录层级,比如我放在了gameUpdate目录下,那么这里你就需要填写 http://100.200.300.400/gameUpdate
|
||||
也就是说你最终填写的这个url+"project.manifest",能够在浏览器中正确访问,那么这个url就是有效的,不懂得请仔细查阅官方热更新文档
|
||||
```
|
||||
同是你看到有2个参数是不可编辑的
|
||||
- build项目资源文件目录
|
||||
```
|
||||
如果你执行过 项目=>构建 的话,那么在插件启动时,该目录就会默认指向build/jsb-default,如果该目录下的src,res就是热更新要的文件,如果插件启动后,该参数为空,日志会提示需要你构建一下项目
|
||||
```
|
||||
- manifest存储目录
|
||||
```
|
||||
该参数会在插件启动时默认初始化,指向的目录就是最终热更新生成的manifest文件存放处,该参数对于开发者是透明,避免参数过多,造成混淆
|
||||
```
|
||||
#### 第2部分:检测当前游戏的状态
|
||||
开发这个功能原因:
|
||||
- **经常看到其他人在填写版本号的时候,填写的很随意,不知道当前游戏版本号是多少,很容易填写的版本号比当前运行游戏的版本号要低,然后反馈给我说游戏热更新不能用**
|
||||
|
||||
在这个界面里更方便的查看当前项目里面的版本信息
|
||||
- 项目中使用的manifest
|
||||
- package url
|
||||
- 游戏版本号
|
||||
|
||||
需要注意的是
|
||||
**如果项目中的manifest文件发生变动,该插件不会主动刷新,需要手动点击刷新按钮**
|
||||
|
||||
#### 第3部分:方便进行本地测试
|
||||
当第1部分的参数配置ok,点击**生成**按钮,顺利生成manifest文件后,你可能需要进行一下本机的一个简单测试,那么这个功能就是为此开发的
|
||||
- 使用前请先指定本地的server物理路径
|
||||
- 部署
|
||||
```
|
||||
该操作会将生成的manifest文件,src,res,三部分文件一同拷贝到指定的server路径里
|
||||
```
|
||||
- 清理模拟器
|
||||
```
|
||||
该操作会删除creator自带模拟器的热更新缓存
|
||||
windows下为:creator\resources\cocos2d-x\simulator\win32\remote-asset
|
||||
```
|
||||
|
||||
#### 第4部分: 日志
|
||||
这里显示了一些插件的操作提示,如果使用过程中出现问题,请耐心阅读提示,也许能够得到帮助
|
||||
#### 最后
|
||||
工具仅仅是原理的一个友好帮助,在使用的过程中,还是希望使用者能够对官方的热更新文档进行仔细的阅读,这样才能更加透彻的理解和使用该工具.
|
||||
|
||||
|
||||
## 如何导出热更新资源
|
||||
有2种方式:
|
||||
- 1.插件的部署操作里面,你可以指定一个目录,该操作会将热更新的所有资源放到那个目录里面,你可以手动压缩这里的文件.
|
||||
- 2.插件在执行**生成**操作的时候,会在 **项目目录/packVersion/** 下生成一个包含版本号的zip包,比如:ver_1.1.zip, 这个压缩文件就是你需要的热更新资源包
|
||||
|
||||
## 关于
|
||||
- 该工具是自己游戏开发生涯中的一个小积累
|
||||
- 如果你喜欢,请告诉你的小伙伴,
|
||||
- 如果不喜欢,请告诉我哪里不好(企鹅 774177933),或者直接在Issues里面提问,帮助我完善它
|
||||
|
||||
## 其他文档
|
||||
[更新记录](UPDATE.md)
|
||||
[常见问题](CommonIssue.md)
|
||||
## QQ打赏:
|
||||

|
27
packages/hot-update-tools/UPDATE.md
Normal file
27
packages/hot-update-tools/UPDATE.md
Normal file
@@ -0,0 +1,27 @@
|
||||
## 简介
|
||||
- 本工具仅仅是对官方的热更新方案的一个可视化解决方案,可以帮助你快速生成project.manifest和version.manifest文件,并且提供了本地测试的一些常用操作
|
||||
- 使用前请移步官方热更新教程 https://github.com/cocos-creator/tutorial-hot-update
|
||||
|
||||
## 使用说明
|
||||
- 详细的说明使用文档请前往
|
||||
https://github.com/tidys/CocosCreatorPlugins/tree/master/packages/hot-update-tools
|
||||
|
||||
## 帮助
|
||||
- 使用过程中如果遇到任何问题,欢迎加入QQ群224756137
|
||||
## 更新内容
|
||||
- [2017/06/12]
|
||||
- 修复MD5计算不一致,导致更新失败
|
||||
- 感谢反馈:http://forum.cocos.com/t/bug/47530
|
||||
|
||||
- [2017/12/10]
|
||||
- 修复报错: too many open files
|
||||
- 感谢反馈: http://forum.cocos.com/t/1-6-2-too-many-open-files/54221
|
||||
|
||||
- [2018/01/04]
|
||||
- 在<生成Manifest配置>中增加了**资源服务器url配置历史**,方便多版本配置
|
||||
- **资源服务器url** 中追加显示version,如果url存在问题,则不显示版本号
|
||||
|
||||
- [2018/01/06]
|
||||
- 增加功能:如果再次使用工具未构建项目,点击生成的时候,提示构建项目!
|
||||
- [2018/01/08]
|
||||
- [增加] 生成manifest的同时,在 **项目目录/packVersion** 下生成该版本的热更资源包
|
128
packages/hot-update-tools/core/CfgUtil.js
Normal file
128
packages/hot-update-tools/core/CfgUtil.js
Normal file
@@ -0,0 +1,128 @@
|
||||
let fs = require('fire-fs');
|
||||
let path = require('fire-path');
|
||||
let electron = require('electron');
|
||||
let FileUtil = Editor.require("packages://hot-update-tools/core/FileUtil");
|
||||
|
||||
|
||||
let self = module.exports = {
|
||||
cfgData: {
|
||||
version: "",
|
||||
serverRootDir: "",
|
||||
resourceRootDir: "",
|
||||
genManifestDir: "",
|
||||
genProjectManifestFile: "",
|
||||
localServerPath: "",
|
||||
|
||||
hotAddressArray: [],
|
||||
buildTime: null,// 构建时间,全部保存int值
|
||||
genTime: null,// manifest生成时间
|
||||
genVersion: null,// manifest版本
|
||||
},
|
||||
updateBuildTimeByMain(time) {
|
||||
// 在main.js中调用electron中没有remote属性
|
||||
// Editor.log(electron.app.getPath('userData'));
|
||||
let cfgPath = this._getAppCfgPath();
|
||||
if (fs.existsSync(cfgPath)) {
|
||||
let data = fs.readFileSync(cfgPath, 'utf-8');
|
||||
let json = JSON.parse(data);
|
||||
json.buildTime = time;
|
||||
json.genTime = time;
|
||||
fs.writeFileSync(cfgPath, JSON.stringify(json));
|
||||
} else {
|
||||
Editor.log("热更新配置文件不存在: " + cfgPath);
|
||||
}
|
||||
},
|
||||
updateBuildTime(time) {
|
||||
this.cfgData.buildTime = time;
|
||||
this.cfgData.genTime = time;
|
||||
this._save();
|
||||
},
|
||||
updateGenTime(time, version) {
|
||||
this.cfgData.genTime = time;
|
||||
this.cfgData.genVersion = version;
|
||||
this._save();
|
||||
},
|
||||
// 获取构建时间生成时间
|
||||
getBuildTimeGenTime() {
|
||||
let ret = { buildTime: null, genTime: null };
|
||||
let cfgPath = this._getAppCfgPath();
|
||||
if (fs.existsSync(cfgPath)) {
|
||||
let data = fs.readFileSync(cfgPath, 'utf-8');
|
||||
let json = JSON.parse(data);
|
||||
ret.buildTime = json.buildTime;
|
||||
ret.genTime = json.genTime;
|
||||
this.cfgData.buildTime = json.buildTime;
|
||||
this.cfgData.genTime = json.genTime;
|
||||
}
|
||||
return ret;
|
||||
},
|
||||
saveConfig(data) {
|
||||
this.cfgData.version = data.version;
|
||||
this.cfgData.genProjectManifestFile = data.genProjectManifestFile;
|
||||
this.cfgData.serverRootDir = data.serverRootDir;
|
||||
this.cfgData.resourceRootDir = data.resourceRootDir;
|
||||
this.cfgData.localServerPath = data.localServerPath;
|
||||
this.cfgData.hotAddressArray = data.hotAddressArray;
|
||||
this._save();
|
||||
},
|
||||
_save() {
|
||||
let configFilePath = self._getAppCfgPath();
|
||||
let ret = fs.writeFileSync(configFilePath, JSON.stringify(this.cfgData));
|
||||
console.log("保存配置成功!");
|
||||
},
|
||||
cleanConfig() {
|
||||
fs.unlink(this._getAppCfgPath());
|
||||
},
|
||||
|
||||
// manifest文件包地址
|
||||
getMainFestDir() {
|
||||
let userDataPath = electron.remote.app.getPath('userData');
|
||||
return path.join(userDataPath, "hot-update-tools-manifestOutPut");
|
||||
//输出文件不能存在在插件目录下,否则会造成插件刷新
|
||||
// return Editor.url('packages://hot-update-tools/outPut');
|
||||
},
|
||||
// 获取打包目录地址,一般放在项目目录下
|
||||
getPackZipDir() {
|
||||
let userDataPath = electron.remote.app.getPath('userData');
|
||||
return path.join(this._getAppRootPath(), "packVersion");
|
||||
},
|
||||
_getAppRootPath() {
|
||||
let lib = Editor.libraryPath;
|
||||
return lib.substring(0, lib.length - 7);
|
||||
},
|
||||
_getAppCfgPath() {
|
||||
let userDataPath = null;
|
||||
if (electron.remote) {
|
||||
userDataPath = electron.remote.app.getPath('userData');
|
||||
} else {
|
||||
userDataPath = electron.app.getPath('userData');
|
||||
}
|
||||
|
||||
let tar = Editor.libraryPath;
|
||||
tar = tar.replace(/\\/g, '-');
|
||||
tar = tar.replace(/:/g, '-');
|
||||
tar = tar.replace(/\//g, '-');
|
||||
return path.join(userDataPath, "hot-update-tools-cfg-" + tar + ".json");
|
||||
// return Editor.url('packages://hot-update-tools/save/cfg.json');
|
||||
},
|
||||
initCfg(cb) {
|
||||
let configFilePath = this._getAppCfgPath();
|
||||
let b = FileUtil.isFileExit(configFilePath);
|
||||
if (b) {
|
||||
console.log("cfg path: " + configFilePath);
|
||||
fs.readFile(configFilePath, 'utf-8', function (err, data) {
|
||||
if (!err) {
|
||||
let saveData = JSON.parse(data.toString());
|
||||
self.cfgData = saveData;
|
||||
if (cb) {
|
||||
cb(saveData);
|
||||
}
|
||||
}
|
||||
}.bind(self));
|
||||
} else {
|
||||
if (cb) {
|
||||
cb(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
136
packages/hot-update-tools/core/FileUtil.js
Normal file
136
packages/hot-update-tools/core/FileUtil.js
Normal file
@@ -0,0 +1,136 @@
|
||||
let fs = require("fire-fs");
|
||||
let path = require("fire-path");
|
||||
|
||||
let self = module.exports = {
|
||||
getDirAllFiles(dirPath, result) {
|
||||
let files = fs.readdirSync(dirPath);
|
||||
files.forEach((val, index) => {
|
||||
let fPath = path.join(dirPath, val);
|
||||
let stats = fs.statSync(fPath);
|
||||
if (stats.isDirectory()) {
|
||||
this.getDirAllFiles(fPath, result);
|
||||
} else if (stats.isFile()) {
|
||||
result.push(fPath);
|
||||
}
|
||||
});
|
||||
},
|
||||
getFileString(fileList, options) {
|
||||
let curIndex = 0;
|
||||
let totalIndex = fileList.length;
|
||||
let str = {};
|
||||
for (let key in fileList) {
|
||||
let filePath = fileList[key];
|
||||
let b = this._isFileExit(filePath);
|
||||
if (b) {
|
||||
fs.readFile(filePath, 'utf-8', function (err, data) {
|
||||
if (!err) {
|
||||
self._collectString(data, str);
|
||||
} else {
|
||||
console.log("error: " + filePath);
|
||||
}
|
||||
self._onCollectStep(filePath, ++curIndex, totalIndex, str, options);
|
||||
})
|
||||
} else {
|
||||
self._onCollectStep(filePath, ++curIndex, totalIndex, str, options);
|
||||
}
|
||||
}
|
||||
},
|
||||
_onCollectStep(filePath, cur, total, str, data) {
|
||||
if (data && data.stepCb) {
|
||||
data.stepCb(filePath, cur, total);
|
||||
}
|
||||
if (cur >= total) {
|
||||
self._onCollectOver(str, data);
|
||||
}
|
||||
},
|
||||
_onCollectOver(collectObjArr, data) {
|
||||
let strArr = [];
|
||||
let str = "";
|
||||
for (let k in collectObjArr) {
|
||||
str += k;
|
||||
strArr.push(k);
|
||||
}
|
||||
// console.log("一共有" + strArr.length + "个字符, " + strArr);
|
||||
console.log("一共有" + strArr.length + "个字符");
|
||||
if (data && data.compCb) {
|
||||
data.compCb(str);
|
||||
}
|
||||
},
|
||||
mkDir(path) {
|
||||
try {
|
||||
fs.mkdirSync(path);
|
||||
} catch (e) {
|
||||
if (e.code !== 'EEXIST') throw e;
|
||||
}
|
||||
},
|
||||
isFileExit(file) {
|
||||
try {
|
||||
fs.accessSync(file, fs.F_OK);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
_collectString(data, collectObject) {
|
||||
for (let i in data) {
|
||||
let char = data.charAt(i);
|
||||
if (collectObject[char]) {
|
||||
collectObject[char]++;
|
||||
} else {
|
||||
collectObject[char] = 1;
|
||||
}
|
||||
}
|
||||
},
|
||||
emptyDir(rootFile) {
|
||||
//删除所有的文件(将所有文件夹置空)
|
||||
let emptyDir = function (fileUrl) {
|
||||
let files = fs.readdirSync(fileUrl);//读取该文件夹
|
||||
for (let k in files) {
|
||||
let filePath = path.join(fileUrl, files[k]);
|
||||
let stats = fs.statSync(filePath);
|
||||
if (stats.isDirectory()) {
|
||||
emptyDir(filePath);
|
||||
} else {
|
||||
fs.unlinkSync(filePath);
|
||||
console.log("删除文件:" + filePath);
|
||||
}
|
||||
}
|
||||
};
|
||||
//删除所有的空文件夹
|
||||
let rmEmptyDir = function (fileUrl) {
|
||||
let files = fs.readdirSync(fileUrl);
|
||||
if (files.length > 0) {
|
||||
for (let k in files) {
|
||||
let rmDir = path.join(fileUrl, files[k]);
|
||||
rmEmptyDir(rmDir);
|
||||
}
|
||||
if (fileUrl !== rootFile) {// 不删除根目录
|
||||
fs.rmdirSync(fileUrl);
|
||||
console.log('删除空文件夹' + fileUrl);
|
||||
}
|
||||
} else {
|
||||
if (fileUrl !== rootFile) {// 不删除根目录
|
||||
fs.rmdirSync(fileUrl);
|
||||
console.log('删除空文件夹' + fileUrl);
|
||||
}
|
||||
}
|
||||
};
|
||||
emptyDir(rootFile);
|
||||
rmEmptyDir(rootFile);
|
||||
},
|
||||
/*
|
||||
is_fileType($('#uploadfile').val(), 'doc,pdf,txt,wps,odf,md,png,gif,jpg')
|
||||
* */
|
||||
is_fileType(filename, types) {
|
||||
types = types.split(',');
|
||||
let pattern = '\.(';
|
||||
for (let i = 0; i < types.length; i++) {
|
||||
if (0 !== i) {
|
||||
pattern += '|';
|
||||
}
|
||||
pattern += types[i].trim();
|
||||
}
|
||||
pattern += ')$';
|
||||
return new RegExp(pattern, 'i').test(filename);
|
||||
}
|
||||
}
|
141
packages/hot-update-tools/core/HttpService.js
Normal file
141
packages/hot-update-tools/core/HttpService.js
Normal file
@@ -0,0 +1,141 @@
|
||||
"use strict";
|
||||
/**
|
||||
* 处理内部逻辑发出HTTP请求
|
||||
*/
|
||||
|
||||
var http = require("http");
|
||||
var https = require('https');
|
||||
var qs = require('querystring');
|
||||
|
||||
var HttpService = function(){
|
||||
//todo
|
||||
};
|
||||
|
||||
var pro = HttpService.prototype;
|
||||
|
||||
//发送HTTP GET请求
|
||||
pro.sendHttpGetReq = function(hostName,port,path,param,cb){
|
||||
console.log("sendHttpGetReq");
|
||||
|
||||
var content = qs.stringify(param);
|
||||
console.log("content:",content);
|
||||
|
||||
var options = {
|
||||
hostname: hostName,
|
||||
port: port,
|
||||
path: path+"?"+content,
|
||||
method: 'GET'
|
||||
};
|
||||
|
||||
console.log(options);
|
||||
|
||||
//todo 请求超时timer
|
||||
var req = http.request(options, function (res) {
|
||||
console.log('STATUS: ' + res.statusCode);
|
||||
res.setEncoding('utf8');
|
||||
res.on('data', function (chunk) {
|
||||
cb(null,JSON.parse(chunk));
|
||||
});
|
||||
});
|
||||
|
||||
req.on('error', function (e) {
|
||||
console.log('problem with request: ' + e.message);
|
||||
cb(new Error("err"),null)
|
||||
});
|
||||
|
||||
req.end();
|
||||
};
|
||||
//发送HTTPS GET请求
|
||||
pro.sendHttpsGetReq = function(hostName,port,path,param,cb){
|
||||
|
||||
console.log("sendHttpGetReq");
|
||||
|
||||
var content = qs.stringify(param);
|
||||
|
||||
https.get(hostName + ":" + port + path + "?"+content, function(res){
|
||||
console.log('statusCode: ', res.statusCode);
|
||||
res.on('data', function(d){
|
||||
cb(null,JSON.parse(d.toString()))
|
||||
});
|
||||
|
||||
}).on('error',function(e) {
|
||||
console.error(e);
|
||||
cb(e)
|
||||
});
|
||||
};
|
||||
//发送HTTP POST请求
|
||||
pro.sendHttpPostReq = function(hostName,port,path,param,cb){
|
||||
|
||||
console.log("sendHttpPostReq");
|
||||
|
||||
var content = qs.stringify(param);
|
||||
console.log("content:",content);
|
||||
|
||||
var options = {
|
||||
hostname: hostName,
|
||||
port: port,
|
||||
path: path,
|
||||
method: 'POST',
|
||||
headers: {
|
||||
"Content-Type": 'application/x-www-form-urlencoded',
|
||||
"Content-Length": content.length
|
||||
}
|
||||
};
|
||||
//todo 请求超时timer
|
||||
var req = http.request(options, function (res) {
|
||||
console.log('STATUS: ' + res.statusCode);
|
||||
if (res.statusCode == 200) {
|
||||
res.setEncoding('utf8');
|
||||
var data = "";
|
||||
res.on('data', function (chunk) {
|
||||
data += chunk;
|
||||
});
|
||||
res.on('end', function () {
|
||||
console.log(data);
|
||||
cb(null,JSON.parse(data));
|
||||
});
|
||||
}else{
|
||||
res.send(500, "error");
|
||||
cb(new Error("err"),null)
|
||||
}
|
||||
});
|
||||
|
||||
req.on('error', function (e) {
|
||||
cb(new Error("err"),null)
|
||||
});
|
||||
|
||||
req.write(content);
|
||||
|
||||
req.end();
|
||||
|
||||
};
|
||||
//发送HTTPS POST请求
|
||||
pro.sendHttpsPostReq = function(hostName,port,path,param,cb){
|
||||
|
||||
console.log("sendHttpsPostReq");
|
||||
var content = qs.stringify(param);
|
||||
|
||||
path = path + "?" + content;
|
||||
console.log("path=>",path);
|
||||
|
||||
var options = {
|
||||
hostname: hostName,
|
||||
port: port || 443,
|
||||
path: path || '/',
|
||||
method: 'POST'
|
||||
};
|
||||
|
||||
https.request(options,function(res){
|
||||
console.log('statusCode: ', res.statusCode);
|
||||
res.on('data', function(d){
|
||||
cb(null,JSON.parse(d.toString()))
|
||||
});
|
||||
|
||||
}).on('error',function(e) {
|
||||
console.error(e);
|
||||
cb(e)
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
module.exports = new HttpService();
|
3
packages/hot-update-tools/i18n/en.js
Normal file
3
packages/hot-update-tools/i18n/en.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports={
|
||||
title:'hotUpdateTools',
|
||||
};
|
3
packages/hot-update-tools/i18n/zh.js
Normal file
3
packages/hot-update-tools/i18n/zh.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports={
|
||||
title:'热更新工具',
|
||||
}
|
57
packages/hot-update-tools/mail/Mail.js
Normal file
57
packages/hot-update-tools/mail/Mail.js
Normal file
@@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
let NodeMailer = Editor.require('packages://hot-update-tools/node_modules/nodemailer');
|
||||
let Fs = require('fire-fs');
|
||||
|
||||
module.exports = {
|
||||
_service: "qq",
|
||||
_user: "xu_yanfeng@qq.com",
|
||||
_pass: "fizyosflryzlbege",
|
||||
|
||||
setMailServiceInfo(user, pass) {
|
||||
this._user = user;
|
||||
this._pass = pass;
|
||||
},
|
||||
isArray(object) {
|
||||
return object && typeof object === 'object' && Array == object.constructor;
|
||||
},
|
||||
sendMail(version, content, people, sendCb) {
|
||||
let transporter = NodeMailer.createTransport({
|
||||
service: this._service,
|
||||
auth: {
|
||||
user: this._user,
|
||||
pass: this._pass, //授权码,通过QQ获取
|
||||
}
|
||||
});
|
||||
|
||||
let sendPeople = ['xu_yanfeng@126.com'];
|
||||
if (this.isArray(people)) {
|
||||
for (let k in people) {
|
||||
sendPeople.push(people[k]);
|
||||
}
|
||||
} else if (typeof people === "string") {
|
||||
sendPeople.push(people);
|
||||
}
|
||||
let data = Fs.readFileSync(Editor.url('packages://hot-update-tools/mail/MailTemp.html', 'utf8')).toString();
|
||||
if (data.indexOf('%version%') !== -1) {
|
||||
data = data.replace("%version%", version);
|
||||
}
|
||||
if (data.indexOf('%content%') !== -1) {
|
||||
data = data.replace("%content%", content);
|
||||
}
|
||||
let mailOptions = {
|
||||
from: this._user, // 发送者
|
||||
to: sendPeople.toString(), // 接受者,可以同时发送多个,以逗号隔开
|
||||
subject: '测试版本 发布通知-v' + version, // 标题
|
||||
text: 'Hello world', // 文本
|
||||
html: data,
|
||||
};
|
||||
transporter.sendMail(mailOptions, function (err, info) {
|
||||
if (sendCb) {
|
||||
sendCb();
|
||||
}
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
6
packages/hot-update-tools/mail/MailTemp.html
Normal file
6
packages/hot-update-tools/mail/MailTemp.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<h2>版本:%version%</h2>
|
||||
<h2>更新内容</h2>
|
||||
<h3>%content%</h3>
|
||||
<h3>
|
||||
<a href="https://fir.im/mdgame?release_id=5a4c41d1959d69315a0002a6">基础热更包下载</a>
|
||||
</h3>
|
66
packages/hot-update-tools/main.js
Normal file
66
packages/hot-update-tools/main.js
Normal file
@@ -0,0 +1,66 @@
|
||||
module.exports = {
|
||||
load() {
|
||||
// 当 package 被正确加载的时候执行
|
||||
},
|
||||
|
||||
unload() {
|
||||
// 当 package 被正确卸载的时候执行
|
||||
},
|
||||
|
||||
messages: {
|
||||
'showPanel'() {
|
||||
Editor.Panel.open('hot-update-tools');
|
||||
},
|
||||
'test'(event, args) {
|
||||
console.log("1111111");
|
||||
Editor.log(args);
|
||||
Editor.Ipc.sendToPanel('hot-update-tools', 'hot-update-tools:onBuildFinished');
|
||||
},
|
||||
// 当插件构建完成的时候触发
|
||||
'editor:build-finished': function (event, target) {
|
||||
let Fs = require("fire-fs");
|
||||
let Path = require("fire-path");
|
||||
|
||||
Editor.log("[HotUpdateTools] build platform:" + target.platform);
|
||||
if (target.platform === "web-mobile" || target.platform === "web-desktop") {
|
||||
Editor.log("[HotUpdateTools] don't need update main.js");
|
||||
} else {
|
||||
let root = Path.normalize(target.dest);
|
||||
let url = Path.join(root, "main.js");
|
||||
Fs.readFile(url, "utf8", function (err, data) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
let newStr =
|
||||
"(function () { \n" +
|
||||
"\n" +
|
||||
" if (cc && cc.sys.isNative) { \n" +
|
||||
" var hotUpdateSearchPaths = cc.sys.localStorage.getItem('HotUpdateSearchPaths'); \n" +
|
||||
" if (hotUpdateSearchPaths) { \n" +
|
||||
" jsb.fileUtils.setSearchPaths(JSON.parse(hotUpdateSearchPaths)); \n" +
|
||||
" console.log('[main.js] 热更新SearchPath: ' + JSON.parse(hotUpdateSearchPaths));\n" +
|
||||
" }else {\n" +
|
||||
" console.log('[main.js] 未获取到热更新资源路径!');\n" +
|
||||
" }\n" +
|
||||
" }else {\n" +
|
||||
" console.log('[main.js] 不是native平台!');\n" +
|
||||
" }\n";
|
||||
|
||||
let newData = data.replace("(function () {", newStr);
|
||||
Fs.writeFile(url, newData, function (error) {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
Editor.log("[HotUpdateTools] SearchPath updated in built main.js for hot update");
|
||||
});
|
||||
});
|
||||
}
|
||||
let time = new Date().getTime();
|
||||
// 通知panel更新时间
|
||||
Editor.Ipc.sendToPanel('hot-update-tools', 'hot-update-tools:onBuildFinished', time);
|
||||
// 写入本地
|
||||
let CfgUtil = Editor.require('packages://hot-update-tools/core/CfgUtil.js');
|
||||
CfgUtil.updateBuildTimeByMain(time);
|
||||
}
|
||||
},
|
||||
};
|
822
packages/hot-update-tools/package-lock.json
generated
Normal file
822
packages/hot-update-tools/package-lock.json
generated
Normal file
@@ -0,0 +1,822 @@
|
||||
{
|
||||
"name": "hot-update-tools",
|
||||
"version": "0.0.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"address": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz",
|
||||
"integrity": "sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg=="
|
||||
},
|
||||
"agent-base": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz",
|
||||
"integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==",
|
||||
"requires": {
|
||||
"es6-promisify": "5.0.0"
|
||||
}
|
||||
},
|
||||
"agentkeepalive": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-2.2.0.tgz",
|
||||
"integrity": "sha1-xdG9SxKQCPEWPyNvhuX66iAm4u8="
|
||||
},
|
||||
"ali-oss": {
|
||||
"version": "4.11.4",
|
||||
"resolved": "https://registry.npmjs.org/ali-oss/-/ali-oss-4.11.4.tgz",
|
||||
"integrity": "sha1-S3GfOfbNkVtI/RN4RAEkFAK63Uc=",
|
||||
"requires": {
|
||||
"address": "1.0.3",
|
||||
"agentkeepalive": "2.2.0",
|
||||
"bowser": "1.9.1",
|
||||
"co": "4.6.0",
|
||||
"co-defer": "1.0.0",
|
||||
"co-gather": "0.0.1",
|
||||
"copy-to": "2.0.1",
|
||||
"dateformat": "2.2.0",
|
||||
"debug": "2.6.9",
|
||||
"destroy": "1.0.4",
|
||||
"end-or-error": "1.0.1",
|
||||
"get-ready": "1.0.0",
|
||||
"humanize-ms": "1.2.1",
|
||||
"is-type-of": "1.2.0",
|
||||
"merge-descriptors": "1.0.1",
|
||||
"mime": "1.6.0",
|
||||
"platform": "1.3.4",
|
||||
"sdk-base": "2.0.1",
|
||||
"urllib": "2.25.3",
|
||||
"utility": "1.13.1",
|
||||
"xml2js": "0.4.19"
|
||||
}
|
||||
},
|
||||
"any-promise": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
|
||||
"integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
|
||||
},
|
||||
"ast-types": {
|
||||
"version": "0.10.1",
|
||||
"resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.10.1.tgz",
|
||||
"integrity": "sha512-UY7+9DPzlJ9VM8eY0b2TUZcZvF+1pO0hzMtAyjBYKhOmnvRlqYNYnWdtsMj0V16CGaMlpL0G1jnLbLo4AyotuQ=="
|
||||
},
|
||||
"bowser": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/bowser/-/bowser-1.9.1.tgz",
|
||||
"integrity": "sha512-UXti1JB6oK8hO983AImunnV6j/fqAEeDlPXh99zhsP5g32oLbxJJ6qcOaUesR+tqqhnUVQHlRJyD0dfiV0Hxaw=="
|
||||
},
|
||||
"bytes": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
|
||||
"integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg="
|
||||
},
|
||||
"co": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
|
||||
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
|
||||
},
|
||||
"co-defer": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/co-defer/-/co-defer-1.0.0.tgz",
|
||||
"integrity": "sha1-Pkp4eo7tawoh7ih8CU9+jeDTyBg="
|
||||
},
|
||||
"co-gather": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/co-gather/-/co-gather-0.0.1.tgz",
|
||||
"integrity": "sha1-76NfvvAsn2R9inQLP123MYYlNbw=",
|
||||
"requires": {
|
||||
"co-thread": "0.0.1"
|
||||
}
|
||||
},
|
||||
"co-thread": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/co-thread/-/co-thread-0.0.1.tgz",
|
||||
"integrity": "sha1-V3E/DvS4flWV1PI3Ef/ks7beXnQ="
|
||||
},
|
||||
"content-type": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
|
||||
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
|
||||
},
|
||||
"copy-to": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/copy-to/-/copy-to-2.0.1.tgz",
|
||||
"integrity": "sha1-JoD7uAaKSNCGVrYJgJK9r8kG9KU="
|
||||
},
|
||||
"core-js": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.3.0.tgz",
|
||||
"integrity": "sha1-+rg/uwstjchfpjbEudNMdUIMbWU="
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
},
|
||||
"data-uri-to-buffer": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz",
|
||||
"integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ=="
|
||||
},
|
||||
"dateformat": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.2.0.tgz",
|
||||
"integrity": "sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI="
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"deep-is": {
|
||||
"version": "0.1.3",
|
||||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
|
||||
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ="
|
||||
},
|
||||
"default-user-agent": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/default-user-agent/-/default-user-agent-1.0.0.tgz",
|
||||
"integrity": "sha1-FsRu/cq6PtxF8k8r1IaLAbfCrcY=",
|
||||
"requires": {
|
||||
"os-name": "1.0.3"
|
||||
}
|
||||
},
|
||||
"degenerator": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz",
|
||||
"integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=",
|
||||
"requires": {
|
||||
"ast-types": "0.10.1",
|
||||
"escodegen": "1.9.0",
|
||||
"esprima": "3.1.3"
|
||||
}
|
||||
},
|
||||
"depd": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz",
|
||||
"integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k="
|
||||
},
|
||||
"destroy": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
|
||||
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
|
||||
},
|
||||
"digest-header": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/digest-header/-/digest-header-0.0.1.tgz",
|
||||
"integrity": "sha1-Ecz23uxXZqw3l0TZAcEsuklRS+Y=",
|
||||
"requires": {
|
||||
"utility": "0.1.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"utility": {
|
||||
"version": "0.1.11",
|
||||
"resolved": "https://registry.npmjs.org/utility/-/utility-0.1.11.tgz",
|
||||
"integrity": "sha1-/eYM+bTkdRlHoM9dEEzik2ciZxU=",
|
||||
"requires": {
|
||||
"address": "1.0.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ee-first": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
||||
},
|
||||
"end-or-error": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/end-or-error/-/end-or-error-1.0.1.tgz",
|
||||
"integrity": "sha1-3HpiEP5403L+4kqLSJnb0VVBTcs="
|
||||
},
|
||||
"es6-promise": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.0.2.tgz",
|
||||
"integrity": "sha1-AQ1YWEI6XxGJeWZfRkhqlcbuK7Y="
|
||||
},
|
||||
"es6-promisify": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
|
||||
"integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
|
||||
"requires": {
|
||||
"es6-promise": "4.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"es6-promise": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.2.tgz",
|
||||
"integrity": "sha512-LSas5vsuA6Q4nEdf9wokY5/AJYXry98i0IzXsv49rYsgDGDNDPbqAYR1Pe23iFxygfbGZNR/5VrHXBCh2BhvUQ=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"escape-html": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
|
||||
},
|
||||
"escodegen": {
|
||||
"version": "1.9.0",
|
||||
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.0.tgz",
|
||||
"integrity": "sha512-v0MYvNQ32bzwoG2OSFzWAkuahDQHK92JBN0pTAALJ4RIxEZe766QJPDR8Hqy7XNUy5K3fnVL76OqYAdc4TZEIw==",
|
||||
"requires": {
|
||||
"esprima": "3.1.3",
|
||||
"estraverse": "4.2.0",
|
||||
"esutils": "2.0.2",
|
||||
"optionator": "0.8.2",
|
||||
"source-map": "0.5.7"
|
||||
}
|
||||
},
|
||||
"esprima": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
|
||||
"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM="
|
||||
},
|
||||
"estraverse": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
|
||||
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
|
||||
},
|
||||
"extend": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
|
||||
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
|
||||
},
|
||||
"fast-levenshtein": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
|
||||
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
|
||||
},
|
||||
"file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"ftp": {
|
||||
"version": "0.3.10",
|
||||
"resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
|
||||
"integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=",
|
||||
"requires": {
|
||||
"readable-stream": "1.1.14",
|
||||
"xregexp": "2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"isarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "1.1.14",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
|
||||
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
|
||||
"requires": {
|
||||
"core-util-is": "1.0.2",
|
||||
"inherits": "2.0.3",
|
||||
"isarray": "0.0.1",
|
||||
"string_decoder": "0.10.31"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"get-ready": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/get-ready/-/get-ready-1.0.0.tgz",
|
||||
"integrity": "sha1-+RgX8emt7P6hOlYq38jeiDqzR4I="
|
||||
},
|
||||
"get-uri": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz",
|
||||
"integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==",
|
||||
"requires": {
|
||||
"data-uri-to-buffer": "1.2.0",
|
||||
"debug": "2.6.9",
|
||||
"extend": "3.0.1",
|
||||
"file-uri-to-path": "1.0.0",
|
||||
"ftp": "0.3.10",
|
||||
"readable-stream": "2.0.6"
|
||||
}
|
||||
},
|
||||
"http-errors": {
|
||||
"version": "1.6.2",
|
||||
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz",
|
||||
"integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=",
|
||||
"requires": {
|
||||
"depd": "1.1.1",
|
||||
"inherits": "2.0.3",
|
||||
"setprototypeof": "1.0.3",
|
||||
"statuses": "1.4.0"
|
||||
}
|
||||
},
|
||||
"http-proxy-agent": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz",
|
||||
"integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=",
|
||||
"requires": {
|
||||
"agent-base": "2.1.1",
|
||||
"debug": "2.6.9",
|
||||
"extend": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"agent-base": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
|
||||
"integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
|
||||
"requires": {
|
||||
"extend": "3.0.1",
|
||||
"semver": "5.0.3"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
|
||||
"integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no="
|
||||
}
|
||||
}
|
||||
},
|
||||
"https-proxy-agent": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz",
|
||||
"integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=",
|
||||
"requires": {
|
||||
"agent-base": "2.1.1",
|
||||
"debug": "2.6.9",
|
||||
"extend": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"agent-base": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
|
||||
"integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
|
||||
"requires": {
|
||||
"extend": "3.0.1",
|
||||
"semver": "5.0.3"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
|
||||
"integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no="
|
||||
}
|
||||
}
|
||||
},
|
||||
"humanize-ms": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz",
|
||||
"integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.19",
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz",
|
||||
"integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ=="
|
||||
},
|
||||
"immediate": {
|
||||
"version": "3.0.6",
|
||||
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz",
|
||||
"integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps="
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||
},
|
||||
"ip": {
|
||||
"version": "1.1.5",
|
||||
"resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
|
||||
"integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
|
||||
},
|
||||
"is-class": {
|
||||
"version": "0.0.4",
|
||||
"resolved": "https://registry.npmjs.org/is-class/-/is-class-0.0.4.tgz",
|
||||
"integrity": "sha1-4FdFFwW7NOOePjNZjJOpg3KWtzY="
|
||||
},
|
||||
"is-type-of": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-type-of/-/is-type-of-1.2.0.tgz",
|
||||
"integrity": "sha512-10ezBXuEDp3Fp/jPCaVd4hSrAEj2lPyr1LT7+cWi9HCLd15wbh9X8dJfTDB+ZgkZSCGTG2TF6f61ugI5mSlhDA==",
|
||||
"requires": {
|
||||
"core-util-is": "1.0.2",
|
||||
"is-class": "0.0.4",
|
||||
"isstream": "0.1.2"
|
||||
}
|
||||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
||||
},
|
||||
"isstream": {
|
||||
"version": "0.1.2",
|
||||
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"jquery": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.2.1.tgz",
|
||||
"integrity": "sha1-XE2d5lKvbNCncBVKYxu6ErAVx4c="
|
||||
},
|
||||
"jszip": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/jszip/-/jszip-3.1.5.tgz",
|
||||
"integrity": "sha512-5W8NUaFRFRqTOL7ZDDrx5qWHJyBXy6velVudIzQUSoqAAYqzSh2Z7/m0Rf1QbmQJccegD0r+YZxBjzqoBiEeJQ==",
|
||||
"requires": {
|
||||
"core-js": "2.3.0",
|
||||
"es6-promise": "3.0.2",
|
||||
"lie": "3.1.1",
|
||||
"pako": "1.0.6",
|
||||
"readable-stream": "2.0.6"
|
||||
}
|
||||
},
|
||||
"levn": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
|
||||
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
|
||||
"requires": {
|
||||
"prelude-ls": "1.1.2",
|
||||
"type-check": "0.3.2"
|
||||
}
|
||||
},
|
||||
"lie": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz",
|
||||
"integrity": "sha1-mkNrLMd0bKWd56QfpGmz77dr2H4=",
|
||||
"requires": {
|
||||
"immediate": "3.0.6"
|
||||
}
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "2.7.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
|
||||
"integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI="
|
||||
},
|
||||
"merge-descriptors": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
|
||||
},
|
||||
"mime": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
|
||||
},
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
||||
}
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||
},
|
||||
"mz": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz",
|
||||
"integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==",
|
||||
"requires": {
|
||||
"any-promise": "1.3.0",
|
||||
"object-assign": "4.1.1",
|
||||
"thenify-all": "1.6.0"
|
||||
}
|
||||
},
|
||||
"netmask": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz",
|
||||
"integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU="
|
||||
},
|
||||
"nodemailer": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-4.4.1.tgz",
|
||||
"integrity": "sha512-1bnszJJXatcHJhLpxQ1XMkLDjCjPKvGKMtRQ73FOsoNln3UQjddEQmz6fAwM3aj0GtQ3dQX9qtMHPelz63GU7A=="
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
||||
},
|
||||
"optionator": {
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
|
||||
"integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
|
||||
"requires": {
|
||||
"deep-is": "0.1.3",
|
||||
"fast-levenshtein": "2.0.6",
|
||||
"levn": "0.3.0",
|
||||
"prelude-ls": "1.1.2",
|
||||
"type-check": "0.3.2",
|
||||
"wordwrap": "1.0.0"
|
||||
}
|
||||
},
|
||||
"os-name": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/os-name/-/os-name-1.0.3.tgz",
|
||||
"integrity": "sha1-GzefZINa98Wn9JizV8uVIVwVnt8=",
|
||||
"requires": {
|
||||
"osx-release": "1.1.0",
|
||||
"win-release": "1.1.1"
|
||||
}
|
||||
},
|
||||
"osx-release": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/osx-release/-/osx-release-1.1.0.tgz",
|
||||
"integrity": "sha1-8heRGigTaUmvG/kwiyQeJzfTzWw=",
|
||||
"requires": {
|
||||
"minimist": "1.2.0"
|
||||
}
|
||||
},
|
||||
"pac-proxy-agent": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz",
|
||||
"integrity": "sha512-t57UiJpi5mFLTvjheC1SNSwIhml3+ElNOj69iRrydtQXZJr8VIFYSDtyPi/3ZysA62kD2dmww6pDlzk0VaONZg==",
|
||||
"requires": {
|
||||
"agent-base": "2.1.1",
|
||||
"debug": "2.6.9",
|
||||
"get-uri": "2.0.1",
|
||||
"http-proxy-agent": "1.0.0",
|
||||
"https-proxy-agent": "1.0.0",
|
||||
"pac-resolver": "3.0.0",
|
||||
"raw-body": "2.3.2",
|
||||
"socks-proxy-agent": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"agent-base": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz",
|
||||
"integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=",
|
||||
"requires": {
|
||||
"extend": "3.0.1",
|
||||
"semver": "5.0.3"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz",
|
||||
"integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no="
|
||||
}
|
||||
}
|
||||
},
|
||||
"pac-resolver": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz",
|
||||
"integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==",
|
||||
"requires": {
|
||||
"co": "4.6.0",
|
||||
"degenerator": "1.0.4",
|
||||
"ip": "1.1.5",
|
||||
"netmask": "1.0.6",
|
||||
"thunkify": "2.1.2"
|
||||
}
|
||||
},
|
||||
"pako": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz",
|
||||
"integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg=="
|
||||
},
|
||||
"platform": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.4.tgz",
|
||||
"integrity": "sha1-bw+xftqqSPIUQrOpdcBjEw8cPr0="
|
||||
},
|
||||
"prelude-ls": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
|
||||
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ="
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
||||
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
|
||||
},
|
||||
"proxy-agent": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.2.0.tgz",
|
||||
"integrity": "sha512-cmWjNB7/5pVrYAFAt+6ppLyUAWd4LhWw47hkUISXHAieM5jT2PWjhh1dbpHUEX3lJhWjAqdNGrW8RnUFfLCU9w==",
|
||||
"requires": {
|
||||
"agent-base": "4.2.0",
|
||||
"debug": "2.6.9",
|
||||
"http-proxy-agent": "1.0.0",
|
||||
"https-proxy-agent": "1.0.0",
|
||||
"lru-cache": "2.7.3",
|
||||
"pac-proxy-agent": "2.0.0",
|
||||
"socks-proxy-agent": "3.0.1"
|
||||
}
|
||||
},
|
||||
"qs": {
|
||||
"version": "6.5.1",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz",
|
||||
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A=="
|
||||
},
|
||||
"raw-body": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz",
|
||||
"integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=",
|
||||
"requires": {
|
||||
"bytes": "3.0.0",
|
||||
"http-errors": "1.6.2",
|
||||
"iconv-lite": "0.4.19",
|
||||
"unpipe": "1.0.0"
|
||||
}
|
||||
},
|
||||
"readable-stream": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz",
|
||||
"integrity": "sha1-j5A0HmilPMySh4jaz80Rs265t44=",
|
||||
"requires": {
|
||||
"core-util-is": "1.0.2",
|
||||
"inherits": "2.0.3",
|
||||
"isarray": "1.0.0",
|
||||
"process-nextick-args": "1.0.7",
|
||||
"string_decoder": "0.10.31",
|
||||
"util-deprecate": "1.0.2"
|
||||
}
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
},
|
||||
"sdk-base": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sdk-base/-/sdk-base-2.0.1.tgz",
|
||||
"integrity": "sha1-ukAonovfJy7RHdnql+r5jgNtJMY=",
|
||||
"requires": {
|
||||
"get-ready": "1.0.0"
|
||||
}
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz",
|
||||
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
|
||||
},
|
||||
"setprototypeof": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz",
|
||||
"integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ="
|
||||
},
|
||||
"smart-buffer": {
|
||||
"version": "1.1.15",
|
||||
"resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz",
|
||||
"integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY="
|
||||
},
|
||||
"socks": {
|
||||
"version": "1.1.10",
|
||||
"resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz",
|
||||
"integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=",
|
||||
"requires": {
|
||||
"ip": "1.1.5",
|
||||
"smart-buffer": "1.1.15"
|
||||
}
|
||||
},
|
||||
"socks-proxy-agent": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz",
|
||||
"integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==",
|
||||
"requires": {
|
||||
"agent-base": "4.2.0",
|
||||
"socks": "1.1.10"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.5.7",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
|
||||
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
|
||||
"optional": true
|
||||
},
|
||||
"statuses": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
|
||||
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew=="
|
||||
},
|
||||
"string_decoder": {
|
||||
"version": "0.10.31",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
},
|
||||
"thenify": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz",
|
||||
"integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=",
|
||||
"requires": {
|
||||
"any-promise": "1.3.0"
|
||||
}
|
||||
},
|
||||
"thenify-all": {
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz",
|
||||
"integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=",
|
||||
"requires": {
|
||||
"thenify": "3.3.0"
|
||||
}
|
||||
},
|
||||
"thunkify": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz",
|
||||
"integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0="
|
||||
},
|
||||
"type-check": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
|
||||
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
|
||||
"requires": {
|
||||
"prelude-ls": "1.1.2"
|
||||
}
|
||||
},
|
||||
"unpipe": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
|
||||
},
|
||||
"urllib": {
|
||||
"version": "2.25.3",
|
||||
"resolved": "https://registry.npmjs.org/urllib/-/urllib-2.25.3.tgz",
|
||||
"integrity": "sha512-CqPp/0GWdX09HwdnjypiW9U7mPzV8dfDyxhMnHyamT7vd6Ht+pmb2VgYh0hNw5luDjxEH81ElWxCWebQ0VNzWw==",
|
||||
"requires": {
|
||||
"any-promise": "1.3.0",
|
||||
"content-type": "1.0.4",
|
||||
"debug": "2.6.9",
|
||||
"default-user-agent": "1.0.0",
|
||||
"digest-header": "0.0.1",
|
||||
"ee-first": "1.1.1",
|
||||
"humanize-ms": "1.2.1",
|
||||
"iconv-lite": "0.4.19",
|
||||
"proxy-agent": "2.2.0",
|
||||
"qs": "6.5.1",
|
||||
"statuses": "1.4.0",
|
||||
"utility": "1.13.1"
|
||||
}
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
||||
},
|
||||
"utility": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmjs.org/utility/-/utility-1.13.1.tgz",
|
||||
"integrity": "sha512-OQYqjyhHSCeSm+IziPHNbLc+WR3jUNa3goeyLoiITV1saN/BesDDsUIvh1LTRXa3XO2UpobByW//mm5p62/9tQ==",
|
||||
"requires": {
|
||||
"copy-to": "2.0.1",
|
||||
"escape-html": "1.0.3",
|
||||
"mkdirp": "0.5.1",
|
||||
"mz": "2.7.0"
|
||||
}
|
||||
},
|
||||
"win-release": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/win-release/-/win-release-1.1.1.tgz",
|
||||
"integrity": "sha1-X6VeAr58qTTt/BJmVjLoSbcuUgk=",
|
||||
"requires": {
|
||||
"semver": "5.5.0"
|
||||
}
|
||||
},
|
||||
"wordwrap": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
|
||||
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus="
|
||||
},
|
||||
"xml2js": {
|
||||
"version": "0.4.19",
|
||||
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
|
||||
"integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
|
||||
"requires": {
|
||||
"sax": "1.2.4",
|
||||
"xmlbuilder": "9.0.4"
|
||||
}
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "9.0.4",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.4.tgz",
|
||||
"integrity": "sha1-UZy0ymhtAFqEINNJbz8MruzKWA8="
|
||||
},
|
||||
"xregexp": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
|
||||
"integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM="
|
||||
}
|
||||
}
|
||||
}
|
28
packages/hot-update-tools/package.json
Normal file
28
packages/hot-update-tools/package.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "hot-update-tools",
|
||||
"version": "0.0.3",
|
||||
"description": "hotUpdateTools",
|
||||
"author": "xu_yanfeng",
|
||||
"main": "main.js",
|
||||
"main-menu": {
|
||||
"i18n:MAIN_MENU.project.title/i18n:hot-update-tools.title": {
|
||||
"icon": "icon.png",
|
||||
"accelerator": "CmdOrCtrl+u",
|
||||
"message": "hot-update-tools:showPanel"
|
||||
}
|
||||
},
|
||||
"panel": {
|
||||
"main": "panel/index.js",
|
||||
"type": "dockable",
|
||||
"title": "hotUpdateTools",
|
||||
"width": 900,
|
||||
"height": 900
|
||||
},
|
||||
"dependencies": {
|
||||
"ali-oss": "^4.11.4",
|
||||
"co": "^4.6.0",
|
||||
"jquery": "^3.2.1",
|
||||
"jszip": "^3.1.5",
|
||||
"nodemailer": "^4.4.1"
|
||||
}
|
||||
}
|
14
packages/hot-update-tools/panel/index.css
Normal file
14
packages/hot-update-tools/panel/index.css
Normal file
@@ -0,0 +1,14 @@
|
||||
:host {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: #11ff00;
|
||||
}
|
||||
|
||||
ui-section {
|
||||
overflow-y: auto;
|
||||
margin: 0px 0px;
|
||||
padding: 0 0px;
|
||||
flex: 1
|
||||
}
|
222
packages/hot-update-tools/panel/index.html
Normal file
222
packages/hot-update-tools/panel/index.html
Normal file
@@ -0,0 +1,222 @@
|
||||
<div class="layout vertical" style="height: 100%" xmlns:v-bind="http://www.w3.org/1999/xhtml">
|
||||
<!--<div class="layout horizontal start-justified center">-->
|
||||
<!--<ui-select class="flex-3" v-on:change="onIpSelectChange" id="ipSelection">-->
|
||||
|
||||
<!--<template v-for="ip in hotAddressArray">-->
|
||||
<!--<option v-bind:value="ip">{{ip}}</option>-->
|
||||
<!--</template>-->
|
||||
<!--</ui-select>-->
|
||||
<!--<ui-button v-disabled="false" v-on:confirm="onTestSelect">add select</ui-button>-->
|
||||
<!--<ui-button v-disabled="false" v-on:confirm="onLogIp">ip</ui-button>-->
|
||||
<!--</div>-->
|
||||
<div class="layout vertical start-justified">
|
||||
<h2>生成Manifest配置</h2>
|
||||
<!-- <ui-prop name="版本号">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-1" v-on:blur="onInputVersionOver" v-value="version"></ui-input>
|
||||
<1!--<ui-button v-on:confirm="onTest">测试</ui-button>--1>
|
||||
</div>
|
||||
</ui-prop> -->
|
||||
|
||||
<ui-prop name="资源服务器url" tooltip="游戏热更新服务器的url">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-2" v-on:blur="onInPutUrlOver" v-value="serverRootDir"></ui-input>
|
||||
<!--<ui-button v-on:confirm="onTestUrl">Test URL</ui-button>-->
|
||||
<!--<ui-button v-on:confirm="onOpenUrl">浏览器访问</ui-button>-->
|
||||
<ui-input style="width: 100px;" readonly v-value="remoteServerVersion" v-if="isShowRemoteServerVersion">
|
||||
</ui-input>
|
||||
<ui-button v-on:confirm="userLocalIP">使用本机IP</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<!------------------------------配置历史-------------------------------->
|
||||
<ui-prop name="资源服务器url配置历史">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-select class="flex-2" style="width: auto" id="hotAddressSelect"
|
||||
v-on:change="onChangeSelectHotAddress">
|
||||
<option v-for="(index, address) in hotAddressArray" v-bind:value="address">
|
||||
{{'['+index+'] ' +address}}
|
||||
</option>
|
||||
</ui-select>
|
||||
<ui-button class="green" v-on:confirm="onBtnClickUseSelectedHotAddress" v-show="isShowUseAddrBtn">使用
|
||||
</ui-button>
|
||||
<ui-button class="red" v-on:confirm="onBtnClickDelSelectedHotAddress" v-show="isShowDelAddrBtn">删除
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
|
||||
<ui-prop name="項目熱更配置文件(project.mainfest)">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-2" readonly disabled v-value="genProjectManifestFile"></ui-input>
|
||||
<ui-button v-on:confirm="onSelectGenProjectManifestFile">选择</ui-button>
|
||||
<ui-button v-on:confirm="onOpenProjectManifestFile">
|
||||
<i class="icon-doc-text"></i>
|
||||
<!--打开-->
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
|
||||
<ui-prop name="build项目资源文件目录">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-2" readonly disabled v-value="resourceRootDir"></ui-input>
|
||||
<ui-button v-on:confirm="onSelectResourceRootDir">选择</ui-button>
|
||||
<ui-button v-on:confirm="onOpenResourceDir">
|
||||
<i class="icon-doc-text"></i>
|
||||
<!--打开-->
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
|
||||
<ui-prop name="manifest存储目录">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-2" readonly disabled v-value="genManifestDir"></ui-input>
|
||||
<!--<ui-button v-on:confirm="onSelectGenManifestDir">选择</ui-button>-->
|
||||
<ui-button v-on:confirm="onOpenManifestDir">
|
||||
<i class="icon-doc-text"></i>
|
||||
<!--打开-->
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
|
||||
<div class="self-end">
|
||||
<!--<ui-button class="self-start" v-on:confirm="onCleanAPPCfg">-->
|
||||
<!--清除APP配置-->
|
||||
<!--</ui-button>-->
|
||||
<!--<ui-button class="self-end green" v-on:confirm="onBtnClickPackVersion"> 压缩打包</ui-button>-->
|
||||
<ui-button class="self-end red" v-on:confirm="onClickClear"> 清除Log</ui-button>
|
||||
<ui-button class="self-end blue" v-on:confirm="onClickPrintProjectManifest"> 查看版號</ui-button>
|
||||
<ui-button class="self-end green" v-on:confirm="onClickGenCfg"> 生成</ui-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layout vertical">
|
||||
<h2> 当前游戏配置</h2>
|
||||
<ui-prop name="项目热更配置文件(project.mainfest)">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-1" disabled v-value="localGameProjectManifest"></ui-input>
|
||||
<ui-button v-on:confirm="onOpenLocalGameManifestDir">
|
||||
<i class="icon-doc-text"></i>
|
||||
<1!--打开文件夹--1>
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<ui-prop name="项目热更配置文件(version.mainfest)">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-1" disabled v-value="localGameVersionManifest"></ui-input>
|
||||
<ui-button v-on:confirm="onOpenLocalGameManifestDir">
|
||||
<i class="icon-doc-text"></i>
|
||||
<1!--打开文件夹--1>
|
||||
</ui-button>
|
||||
|
||||
</div>
|
||||
</ui-prop>
|
||||
<ui-prop name="package url:">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<h4 class="flex-2">{{localGamePackageUrl}}</h4>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<ui-prop name="游戏版本号:">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<h4 class="flex-2">{{localGameVersion}}</h4>
|
||||
<ui-button title="将生成的2个manifest文件导入到项目中" class="end-justified blue"
|
||||
v-on:confirm="importManifestToGame">
|
||||
导入manifest
|
||||
</ui-button>
|
||||
<ui-button class="end-justified" v-on:confirm="initLocalGameVersion">
|
||||
<i class="icon-arrows-cw"></i>
|
||||
<1!--刷新--1>
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
</div> -->
|
||||
<!--------------------------------测试环境----------------------------------------------->
|
||||
<div class="layout vertical">
|
||||
<div class="layout horizontal center">
|
||||
<h2>测试环境 - </h2>
|
||||
<div style="display: none">
|
||||
<ui-select class="" v-on:change="onTestEnvChange" v-value="testEnvSelect" id="testEnvSelect">
|
||||
<option value='0'>本地</option>
|
||||
<option value='1'>阿里云</option>
|
||||
<option value='2'>发送邮件</option>
|
||||
</ui-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-------------------------------本地测试环境-------------------------------------->
|
||||
<div class="layout vertical" v-if="testEnvLocal">
|
||||
<ui-prop name="package url">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<h4 class="flex-2">{{serverPackageUrl}}</h4>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<ui-prop name="服务器版本">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<h4 class="flex-2">{{serverVersion}}</h4>
|
||||
<ui-button class="end-justified" v-on:confirm="refreshLocalServerVersion">
|
||||
<i class="icon-arrows-cw"></i>
|
||||
<!--刷新-->
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
|
||||
<ui-prop name="本机server物理路径">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<ui-input class="flex-2" disabled v-value="localServerPath"></ui-input>
|
||||
<ui-button v-on:confirm="onSelectLocalServerPath">选择</ui-button>
|
||||
<ui-button v-on:confirm="onOpenLocalServer">
|
||||
<i class="icon-doc-text"></i>
|
||||
<!--打开目录-->
|
||||
</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<ui-prop name="操作">
|
||||
<div class="flex-1 layout horizontal center">
|
||||
<h3 class="flex-2"></h3>
|
||||
<ui-button class="end-justified red" v-on:confirm="onCleanSimRemoteRes">
|
||||
<i class="icon-trash-empty" title="删除win32模拟器热更新资源"></i>
|
||||
清理模拟器缓存
|
||||
</ui-button>
|
||||
<ui-button class="end-justified green" v-on:confirm="onCopyFileToLocalServer">部署</ui-button>
|
||||
</div>
|
||||
</ui-prop>
|
||||
<ui-progress style="width: 100%;" v-value="copyProgress">40</ui-progress>
|
||||
</div>
|
||||
<!---------------------------------阿里云测试环境-------------------------------------------------->
|
||||
<div class="layout vertical" v-if="testEnvALi">
|
||||
<h2>阿里云</h2>
|
||||
<ui-prop name="">
|
||||
|
||||
</ui-prop>
|
||||
<div class="self-end">
|
||||
<ui-button class="self-end green" v-on:confirm="onBtnClickAliTest"> 测试阿里云</ui-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layout vertical" v-if="testEnvEmail">
|
||||
<ui-prop name="添加邮件接收者">
|
||||
<ui-input class="flex-2" v-on:blur="onInputMailPeopleOver" v-value="addMailPeople"></ui-input>
|
||||
<ui-button v-if="isPeopleExist()">添加</ui-button>
|
||||
</ui-prop>
|
||||
<ui-prop name="邮件接收者" auto-height>
|
||||
<div class="layout vertical">
|
||||
<ui-checkbox v-for="(index, people) in emailPeopleArray" v-bind:value="people">
|
||||
{{'['+index+']'+people}}
|
||||
</ui-checkbox>
|
||||
</div>
|
||||
</ui-prop>
|
||||
|
||||
<ui-prop name="发布的游戏版本">
|
||||
<ui-input class="flex-1" disabled v-value="serverRootDir"></ui-input>
|
||||
<ui-input style="width: 100px;" disabled
|
||||
v-if="remoteServerVersion!== null && remoteServerVersion !== '' " v-value="remoteServerVersion">1.0
|
||||
</ui-input>
|
||||
</ui-prop>
|
||||
<ui-prop name="更新内容" auto-height>
|
||||
<ui-text-area class="flex-1" resize-v placeholder="更新内容" v-value="emailContent">
|
||||
</ui-text-area>
|
||||
</ui-prop>
|
||||
<div class="self-end">
|
||||
<ui-button class="self-end green" v-on:confirm="onBtnClickSendMail"> 发送邮件</ui-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h2>日志:</h2>
|
||||
<textarea class="flex-1 " id="logTextArea" v-value="logView"
|
||||
style="width: 100%; height: 100%; background: #252525; color: #fd942b; border-color: #fd942b;"></textarea>
|
||||
</div>
|
1236
packages/hot-update-tools/panel/index.js
Normal file
1236
packages/hot-update-tools/panel/index.js
Normal file
File diff suppressed because it is too large
Load Diff
0
packages/hot-update-tools/panel/test.js
Normal file
0
packages/hot-update-tools/panel/test.js
Normal file
0
packages/hot-update-tools/test/TestEnvAli.html
Normal file
0
packages/hot-update-tools/test/TestEnvAli.html
Normal file
14
packages/hot-update-tools/test/TestEnvAli.js
Normal file
14
packages/hot-update-tools/test/TestEnvAli.js
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
var Fs = require('fire-fs');
|
||||
var Path = require('fire-path');
|
||||
let url = Editor.url(window.packageRoot + "panel/TestEnvAli.html", 'utf8');
|
||||
|
||||
|
||||
module.exports = {
|
||||
init() {
|
||||
Vue.component('TestEnvAli', {
|
||||
props: ['data'],
|
||||
template: Fs.readFileSync(url),
|
||||
});
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user