egg-core
Advanced tools
Comparing version 4.17.2 to 4.17.3
4.17.3 / 2019-07-07 | ||
================== | ||
**fixes** | ||
* [[`77e11f5`](http://github.com/eggjs/egg-core/commit/77e11f5fb38b3646fb20deb78bbc239b06bf8349)] - fix: fix ready callback id (#214) (killa <<killa123@126.com>>) | ||
**others** | ||
* [[`5bb4fe4`](http://github.com/eggjs/egg-core/commit/5bb4fe4ac7e13a44744e580fc797fc6c29191159)] - deps: upgrade dependencies (#215) (Haoliang Gao <<sakura9515@gmail.com>>) | ||
4.17.2 / 2019-05-14 | ||
@@ -3,0 +12,0 @@ ================== |
@@ -24,3 +24,3 @@ 'use strict'; | ||
/** | ||
* @constructor | ||
* @class | ||
* @param {Object} options - options | ||
@@ -225,3 +225,3 @@ * @param {String} [options.baseDir=process.cwd()] - the directory of application | ||
* @since 1.0.0 | ||
* @param {boolean|Error|Function} flagOrFunction - | ||
* @param {boolean|Error|Function} [flagOrFunction] - | ||
* @return {Promise|null} return promise when argument is undefined | ||
@@ -228,0 +228,0 @@ * @example |
@@ -108,3 +108,7 @@ 'use strict'; | ||
registerBeforeStart(scope) { | ||
this[REGISTER_READY_CALLBACK](scope, this.loadReady, 'Before Start'); | ||
this[REGISTER_READY_CALLBACK]({ | ||
scope, | ||
ready: this.loadReady, | ||
timingKeyPrefix: 'Before Start', | ||
}); | ||
} | ||
@@ -155,3 +159,8 @@ | ||
if (didLoad) { | ||
this[REGISTER_READY_CALLBACK](didLoad, this.loadReady, 'Did Load'); | ||
this[REGISTER_READY_CALLBACK]({ | ||
scope: didLoad, | ||
ready: this.loadReady, | ||
timingKeyPrefix: 'Did Load', | ||
scopeFullName: boot.fullPath + ':didLoad', | ||
}); | ||
} | ||
@@ -167,3 +176,8 @@ } | ||
if (willReady) { | ||
this[REGISTER_READY_CALLBACK](willReady, this.bootReady, 'Will Ready'); | ||
this[REGISTER_READY_CALLBACK]({ | ||
scope: willReady, | ||
ready: this.bootReady, | ||
timingKeyPrefix: 'Will Ready', | ||
scopeFullName: boot.fullPath + ':willReady', | ||
}); | ||
} | ||
@@ -236,3 +250,3 @@ } | ||
[REGISTER_READY_CALLBACK](scope, ready, timingKeyPrefix) { | ||
[REGISTER_READY_CALLBACK]({ scope, ready, timingKeyPrefix, scopeFullName }) { | ||
if (!is.function(scope)) { | ||
@@ -242,4 +256,4 @@ throw new Error('boot only support function'); | ||
// get filename from stack | ||
const name = utils.getCalleeFromStack(true, 4); | ||
// get filename from stack if scopeFullName is undefined | ||
const name = scopeFullName || utils.getCalleeFromStack(true, 4); | ||
const timingkey = `${timingKeyPrefix} in ` + utils.getResolvedFilename(name, this.app.baseDir); | ||
@@ -246,0 +260,0 @@ |
@@ -44,3 +44,3 @@ 'use strict'; | ||
/** | ||
* @constructor | ||
* @class | ||
* @param {Object} options - options same as {@link FileLoader} | ||
@@ -47,0 +47,0 @@ * @param {String} options.fieldClass - determine the field name of inject object. |
@@ -21,3 +21,3 @@ 'use strict'; | ||
/** | ||
* @constructor | ||
* @class | ||
* @param {Object} options - options | ||
@@ -24,0 +24,0 @@ * @param {String} options.baseDir - the directory of application |
@@ -35,3 +35,3 @@ 'use strict'; | ||
/** | ||
* @constructor | ||
* @class | ||
* @param {Object} options - options | ||
@@ -38,0 +38,0 @@ * @param {String|Array} options.directory - directories to be loaded |
@@ -18,3 +18,3 @@ 'use strict'; | ||
* | ||
* @method EggLoader#loadConfig | ||
* @function EggLoader#loadConfig | ||
* @since 1.0.0 | ||
@@ -21,0 +21,0 @@ */ |
@@ -62,2 +62,3 @@ 'use strict'; | ||
if (is.class(bootHook)) { | ||
bootHook.prototype.fullPath = bootFilePath; | ||
// if is boot class, add to lifecycle | ||
@@ -64,0 +65,0 @@ this.lifecycle.addBootHook(bootHook); |
@@ -18,3 +18,3 @@ 'use strict'; | ||
* mixin Agent.prototype | ||
* @method EggLoader#loadAgentExtend | ||
* @function EggLoader#loadAgentExtend | ||
* @since 1.0.0 | ||
@@ -28,3 +28,3 @@ */ | ||
* mixin Application.prototype | ||
* @method EggLoader#loadApplicationExtend | ||
* @function EggLoader#loadApplicationExtend | ||
* @since 1.0.0 | ||
@@ -38,3 +38,3 @@ */ | ||
* mixin Request.prototype | ||
* @method EggLoader#loadRequestExtend | ||
* @function EggLoader#loadRequestExtend | ||
* @since 1.0.0 | ||
@@ -48,3 +48,3 @@ */ | ||
* mixin Response.prototype | ||
* @method EggLoader#loadResponseExtend | ||
* @function EggLoader#loadResponseExtend | ||
* @since 1.0.0 | ||
@@ -58,3 +58,3 @@ */ | ||
* mixin Context.prototype | ||
* @method EggLoader#loadContextExtend | ||
* @function EggLoader#loadContextExtend | ||
* @since 1.0.0 | ||
@@ -68,3 +68,3 @@ */ | ||
* mixin app.Helper.prototype | ||
* @method EggLoader#loadHelperExtend | ||
* @function EggLoader#loadHelperExtend | ||
* @since 1.0.0 | ||
@@ -92,3 +92,3 @@ */ | ||
* Loader app/extend/xx.js to `prototype`, | ||
* @method loadExtend | ||
* @function loadExtend | ||
* @param {String} name - filename which may be `app/extend/{name}.js` | ||
@@ -95,0 +95,0 @@ * @param {Object} proto - prototype that mixed |
@@ -19,3 +19,3 @@ 'use strict'; | ||
* | ||
* @method EggLoader#loadMiddleware | ||
* @function EggLoader#loadMiddleware | ||
* @param {Object} opt - LoaderOptions | ||
@@ -22,0 +22,0 @@ * @example |
@@ -55,3 +55,3 @@ 'use strict'; | ||
* `loader.allPlugins` can be used when retrieve all plugins. | ||
* @method EggLoader#loadPlugin | ||
* @function EggLoader#loadPlugin | ||
* @since 1.0.0 | ||
@@ -58,0 +58,0 @@ */ |
@@ -10,3 +10,3 @@ 'use strict'; | ||
* Load app/router.js | ||
* @method EggLoader#loadRouter | ||
* @function EggLoader#loadRouter | ||
* @param {Object} opt - LoaderOptions | ||
@@ -13,0 +13,0 @@ * @since 1.0.0 |
@@ -10,3 +10,3 @@ 'use strict'; | ||
* Load app/service | ||
* @method EggLoader#loadService | ||
* @function EggLoader#loadService | ||
* @param {Object} opt - LoaderOptions | ||
@@ -13,0 +13,0 @@ * @since 1.0.0 |
@@ -11,3 +11,3 @@ 'use strict'; | ||
/** | ||
* @constructor | ||
* @class | ||
* @param {Context} ctx - context instance | ||
@@ -14,0 +14,0 @@ * @since 1.0.0 |
{ | ||
"name": "egg-core", | ||
"version": "4.17.2", | ||
"version": "4.17.3", | ||
"description": "A core Pluggable framework based on koa", | ||
@@ -36,6 +36,6 @@ "main": "index.js", | ||
"os": { | ||
"travis": "linux, osx, windows" | ||
"travis": "linux, osx" | ||
}, | ||
"version": "8, 10, 12", | ||
"afterScript": "after_success:\n - npminstall codecov && codecov --disable=gcov -f .nyc_output/*.json", | ||
"afterScript": "after_success:\n - npminstall codecov && codecov --disable=gcov", | ||
"license": { | ||
@@ -46,18 +46,18 @@ "year": 2016 | ||
"devDependencies": { | ||
"autod": "^3.0.1", | ||
"autod": "^3.1.0", | ||
"await-event": "^2.1.0", | ||
"coffee": "^5.2.1", | ||
"egg-bin": "^4.8.1", | ||
"egg-ci": "^1.8.0", | ||
"egg-bin": "^4.13.0", | ||
"egg-ci": "^1.12.0", | ||
"egg-utils": "^2.4.1", | ||
"eslint": "^4.19.1", | ||
"eslint-config-egg": "^7.0.0", | ||
"jest": "^23.6.0", | ||
"js-yaml": "^3.11.0", | ||
"mm": "^2.4.0", | ||
"eslint": "^5.16.0", | ||
"eslint-config-egg": "^7.4.1", | ||
"jest": "^24.8.0", | ||
"js-yaml": "^3.13.1", | ||
"mm": "^2.5.0", | ||
"mz-modules": "^2.1.0", | ||
"pedding": "^1.1.0", | ||
"rimraf": "^2.6.2", | ||
"rimraf": "^2.6.3", | ||
"spy": "^1.0.0", | ||
"supertest": "^3.0.0", | ||
"supertest": "^4.0.2", | ||
"ts-node": "^8.0.3", | ||
@@ -71,16 +71,15 @@ "typescript": "^3.3.3333" | ||
"co": "^4.6.0", | ||
"debug": "^3.1.0", | ||
"depd": "^1.1.2", | ||
"egg-logger": "^1.7.1", | ||
"debug": "^4.1.1", | ||
"depd": "^2.0.0", | ||
"egg-logger": "^2.4.1", | ||
"egg-path-matching": "^1.0.1", | ||
"extend2": "^1.0.0", | ||
"get-ready": "^2.0.1", | ||
"globby": "^8.0.1", | ||
"inflection": "^1.12.0", | ||
"is-type-of": "^1.2.0", | ||
"koa": "^2.5.2", | ||
"globby": "^8.0.2", | ||
"is-type-of": "^1.2.1", | ||
"koa": "^2.7.0", | ||
"koa-convert": "^1.2.0", | ||
"node-homedir": "^1.1.1", | ||
"ready-callback": "^2.1.0", | ||
"utility": "^1.14.0" | ||
"utility": "^1.16.1" | ||
}, | ||
@@ -87,0 +86,0 @@ "files": [ |
123978
17
2928
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcircular-json-for-egg@1.0.0(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedegg-errors@2.3.2(transitive)
+ Addedegg-logger@2.9.1(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
- Removedinflection@^1.12.0
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedcircular-json@0.5.9(transitive)
- Removedegg-logger@1.8.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
Updateddebug@^4.1.1
Updateddepd@^2.0.0
Updatedegg-logger@^2.4.1
Updatedglobby@^8.0.2
Updatedis-type-of@^1.2.1
Updatedkoa@^2.7.0
Updatedutility@^1.16.1