hsynlms / fastify-guard

A simple user role and scope check plugin to protect endpoints for Fastify
MIT License
49 stars 9 forks source link

Not working with Fastify v5 #15

Open TobiasLC opened 3 days ago

TobiasLC commented 3 days ago

The server can't start when the fastifyGuard plugin is registered.

ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.2, typescript ver. 5.6.3)

My dependecies:

"dependencies": {
        "@faker-js/faker": "^9.0.3",
        "@fastify/cors": "^10.0.1",
        "@fastify/jwt": "^9.0.1",
        "@fastify/swagger": "^9.2.0",
        "@fastify/swagger-ui": "^5.1.0",
        "@prisma/client": "5.9.0",
        "@types/jsonwebtoken": "^9.0.7",
        "fastify": "^5.0.0",
        "fastify-guard": "^2.0.0",
        "fastify-zod": "^1.4.0",
        "jsonwebtoken": "^9.0.2",
        "pino-pretty": "^11.3.0",
        "tap": "^21.0.1",
        "zod": "^3.23.8",
        "zod-prisma-types": "^3.1.8",
        "zod-to-json-schema": "^3.23.3"
    },
    "devDependencies": {
        "@types/node": "^22.7.5",
        "@types/tap": "^15.0.12",
        "dotenv-cli": "^7.4.2",
        "prisma": "5.9.0",
        "ts-node": "^10.9.2",
        "ts-node-dev": "^2.0.0",
        "typescript": "^5.6.3"
    }
hsynlms commented 2 days ago

Hello @TobiasLC, would you like to send a PR for it?