Socket
Socket
Sign inDemoInstall

fastify-static

Package Overview
Dependencies
Maintainers
7
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-static - npm Package Compare versions

Comparing version 0.14.0 to 1.0.0

.gitattributes

2

index.js

@@ -134,4 +134,4 @@ 'use strict'

module.exports = fp(fastifyStatic, {
fastify: '>= 1.2.0',
fastify: '^1.11.0',
name: 'fastify-static'
})
{
"name": "fastify-static",
"version": "0.14.0",
"version": "1.0.0",
"description": "Plugin for serving static files as fast as possible.",

@@ -30,3 +30,3 @@ "main": "index.js",

"fastify-plugin": "^1.2.0",
"readable-stream": "^3.0.0",
"readable-stream": "^3.0.2",
"send": "^0.16.0"

@@ -36,11 +36,11 @@ },

"coveralls": "^3.0.2",
"fastify": "^1.9.0",
"fastify-compress": "^0.6.0",
"fastify": "^1.11.0",
"fastify-compress": "^0.7.0",
"pre-commit": "^1.2.2",
"proxyquire": "^2.0.0",
"proxyquire": "^2.1.0",
"simple-get": "^3.0.3",
"snazzy": "^7.0.0",
"standard": "^11.0.0",
"snazzy": "^8.0.0",
"standard": "^12.0.0",
"tap": "^12.0.0"
}
}
# fastify-static
[![Build Status](https://travis-ci.org/fastify/fastify-static.svg?branch=master)](https://travis-ci.org/fastify/fastify-static) [![Greenkeeper badge](https://badges.greenkeeper.io/fastify/fastify-static.svg)](https://greenkeeper.io/) [![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-static/badge.svg)](https://snyk.io/test/github/fastify/fastify-static)
Plugin for serving static files as fast as possible.
Plugin for serving static files as fast as possible. Supports Fastify versions `^1.11.0`.

@@ -6,0 +6,0 @@ ## Install

@@ -28,3 +28,3 @@ 'use strict'

function genericErrorResponseChecks (t, response) {
t.strictEqual(response.headers['content-type'], 'application/json')
t.strictEqual(response.headers['content-type'], 'application/json; charset=utf-8')
t.ok(response.headers.date)

@@ -563,4 +563,4 @@ }

t.plan(1)
const pluginOptions = {root: path.join(__dirname, 'static')}
const fastify = Fastify({logger: false})
const pluginOptions = { root: path.join(__dirname, 'static') }
const fastify = Fastify({ logger: false })
t.doesNotThrow(() => fastify.register(fastifyStatic, pluginOptions))

@@ -583,3 +583,3 @@ })

}
const fastify = Fastify({logger: false})
const fastify = Fastify({ logger: false })
const fastifyStatic = require('proxyquire')('../', {

@@ -602,3 +602,3 @@ send: function sendStub (req, pathName, options) {

fastify.register(fastifyStatic, pluginOptions)
fastify.inject({url: '/index.html'})
fastify.inject({ url: '/index.html' })
})

@@ -646,3 +646,3 @@

const pluginOptions = {}
const fastify = Fastify({logger: false})
const fastify = Fastify({ logger: false })
fastify.register(fastifyStatic, pluginOptions)

@@ -657,3 +657,3 @@ .ready(err => {

const pluginOptions = { root: 42 }
const fastify = Fastify({logger: false})
const fastify = Fastify({ logger: false })
fastify.register(fastifyStatic, pluginOptions)

@@ -668,3 +668,3 @@ .ready(err => {

const pluginOptions = { root: './my/path' }
const fastify = Fastify({logger: false})
const fastify = Fastify({ logger: false })
fastify.register(fastifyStatic, pluginOptions)

@@ -679,3 +679,3 @@ .ready(err => {

const pluginOptions = { root: path.join(__dirname, 'foo', 'bar') }
const fastify = Fastify({logger: false})
const fastify = Fastify({ logger: false })
fastify.register(fastifyStatic, pluginOptions)

@@ -690,3 +690,3 @@ .ready(err => {

const pluginOptions = { root: __filename }
const fastify = Fastify({logger: false})
const fastify = Fastify({ logger: false })
fastify.register(fastifyStatic, pluginOptions)

@@ -701,3 +701,3 @@ .ready(err => {

const pluginOptions = { root: __dirname, setHeaders: 'headers' }
const fastify = Fastify({logger: false})
const fastify = Fastify({ logger: false })
fastify.register(fastifyStatic, pluginOptions)

@@ -704,0 +704,0 @@ .ready(err => {

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