From b53af0488f5242e0729bfd399e8b31ba6e550c89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 22:51:50 +0000 Subject: [PATCH 1/2] build(deps-dev): Bump swagger-ui-dist from 5.13.0 to 5.14.0 Bumps [swagger-ui-dist](https://github.com/swagger-api/swagger-ui) from 5.13.0 to 5.14.0. - [Release notes](https://github.com/swagger-api/swagger-ui/releases) - [Changelog](https://github.com/swagger-api/swagger-ui/blob/master/.releaserc) - [Commits](https://github.com/swagger-api/swagger-ui/compare/v5.13.0...v5.14.0) --- updated-dependencies: - dependency-name: swagger-ui-dist dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db6aba4..9433e33 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "fs-extra": "^11.0.0", "qs": "^6.11.0", "standard": "^17.0.0", - "swagger-ui-dist": "5.13.0", + "swagger-ui-dist": "5.14.0", "tap": "^18.6.1", "tsd": "^0.31.0" }, From 2fed818ad24d3b80d9f56422495a53b87daf1544 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Tue, 9 Apr 2024 21:59:47 +0200 Subject: [PATCH 2/2] fix linting --- index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index c3e5f9a..b0435ea 100644 --- a/index.js +++ b/index.js @@ -5,14 +5,14 @@ const path = require('node:path') const fp = require('fastify-plugin') const csp = require('./static/csp.json') -async function fastifySwaggerUi(fastify, opts) { +async function fastifySwaggerUi (fastify, opts) { fastify.decorate('swaggerCSP', csp) - //if no logo is provided, read default static logo - let logoContent = opts.logo; + // if no logo is provided, read default static logo + let logoContent = opts.logo if (logoContent == null) { - const bufferLogoContent = await fsPromises.readFile(path.join(__dirname, './static/logo.svg')); - logoContent = { type: 'image/svg+xml', content: bufferLogoContent }; + const bufferLogoContent = await fsPromises.readFile(path.join(__dirname, './static/logo.svg')) + logoContent = { type: 'image/svg+xml', content: bufferLogoContent } } await fastify.register(require('./lib/routes'), {