diff --git a/auth.js b/index.js similarity index 100% rename from auth.js rename to index.js diff --git a/package.json b/package.json index f6e8281..32366c8 100644 --- a/package.json +++ b/package.json @@ -2,25 +2,7 @@ "name": "@fastify/auth", "version": "5.1.1", "description": "Run multiple auth functions in Fastify", - "repository": { - "type": "git", - "url": "git+https://github.com/fastify/fastify-auth.git" - }, - "bugs": { - "url": "https://github.com/fastify/fastify-auth/issues" - }, - "homepage": "https://github.com/fastify/fastify-auth#readme", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fastify" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fastify" - } - ], - "main": "auth.js", + "main": "index.js", "type": "commonjs", "types": "types/index.d.ts", "scripts": { @@ -31,6 +13,10 @@ "test:typescript": "tstyche", "test:unit": "c8 --100 node --test" }, + "repository": { + "type": "git", + "url": "git+https://github.com/fastify/fastify-auth.git" + }, "keywords": [ "fastify", "auth", @@ -57,6 +43,20 @@ } ], "license": "MIT", + "bugs": { + "url": "https://github.com/fastify/fastify-auth/issues" + }, + "homepage": "https://github.com/fastify/fastify-auth#readme", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], "devDependencies": { "@fastify/jwt": "^10.0.0", "@fastify/leveldb": "^6.0.0", @@ -77,4 +77,4 @@ "publishConfig": { "access": "public" } -} +} \ No newline at end of file diff --git a/test/auth.test.js b/test/auth.test.js index 867b61c..6ed5a56 100644 --- a/test/auth.test.js +++ b/test/auth.test.js @@ -2,7 +2,7 @@ const { test } = require('node:test') const Fastify = require('fastify') -const fastifyAuth = require('../auth') +const fastifyAuth = require('..') test('registering plugin with invalid default relation', (t, done) => { t.plan(2) diff --git a/test/example-async.js b/test/example-async.js index b96bd6c..e1e0164 100644 --- a/test/example-async.js +++ b/test/example-async.js @@ -7,7 +7,7 @@ function build (opts) { fastify.register(require('@fastify/jwt'), { secret: 'supersecret' }) fastify.register(require('@fastify/leveldb'), { name: 'authdb-async' }) - fastify.register(require('../auth')) + fastify.register(require('..')) fastify.register(routes) fastify.decorate('verifyJWTandLevel', verifyJWTandLevel) diff --git a/test/example-composited.js b/test/example-composited.js index adf8249..c731ebf 100644 --- a/test/example-composited.js +++ b/test/example-composited.js @@ -6,7 +6,7 @@ function build (opts) { const fastify = Fastify(opts) fastify - .register(require('../auth')) + .register(require('..')) .after(routes) fastify.decorate('verifyNumber', verifyNumber) diff --git a/test/example.js b/test/example.js index cbd4d97..f0e248e 100644 --- a/test/example.js +++ b/test/example.js @@ -26,7 +26,7 @@ function build (opts) { fastify.register(require('@fastify/jwt'), { secret: 'supersecret' }) fastify.register(require('@fastify/leveldb'), { name: 'authdb' }) - fastify.register(require('../auth')) // just 'fastify-auth' IRL + fastify.register(require('..')) // just 'fastify-auth' IRL fastify.after(routes) fastify.decorate('verifyJWTandLevelDB', verifyJWTandLevelDB)