-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Refactor storage plugin file category system to use registry-based pattern #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kingston
merged 23 commits into
main
from
kingston/eng-791-refactor-storage-module-backend
Jul 12, 2025
Merged
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
7d9650d
feat: Add session error link to catch scenarios where we have an inva…
kingston 1eeadb5
Export root auth apollo generator
kingston c46c8ad
Make sure we use NodeNext/Node16 for ts libraries
kingston 6aba93b
Remove unnecessary module directive
kingston 85156da
Fix one last reference
kingston ac10e03
Add exception for filename casing for $ and - router paths
kingston 9232659
Incorporate updated storage plugin adapters
kingston 1b25d83
Add json deep clone function
kingston d5db106
Refactor model form to fix bug with field creation
kingston ba86683
Small refactor of model field form
kingston 3855f2b
Support broader set of file model fields
kingston 9ad05ee
Ignore text encoding identifier case eslint errors
kingston 9b889b9
Implement improved storage module
kingston f081e8b
Fix up react generators too
kingston ed6e3e9
Update storage inputs
kingston 58434cb
Add changeset
kingston b260567
Bump todo task
kingston 65776ad
Collocate file categories with modules
kingston c9b80a8
Update UI of storage plugin
kingston 7ca3d37
Merge branch 'main' into kingston/eng-791-refactor-storage-module-bac…
kingston 9e6211d
Fix knip errors
kingston 2764d7b
Fix knip errors
kingston 840c45f
Fix knip one final time
kingston File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --- | ||
| '@baseplate-dev/plugin-storage': patch | ||
| --- | ||
|
|
||
| Refactor storage plugin file category system to use registry-based pattern | ||
|
|
||
| This change modernizes the file category system by moving from a centralized configuration array to a modular registry-based pattern with individual category files. Key improvements include: | ||
|
|
||
| **New Architecture:** | ||
|
|
||
| - Individual category files for better modularity and maintainability | ||
| - `createFileCategory` utility with FileSize and MimeTypes helpers | ||
| - Registry pattern with `FILE_CATEGORY_REGISTRY` for type-safe category lookup | ||
| - GraphQL enum type for file categories with strict validation | ||
|
|
||
| **Enhanced Features:** | ||
|
|
||
| - If-None-Match header support for S3 uploads to prevent file overwrites | ||
| - Improved authorization patterns with separate upload/read permissions | ||
| - Better error messages and validation feedback | ||
| - Type-safe category name validation using CONSTANT_CASE convention | ||
|
|
||
| **Breaking Changes:** | ||
|
|
||
| - File categories are now imported from individual files instead of centralized array | ||
| - GraphQL schema now uses enum type instead of string for category field | ||
| - Authorization interface updated with separate upload/read functions | ||
|
|
||
| **Migration:** | ||
|
|
||
| - Existing file categories are preserved with same functionality | ||
| - Services updated to use new registry lookup functions | ||
| - Database schema remains compatible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@baseplate-dev/utils': patch | ||
| --- | ||
|
|
||
| Add JSON deep clone function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| '@baseplate-dev/react-generators': patch | ||
| '@baseplate-dev/tools': patch | ||
| --- | ||
|
|
||
| Add exception for filename casing for $ and - router paths |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.