Skip to content

Commit

Permalink
add favicon & refactor version number
Browse files Browse the repository at this point in the history
  • Loading branch information
craftycram committed Feb 19, 2024
1 parent 3e2cd7d commit 61a7fcc
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
Binary file added assets/favicon.ico
Binary file not shown.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blaze",
"version": "2.0.2",
"version": "2.0.3",
"description": "blazing fast ci/cd. small rest api service to receive ghcr event hooks to update services running in a dockerized portainer instance",
"main": "index.js",
"scripts": {
Expand All @@ -14,6 +14,7 @@
"devDependencies": {
"@types/express": "^4.17.21",
"@types/node": "^20.11.17",
"@types/serve-favicon": "^2.5.7",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"eslint": "^8.56.0",
Expand All @@ -28,6 +29,7 @@
"axios": "^1.6.7",
"dotenv": "^16.4.3",
"express": "^4.18.2",
"serve-favicon": "^2.5.0",
"yaml": "^2.3.4"
}
}
7 changes: 5 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import express from 'express';
import { parse } from 'yaml';
import https from 'https';
import type { Application, Request, Response } from 'express';
import favicon from 'serve-favicon';
import path from 'path';

dotenv.config();

Expand Down Expand Up @@ -33,6 +35,7 @@ app.use((_req: Request, res: Response, next: () => void): void => {
res.setHeader('X-Powered-By', 'Blaze');
next();
});
app.use(favicon(path.join(__dirname, '..', 'assets', 'favicon.ico')));

let hookCount: number = 0;

Expand Down Expand Up @@ -196,9 +199,9 @@ app.get('/', (_req: Request, res: Response): void => {
msg: 'Hi this is Blaze. Ready to receive webhooks. Find out more about Blaze on GitHub.',
url: 'https://github.com/itmr-dev/blaze',
time: new Date().toISOString(),
uptime: process.uptime(),
uptime: Math.floor(process.uptime()),
logo: 'https://raw.githubusercontent.com/itmr-dev/blaze/main/assets/blaze.png',
version: '2.0.1',
version: process.env.npm_package_version,
});
});

Expand Down
32 changes: 30 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"@types/range-parser" "*"
"@types/send" "*"

"@types/express@^4.17.21":
"@types/express@*", "@types/express@^4.17.21":
version "4.17.21"
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d"
integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==
Expand Down Expand Up @@ -214,6 +214,13 @@
"@types/mime" "^1"
"@types/node" "*"

"@types/serve-favicon@^2.5.7":
version "2.5.7"
resolved "https://registry.yarnpkg.com/@types/serve-favicon/-/serve-favicon-2.5.7.tgz#a556fe9016984341a43af5b8345e274f3887f5ac"
integrity sha512-z9TNUQXdQ+W/OJMP1e3KOYUZ99qJS4+ZfFOIrPGImcayqKoyifbJSEFkVq1MCKBbqjMZpjPj3B5ilrQAR2+TOw==
dependencies:
"@types/express" "*"

"@types/serve-static@*":
version "1.15.5"
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.5.tgz#15e67500ec40789a1e8c9defc2d32a896f05b033"
Expand Down Expand Up @@ -1644,6 +1651,11 @@ ms@2.0.0:
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==

ms@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==

ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
Expand Down Expand Up @@ -1797,7 +1809,7 @@ parent-module@^1.0.0:
dependencies:
callsites "^3.0.0"

parseurl@~1.3.3:
parseurl@~1.3.2, parseurl@~1.3.3:
version "1.3.3"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
Expand Down Expand Up @@ -1957,6 +1969,11 @@ safe-array-concat@^1.0.1:
has-symbols "^1.0.3"
isarray "^2.0.5"

safe-buffer@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
integrity sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==

safe-buffer@5.2.1:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
Expand Down Expand Up @@ -2007,6 +2024,17 @@ send@0.18.0:
range-parser "~1.2.1"
statuses "2.0.1"

serve-favicon@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/serve-favicon/-/serve-favicon-2.5.0.tgz#935d240cdfe0f5805307fdfe967d88942a2cbcf0"
integrity sha512-FMW2RvqNr03x+C0WxTyu6sOv21oOjkq5j8tjquWccwa6ScNyGFOGJVpuS1NmTVGBAHS07xnSKotgf2ehQmf9iA==
dependencies:
etag "~1.8.1"
fresh "0.5.2"
ms "2.1.1"
parseurl "~1.3.2"
safe-buffer "5.1.1"

serve-static@1.15.0:
version "1.15.0"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.15.0.tgz#faaef08cffe0a1a62f60cad0c4e513cff0ac9540"
Expand Down

0 comments on commit 61a7fcc

Please sign in to comment.