Commit 131689d7 authored by 智勇's avatar 智勇

up

parent 6166a2c4
...@@ -9,3 +9,5 @@ ...@@ -9,3 +9,5 @@
.DS_Store .DS_Store
qa_shell_script/config_server/node_modules qa_shell_script/config_server/node_modules
.log .log
./qa_shell_script/config_server/package.json
./qa_shell_script/config_server/package-lock.json
var cproc = require('child_process');
var execSync = cproc.execSync;
var project_name, project_attr, projects = {},
java_projects = [],
node_projects = [],
python_projects = [],
ui_projects = [];
var param = {
type: "",
name: "",
attr: ""
}
projects = String(execSync(`curl -s http://127.0.0.1:10088/config_server/get_project_config_from_db`))
projects = JSON.parse(projects)
// console.log(typeof(projects))
// console.log(projects)
for (var index in projects) {
// if (projects[index]['project_name'] == 'xyqb') {
// console.log(index)
// console.log(projects[index])
// }
switch (projects[index]['type']) {
case "java":
java_projects.push(projects[index]);
break;
case "node":
node_projects.push(projects[index]);
break;
case "ui":
ui_projects.push(projects[index]);
break;
case "python":
python_projects.push(projects[index]);
break;
}
}
// console.log(111)
// // --java
// new pClass().init(1,true,"java", "7042", "xyqb-user2", "head_group", "xyqb-user2.log", "application.properties", "--worker 1 --currentWorker 1 -t -ts", "-Denv=dev -Didc=default -Dtech.localhost= -Dtest=true", "用户注册登录-V2-server", "", "mvn clean package -Ptest -Dmaven.test.skip=true", "");
var temp = "";
process.argv.forEach(function(val, index, array) {
if (index >= 2) {
if (index % 2 == 0) {
temp = val.replace(/\-/, "");
param[temp] = "";
} else {
param[temp] = val;
}
}
});
function getListAttr(projects, attr) {
var list = [];
for (var i = 0; i < projects.length; i++) {
// if (projects[i].is_active) {
list.push(projects[i][attr])
// }
}
return list.join(" ");
}
var configFunction = function() {};
configFunction.prototype = {
// getProjectAttr: function(pName, pAttr) {
// if (typeof projects[pName] == "undefined") {
// console.log("111")
// } else {
// console.log("222")
// var attrs = pAttr.split("/");
// if (attrs.length == 0) {
// console.log("")
// return
// }
// var list = [];
// for (var j = 0; j < attrs.length; j++) {
// if(projects[pName][attrs[j]]){
// console.log(projects)
// list.push(projects[pName][attrs[j]].split(" ").join("^"));
// }else{
// list.push(" ");
// }
// }
// console.log(list.join("|"))
// }
// },
getProjectAttr: function(pName, pAttr) {
for (var index in projects) {
if (projects[index]['project_name'] == pName) {
var attrs = pAttr.split("/");
if (attrs.length == 0) {
console.log("")
return
}
var list = [];
for (var j = 0; j < attrs.length; j++) {
if (projects[index][attrs[j]]) {
list.push(projects[index][attrs[j]].split(" ").join("^"));
} else {
list.push(" ");
}
}
console.log(list.join("|"))
} else {}
}
},
// getProjectsAttrs: function(projects, attr, attr2) {
// var attrs = attr.split("/");
// if (attrs.length == 0) {
// return
// }
// var list = [];
// //attr2 专有参数,用来表示是否要取带有对外域名的服务
// if(attr2 == "true"){
// for (var i = 0; i < projects.length; i++) {
// if(projects[i].url != ""){
// var li = [projects[i]["name"]];
// for (var j = 0; j < attrs.length; j++) {
// li.push(projects[i][attrs[j]]);
// }
// // li.push(projects[i].url);
// list.push(li.join("|"));
// }
// }
// }else{
// for (var i = 0; i < projects.length; i++) {
// // if (projects[i].is_active){
// var li = [projects[i]["name"]];
// for (var j = 0; j < attrs.length; j++) {
// li.push(projects[i][attrs[j]]);
// }
// list.push(li.join("|"));
// // }
// }
// }
// return list.join(" ");
// },
getProjectsAttrs: function(projects, attr, attr2) {
var attrs = attr.split("/");
if (attrs.length == 0) {
return
}
var list = [];
//attr2 专有参数,用来表示是否要取带有对外域名的服务
if (attr2 == "true") {
for (var i = 0; i < projects.length; i++) {
if (projects[i].url != "") {
var li = [projects[i]["project_name"]];
for (var j = 0; j < attrs.length; j++) {
li.push(projects[i][attrs[j]]);
}
// li.push(projects[i].url);
list.push(li.join("|"));
}
}
} else {
for (var i = 0; i < projects.length; i++) {
// if (projects[i].is_active){
var li = [projects[i]["project_name"]];
for (var j = 0; j < attrs.length; j++) {
li.push(projects[i][attrs[j]]);
}
list.push(li.join("|"));
// }
}
}
return list.join(" ");
},
getProjectsAttr: function(type, attr) {
switch (type) {
case "java":
console.log(getListAttr(java_projects, attr));
break;
case "ui":
console.log(getListAttr(ui_projects, attr));
break;
case "python":
console.log(getListAttr(python_projects, attr));
break;
case "node":
console.log(getListAttr(node_projects, attr));
break;
}
}
}
//tower add
module.exports = {
java: java_projects,
node: node_projects,
python: python_projects,
ui: ui_projects
}
var F = new configFunction();
if (param["type"] == "") {
F.getProjectAttr(param["name"], param["attr"]);
} else if (param["type"] == "multi") {
var str = "";
str += F.getProjectsAttrs(java_projects, param["attr"], param["attr2"]);
str += " " + F.getProjectsAttrs(ui_projects, param["attr"], param["attr2"]);
str += " " + F.getProjectsAttrs(python_projects, param["attr"], param["attr2"]);
str += " " + F.getProjectsAttrs(node_projects, param["attr"], param["attr2"]);
console.log(str)
} else if (param["type"] == "hosts") {
console.log(JSON.stringify(hosts));
} else {
F.getProjectsAttr(param["type"], param["attr"]);
}
\ No newline at end of file
var express = require('express'); var express = require('express');
var cproc = require('child_process'); var cproc = require('child_process');
var bodyParser = require('body-parser'); var bodyParser = require('body-parser');
var db_config = require('./config/db'); var db_config = require('./config/db');
const mongodb = require('mongodb');
// return // return
var execSync = cproc.execSync; var execSync = cproc.execSync;
var options = { var options = {
inflate: true, inflate: true,
limit: '100kb', limit: '100kb',
type: 'application/octet-stream' type: 'application/octet-stream'
}; };
// const mongoose = require('mongoose'); // const mongoose = require('mongoose');
// mongoose.connect('mongodb://localhost/my_database'); // mongoose.connect('mongodb://localhost/my_database');
...@@ -18,277 +19,270 @@ app.use(bodyParser.urlencoded({ extended: false })) ...@@ -18,277 +19,270 @@ app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json()) app.use(bodyParser.json())
var attrs = { var attrs = {
configPath:"config_file", configPath: "config_file",
buildCmd:"command", buildCmd: "command",
gitPath:"git_path", gitPath: "git_path",
gitGroup:"gitPathHead", gitGroup: "gitPathHead",
host:"www", host: "www",
projectType:"type", projectType: "type",
projectAuth:"auth", projectAuth: "auth",
projectDesc:"desc", projectDesc: "desc",
logName:"log_name", logName: "log_name",
jarFilePath:"target_path", jarFilePath: "target_path",
auth:"auth", auth: "auth",
port:"port", port: "port",
start_command:"", start_command: "",
stop_command:"", stop_command: "",
command2:"command2", command2: "command2",
node_version:"node_version" node_version: "node_version"
} }
var attrComs = Object.keys(attrs) var attrComs = Object.keys(attrs)
var attrComsArr = []; var attrComsArr = [];
for(let i of attrComs){ for (let i of attrComs) {
attrComsArr.push(attrs[i]); attrComsArr.push(attrs[i]);
} }
// ------------UTILS------------ // ------------UTILS------------
function parseStr2Json(str){ function parseStr2Json(str) {
var a = {}; var a = {};
var strs = str.split(" "); var strs = str.split(" ");
for(let i of strs){ for (let i of strs) {
if(i){ if (i) {
let os = i.split("|"); let os = i.split("|");
a[os[0]]={ a[os[0]] = {
name: os[0], name: os[0],
ip: os[1], ip: os[1],
http: os[2], http: os[2],
https: os[3] https: os[3]
} }
} }
} }
return a return a
} }
function parseJson2Str(json){ function parseJson2Str(json) {
var a = []; var a = [];
let keys = Object.keys(json); let keys = Object.keys(json);
for(let k of keys){ for (let k of keys) {
a.push([ a.push([
json[k].name, json[k].name,
json[k].ip, json[k].ip,
json[k].http, json[k].http,
json[k].https json[k].https
].join("|")) ].join("|"))
} }
return a.join(" ") return a.join(" ")
} }
// ------------UTILS---------- // ------------UTILS----------
// DB 维护数据 // DB 维护数据
let db_conf = db_config.db_config(); let db_conf = db_config.db_config();
let db_conf_keys = Object.keys(db_conf); let db_conf_keys = Object.keys(db_conf);
// //
admin.get('/get_db_config/:name/:attr', function (req, res) { admin.get('/get_db_config/:name/:attr', function(req, res) {
let str = "" let str = ""
if(req.params.name == "all"){ if (req.params.name == "all") {
if(req.params.attr == "name"){ if (req.params.attr == "name") {
res.send(db_conf_keys.join(" ")); res.send(db_conf_keys.join(" "));
} }
}else{ } else {
if(req.params.attr != "all"){ if (req.params.attr != "all") {
res.send(db_conf[req.params.name][req.params.attr]) res.send(db_conf[req.params.name][req.params.attr])
}else{ } else {
let item = db_conf[req.params.name] let item = db_conf[req.params.name]
res.send(`${item.host};${item.port};${item.user};${item.pwd};${item.sys_table_list};`) res.send(`${item.host};${item.port};${item.user};${item.pwd};${item.sys_table_list};`)
} }
} }
}); });
admin.get('/get_db_dump_command/:name/:opt', function (req, res) { admin.get('/get_db_dump_command/:name/:opt', function(req, res) {
if(req.params.opt!="opt"){ if (req.params.opt != "opt") {
res.send(db_config.get_mysql_dump_table(req.params.name)); res.send(db_config.get_mysql_dump_table(req.params.name));
}else{ } else {
res.send(db_config.get_mysql_dump_opt(req.params.name)); res.send(db_config.get_mysql_dump_opt(req.params.name));
} }
}); });
admin.get('/get_db_config/refersh',function(){ admin.get('/get_db_config/refersh', function() {
res.setHeader("Content-Type","application/json"); res.setHeader("Content-Type", "application/json");
db_conf = db_config.db_config(); db_conf = db_config.db_config();
db_conf_keys = Object.keys(db_conf); db_conf_keys = Object.keys(db_conf);
res.send({code:"OK"}) res.send({ code: "OK" })
}) })
// 获取节点命令 // 获取节点命令
admin.get('/get_node_command/:name', function (req, res) { admin.get('/get_node_command/:name', function(req, res) {
res.setHeader("Content-Type","application/json"); res.setHeader("Content-Type", "application/json");
var str = execSync(`node ./get_project_config.js -name ${req.params.name} -attr config_file/command/gitPathHead`) var str = execSync(`node ./get_project_config.js -name ${req.params.name} -attr config_file/command/gitPathHead`)
var items = String(str).replace(/\n/g,"").split("|"); var items = String(str).replace(/\n/g, "").split("|");
var config_file = items[0].replace(/\^/g," "); var config_file = items[0].replace(/\^/g, " ");
var command = items[1].replace(/\^/g," "); var command = items[1].replace(/\^/g, " ");
var gitGroup = items[2].replace(/\^/g," "); var gitGroup = items[2].replace(/\^/g, " ");
res.send({configPath:config_file,buildCmd:command,gitGroup:gitGroup}); res.send({ configPath: config_file, buildCmd: command, gitGroup: gitGroup });
}); });
// 获取项目配置 // 获取项目配置
admin.get('/get_project_attr/:name', function (req, res) { admin.get('/get_project_attr/:name', function(req, res) {
res.setHeader("Content-Type","application/json"); res.setHeader("Content-Type", "application/json");
var comstr = attrComsArr.join("/"); var comstr = attrComsArr.join("/");
var names = req.params.name.split("--"); var names = req.params.name.split("--");
var p_name = ""; var p_name = "";
if(names.length > 1){ if (names.length > 1) {
p_name = names[0] p_name = names[0]
}else{ } else {
p_name = req.params.name p_name = req.params.name
} }
var str = execSync(`node ./get_project_config.js -name ${p_name} -attr ${comstr}`) var str = execSync(`node ./get_project_config.js -name ${p_name} -attr ${comstr}`)
var items = String(str).replace(/\n/g,"").split("|"); var items = String(str).replace(/\n/g, "").split("|");
let rs = {},index = 0; let rs = {},
for(let i of items){ index = 0;
rs[attrComs[index]] = i.replace(/\^/g," "); for (let i of items) {
index++ rs[attrComs[index]] = i.replace(/\^/g, " ");
} index++
res.send(rs); }
res.send(rs);
}); });
// 获取所有域名 // 获取所有域名
admin.get('/get_hosts', function (req, res) { admin.get('/get_hosts', function(req, res) {
res.setHeader("Content-Type","application/json"); res.setHeader("Content-Type", "application/json");
var str = execSync(`node ./get_project_config.js -type hosts`) var str = execSync(`node ./get_project_config.js -type hosts`)
var items = String(str); var items = String(str);
res.send(items); res.send(items);
}); });
// 根据类型获取系统名称 // 根据类型获取系统名称
admin.get('/get_systems_by_type', function (req, res) { admin.get('/get_systems_by_type', function(req, res) {
res.setHeader("Content-Type","application/json"); res.setHeader("Content-Type", "application/json");
var ui_str = execSync(`node ./get_project_config.js -type ui -attr name`) var ui_str = execSync(`node ./get_project_config.js -type ui -attr name`)
ui_str = String(ui_str) ui_str = String(ui_str)
.replace(/xyqb-ui/g,"").replace(/xjd-ui/,"xyqb-ui--xjd-ui") .replace(/xyqb-ui/g, "").replace(/xjd-ui/, "xyqb-ui--xjd-ui")
.replace(/new-paycenter-ui/g,"").replace(/paycenter-ui/,"paycenter-ui--new-paycenter-ui") .replace(/new-paycenter-ui/g, "").replace(/paycenter-ui/, "paycenter-ui--new-paycenter-ui")
.replace(/\s+/g,",").replace(/\n/g,"").slice(0, -1); .replace(/\s+/g, ",").replace(/\n/g, "").slice(0, -1);
var java_str = execSync(`node ./get_project_config.js -type java -attr name`) var java_str = execSync(`node ./get_project_config.js -type java -attr name`)
var node_str = execSync(`node ./get_project_config.js -type node -attr name`) var node_str = execSync(`node ./get_project_config.js -type node -attr name`)
var python_str = execSync(`node ./get_project_config.js -type python -attr name`) var python_str = execSync(`node ./get_project_config.js -type python -attr name`)
var server_str = `${String(java_str)} ${String(node_str)} ${String(python_str)}` var server_str = `${String(java_str)} ${String(node_str)} ${String(python_str)}`
server_str = server_str.replace(/\s+/g,",").replace(/\n/g,"").slice(0, -1);; server_str = server_str.replace(/\s+/g, ",").replace(/\n/g, "").slice(0, -1);;
res.send({ res.send({
frontend:ui_str, frontend: ui_str,
backend:server_str backend: server_str
}); });
}); });
// 给jenkins使用根据类型获取系统名称 // 给jenkins使用根据类型获取系统名称
admin.get('/get_systems_by_type_for_jenkins/:_type', function (req, res) { admin.get('/get_systems_by_type_for_jenkins/:_type', function(req, res) {
let str = "" let str = ""
if(req.params._type === "frontend"){ if (req.params._type === "frontend") {
var ui_str = execSync(`node ./get_project_config.js -type ui -attr name`) var ui_str = execSync(`node ./get_project_config.js -type ui -attr name`)
str = String(ui_str) str = String(ui_str)
.replace(/xyqb-ui/g,"").replace(/xjd-ui/,"xyqb-ui--xjd-ui") .replace(/xyqb-ui/g, "").replace(/xjd-ui/, "xyqb-ui--xjd-ui")
.replace(/new-paycenter-ui/g,"").replace(/paycenter-ui/,"paycenter-ui--new-paycenter-ui"); .replace(/new-paycenter-ui/g, "").replace(/paycenter-ui/, "paycenter-ui--new-paycenter-ui");
}else{ } else {
var java_str = execSync(`node ./get_project_config.js -type java -attr name`) var java_str = execSync(`node ./get_project_config.js -type java -attr name`)
var node_str = execSync(`node ./get_project_config.js -type node -attr name`) var node_str = execSync(`node ./get_project_config.js -type node -attr name`)
var python_str = execSync(`node ./get_project_config.js -type python -attr name`) var python_str = execSync(`node ./get_project_config.js -type python -attr name`)
str = `${String(java_str)} ${String(node_str)} ${String(python_str)}` str = `${String(java_str)} ${String(node_str)} ${String(python_str)}`
} }
str = str.replace(/\n/g,"").replace(/\s+/g,"\n"); str = str.replace(/\n/g, "").replace(/\s+/g, "\n");
res.send(str); res.send(str);
}); });
// 给jenkins使用根据类型获取系统名称 // 给jenkins使用根据类型获取系统名称
admin.get('/get_systems_by_type_for_temp', function (req, res) { admin.get('/get_systems_by_type_for_temp', function(req, res) {
var ui_str = execSync(`node ./get_project_config.js -type ui -attr name`) var ui_str = execSync(`node ./get_project_config.js -type ui -attr name`)
ui_str = String(ui_str).split(/\s+/) ui_str = String(ui_str).split(/\s+/)
var java_str = execSync(`node ./get_project_config.js -type java -attr name`) var java_str = execSync(`node ./get_project_config.js -type java -attr name`)
java_str = String(java_str).split(/\s+/) java_str = String(java_str).split(/\s+/)
var node_str = execSync(`node ./get_project_config.js -type node -attr name`) var node_str = execSync(`node ./get_project_config.js -type node -attr name`)
node_str = String(node_str).split(/\s+/) node_str = String(node_str).split(/\s+/)
var python_str = execSync(`node ./get_project_config.js -type python -attr name`) var python_str = execSync(`node ./get_project_config.js -type python -attr name`)
python_str = String(python_str).split(/\s+/) python_str = String(python_str).split(/\s+/)
res.send({ res.send({
ui:ui_str, ui: ui_str,
java:java_str, java: java_str,
node:node_str, node: node_str,
python:python_str python: python_str
}); });
}); });
// 增加一个新的nginx映射 // 增加一个新的nginx映射
admin.post('/add_new_proxy', function (req, res) { admin.post('/add_new_proxy', function(req, res) {
let request = req.body; let request = req.body;
let new_namespace = request["namespace"],new_ip = request["ip"],new_ports=request["ports"]; let new_namespace = request["namespace"],
var str = String(execSync(`cat ../ngrok/docker_env_name.sh`)).replace(/\n/,""); new_ip = request["ip"],
let data = parseStr2Json(str); new_ports = request["ports"];
data[new_namespace] = { var str = String(execSync(`cat ../ngrok/docker_env_name.sh`)).replace(/\n/, "");
name: new_namespace, let data = parseStr2Json(str);
ip: new_ip, data[new_namespace] = {
http: new_ports.http_port, name: new_namespace,
https: new_ports.https_port ip: new_ip,
} http: new_ports.http_port,
https: new_ports.https_port
let s = parseJson2Str(data) }
s = s.replace("\n","")
execSync(`echo "${s}" > ../ngrok/docker_env_name.sh`) let s = parseJson2Str(data)
cproc.exec("../ngrok/make_frp_ini_V2.sh"); s = s.replace("\n", "")
res.send({msg:"执行完成"}); execSync(`echo "${s}" > ../ngrok/docker_env_name.sh`)
cproc.exec("../ngrok/make_frp_ini_V2.sh");
res.send({ msg: "执行完成" });
}); });
// 删除一个namespace映射 // 删除一个namespace映射
admin.post('/remove_proxy', function (req, res) { admin.post('/remove_proxy', function(req, res) {
let request = req.body; let request = req.body;
console.log(request); console.log(request);
let new_namespace = request["namespace"]; let new_namespace = request["namespace"];
var str = String(execSync(`cat ../ngrok/docker_env_name.sh`)).replace(/\n/,""); var str = String(execSync(`cat ../ngrok/docker_env_name.sh`)).replace(/\n/, "");
let data = parseStr2Json(str); let data = parseStr2Json(str);
delete data[new_namespace] delete data[new_namespace]
let s = parseJson2Str(data) let s = parseJson2Str(data)
s = s.replace("\n","") s = s.replace("\n", "")
execSync(`echo "${s}" > ../ngrok/docker_env_name.sh`) execSync(`echo "${s}" > ../ngrok/docker_env_name.sh`)
cproc.exec("../ngrok/make_frp_ini_V2.sh"); cproc.exec("../ngrok/make_frp_ini_V2.sh");
var last_str = String(execSync(`cat ../ngrok/docker_env_name.sh`)) var last_str = String(execSync(`cat ../ngrok/docker_env_name.sh`))
res.setHeader("Content-Type","application/json"); res.setHeader("Content-Type", "application/json");
res.send({ res.send({
"details": { "details": {
name_spaces:last_str name_spaces: last_str
}, },
"success": true "success": true
}); });
}); });
// 获取现有映射关系 // 获取现有映射关系
admin.get('/get_proxy', function (req, res) { admin.get('/get_proxy', function(req, res) {
res.setHeader("Content-Type","application/json"); res.setHeader("Content-Type", "application/json");
var str = execSync(`cat ../ngrok/docker_env_name.sh`) var str = execSync(`cat ../ngrok/docker_env_name.sh`)
res.send({namespace:String(str)}); res.send({ namespace: String(str) });
}); });
// 从mongo中获取配置
admin.get('/get_project_config_from_db', function(req, res) {
res.setHeader("Content-Type", "application/json");
async function test() {
let db = await mongodb.MongoClient.connect('mongodb://127.0.0.1:27017/qaHome', async function(err, db) {
let proconfigs = db.collection('proconfigs');
// let blogs = await coll.find().toArray();
let projects = await proconfigs.find().toArray();
let re = [];
// for (var i = 0; i < projects.length; i++) {
// let project_name=projects[i]['project_name'];
// let temp = { project_name: projects[i] };
// // temp[projects[i]['project_name']] = projects[i];
// console.log(temp)
// re.push(temp);
// }
res.send(projects)
});
}
test();
});
app.use('/config_server', admin) app.use('/config_server', admin)
console.log("http://192.168.4.3:10088/config_server/get_node_command") console.log("http://192.168.4.3:10088/config_server/get_node_command")
app.listen(10088) app.listen(10088)
\ No newline at end of file
...@@ -156,6 +156,16 @@ ...@@ -156,6 +156,16 @@
"repeat-element": "1.1.2" "repeat-element": "1.1.2"
} }
}, },
"bson": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/bson/-/bson-1.0.4.tgz",
"integrity": "sha1-k8ENOeqltYQVy8QFLz5T5WKwtyw="
},
"buffer-shims": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz",
"integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E="
},
"bytes": { "bytes": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
...@@ -190,6 +200,7 @@ ...@@ -190,6 +200,7 @@
"requires": { "requires": {
"anymatch": "1.3.2", "anymatch": "1.3.2",
"async-each": "1.0.1", "async-each": "1.0.1",
"fsevents": "1.1.3",
"glob-parent": "2.0.0", "glob-parent": "2.0.0",
"inherits": "2.0.3", "inherits": "2.0.3",
"is-binary-path": "1.0.1", "is-binary-path": "1.0.1",
...@@ -301,6 +312,11 @@ ...@@ -301,6 +312,11 @@
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz",
"integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA="
}, },
"es6-promise": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz",
"integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q="
},
"escape-html": { "escape-html": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
...@@ -456,6 +472,795 @@ ...@@ -456,6 +472,795 @@
"resolved": "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", "resolved": "http://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
}, },
"fsevents": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz",
"integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==",
"optional": true,
"requires": {
"nan": "2.9.2",
"node-pre-gyp": "0.6.39"
},
"dependencies": {
"abbrev": {
"version": "1.1.0",
"bundled": true,
"optional": true
},
"ajv": {
"version": "4.11.8",
"bundled": true,
"optional": true,
"requires": {
"co": "4.6.0",
"json-stable-stringify": "1.0.1"
}
},
"ansi-regex": {
"version": "2.1.1",
"bundled": true
},
"aproba": {
"version": "1.1.1",
"bundled": true,
"optional": true
},
"are-we-there-yet": {
"version": "1.1.4",
"bundled": true,
"optional": true,
"requires": {
"delegates": "1.0.0",
"readable-stream": "2.2.9"
}
},
"asn1": {
"version": "0.2.3",
"bundled": true,
"optional": true
},
"assert-plus": {
"version": "0.2.0",
"bundled": true,
"optional": true
},
"asynckit": {
"version": "0.4.0",
"bundled": true,
"optional": true
},
"aws-sign2": {
"version": "0.6.0",
"bundled": true,
"optional": true
},
"aws4": {
"version": "1.6.0",
"bundled": true,
"optional": true
},
"balanced-match": {
"version": "0.4.2",
"bundled": true
},
"bcrypt-pbkdf": {
"version": "1.0.1",
"bundled": true,
"optional": true,
"requires": {
"tweetnacl": "0.14.5"
}
},
"block-stream": {
"version": "0.0.9",
"bundled": true,
"requires": {
"inherits": "2.0.3"
}
},
"boom": {
"version": "2.10.1",
"bundled": true,
"requires": {
"hoek": "2.16.3"
}
},
"brace-expansion": {
"version": "1.1.7",
"bundled": true,
"requires": {
"balanced-match": "0.4.2",
"concat-map": "0.0.1"
}
},
"buffer-shims": {
"version": "1.0.0",
"bundled": true
},
"caseless": {
"version": "0.12.0",
"bundled": true,
"optional": true
},
"co": {
"version": "4.6.0",
"bundled": true,
"optional": true
},
"code-point-at": {
"version": "1.1.0",
"bundled": true
},
"combined-stream": {
"version": "1.0.5",
"bundled": true,
"requires": {
"delayed-stream": "1.0.0"
}
},
"concat-map": {
"version": "0.0.1",
"bundled": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true
},
"core-util-is": {
"version": "1.0.2",
"bundled": true
},
"cryptiles": {
"version": "2.0.5",
"bundled": true,
"requires": {
"boom": "2.10.1"
}
},
"dashdash": {
"version": "1.14.1",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"debug": {
"version": "2.6.8",
"bundled": true,
"optional": true,
"requires": {
"ms": "2.0.0"
}
},
"deep-extend": {
"version": "0.4.2",
"bundled": true,
"optional": true
},
"delayed-stream": {
"version": "1.0.0",
"bundled": true
},
"delegates": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"detect-libc": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"ecc-jsbn": {
"version": "0.1.1",
"bundled": true,
"optional": true,
"requires": {
"jsbn": "0.1.1"
}
},
"extend": {
"version": "3.0.1",
"bundled": true,
"optional": true
},
"extsprintf": {
"version": "1.0.2",
"bundled": true
},
"forever-agent": {
"version": "0.6.1",
"bundled": true,
"optional": true
},
"form-data": {
"version": "2.1.4",
"bundled": true,
"optional": true,
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.5",
"mime-types": "2.1.15"
}
},
"fs.realpath": {
"version": "1.0.0",
"bundled": true
},
"fstream": {
"version": "1.0.11",
"bundled": true,
"requires": {
"graceful-fs": "4.1.11",
"inherits": "2.0.3",
"mkdirp": "0.5.1",
"rimraf": "2.6.1"
}
},
"fstream-ignore": {
"version": "1.0.5",
"bundled": true,
"optional": true,
"requires": {
"fstream": "1.0.11",
"inherits": "2.0.3",
"minimatch": "3.0.4"
}
},
"gauge": {
"version": "2.7.4",
"bundled": true,
"optional": true,
"requires": {
"aproba": "1.1.1",
"console-control-strings": "1.1.0",
"has-unicode": "2.0.1",
"object-assign": "4.1.1",
"signal-exit": "3.0.2",
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wide-align": "1.1.2"
}
},
"getpass": {
"version": "0.1.7",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"glob": {
"version": "7.1.2",
"bundled": true,
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"graceful-fs": {
"version": "4.1.11",
"bundled": true
},
"har-schema": {
"version": "1.0.5",
"bundled": true,
"optional": true
},
"har-validator": {
"version": "4.2.1",
"bundled": true,
"optional": true,
"requires": {
"ajv": "4.11.8",
"har-schema": "1.0.5"
}
},
"has-unicode": {
"version": "2.0.1",
"bundled": true,
"optional": true
},
"hawk": {
"version": "3.1.3",
"bundled": true,
"requires": {
"boom": "2.10.1",
"cryptiles": "2.0.5",
"hoek": "2.16.3",
"sntp": "1.0.9"
}
},
"hoek": {
"version": "2.16.3",
"bundled": true
},
"http-signature": {
"version": "1.1.1",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "0.2.0",
"jsprim": "1.4.0",
"sshpk": "1.13.0"
}
},
"inflight": {
"version": "1.0.6",
"bundled": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"bundled": true
},
"ini": {
"version": "1.3.4",
"bundled": true,
"optional": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"bundled": true,
"requires": {
"number-is-nan": "1.0.1"
}
},
"is-typedarray": {
"version": "1.0.0",
"bundled": true,
"optional": true
},
"isarray": {
"version": "1.0.0",
"bundled": true
},
"isstream": {
"version": "0.1.2",
"bundled": true,
"optional": true
},
"jodid25519": {
"version": "1.0.2",
"bundled": true,
"optional": true,
"requires": {
"jsbn": "0.1.1"
}
},
"jsbn": {
"version": "0.1.1",
"bundled": true,
"optional": true
},
"json-schema": {
"version": "0.2.3",
"bundled": true,
"optional": true
},
"json-stable-stringify": {
"version": "1.0.1",
"bundled": true,
"optional": true,
"requires": {
"jsonify": "0.0.0"
}
},
"json-stringify-safe": {
"version": "5.0.1",
"bundled": true,
"optional": true
},
"jsonify": {
"version": "0.0.0",
"bundled": true,
"optional": true
},
"jsprim": {
"version": "1.4.0",
"bundled": true,
"optional": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.0.2",
"json-schema": "0.2.3",
"verror": "1.3.6"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"mime-db": {
"version": "1.27.0",
"bundled": true
},
"mime-types": {
"version": "2.1.15",
"bundled": true,
"requires": {
"mime-db": "1.27.0"
}
},
"minimatch": {
"version": "3.0.4",
"bundled": true,
"requires": {
"brace-expansion": "1.1.7"
}
},
"minimist": {
"version": "0.0.8",
"bundled": true
},
"mkdirp": {
"version": "0.5.1",
"bundled": true,
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.0.0",
"bundled": true,
"optional": true
},
"node-pre-gyp": {
"version": "0.6.39",
"bundled": true,
"optional": true,
"requires": {
"detect-libc": "1.0.2",
"hawk": "3.1.3",
"mkdirp": "0.5.1",
"nopt": "4.0.1",
"npmlog": "4.1.0",
"rc": "1.2.1",
"request": "2.81.0",
"rimraf": "2.6.1",
"semver": "5.3.0",
"tar": "2.2.1",
"tar-pack": "3.4.0"
}
},
"nopt": {
"version": "4.0.1",
"bundled": true,
"optional": true,
"requires": {
"abbrev": "1.1.0",
"osenv": "0.1.4"
}
},
"npmlog": {
"version": "4.1.0",
"bundled": true,
"optional": true,
"requires": {
"are-we-there-yet": "1.1.4",
"console-control-strings": "1.1.0",
"gauge": "2.7.4",
"set-blocking": "2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"bundled": true
},
"oauth-sign": {
"version": "0.8.2",
"bundled": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
"bundled": true,
"optional": true
},
"once": {
"version": "1.4.0",
"bundled": true,
"requires": {
"wrappy": "1.0.2"
}
},
"os-homedir": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"os-tmpdir": {
"version": "1.0.2",
"bundled": true,
"optional": true
},
"osenv": {
"version": "0.1.4",
"bundled": true,
"optional": true,
"requires": {
"os-homedir": "1.0.2",
"os-tmpdir": "1.0.2"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
},
"performance-now": {
"version": "0.2.0",
"bundled": true,
"optional": true
},
"process-nextick-args": {
"version": "1.0.7",
"bundled": true
},
"punycode": {
"version": "1.4.1",
"bundled": true,
"optional": true
},
"qs": {
"version": "6.4.0",
"bundled": true,
"optional": true
},
"rc": {
"version": "1.2.1",
"bundled": true,
"optional": true,
"requires": {
"deep-extend": "0.4.2",
"ini": "1.3.4",
"minimist": "1.2.0",
"strip-json-comments": "2.0.1"
},
"dependencies": {
"minimist": {
"version": "1.2.0",
"bundled": true,
"optional": true
}
}
},
"readable-stream": {
"version": "2.2.9",
"bundled": true,
"requires": {
"buffer-shims": "1.0.0",
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"string_decoder": "1.0.1",
"util-deprecate": "1.0.2"
}
},
"request": {
"version": "2.81.0",
"bundled": true,
"optional": true,
"requires": {
"aws-sign2": "0.6.0",
"aws4": "1.6.0",
"caseless": "0.12.0",
"combined-stream": "1.0.5",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.1.4",
"har-validator": "4.2.1",
"hawk": "3.1.3",
"http-signature": "1.1.1",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.15",
"oauth-sign": "0.8.2",
"performance-now": "0.2.0",
"qs": "6.4.0",
"safe-buffer": "5.0.1",
"stringstream": "0.0.5",
"tough-cookie": "2.3.2",
"tunnel-agent": "0.6.0",
"uuid": "3.0.1"
}
},
"rimraf": {
"version": "2.6.1",
"bundled": true,
"requires": {
"glob": "7.1.2"
}
},
"safe-buffer": {
"version": "5.0.1",
"bundled": true
},
"semver": {
"version": "5.3.0",
"bundled": true,
"optional": true
},
"set-blocking": {
"version": "2.0.0",
"bundled": true,
"optional": true
},
"signal-exit": {
"version": "3.0.2",
"bundled": true,
"optional": true
},
"sntp": {
"version": "1.0.9",
"bundled": true,
"requires": {
"hoek": "2.16.3"
}
},
"sshpk": {
"version": "1.13.0",
"bundled": true,
"optional": true,
"requires": {
"asn1": "0.2.3",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.1",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.1",
"getpass": "0.1.7",
"jodid25519": "1.0.2",
"jsbn": "0.1.1",
"tweetnacl": "0.14.5"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"bundled": true,
"optional": true
}
}
},
"string-width": {
"version": "1.0.2",
"bundled": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.1",
"bundled": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"stringstream": {
"version": "0.0.5",
"bundled": true,
"optional": true
},
"strip-ansi": {
"version": "3.0.1",
"bundled": true,
"requires": {
"ansi-regex": "2.1.1"
}
},
"strip-json-comments": {
"version": "2.0.1",
"bundled": true,
"optional": true
},
"tar": {
"version": "2.2.1",
"bundled": true,
"requires": {
"block-stream": "0.0.9",
"fstream": "1.0.11",
"inherits": "2.0.3"
}
},
"tar-pack": {
"version": "3.4.0",
"bundled": true,
"optional": true,
"requires": {
"debug": "2.6.8",
"fstream": "1.0.11",
"fstream-ignore": "1.0.5",
"once": "1.4.0",
"readable-stream": "2.2.9",
"rimraf": "2.6.1",
"tar": "2.2.1",
"uid-number": "0.0.6"
}
},
"tough-cookie": {
"version": "2.3.2",
"bundled": true,
"optional": true,
"requires": {
"punycode": "1.4.1"
}
},
"tunnel-agent": {
"version": "0.6.0",
"bundled": true,
"optional": true,
"requires": {
"safe-buffer": "5.0.1"
}
},
"tweetnacl": {
"version": "0.14.5",
"bundled": true,
"optional": true
},
"uid-number": {
"version": "0.0.6",
"bundled": true,
"optional": true
},
"util-deprecate": {
"version": "1.0.2",
"bundled": true
},
"uuid": {
"version": "3.0.1",
"bundled": true,
"optional": true
},
"verror": {
"version": "1.3.6",
"bundled": true,
"optional": true,
"requires": {
"extsprintf": "1.0.2"
}
},
"wide-align": {
"version": "1.1.2",
"bundled": true,
"optional": true,
"requires": {
"string-width": "1.0.2"
}
},
"wrappy": {
"version": "1.0.2",
"bundled": true
}
}
},
"gkt": { "gkt": {
"version": "https://tgz.pm2.io/gkt-1.0.0.tgz", "version": "https://tgz.pm2.io/gkt-1.0.0.tgz",
"integrity": "sha1-QFUCsAfzGcP0cXXER0UnMA8qta0=", "integrity": "sha1-QFUCsAfzGcP0cXXER0UnMA8qta0=",
...@@ -756,6 +1561,41 @@ ...@@ -756,6 +1561,41 @@
"moment": "2.19.1" "moment": "2.19.1"
} }
}, },
"mongodb": {
"version": "2.2.33",
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.33.tgz",
"integrity": "sha1-tTfEcdNKZlG0jzb9vyl1A0Dgi1A=",
"requires": {
"es6-promise": "3.2.1",
"mongodb-core": "2.1.17",
"readable-stream": "2.2.7"
},
"dependencies": {
"readable-stream": {
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz",
"integrity": "sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE=",
"requires": {
"buffer-shims": "1.0.0",
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
}
}
},
"mongodb-core": {
"version": "2.1.17",
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.17.tgz",
"integrity": "sha1-pBizN6FKFJkPtRC5I97mqBMXPfg=",
"requires": {
"bson": "1.0.4",
"require_optional": "1.0.1"
}
},
"ms": { "ms": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
...@@ -766,6 +1606,12 @@ ...@@ -766,6 +1606,12 @@
"resolved": "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz", "resolved": "http://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz",
"integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s="
}, },
"nan": {
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.9.2.tgz",
"integrity": "sha512-ltW65co7f3PQWBDbqVvaU1WtFJUsNW7sWWm4HINhbMQIyVyzIeyZ8toX5TC5eeooE6piZoaEh4cZkueSKG3KYw==",
"optional": true
},
"needle": { "needle": {
"version": "1.6.0", "version": "1.6.0",
"resolved": "http://registry.npm.taobao.org/needle/download/needle-1.6.0.tgz", "resolved": "http://registry.npm.taobao.org/needle/download/needle-1.6.0.tgz",
...@@ -1143,6 +1989,15 @@ ...@@ -1143,6 +1989,15 @@
"resolved": "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz", "resolved": "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz",
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
}, },
"require_optional": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz",
"integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==",
"requires": {
"resolve-from": "2.0.0",
"semver": "5.4.1"
}
},
"resolve": { "resolve": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "http://registry.npm.taobao.org/resolve/download/resolve-1.5.0.tgz", "resolved": "http://registry.npm.taobao.org/resolve/download/resolve-1.5.0.tgz",
...@@ -1151,6 +2006,11 @@ ...@@ -1151,6 +2006,11 @@
"path-parse": "1.0.5" "path-parse": "1.0.5"
} }
}, },
"resolve-from": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
},
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
"body-parser": "^1.18.2", "body-parser": "^1.18.2",
"child_process": "^1.0.2", "child_process": "^1.0.2",
"express": "^4.16.2", "express": "^4.16.2",
"mongodb": "^2.2.33",
"pm2": "^2.7.2" "pm2": "^2.7.2"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment