@flowfuse/file-server 2.0.1-7109709-202401181024.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ #### 2.1.0: Release
2
+
3
+ - Feat: Add health check enpoint (#97) @ppawlowski
4
+
1
5
  #### 2.0.0: Release
2
6
 
3
7
 
package/forge/auth.js CHANGED
@@ -26,7 +26,7 @@ module.exports = fp(async function (app, opts, done) {
26
26
  }
27
27
 
28
28
  async function checkAuth (request, reply) {
29
- if (request.url === '/metrics') {
29
+ if (request.url === '/metrics' || request.url === '/health') {
30
30
  return
31
31
  }
32
32
  try {
@@ -89,6 +89,9 @@ module.exports = async (options = {}) => {
89
89
  // Routes
90
90
  await server.register(routes, { logLevel: server.config.logging.http })
91
91
 
92
+ // Health status
93
+ await server.register(require('fastify-healthcheck'))
94
+
92
95
  server.ready()
93
96
 
94
97
  return server
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowfuse/file-server",
3
- "version": "2.0.1-7109709-202401181024.0",
3
+ "version": "2.1.0",
4
4
  "description": "A basic Object Storage backend",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -37,6 +37,7 @@
37
37
  "fastify": "^4.21.0",
38
38
  "fastify-metrics": "^10.3.0",
39
39
  "fastify-plugin": "^4.5.1",
40
+ "fastify-healthcheck": "^4.4.0",
40
41
  "got": "^11.8.6",
41
42
  "pg": "^8.11.2",
42
43
  "pino": "^8.15.1",