Comparing version 2.5.0 to 2.5.1
@@ -6,5 +6,7 @@ /// <reference types="node" /> | ||
private readonly _plugins; | ||
private readonly _preRoutingPlugins; | ||
private readonly _postRoutingPlugins; | ||
private readonly _postSecurityPlugins; | ||
private readonly _postControllerPlugins; | ||
private readonly _postResponseValidation; | ||
constructor(apiDoc: any, plugins: exegesis.ExegesisPlugin[]); | ||
@@ -11,0 +13,0 @@ preCompile(data: { |
@@ -28,5 +28,7 @@ "use strict"; | ||
this._plugins = plugins.map(plugin => plugin.makeExegesisPlugin({ apiDoc })); | ||
this._preRoutingPlugins = this._plugins.filter(p => !!p.preRouting); | ||
this._postRoutingPlugins = this._plugins.filter(p => !!p.postRouting); | ||
this._postSecurityPlugins = this._plugins.filter(p => !!p.postSecurity); | ||
this._postControllerPlugins = this._plugins.filter(p => !!p.postController); | ||
this._postResponseValidation = this._plugins.filter(p => !!p.postResponseValidation); | ||
} | ||
@@ -44,3 +46,3 @@ preCompile(data) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
for (const plugin of this._postRoutingPlugins) { | ||
for (const plugin of this._preRoutingPlugins) { | ||
yield callFn(plugin, 'preRouting', data); | ||
@@ -73,3 +75,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
for (const plugin of this._postControllerPlugins) { | ||
for (const plugin of this._postResponseValidation) { | ||
yield callFn(plugin, 'postResponseValidation', context); | ||
@@ -76,0 +78,0 @@ } |
{ | ||
"name": "exegesis", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"description": "Parses OpenAPI documents", | ||
@@ -62,3 +62,3 @@ "main": "lib/index.js", | ||
"@types/qs": "^6.5.1", | ||
"@types/semver": "^6.0.0", | ||
"@types/semver": "^7.1.0", | ||
"chai": "^4.2.0", | ||
@@ -68,3 +68,3 @@ "chai-as-promised": "^7.1.1", | ||
"husky": "^4.0.2", | ||
"lint-staged": "^9.4.0", | ||
"lint-staged": "^10.0.7", | ||
"markdownlint-cli": "^0.18.0", | ||
@@ -71,0 +71,0 @@ "mocha": "^6.1.4", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
306609
4757