@nerd-coder/fastify-mongoose
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "@nerd-coder/fastify-mongoose", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A Fastify plugin to connect to a MongoDB instance via the Mongoose ODM", | ||
@@ -15,3 +15,3 @@ "main": "src/index.js", | ||
"fastify-plugin": "^1.6.0", | ||
"mongoose": "^5.8.3" | ||
"mongoose": "^5.8.10" | ||
}, | ||
@@ -21,4 +21,4 @@ "devDependencies": { | ||
"release-it": "*", | ||
"tap": "^14.10.5" | ||
"tap": "^14.10.6" | ||
} | ||
} |
@@ -1,6 +0,6 @@ | ||
import { FastifyInstance, Plugin } from 'fastify' | ||
import { FastifyInstance, Plugin } from 'fastify/fastify' | ||
import { Server, IncomingMessage, ServerResponse } from 'http' | ||
import { Connection, ConnectionOptions, Schema } from 'mongoose' | ||
declare module 'fastify' { | ||
declare module 'fastify/fastify' { | ||
interface FastifyInstance { | ||
@@ -15,5 +15,9 @@ mongoose: Connection | ||
ServerResponse, | ||
{ url: string; connectionOptions: ConnectionOptions; models?: { [key: string]: Schema } } | ||
{ | ||
url: string | ||
connectionOptions: ConnectionOptions | ||
models?: { [key: string]: Schema } | ||
} | ||
> | ||
export = fastifyMongoose |
@@ -8,3 +8,3 @@ const fastify = require('fastify') | ||
'fastify.mongoose should exist', | ||
/** @param {typeof tap} t */ | ||
/** @param {tap} t */ | ||
async function(t) { | ||
@@ -88,3 +88,7 @@ t.plan(7) | ||
url: '/', | ||
payload: { username: 'test', password: 'pass', email: 'test@example.com' }, | ||
payload: { | ||
username: 'test', | ||
password: 'pass', | ||
email: 'test@example.com', | ||
}, | ||
}) | ||
@@ -98,3 +102,3 @@ const json = JSON.parse(payload) | ||
} catch (e) { | ||
t.fail('Fastify threw', e) | ||
t.fail('Fastify threw' + e.message, e) | ||
} | ||
@@ -101,0 +105,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
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
4239
6
135
Updatedmongoose@^5.8.10