@veloxts/storage 0.8.3 → 0.9.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/dist/plugin.js +6 -0
- package/package.json +3 -3
package/dist/plugin.js
CHANGED
|
@@ -62,6 +62,12 @@ export function storagePlugin(options = {}) {
|
|
|
62
62
|
return storage;
|
|
63
63
|
},
|
|
64
64
|
});
|
|
65
|
+
// Bridge storage onto procedure ctx
|
|
66
|
+
fastify.addHook('onRequest', async (request) => {
|
|
67
|
+
if (request.context) {
|
|
68
|
+
request.context.storage = storage;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
65
71
|
// Register cleanup hook
|
|
66
72
|
fastify.addHook('onClose', async () => {
|
|
67
73
|
await storage.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/storage",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Multi-driver file storage abstraction for VeloxTS framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"fastify-plugin": "5.1.0",
|
|
58
58
|
"mime-types": "3.0.2",
|
|
59
59
|
"zod": "4.3.6",
|
|
60
|
-
"@veloxts/core": "0.
|
|
60
|
+
"@veloxts/core": "0.9.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@aws-sdk/client-s3": ">=3.0.0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"fastify": "5.8.5",
|
|
87
87
|
"typescript": "5.9.3",
|
|
88
88
|
"vitest": "4.1.5",
|
|
89
|
-
"@veloxts/testing": "0.
|
|
89
|
+
"@veloxts/testing": "0.9.0"
|
|
90
90
|
},
|
|
91
91
|
"publishConfig": {
|
|
92
92
|
"access": "public"
|