koa2-nginx
Advanced tools
Comparing version 2.0.0-beta.2 to 2.0.0
12
index.js
const compose = require('koa-compose'); | ||
const { setupProxyFeature, setupMiddlewares } = require('./lib/utils'); | ||
const { setupProxyFeature, setupMiddlewares } = require('./lib'); | ||
module.exports = options => { | ||
return async function(ctx, next) { | ||
const newOptions = setupProxyFeature(options); | ||
const middles = setupMiddlewares(newOptions); | ||
const newOptions = setupProxyFeature(options) | ||
const middles = setupMiddlewares(newOptions) | ||
return compose(middles) | ||
}; | ||
return compose(middles); | ||
}; |
{ | ||
"name": "koa2-nginx", | ||
"version": "2.0.0-beta.2", | ||
"version": "2.0.0", | ||
"description": "This is an http-proxy koa proxy middleware that can be used after bodyparse", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "mocha test/*.js", | ||
"coverage": "nyc --reporter=text --reporter=lcov npm run test", | ||
"lint": "eslint lib index.js -c .eslintrc.js --ext js" | ||
}, | ||
@@ -12,3 +14,4 @@ "keywords": [ | ||
"http-proxy", | ||
"middleware" | ||
"middleware", | ||
"webpack-dev-server" | ||
], | ||
@@ -18,8 +21,29 @@ "author": "my9074 <313231068@qq.com>", | ||
"dependencies": { | ||
"http-proxy": "^1.18.0", | ||
"path-to-regexp": "^6.0.0" | ||
"http-proxy-middleware": "^0.20.0", | ||
"koa-compose": "^4.1.0", | ||
"koa2-connect": "^1.0.2" | ||
}, | ||
"devDependencies": { | ||
"prettier": "1.19.1" | ||
"cz-conventional-changelog": "^3.0.2", | ||
"eslint": "^6.6.0", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-node": "^10.0.0", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"expect.js": "^0.3.1", | ||
"mocha": "^6.2.2", | ||
"nyc": "^14.1.1", | ||
"prettier": "^1.19.1" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10750
10
141
1
1
138
3
13
2
+ Addedkoa-compose@^4.1.0
+ Addedkoa2-connect@^1.0.2
+ Addedbraces@3.0.3(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedhttp-proxy-middleware@0.20.0(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedkoa-compose@4.2.0(transitive)
+ Addedkoa2-connect@1.0.2(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removedhttp-proxy@^1.18.0
- Removedpath-to-regexp@^6.0.0
- Removedpath-to-regexp@6.3.0(transitive)