Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rijs.pages

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rijs.pages - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

src/pages/foo.txt

6

dist/index.js

@@ -8,2 +8,6 @@ 'use strict';

var _compression = require('compression');
var _compression2 = _interopRequireDefault(_compression);
var _key = require('utilise/key');

@@ -37,3 +41,3 @@

if (!server || !dir) return ripple;
expressify(server).use((0, _serveStatic2.default)((0, _path.resolve)(dir, './pages')));
expressify(server).use((0, _compression2.default)(), (0, _serveStatic2.default)((0, _path.resolve)(dir, './pages'), { redirect: false })).use('*', (0, _compression2.default)(), (0, _serveStatic2.default)((0, _path.resolve)(dir, './pages')));
return ripple;

@@ -40,0 +44,0 @@ }

6

package.json
{
"name": "rijs.pages",
"version": "1.0.0",
"version": "1.1.0",
"main": "dist",

@@ -14,5 +14,4 @@ "browser": "./node_modules/utilise/identity.js",

"babel": "babel src -d dist",
"copy": "cp ./node_modules/rijs/dist/ripple* ./dist",
"clean": "rm -rf dist && mkdir dist",
"build": "npm run clean && npm run babel && npm run ignore && npm run copy",
"build": "npm run clean && npm run babel && npm run ignore",
"test": "istanbul test ./node_modules/mocha/bin/_mocha --report html -- -R spec",

@@ -40,4 +39,5 @@ "coverage": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && rm -rf ./coverage",

"dependencies": {
"compression": "^1.6.2",
"utilise": "*"
}
}

@@ -9,3 +9,4 @@ // -------------------------------------------

expressify(server)
.use(serve(resolve(dir, './pages')))
.use(compression(), serve(resolve(dir, './pages'), { redirect: false }))
.use('*', compression(), serve(resolve(dir, './pages')))
return ripple

@@ -18,2 +19,3 @@ }

import compression from 'compression'
import key from 'utilise/key'

@@ -20,0 +22,0 @@ import { resolve } from 'path'

@@ -24,9 +24,30 @@ var expect = require('chai').expect

it('should serve pages - miss', function(done){
it('should serve pages - miss file', function(done){
request(app)
.get('/404.html')
.expect('Cannot GET /404.html\n')
.expect(404, done)
.get('/missing-path')
.expect('Location', '/missing-path/')
.expect(301, done)
})
it('should serve pages - miss path', function(done){
request(app)
.get('/missing-path/')
.expect('<h1>Hello World</h1>')
.expect(200, done)
})
it('should default to index', function(done){
request(app)
.get('/')
.expect('<h1>Hello World</h1>')
.expect(200, done)
})
it('should serve other assets', function(done){
request(app)
.get('/foo.txt')
.expect('foo')
.expect(200, done)
})
})

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc