@flowfuse/file-server 2.25.1-46e495d-202512231007.0 → 2.25.1-a930630-202512291204.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/forge/auth.js CHANGED
@@ -4,7 +4,7 @@ const got = require('got')
4
4
  const authCache = {}
5
5
  const ttl = 90 * 1000
6
6
 
7
- module.exports = fp(async function (app, opts, done) {
7
+ module.exports = fp(async function (app, opts) {
8
8
  const client = got.extend({
9
9
  prefixUrl: `${app.config.base_url}/account/check/project`,
10
10
  headers: {
@@ -102,5 +102,4 @@ module.exports = fp(async function (app, opts, done) {
102
102
  }
103
103
 
104
104
  app.decorate('checkAuth', checkAuth)
105
- done()
106
105
  })
package/forge/config.js CHANGED
@@ -74,7 +74,7 @@ module.exports = {
74
74
 
75
75
  return config
76
76
  },
77
- attach: fp(async function (app, opts, next) {
77
+ attach: fp(async function (app, opts) {
78
78
  Object.freeze(config)
79
79
  app.decorate('config', config)
80
80
 
@@ -87,7 +87,5 @@ module.exports = {
87
87
  if (!opts.config) {
88
88
  app.log.info(`Config File: ${config.configFile}`)
89
89
  }
90
-
91
- next()
92
90
  })
93
91
  }
package/forge/driver.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const fp = require('fastify-plugin')
2
2
  const getDriver = require('./drivers/vfs.js')
3
3
 
4
- module.exports = fp(async function (app, opts, done) {
4
+ module.exports = fp(async function (app, opts) {
5
5
  const Driver = require('./drivers/' + app.config.driver.type)
6
6
  try {
7
7
  app.decorate('_driver', new Driver(app))
@@ -15,5 +15,4 @@ module.exports = fp(async function (app, opts, done) {
15
15
  } catch (err) {
16
16
  console.log(err)
17
17
  }
18
- done()
19
18
  })
@@ -45,7 +45,9 @@ module.exports = async (options = {}) => {
45
45
 
46
46
  const server = fastify({
47
47
  bodyLimit: 10 * 1024 * 1024, // Limit set to 10MB,
48
- maxParamLength: 500,
48
+ routerOptions: {
49
+ maxParamLength: 500
50
+ },
49
51
  trustProxy: true,
50
52
  logger: loggerConfig
51
53
  })
@@ -9,7 +9,7 @@
9
9
  /** @typedef {import('fastify').FastifyReply} FastifyReply */
10
10
  /** @typedef {import('fastify').FastifyRequest} FastifyRequest */
11
11
 
12
- module.exports = async function (app, opts, done) {
12
+ module.exports = async function (app, opts) {
13
13
  const driver = require(`../context-driver/${app.config.context.type}`)
14
14
 
15
15
  await driver.init(app)
@@ -181,6 +181,4 @@ module.exports = async function (app, opts, done) {
181
181
  await driver.clean(request.params.projectId, request.body)
182
182
  reply.send()
183
183
  })
184
-
185
- done()
186
184
  }
@@ -9,7 +9,7 @@
9
9
  /** @typedef {import('fastify').FastifyReply} FastifyReply */
10
10
  /** @typedef {import('fastify').FastifyRequest} FastifyRequest */
11
11
 
12
- module.exports = async function (app, opts, done) {
12
+ module.exports = async function (app, opts) {
13
13
  app.addContentTypeParser('application/octet-stream', { parseAs: 'buffer' }, function (request, payload, done) {
14
14
  done(null, payload)
15
15
  })
@@ -125,6 +125,4 @@ module.exports = async function (app, opts, done) {
125
125
  reply.code(err.statusCode || 400).send(err)
126
126
  }
127
127
  })
128
-
129
- done()
130
128
  }
@@ -1,6 +1,6 @@
1
1
  const fp = require('fastify-plugin')
2
2
 
3
- module.exports = fp(async function (app, opts, done) {
3
+ module.exports = fp(async function (app, opts) {
4
4
  app.addHook('preHandler', app.checkAuth)
5
5
  await app.register(require('./files'), { prefix: '/v1/files', logLevel: app.config.logging.http })
6
6
  await app.register(require('./quota'), { prefix: '/v1/quota', logLevel: app.config.logging.http })
@@ -14,5 +14,4 @@ module.exports = fp(async function (app, opts, done) {
14
14
  }
15
15
  return result
16
16
  })
17
- done()
18
17
  })
@@ -1,9 +1,7 @@
1
- module.exports = async function (app, opts, done) {
1
+ module.exports = async function (app, opts) {
2
2
  app.get('/:teamId/:projectId', async (request, reply) => {
3
3
  reply.send({
4
4
  used: await request.vfs.quota(request.params.teamId, request.params.projectId)
5
5
  })
6
6
  })
7
-
8
- done()
9
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowfuse/file-server",
3
- "version": "2.25.1-46e495d-202512231007.0",
3
+ "version": "2.25.1-a930630-202512291204.0",
4
4
  "description": "A basic Object Storage backend",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,12 +32,12 @@
32
32
  "homepage": "https://github.com/FlowFuse/file-server#readme",
33
33
  "dependencies": {
34
34
  "@aws-sdk/client-s3": "^3.388.0",
35
- "@fastify/helmet": "^11.0.0",
35
+ "@fastify/helmet": "^13.0.2",
36
36
  "@node-red/util": "^3.1.0",
37
- "fastify": "^4.21.0",
38
- "fastify-metrics": "^10.3.0",
39
- "fastify-plugin": "^4.5.1",
40
- "fastify-healthcheck": "^4.4.0",
37
+ "fastify": "^5.6.2",
38
+ "fastify-healthcheck": "^5.1.0",
39
+ "fastify-metrics": "^12.1.0",
40
+ "fastify-plugin": "^5.1.0",
41
41
  "got": "^11.8.6",
42
42
  "pg": "^8.11.2",
43
43
  "pino": "^8.15.1",
@@ -59,6 +59,6 @@
59
59
  "should": "^13.2.3"
60
60
  },
61
61
  "engines": {
62
- "node": ">=16.x"
62
+ "node": ">=20.x"
63
63
  }
64
64
  }