connect-modrewrite
Advanced tools
Comparing version 0.5.11 to 0.6.0-pre
107
Gruntfile.js
@@ -1,5 +0,5 @@ | ||
module.exports = function(grunt) { | ||
var urlRewrite = require('./src/modrewrite'); | ||
var jshintGlobals = require('jshint-globals'); | ||
module.exports = function(grunt) { | ||
// Project configuration. | ||
@@ -10,76 +10,32 @@ grunt.initConfig({ | ||
options: { | ||
asi : true, | ||
curly : true, | ||
eqeqeq : true, | ||
immed : true, | ||
latedef : true, | ||
newcap : true, | ||
noarg : true, | ||
sub : true, | ||
undef : true, | ||
boss : true, | ||
eqnull : true, | ||
browser : true, | ||
camelcase : true, | ||
unused : true, | ||
node : true, | ||
laxcomma : true | ||
es5 : false, | ||
strict : false, | ||
curly : false, | ||
eqeqeq : true, | ||
loopfunc : true, | ||
forin : false, | ||
immed : true, | ||
latedef : true, | ||
newcap : true, | ||
noarg : true, | ||
sub : true, | ||
undef : true, | ||
boss : true, | ||
eqnull : true, | ||
node : true, | ||
supernew : true, | ||
laxbreak : true, | ||
expr : true, | ||
laxcomma : true, | ||
unused : true, | ||
latedef : false, | ||
globals: jshintGlobals({ | ||
mocha : jshintGlobals.mocha | ||
}) | ||
}, | ||
files: [ | ||
'index.js', | ||
'test/**/*.js' | ||
] | ||
}, | ||
connect: { | ||
server: { | ||
options: { | ||
port: 9001, | ||
base: 'example', | ||
keepalive: true, | ||
middleware: function(connect, options) { | ||
return [ | ||
urlRewrite([ | ||
// Test basics | ||
'^/test$ /index.html', | ||
'^/test/\\d*$ /index.html [L]', | ||
// Test nocase | ||
'^/test/nocase$ /nocase.html [NC, L]', | ||
// Test forbidden | ||
'^/test/forbidden$ [F]', | ||
// Test gone | ||
'^/test/gone$ [G]', | ||
// Test type | ||
'^/test/type$ /image [T=image/png, L]', | ||
// Test Proxy | ||
'^/test/proxy$ http://nodejs.org [P]', | ||
// Test redirect flag | ||
'^/test/redirect$ http://nodejs.org [R]', | ||
'^/test/redirect-309$ http://nodejs.org [R=309]', | ||
// Test last flag | ||
'^/test-flag$ /connection [L]', | ||
'^/connection$ /index.html', | ||
// Test last flag | ||
'^/test-flag-2$ /connection-2', | ||
'^/connection-2$ /index.html', | ||
// Test defined params | ||
'^/test-defined-params/(.*)$ /$1 [L]', | ||
// Test inverted URL | ||
'!\\.js|\\.css$ /index.html' | ||
]), | ||
connect.static(options.base) | ||
] | ||
} | ||
} | ||
} | ||
} | ||
@@ -89,8 +45,3 @@ }); | ||
// Load plugins | ||
grunt.loadNpmTasks('grunt-contrib-connect'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
// Default task(s). | ||
grunt.registerTask('default', ['jshint', 'connect']); | ||
}; |
{ | ||
"name": "connect-modrewrite", | ||
"main": "./src/modrewrite.js", | ||
"version": "0.5.11", | ||
"main": "./index.js", | ||
"version": "0.6.0-pre", | ||
"description": "connect-modrewrite adds modrewrite functionality to connect/express server", | ||
@@ -30,7 +30,10 @@ "author": { | ||
"devDependencies": { | ||
"grunt-contrib-jshint": "~0.1.0", | ||
"grunt-contrib-jshint": "^0.8.0", | ||
"grunt": "~0.4.0", | ||
"grunt-contrib-connect": "~0.1.0", | ||
"chai": "~1.4.2", | ||
"mocha": "~1.8.1" | ||
"mocha": "~1.8.1", | ||
"sinon": "~1.8.2", | ||
"sinon-chai": "~2.5.0", | ||
"proxyquire": "~0.5.2", | ||
"jshint-globals": "~0.1.0" | ||
}, | ||
@@ -41,8 +44,7 @@ "scripts": { | ||
"keywords": [ | ||
"gruntplugin", | ||
"grunt-contrib", | ||
"grunt-contrib-connect", | ||
"modrewrite" | ||
], | ||
"dependencies": {} | ||
"dependencies": { | ||
"express": "~3.4.8" | ||
} | ||
} |
connect-modrewrite [![Build Status](https://travis-ci.org/tinganho/connect-modrewrite.png)](https://travis-ci.org/tinganho/connect-modrewrite) | ||
======================== | ||
[![NPM](https://nodei.co/npm/connect-modrewrite.png?downloads=true&stars=true)](https://nodei.co/npm/connect-modrewrite/) | ||
`connect-modrewrite` adds modrewrite functionality to connect/express server. | ||
@@ -80,1 +83,5 @@ | ||
Licensed under the MIT license. | ||
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/tinganho/connect-modrewrite/trend.png)](https://bitdeli.com/free "Bitdeli Badge") | ||
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
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
518
87
20431
1
8
11
4
+ Addedexpress@~3.4.8
+ Addedbatch@0.5.0(transitive)
+ Addedbuffer-crc32@0.2.1(transitive)
+ Addedbytes@0.2.1(transitive)
+ Addedcommander@1.3.2(transitive)
+ Addedconnect@2.12.0(transitive)
+ Addedcookie@0.1.0(transitive)
+ Addedcookie-signature@1.0.1(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddebug@0.8.1(transitive)
+ Addedexpress@3.4.8(transitive)
+ Addedfresh@0.2.0(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedisarray@0.0.1(transitive)
+ Addedkeypress@0.1.0(transitive)
+ Addedmerge-descriptors@0.0.1(transitive)
+ Addedmethods@0.1.0(transitive)
+ Addedmime@1.2.11(transitive)
+ Addedmkdirp@0.3.5(transitive)
+ Addedmultiparty@2.2.0(transitive)
+ Addednegotiator@0.3.0(transitive)
+ Addedpause@0.0.1(transitive)
+ Addedqs@0.6.6(transitive)
+ Addedrange-parser@0.0.4(transitive)
+ Addedraw-body@1.1.2(transitive)
+ Addedreadable-stream@1.1.14(transitive)
+ Addedsend@0.1.4(transitive)
+ Addedstream-counter@0.2.0(transitive)
+ Addedstring_decoder@0.10.31(transitive)
+ Addeduid2@0.0.3(transitive)