ducktors/turborepo-remote-cache

View on GitHub

Showing 6 of 6 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if (
route.authorization &&
route.authorization === 'write' &&
writeScopes.length > 0
) {
Severity: Major
Found in src/plugins/remote-cache/auth/jwt.ts and 1 other location - About 4 hrs to fix
src/plugins/remote-cache/auth/jwt.ts on lines 30..40

Similar blocks of code found in 2 locations. Consider refactoring.
Open

if (
route.authorization &&
route.authorization === 'read' &&
readScopes.length > 0
) {
Severity: Major
Found in src/plugins/remote-cache/auth/jwt.ts and 1 other location - About 4 hrs to fix
src/plugins/remote-cache/auth/jwt.ts on lines 42..52

Function createApp has 58 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function createApp(
options: FastifyServerOptions & { configOverrides?: Partial<Config> } = {},
): FastifyInstance {
const SSL_CERT_PATH = env.get().SSL_CERT_PATH
const SSL_KEY_PATH = env.get().SSL_KEY_PATH
Severity: Major
Found in src/app.ts - About 2 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    if (err.validation) {
    reply.log.warn(err)
    reply.code(400).send({ message: err.message })
    } else if (isBoom(err)) {
    Severity: Minor
    Found in src/app.ts and 1 other location - About 35 mins to fix
    src/app.ts on lines 77..80

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    } else {
    request.log.error(err)
    reply.code(500).send({ message: err.message })
    }
    Severity: Minor
    Found in src/app.ts and 1 other location - About 35 mins to fix
    src/app.ts on lines 65..68

    Function createS3 has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    export function createS3({
    accessKey = process.env.S3_ACCESS_KEY,
    secretKey = process.env.S3_SECRET_KEY,
    bucket,
    region = process.env.S3_REGION,
    Severity: Minor
    Found in src/plugins/remote-cache/storage/s3.ts - About 25 mins to fix
    Severity
    Category
    Status
    Source
    Language