feat: add modules/storage export and bundle config files

- Add `./modules/storage` package export pointing to `modules.storage.js`
- Add `modules/*/config.js` to tsup build entries for server-only configs
- Add `@zen/core/modules/storage` to external dependencies in tsup config
- Add `src/modules/modules.storage.js` to the second tsup build target
- Update storage handler to import via `@zen/core/modules/storage` alias
- Rename unused `request` param to `_request` in `handleGetFile`
This commit is contained in:
2026-04-12 20:45:55 -04:00
parent 35c5ac7ff7
commit dd7c54d913
3 changed files with 9 additions and 4 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
import { validateSession } from '../../../features/auth/lib/session.js';
import { cookies } from 'next/headers';
import { getSessionCookieName } from '../../../shared/lib/appConfig.js';
import { getAllStoragePublicPrefixes } from '../../../../modules/modules.storage.js';
import { getAllStoragePublicPrefixes } from '@zen/core/modules/storage';
import { getFile } from '@zen/core/storage';
// Get cookie name from environment or use default
@@ -18,7 +18,7 @@ const COOKIE_NAME = getSessionCookieName();
* @param {string} fileKey - The file key/path in storage
* @returns {Promise<Response|Object>} File response or error object
*/
export async function handleGetFile(request, fileKey) {
export async function handleGetFile(_request, fileKey) {
try {
// Reject any path that contains traversal sequences, empty segments, or
// absolute path indicators before splitting or passing to the storage backend.