Commit 2f6df8e7 authored by 刘松's avatar 刘松

final commit

parents
File added
运营平台说明:
1、datareceiver
遍历nginx 日志写到 数据库 requestdatas
部署位置: 54.223.242.95
2、yunbao-server-api
镜像: registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbao-data-api:latest
部署位置: 54.223.242.95
启动脚本: /home/ubuntu/scripts/yunbaoapi.sh
3、yunbao-server-ui
镜像: registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbaodata:latest
部署位置: 54.223.242.95
启动脚本: /home/ubuntu/scripts/yunbaoui.sh
FROM reg.yunpro.cn/library/node:9.11.1
WORKDIR /app
ENV PORT=8808
ENV PROJECT_LEVEL=production
RUN \
rm /etc/localtime && \
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY package.json /app/
COPY . /app
ENV NODE_ENV='production'
EXPOSE 8808
CMD node index.js
\ No newline at end of file
image: clean
@echo "building docker image"
@docker build -t registry.cn-hangzhou.aliyuncs.com/xiaoyun-ssp/receiver-api .
push:
@docker push registry.cn-hangzhou.aliyuncs.com/xiaoyun-ssp/receiver-api
clean:
@echo "cleanning"
\ No newline at end of file
const {
ESHOST = 'http://52.81.59.169:9200',
MONGO_DB = 'mongodb://localhost:27017/xiaoyunssp?authSource=admin',
MONGO_LOG_DB = 'mongodb://localhost:27017/xiaoyunsspdev?authSource=admin',
} = process.env;
module.exports = {
ESHOST,
MONGO_DB: MONGO_DB.replace(/&/g, ','),
MONGO_LOG_DB: MONGO_LOG_DB.replace(/&/g, ',')
};
\ No newline at end of file
const config = process.env.NODE_ENV === 'production'
? require('./prod')
: require('./dev');
console.log('RUN as ', process.env.NODE_ENV === 'production' ? 'Production' : 'Development');
module.exports = config;
\ No newline at end of file
const {
ESHOST = 'http://172.31.10.99:9200',
MONGO_DB = 'mongodb://172.31.13.47:1301,172.31.0.156:1301,172.31.10.99:1301/xiaoyunssp',
MONGO_LOG_DB = 'mongodb://172.31.13.47:1301,172.31.0.156:1301,172.31.10.99:1301/xiaoyunsspdev'
} = process.env;
module.exports = {
ESHOST,
MONGO_DB: MONGO_DB.replace(/&/g, ','),
MONGO_LOG_DB: MONGO_LOG_DB.replace(/&/g, ',')
};
\ No newline at end of file
const mongoose = require('mongoose');
const {
ObjectId
} = mongoose.SchemaTypes;
const schema = mongoose.Schema({
filename: String,
lines: String
}, {
timestamps: true
});
module.exports = mongoose.model('file', schema);
\ No newline at end of file
const mongoose = require('mongoose');
const {
ObjectId
} = mongoose.SchemaTypes;
const schema = mongoose.Schema({
nginxTime: Number,
filename: String,
data: Object
}, {
timestamps: true
});
module.exports = mongoose.model('requestdata', schema);
\ No newline at end of file
const express = require('express');
const path = require('path');
const bodyParser = require('body-parser');
var morgan = require('morgan');
const request = require('request');
const app = express();
const { PORT = 8808 } = process.env;
const mongoose = require('mongoose');
const config = require('./config');
const { check, getInfo } = require('./scripts/logparser.js');
const url = 'http://forward.yunbao.hoogame.cn';
/*app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json());
app.use(morgan('combined'));*/
const { MONGO_DB } = process.env;
app.use(function (req, res) {
console.dir(req.query);
console.dir(req.body);
request(url).pipe(res);
});
mongoose.connect(MONGO_DB || config.MONGO_DB, {});
console.log('MONGO CONNECT INFO: ', MONGO_DB || config.MONGO_DB);
/*app.use('/*',(req, res) => {
console.dir(req.query);
console.dir(req.body);
res.send({ status: 'ok' });
});*/
getInfo(path.join(__dirname,'./files'));
/*setInterval(() => {
getInfo(path.join(__dirname,'./files'));
}, 1000 * 60 * 10); */
app.listen(PORT, () => console.log(`index page app listening on port ${PORT}!`))
\ No newline at end of file
{
"name": "datareceiver",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "NODE_ENV='production' node index.js"
},
"dependencies": {
"body-parser": "^1.19.0",
"compressing": "^1.5.1",
"elasticsearch": "^16.7.2",
"express": "^4.17.1",
"linebyline": "^1.3.0",
"moment": "^2.29.1",
"mongoose": "^5.11.18",
"morgan": "^1.10.0",
"readline": "^1.3.0",
"request": "^2.88.2"
}
}
const fs = require("fs");
const path = require('path');
const readline = require('readline');
const moment = require('moment');
const compressing = require('compressing');
const elasticsearch= require('elasticsearch');
const child_process = require('child_process');
const { ESHOST } = require('../config');
const client = new elasticsearch.Client({
host: ESHOST,
log: 'trace',
apiVersion: '7.x', // use the same version of your Elasticsearch instance
});
let doing = false;
function decodeNginxLog(c) {
let r = '';
for (let i = 0; i < c.length;) {
if (c[i] === '\\' && c[i + 1] === 'x') {
let j = i;
let hexList = [];
while(true) {
if (c[j] === '\\' && c[j + 1] === 'x') {
hexList.push(c[j + 2]);
hexList.push(c[j + 3]);
} else {
break;
}
j += 4;
}
r += Buffer.from(hexList.join(''), 'hex').toString('utf8');
i = j;
} else{
r += c[i];
i++;
}
}
return r;
}
async function decompress(fileName) {
return new Promise(function(resolve,reject) {
compressing.gzip.uncompress(fileName, `${fileName}.txt`)
.then(() => {
resolve(`${fileName}.txt`);
})
.catch(err => {
console.error(err);
reject(err);
});
})
}
function stringToBase64(str){
var base64Str = new Buffer(str).toString('base64');
return base64Str;
}
function base64ToString(base64Str){
var str = new Buffer(base64Str,'base64').toString();
return str;
}
async function parseFile(fileName) {
let count = 0;
console.dir('parseFile 开始处理');
let fReadName = await decompress(fileName);
let id = await child_process.execSync('wc -l ' + fReadName + "| awk '{print $1}'");
let num = parseInt(id.toString().trim());
return new Promise(function(resolve,reject) {
const fRead = fs.createReadStream(fReadName);
const objReadline = readline.createInterface({
input: fRead
});
objReadline.on('line', async (line, linecount) => {
count++;
if(line.indexOf('/Log/logdata')>=0 || line.indexOf('setting?h5Type=')>=0 || line.indexOf('/plugin/config')>=0) {
let time_string = line.split("[")[1].split("]")[0].split(" ")[0];
let time = moment(time_string,'DD/MMM/YYYY:HH:mm:ss').format('x')
let info = decodeNginxLog(line).split('request_body:')[1].trim();
let data = {};
if(info.indexOf('resp_body') >= 0) info = info.split('resp_body')[0].trim();
if(info.indexOf('{') >=0) {
try{
info = JSON.parse(info);
} catch(e){
console.dir(e);
console.dir(info);
console.dir(decodeNginxLog(line).split('request_body:')[1].trim());
console.dir(decodeNginxLog(line));
console.dir(line);
console.log('end============')
}
let data = {};
if(info.encryption) {
delete info.encryption;
for(let k in info) {
let key = base64ToString(k);
data[key] = base64ToString(decodeURIComponent(info[k]));
}
data['encryption'] = 1;
info = data;
}
if(info.deviceInfo && info.deviceInfo.indexOf('{') >=0) {
info.deviceInfo = JSON.parse(decodeURIComponent(info.deviceInfo));
}
} else info = null;
if(info && line.indexOf('/plugin/config') >= 0) {
//if(info.sdk_version && info.sdk_version <= '1.2.1') { info.action = 'show_yunbao'; }
if((info.sdk_version && info.sdk_version <= '1.2.1') || info.sdk_version == '1.2.3') { info.action = 'show_yunbao'; }
else info = null;
}
if(info && line.indexOf('setting?h5Type=') >= 0 ) {
if(info.sdk_version && info.sdk_version <= '1.1.5') {
let pluginId = line.split('setting?h5Type=')[1].split('&')[0];
if(pluginId && pluginId.length) {
info.action = 'enter_plugin';
info.pluginId = parseInt(pluginId);
}
} else info = null;
}
if(info) {
/*await client.create({
index: 'xiaoyunssp',
id: Date.now() + '_' + Math.random().toString(36).substr(2) + '_' + info.action,
type: 'log',
body: info
});*/
if(info && info.osType) info.osType = info.osType.toString();
if(num <= count) {
console.dir('done' + count);
resolve({ count })
}
}
}
});
objReadline.on('close', ()=>{
console.dir('close done==============');
});
})
}
const sleep = function (ms){
return new Promise(resolve => setTimeout(resolve, ms))
}
const check = async (entry) => {
if(doing) {
console.log('执行中');
return;
} else {
if(entry.indexOf('.txt') >=0 || entry.indexOf('ui.') >=0 || entry.indexOf('.gz') == -1) {
console.log('格式错误');
return;
}
doing = true;
console.log('开始处理' + entry);
let rep = await parseFile(entry);
console.log('处理完成' + entry);
doing = false;
return rep;
}
}
const getInfo = async (entry) => {
const dirInfo = fs.readdirSync(entry);
for(let item of dirInfo) {
const location = path.join(entry,item);
const info = fs.statSync(location);
if(info.isDirectory()) {
await getInfo(location);
} else {
if(doing) {
break;
}
let rep = await check(location);
await child_process.execSync(`rm ${location}.txt`);
}
}
}
getInfo('20210415');
//exports.check = check;
\ No newline at end of file
const fs = require("fs");
const path = require('path');
const readline = require('readline');
const moment = require('moment');
const compressing = require('compressing');
const elasticsearch= require('elasticsearch');
const FileData = require('../db/mongo/file');
const RequestData = require('../db/mongo/requestdata');
const child_process = require('child_process');
const { ESHOST } = require('../config');
const client = new elasticsearch.Client({
host: ESHOST,
log: 'trace',
apiVersion: '7.x', // use the same version of your Elasticsearch instance
});
let doing = false;
function decodeNginxLog(c) {
let r = '';
for (let i = 0; i < c.length;) {
if (c[i] === '\\' && c[i + 1] === 'x') {
let j = i;
let hexList = [];
while(true) {
if (c[j] === '\\' && c[j + 1] === 'x') {
hexList.push(c[j + 2]);
hexList.push(c[j + 3]);
} else {
break;
}
j += 4;
}
r += Buffer.from(hexList.join(''), 'hex').toString('utf8');
i = j;
} else{
r += c[i];
i++;
}
}
return r;
}
async function decompress(fileName) {
return new Promise(function(resolve,reject) {
compressing.gzip.uncompress(fileName, `${fileName}.txt`)
.then(() => {
resolve(`${fileName}.txt`);
})
.catch(err => {
console.error(err);
reject(err);
});
})
}
function stringToBase64(str){
var base64Str = new Buffer(str).toString('base64');
return base64Str;
}
function base64ToString(base64Str){
var str = new Buffer(base64Str,'base64').toString();
return str;
}
async function parseFile(fileName) {
let count = 0;
let filedata = await FileData.findOne({ filename: fileName });
if(filedata) {
return null;
} else console.dir('parseFile 开始处理');
let fReadName = await decompress(fileName);
let id = await child_process.execSync('wc -l ' + fReadName + "| awk '{print $1}'");
let num = parseInt(id.toString().trim());
return new Promise(function(resolve,reject) {
const fRead = fs.createReadStream(fReadName);
const objReadline = readline.createInterface({
input: fRead
});
objReadline.on('line', async (line, linecount) => {
count++;
if(line.indexOf('/Log/logdata')>=0 || line.indexOf('setting?h5Type=')>=0 || line.indexOf('/plugin/config')>=0) {
let time_string = line.split("[")[1].split("]")[0].split(" ")[0];
let time = moment(time_string,'DD/MMM/YYYY:HH:mm:ss').format('x')
let info = decodeNginxLog(line).split('request_body:')[1].trim();
let data = {};
if(info.indexOf('resp_body') >= 0) info = info.split('resp_body')[0].trim();
if(info.indexOf('{') >=0) {
info = JSON.parse(info);
let data = {};
if(info.encryption) {
delete info.encryption;
for(let k in info) {
let key = base64ToString(k);
data[key] = base64ToString(decodeURIComponent(info[k]));
}
data['encryption'] = 1;
info = data;
}
if(info.deviceInfo && info.deviceInfo.indexOf('{') >=0) {
info.deviceInfo = JSON.parse(decodeURIComponent(info.deviceInfo));
}
} else info = null;
if(info && line.indexOf('/plugin/config') >= 0) {
if((info.sdk_version && info.sdk_version <= '1.2.1') || info.sdk_version == '1.2.3') { info.action = 'show_yunbao'; }
else info = null;
}
if(info && line.indexOf('setting?h5Type=') >= 0 ) {
if(info.sdk_version && info.sdk_version <= '1.1.5') {
let pluginId = line.split('setting?h5Type=')[1].split('&')[0];
if(pluginId && pluginId.length) {
info.action = 'enter_plugin';
info.pluginId = parseInt(pluginId);
}
} else info = null;
}
if(info) {
/*await client.create({
index: 'xiaoyunssp',
id: Date.now() + '_' + Math.random().toString(36).substr(2) + '_' + info.action,
type: 'log',
body: info
});*/
if(info.action == 'ad' && info.appId='52P455VrhbIVFIeaLS9DwL56XzMNPEAn')
fs.appendFile('./log.txt', JSON.stringify(info), (err) => {
if (err) throw err;
console.log('数据已被追加到文件');
});
console.dir(info);
let rep = await new RequestData({
nginxTime: time,
filename: fileName,
data: info
}).save();
if(num <= count) {
console.dir('done' + count);
resolve({ count })
}
}
}
});
objReadline.on('close', ()=>{
console.dir('close done==============');
});
})
}
const sleep = function (ms){
return new Promise(resolve => setTimeout(resolve, ms))
}
const check = async (entry) => {
if(doing) {
console.log('执行中');
return;
} else {
if(entry.indexOf('.txt') >=0 || entry.indexOf('ui.') >=0 || entry.indexOf('.gz') == -1) {
console.log('格式错误');
return;
}
doing = true;
console.log('开始处理' + entry);
let rep = await parseFile(entry);
console.log('处理完成' + entry);
doing = false;
return rep;
}
}
const getInfo = async (entry) => {
const dirInfo = fs.readdirSync(entry);
for(let item of dirInfo) {
const location = path.join(entry,item);
const info = fs.statSync(location);
if(info.isDirectory()) {
await getInfo(location);
} else {
if(doing) {
break;
}
let rep = await check(location);
if(rep) {
await new FileData({
filename: location,
lines: rep ? rep.count : 0
}).save();
await child_process.execSync(`rm ${location}.txt`);
console.dir("处理" + location)
} else { console.dir('没处理' + location) }
}
}
}
exports.getInfo = getInfo;
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/bson@*":
version "4.0.3"
resolved "https://registry.npm.taobao.org/@types/bson/download/@types/bson-4.0.3.tgz#30889d2ffde6262abbe38659364c631454999fbf"
integrity sha1-MIidL/3mJiq744ZZNkxjFFSZn78=
dependencies:
"@types/node" "*"
"@types/mongodb@^3.5.27":
version "3.6.8"
resolved "https://registry.npm.taobao.org/@types/mongodb/download/@types/mongodb-3.6.8.tgz#f80f0a3022c44d8db659a936434403ca3f4661df"
integrity sha1-+A8KMCLETY22Wak2Q0QDyj9GYd8=
dependencies:
"@types/bson" "*"
"@types/node" "*"
"@types/node@*":
version "14.14.31"
resolved "https://registry.npm.taobao.org/@types/node/download/@types/node-14.14.31.tgz?cache=0&sync_timestamp=1613758114120&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-14.14.31.tgz#72286bd33d137aa0d152d47ec7c1762563d34055"
integrity sha1-cihr0z0TeqDRUtR+x8F2JWPTQFU=
accepts@~1.3.7:
version "1.3.7"
resolved "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
integrity sha1-UxvHJlF6OytB+FACHGzBXqq1B80=
dependencies:
mime-types "~2.1.24"
negotiator "0.6.2"
agentkeepalive@^3.4.1:
version "3.5.2"
resolved "https://registry.npm.taobao.org/agentkeepalive/download/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67"
integrity sha1-oROSTdP6JKC8O3gQjEUMKr7gD2c=
dependencies:
humanize-ms "^1.2.1"
ajv@^6.12.3:
version "6.12.6"
resolved "https://registry.npm.taobao.org/ajv/download/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha1-uvWmLoArB9l3A0WG+MO69a3ybfQ=
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
ansi-regex@^2.0.0:
version "2.1.1"
resolved "https://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8=
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz?cache=0&sync_timestamp=1611326384145&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fansi-styles%2Fdownload%2Fansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=
array-flatten@1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz?cache=0&sync_timestamp=1574313293899&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
asn1@~0.2.3:
version "0.2.4"
resolved "https://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
integrity sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=
dependencies:
safer-buffer "~2.1.0"
assert-plus@1.0.0, assert-plus@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
aws-sign2@~0.7.0:
version "0.7.0"
resolved "https://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
aws4@^1.8.0:
version "1.11.0"
resolved "https://registry.npm.taobao.org/aws4/download/aws4-1.11.0.tgz?cache=0&sync_timestamp=1604101421225&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Faws4%2Fdownload%2Faws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
integrity sha1-1h9G2DslGSUOJ4Ta9bCUeai0HFk=
basic-auth@~2.0.1:
version "2.0.1"
resolved "https://registry.npm.taobao.org/basic-auth/download/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a"
integrity sha1-uZgnm/R844NEtPPPkW1Gebv1Hjo=
dependencies:
safe-buffer "5.1.2"
bcrypt-pbkdf@^1.0.0:
version "1.0.2"
resolved "https://registry.npm.taobao.org/bcrypt-pbkdf/download/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
dependencies:
tweetnacl "^0.14.3"
bl@^1.0.0:
version "1.2.3"
resolved "https://registry.npm.taobao.org/bl/download/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7"
integrity sha1-Ho3YAULqyA1xWMnczAR/tiDgNec=
dependencies:
readable-stream "^2.3.5"
safe-buffer "^5.1.1"
bl@^2.2.1:
version "2.2.1"
resolved "https://registry.npm.taobao.org/bl/download/bl-2.2.1.tgz#8c11a7b730655c5d56898cdc871224f40fd901d5"
integrity sha1-jBGntzBlXF1WiYzchxIk9A/ZAdU=
dependencies:
readable-stream "^2.3.5"
safe-buffer "^5.1.1"
bluebird@3.5.1:
version "3.5.1"
resolved "https://registry.npm.taobao.org/bluebird/download/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
integrity sha1-2VUfnemPH82h5oPRfukaBgLuLrk=
body-parser@1.19.0, body-parser@^1.19.0:
version "1.19.0"
resolved "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
integrity sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io=
dependencies:
bytes "3.1.0"
content-type "~1.0.4"
debug "2.6.9"
depd "~1.1.2"
http-errors "1.7.2"
iconv-lite "0.4.24"
on-finished "~2.3.0"
qs "6.7.0"
raw-body "2.4.0"
type-is "~1.6.17"
bson@^1.1.4:
version "1.1.5"
resolved "https://registry.npm.taobao.org/bson/download/bson-1.1.5.tgz#2aaae98fcdf6750c0848b0cba1ddec3c73060a34"
integrity sha1-Kqrpj832dQwISLDLod3sPHMGCjQ=
buffer-alloc-unsafe@^1.1.0:
version "1.1.0"
resolved "https://registry.npm.taobao.org/buffer-alloc-unsafe/download/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0"
integrity sha1-vX3CauKXLQ7aJTvgYdupkjScGfA=
buffer-alloc@^1.2.0:
version "1.2.0"
resolved "https://registry.npm.taobao.org/buffer-alloc/download/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec"
integrity sha1-iQ3ZDZI6hz4I4Q5f1RpX5bfM4Ow=
dependencies:
buffer-alloc-unsafe "^1.1.0"
buffer-fill "^1.0.0"
buffer-crc32@~0.2.3:
version "0.2.13"
resolved "https://registry.npm.taobao.org/buffer-crc32/download/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
buffer-fill@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/buffer-fill/download/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
integrity sha1-+PeLdniYiO858gXNY39o5wISKyw=
bytes@3.1.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=
caseless@~0.12.0:
version "0.12.0"
resolved "https://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
chalk@^1.0.0:
version "1.1.3"
resolved "https://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz?cache=0&sync_timestamp=1591687042638&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fchalk%2Fdownload%2Fchalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=
dependencies:
ansi-styles "^2.2.1"
escape-string-regexp "^1.0.2"
has-ansi "^2.0.0"
strip-ansi "^3.0.0"
supports-color "^2.0.0"
combined-stream@^1.0.6, combined-stream@~1.0.6:
version "1.0.8"
resolved "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
integrity sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=
dependencies:
delayed-stream "~1.0.0"
compressing@^1.5.1:
version "1.5.1"
resolved "https://registry.npm.taobao.org/compressing/download/compressing-1.5.1.tgz#d031a3311b8c2ed6561a8431671d5a844540482d"
integrity sha1-0DGjMRuMLtZWGoQxZx1ahEVASC0=
dependencies:
flushwritable "^1.0.0"
get-ready "^1.0.0"
iconv-lite "^0.5.0"
mkdirp "^0.5.1"
pump "^3.0.0"
streamifier "^0.1.1"
tar-stream "^1.5.2"
yauzl "^2.7.0"
yazl "^2.4.2"
content-disposition@0.5.3:
version "0.5.3"
resolved "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
integrity sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70=
dependencies:
safe-buffer "5.1.2"
content-type@~1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
integrity sha1-4TjMdeBAxyexlm/l5fjJruJW/js=
cookie-signature@1.0.6:
version "1.0.6"
resolved "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
cookie@0.4.0:
version "0.4.0"
resolved "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525865178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo=
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
dashdash@^1.12.0:
version "1.14.1"
resolved "https://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
dependencies:
assert-plus "^1.0.0"
debug@2.6.9:
version "2.6.9"
resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1607566517339&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=
dependencies:
ms "2.0.0"
debug@3.1.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz?cache=0&sync_timestamp=1607566517339&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=
dependencies:
ms "2.0.0"
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
denque@^1.4.1:
version "1.5.0"
resolved "https://registry.npm.taobao.org/denque/download/denque-1.5.0.tgz#773de0686ff2d8ec2ff92914316a47b73b1c73de"
integrity sha1-dz3gaG/y2Owv+SkUMWpHtzscc94=
depd@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
depd@~2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/depd/download/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
integrity sha1-tpYWPMdXVg0JzyLMj60Vcbeedt8=
destroy@~1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
ecc-jsbn@~0.1.1:
version "0.1.2"
resolved "https://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
dependencies:
jsbn "~0.1.0"
safer-buffer "^2.1.0"
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
elasticsearch@^16.7.2:
version "16.7.2"
resolved "https://registry.npm.taobao.org/elasticsearch/download/elasticsearch-16.7.2.tgz#53ebf4563f97e43acade5d79d895d813bdc9f949"
integrity sha1-U+v0Vj+X5DrK3l152JXYE73J+Uk=
dependencies:
agentkeepalive "^3.4.1"
chalk "^1.0.0"
lodash "^4.17.10"
encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
end-of-stream@^1.0.0, end-of-stream@^1.1.0:
version "1.4.4"
resolved "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
integrity sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=
dependencies:
once "^1.4.0"
escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
escape-string-regexp@^1.0.2:
version "1.0.5"
resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
etag@~1.8.1:
version "1.8.1"
resolved "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
express@^4.17.1:
version "4.17.1"
resolved "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
integrity sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ=
dependencies:
accepts "~1.3.7"
array-flatten "1.1.1"
body-parser "1.19.0"
content-disposition "0.5.3"
content-type "~1.0.4"
cookie "0.4.0"
cookie-signature "1.0.6"
debug "2.6.9"
depd "~1.1.2"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
finalhandler "~1.1.2"
fresh "0.5.2"
merge-descriptors "1.0.1"
methods "~1.1.2"
on-finished "~2.3.0"
parseurl "~1.3.3"
path-to-regexp "0.1.7"
proxy-addr "~2.0.5"
qs "6.7.0"
range-parser "~1.2.1"
safe-buffer "5.1.2"
send "0.17.1"
serve-static "1.14.1"
setprototypeof "1.1.1"
statuses "~1.5.0"
type-is "~1.6.18"
utils-merge "1.0.1"
vary "~1.1.2"
extend@~3.0.2:
version "3.0.2"
resolved "https://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
integrity sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
extsprintf@^1.2.0:
version "1.4.0"
resolved "https://registry.npm.taobao.org/extsprintf/download/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
fast-deep-equal@^3.1.1:
version "3.1.3"
resolved "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-3.1.3.tgz?cache=0&sync_timestamp=1591599675178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha1-On1WtVnWy8PrUSMlJE5hmmXGxSU=
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha1-h0v2nG9ATCtdmcSBNBOZ/VWJJjM=
fd-slicer@~1.1.0:
version "1.1.0"
resolved "https://registry.npm.taobao.org/fd-slicer/download/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=
dependencies:
pend "~1.2.0"
finalhandler@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
integrity sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=
dependencies:
debug "2.6.9"
encodeurl "~1.0.2"
escape-html "~1.0.3"
on-finished "~2.3.0"
parseurl "~1.3.3"
statuses "~1.5.0"
unpipe "~1.0.0"
flushwritable@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/flushwritable/download/flushwritable-1.0.0.tgz#3e328d8fde412ad47e738e3be750b4d290043498"
integrity sha1-PjKNj95BKtR+c44751C00pAENJg=
forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
form-data@~2.3.2:
version "2.3.3"
resolved "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
integrity sha1-3M5SwF9kTymManq5Nr1yTO/786Y=
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.6"
mime-types "^2.1.12"
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
fresh@0.5.2:
version "0.5.2"
resolved "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
fs-constants@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/fs-constants/download/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"
integrity sha1-a+Dem+mYzhavivwkSXue6bfM2a0=
get-ready@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/get-ready/download/get-ready-1.0.0.tgz#f91817f1e9adecfea13a562adfc8de883ab34782"
integrity sha1-+RgX8emt7P6hOlYq38jeiDqzR4I=
getpass@^0.1.1:
version "0.1.7"
resolved "https://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
dependencies:
assert-plus "^1.0.0"
har-schema@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
har-validator@~5.1.3:
version "5.1.5"
resolved "https://registry.npm.taobao.org/har-validator/download/har-validator-5.1.5.tgz?cache=0&sync_timestamp=1596084327526&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhar-validator%2Fdownload%2Fhar-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd"
integrity sha1-HwgDufjLIMD6E4It8ezds2veHv0=
dependencies:
ajv "^6.12.3"
har-schema "^2.0.0"
has-ansi@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=
dependencies:
ansi-regex "^2.0.0"
http-errors@1.7.2:
version "1.7.2"
resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz?cache=0&sync_timestamp=1593407611415&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
integrity sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8=
dependencies:
depd "~1.1.2"
inherits "2.0.3"
setprototypeof "1.1.1"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
http-errors@~1.7.2:
version "1.7.3"
resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.3.tgz?cache=0&sync_timestamp=1593407611415&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
integrity sha1-bGGeT5xgMIw4UZSYwU+7EKrOuwY=
dependencies:
depd "~1.1.2"
inherits "2.0.4"
setprototypeof "1.1.1"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
http-signature@~1.2.0:
version "1.2.0"
resolved "https://registry.npm.taobao.org/http-signature/download/http-signature-1.2.0.tgz?cache=0&sync_timestamp=1600868483922&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-signature%2Fdownload%2Fhttp-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
dependencies:
assert-plus "^1.0.0"
jsprim "^1.2.2"
sshpk "^1.7.0"
humanize-ms@^1.2.1:
version "1.2.1"
resolved "https://registry.npm.taobao.org/humanize-ms/download/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed"
integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=
dependencies:
ms "^2.0.0"
iconv-lite@0.4.24:
version "0.4.24"
resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz?cache=0&sync_timestamp=1594184325364&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficonv-lite%2Fdownload%2Ficonv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=
dependencies:
safer-buffer ">= 2.1.2 < 3"
iconv-lite@^0.5.0:
version "0.5.2"
resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.5.2.tgz?cache=0&sync_timestamp=1594184325364&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficonv-lite%2Fdownload%2Ficonv-lite-0.5.2.tgz#af6d628dccfb463b7364d97f715e4b74b8c8c2b8"
integrity sha1-r21ijcz7RjtzZNl/cV5LdLjIwrg=
dependencies:
safer-buffer ">= 2.1.2 < 3"
inherits@2.0.3:
version "2.0.3"
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
inherits@2.0.4, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=
ipaddr.js@1.9.1:
version "1.9.1"
resolved "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
integrity sha1-v/OFQ+64mEglB5/zoqjmy9RngbM=
is-typedarray@~1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha1-afaofZUTq4u4/mO9sJecRI5oRmA=
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.npm.taobao.org/jsprim/download/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
dependencies:
assert-plus "1.0.0"
extsprintf "1.3.0"
json-schema "0.2.3"
verror "1.10.0"
kareem@2.3.2:
version "2.3.2"
resolved "https://registry.npm.taobao.org/kareem/download/kareem-2.3.2.tgz#78c4508894985b8d38a0dc15e1a8e11078f2ca93"
integrity sha1-eMRQiJSYW404oNwV4ajhEHjyypM=
linebyline@^1.3.0:
version "1.3.0"
resolved "https://registry.npm.taobao.org/linebyline/download/linebyline-1.3.0.tgz#6ef54ceab832d23f7841ed2f296fe9b2f6dade94"
integrity sha1-bvVM6rgy0j94Qe0vKW/psvba3pQ=
lodash@^4.17.10:
version "4.17.21"
resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha1-Z5WRxWTDv/quhFTPCz3zcMPWkRw=
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
memory-pager@^1.0.2:
version "1.5.0"
resolved "https://registry.npm.taobao.org/memory-pager/download/memory-pager-1.5.0.tgz#d8751655d22d384682741c972f2c3d6dfa3e66b5"
integrity sha1-2HUWVdItOEaCdByXLyw9bfo+ZrU=
merge-descriptors@1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
methods@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
mime-db@1.46.0:
version "1.46.0"
resolved "https://registry.npm.taobao.org/mime-db/download/mime-db-1.46.0.tgz?cache=0&sync_timestamp=1613194697983&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-db%2Fdownload%2Fmime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee"
integrity sha1-Ymd0in95lZTePLyM3pHe80lmHO4=
mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24:
version "2.1.29"
resolved "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.29.tgz?cache=0&sync_timestamp=1613608475804&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-types%2Fdownload%2Fmime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2"
integrity sha1-HUq3faZLkfX3JInfKSNlY3VLsbI=
dependencies:
mime-db "1.46.0"
mime@1.6.0:
version "1.6.0"
resolved "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=
minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=
mkdirp@^0.5.1:
version "0.5.5"
resolved "https://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
integrity sha1-2Rzv1i0UNsoPQWIOJRKI1CAJne8=
dependencies:
minimist "^1.2.5"
moment@^2.29.1:
version "2.29.1"
resolved "https://registry.npm.taobao.org/moment/download/moment-2.29.1.tgz?cache=0&sync_timestamp=1601983423917&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
integrity sha1-sr52n6MZQL6e7qZGnAdeNQBvo9M=
mongodb@3.6.4:
version "3.6.4"
resolved "https://registry.npm.taobao.org/mongodb/download/mongodb-3.6.4.tgz#ca59fd65b06831308262372ef9df6b78f9da97be"
integrity sha1-yln9ZbBoMTCCYjcu+d9rePnal74=
dependencies:
bl "^2.2.1"
bson "^1.1.4"
denque "^1.4.1"
require_optional "^1.0.1"
safe-buffer "^5.1.2"
optionalDependencies:
saslprep "^1.0.0"
mongoose-legacy-pluralize@1.0.2:
version "1.0.2"
resolved "https://registry.npm.taobao.org/mongoose-legacy-pluralize/download/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4"
integrity sha1-O6n5H6UHtRhtOZ+0CFS/8Y+1Y+Q=
mongoose@^5.11.18:
version "5.11.18"
resolved "https://registry.npm.taobao.org/mongoose/download/mongoose-5.11.18.tgz#76fdcefeb2afc7409705fc44b58045953bba5ee1"
integrity sha1-dv3O/rKvx0CXBfxEtYBFlTu6XuE=
dependencies:
"@types/mongodb" "^3.5.27"
bson "^1.1.4"
kareem "2.3.2"
mongodb "3.6.4"
mongoose-legacy-pluralize "1.0.2"
mpath "0.8.3"
mquery "3.2.4"
ms "2.1.2"
regexp-clone "1.0.0"
safe-buffer "5.2.1"
sift "7.0.1"
sliced "1.0.1"
morgan@^1.10.0:
version "1.10.0"
resolved "https://registry.npm.taobao.org/morgan/download/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7"
integrity sha1-CRd4q8H8R801CYJGU9rh+qtrF9c=
dependencies:
basic-auth "~2.0.1"
debug "2.6.9"
depd "~2.0.0"
on-finished "~2.3.0"
on-headers "~1.0.2"
mpath@0.8.3:
version "0.8.3"
resolved "https://registry.npm.taobao.org/mpath/download/mpath-0.8.3.tgz#828ac0d187f7f42674839d74921970979abbdd8f"
integrity sha1-gorA0Yf39CZ0g510khlwl5q73Y8=
mquery@3.2.4:
version "3.2.4"
resolved "https://registry.npm.taobao.org/mquery/download/mquery-3.2.4.tgz#9c5c2e285ea6c6f20673f3528973c99ee1aaa1a0"
integrity sha1-nFwuKF6mxvIGc/NSiXPJnuGqoaA=
dependencies:
bluebird "3.5.1"
debug "3.1.0"
regexp-clone "^1.0.0"
safe-buffer "5.1.2"
sliced "1.0.1"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
ms@2.1.1:
version "2.1.1"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=
ms@2.1.2:
version "2.1.2"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=
ms@^2.0.0:
version "2.1.3"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.3.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
integrity sha1-V0yBOM4dK1hh8LRFedut1gxmFbI=
negotiator@0.6.2:
version "0.6.2"
resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
integrity sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=
oauth-sign@~0.9.0:
version "0.9.0"
resolved "https://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
integrity sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=
on-finished@~2.3.0:
version "2.3.0"
resolved "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
dependencies:
ee-first "1.1.1"
on-headers@~1.0.2:
version "1.0.2"
resolved "https://registry.npm.taobao.org/on-headers/download/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f"
integrity sha1-dysK5qqlJcOZ5Imt+tkMQD6zwo8=
once@^1.3.1, once@^1.4.0:
version "1.4.0"
resolved "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
dependencies:
wrappy "1"
parseurl@~1.3.3:
version "1.3.3"
resolved "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=
path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz?cache=0&sync_timestamp=1601400247487&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-to-regexp%2Fdownload%2Fpath-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
pend@~1.2.0:
version "1.2.0"
resolved "https://registry.npm.taobao.org/pend/download/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=
performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha1-eCDZsWEgzFXKmud5JoCufbptf+I=
proxy-addr@~2.0.5:
version "2.0.6"
resolved "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz?cache=0&sync_timestamp=1582556112011&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fproxy-addr%2Fdownload%2Fproxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf"
integrity sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8=
dependencies:
forwarded "~0.1.2"
ipaddr.js "1.9.1"
psl@^1.1.28:
version "1.8.0"
resolved "https://registry.npm.taobao.org/psl/download/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24"
integrity sha1-kyb4vPsBOtzABf3/BWrM4CDlHCQ=
pump@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
integrity sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
punycode@^2.1.0, punycode@^2.1.1:
version "2.1.1"
resolved "https://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha1-tYsBCsQMIsVldhbI0sLALHv0eew=
qs@6.7.0:
version "6.7.0"
resolved "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz?cache=0&sync_timestamp=1610598179287&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=
qs@~6.5.2:
version "6.5.2"
resolved "https://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz?cache=0&sync_timestamp=1610598179287&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
integrity sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=
range-parser@~1.2.1:
version "1.2.1"
resolved "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
integrity sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=
raw-body@2.4.0:
version "2.4.0"
resolved "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
integrity sha1-oc5vucm8NWylLoklarWQWeE9AzI=
dependencies:
bytes "3.1.0"
http-errors "1.7.2"
iconv-lite "0.4.24"
unpipe "1.0.0"
readable-stream@^2.3.0, readable-stream@^2.3.5:
version "2.3.7"
resolved "https://registry.npm.taobao.org/readable-stream/download/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha1-Hsoc9xGu+BTAT2IlKjamL2yyO1c=
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.3"
isarray "~1.0.0"
process-nextick-args "~2.0.0"
safe-buffer "~5.1.1"
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
readline@^1.3.0:
version "1.3.0"
resolved "https://registry.npm.taobao.org/readline/download/readline-1.3.0.tgz#c580d77ef2cfc8752b132498060dc9793a7ac01c"
integrity sha1-xYDXfvLPyHUrEySYBg3JeTp6wBw=
regexp-clone@1.0.0, regexp-clone@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/regexp-clone/download/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63"
integrity sha1-Ii25Z2IydwViYLmSYmNUoEzpv2M=
request@^2.88.2:
version "2.88.2"
resolved "https://registry.npm.taobao.org/request/download/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
integrity sha1-1zyRhzHLWofaBH4gcjQUb2ZNErM=
dependencies:
aws-sign2 "~0.7.0"
aws4 "^1.8.0"
caseless "~0.12.0"
combined-stream "~1.0.6"
extend "~3.0.2"
forever-agent "~0.6.1"
form-data "~2.3.2"
har-validator "~5.1.3"
http-signature "~1.2.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.19"
oauth-sign "~0.9.0"
performance-now "^2.1.0"
qs "~6.5.2"
safe-buffer "^5.1.2"
tough-cookie "~2.5.0"
tunnel-agent "^0.6.0"
uuid "^3.3.2"
require_optional@^1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/require_optional/download/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e"
integrity sha1-TPNaQkf2TKPfjC7yCMxJSxyo/C4=
dependencies:
resolve-from "^2.0.0"
semver "^5.1.0"
resolve-from@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/resolve-from/download/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=
safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1589129010497&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha1-mR7GnSluAxN0fVm9/St0XDX4go0=
safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2:
version "5.2.1"
resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.1.tgz?cache=0&sync_timestamp=1589129010497&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha1-Hq+fqb2x/dTsdfWPnNtOa3gn7sY=
"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
version "2.1.2"
resolved "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=
saslprep@^1.0.0:
version "1.0.3"
resolved "https://registry.npm.taobao.org/saslprep/download/saslprep-1.0.3.tgz#4c02f946b56cf54297e347ba1093e7acac4cf226"
integrity sha1-TAL5RrVs9UKX40e6EJPnrKxM8iY=
dependencies:
sparse-bitfield "^3.0.3"
semver@^5.1.0:
version "5.7.1"
resolved "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha1-qVT5Ma66UI0we78Gnv8MAclhFvc=
send@0.17.1:
version "0.17.1"
resolved "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
integrity sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=
dependencies:
debug "2.6.9"
depd "~1.1.2"
destroy "~1.0.4"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
fresh "0.5.2"
http-errors "~1.7.2"
mime "1.6.0"
ms "2.1.1"
on-finished "~2.3.0"
range-parser "~1.2.1"
statuses "~1.5.0"
serve-static@1.14.1:
version "1.14.1"
resolved "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
integrity sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=
dependencies:
encodeurl "~1.0.2"
escape-html "~1.0.3"
parseurl "~1.3.3"
send "0.17.1"
setprototypeof@1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
integrity sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=
sift@7.0.1:
version "7.0.1"
resolved "https://registry.npm.taobao.org/sift/download/sift-7.0.1.tgz#47d62c50b159d316f1372f8b53f9c10cd21a4b08"
integrity sha1-R9YsULFZ0xbxNy+LU/nBDNIaSwg=
sliced@1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/sliced/download/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41"
integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=
sparse-bitfield@^3.0.3:
version "3.0.3"
resolved "https://registry.npm.taobao.org/sparse-bitfield/download/sparse-bitfield-3.0.3.tgz#ff4ae6e68656056ba4b3e792ab3334d38273ca11"
integrity sha1-/0rm5oZWBWuks+eSqzM004JzyhE=
dependencies:
memory-pager "^1.0.2"
sshpk@^1.7.0:
version "1.16.1"
resolved "https://registry.npm.taobao.org/sshpk/download/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
integrity sha1-+2YcC+8ps520B2nuOfpwCT1vaHc=
dependencies:
asn1 "~0.2.3"
assert-plus "^1.0.0"
bcrypt-pbkdf "^1.0.0"
dashdash "^1.12.0"
ecc-jsbn "~0.1.1"
getpass "^0.1.1"
jsbn "~0.1.0"
safer-buffer "^2.0.2"
tweetnacl "~0.14.0"
"statuses@>= 1.5.0 < 2", statuses@~1.5.0:
version "1.5.0"
resolved "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1609654438540&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
streamifier@^0.1.1:
version "0.1.1"
resolved "https://registry.npm.taobao.org/streamifier/download/streamifier-0.1.1.tgz#97e98d8fa4d105d62a2691d1dc07e820db8dfc4f"
integrity sha1-l+mNj6TRBdYqJpHR3AfoINuN/E8=
string_decoder@~1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz?cache=0&sync_timestamp=1565170823020&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring_decoder%2Fdownload%2Fstring_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
integrity sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=
dependencies:
safe-buffer "~5.1.0"
strip-ansi@^3.0.0:
version "3.0.1"
resolved "https://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=
dependencies:
ansi-regex "^2.0.0"
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz?cache=0&sync_timestamp=1611394404603&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=
tar-stream@^1.5.2:
version "1.6.2"
resolved "https://registry.npm.taobao.org/tar-stream/download/tar-stream-1.6.2.tgz?cache=0&sync_timestamp=1609236328737&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftar-stream%2Fdownload%2Ftar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555"
integrity sha1-jqVdqzeXIlPZqa+Q/c1VmuQ1xVU=
dependencies:
bl "^1.0.0"
buffer-alloc "^1.2.0"
end-of-stream "^1.0.0"
fs-constants "^1.0.0"
readable-stream "^2.3.0"
to-buffer "^1.1.1"
xtend "^4.0.0"
to-buffer@^1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/to-buffer/download/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80"
integrity sha1-STvUj2LXxD/N7TE6A9ytsuEhOoA=
toidentifier@1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
integrity sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=
tough-cookie@~2.5.0:
version "2.5.0"
resolved "https://registry.npm.taobao.org/tough-cookie/download/tough-cookie-2.5.0.tgz?cache=0&sync_timestamp=1584645751908&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ftough-cookie%2Fdownload%2Ftough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
integrity sha1-zZ+yoKodWhK0c72fuW+j3P9lreI=
dependencies:
psl "^1.1.28"
punycode "^2.1.1"
tunnel-agent@^0.6.0:
version "0.6.0"
resolved "https://registry.npm.taobao.org/tunnel-agent/download/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
dependencies:
safe-buffer "^5.0.1"
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
version "0.14.5"
resolved "https://registry.npm.taobao.org/tweetnacl/download/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
type-is@~1.6.17, type-is@~1.6.18:
version "1.6.18"
resolved "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
integrity sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=
dependencies:
media-typer "0.3.0"
mime-types "~2.1.24"
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.npm.taobao.org/uri-js/download/uri-js-4.4.1.tgz?cache=0&sync_timestamp=1610237812324&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Furi-js%2Fdownload%2Furi-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
integrity sha1-mxpSWVIlhZ5V9mnZKPiMbFfyp34=
dependencies:
punycode "^2.1.0"
util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
utils-merge@1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
uuid@^3.3.2:
version "3.4.0"
resolved "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
verror@1.10.0:
version "1.10.0"
resolved "https://registry.npm.taobao.org/verror/download/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
dependencies:
assert-plus "^1.0.0"
core-util-is "1.0.2"
extsprintf "^1.2.0"
wrappy@1:
version "1.0.2"
resolved "https://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
xtend@^4.0.0:
version "4.0.2"
resolved "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"
integrity sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q=
yauzl@^2.7.0:
version "2.10.0"
resolved "https://registry.npm.taobao.org/yauzl/download/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
dependencies:
buffer-crc32 "~0.2.3"
fd-slicer "~1.1.0"
yazl@^2.4.2:
version "2.5.1"
resolved "https://registry.npm.taobao.org/yazl/download/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35"
integrity sha1-o9ZdPdZZpbCTeFDoYJ8i//orXDU=
dependencies:
buffer-crc32 "~0.2.3"
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
BROWSER=none
ESLINT=1
{
"extends": "eslint-config-umi"
}
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/npm-debug.log*
/yarn-error.log
/yarn.lock
/package-lock.json
# production
/dist
# misc
.DS_Store
# umi
.umi
.umi-production
**/*.md
**/*.svg
**/*.ejs
**/*.html
package.json
.umi
.umi-production
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"overrides": [
{
"files": ".prettierrc",
"options": { "parser": "json" }
}
]
}
FROM node:9.11.1
WORKDIR /app
#ADD . /app/
ENV PORT=8787
ENV PROJECT_LEVEL=production
RUN \
rm /etc/localtime && \
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY package.json /app/
COPY . /app
ENV NODE_ENV='production'
EXPOSE 8787
CMD node index.js
\ No newline at end of file
FROM node:9.11.1
WORKDIR /app
#ADD . /app/
ENV PORT=8889
ENV MONGO_DB=mongodb://172.27.224.211:27017/xsb-dev?authSource=admin
ENV PROJECT_LEVEL=production
RUN \
rm /etc/localtime && \
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY package.json /app/
COPY . /app
ENV NODE_ENV='production'
EXPOSE 8889
CMD node index.js
\ No newline at end of file
image: clean
@echo "building docker image"
@docker build -t registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbao-data-api .
push:
@docker push registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbao-data-api
clean:
@echo "cleanning"
all:
@echo "building docker image"
@docker build -t registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbao-data-api .
@echo "生成docker镜像完成,准备上传"
@docker push registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbao-data-api
@echo "镜像更新完成"
alldev:
@echo "building docker image"
@docker build -t registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbao-data-api-dev . -f Dockerfile.dev
@echo "生成docker镜像完成,准备上传"
@docker push registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbao-data-api-dev
@echo "镜像更新完成"
\ No newline at end of file
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.<br>
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.<br>
You will also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.<br>
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.<br>
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.<br>
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
### Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
### Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
### Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
### Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
### `npm run build` fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
## 数据库结构
钓鱼排行榜数据库主要以mongo为主,结合 mysql和redis 实现业务流程;
mysql 部分为账户钱包存储,和转账,取现,充值等业务需求;
redis 为满足app首页,头部信息和之后频繁获取配置项的缓存需求;
mongo collection结构如下(集合名词,字段,含义),具体字段类型见源码
### 后台管理员信息集合
account {
username, // 账户
password, // 密码
nickName, // 昵称
role // 角色
}
### 订单信息集合
application {
event, // 活动/赛事id
user, // 发起用户id
from, // 付款来源(miniprogram为微信小程序)
payType: // 付款类型,目前支持,钱包付款、微信付款,之后集成支付宝
check // 核销状态
status, // 付款状态
balancelog, // 关联日志
nums, // 分配后座位号(客户端可见)
init_nums, // 初始化座位号(客户端不可见)
archive, // 归档标识
code, // 订单编码
count, // 数量
price, // 单价
money, // 金额
serveMoney, // 平台服务费
removed, // 订单删除
originMoney, // 预留
origin, // 预留
payment // 预留
}
### 文章集合
article {
title, // 标题
content, // 内容 混合h5
from, // 来源
author, // 作者
classTypes, // 文章类型
top, // 置顶状态
type, // 预留
words, // 关键字
images, // 图片集
textualContent, // 简要
times, // 阅读次数
weight, // 权重
removed: Boolean // 前端可见状态
}
### 财务日志集合
balancelog {
type, // 日志类型
backMoney, // 退款标识
application, // 关联订单,
cashPutApplication, // 关联取现订单
cashApplication, // 关联充值订单
money, // 财务金额
platformMoney, // 平台金额
time, // 时间
meta, // 备注
how, // 操作类型,阿里转账, 微信转账, 人工操作, 系统内转账
from, // 发起用户
to, // 接受用户
status // 状态
}
### 取现订单集合
cashApplication{
user, // 发起用户
money, // 取现金额
auto, // 自动转账标识(支付宝接口)
accountMoney, // 取现前余额
alipayAccount, // 阿里账户
name, // 姓名
phone, // 电话
archive, // 归档状态
status // 订单状态
}
### 充值订单集合
cashPutApplication{
user, // 发起用户
payType, // 付款类型
money, // 金额
archive, // 归档状态
status // 订单状态
}
### 评论集合
cashPutApplication{
user, // 用户
article, // 渔获文章
content, // 评论内容
}
### 活动/赛事集合
event{
name, // 名称
type, // 类型 活动 or 赛事
top, // 置顶状态
weight: Number, // 权重
tab, // 特殊标签 预留
time, // 开始时间(可读)
endTime, //报名截止时间
count: { // 人数限制
type: Number,
required: true
},
user: { // 发起用户
type: ObjectId,
ref: 'user'
},
money: { // 报名金额
type: Number,
required: true
},
numable, // 是否支持摇号
nums_done, // 摇号状态
applicationCount, // 订单数量
applicationUserCount,// 报名人数
outdate, // 过期标识
removed, // 活动|赛事取消标识
backMoney, // 退款标识
backMoneyDone, // 退款完成标识
backMoneyAmount, // 退款金额
eventRound, // ['日场','夜场']
eventType, // ['正钓','偷驴','路亚']
eventFish, // ['鲤鱼','鲫鱼', '路亚鱼种']
spot: { // 关联钓场
type: ObjectId,
ref: 'spot'
},
users: [{ // 参与用户 预留
type: ObjectId,
ref: 'user'
}],
applications: [{ // 关联订单
id: {
type: ObjectId,
ref: 'application'
},
user: {
type: ObjectId,
ref: 'ref'
},
count: {
type: Number
}
}],
posters, // 海报
icon, //封面图
content, // 注意事项
status // 状态
}
### 钓场集合
spot{
name, // 名称,
point, // 经纬度信息
verify, // 认证标识
game, // 赛事标识
activity, // 活动标识
ngeohash, // 经纬度信息 hash 值
geohash, // 经纬度信息 hash 值
address, // 地址
top, // 置顶状态
weight, // 权重
money, //收费标准
phone, // 联系电话
star, // 星级
spotType, // 钓场类型
waterSquare, // 水域面积
fishes, // 鱼种信息
waterCount, // 池塘个数
spotCount, // 钓位个数
spotDistance, // 钓位间距
rodLong, // 限杆长度
waterDepth, // 水深度
content, //简介
posters, // 海报
icon, // icon
location, // 位置信息
content, // 钓场说明
status, // 审核状态
removed, // 是否可见
user, // 关联用户
contactPhone, // 联系电话
contactName // 联系人
}
### 用户集合
user{
nickname, // 昵称
pointInfo, // 积分
speakDisable, // 禁言标识
readwarn, // 提示读取记录
uniqID, // 唯一id
sex, // 性别
headimgurl, // 头像
birthday, // 生日
sign: String, // 个性签名
address, // 地址
phone, // 手机号, 登陆使用唯一
password, // 登录密码
wechat, // 关联微信信息
alipayAccount, // 关联支付宝信息
card: { // 身份证
type: String
},
fans:Number, // 粉丝数
favorate: Number, // 关注数
name: { // 姓名
type: String
}
}
### 渔获集合
fisharticle{
(同文章集合)
}
### 关系集合 (待优化)
relation{
targetUser, // 被关注用户
fan // 关注用户
}
### 上传积分集合
uploadpoint{
phone, // 手机
point, // 积分
type, // 类型
user, // 关联网内用户
}
### 兑换币集合
point{
time, // 时间
archive, // 归档标识
coins, // 归档标识
reason, // 积分项目 ['每日签到','完成注册','实名认证','完善资料','首次关注钓场','首次参与赛事','首次参与活动','首次发布渔获','参与赛事','参与活动','发布渔获','评论渔获','分享内容']
application, // 关联订单
article, // 关联渔获
shareContent, // 关联分享信息
meta, // 备注
user, // 用户
}
### 渔获点赞日志集合 ()
fishfavor{
article, // 渔获
user, // 关注用户
removed // 状态,是否有效
}
### 钓场收藏日志集合 ()
spotfavor{
spot, // 钓场
user, // 收藏用户
removed // 状态,是否有效
}
### 大图集合(app大图配置集合,首页和钓场页)
swiper{
file:String, // 文件名称
type: String, // 类型
id: ObjectId, // 关联id
page:String // 页面信息
}
##mysql
###数据库 balances
table balance {
id INT AUTO_INCREMENT PRIMARY KEY, // 唯一id
uid VARCHAR(255), // 关联用户 uniqID
balance DECIMAL(10,2) NOT NULL, // 余额
moneyin DECIMAL(10,2) NOT NULL , // 入账
moneyout DECIMAL(10,2) NOT NULL, // 出账
frozen DECIMAL(10,2) NOT NULL // 冻结金额
}
##redis
###待定
const {
MONGO_DB = 'mongodb://localhost:27017/xiaoyunssp',
MONGO_LOG_DB = 'mongodb://localhost:27017/xiaoyunsspdev',
JWT_SECRET = '9104b291d48a4844d2a346a695d2602fa4d8ffe7328f7c98c27270b32a6b636f',
SQL_CONF = {
host: "localhost",
user:"lottery",//用户名
password:'KP6ZopZxIa9L0Lkp',//密码
database:"lottery",//数据库名
}
} = process.env;
module.exports = {
MONGO_DB: MONGO_DB.replace(/&/g, ','),
MONGO_LOG_DB: MONGO_LOG_DB.replace(/&/g, ','),
JWT_SECRET,
SQL_CONF
};
\ No newline at end of file
const config = process.env.NODE_ENV === 'production'
? require('./prod')
: require('./dev');
console.log('RUN as ', process.env.NODE_ENV === 'production' ? 'Production' : 'Development');
module.exports = config;
\ No newline at end of file
const {
MONGO_DB = 'mongodb://172.31.13.47:1301/xiaoyunssp',
MONGO_LOG_DB = 'mongodb://172.31.13.47:1301/xiaoyunsspdev',
//MONGO_DB = 'mongodb://172.27.224.211:27017/yunbaossp?authSource=admin',
JWT_SECRET = '9104b291d48a4844d2a346a695d2602fa4d8ffe7328f7c98c27270b32a6b636f',
SQL_CONF = {
host: "172.31.14.12",
user:"lottery",//用户名
password:'KP6ZopZxIa9L0Lkp',//密码
database:"lottery",//数据库名
}
} = process.env;
module.exports = {
MONGO_DB: MONGO_DB.replace(/&/g, ','),
MONGO_LOG_DB: MONGO_LOG_DB.replace(/&/g, ','),
JWT_SECRET,
SQL_CONF
};
\ No newline at end of file
const jwt = require('jsonwebtoken');
const config = require('config');
const hash = require('utils/hash');
const _ = require('lodash');
const mongoose = require('mongoose');
const Stat = require('db/mongo/stat');
const cron = require('cron');
const CronJob = cron.CronJob;
const RequestData = require('db/mongo/requestdata');
const CowRequestdata = require('db/mongolog/cowrequestdata');
const ShopRequestdata = require('db/mongolog/shoprequestdata');
const op = require('../db/op');
const xlsx = require('node-xlsx');
const moment = require('moment');
const fs = require('fs');
const pluginMap = {
'1': '转盘',
'2': '危机一发',
'3': '宝箱',
'4': '找茬',
'5': '运势',
'6': '答题',
'7': '金蛋',
'8': '猜歌',
'9': '种树',
'10': '捞金币',
'11': '套圈',
'12': '娃娃机',
'13': '转盘2',
'14': '彩球机',
'15': '刮刮卡',
'16': '剪羊毛',
'17': '桃花',
'18': '福灯',
'19': '奶牛庄园',
'20': '奶牛庄园2',
'21': '果蔬大作战',
'999': '积分',
'998': 'bind'
}
const {
ObjectId
} = require('mongoose').Types;
const actions = ["init_sdk", "play_video", "ad", "show_yunbao", "active_time", "show_list", "click_yunbao", "enter_plugin", "diversion_opened","diversion_click_download"]
/*const titleMap = {
init_sdk: 'SDK初始化',
play_video: '广告按钮点击',
ad: '广告点击',
show_yunbao: '浮标展示',
active_time: '场景时间',
show_list:'抽屉入口展示',
click_yunbao: '浮标点击',
enter_plugin: '场景点击',
diversion_opened: 'App引流任务打开',
diversion_click_download: 'App引流任务点击下载'
}*/
const titleMap = {
init_sdk_pv: 'SDK初始化次数',
init_sdk_uv: 'SDK初始化人数',
show_yunbao_pv: '浮标展示次数',
show_yunbao_uv: '浮标展示人数',
click_yunbao_pv: '浮标点击次数',
click_yunbao_uv: '浮标点击人数',
play_video: '广告按钮点击',
ad: '广告展示数',
ad_click_pv: '广告点击次数',
ad_click_uv: '广告点击人数',
diversion_opened_pv: 'App引流任务打开次数',
diversion_opened_uv: 'App引流任务打开人数',
diversion_click_download_pv: 'App引流任务点击下载次数',
diversion_click_download_uv: 'App引流任务点击下载人数'
};
const noReactActions = ['enter_plugin','active_time'];
/*(async function() {
let c = await CowRequestdata.count({});
console.dir(c);
})()*/
async function calcShop({ qs, sdk_version, channel, appId, package_name, app_name, basicData }, appMap) {
let _qs = {};
let types = [];
basicData['sdk_version'] = sdk_version;
basicData['channel'] = channel;
basicData['package_name'] = package_name;
basicData['app_name'] = app_name;
basicData['appId'] = appId;
if(appId) {
basicData['appName'] = appMap[appId];
}
let _type = basicData.type || 'detail';
let yesterDay = {
createdAt: { $gte: moment(basicData.date,'YYYYMMDD').add(-1,'days').startOf('day').toDate(), $lt: moment(basicData.date,'YYYYMMDD').add(-1,'days').endOf('day').toDate() }
}
if(_type == 'detail') {
_qs['data.sdk_version'] = (sdk_version === undefined ? { $exists: 0 } : sdk_version);
_qs['data.channel'] = (channel === undefined ? { $exists: 0 } : channel);
_qs['data.package_name'] = (package_name === undefined ? { $exists: 0 } : package_name);
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'mask') {
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'channel') {
_qs['data.channel'] = (channel === undefined ? { $exists: 0 } : channel);
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'appId') {
_qs['data.appId'] = (appId === undefined ? { $exists: 0 } : appId);
}
let query = { ...qs, ..._qs };
/* 赚积分页面数据统计 */
// 打开次数
let get_coin_pv = await ShopRequestdata.count({ ...query, 'data.action': 'get_coin' });
// 昨日日活
let get_coin_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'get_coin' });
get_coin_uv = get_coin_uv.length;
// 任务1~n分别点击统计
let missionObj = {};
let missions = await ShopRequestdata.aggregate([{
$match: { ...query, 'data.action': 'click_mission' }
},{
$group: {
_id: '$data.missionId',
count: {
$sum: 1
}
}
}]);
for(let mission of missions) {
let click_mission_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'click_mission', 'data.missionId': mission._id });
missionObj[mission._id] = {
click_pv: mission.count,
click_uv: click_mission_uv.length
};
}
// 任务1~n分别统计领奖人数
let _missions = await ShopRequestdata.aggregate([{
$match: { ...query, 'data.action': 'get_mission' }
},{
$group: {
_id: '$data.missionId',
count: {
$sum: 1
}
}
}]);
for(let mission of _missions) {
let get_mission_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'get_mission', 'data.missionId': mission._id });
if(missionObj[mission._id]) missionObj[mission._id]['get_uv'] = get_mission_uv.length;
else missionObj[mission._id] = {
get_uv: get_mission_uv.length
};
}
/* 花积分页面 */
// 打开兑奖页
// 打开次数
let cost_coin_pv = await ShopRequestdata.count({ ...query, 'data.action': 'cost_coin' });
// 打开人数
let cost_coin_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'cost_coin' });
cost_coin_uv = cost_coin_uv.length;
// 限量兑换领取
let limit_exchange_pv = await ShopRequestdata.count({ ...query, 'data.action': 'limit_exchange' });
let limit_exchange_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'limit_exchange' });
limit_exchange_uv = limit_exchange_uv.length;
// 签到有礼 打开人数次数
let open_sign_pv = await ShopRequestdata.count({ ...query, 'data.action': 'open_sign' });
let open_sign_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'open_sign' });
open_sign_uv = open_sign_uv.length;
// 签到有礼 签到人数
let sign_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'sign' });
sign_uv = sign_uv.length;
// 云币抽奖 抽奖次数人数
let lottery_pv = await ShopRequestdata.count({ ...query, 'data.action': 'lottery' });
let lottery_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'lottery' });
lottery_uv = lottery_uv.length;
// 精品卡券 兑换人数次数
let card_exchange_pv = await ShopRequestdata.count({ ...query, 'data.action': 'card_exchange' });
let card_exchange_uv = await ShopRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'card_exchange' });
card_exchange_uv = card_exchange_uv.length;
let shop_data = {
get_coin_pv,
get_coin_uv,
missionObj,
cost_coin_pv,
cost_coin_uv,
limit_exchange_pv,
limit_exchange_uv,
open_sign_pv,
open_sign_uv,
sign_uv,
lottery_pv,
lottery_uv,
card_exchange_pv,
card_exchange_uv
}
let data = {
...basicData,
shop_data
};
console.dir(data);
let existStat = await Stat.findOne(basicData);
if(existStat) await Stat.update(basicData, {
$set: {
shop_data
}
});
else {
let rep = await new Stat(data).save();
console.dir(rep);
}
}
async function calcCow({ qs, sdk_version, channel, appId, package_name, app_name, basicData }, appMap) {
let _qs = {};
let types = [];
basicData['sdk_version'] = sdk_version;
basicData['channel'] = channel;
basicData['package_name'] = package_name;
basicData['app_name'] = app_name;
basicData['appId'] = appId;
if(appId) {
basicData['appName'] = appMap[appId];
}
let _type = basicData.type || 'detail';
let yesterDay = {
createdAt: { $gte: moment(basicData.date,'YYYYMMDD').add(-1,'days').startOf('day').toDate(), $lt: moment(basicData.date,'YYYYMMDD').add(-1,'days').endOf('day').toDate() }
}
if(_type == 'detail') {
_qs['data.sdk_version'] = (sdk_version === undefined ? { $exists: 0 } : sdk_version);
_qs['data.channel'] = (channel === undefined ? { $exists: 0 } : channel);
_qs['data.package_name'] = (package_name === undefined ? { $exists: 0 } : package_name);
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'mask') {
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'channel') {
_qs['data.channel'] = (channel === undefined ? { $exists: 0 } : channel);
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'appId') {
_qs['data.appId'] = (appId === undefined ? { $exists: 0 } : appId);
}
let query = { ...qs, ..._qs };
// 日活人数
//let active_pv = await CowRequestdata.count({ ...query });
//console.dir(`init_sdk_pv,${init_sdk_pv}`);
let active_uv = await CowRequestdata.distinct('data.deviceInfo.uid', { ...query });
// 昨日日活
let last_active_uv = await CowRequestdata.distinct('data.deviceInfo.uid', { ...query, ...yesterDay })
let c = 0;
if(active_uv && active_uv.length && last_active_uv && last_active_uv.length)
for ( let uid of active_uv) {
c += (last_active_uv.indexOf(uid) >= 0 ? 1: 0);
}
let left = c;
active_uv = active_uv.length;
last_active_uv = last_active_uv.length;
// 投喂次数
let feed_pv = await CowRequestdata.count({ ...query, 'data.action': 'feed' });
//投喂人数
let feed_uv = await CowRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'feed' });
feed_uv = feed_uv.length;
// 各项任务
let missionObj = {};
for(let x of [1,2,3,4]) {
let action = `mission_${x}`;
let s = await CowRequestdata.distinct('data.deviceInfo.uid', { ...query, 'data.action': action });
missionObj[action + '_uv'] = s.length;
}
// 许愿池广告展示
let wish_show_pv = await CowRequestdata.count({ ...query, 'data.action': 'wish_show' });
//console.dir(wish_show_pv);
// 许愿池广告点击
let wish_click_pv = await CowRequestdata.count({ ...query, 'data.action': 'wish_click' });
// 小熊猫展示
let panda_show_pv = await CowRequestdata.count({ ...query, 'data.action': 'panda_show' });
// console.dir(panda_show_pv);
// 小熊猫点击
let panda_click_pv = await CowRequestdata.count({ ...query, 'data.action': 'panda_click' });
// console.dir(panda_click_pv);
// 广告推销展示
let adman_show_pv = await CowRequestdata.count({ ...query, 'data.action': 'adman_show' });
// console.dir(adman_show_pv);
// 广告推销点击
let adman_click_pv = await CowRequestdata.count({ ...query, 'data.action': 'adman_click' });
// console.dir(adman_click_pv);
let plugin_data_more = {
active_uv,
feed_pv,
feed_uv,
...missionObj,
wish_show_pv,
wish_click_pv,
panda_show_pv,
panda_click_pv,
adman_show_pv,
adman_click_pv,
last_active_uv,
left
}
let data = {
...basicData,
plugin_data_more
};
let existStat = await Stat.findOne(basicData);
if(existStat) await Stat.update(basicData, {
$set: {
plugin_data_more
}
});
else {
let rep = await new Stat(data).save();
console.dir(rep);
}
}
async function calc({ qs, sdk_version, channel, appId, package_name, app_name, basicData, reactActions }, appMap) {
let _qs = {};
let types = [];
basicData['sdk_version'] = sdk_version;
basicData['channel'] = channel;
basicData['package_name'] = package_name;
basicData['app_name'] = app_name;
basicData['appId'] = appId;
if(appId) {
console.log(appMap[appId] + '==========>')
basicData['appName'] = appMap[appId];
}
let _type = basicData.type || 'detail';
if(_type == 'detail') {
_qs['data.sdk_version'] = (sdk_version === undefined ? { $exists: 0 } : sdk_version);
_qs['data.channel'] = (channel === undefined ? { $exists: 0 } : channel);
_qs['data.package_name'] = (package_name === undefined ? { $exists: 0 } : package_name);
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'mask') {
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'channel') {
_qs['data.channel'] = (channel === undefined ? { $exists: 0 } : channel);
_qs['data.deviceInfo.app_name'] = (app_name === undefined ? { $exists: 0 } : app_name);
}
if(_type == 'appId') {
_qs['data.appId'] = (appId === undefined ? { $exists: 0 } : appId);
}
let query = { ...qs, ..._qs };
//console.dir(query);
//console.dir('基础条件');
//console.dir(query);
// init_sdk SDK初始化
//console.dir({ ...query, 'data.action': 'init_sdk'});
let init_sdk_pv = await RequestData.count({ ...query, 'data.action': 'init_sdk' });
//console.dir(`init_sdk_pv,${init_sdk_pv}`);
let init_sdk_uv = await RequestData.aggregate([{
$match: { ...query, 'data.action': 'init_sdk' }
},{
$group: {
_id: '$data.deviceInfo.uid',
count: {
$sum: 1
}
}
}]);
//console.dir(`init_sdk_uv,${init_sdk_uv.length}`);
init_sdk_uv = init_sdk_uv.length;
// show_yunbao 浮标
let show_yunbao_pv = await RequestData.count({ ...query, 'data.action': 'show_yunbao' });
//console.dir(`show_yunbao_pv,${show_yunbao_pv}`);
let show_yunbao_uv = await RequestData.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'show_yunbao' });
//console.dir(`show_yunbao_uv,${show_yunbao_uv.length}`);
show_yunbao_uv = show_yunbao_uv.length;
// click_yunbao 浮标点击
let click_yunbao_pv = await RequestData.count({ ...query, 'data.action': 'click_yunbao' });
//console.dir(`click_yunbao_pv,${click_yunbao_pv}`);
let click_yunbao_uv = await RequestData.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'click_yunbao' });
//console.dir(`click_yunbao_uv,${click_yunbao_uv.length}`);
click_yunbao_uv = click_yunbao_uv.length;
// play_video 广告按钮
let play_video = await RequestData.count({ ...query, 'data.action': 'play_video' });
//console.dir(`play_video,${play_video}`);
// ad 广告填充
let ad = await RequestData.count({ ...query, 'data.action': 'ad', 'data.adCallback': 'onVideoPlayStart' });
//console.dir(`ad,${ad}`);
// onAdClicked 广告点击
let ad_click_pv = await RequestData.count({ ...query, 'data.action': 'ad', 'data.adCallback': 'onAdClicked' });
//console.dir(`ad_click_pv,${ad_click_pv}`);
let ad_click_uv = await RequestData.distinct('data.deviceInfo.uid', { ...query, 'data.action': 'ad', 'data.adCallback': 'onAdClicked' });
//console.dir(`ad_click_uv,${ad_click_uv.length}`);
ad_click_uv = ad_click_uv.length;
// show_list 抽屉入口展示
let show_list_pv = await RequestData.count({ ...query, 'data.action': 'show_list' });
//console.dir(`show_list_pv,${show_list_pv}`);
let show_list_uv = await RequestData.distinct('data.deviceInfo.uid',{ ...query, 'data.action': 'show_list' });
//console.dir(`show_list_uv,${show_list_uv.length}`);
show_list_uv = show_list_uv.length;
let plugin_data = {};
// enter_plugin 场景点击
let enter_plugin_pvs = await RequestData.aggregate([{
$match: {
...query,
//'data.pluginId': { $exists:1 },
'data.action': "enter_plugin"
}
},
{
$group: {
_id: '$data.pluginId',
count: {
$sum: 1
}
}
}]);
for(let enter_obj of enter_plugin_pvs) {
plugin_data[`pluginId_${enter_obj._id}`] = {
pluginId: enter_obj._id,
enter_plugin_pv: enter_obj.count
};
}
//console.dir(`enter_plugin_pv`);
////console.dir(plugin_data);
for(let key of Object.keys(plugin_data)) {
let pluginId = plugin_data[key].pluginId;
let enter_plugin_uv = await RequestData.distinct('data.deviceInfo.uid',{ ...query, 'data.action': 'enter_plugin', 'data.pluginId': pluginId });
plugin_data[key]['enter_plugin_uv'] = enter_plugin_uv.length;
// react 互动统计
let plugin_react_uv = await RequestData.distinct('data.deviceInfo.uid',{ ...query, 'data.action': { $in: reactActions }, 'data.pluginId': pluginId });
plugin_data[key]['plugin_react_uv'] = plugin_react_uv.length;
// 广告展示
let ad_show = await RequestData.count({ ...query, 'data.action': 'ad','data.adCallback':'onVideoPlayStart', 'data.pluginId': pluginId });
plugin_data[key]['ad_show'] = ad_show;
// 广告点击
let ad_click = await RequestData.count({ ...query, 'data.action': 'ad','data.adCallback':'onAdClicked', 'data.pluginId': pluginId });
plugin_data[key]['ad_click'] = ad_click;
}
//console.dir(`enter_plugin_uv`);
////console.dir(plugin_data);
// active_time 场景时间
let active_time = await RequestData.aggregate([{
$match: {
...query,
'data.action' : "active_time"
}
},
{
$group: {
_id: '$data.pluginId',
count: {
$sum: 1
},
sum: {
$sum: '$data.rtime'
}
}
}]);
for(let obj of active_time) {
let key = `pluginId_${obj._id}`;
let average = (obj.count == 0 ? '0.00' : (obj.sum / obj.count).toFixed(2));
if(plugin_data[key]) {
plugin_data[key]['active_time'] = average;
} else plugin_data[key] = {
active_time: average
}
}
//console.dir(`active_time`);
////console.dir(plugin_data);
// diversion_opened App引流任务打开
let diversion_opened_pv = await RequestData.count({ ...query, 'data.action': 'diversion_opened' });
//console.dir(`diversion_opened_pv,${diversion_opened_pv}`);
diversion_opened_pv = diversion_opened_pv || 0;
let diversion_opened_uv = await RequestData.distinct('data.deviceInfo.uid',{ ...query, 'data.action': 'diversion_opened' });
//console.dir(`diversion_opened_uv,${diversion_opened_uv.length}`);
diversion_opened_uv = diversion_opened_uv.length;
// diversion_click_download App引流任务点击下载
let diversion_click_download_pv = await RequestData.count({ ...query, 'data.action': 'diversion_click_download' });
//console.dir(`diversion_click_download_pv,${diversion_click_download_pv}`);
diversion_click_download_pv = diversion_click_download_pv || 0;
let diversion_click_download_uv = await RequestData.distinct('data.deviceInfo.uid',{ ...query, 'data.action': 'diversion_click_download' });
//console.dir(`diversion_click_download_uv,${diversion_click_download_uv.length}`);
diversion_click_download_uv = diversion_click_download_uv.length
let data = {
...basicData,
detail: {
init_sdk_pv,
show_list_pv,
show_list_uv,
init_sdk_uv,
show_yunbao_pv,
show_yunbao_uv,
click_yunbao_pv,
click_yunbao_uv,
play_video,
ad,
ad_click_pv,
ad_click_uv,
diversion_opened_pv,
diversion_opened_uv,
diversion_click_download_pv,
diversion_click_download_uv
},
plugin_data
}
console.dir(basicData);
let existStat = await Stat.findOne(basicData);
if(existStat) await Stat.remove(basicData);
let rep = await new Stat(data).save();
console.dir(rep._id + '');
}
async function handle(date,os,type) {
//let dateString = date;
let [start,end] = [moment(date,'YYYYMMDD').startOf('day').toDate(),moment(date,'YYYYMMDD').endOf('day').toDate()];
let osQuery = (os == 'android' ? { 'data.osType': { $in: ['1','3'] } } : { 'data.osType': { $in:['2','4'] } });
let qs = { date, ...osQuery };
let cowqs = { createdAt: { $gte: start, $lt: end }, ...osQuery };
let basicData = { date, osType: os };
if(type) basicData['type'] = type;
// 获取场景action
let reactActions = await RequestData.distinct("data.action", { 'data.pluginId': {$exists:1}, ...qs });
reactActions = reactActions.filter( x => {
return noReactActions.indexOf(x) == -1
});
//console.dir(reactActions);
let appMap = await getAppMap();
//console.dir(appMap);
if(type == 'all') {
await calc({ qs, reactActions, basicData });
await calcCow({ qs: cowqs, basicData });
await calcShop({ qs: cowqs, basicData });
} else {
let _id = {
'sdk_version': '$data.sdk_version',
'channel': '$data.channel',
'package_name': '$data.package_name',
'app_name': '$data.deviceInfo.app_name'
}
if(type == 'mask') {
_id = {
'app_name': '$data.deviceInfo.app_name'
}
}
if(type == 'channel') {
_id = {
'app_name': '$data.deviceInfo.app_name',
'channel': '$data.channel'
}
}
if(type == 'appId') {
_id = {
'appId': '$data.appId'
}
}
//console.dir(_id);
let basics = await RequestData.aggregate([{
$match: qs
},{
$group: {
_id,
count: {
$sum: 1
}
}
}]);
for(let q of basics) {
let { sdk_version, channel, package_name, app_name, appId } = q._id;
await calc({ sdk_version, channel, package_name, app_name, appId, qs, reactActions, basicData }, appMap);
await calcCow({ sdk_version, channel, package_name, app_name, appId, qs: cowqs, basicData }, appMap);
await calcShop({ sdk_version, channel, package_name, app_name, appId, qs: cowqs, basicData }, appMap);
}
}
}
/*async function fix() {
let a = await RequestData.find({ 'data.action':"active_time" });
for(let obj of a) {
//console.dir(obj.time);
obj.time = parseInt(obj.time) || 0;
//console.dir(obj.time);
await obj.save();
}
}*/
/*(async function() {
let dates = ['20210317','20210318','20210319','20210320','20210321','20210322','20210323','20210324','20210325','20210326','20210327','20210328','20210329','20210330','20210331','20210401','20210402','20210403','20210404','20210405','20210406','20210407','20210408'].reverse();
for(let i = 0;i <= 15;i++) {
dates.push(moment().add(i - 16,'days').format('YYYYMMDD'));
}
for(let date of dates) {
let [start,end] = [moment(date,'YYYYMMDD').startOf('day').format('x'),moment(date,'YYYYMMDD').endOf('day').format('x')];
let qs = { 'nginxTime': { $gt: parseInt(start), $lte: parseInt(end) }};
//console.dir(date)
let c = await RequestData.count(qs);
if(c) await RequestData.update(qs,{
$set: { date }
},{multi: 1});
//console.dir(c)
}
})()*/
async function getAppMap() {
let apps = await op.query('SELECT * FROM app');
let map = {};
for(let app of apps) {
map[app.id] = app.name;
}
return map;
}
/*async function run(dates) {
dates = dates.reverse();
let osTypes = ['android','ios'];
for(let date of dates) {
for(let osType of osTypes) {
console.log("获取appId" + date)
await handle(date, osType, 'appId');
console.log("获取channel" + date)
await handle(date, osType, 'channel');
console.log("获取detail" + date)
await handle(date, osType);
console.log("获取mask" + date)
await handle(date, osType, 'mask');
console.log("获取all" + date)
await handle(date, osType, 'all');
}
}
}*/
/*
(async function() {
let dates = ['20210622'].reverse();
let osTypes = ['android','ios'];
for(let date of dates) {
for(let osType of osTypes) {
console.log("获取appId" + date);
await handle(date, osType, 'appId');
console.log("获取channel" + date);
await handle(date, osType, 'channel');
console.log("获取detail" + date);
await handle(date, osType);
console.log("获取mask" + date);
await handle(date, osType, 'mask');
console.log("获取all" + date);
await handle(date, osType, 'all');
}
}
})()*/
/*(async function() {
let dates = ['20210622'];
for(let date of dates) {
let datas = await RequestData.find({ date, 'data.action': 'active_time' });
let c = 0;
for(let d of datas) {
if(d.data && d.data.time && typeof d.data.time == 'string' ) {
console.dir(typeof d.data.time)
console.dir(typeof parseInt(d.data.time || 0))
d.data = {
...d.data,
rtime: parseInt(d.data.time || 0)
}
await d.save();
}
console.dir(datas.length + '___' + (c++))
}
console.dir('done' + date);
}
})()*/
/*setInterval(async () => {
let dates = moment().format('YYYYMMDD');
console.log(dates);
await run(dates);
}, 1000 * 60 * 60);*/
const job = new CronJob({
cronTime: '00 00 05 * * 0-6',
onTick: async function() {
let date = moment().add(-1, 'days').format('YYYYMMDD');
let osTypes = ['android','ios'];
for(let osType of osTypes) {
console.log("获取appId" + date);
await handle(date, osType, 'appId');
console.log("获取channel" + date);
await handle(date, osType, 'channel');
console.log("获取detail" + date);
await handle(date, osType);
console.log("获取mask" + date);
await handle(date, osType, 'mask');
console.log("获取all" + date);
await handle(date, osType, 'all');
}
},
start: false,
});
job.start();
exports.selects = async(ctx, next) => {
let apps = await Stat.distinct('app_name',{});
let appNames = await Stat.distinct('appName',{});
//console.dir(apps);
ctx.body = {
status: 'ok',
data: {
apps,
appNames,
osTypes: ['android','ios'],
plugins: Object.keys(pluginMap).map( x => {
return {
key: x, name: pluginMap[x]
}
})
}
}
}
exports.list = async(ctx, next) => {
let {
app_name,
osType,
keyword,
type,
start,
end,
skip=0,
limit=100
} = ctx.request.body;
let query = {};
console.dir(ctx.request.body);
if(type == 'mask' || type == 'all' || type == 'channel' || type == 'appId') {
query['type'] = type;
} else query['type'] = { $nin: ['mask','all','channel','appId'] };
if(start && end) {
query['date'] = { $gte: start, $lte: end };
}
if(osType && osType !== 'all') {
query['osType'] = osType;
}
if(app_name && app_name !== 'all') {
if(type == 'appId') query['appName'] = app_name;
else query['app_name'] = app_name;
}
if(keyword && keyword.length) {
query['$or'] = [
{ app_name: { $regex: new RegExp(keyword) } },
{ package_name: { $regex: new RegExp(keyword) } },
{ channel: { $regex: new RegExp(keyword) } },
{ appName: { $regex: new RegExp(keyword) } }
]
}
let total = await Stat.count(query);
let stats = await Stat.find(query, null, {
skip: parseInt(skip) * parseInt(limit),
limit
}).sort({
date: -1
});
ctx.body = {
status: 'ok',
stats,
total,
limit,
skip
};
};
\ No newline at end of file
function randomn(n) {
if (n > 21) return null
return parseInt((Math.random() + 1) * Math.pow(10,n-1))
}
const jwt = require('jsonwebtoken');
const config = require('config');
const hash = require('utils/hash');
const _ = require('lodash');
const mongoose = require('mongoose');
const Account = require('db/mongo/user');
const {
ObjectId
} = require('mongoose').Types;
function getToken(user, opt = {}) {
if (!opt.expiresIn) {
opt.expiresIn = '7d';
}
return jwt.sign(
user,
config.JWT_SECRET,
opt
);
}
/*(async function(argument) {
let a = await new Account({
username: 'admin',
password: hash('admin')
}).save();
console.dir(a);
})()*/
const RETURN_FIELDS = ['_id', 'code', 'username','role', 'createdAt'];
exports.checkPassword = async(ctx, next) => {
let {
username,
password
} = ctx.request.body;
let user = await Account.findOne({
username,
removed: { $ne: true }
});
console.dir(ctx.request.body);
ctx.assert(user, 404, '没有该用户', {
code: 1
});
user = user.toJSON();
console.dir(user.password)
ctx.assert(
hash(password) === user.password,
400,
'密码错误', {
code: 1
}
);
ctx.state.checkedAccount = user;
await next();
};
exports.whoAmI = async ctx => {
let myId = ctx.state.user._id;
let { username, phone, company, createdAt, updatedAt, role } = await Account.findById(myId);
ctx.body = {
status: 'ok',
data: {
username
}
};
};
exports.signin = async(ctx, next) => {
let {
username
} = ctx.request.body;
let user = await Account.findOne({
username
});
let token = getToken(_.pick(user, '_id', 'username'));
ctx.body = {
status: 'ok',
pid: user._id,
username,
role: user.role,
token
};
};
console.log('==============')
console.log(hash('1234567xx'))
const mongoose = require('mongoose');
const config = require('../config');
global.Promise = mongoose.Promise = require('bluebird');
const options = {
useMongoClient: true
};
exports.db = mongoose.createConnection(process.env.MONGO_DB || config.MONGO_DB, {});
exports.logDb = mongoose.createConnection(process.env.MONGO_LOG_DB || config.MONGO_LOG_DB, {});
console.log('MONGO CONNECT INFO: ', process.env.MONGO_DB || config.MONGO_DB);
console.log('MONGO_LOG_DB CONNECT INFO: ', process.env.MONGO_LOG_DB || config.MONGO_LOG_DB);
const mongoose = require('mongoose');
const connect = require('../connect');
const {
ObjectId
} = mongoose.SchemaTypes;
const schema = mongoose.Schema({
date: String,
nginxTime: Number,
filename: String,
data: Object
}, {
timestamps: true
});
module.exports = connect.db.model('requestdata', schema);
\ No newline at end of file
const mongoose = require('mongoose');
const connect = require('../connect');
const {
ObjectId
} = mongoose.SchemaTypes;
const schema = mongoose.Schema({
date: String,
osType: String,
type: String,
detail: Object,
sdk_version: String,
channel: String,
appId: String,
appName: String,
package_name: String,
app_name: String,
plugin_data: Object,
plugin_data_more: Object,
shop_data: Object
}, {
timestamps: true
});
module.exports = connect.db.model('stat', schema);
\ No newline at end of file
const mongoose = require('mongoose');
const connect = require('../connect');
const {
ObjectId
} = mongoose.SchemaTypes;
const schema = mongoose.Schema({
username: {
type: String,
unique: true
},
name: String,
company: String,
phone: String,
password:{
type: String,
required: true
},
role: String,
notityUrl: String
}, {
timestamps: true
});
module.exports = connect.db.model('user', schema);
\ No newline at end of file
const mongoose = require('mongoose');
const connect = require('../connect');
const {
ObjectId
} = mongoose.SchemaTypes;
const schema = mongoose.Schema({
data: Object
}, {
timestamps: true
});
module.exports = connect.logDb.model('cowrequestdata', schema);
\ No newline at end of file
const mongoose = require('mongoose');
const connect = require('../connect');
const {
ObjectId
} = mongoose.SchemaTypes;
const schema = mongoose.Schema({
data: Object
}, {
timestamps: true
});
module.exports = connect.logDb.model('shoprequestdata', schema);
\ No newline at end of file
const mysql = require("mysql");
const config = require('../config');
const Promise = require('bluebird');
const pool = mysql.createPool(config.SQL_CONF);
module.exports = {
query(query_string) {
return new Promise(( resolve, reject ) => {
pool.getConnection(function(err, connection) {
if (err) {
reject( err )
} else {
connection.query(query_string, ( err, rows) => {
if ( err ) {
reject( err )
} else {
resolve( rows )
}
connection.release()
})
}
})
})
}
}
require('colors');
require('app-module-path/register');
const api = require('./utils/api');
const config = require('config');
const PassThrough = require('stream').PassThrough;
const Koa = require('koa');
const compress = require('koa-compress');
const cors = require('kcors');
const bodyParser = require('koa-bodyparser');
const logger = require('koa-logger');
const path = require('path');
const mongoose = require('mongoose');
const moment = require('moment');
const error = require('middleware/error');
const jwt = require('middleware/jwt');
const rp = require('request-promise');
const request = require('request');
const mountRoutes = require('utils/mount-routes');
const favicon = require('koa-favicon');
const fs = require('fs');
//const crypto = require('crypto');
const websockify = require('koa-websocket');
global.Promise = mongoose.Promise = require('bluebird');
const options = {
useMongoClient: true
};
const parse = require('co-body');
const router = require('koa-router')();
const app = new Koa();
const { MONGO_DB } = process.env;
/*mongoose.connect(MONGO_DB || config.MONGO_DB, {});
console.log('MONGO CONNECT INFO: ', MONGO_DB || config.MONGO_DB);*/
const opts = { threshold: 2048 };
app.use(cors());
app.use(compress(opts));
app.use(router.routes());
app.use(logger());
app.use(error());
app.use(require('koa-static')(__dirname + '/dist'))
app.use(jwt());
app.use(bodyParser({}));
app.use(mountRoutes().routes());
const { PORT = 8787 } = process.env;
app.listen(PORT, () => {
console.log(`server start at ${PORT}`);
});
console.dir(`当前运行环境${process.env.NODE_ENV}`);
process.on('unhandledRejection', (err, promise) => {
console.error('Unhandled rejection (promise: ', promise, ', reason: ', err, ').');
});
\ No newline at end of file
// const {merge} = require('lodash');
// const ERROR = {
// '10401': {
// status: {
// code: 10401,
// message: '密码错误'
// }
// },
// '10404': {
// status: {
// code: 10404,
// message: '没有该用户'
// }
// },
// '10422': {
// status: {
// code: 10422,
// message: '用户已存在'
// }
// },
// '11400': {
// status: {
// code: 11400,
// message: '参数不全'
// }
// },
// '11401': {
// status: {
// code: 11401,
// message: '操作权限不够'
// }
// },
// '11422': {
// status: {
// code: 11422,
// message: '用户名已存在'
// }
// },
// '20404': {
// status: {
// code: 20404,
// message: '没有该文章'
// }
// },
// '20403': {
// status: {
// code: 20403,
// message: '没有修改此文章的权限'
// }
// },
// '30404': {
// status: {
// code: 30404,
// message: '上游帐号不存在'
// }
// },
// '30422': {
// status: {
// code: 30422,
// message: '重复的平台帐号'
// }
// },
// '40404': {
// status: {
// code: 40404,
// message: '找不到该上游副本'
// }
// }
// };
module.exports = () => async (ctx, next) => {
try {
await next();
} catch (err) {
ctx.status = err.status || 400;
ctx.body = {
status: {
code: err.code || 'unknow',
message: err.message || 'unknow'
}
};
}
// try {
// await next();
// } catch (err) {
// if (err.status === 401) {
// ctx.status = 401;
// ctx.body = {
// status: {
// code: 99401,
// message: '认证信息失效, 请重新登录'
// }
// };
// } else {
// if (process.env.NODE_ENV !== 'production' && !ERROR[err.message]) {
// console.error(err.message, '\n', err.stack);
// }
// ctx.status = ctx.status || 500;
// ctx.body = ERROR[err.message] || merge({
// status: {
// code: 99500,
// message: err.message || 'unknow error'
// }
// }, ctx.body);
// }
// }
};
const jwt = require('koa-jwt');
const config = require('config');
module.exports = (opt = {}) => {
return jwt({
secret: config.JWT_SECRET,
audience: opt.audience,
issuer: opt.issuer
}).unless({
path: [
'/',
'/api/user/signin'
]
});
};
\ No newline at end of file
{
"name": "scm-hmj",
"version": "1.0.0",
"main": "index.js",
"author": "liusong <liusong@xiaoyun.com>",
"license": "MIT",
"dependencies": {
"app-module-path": "^2.2.0",
"bluebird": "^3.7.2",
"co": "^4.6.0",
"colors": "^1.4.0",
"cron": "^1.8.2",
"kcors": "2",
"koa": "^2.0.1",
"koa-body": "^4.0.4",
"koa-bodyparser": "^4.2.1",
"koa-compress": "^2.0.0",
"koa-favicon": "^2.0.1",
"koa-jwt": "koa2",
"koa-logger": "^3.2.0",
"koa-multer": "^1.0.2",
"koa-mysql": "^1.0.3",
"koa-route": "^3.2.0",
"koa-router": "7.1.1",
"koa-static": "^5.0.0",
"koa-websocket": "^6.0.0",
"lodash": "^4.17.21",
"moment": "^2.17.1",
"mongoose": "^5.3.14",
"mysql": "^2.17.1",
"node-cache": "^5.1.2",
"node-xlsx": "^0.16.1",
"request": "^2.88.2",
"request-promise": "^4.2.6",
"simple-archiver": "^1.0.1"
}
}
const Router = require('koa-router');
const router = new Router();
const $ = require('controllers/stat');
router.post('/list', $.list);
router.post('/selects', $.selects);
module.exports = router;
\ No newline at end of file
const Router = require('koa-router');
const router = new Router();
const $ = require('controllers/user');
router.post('/signin', $.checkPassword, $.signin);
module.exports = router;
\ No newline at end of file
var crypto = require('crypto')
function WXBizDataCrypt(appId, sessionKey) {
this.appId = appId
this.sessionKey = sessionKey
}
WXBizDataCrypt.prototype.decryptData = function (encryptedData, iv) {
// base64 decode
var sessionKey = new Buffer(this.sessionKey, 'base64')
encryptedData = new Buffer(encryptedData, 'base64')
iv = new Buffer(iv, 'base64')
try {
// 解密
var decipher = crypto.createDecipheriv('aes-128-cbc', sessionKey, iv)
// 设置自动 padding 为 true,删除填充补位
decipher.setAutoPadding(true)
var decoded = decipher.update(encryptedData, 'binary', 'utf8')
decoded += decipher.final('utf8')
decoded = JSON.parse(decoded)
} catch (err) {
throw new Error('Illegal Buffer')
}
if (decoded.watermark.appid !== this.appId) {
throw new Error('Illegal Buffer')
}
return decoded
}
module.exports = WXBizDataCrypt
const request = require('request');
module.exports = async (options) => {
return new Promise((resolve, reject) => {
request(options, function(err, result, body) {
if(err) reject(err)
else resolve(body);
})
})
}
\ No newline at end of file
const crypto = require('crypto');
module.exports = (str) => {
if (!str) return '';
return crypto.createHash('md5').update(str).digest('hex')
};
const fs = require('fs');
const path = require('path');
const Router = require('koa-router');
const router = new Router();
module.exports = (readPath) => {
const absoluteReadPath = getRoutesPath(readPath);
const routerMap = getRouerMap(absoluteReadPath);
routerMap.forEach(({route, filePath}, idx) => {
const m = require(filePath);
if (m.constructor.name !== 'Router') return;
router.use(route, m.routes());
if (idx === 0) {
log(`\n┏${Array(42).join('━')}${Array(83).join('━')}┓`.black);
} else {
log(`┣${Array(42).join('━')}${Array(83).join('━')}┫`.black);
}
log(
'┃'.black,
`${fixWidth(route)}`.green,
'┃'.black,
` ${fixWidth(filePath, 80)}`.blue,
'┃'.black
);
if (idx !== 0 && idx === routerMap.length - 1) {
log(`┗${Array(42).join('━')}${Array(83).join('━')}┛\n`.black);
}
});
return router;
};
function log (...arg) {
if (process.env.NODE_ENV !== 'production') {
console.log(...arg);
}
}
function getRoutesPath (readPath) {
if (!readPath) {
return path.resolve(
path.dirname(module.parent.filename),
'routes'
);
}
if (path.isAbsolute(readPath)) {
return readPath;
}
return path.resolve(
path.dirname(module.parent.filename),
readPath
);
}
function getRouerMap (r) {
const result = [];
function routerMap (readPath, prefix = '/') {
fs.readdirSync(readPath).forEach(cName => {
const absolutePath = path.resolve(readPath, cName);
const stat = fs.statSync(absolutePath);
if (stat.isDirectory()) {
routerMap(absolutePath, prefix + cName + '/');
}
if (!stat.isFile() || !cName.endsWith('.js')) return;
if (cName !== 'index.js') {
result.push({
route: prefix + cName.replace(/\.js$/, ''),
filePath: absolutePath
});
} else if (readPath !== __dirname) {
result.push({
route: prefix === '/' ? '/' : prefix.replace(/\/$/, ''),
filePath: absolutePath
});
}
});
}
routerMap(r);
return result;
}
function fixWidth (str, width = 40) {
const restNum = width - str.length;
if (restNum < 0) {
return str.substr(0, width - 1);
}
return str + Array(restNum).join(' ');
}
const async = require('async');
/**
*队列
* @param obj :obj对象 包含执行时间
* @param callback :回调函数
*/
const nodeQueue = async.queue(async function (obj, callback) {
setTimeout(async function () {
// 需要执行的代码的回调函数
if(typeof callback==='function'){
await callback();
}
}, obj.time)
}, 1)
// worker数量将用完时,会调用saturated函数
nodeQueue.saturated = function() {
console.log('all workers to be used');
}
// 当最后一个任务交给worker执行时,会调用empty函数
nodeQueue.empty = function() {
console.log('no more tasks wating');
}
// 当所有任务都执行完时,会调用drain函数
nodeQueue.drain = function() {
console.log('all tasks have been processed');
}
module.exports = nodeQueue;
\ No newline at end of file
const moment = require('moment');
const fs = require('fs');
module.exports = {
transDate: (items, key) => {
return items.map( x => {
x = x.toJSON ? x.toJSON() : x;
x[key || 'createdAt'] = moment(x[key || 'createdAt']).format('YYYY/MM/DD HH:mm');
return x;
})
},
generateDateQuery: (start, end, option) => {
if(/^[0-9]{8}$/.test(start) && /^[0-9]{8}$/.test(end)) {
let data = {};
if(option && option.type === 'string') {
data[option && option.key ? option.key : 'createdAt'] = { '$gte': start, '$lte': end };
} else {
data[option && option.key ? option.key : 'createdAt'] = { '$gte': moment(start,'YYYYMMDD').startOf('day').toDate(), '$lt': moment(end,'YYYYMMDD').endOf('day').toDate() };
}
return data;
}
else return {};
},
generateTokenCode: () => {
return Math.random().toString(36).substr(8);
},
getFixedNumber: (number) => {
return parseFloat(Number(number || 0).toFixed(2));
},
valid: (id) => {
return /^[0-9a-z]{24}$/.test(id);
},
allUndefined: (array) => {
let b = true
for(var k in array) {
b = b && (array[k] === undefined)
}
return b;
},
log: (content,file) => {
let to = file || 'public/log';
let time = moment().format('YYYYMMDD HH:mm:ss') + '~~';
fs.appendFile(to, 'At '+ time + content + '\n',function(){
console.log(content);
});
}
}
\ No newline at end of file
const inspect = require('util').inspect
const path = require('path')
const os = require('os')
const fs = require('fs')
const Busboy = require('busboy')
/**
* 同步创建文件目录
* @param {string} dirname 目录绝对地址
* @return {boolean} 创建目录结果
*/
function mkdirsSync( dirname ) {
if (fs.existsSync( dirname )) {
return true
} else {
if (mkdirsSync( path.dirname(dirname)) ) {
fs.mkdirSync( dirname )
return true
}
}
}
/**
* 获取上传文件的后缀名
* @param {string} fileName 获取上传文件的后缀名
* @return {string} 文件后缀名
*/
function getSuffixName( fileName ) {
let nameList = fileName.split('.')
return nameList[nameList.length - 1]
}
/**
* 上传文件
* @param {object} ctx koa上下文
* @param {object} options 文件上传参数 fileType文件类型, path文件存放路径
* @return {promise}
*/
function uploadFile( ctx, options) {
let req = ctx.req
let res = ctx.res
let busboy = new Busboy({headers: req.headers})
// 获取类型
let fileType = options.fileType || 'common'
let filePath = path.join( options.path, fileType)
let mkdirResult = mkdirsSync( filePath )
return new Promise((resolve, reject) => {
console.log('文件上传中...')
let result = {
success: false,
formData: {},
}
// 解析请求文件事件
busboy.on('file', function(fieldname, file, filename, encoding, mimetype) {
let fileName = (options.fileName || Math.random().toString(16).substr(2)) + '.' + getSuffixName(filename);
result.fileName = fileName;
let _uploadFilePath = path.join( filePath, fileName )
let saveTo = path.join(_uploadFilePath)
// 文件保存到制定路径
file.pipe(fs.createWriteStream(saveTo))
// 文件写入事件结束
file.on('end', function() {
result.success = true
result.message = '文件上传成功'
console.log('文件上传成功!')
resolve(result)
})
})
// 解析表单中其他字段信息
busboy.on('field', function(fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) {
console.log('表单字段数据 [' + fieldname + ']: value: ' + inspect(val));
result.formData[fieldname] = inspect(val);
});
// 解析结束事件
busboy.on('finish', function( ) {
console.log('文件上结束')
resolve(result)
})
// 解析错误事件
busboy.on('error', function(err) {
console.log('文件上出错')
reject(result)
})
req.pipe(busboy)
})
}
module.exports = {
uploadFile
}
\ No newline at end of file
/**
* 不是真实的 webpack 配置,仅为兼容 webstorm 和 intellij idea 代码跳转
* ref: https://github.com/umijs/umi/issues/1109#issuecomment-423380125
*/
module.exports = {
resolve: {
alias: {
'@': require('path').resolve(__dirname, 'src'),
},
},
};
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/npm-debug.log*
/yarn-error.log
/yarn.lock
/package-lock.json
# production
/dist
# misc
.DS_Store
# umi
/src/.umi
/src/.umi-production
/src/.umi-test
/.env.local
**/*.md
**/*.svg
**/*.ejs
**/*.html
package.json
.umi
.umi-production
.umi-test
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"overrides": [
{
"files": ".prettierrc",
"options": { "parser": "json" }
}
]
}
import { defineConfig } from 'umi';
export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
routes: [
{ path: '/login', component: '@/pages/login' },
{
path: '/',
component: '@/layouts/index',
routes: [
{ path: '/', component: '@/pages/index' },
{ path: '/stat', component: '@/pages/stat' }
]
},
],
fastRefresh: {},
plugins:[]
});
# umi project
## Getting Started
Install dependencies,
```bash
$ yarn
```
Start the dev server,
```bash
$ yarn start
```
{
"private": true,
"scripts": {
"start": "umi dev",
"build": "umi build",
"postinstall": "umi generate tmp",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,less,md,json}'",
"test": "umi-test",
"test:coverage": "umi-test --coverage"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.{js,jsx,less,md,json}": [
"prettier --write"
],
"*.ts?(x)": [
"prettier --parser=typescript --write"
]
},
"dependencies": {
"@ant-design/pro-layout": "^6.5.0",
"@umijs/preset-react": "1.x",
"echarts": "^5.0.2",
"echarts-for-react": "^3.0.1",
"umi": "^3.4.2"
},
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@umijs/test": "^3.4.2",
"lint-staged": "^10.0.7",
"prettier": "^2.2.0",
"react": "17.x",
"react-dom": "17.x",
"typescript": "^4.1.2",
"yorkie": "^2.0.0"
}
}
import { getToken } from './local';
export default function(initialState) {
//const { userId, role } = initialState;
let token = getToken();
return {
token,
};
}
\ No newline at end of file
import HttpRequest from './request';
const host = 'http://yunbao-data-api.xiaoyunke.cn';
//const host = 'http://localhost:8787';
export default {
async sign(params: any): Promise<any> {
return HttpRequest({
method: 'post', // 如果是get方法可省
body: params, // 所有方法传参都通过body,没有省略即可
})(`${host}/api/user/signin`);
},
async getSelects(params: any): Promise<any> {
return HttpRequest({
method: 'post',
body: params,
}, true)(`${host}/api/stat/selects`);
},
async getStats(params: any): Promise<any> {
return HttpRequest({
method: 'post',
body: params,
}, true)(`${host}/api/stat/list`);
},
}
\ No newline at end of file
import { RequestConfig } from 'umi';
export async function getInitialState() {
return { a: 1 };
}
export const request: RequestConfig = {
timeout: 1000,
errorConfig: {},
middlewares: [],
requestInterceptors: [],
responseInterceptors: [],
};
html, body, #root {
height: 100%;
width: 100%;
margin: 0px auto;
background: #bfbfbf;
}
#root {
background: #fff;
overflow: auto;
}
a{
color: #555;
}
body {
margin: 0;
}
a{
text-decoration: none;
}
.container{
background: #fff;
max-height: 100%;
overflow: auto;
}
.box{
height: 100%;
}
.flex{
display: flex;
}
.c{
flex-direction: column;
}
.r{
flex-direction: row;
}
.trigger {
padding: 0 24px;
font-size: 18px;
line-height: 64px;
cursor: pointer;
transition: color 0.3s;
}
.trigger:hover {
color: #1890ff;
}
.logo {
height: 32px;
margin: 16px;
background: rgba(255, 255, 255, 0.3);
}
.site-layout .layout-back {
background: #fff;
}
.chart{
margin: 20px 0px;
}
\ No newline at end of file
import React, { useState, useEffect, useRef } from 'react';
import styles from './index.less';
import { useAccess } from 'umi';
import { Button, Form, Card, Input, Layout, Menu } from 'antd';
import { setToken, delToken, setUserName, delUserName, getUserName } from '../local';
import {
MenuUnfoldOutlined,
MenuFoldOutlined,
UserOutlined,
VideoCameraOutlined,
UploadOutlined,
DatabaseOutlined,
FundOutlined,
SettingOutlined,
LogoutOutlined
} from '@ant-design/icons';
const { Header, Sider, Content } = Layout;
import * as fn from '../api';
const { sign } = fn.default;
const menus = ['/','/stat'];
const BasicLayout: React.FC = props => {
const access = useAccess();
if(!access.token) {
delToken();
delUserName();
console.dir('=========')
if(props.location.pathname !== '/login') return window.location.href = '/login';
}
const [collapsed,setCollapsed] = useState(false);
const [key,setKey] = useState([menus.indexOf(props.location.pathname).toString()]);
const username = getUserName()
const toggle = () => {
setCollapsed(!collapsed);
};
const handleClick = (e) => {
window.location.href = menus[e.key];
};
const logout = (e) => {
delToken();
setTimeout( x => {
window.location.reload();
},500);
}
return (
<div style={{ height: '100%', width: '100%' }}>
<Layout className="box">
<Sider trigger={null} collapsible collapsed={collapsed}>
<div className="logo" />
<Menu theme="dark" mode="inline" defaultSelectedKeys={key} onClick={handleClick}>
<Menu.Item key="0" icon={<FundOutlined />}>
广告数据
</Menu.Item>
<Menu.Item key="1" icon={<SettingOutlined />}>
权限设置
</Menu.Item>
</Menu>
</Sider>
<Layout className="site-layout">
<Header className="layout-back" style={{ padding: 0,justifyContent: 'space-between', display: 'flex' }}>
{React.createElement(collapsed ? MenuUnfoldOutlined : MenuFoldOutlined, {
className: 'trigger',
onClick: toggle,
})}
<div>
<span>欢迎你,{
username
}</span>
{React.createElement(LogoutOutlined, {
className: 'trigger',
onClick: logout,
})}
</div>
</Header>
<Content
className="layout-back"
style={{
margin: '24px 16px',
padding: 24,
minHeight: 280,
}}
>
{props.children}
</Content>
</Layout>
</Layout>
</div>
);
};
export default BasicLayout;
// 获取本地保存的用户名
export function getUserName (){
return localStorage.getItem('username') || ''
}
// 设置本地保存的用户名
export function setUserName (name){
return localStorage.setItem('username', name);
}
export function setRole(name) {
return localStorage.setItem('role', name);
}
export function getRole(name) {
return localStorage.getItem('role', name);
}
// 删除本地保存的用户名
export function delUserName (){
return localStorage.removeItem('username');
}
// 获取是否保存帐号标示
export function getToken (){
return localStorage.getItem('token');
}
// 设置本地保存的用户名
export function setToken (token){
return localStorage.setItem('token', token);
}
// 删除本地保存的用户名
export function delToken (){
return localStorage.removeItem('token');
}
\ No newline at end of file
.title {
background: rgb(121, 242, 157);
}
import React, { useState, useEffect, useRef } from 'react';
import styles from './index.less';
import ReactECharts from 'echarts-for-react';
import { Button, Form, Card, Input, Layout, Menu, Select, DatePicker, Table, Radio, message } from 'antd';
import { setToken, delToken, setUserName, delUserName, getUserName } from '../local';
import moment from 'moment';
import {
MenuUnfoldOutlined,
MenuFoldOutlined,
UserOutlined,
VideoCameraOutlined,
UploadOutlined,
DatabaseOutlined,
FundOutlined
} from '@ant-design/icons';
import * as fn from '../api';
const { Search } = Input;
const pluginMap = {
'1': '转盘',
'2': '危机一发',
'3': '宝箱',
'4': '找茬',
'5': '运势',
'6': '答题',
'7': '金蛋',
'8': '猜歌',
'9': '种树',
'10': '捞金币',
'11': '套圈',
'12': '娃娃机',
'13': '转盘2',
'14': '彩球机',
'15': '刮刮卡',
'16': '剪羊毛',
'17': '桃花',
'18': '福灯',
'19': '奶牛庄园',
'20': '奶牛庄园2',
'21': '果蔬大作战',
'999': '积分',
'998': 'bind'
}
const { getSelects, getStats } = fn.default;
const { Header, Sider, Content } = Layout;
const { Option } = Select;
const { RangePicker } = DatePicker;
const dateFormat = 'YYYYMMDD';
const basicOption = {
title: {
text: '基础统计'
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross'
}
},
legend: {
data: ['邮件营销']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
dataView: {show: true, readOnly: false},
restore: {show: true},
saveAsImage: {show: true}
}
},
xAxis: {
type: 'category',
axisTick: {
alignWithLabel: true
},
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: [
{
type: 'value',
name: '数量',
min: 0,
position: 'left',
axisLabel: {
formatter: '{value}'
}
},
{
type: 'value',
name: '概率',
min: 0,
max: 100,
position: 'right',
axisLabel: {
formatter: '{value} %'
}
}
],
series: [{
name: 'sdk加载',
yAxisIndex: 0,
type: 'line',
data: [120, 132, 101, 134, 90, 230, 210]
}]
}
export default function IndexPage(props) {
//let defaultPluginData = {};
let localPlugins = Object.keys(pluginMap).map( x => {
return {
key: x, name: pluginMap[x]
}
});
console.dir(localPlugins);
let localDefaultPluginData = {};
localPlugins.forEach( x => {
localDefaultPluginData[`pluginId_${x.key}`] = {
"name": x.name,
"pluginId" : x.key,
"enter_plugin_pv" : 0,
"enter_plugin_uv" : 0,
"plugin_react_uv" : 0,
"ad_show" : 0,
"ad_click" : 0,
"active_time" : "0.00"
}
});
//setDefaultPluginData(defaultPluginData);
//console.dir(defaultPluginData);
let scrollX = 1000;
const [defaultPluginData,setDefaultPluginData] = useState(localDefaultPluginData);
const [data,setData] = useState(basicOption);
const [apps,setApps] = useState([]);
const [appNames,setAppNames] = useState([]);
const [scene,setScene] = useState('all');
const [coin,setCoin] = useState('get');
const [sceneData,setSceneData] = useState([]);
const [plugins,setPlugins] = useState(localPlugins);
const [plugin,setPlugin] = useState('all');
const [headers, setHeaders] = useState([]);
const [keyword, setKeyWord] = useState('');
const [dates,setDates] = useState([]);
//const [scrollX, setScrollX] = useState(1000);
const [app,setApp] = useState();
const [osType,setOs] = useState('android');
const [statData,setStatData] = useState([]);
const [loading,setLoading] = useState(true);
const [type,setType] = useState('all');
const[pagination, setPagination] = useState({
pageSize: 100,
current: 0,
total: 0
})
const toggle = () => {
setCollapsed(!collapsed);
};
async function fetchStat(obj, t, pluginId) {
setLoading(true);
setStatData([]);
setSceneData([]);
let data = await getStats(obj);
let stats = (data.stats || []).map( x => {
let detail = x.detail || {
"init_sdk_pv" : 0,
"init_sdk_uv" : 0,
"show_list_pv" : 0,
"show_list_uv" : 0,
"show_yunbao_pv" : 0,
"show_yunbao_uv" : 0,
"click_yunbao_pv" : 0,
"click_yunbao_uv" : 0,
"play_video" : 0,
"ad" : 0,
"ad_click_pv" : 0,
"ad_click_uv" : 0,
"diversion_opened_pv" : 0,
"diversion_opened_uv" : 0,
"diversion_click_download_pv" : 0,
"diversion_click_download_uv" : 0,
"active_uv" : 0,
"feed_pv" : 0,
"feed_uv" : 0,
"mission_1_uv" : 0,
"mission_2_uv" : 0,
"mission_3_uv" : 0,
"mission_4_uv" : 0,
"wish_show_pv" : 0,
"wish_click_pv" : 0,
"panda_show_pv" : 0,
"panda_click_pv" : 0,
"adman_show_pv" : 6,
"adman_click_pv" : 0,
"last_active_uv" : 0,
"left" : 0
}
let plugin_data_more = x.plugin_data_more || {};
let plugin_data = {};
let shop_data = x.shop_data || {};
if(shop_data.missionObj) {
for(let mission of Object.keys(shop_data.missionObj)) {
shop_data[`mission_` + mission + '_click_pv'] = shop_data.missionObj[mission].click_pv;
shop_data[`mission_` + mission + '_click_uv'] = shop_data.missionObj[mission].click_pv;
shop_data[`mission_` + mission + '_get_uv'] = shop_data.missionObj[mission].get_uv;
}
}
delete shop_data.missionObj;
//let scene_dates = _dates || dates;
//console.dir(t + '==================111')
if(t == 'plugin' || scene == 'plugin') {
let _plugin = pluginId || plugin;
for(let key of Object.keys(defaultPluginData)) {
if(_plugin && _plugin!== 'all' && key !== 'pluginId_' + _plugin) continue;
for(let ik of Object.keys(defaultPluginData[key])) {
if(ik == 'pluginId' || ik == 'name') continue;
plugin_data[`${key}_${ik}`] = x.plugin_data && x.plugin_data[key] ? x.plugin_data[key][ik] : defaultPluginData[key][ik]
}
}
}
console.dir(shop_data);
return {
key: x._id,
date: x.date,
osType: x.osType,
sdk_version: x.sdk_version,
app_name: x.appName || x.app_name,
channel: x.channel,
package_name: x.package_name,
...detail,
...plugin_data,
...plugin_data_more,
...shop_data
}
});
let scene_data = [];
console.dir(dates);
console.dir(plugin);
console.dir(scene);
if( obj.start && obj.end && obj.start == obj.end && plugin == 'all' && scene == 'plugin') {
console.dir('========data====!!!!!!!!!!!!');
for(let d of stats) {
/* let obj = {
key: d.key,
date: d.date,
osType: d.osType,
sdk_version: d.sdk_version,
app_name: d.app_name,
channel: d.channel,
package_name: d.package_name,
show_list_pv: d.show_list_pv,
show_list_uv: d.show_list_uv
}*/
for(let key of Object.keys(defaultPluginData)) {
console.dir(key + defaultPluginData[key]['name']);
scene_data.push({
key: d.key + d.date + d.osType + d.sdk_version + d.app_name + d.channel + d.package_name + Math.random().toString(36).substr(2),
date: d.date,
osType: d.osType,
sdk_version: d.sdk_version,
app_name: d.app_name,
channel: d.channel,
package_name: d.package_name,
show_list_pv: d.show_list_pv,
show_list_uv: d.show_list_uv,
name: defaultPluginData[key]['name'],
enter_plugin_pv: d[`${key}_enter_plugin_pv`] || 0,
enter_plugin_uv: d[`${key}_enter_plugin_uv`] || 0,
enter_plugin_rate: (d.show_list_uv == 0 ? 0 : (((d[`${key}_enter_plugin_uv`] || 0) / d.show_list_uv) * 100)).toFixed(2),
plugin_react_uv: d[`${key}_plugin_react_uv`] || 0,
ad_show: d[`${key}_ad_show`] || 0,
ad_click: d[`${key}_ad_click`] || 0,
ad_click_rate: ((d[`${key}_ad_show`] || 0) == 0 ? 0 : (((d[`${key}_ad_click`] || 0) / d[`${key}_ad_show`]) * 100)).toFixed(2),
active_time: d[`${key}_active_time`] || "0.00",
...data
});
}
}
setLoading(false);
setSceneData(scene_data);
console.dir(scene_data);
return;
}
setPagination({
total: data.total,
pageSize: data.limit,
current: data.skip + 1
})
setLoading(false);
setStatData(stats);
}
async function init() {
let result = await getSelects();
setApps(result.data && result.data.apps ? result.data.apps : []);
setAppNames(result.data && result.data.appNames ? result.data.appNames : []);
setPlugins(result.data && result.data.plugins ? result.data.plugins: []);
//console.dir(defaultPluginData);
fetchStat({
type,
osType,
app_name: app,
skip: 0,
limit: 100
});
// setChannels(result.data && result.data.channels ? result.data.channels : []);
}
useEffect(() => {
init();
setData({
...basicOption,
legend: {
data: ['邮件营销']
},
series: [
{
name: 'sdk加载',
yAxisIndex: 0,
type: 'line',
data: [120, 132, 101, 134, 90, 230, 210]
}
],
xAxis:{
type: 'category',
axisTick: {
alignWithLabel: true
},
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
}
});
}, [])
const handleTableChange = async (pagination, filters, sorter) => {
const pager = pagination;
pager.current = pagination.current;
setPagination(pager)
fetchStat({
type,
osType,
app_name: app,
skip: pagination.current-1,
keyword,
start: dates[0],
end: dates[1],
limit: 100
});
}
const handleChangeApp = (e) => {
setApp(e);
fetchStat({
type,
osType,
app_name: e,
keyword,
start: dates[0],
end: dates[1],
skip: 0,
limit: 100
});
}
const handleChangeosType = (e) => {
setOs(e);
fetchStat({
type,
osType: e,
app_name: app,
keyword,
start: dates[0],
end: dates[1],
skip: 0,
limit: 100
});
}
const onChangeCoin = (e) => {
setCoin(e.target.value);
console.dir(e.target.value);
}
const onChangeScene = (e) => {
setScene(e.target.value);
console.dir(e.target.value);
setTimeout(() => {
fetchStat({
type,
osType,
app_name: app,
keyword,
start: dates[0],
end: dates[1],
skip: 0,
limit: 100
},e.target.value);
}, 0);
}
const handleChangePluginType = (e) => {
setPlugin(e);
fetchStat({
type,
osType,
app_name: app,
keyword,
start: dates[0],
end: dates[1],
skip: 0,
limit: 100
},'plugin', e);
}
const onSearch = (e) => {
setKeyWord(e);
fetchStat({
type,
osType,
keyword: e,
app_name: app,
start: dates[0],
end: dates[1],
skip: 0,
limit: 100
},'plugin', e);
console.dir(e);
}
const onChange = (e) => {
setType(e.target.value);
if(e.target.value == 'all') {
setApp('all');
setKeyWord('');
}
if(e.target.value = 'appId') {
setApp('all');
setApps(appNames);
}
fetchStat({
type: e.target.value,
keyword: e.target.value == 'all' ? null : keyword,
osType,
app_name: e.target.value == 'all' ? 'all' : app,
start: dates[0],
end: dates[1],
skip: 0,
limit: 100
});
}
function download() {
return message.info('开发中');
}
function onChangeDate(date, _dates) {
console.log(date, _dates);
setDates(_dates);
fetchStat({
type,
keyword,
osType,
app_name: app,
start: _dates[0],
end: _dates[1],
skip: 0,
limit: 100
});
}
const Headers = {
date: { title: '日期', unique: true, types: ['mask','appId','detail','all','channel'], scenes: ['all','plugin'] },
osType: { title: '系统', unique: true, types: ['mask','appId','detail', 'all','channel'], scenes: ['all','plugin'] },
sdk_version: { title: 'sdk版本', unique: true, types: ['detail'], scenes: ['all','plugin'] },
app_name: { title: 'app', unique: true, types: ['mask','appId','detail','channel'], scenes: ['all','plugin'] },
channel: { title: 'channel', unique: true, types: ['detail','channel'], scenes: ['all','plugin'] },
package_name: { title: '包名', unique: true, types: ['detail'], scenes: ['all','plugin'] },
init_sdk: { title: 'SDK初始化', types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
show_yunbao: { title: '浮标展示',types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
click_yunbao: { title: '浮标点击', types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
show_list: { title: '抽屉展示',types: ['mask','appId','detail','all','channel'], scenes: ['all','plugin'] },
play_video: { title: '广告按钮点击', unique: true, types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
ad: { title: '广告展示数', unique: true, types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
ad_click: { title: '广告点击', types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
diversion_opened: { title: 'App引流任务打开', types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
diversion_click_download: { title: 'App引流任务点击下载', types: ['mask','appId','detail','all','channel'], scenes: ['all'] },
//pluginId_1_enter_plugin_pv: { title: '测试', unique: true, types: ['mask','appId','detail','all'], scenes: ['all','plugin'] }
}
let columns = [];
for(let x of Object.keys(Headers)) {
if((Headers[x].types || []).indexOf(type) == -1) continue;
if((Headers[x].scenes || []).indexOf(scene) == -1) continue;
if(Headers[x].unique) columns.push({ title: Headers[x].title, dataIndex: x, key: x });
else columns.push({ title:Headers[x].title, children: [{ title: x =='show_list' ? 'pv' : '次数', dataIndex: `${x}_pv`, key: `${x}_pv`}, { title: x =='show_list' ? 'uv' :'人数', dataIndex: `${x}_uv`, key: `${x}_uv`} ]});
}
if(scene !== 'all') {
if(coin == 'get') {
let tasks = [];
for(let i = 1; i <= 13;i++) {
tasks.push(i);
}
tasks = tasks.map( x => {
return {
title: '任务' + x,
children: [{
title: '点击次数',
dataIndex: `mission_${x}_click_pv`,
key: `mission_${x}_click_pv`,
},{
title: '点击人数',
dataIndex: `mission_${x}_click_uv`,
key: `mission_${x}_click_uv`,
},{
title: '领奖人数',
dataIndex: `mission_${x}_get_uv`,
key: `mission_${x}_get_uv`,
}]
}
});
columns = columns.concat([{
title: '赚积分页面打开次数',
dataIndex: `get_coin_pv`,
key: `get_coin_pv`
},{
title: '赚积分页面打开人数',
dataIndex: `get_coin_uv`,
key: `get_coin_uv`
}],...tasks);
} else {
columns = columns.concat([{
title: '兑奖页面打开次数',
dataIndex: `cost_coin_pv`,
key: `cost_coin_pv`
},{
title: '兑奖页面打开人数',
dataIndex: `cost_coin_uv`,
key: `cost_coin_uv`
},{
title: '限量兑换领取次数',
dataIndex: `limit_exchange_pv`,
key: `limit_exchange_pv`
},{
title: '限量兑换领取人数',
dataIndex: `limit_exchange_uv`,
key: `limit_exchange_uv`
},{
title: '签到有礼打开次数',
dataIndex: `open_sign_pv`,
key: `open_sign_pv`
},{
title: '签到有礼打开人数',
dataIndex: `open_sign_uv`,
key: `open_sign_uv`
},{
title: '签到有礼签到人数',
dataIndex: `sign_uv`,
key: `sign_uv`
},{
title: '云币抽奖打开次数',
dataIndex: `lottery_pv`,
key: `lottery_pv`
},{
title: '云币抽奖打开人数',
dataIndex: `lottery_uv`,
key: `lottery_uv`
},{
title: '精品卡券兑换次数',
dataIndex: `card_exchange_pv`,
key: `card_exchange_pv`
},{
title: '精品卡券兑换人数',
dataIndex: `card_exchange_uv`,
key: `card_exchange_uv`
}]);
}
}
/*columns = columns.map( x => {
x['fixed'] = 'left';
return x;
});*/
/* if(scene == 'plugin') {
columns = columns.map( x => {
x['fixed'] = 'left';
return x;
});
}*/
columns = columns.map( x => {
if(scene == 'plugin') {
if(x.dataIndex == 'date') x['fixed'] = 'left';
x.width = 30;
if(x.children) {
x.children = x.children.map( x => {
//x['fixed'] = 'left';
x.width = 30;
return x;
});
}
} else {
delete x.fixed;
delete x.width;
}
//if(x.dataIndex == 'date') x['fixed'] = 'left';
return x;
});
let sceneColumns = [];
if(scene == 'plugin') {
if(dates && dates.length == 2 && dates[0] == dates[1] && plugin == 'all' && scene == 'plugin') {
sceneColumns = columns.concat([{
title: '场景',
dataIndex: `name`,
key: `name`,
width: 20
},{
title: '入口点击次数',
dataIndex: `enter_plugin_pv`,
key: `enter_plugin_pv`,
sorter: (a, b) => a.enter_plugin_pv - b.enter_plugin_pv,
sortDirections: ['ascend','descend'],
width: 20
},{
title: '入口点击人数',
dataIndex: `enter_plugin_uv`,
key: `enter_plugin_uv`,
sorter: (a, b) => a.enter_plugin_uv - b.enter_plugin_uv,
sortDirections: ['ascend','descend'],
width: 20
},{
title: '入口点击率(%)',
dataIndex: `enter_plugin_rate`,
key: `enter_plugin_rate`,
sorter: (a, b) => a.enter_plugin_rate - b.enter_plugin_rate,
sortDirections: ['ascend','descend'],
width: 20
},{
title: '互动人数',
dataIndex: `plugin_react_uv`,
key: `plugin_react_uv`,
sorter: (a, b) => a.plugin_react_uv - b.plugin_react_uv,
sortDirections: ['ascend','descend'],
width: 20
},{
title: '广告展示',
dataIndex: `ad_show`,
key: `ad_show`,
sorter: (a, b) => a.ad_show - b.ad_show,
sortDirections: ['ascend','descend'],
width: 20
},{
title: '广告点击',
dataIndex: `ad_click`,
key: `ad_click`,
sorter: (a, b) => a.ad_click - b.ad_click,
sortDirections: ['ascend','descend'],
width: 20
},{
title: '广告点击率(%)',
dataIndex: `ad_click_rate`,
key: `ad_click_rate`,
sorter: (a, b) => a.ad_click_rate - b.ad_click_rate,
sortDirections: ['ascend','descend'],
width: 20
},{
title: '活跃时长',
dataIndex: `active_time`,
key: `active_time`,
sorter: (a, b) => a.active_time - b.active_time,
sortDirections: ['ascend','descend'],
width: 20
}])
} else {
let count = 0;
for(let key of Object.keys(defaultPluginData)) {
if(plugin!== 'all' && key !== 'pluginId_' + plugin) continue;
count += 1;
let data = { title: defaultPluginData[key].name, children: [{
title: '入口点击次数',
dataIndex: `${key}_enter_plugin_pv`,
key: `${key}_enter_plugin_pv`,
width: 20
},{
title: '入口点击人数',
dataIndex: `${key}_enter_plugin_uv`,
key: `${key}_enter_plugin_uv`,
width: 20
},{
title: '互动人数',
dataIndex: `${key}_plugin_react_uv`,
key: `${key}_plugin_react_uv`,
width: 20
},{
title: '广告展示',
dataIndex: `${key}_ad_show`,
key: `${key}_ad_show`,
width: 20
},{
title: '广告点击',
dataIndex: `${key}_ad_click`,
key: `${key}_ad_click`,
width: 20
},{
title: '活跃时长',
dataIndex: `${key}_active_time`,
key: `${key}_active_time`,
width: 20
}]
};
columns.push(data);
}
scrollX = 100 + count * 500;
}
console.dir(plugin + '===============')
if(plugin == '19') {
columns = columns.concat([{
title: '投喂次数',
dataIndex: `feed_pv`,
key: `feed_uv`,
width: 20
},{
title: '投喂人数',
dataIndex: `feed_uv`,
key: `feed_uv`,
width: 20
},{
title: '饲料任务',
children: [{
title: '完成1次',
dataIndex: `mission_1_uv`,
key: `mission_1_uv`,
width: 20
},{
title: '完成2次',
dataIndex: `mission_2_uv`,
key: `mission_2_uv`,
width: 20
},{
title: '完成3次',
dataIndex: `mission_3_uv`,
key: `mission_3_uv`,
width: 20
},{
title: '完成4次',
dataIndex: `mission_4_uv`,
key: `mission_4_uv`,
width: 20
}]},{
title: '日活人数',
dataIndex: `active_uv`,
key: `active_uv`,
width: 20
},{
title: '昨日日活',
dataIndex: `last_active_uv`,
key: `last_active_uv`,
width: 20
},{
title: '次留日活',
dataIndex: `left`,
key: `left`,
width: 20
},{
title: '许愿池展示',
dataIndex: `wish_show_pv`,
key: `wish_show_pv`,
width: 20
},{
title: '许愿池点击',
dataIndex: `wish_click_pv`,
key: `wish_click_pv`,
width: 20
},{
title: 'npc小熊猫展示',
dataIndex: `panda_show_pv`,
key: `panda_show_pv`,
width: 20
},{
title: 'npc小熊猫点击',
dataIndex: `panda_click_pv`,
key: `panda_click_pv`,
width: 20
},{
title: '广告推销员展示',
dataIndex: `adman_show_pv`,
key: `adman_show_pv`,
width: 20
},{
title: '广告推销员点击',
dataIndex: `adman_click_pv`,
key: `adman_click_pv`,
width: 20
}])
console.dir(scrollX + 'before');
scrollX = scrollX + 2000;
console.dir(scrollX + + 'after');
}
//setScrollX(count * 300)
}
if(scene !== 'all') scrollX += (coin == 'get' ? 3600 : 1500);
const appOptions = apps.map( x => <Option key={x} value={x}>{ x }</Option>)
const pluginOptions = plugins.map( x => <Option key={x.key} value={x.key}>{ x.name }</Option>)
return (
<div className="container">
<div className="opbox flex r" style={{ marginBottom: '12px' }}>
<Radio.Group onChange={onChangeScene} value={scene} style={{ marginRight: '12px', minWidth: '176px' }}>
<Radio.Button value="all">全局视角</Radio.Button>
<Radio.Button value="plugin">场景分析</Radio.Button>
</Radio.Group>
<Radio.Group onChange={onChangeCoin} value={coin} style={{ marginRight: '12px', minWidth: '176px' }}>
<Radio.Button value="get">赚积分</Radio.Button>
<Radio.Button value="cost">花积分</Radio.Button>
</Radio.Group>
<Radio.Group onChange={onChange} value={type} style={{ marginRight: '12px', minWidth: '476px' }}>
<Radio.Button value="all">大盘数据</Radio.Button>
<Radio.Button value="mask">全局数据</Radio.Button>
<Radio.Button value="appId">全局数据(官方)</Radio.Button>
<Radio.Button value="channel">渠道数据</Radio.Button>
<Radio.Button value="detail">详细数据</Radio.Button>
</Radio.Group>
<RangePicker
format={dateFormat}
style={{ marginRight: '12px' }}
onChange={ onChangeDate }
/>
<Button type="primary" onClick={ download }>下载数据</Button>
</div>
<div className="opbox flex r" style={{ marginBottom: '12px' }}>
<Select placeholder="请选择系统" onChange={handleChangeosType} value={osType} style={{ marginRight: '12px', minWidth: '200px' }}>
<Option value="all">全部</Option>
<Option value="android">安卓</Option>
<Option value="ios">IOS</Option>
</Select>
{ type != 'all' ? <Select placeholder="请选择APP" onChange={handleChangeApp} value={app} style={{ marginRight: '12px', width: '200px' }}>
<Option value="all">全部</Option>
{
appOptions
}
</Select>: null
}
{
scene == 'plugin' ? <Select placeholder="请选择场景" onChange={handleChangePluginType} value={plugin} style={{ marginRight: '12px', minWidth: '200px' }}>
<Option value="all">全部场景</Option>
{
pluginOptions
}
</Select>: null
}
{
type != 'all' ? <Search style={{ marginRight: '12px' }} allowClear placeholder="输入包名、channel、app" onSearch={onSearch} style={{ width: 250 }} enterButton/> : null
}
</div>
<div className="chart" style={{ display: 'none' }}><ReactECharts option={ data } /></div>
{
(dates && dates.length == 2 && dates[0] == dates[1] && plugin == 'all' && scene == 'plugin') ? <Table dataSource={sceneData} columns={sceneColumns} loading={loading} pagination={{ pageSize: 10000 }} scroll={{ x: 2000, y: 700 }}/> : <Table dataSource={statData} columns={columns} onChange={handleTableChange} loading={loading} pagination={{...pagination}} scroll={{ x: scrollX, y: 700 }}/>
}
</div>
);
}
import React, { useState, useEffect, useRef } from 'react';
import styles from './index.less';
import { Button, Form, Card, Input } from 'antd';
import { setToken, delToken, setUserName, delUserName, getUserName } from '../local';
import * as fn from '../api';
const { sign } = fn.default;
const tailLayout = {
wrapperCol: { offset: 5, span: 19 },
};
const layout = {
labelCol: { span: 5 },
wrapperCol: { span: 19 },
};
export default function LoginPage() {
const onFinish = async (values: any) => {
console.log('Success:', values);
let a = await sign(values);
console.dir(a);
setUserName(a.username);
setToken('Bearer ' + a.token);
return window.location.href = '/';
};
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
return (
<div className="box">
<div className = 'flex c' style={{ height: '100%', background: '#001529' }} >
<Card
className = { 'm' }
title = { '运营管理系统' }
extra = { <span>登录</span> }
style = {{ width:400,margin:'auto' }}
>
<Form
{...layout}
name="basic"
onFinish={onFinish}
onFinishFailed={onFinishFailed}
>
<Form.Item
label="用户名"
name="username"
rules={[{ required: true, message: '请输入账号' }]}
>
<Input />
</Form.Item>
<Form.Item
label="密码"
name="password"
rules={[{ required: true, message: '请输入密码!' }]}
>
<Input.Password />
</Form.Item>
<Form.Item {...tailLayout}>
<Button type="primary" htmlType="submit">
提交
</Button>
</Form.Item>
</Form>
</Card>
</div>
</div>
);
}
import React, { useState, useEffect, useRef } from 'react';
import styles from './index.less';
import ReactECharts from 'echarts-for-react';
import { Button, Form, Card, Input, Layout, Menu, Select, DatePicker, Table, Radio } from 'antd';
import { setToken, delToken, setUserName, delUserName, getUserName } from '../local';
import moment from 'moment';
import {
MenuUnfoldOutlined,
MenuFoldOutlined,
UserOutlined,
VideoCameraOutlined,
UploadOutlined,
DatabaseOutlined,
FundOutlined
} from '@ant-design/icons';
import * as fn from '../api';
const { getSelects, getStats } = fn.default;
const { Header, Sider, Content } = Layout;
const { Option } = Select;
const { RangePicker } = DatePicker;
const dateFormat = 'YYYYMMDD';
export default function IndexPage(props) {
const toggle = () => {
setCollapsed(!collapsed);
};
async function init() {
let result = await getSelects();
console.dir(result);
}
useEffect(() => {
init();
}, [])
return (
<div className="container">
开发中
</div>
);
}
import { extend } from 'umi-request';
import { notification, message } from 'antd';
import _omit from 'lodash/omit';
import { getToken } from './local';
/*const codeMessage = {
200: '服务器成功返回请求的数据。',
201: '新建或修改数据成功。',
202: '一个请求已经进入后台排队(异步任务)。',
204: '删除数据成功。',
400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。',
401: '用户没有权限(令牌、用户名、密码错误)。',
403: '用户得到授权,但是访问是被禁止的。',
404: '发出的请求针对的是不存在的记录,服务器没有进行操作。',
406: '请求的格式不可得。',
410: '请求的资源被永久删除,且不会再得到的。',
422: '当创建一个对象时,发生一个验证错误。',
500: '服务器发生错误,请检查服务器。',
502: '网关错误。',
503: '服务不可用,服务器暂时过载或维护。',
504: '网关超时。',
};
const errorHandler = (error: { response: Response }): Response => {
const { response } = error;
if (response && response.status) {
const errorText = codeMessage[response.status] || response.statusText;
const { status, url } = response;
notification.error({
message: `请求错误 ${status}`,
description: errorText,
});
} else if (!response) {
notification.error({
description: '您的网络发生异常,无法连接服务器',
message: '网络异常',
});
}
return response;
};*/
const authorization = (noAuth?: boolean) => {
const AuthorizationToken = getToken();
console.dir(AuthorizationToken);
return AuthorizationToken;
};
/**
* @param noAuth
* 是否带token请求
*
* @param credential
* 默认请求是否带上cookie
* include 携带
* omit 不携带
*/
const HttpRequest = (option?:any, noAuth?: boolean, credential?: 'include' | 'omit') => {
let newOption = {...option}
if(newOption.method === 'post' || newOption.method === 'delete' || newOption.method === 'put') {
// params --> 会被放到body的请求参数,POST/PUT/DELETE 方法
newOption.data = newOption.body
}else {
// params --> 会被拼接到url上的的请求参数,GET方法
newOption.params = newOption.body
}
if(newOption.body) {
// 为了保证调用的一致性,外部都通过自定义的body传递参数,但body是关键字需要手动清除
newOption = _omit(newOption, 'body')
}
const request = extend({
errorHandler: null, // 默认错误处理
timeout: 15000,
credentials: credential || 'omit',
...newOption,
headers: {
Accept: 'application/json',
'Content-Type': 'application/json; charset=utf-8',
Authorization: authorization(noAuth),
}
})
// 添加拦截器统一处理返回response
request.interceptors.response.use(async response => {
const data = await response.clone().json()
if(data.status !== 200 && data.status.message){
message.error(data.status.message)
}
return response;
});
return request
};
export default HttpRequest;
\ No newline at end of file
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"jsx": "react-jsx",
"esModuleInterop": true,
"sourceMap": true,
"baseUrl": "./",
"strict": true,
"paths": {
"@/*": ["src/*"],
"@@/*": ["src/.umi/*"]
},
"allowSyntheticDefaultImports": true
},
"include": [
"mock/**/*",
"src/**/*",
"config/**/*",
".umirc.ts",
"typings.d.ts"
],
"exclude": [
"node_modules",
"lib",
"es",
"dist",
"typings",
"**/__test__",
"test",
"docs",
"tests"
]
}
declare module '*.css';
declare module '*.less';
declare module '*.png';
declare module '*.svg' {
export function ReactComponent(props: React.SVGProps<SVGSVGElement>): React.ReactElement
const url: string
export default url
}
FROM node:9.11.1
WORKDIR /app
#ADD . /app/
ENV PORT=8786
ENV PROJECT_LEVEL=production
ENV NODE_ENV=production
RUN \
rm /etc/localtime && \
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY package.json /app/
COPY . /app
EXPOSE 8786
CMD node index.js
\ No newline at end of file
image: clean
@echo "building docker image"
@docker build -t registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbaodata .
push:
@docker push registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbaodata
clean:
@echo "cleanning"
all:
@echo "打包文件"
@cd '../app' && yarn build
@echo "打包文件完成,文件替换中"
@rm -rf './dist'
@mv '../app/dist' '.'
@echo "building docker image"
@echo "文件替换完成,生成docker镜像"
@docker build -t registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbaodata .
@echo "生成docker镜像完成,准备上传"
@docker push registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbaodata
@echo "镜像更新完成"
alldev:
@echo "打包文件"
@cd '../app' && yarn build
@echo "打包文件完成,文件替换中"
@rm -rf './dist'
@mv '../app/dist' '.'
@cd './dist' && sed -i "" s/yz-api.qyyz.ltd/yz-api-dev.qyyz.ltd/g `grep yz-api.qyyz.ltd -rl --include="*.js" .`
@echo "building docker image"
@echo "文件替换完成,生成docker镜像"
@docker build -t registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbaodata-dev . -f Dockerfile.dev
@echo "生成docker镜像完成,准备上传"
@docker push registry.cn-hangzhou.aliyuncs.com/wjh-reg/yunbaodata-dev
@echo "镜像更新完成"
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<link rel="stylesheet" href="/umi.css" />
<script>
window.routerBase = "/";
</script>
<script>
//! umi version: 3.4.2
</script>
</head>
<body>
<div id="root"></div>
<script src="/umi.js"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
const express = require('express');
const path = require('path');
const send = require('send');
const parseUrl = require('parseurl')
const bodyParser = require('body-parser')
const app = express();
const port = 8786;
const pagePaths = ['','/','/stat','/login']
app.use(bodyParser.urlencoded({ extended: false }))
app.use(bodyParser.json())
// 页面渲染
app.get('/umi.css',(req,res) => {
let stream = send(req, path.join(__dirname, './dist/umi.css'), {});
stream.pipe(res);
});
app.get('/umi.js',(req,res) => {
let stream = send(req, path.join(__dirname, './dist/umi.js'), {});
stream.pipe(res);
});
app.use((req, res, next) => {
console.dir(req.url)
let dir = (req.hostname || '').split('.')[0];
let originalUrl = parseUrl.original(req);
let _path = parseUrl(req).pathname
if (_path === '/' && originalUrl.pathname.substr(-1) !== '/') {
_path = ''
}
if(pagePaths.indexOf(_path) >= 0) {
let stream = send(req, path.join(__dirname, './dist/index.html'), {});
stream.pipe(res);
} else next();
});
app.listen(port, () => console.log(`index page app listening on port ${port}!`))
\ No newline at end of file
{
"name": "yunbao-server",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"requires": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
}
},
"array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
"body-parser": {
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
"integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
"requires": {
"bytes": "3.1.0",
"content-type": "~1.0.4",
"debug": "2.6.9",
"depd": "~1.1.2",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"on-finished": "~2.3.0",
"qs": "6.7.0",
"raw-body": "2.4.0",
"type-is": "~1.6.17"
}
},
"bytes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
},
"content-disposition": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
"integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
"requires": {
"safe-buffer": "5.1.2"
}
},
"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=="
},
"cookie": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
"integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
},
"cookie-signature": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
"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"
}
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
},
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
},
"express": {
"version": "4.17.1",
"resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
"integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
"requires": {
"accepts": "~1.3.7",
"array-flatten": "1.1.1",
"body-parser": "1.19.0",
"content-disposition": "0.5.3",
"content-type": "~1.0.4",
"cookie": "0.4.0",
"cookie-signature": "1.0.6",
"debug": "2.6.9",
"depd": "~1.1.2",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"finalhandler": "~1.1.2",
"fresh": "0.5.2",
"merge-descriptors": "1.0.1",
"methods": "~1.1.2",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"path-to-regexp": "0.1.7",
"proxy-addr": "~2.0.5",
"qs": "6.7.0",
"range-parser": "~1.2.1",
"safe-buffer": "5.1.2",
"send": "0.17.1",
"serve-static": "1.14.1",
"setprototypeof": "1.1.1",
"statuses": "~1.5.0",
"type-is": "~1.6.18",
"utils-merge": "1.0.1",
"vary": "~1.1.2"
}
},
"finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
"integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
"requires": {
"debug": "2.6.9",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"on-finished": "~2.3.0",
"parseurl": "~1.3.3",
"statuses": "~1.5.0",
"unpipe": "~1.0.0"
}
},
"forwarded": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
},
"fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"http-errors": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
"integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.1",
"statuses": ">= 1.5.0 < 2",
"toidentifier": "1.0.0"
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"merge-descriptors": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
},
"methods": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
},
"mime-db": {
"version": "1.48.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz",
"integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ=="
},
"mime-types": {
"version": "2.1.31",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz",
"integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==",
"requires": {
"mime-db": "1.48.0"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
},
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
"requires": {
"ee-first": "1.1.1"
}
},
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
},
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
"proxy-addr": {
"version": "2.0.7",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
"requires": {
"forwarded": "0.2.0",
"ipaddr.js": "1.9.1"
}
},
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
},
"range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
},
"raw-body": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
"integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
"requires": {
"bytes": "3.1.0",
"http-errors": "1.7.2",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
"integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
"requires": {
"debug": "2.6.9",
"depd": "~1.1.2",
"destroy": "~1.0.4",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "~1.7.2",
"mime": "1.6.0",
"ms": "2.1.1",
"on-finished": "~2.3.0",
"range-parser": "~1.2.1",
"statuses": "~1.5.0"
},
"dependencies": {
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
}
}
},
"serve-static": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
"integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
"requires": {
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"parseurl": "~1.3.3",
"send": "0.17.1"
}
},
"setprototypeof": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
},
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
}
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
}
}
}
{
"name": "yunbao-server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"body-parser": "^1.19.0",
"express": "^4.17.1",
"parseurl": "^1.3.3"
}
}
Arguments:
/usr/local/bin/node /usr/local/Cellar/yarn/1.22.4/libexec/bin/yarn.js add express body-parser parseUrl --save
PATH:
/usr/local/opt/scala@2.11/bin:/usr/local/sbin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin:/usr/local/hive/bin:/Users/liusong/desktop/hadoop-2.7.7/bin
Yarn version:
1.22.4
Node version:
14.5.0
Platform:
darwin x64
Trace:
Error: https://registry.npm.taobao.org/parseUrl: Not found
at Request.params.callback [as _callback] (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:66987:18)
at Request.self.callback (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:140748:22)
at Request.emit (events.js:314:20)
at Request.<anonymous> (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:141720:10)
at Request.emit (events.js:314:20)
at IncomingMessage.<anonymous> (/usr/local/Cellar/yarn/1.22.4/libexec/lib/cli.js:141642:12)
at Object.onceWrapper (events.js:420:28)
at IncomingMessage.emit (events.js:326:22)
at endReadableNT (_stream_readable.js:1226:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm manifest:
{
"name": "yunbao-server",
"version": "1.0.0",
"main": "index.js",
"license": "MIT"
}
yarn manifest:
No manifest
Lockfile:
No lockfile
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
accepts@~1.3.7:
version "1.3.7"
resolved "https://registry.npm.taobao.org/accepts/download/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
integrity sha1-UxvHJlF6OytB+FACHGzBXqq1B80=
dependencies:
mime-types "~2.1.24"
negotiator "0.6.2"
array-flatten@1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/array-flatten/download/array-flatten-1.1.1.tgz?cache=0&sync_timestamp=1574313293899&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Farray-flatten%2Fdownload%2Farray-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
body-parser@1.19.0, body-parser@^1.19.0:
version "1.19.0"
resolved "https://registry.npm.taobao.org/body-parser/download/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
integrity sha1-lrJwnlfJxOCab9Zqj9l5hE9p8Io=
dependencies:
bytes "3.1.0"
content-type "~1.0.4"
debug "2.6.9"
depd "~1.1.2"
http-errors "1.7.2"
iconv-lite "0.4.24"
on-finished "~2.3.0"
qs "6.7.0"
raw-body "2.4.0"
type-is "~1.6.17"
bytes@3.1.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/bytes/download/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
integrity sha1-9s95M6Ng4FiPqf3oVlHNx/gF0fY=
content-disposition@0.5.3:
version "0.5.3"
resolved "https://registry.npm.taobao.org/content-disposition/download/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
integrity sha1-4TDK9+cnkIfFYWwgB9BIVpiYT70=
dependencies:
safe-buffer "5.1.2"
content-type@~1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/content-type/download/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
integrity sha1-4TjMdeBAxyexlm/l5fjJruJW/js=
cookie-signature@1.0.6:
version "1.0.6"
resolved "https://registry.npm.taobao.org/cookie-signature/download/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
cookie@0.4.0:
version "0.4.0"
resolved "https://registry.npm.taobao.org/cookie/download/cookie-0.4.0.tgz?cache=0&sync_timestamp=1587525865178&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcookie%2Fdownload%2Fcookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
integrity sha1-vrQ35wIrO21JAZ0IhmUwPr6cFLo=
debug@2.6.9:
version "2.6.9"
resolved "https://registry.npm.taobao.org/debug/download/debug-2.6.9.tgz?cache=0&sync_timestamp=1607566517339&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdebug%2Fdownload%2Fdebug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
integrity sha1-XRKFFd8TT/Mn6QpMk/Tgd6U2NB8=
dependencies:
ms "2.0.0"
depd@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/depd/download/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
destroy@~1.0.4:
version "1.0.4"
resolved "https://registry.npm.taobao.org/destroy/download/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/ee-first/download/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
encodeurl@~1.0.2:
version "1.0.2"
resolved "https://registry.npm.taobao.org/encodeurl/download/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.npm.taobao.org/escape-html/download/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
etag@~1.8.1:
version "1.8.1"
resolved "https://registry.npm.taobao.org/etag/download/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
express@^4.17.1:
version "4.17.1"
resolved "https://registry.npm.taobao.org/express/download/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
integrity sha1-RJH8OGBc9R+GKdOcK10Cb5ikwTQ=
dependencies:
accepts "~1.3.7"
array-flatten "1.1.1"
body-parser "1.19.0"
content-disposition "0.5.3"
content-type "~1.0.4"
cookie "0.4.0"
cookie-signature "1.0.6"
debug "2.6.9"
depd "~1.1.2"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
finalhandler "~1.1.2"
fresh "0.5.2"
merge-descriptors "1.0.1"
methods "~1.1.2"
on-finished "~2.3.0"
parseurl "~1.3.3"
path-to-regexp "0.1.7"
proxy-addr "~2.0.5"
qs "6.7.0"
range-parser "~1.2.1"
safe-buffer "5.1.2"
send "0.17.1"
serve-static "1.14.1"
setprototypeof "1.1.1"
statuses "~1.5.0"
type-is "~1.6.18"
utils-merge "1.0.1"
vary "~1.1.2"
finalhandler@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/finalhandler/download/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
integrity sha1-t+fQAP/RGTjQ/bBTUG9uur6fWH0=
dependencies:
debug "2.6.9"
encodeurl "~1.0.2"
escape-html "~1.0.3"
on-finished "~2.3.0"
parseurl "~1.3.3"
statuses "~1.5.0"
unpipe "~1.0.0"
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.npm.taobao.org/forwarded/download/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
fresh@0.5.2:
version "0.5.2"
resolved "https://registry.npm.taobao.org/fresh/download/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
http-errors@1.7.2:
version "1.7.2"
resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.2.tgz?cache=0&sync_timestamp=1593407611415&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
integrity sha1-T1ApzxMjnzEDblsuVSkrz7zIXI8=
dependencies:
depd "~1.1.2"
inherits "2.0.3"
setprototypeof "1.1.1"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
http-errors@~1.7.2:
version "1.7.3"
resolved "https://registry.npm.taobao.org/http-errors/download/http-errors-1.7.3.tgz?cache=0&sync_timestamp=1593407611415&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fhttp-errors%2Fdownload%2Fhttp-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
integrity sha1-bGGeT5xgMIw4UZSYwU+7EKrOuwY=
dependencies:
depd "~1.1.2"
inherits "2.0.4"
setprototypeof "1.1.1"
statuses ">= 1.5.0 < 2"
toidentifier "1.0.0"
iconv-lite@0.4.24:
version "0.4.24"
resolved "https://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.24.tgz?cache=0&sync_timestamp=1594184325364&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ficonv-lite%2Fdownload%2Ficonv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=
dependencies:
safer-buffer ">= 2.1.2 < 3"
inherits@2.0.3:
version "2.0.3"
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
inherits@2.0.4:
version "2.0.4"
resolved "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=
ipaddr.js@1.9.1:
version "1.9.1"
resolved "https://registry.npm.taobao.org/ipaddr.js/download/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
integrity sha1-v/OFQ+64mEglB5/zoqjmy9RngbM=
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
merge-descriptors@1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/merge-descriptors/download/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
methods@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/methods/download/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
mime-db@1.46.0:
version "1.46.0"
resolved "https://registry.npm.taobao.org/mime-db/download/mime-db-1.46.0.tgz?cache=0&sync_timestamp=1613194697983&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-db%2Fdownload%2Fmime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee"
integrity sha1-Ymd0in95lZTePLyM3pHe80lmHO4=
mime-types@~2.1.24:
version "2.1.29"
resolved "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.29.tgz?cache=0&sync_timestamp=1613608475804&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-types%2Fdownload%2Fmime-types-2.1.29.tgz#1d4ab77da64b91f5f72489df29236563754bb1b2"
integrity sha1-HUq3faZLkfX3JInfKSNlY3VLsbI=
dependencies:
mime-db "1.46.0"
mime@1.6.0:
version "1.6.0"
resolved "https://registry.npm.taobao.org/mime/download/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
integrity sha1-Ms2eXGRVO9WNGaVor0Uqz/BJgbE=
ms@2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
ms@2.1.1:
version "2.1.1"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.1.tgz?cache=0&sync_timestamp=1607433988749&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fms%2Fdownload%2Fms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha1-MKWGTrPrsKZvLr5tcnrwagnYbgo=
negotiator@0.6.2:
version "0.6.2"
resolved "https://registry.npm.taobao.org/negotiator/download/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
integrity sha1-/qz3zPUlp3rpY0Q2pkiD/+yjRvs=
on-finished@~2.3.0:
version "2.3.0"
resolved "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
dependencies:
ee-first "1.1.1"
parseurl@^1.3.3, parseurl@~1.3.3:
version "1.3.3"
resolved "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=
path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-0.1.7.tgz?cache=0&sync_timestamp=1601400247487&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-to-regexp%2Fdownload%2Fpath-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
proxy-addr@~2.0.5:
version "2.0.6"
resolved "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz?cache=0&sync_timestamp=1582556112011&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fproxy-addr%2Fdownload%2Fproxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf"
integrity sha1-/cIzZQVEfT8vLGOO0nLK9hS7sr8=
dependencies:
forwarded "~0.1.2"
ipaddr.js "1.9.1"
qs@6.7.0:
version "6.7.0"
resolved "https://registry.npm.taobao.org/qs/download/qs-6.7.0.tgz?cache=0&sync_timestamp=1610598179287&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fqs%2Fdownload%2Fqs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
integrity sha1-QdwaAV49WB8WIXdr4xr7KHapsbw=
range-parser@~1.2.1:
version "1.2.1"
resolved "https://registry.npm.taobao.org/range-parser/download/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
integrity sha1-PPNwI9GZ4cJNGlW4SADC8+ZGgDE=
raw-body@2.4.0:
version "2.4.0"
resolved "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
integrity sha1-oc5vucm8NWylLoklarWQWeE9AzI=
dependencies:
bytes "3.1.0"
http-errors "1.7.2"
iconv-lite "0.4.24"
unpipe "1.0.0"
safe-buffer@5.1.2:
version "5.1.2"
resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1589129010497&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha1-mR7GnSluAxN0fVm9/St0XDX4go0=
"safer-buffer@>= 2.1.2 < 3":
version "2.1.2"
resolved "https://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=
send@0.17.1:
version "0.17.1"
resolved "https://registry.npm.taobao.org/send/download/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
integrity sha1-wdiwWfeQD3Rm3Uk4vcROEd2zdsg=
dependencies:
debug "2.6.9"
depd "~1.1.2"
destroy "~1.0.4"
encodeurl "~1.0.2"
escape-html "~1.0.3"
etag "~1.8.1"
fresh "0.5.2"
http-errors "~1.7.2"
mime "1.6.0"
ms "2.1.1"
on-finished "~2.3.0"
range-parser "~1.2.1"
statuses "~1.5.0"
serve-static@1.14.1:
version "1.14.1"
resolved "https://registry.npm.taobao.org/serve-static/download/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
integrity sha1-Zm5jbcTwEPfvKZcKiKZ0MgiYsvk=
dependencies:
encodeurl "~1.0.2"
escape-html "~1.0.3"
parseurl "~1.3.3"
send "0.17.1"
setprototypeof@1.1.1:
version "1.1.1"
resolved "https://registry.npm.taobao.org/setprototypeof/download/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
integrity sha1-fpWsskqpL1iF4KvvW6ExMw1K5oM=
"statuses@>= 1.5.0 < 2", statuses@~1.5.0:
version "1.5.0"
resolved "https://registry.npm.taobao.org/statuses/download/statuses-1.5.0.tgz?cache=0&sync_timestamp=1609654438540&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstatuses%2Fdownload%2Fstatuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
toidentifier@1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/toidentifier/download/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
integrity sha1-fhvjRw8ed5SLxD2Uo8j013UrpVM=
type-is@~1.6.17, type-is@~1.6.18:
version "1.6.18"
resolved "https://registry.npm.taobao.org/type-is/download/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
integrity sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=
dependencies:
media-typer "0.3.0"
mime-types "~2.1.24"
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
utils-merge@1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/utils-merge/download/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.npm.taobao.org/vary/download/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
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