Comparing version 1.0.1 to 2.0.0
'use strict'; | ||
const { Client } = require('./wrapper'); | ||
const { Client } = require('catbox'); | ||
require('catbox-memory'); | ||
@@ -19,4 +20,4 @@ let count = 0; | ||
app.beforeStart(function* () { | ||
yield client.start(); | ||
app.beforeStart(async function startCatbox() { | ||
await client.start(); | ||
const index = count++; | ||
@@ -27,4 +28,4 @@ const ready = client.isReady(); | ||
}); | ||
app.beforeClose(function* () { | ||
yield client.stop(); | ||
app.beforeClose(() => { | ||
client.stop(); | ||
}); | ||
@@ -31,0 +32,0 @@ |
{ | ||
"name": "egg-catbox", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Catbox plugin for eggjs", | ||
@@ -16,18 +16,18 @@ "eggPlugin": { | ||
"dependencies": { | ||
"catbox": "^7.1.3", | ||
"catbox-memory": "^2.0.4" | ||
"catbox": "^10.0.2", | ||
"catbox-memory": "^3.1.1" | ||
}, | ||
"devDependencies": { | ||
"autod": "^2.7.1", | ||
"egg": "^1.0.0", | ||
"egg-bin": "^3.3.0", | ||
"egg-ci": "^1.3.0", | ||
"egg-mock": "^3.0.1", | ||
"eslint": "^3.16.1", | ||
"eslint-config-egg": "^3.2.0", | ||
"autod": "^3.0.1", | ||
"egg": "^2.0.0", | ||
"egg-bin": "^4.3.6", | ||
"egg-ci": "^1.8.0", | ||
"egg-mock": "^3.13.1", | ||
"eslint": "^4.13.0", | ||
"eslint-config-egg": "^5.1.1", | ||
"supertest": "^3.0.0", | ||
"webstorm-disable-index": "^1.1.2" | ||
"webstorm-disable-index": "^1.2.0" | ||
}, | ||
"engines": { | ||
"node": ">=6.0.0" | ||
"node": ">=8.0.0" | ||
}, | ||
@@ -43,3 +43,3 @@ "scripts": { | ||
"ci": { | ||
"version": "6, 7" | ||
"version": "8, 9" | ||
}, | ||
@@ -46,0 +46,0 @@ "repository": { |
@@ -55,22 +55,24 @@ # egg-catbox | ||
// {app_root}/app/service/user.js | ||
const Service = require('egg').Service; | ||
const segment = 'segment'; | ||
module.exports = app => { | ||
class UserService extends app.Service { | ||
* save(user, ttl) { | ||
const id = 'id'; | ||
const key = { id, segment }; | ||
yield app.catbox.set(key, user, ttl); | ||
} | ||
* load(id) { | ||
const key = { id, segment }; | ||
const result = yield app.catbox.get(key); | ||
return result ? result.item : null; | ||
} | ||
* drop(id) { | ||
const key = { id, segment }; | ||
yield app.catbox.drop(key); | ||
} | ||
class UserService extends Service { | ||
async save(user, ttl) { | ||
const id = 'id'; | ||
const key = { id, segment }; | ||
await app.catbox.set(key, user, ttl); | ||
} | ||
return UserService; | ||
async load(id) { | ||
const key = { id, segment }; | ||
const result = await app.catbox.get(key); | ||
return result ? result.item : null; | ||
} | ||
async drop(id) { | ||
const key = { id, segment }; | ||
await app.catbox.drop(key); | ||
} | ||
} | ||
module.exports = UserService; | ||
``` | ||
@@ -77,0 +79,0 @@ |
@@ -35,6 +35,6 @@ # egg-catbox | ||
egg-catbox 版本 | egg 1.x | ||
egg-catbox 版本 | egg 2.x | ||
--- | --- | ||
1.x | 😁 | ||
0.x | ❌ | ||
2.x | 😁 | ||
1.x | ❌ | ||
@@ -55,22 +55,24 @@ ## 开启插件 | ||
// {app_root}/app/service/user.js | ||
const Service = require('egg').Service; | ||
const segment = 'segment'; | ||
module.exports = app => { | ||
class UserService extends app.Service { | ||
* save(user, ttl) { | ||
const id = 'id'; | ||
const key = { id, segment }; | ||
yield app.catbox.set(key, user, ttl); | ||
} | ||
* load(id) { | ||
const key = { id, segment }; | ||
const result = yield app.catbox.get(key); | ||
return result ? result.item : null; | ||
} | ||
* drop(id) { | ||
const key = { id, segment }; | ||
yield app.catbox.drop(key); | ||
} | ||
class UserService extends Service { | ||
async save(user, ttl) { | ||
const id = 'id'; | ||
const key = { id, segment }; | ||
await app.catbox.set(key, user, ttl); | ||
} | ||
return UserService; | ||
async load(id) { | ||
const key = { id, segment }; | ||
const result = await app.catbox.get(key); | ||
return result ? result.item : null; | ||
} | ||
async drop(id) { | ||
const key = { id, segment }; | ||
await app.catbox.drop(key); | ||
} | ||
} | ||
module.exports = UserService; | ||
``` | ||
@@ -77,0 +79,0 @@ |
@@ -20,8 +20,8 @@ 'use strict'; | ||
beforeEach(function* () { | ||
yield app.catbox.set(testKey, testValue, 2000); | ||
beforeEach(async () => { | ||
await app.catbox.set(testKey, testValue, 2000); | ||
}); | ||
afterEach(function* () { | ||
yield app.catbox.drop(testKey); | ||
afterEach(async () => { | ||
await app.catbox.drop(testKey); | ||
}); | ||
@@ -31,8 +31,8 @@ | ||
it('should get successfully', function* () { | ||
const cached = yield app.catbox.get(testKey); | ||
it('should get successfully', async () => { | ||
const cached = await app.catbox.get(testKey); | ||
assert.deepEqual(cached.item, testValue); | ||
}); | ||
it('should set successfully', function* () { | ||
it('should set successfully', async () => { | ||
const id = 'id'; | ||
@@ -42,8 +42,8 @@ const segment = 'segment'; | ||
const value = 'value'; | ||
yield app.catbox.set(key, value, 2000); | ||
const cached = yield app.catbox.get(key); | ||
await app.catbox.set(key, value, 2000); | ||
const cached = await app.catbox.get(key); | ||
assert.deepEqual(cached.item, value); | ||
}); | ||
it('should drop successfully', function* () { | ||
it('should drop successfully', async () => { | ||
const id = 'id'; | ||
@@ -53,7 +53,7 @@ const segment = 'segment'; | ||
const value = 'value'; | ||
yield app.catbox.set(key, value, 2000); | ||
yield app.catbox.drop(key); | ||
const result = yield app.catbox.get(key); | ||
await app.catbox.set(key, value, 2000); | ||
await app.catbox.drop(key); | ||
const result = await app.catbox.get(key); | ||
assert(!result); | ||
}); | ||
}); |
{ | ||
"config": { | ||
"onerror": { | ||
"errorPageUrl": "", | ||
"appErrorFilter": null | ||
}, | ||
"session": { | ||
@@ -13,31 +9,6 @@ "maxAge": 86400000, | ||
}, | ||
"i18n": { | ||
"defaultLocale": "en_US", | ||
"dir": "D:\\projects\\egg-catbox\\test\\fixtures\\apps\\catbox-test\\config\\locales", | ||
"queryField": "locale", | ||
"cookieField": "locale", | ||
"cookieMaxAge": "1y" | ||
}, | ||
"watcher": { | ||
"type": "development", | ||
"eventSources": { | ||
"default": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\default", | ||
"development": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\development" | ||
} | ||
}, | ||
"multipart": { | ||
"autoFields": false, | ||
"defaultCharset": "utf8", | ||
"fieldNameSize": 100, | ||
"fieldSize": "100kb", | ||
"fields": 10, | ||
"fileSize": "10mb", | ||
"files": 10, | ||
"fileExtensions": [], | ||
"whitelist": null | ||
}, | ||
"security": { | ||
"domainWhiteList": [], | ||
"protocolWhiteList": [], | ||
"defaultMiddleware": "csrf,hsts,methodnoallow,noopen,nosniff,csp,xssProtection,xframe", | ||
"defaultMiddleware": "csrf,hsts,methodnoallow,noopen,nosniff,csp,xssProtection,xframe,dta", | ||
"csrf": { | ||
@@ -62,2 +33,5 @@ "enable": true, | ||
}, | ||
"dta": { | ||
"enable": true | ||
}, | ||
"methodnoallow": { | ||
@@ -84,4 +58,42 @@ "enable": true | ||
}, | ||
"jsonp": { | ||
"limit": 50, | ||
"callback": [ | ||
"_callback", | ||
"callback" | ||
], | ||
"csrf": false | ||
}, | ||
"onerror": { | ||
"errorPageUrl": "", | ||
"appErrorFilter": null | ||
}, | ||
"i18n": { | ||
"defaultLocale": "en_US", | ||
"dirs": [], | ||
"queryField": "locale", | ||
"cookieField": "locale", | ||
"cookieMaxAge": "1y" | ||
}, | ||
"watcher": { | ||
"type": "development", | ||
"eventSources": { | ||
"default": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\default", | ||
"development": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\development" | ||
} | ||
}, | ||
"multipart": { | ||
"autoFields": false, | ||
"defaultCharset": "utf8", | ||
"fieldNameSize": 100, | ||
"fieldSize": "100kb", | ||
"fields": 10, | ||
"fileSize": "10mb", | ||
"files": 10, | ||
"fileExtensions": [], | ||
"whitelist": null | ||
}, | ||
"logrotator": { | ||
"filesRotateByHour": null, | ||
"hourDelimiter": "-", | ||
"filesRotateBySize": null, | ||
@@ -98,9 +110,5 @@ "maxFileSize": 52428800, | ||
"preload": false, | ||
"buffer": false | ||
"buffer": false, | ||
"maxFiles": 1000 | ||
}, | ||
"jsonp": { | ||
"limit": 50, | ||
"callback": "_callback", | ||
"csrf": false | ||
}, | ||
"view": { | ||
@@ -168,2 +176,3 @@ "root": "D:\\projects\\egg-catbox\\test\\fixtures\\apps\\catbox-test\\app\\view", | ||
"consoleLevel": "WARN", | ||
"disableConsoleAfterReady": false, | ||
"outputJSON": false, | ||
@@ -176,11 +185,24 @@ "buffer": false, | ||
"coreLogger": {}, | ||
"allowDebugAtProd": true, | ||
"type": "agent" | ||
}, | ||
"httpclient": { | ||
"keepAlive": true, | ||
"freeSocketKeepAliveTimeout": 4000, | ||
"timeout": 30000, | ||
"maxSockets": null, | ||
"maxFreeSockets": 256, | ||
"enableDNSCache": false | ||
"enableDNSCache": false, | ||
"dnsCacheMaxLength": 1000, | ||
"dnsCacheMaxAge": 10000, | ||
"request": { | ||
"timeout": 5000 | ||
}, | ||
"httpAgent": { | ||
"keepAlive": true, | ||
"freeSocketKeepAliveTimeout": 4000, | ||
"maxSockets": 9007199254740991, | ||
"maxFreeSockets": 256 | ||
}, | ||
"httpsAgent": { | ||
"keepAlive": true, | ||
"freeSocketKeepAliveTimeout": 4000, | ||
"maxSockets": 9007199254740991, | ||
"maxFreeSockets": 256 | ||
} | ||
}, | ||
@@ -191,5 +213,16 @@ "coreMiddleware": [ | ||
"notfound", | ||
"bodyParser" | ||
"bodyParser", | ||
"overrideMethod" | ||
], | ||
"workerStartTimeout": 600000, | ||
"cluster": { | ||
"listen": { | ||
"path": "", | ||
"port": 7001, | ||
"hostname": "" | ||
} | ||
}, | ||
"clusterClient": { | ||
"responseTimeout": 60000 | ||
}, | ||
"coreMiddlewares": [ | ||
@@ -199,3 +232,4 @@ "meta", | ||
"notfound", | ||
"bodyParser" | ||
"bodyParser", | ||
"overrideMethod" | ||
], | ||
@@ -206,6 +240,6 @@ "appMiddlewares": [], | ||
"plugins": { | ||
"onerror": { | ||
"session": { | ||
"enable": true, | ||
"package": "egg-onerror", | ||
"name": "onerror", | ||
"package": "egg-session", | ||
"name": "session", | ||
"dependencies": [], | ||
@@ -215,16 +249,44 @@ "optionalDependencies": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-onerror", | ||
"version": "1.3.0" | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-session", | ||
"version": "3.0.0" | ||
}, | ||
"session": { | ||
"security": { | ||
"enable": true, | ||
"package": "egg-session", | ||
"name": "session", | ||
"package": "egg-security", | ||
"name": "security", | ||
"dependencies": [], | ||
"optionalDependencies": [], | ||
"optionalDependencies": [ | ||
"session" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-session", | ||
"version": "2.1.0" | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-security", | ||
"version": "2.0.0" | ||
}, | ||
"jsonp": { | ||
"enable": true, | ||
"package": "egg-jsonp", | ||
"name": "jsonp", | ||
"dependencies": [], | ||
"optionalDependencies": [ | ||
"security" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-jsonp", | ||
"version": "2.0.0" | ||
}, | ||
"onerror": { | ||
"enable": true, | ||
"package": "egg-onerror", | ||
"name": "onerror", | ||
"dependencies": [], | ||
"optionalDependencies": [ | ||
"jsonp" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-onerror", | ||
"version": "2.0.0" | ||
}, | ||
"i18n": { | ||
@@ -239,3 +301,3 @@ "enable": true, | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-i18n", | ||
"version": "1.1.0" | ||
"version": "2.0.0" | ||
}, | ||
@@ -251,3 +313,3 @@ "watcher": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher", | ||
"version": "2.1.1" | ||
"version": "3.0.0" | ||
}, | ||
@@ -263,17 +325,4 @@ "multipart": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-multipart", | ||
"version": "1.2.0" | ||
"version": "2.0.0" | ||
}, | ||
"security": { | ||
"enable": true, | ||
"package": "egg-security", | ||
"name": "security", | ||
"dependencies": [ | ||
"session" | ||
], | ||
"optionalDependencies": [], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-security", | ||
"version": "1.9.0" | ||
}, | ||
"schedule": { | ||
@@ -288,3 +337,3 @@ "enable": true, | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-schedule", | ||
"version": "2.3.0" | ||
"version": "3.1.1" | ||
}, | ||
@@ -302,3 +351,3 @@ "logrotator": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-logrotator", | ||
"version": "2.2.2" | ||
"version": "3.0.0" | ||
}, | ||
@@ -314,17 +363,4 @@ "static": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-static", | ||
"version": "1.3.0" | ||
"version": "2.0.0" | ||
}, | ||
"jsonp": { | ||
"enable": true, | ||
"package": "egg-jsonp", | ||
"name": "jsonp", | ||
"dependencies": [], | ||
"optionalDependencies": [ | ||
"security" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-jsonp", | ||
"version": "1.0.0" | ||
}, | ||
"view": { | ||
@@ -339,3 +375,3 @@ "enable": true, | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-view", | ||
"version": "1.1.0" | ||
"version": "2.0.0" | ||
}, | ||
@@ -349,3 +385,3 @@ "egg-mock": { | ||
"env": [], | ||
"version": "3.1.2" | ||
"version": "3.13.1" | ||
}, | ||
@@ -359,5 +395,5 @@ "catbox": { | ||
"env": [], | ||
"version": "1.0.0" | ||
"version": "2.0.0" | ||
} | ||
} | ||
} |
{ | ||
"config": { | ||
"onerror": { | ||
"errorPageUrl": "", | ||
"appErrorFilter": null | ||
}, | ||
"session": { | ||
@@ -15,52 +11,9 @@ "maxAge": 86400000, | ||
"encode": "<Function encode>", | ||
"decode": "<Function decode>" | ||
"decode": "<Function decode>", | ||
"genid": "<Function anonymous>" | ||
}, | ||
"i18n": { | ||
"defaultLocale": "en_US", | ||
"dir": "D:\\projects\\egg-catbox\\test\\fixtures\\apps\\catbox-test\\config\\locales", | ||
"queryField": "locale", | ||
"cookieField": "locale", | ||
"cookieMaxAge": "1y", | ||
"functionName": "__", | ||
"dirs": [ | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-onerror\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-session\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-i18n\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-multipart\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-security\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-schedule\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-logrotator\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-static\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-jsonp\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-view\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-mock\\config\\locales", | ||
"D:\\projects\\egg-catbox\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-mock\\lib\\tmp\\config\\locales", | ||
"D:\\projects\\egg-catbox\\test\\fixtures\\apps\\catbox-test\\config\\locales" | ||
] | ||
}, | ||
"watcher": { | ||
"type": "development", | ||
"eventSources": { | ||
"default": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\default", | ||
"development": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\development" | ||
} | ||
}, | ||
"multipart": { | ||
"autoFields": false, | ||
"defaultCharset": "utf8", | ||
"fieldNameSize": 100, | ||
"fieldSize": 102400, | ||
"fields": 10, | ||
"fileSize": 10485760, | ||
"files": 10, | ||
"fileExtensions": [], | ||
"whitelist": null | ||
}, | ||
"security": { | ||
"domainWhiteList": [], | ||
"protocolWhiteList": [], | ||
"defaultMiddleware": "csrf,hsts,methodnoallow,noopen,nosniff,csp,xssProtection,xframe", | ||
"defaultMiddleware": "csrf,hsts,methodnoallow,noopen,nosniff,csp,xssProtection,xframe,dta", | ||
"csrf": { | ||
@@ -87,2 +40,6 @@ "enable": true, | ||
}, | ||
"dta": { | ||
"enable": true, | ||
"matching": "<Function anonymous>" | ||
}, | ||
"methodnoallow": { | ||
@@ -113,4 +70,60 @@ "enable": true, | ||
}, | ||
"jsonp": { | ||
"limit": 50, | ||
"callback": [ | ||
"_callback", | ||
"callback" | ||
], | ||
"csrf": false | ||
}, | ||
"onerror": { | ||
"errorPageUrl": "", | ||
"appErrorFilter": null | ||
}, | ||
"i18n": { | ||
"defaultLocale": "en_US", | ||
"dirs": [ | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-session\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-security\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-jsonp\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-onerror\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-i18n\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-multipart\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-schedule\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-logrotator\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-static\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-view\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-mock\\config\\locales", | ||
"D:\\projects\\egg-catbox\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg\\config\\locales", | ||
"D:\\projects\\egg-catbox\\node_modules\\egg-mock\\lib\\tmp\\config\\locales", | ||
"D:\\projects\\egg-catbox\\test\\fixtures\\apps\\catbox-test\\config\\locales" | ||
], | ||
"queryField": "locale", | ||
"cookieField": "locale", | ||
"cookieMaxAge": "1y", | ||
"functionName": "__" | ||
}, | ||
"watcher": { | ||
"type": "development", | ||
"eventSources": { | ||
"default": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\default", | ||
"development": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher\\lib\\event-sources\\development" | ||
} | ||
}, | ||
"multipart": { | ||
"autoFields": false, | ||
"defaultCharset": "utf8", | ||
"fieldNameSize": 100, | ||
"fieldSize": 102400, | ||
"fields": 10, | ||
"fileSize": 10485760, | ||
"files": 10, | ||
"fileExtensions": [], | ||
"whitelist": null | ||
}, | ||
"logrotator": { | ||
"filesRotateByHour": null, | ||
"hourDelimiter": "-", | ||
"filesRotateBySize": null, | ||
@@ -127,9 +140,6 @@ "maxFileSize": 52428800, | ||
"preload": false, | ||
"buffer": false | ||
"buffer": false, | ||
"maxFiles": 1000, | ||
"files": "<LRU>" | ||
}, | ||
"jsonp": { | ||
"limit": 50, | ||
"callback": "_callback", | ||
"csrf": false | ||
}, | ||
"view": { | ||
@@ -198,2 +208,3 @@ "root": "D:\\projects\\egg-catbox\\test\\fixtures\\apps\\catbox-test\\app\\view", | ||
"consoleLevel": "WARN", | ||
"disableConsoleAfterReady": false, | ||
"outputJSON": false, | ||
@@ -206,11 +217,24 @@ "buffer": false, | ||
"coreLogger": {}, | ||
"allowDebugAtProd": true, | ||
"type": "application" | ||
}, | ||
"httpclient": { | ||
"keepAlive": true, | ||
"freeSocketKeepAliveTimeout": 4000, | ||
"timeout": 30000, | ||
"maxSockets": null, | ||
"maxFreeSockets": 256, | ||
"enableDNSCache": false | ||
"enableDNSCache": false, | ||
"dnsCacheMaxLength": 1000, | ||
"dnsCacheMaxAge": 10000, | ||
"request": { | ||
"timeout": 5000 | ||
}, | ||
"httpAgent": { | ||
"keepAlive": true, | ||
"freeSocketKeepAliveTimeout": 4000, | ||
"maxSockets": 9007199254740991, | ||
"maxFreeSockets": 256 | ||
}, | ||
"httpsAgent": { | ||
"keepAlive": true, | ||
"freeSocketKeepAliveTimeout": 4000, | ||
"maxSockets": 9007199254740991, | ||
"maxFreeSockets": 256 | ||
} | ||
}, | ||
@@ -223,7 +247,19 @@ "coreMiddleware": [ | ||
"bodyParser", | ||
"overrideMethod", | ||
"session", | ||
"i18n", | ||
"securities" | ||
"clusterAppMock", | ||
"securities", | ||
"i18n" | ||
], | ||
"workerStartTimeout": 600000, | ||
"cluster": { | ||
"listen": { | ||
"path": "", | ||
"port": 7001, | ||
"hostname": "" | ||
} | ||
}, | ||
"clusterClient": { | ||
"responseTimeout": 60000 | ||
}, | ||
"coreMiddlewares": [ | ||
@@ -235,5 +271,7 @@ "meta", | ||
"bodyParser", | ||
"overrideMethod", | ||
"session", | ||
"i18n", | ||
"securities" | ||
"clusterAppMock", | ||
"securities", | ||
"i18n" | ||
], | ||
@@ -256,6 +294,6 @@ "appMiddlewares": [], | ||
"plugins": { | ||
"onerror": { | ||
"session": { | ||
"enable": true, | ||
"package": "egg-onerror", | ||
"name": "onerror", | ||
"package": "egg-session", | ||
"name": "session", | ||
"dependencies": [], | ||
@@ -265,16 +303,44 @@ "optionalDependencies": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-onerror", | ||
"version": "1.3.0" | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-session", | ||
"version": "3.0.0" | ||
}, | ||
"session": { | ||
"security": { | ||
"enable": true, | ||
"package": "egg-session", | ||
"name": "session", | ||
"package": "egg-security", | ||
"name": "security", | ||
"dependencies": [], | ||
"optionalDependencies": [], | ||
"optionalDependencies": [ | ||
"session" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-session", | ||
"version": "2.1.0" | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-security", | ||
"version": "2.0.0" | ||
}, | ||
"jsonp": { | ||
"enable": true, | ||
"package": "egg-jsonp", | ||
"name": "jsonp", | ||
"dependencies": [], | ||
"optionalDependencies": [ | ||
"security" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-jsonp", | ||
"version": "2.0.0" | ||
}, | ||
"onerror": { | ||
"enable": true, | ||
"package": "egg-onerror", | ||
"name": "onerror", | ||
"dependencies": [], | ||
"optionalDependencies": [ | ||
"jsonp" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-onerror", | ||
"version": "2.0.0" | ||
}, | ||
"i18n": { | ||
@@ -289,3 +355,3 @@ "enable": true, | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-i18n", | ||
"version": "1.1.0" | ||
"version": "2.0.0" | ||
}, | ||
@@ -301,3 +367,3 @@ "watcher": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-watcher", | ||
"version": "2.1.1" | ||
"version": "3.0.0" | ||
}, | ||
@@ -313,17 +379,4 @@ "multipart": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-multipart", | ||
"version": "1.2.0" | ||
"version": "2.0.0" | ||
}, | ||
"security": { | ||
"enable": true, | ||
"package": "egg-security", | ||
"name": "security", | ||
"dependencies": [ | ||
"session" | ||
], | ||
"optionalDependencies": [], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-security", | ||
"version": "1.9.0" | ||
}, | ||
"schedule": { | ||
@@ -338,3 +391,3 @@ "enable": true, | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-schedule", | ||
"version": "2.3.0" | ||
"version": "3.1.1" | ||
}, | ||
@@ -352,3 +405,3 @@ "logrotator": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-logrotator", | ||
"version": "2.2.2" | ||
"version": "3.0.0" | ||
}, | ||
@@ -364,17 +417,4 @@ "static": { | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-static", | ||
"version": "1.3.0" | ||
"version": "2.0.0" | ||
}, | ||
"jsonp": { | ||
"enable": true, | ||
"package": "egg-jsonp", | ||
"name": "jsonp", | ||
"dependencies": [], | ||
"optionalDependencies": [ | ||
"security" | ||
], | ||
"env": [], | ||
"from": "D:\\projects\\egg-catbox\\node_modules\\egg\\config\\plugin.js", | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-jsonp", | ||
"version": "1.0.0" | ||
}, | ||
"view": { | ||
@@ -389,3 +429,3 @@ "enable": true, | ||
"path": "D:\\projects\\egg-catbox\\node_modules\\egg-view", | ||
"version": "1.1.0" | ||
"version": "2.0.0" | ||
}, | ||
@@ -399,3 +439,3 @@ "egg-mock": { | ||
"env": [], | ||
"version": "3.1.2" | ||
"version": "3.13.1" | ||
}, | ||
@@ -409,5 +449,5 @@ "catbox": { | ||
"env": [], | ||
"version": "1.0.0" | ||
"version": "2.0.0" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
63446
1372
86
+ Addedbig-time@2.0.1(transitive)
+ Addedboom@7.3.0(transitive)
+ Addedcatbox@10.0.6(transitive)
+ Addedcatbox-memory@3.1.4(transitive)
+ Addedhoek@6.1.3(transitive)
+ Addedisemail@3.2.0(transitive)
+ Addedjoi@14.3.1(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedtopo@3.0.3(transitive)
- Removed@hapi/address@1.0.1(transitive)
- Removedboom@5.3.3(transitive)
- Removedcatbox@7.2.1(transitive)
- Removedcatbox-memory@2.1.1(transitive)
- Removedhoek@4.3.1(transitive)
- Removedjoi@12.1.1(transitive)
- Removedtopo@2.1.1(transitive)
Updatedcatbox@^10.0.2
Updatedcatbox-memory@^3.1.1