This commit is contained in:
pplokijuhyg 2019-12-10 14:32:04 +08:00
parent 15fd23bee2
commit 63e6bb971f
7 changed files with 793 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules

23
app.js Normal file
View File

@ -0,0 +1,23 @@
const Koa = require("koa");
const requter = require("./bin/router.js");
dbs = require("./bin/mongodb.js")('mongodb://localhost:27017/myblog',"wecatdemo")
// console.log(requter)
// import requter from "./bin/router"
const app = new Koa();
app.use(async (ctx,next)=>{
// await next();
console.log(ctx.url)
// console.time("asd")
// ctx.response.body = {a:1};
await next()
// console.log("执行")
// console.timeEnd("asd")
});
const bodyParser = require('koa-bodyparser');
app.use(bodyParser());
// console.log(requter())
app.use(requter());
app.listen(3002);
console.log("http://localhost:3002")

205
bin/mongodb.js Normal file
View File

@ -0,0 +1,205 @@
var MongoClient = require('mongodb').MongoClient;
var dburl;
let idadd = async (set) => {
let id = 0
if (set == "idadd") {
return 0;
} else {
await find('idadd', { 'set': set }).then((res) => {
if (res.data.length != 0) {
id = res.data[0].num_key
} else {
id = 1
}
})
}
if (id == 1) {
await add('idadd', { set, 'num_key': 2 })
} else if (set != "idadd") {
console.log(id)
await update('idadd', { 'set': set }, { 'num_key': id + 1 })
}
console.log(id)
return id
}
let add = async (set, data, url = dburl) => {
if (set != "idadd") {
let id = await idadd(set)
data.num_key = id
}
return new Promise((resolve, reject) => {
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
try {
dbo.collection(set).insertOne(data, function (err, res) {
if (err) throw err;
db.close();
resolve({ code: 0 ,msg:"添加成功"});
});
} catch (error) {
reject({ code: 1, error })
}
});
})
}
let adds = async (set, data, url = dburl) => {
if (set != "idadd") {
for (let i in data) {
let id = await idadd(set)
data[i].num_key = id
}
}
return new Promise((resolve, reject) => {
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
try {
dbo.collection(set).insertMany(data, function (err, res) {
if (err) throw err;
db.close();
resolve({ code: 0, num: res.insertedCount });
});
} catch (error) {
reject({ code: 1, error })
}
});
})
}
let remove = async (set, where, url = dburl) => {
return new Promise((resolve, reject) => {
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
try {
dbo.collection(set).deleteOne(where, function (err, obj) {
if (err) throw err;
db.close();
resolve({ code: 0 });
});
} catch (error) {
reject({ code: 1, error })
}
});
})
}
let removes = async (set, where, url = dburl) => {
return new Promise((resolve, reject) => {
if (where == "" || Object.keys(where).length == 0) {
reject({ code: 1 })
}
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
try {
dbo.collection(set).deleteMany(where, function (err, obj) {
if (err) throw err;
db.close();
resolve({ code: 0, num: obj.result.n });
});
} catch (error) {
reject({ code: 1, error })
}
});
})
}
let find = async (set, where = {}, page = 0, num = 0, url = dburl) => {
return new Promise((resolve, reject) => {
if (num == 0) {
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
try {
dbo.collection(set).find(where).toArray(function (err, result) {
if (err) throw err;
resolve({ code: 0, data: result });
db.close();
});
} catch (error) {
reject({ code: 1, error })
}
});
} else {
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
try {
dbo.collection(set).find(where).skip(num * page).limit(num).toArray(function (err, result) {
if (err) throw err;
resolve({ code: 0, data: result });
db.close();
});
} catch (error) {
reject({ code: 1, error })
}
});
}
})
}
let update = async (set, where = {}, data, defin = true, url = dburl) => {
return new Promise((resolve, reject) => {
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
if (defin) {
data = { $set: data }
}
try {
dbo.collection(set).updateOne(where, data, function (err, res) {
if (err) throw err;
resolve({ code: 0 });
db.close();
});
} catch (error) {
reject({ code: 1, error })
}
});
})
}
let updates = async (set, where = {}, data, url = dburl) => {
return new Promise((resolve, reject) => {
MongoClient.connect(url.url, { useUnifiedTopology: true, useNewUrlParser: true }, function (err, db) {
if (err) throw err;
var dbo = db.db(url.dbname);
data = { $set: data }
try {
dbo.collection(set).updateMany(where, data, function (err, res) {
if (err) throw err;
db.close();
resolve({ code: 0, num: res.result.nModified });
});
} catch (error) {
reject({ code: 1, error })
}
});
})
}
module.exports = function (url, dbname) {
dburl = { url, dbname };
return {
add,
adds,
remove,
find,
update,
updates,
removes
}
}

47
bin/router.js Normal file
View File

@ -0,0 +1,47 @@
const fs = require("fs")
const os = require('os');
function addMapping(router, mapping) {
for (var url in mapping) {
if (url.startsWith('GET ')) {
var path = url.substring(4);
router.get(path, mapping[url]);
// console.log(`register URL mapping: GET ${path}`);
} else if (url.startsWith('POST ')) {
var path = url.substring(5);
router.post(path, mapping[url]);
// console.log(`register URL mapping: POST ${path}`);
} else {
console.log(`invalid URL: ${url}`);
}
}
}
function addControllers(router, controllers_dir) {
let ostype = os.type() == "Windows_NT"
let dir;
if (ostype) {
dir = __dirname.replace("\\bin", "")
} else {
dir = __dirname.replace("/bin", "")
}
var files = fs.readdirSync(dir + "/" + controllers_dir);
var js_files = files.filter((f) => {
return f.endsWith('.js');
});
for (var f of js_files) {
// console.log(`process controller: ${f}...`);
let mapping = require(dir + `/${controllers_dir}/` + f);
addMapping(router, mapping);
}
}
module.exports = function (dir) {
let
controllers_dir = dir || 'controllers', // 如果不传参数,扫描目录默认为'controllers'
router = require('koa-router')();
addControllers(router, controllers_dir);
return router.routes();
// return 1;
};

46
controllers/index.js Normal file
View File

@ -0,0 +1,46 @@
// 获取标签
var getlist = async (ctx, next) => {
await dbs.find('list').then((res) => {
ctx.body = JSON.stringify(res)
})
next()
}
var addlist = async (ctx,next) =>{
if(ctx.request.body.name == undefined || ctx.request.body.age == undefined){
ctx.body = JSON.stringify({
code:1,
msg:"姓名或年龄不能为空"
})
}else{
await dbs.add('list',{
name:ctx.request.body.name,
age:ctx.request.body.age
}).then((res)=>{
ctx.body = JSON.stringify(res)
})
}
next()
}
var getaddlist = async (ctx,next) =>{
if(ctx.query.name == undefined || ctx.query.age == undefined){
ctx.body = JSON.stringify({
code:1,
msg:"姓名或年龄不能为空"
})
}else{
await dbs.add('list',{
name:ctx.query.name,
age:ctx.query.age
}).then((res)=>{
ctx.body = JSON.stringify(res)
})
}
next()
}
module.exports = {
'GET /getlist':getlist,
'POST /addlist':addlist,
'GET /getaddlist':getaddlist
}

18
package.json Normal file
View File

@ -0,0 +1,18 @@
{
"name": "wecat-serve-demo",
"version": "1.0.0",
"main": "index.js",
"repository": "http://git.luyuan.tk/pplokijuhyg/wecat-serve-demo.git",
"author": "pplokijuhyg <1162963624@qq.com>",
"license": "MIT",
"scripts": {
"start": "node app.js"
},
"dependencies": {
"fs": "^0.0.1-security",
"koa": "^2.11.0",
"koa-bodyparser": "^4.2.1",
"koa-router": "^7.4.0",
"mongodb": "^3.3.5"
}
}

453
yarn.lock Normal file
View File

@ -0,0 +1,453 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
accepts@^1.3.5:
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"
any-promise@^1.1.0:
version "1.3.0"
resolved "https://registry.npm.taobao.org/any-promise/download/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
integrity sha1-q8av7tzqUugJzcA3au0845Y10X8=
bson@^1.1.1:
version "1.1.3"
resolved "https://registry.npm.taobao.org/bson/download/bson-1.1.3.tgz#aa82cb91f9a453aaa060d6209d0675114a8154d3"
integrity sha1-qoLLkfmkU6qgYNYgnQZ1EUqBVNM=
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=
cache-content-type@^1.0.0:
version "1.0.1"
resolved "https://registry.npm.taobao.org/cache-content-type/download/cache-content-type-1.0.1.tgz#035cde2b08ee2129f4a8315ea8f00a00dba1453c"
integrity sha1-A1zeKwjuISn0qDFeqPAKANuhRTw=
dependencies:
mime-types "^2.1.18"
ylru "^1.2.0"
co-body@^6.0.0:
version "6.0.0"
resolved "https://registry.npm.taobao.org/co-body/download/co-body-6.0.0.tgz#965b9337d7f5655480787471f4237664820827e3"
integrity sha1-lluTN9f1ZVSAeHRx9CN2ZIIIJ+M=
dependencies:
inflation "^2.0.0"
qs "^6.5.2"
raw-body "^2.3.3"
type-is "^1.6.16"
co@^4.6.0:
version "4.6.0"
resolved "https://registry.npm.taobao.org/co/download/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=
content-disposition@~0.5.2:
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=
cookies@~0.8.0:
version "0.8.0"
resolved "https://registry.npm.taobao.org/cookies/download/cookies-0.8.0.tgz#1293ce4b391740a8406e3c9870e828c4b54f3f90"
integrity sha1-EpPOSzkXQKhAbjyYcOgoxLVPP5A=
dependencies:
depd "~2.0.0"
keygrip "~1.1.0"
copy-to@^2.0.1:
version "2.0.1"
resolved "https://registry.npm.taobao.org/copy-to/download/copy-to-2.0.1.tgz#2680fbb8068a48d08656b6098092bdafc906f4a5"
integrity sha1-JoD7uAaKSNCGVrYJgJK9r8kG9KU=
debug@^3.1.0:
version "3.2.6"
resolved "https://registry.npm.taobao.org/debug/download/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
integrity sha1-6D0X3hbYp++3cX7b5fsQE17uYps=
dependencies:
ms "^2.1.1"
debug@~3.1.0:
version "3.1.0"
resolved "https://registry.npm.taobao.org/debug/download/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
integrity sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=
dependencies:
ms "2.0.0"
deep-equal@~1.0.1:
version "1.0.1"
resolved "https://registry.npm.taobao.org/deep-equal/download/deep-equal-1.0.1.tgz?cache=0&sync_timestamp=1575872560040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeep-equal%2Fdownload%2Fdeep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=
delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/delegates/download/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=
depd@^1.1.2, 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=
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=
error-inject@^1.0.0:
version "1.0.0"
resolved "https://registry.npm.taobao.org/error-inject/download/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=
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=
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@^0.0.1-security:
version "0.0.1-security"
resolved "https://registry.npm.taobao.org/fs/download/fs-0.0.1-security.tgz#8a7bd37186b6dddf3813f23858b57ecaaf5e41d4"
integrity sha1-invTcYa23d84E/I4WLV+yq9eQdQ=
http-assert@^1.3.0:
version "1.4.1"
resolved "https://registry.npm.taobao.org/http-assert/download/http-assert-1.4.1.tgz#c5f725d677aa7e873ef736199b89686cceb37878"
integrity sha1-xfcl1neqfoc+9zYZm4lobM6zeHg=
dependencies:
deep-equal "~1.0.1"
http-errors "~1.7.2"
http-errors@1.7.3, http-errors@^1.3.1, http-errors@^1.6.3, http-errors@~1.7.2:
version "1.7.3"
resolved "https://registry.npm.taobao.org/http-errors/download/http-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#2022b4b25fbddc21d2f524974a474aafe733908b"
integrity sha1-ICK0sl+93CHS9SSXSkdKr+czkIs=
dependencies:
safer-buffer ">= 2.1.2 < 3"
inflation@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/inflation/download/inflation-2.0.0.tgz#8b417e47c28f925a45133d914ca1fd389107f30f"
integrity sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8=
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=
is-generator-function@^1.0.7:
version "1.0.7"
resolved "https://registry.npm.taobao.org/is-generator-function/download/is-generator-function-1.0.7.tgz#d2132e529bb0000a7f80794d4bdf5cd5e5813522"
integrity sha1-0hMuUpuwAAp/gHlNS99c1eWBNSI=
isarray@0.0.1:
version "0.0.1"
resolved "https://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=
keygrip@~1.1.0:
version "1.1.0"
resolved "https://registry.npm.taobao.org/keygrip/download/keygrip-1.1.0.tgz#871b1681d5e159c62a445b0c74b615e0917e7226"
integrity sha1-hxsWgdXhWcYqRFsMdLYV4JF+ciY=
dependencies:
tsscmp "1.0.6"
koa-bodyparser@^4.2.1:
version "4.2.1"
resolved "https://registry.npm.taobao.org/koa-bodyparser/download/koa-bodyparser-4.2.1.tgz#4d7dacb5e6db1106649b595d9e5ccb158b6f3b29"
integrity sha1-TX2stebbEQZkm1ldnlzLFYtvOyk=
dependencies:
co-body "^6.0.0"
copy-to "^2.0.1"
koa-compose@^3.0.0:
version "3.2.1"
resolved "https://registry.npm.taobao.org/koa-compose/download/koa-compose-3.2.1.tgz#a85ccb40b7d986d8e5a345b3a1ace8eabcf54de7"
integrity sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec=
dependencies:
any-promise "^1.1.0"
koa-compose@^4.1.0:
version "4.1.0"
resolved "https://registry.npm.taobao.org/koa-compose/download/koa-compose-4.1.0.tgz#507306b9371901db41121c812e923d0d67d3e877"
integrity sha1-UHMGuTcZAdtBEhyBLpI9DWfT6Hc=
koa-convert@^1.2.0:
version "1.2.0"
resolved "https://registry.npm.taobao.org/koa-convert/download/koa-convert-1.2.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fkoa-convert%2Fdownload%2Fkoa-convert-1.2.0.tgz#da40875df49de0539098d1700b50820cebcd21d0"
integrity sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA=
dependencies:
co "^4.6.0"
koa-compose "^3.0.0"
koa-router@^7.4.0:
version "7.4.0"
resolved "https://registry.npm.taobao.org/koa-router/download/koa-router-7.4.0.tgz#aee1f7adc02d5cb31d7d67465c9eacc825e8c5e0"
integrity sha1-ruH3rcAtXLMdfWdGXJ6syCXoxeA=
dependencies:
debug "^3.1.0"
http-errors "^1.3.1"
koa-compose "^3.0.0"
methods "^1.0.1"
path-to-regexp "^1.1.1"
urijs "^1.19.0"
koa@^2.11.0:
version "2.11.0"
resolved "https://registry.npm.taobao.org/koa/download/koa-2.11.0.tgz?cache=0&sync_timestamp=1572232118391&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fkoa%2Fdownload%2Fkoa-2.11.0.tgz#fe5a51c46f566d27632dd5dc8fd5d7dd44f935a4"
integrity sha1-/lpRxG9WbSdjLdXcj9XX3UT5NaQ=
dependencies:
accepts "^1.3.5"
cache-content-type "^1.0.0"
content-disposition "~0.5.2"
content-type "^1.0.4"
cookies "~0.8.0"
debug "~3.1.0"
delegates "^1.0.0"
depd "^1.1.2"
destroy "^1.0.4"
encodeurl "^1.0.2"
error-inject "^1.0.0"
escape-html "^1.0.3"
fresh "~0.5.2"
http-assert "^1.3.0"
http-errors "^1.6.3"
is-generator-function "^1.0.7"
koa-compose "^4.1.0"
koa-convert "^1.2.0"
on-finished "^2.3.0"
only "~0.0.2"
parseurl "^1.3.2"
statuses "^1.5.0"
type-is "^1.6.16"
vary "^1.1.2"
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=
methods@^1.0.1:
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.42.0:
version "1.42.0"
resolved "https://registry.npm.taobao.org/mime-db/download/mime-db-1.42.0.tgz#3e252907b4c7adb906597b4b65636272cf9e7bac"
integrity sha1-PiUpB7THrbkGWXtLZWNics+ee6w=
mime-types@^2.1.18, mime-types@~2.1.24:
version "2.1.25"
resolved "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.25.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmime-types%2Fdownload%2Fmime-types-2.1.25.tgz#39772d46621f93e2a80a856c53b86a62156a6437"
integrity sha1-OXctRmIfk+KoCoVsU7hqYhVqZDc=
dependencies:
mime-db "1.42.0"
mongodb@^3.3.5:
version "3.3.5"
resolved "https://registry.npm.taobao.org/mongodb/download/mongodb-3.3.5.tgz#38d531013afede92b0dd282e3b9f3c08c9bdff3b"
integrity sha1-ONUxATr+3pKw3SguO588CMm9/zs=
dependencies:
bson "^1.1.1"
require_optional "^1.0.1"
safe-buffer "^5.1.2"
optionalDependencies:
saslprep "^1.0.0"
ms@2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
ms@^2.1.1:
version "2.1.2"
resolved "https://registry.npm.taobao.org/ms/download/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha1-0J0fNXtEP0kzgqjrPM0YOHKuYAk=
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"
only@~0.0.2:
version "0.0.2"
resolved "https://registry.npm.taobao.org/only/download/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4"
integrity sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=
parseurl@^1.3.2:
version "1.3.3"
resolved "https://registry.npm.taobao.org/parseurl/download/parseurl-1.3.3.tgz?cache=0&sync_timestamp=1573614551652&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparseurl%2Fdownload%2Fparseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha1-naGee+6NEt/wUT7Vt2lXeTvC6NQ=
path-to-regexp@^1.1.1:
version "1.8.0"
resolved "https://registry.npm.taobao.org/path-to-regexp/download/path-to-regexp-1.8.0.tgz?cache=0&sync_timestamp=1574278262588&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fpath-to-regexp%2Fdownload%2Fpath-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a"
integrity sha1-iHs7qdhDk+h6CgufTLdWGYtTVIo=
dependencies:
isarray "0.0.1"
qs@^6.5.2:
version "6.9.1"
resolved "https://registry.npm.taobao.org/qs/download/qs-6.9.1.tgz#20082c65cb78223635ab1a9eaca8875a29bf8ec9"
integrity sha1-IAgsZct4IjY1qxqerKiHWim/jsk=
raw-body@^2.3.3:
version "2.4.1"
resolved "https://registry.npm.taobao.org/raw-body/download/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c"
integrity sha1-MKyC+Yu1rowVLmcUnayNVRU7Fow=
dependencies:
bytes "3.1.0"
http-errors "1.7.3"
iconv-lite "0.4.24"
unpipe "1.0.0"
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:
version "5.1.2"
resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha1-mR7GnSluAxN0fVm9/St0XDX4go0=
safe-buffer@^5.1.2:
version "5.2.0"
resolved "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
integrity sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk=
"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=
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=
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=
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"
"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#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=
tsscmp@1.0.6:
version "1.0.6"
resolved "https://registry.npm.taobao.org/tsscmp/download/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb"
integrity sha1-hbmVg6w1iexL/vgltQAKqRHWBes=
type-is@^1.6.16:
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:
version "1.0.0"
resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
urijs@^1.19.0:
version "1.19.2"
resolved "https://registry.npm.taobao.org/urijs/download/urijs-1.19.2.tgz#f9be09f00c4c5134b7cb3cf475c1dd394526265a"
integrity sha1-+b4J8AxMUTS3yzz0dcHdOUUmJlo=
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=
ylru@^1.2.0:
version "1.2.1"
resolved "https://registry.npm.taobao.org/ylru/download/ylru-1.2.1.tgz#f576b63341547989c1de7ba288760923b27fe84f"
integrity sha1-9Xa2M0FUeYnB3nuiiHYJI7J/6E8=