feat(storage): support pathname/contentType extras in file() multi-column mode - #816
Merged
Conversation
…lumn mode Extends file()'s db.columns: 'keystone' multi-column mode with two optional parts, pathname and contentType, mirroring the parts image()'s multi-column mode already supports. Opt in per-field via db.columns.parts; existing configs keep their exact three-column (filename/filesize/url) shape by default. The extras round-trip through FileMetadata.metadata, the same way image()'s contentDisposition round-trips through ImageMetadata.metadata. Closes #815 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KyYAvWo4YpCF9EqSdFTUiC
🦋 Changeset detectedLatest commit: d24dbc9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Coverage Report for Core Package Coverage (./packages/core)
File CoverageNo changed files found. |
Contributor
Coverage Report for UI Package Coverage (./packages/ui)
File CoverageNo changed files found. |
Contributor
Coverage Report for CLI Package Coverage (./packages/cli)
File CoverageNo changed files found. |
Contributor
Coverage Report for Auth Package Coverage (./packages/auth)
File CoverageNo changed files found. |
Contributor
Coverage Report for Storage Package Coverage (./packages/storage)
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
Contributor
Coverage Report for RAG Package Coverage (./packages/rag)
File CoverageNo changed files found. |
Contributor
Coverage Report for Storage S3 Package Coverage (./packages/storage-s3)
File CoverageNo changed files found. |
Contributor
Coverage Report for Storage Vercel Package Coverage (./packages/storage-vercel)
File CoverageNo changed files found. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
file()'sdb.columns: 'keystone'multi-column mode with two new optional column parts,pathnameandcontentType, mirroring the partsimage()'s multi-column mode already supports (ImageColumnPart's seven-part union).db.columns.parts(e.g.parts: FILE_COLUMN_PARTSfor all five, or a custom subset). Without it, multi-columnfile()fields keep emitting exactly the same three columns (filename/filesize/url) with the same default<field>_<part>names as before — no regression for existing configs.@mapoverrides continue to work for the new parts via the existingdb.columns.mapmechanism.pathname/contentTyperound-trip throughFileMetadata.metadata.pathname/FileMetadata.metadata.contentType, the same wayimage()'scontentDispositionround-trips throughImageMetadata.metadata— neither is a native top-levelFileMetadatafield.DEFAULT_FILE_COLUMN_PARTS(the three-part default) and widenedFILE_COLUMN_PARTS(all five) are exported from@opensaas/stack-storage/@opensaas/stack-storage/fieldsfor configuringparts.Test plan
packages/storage/tests/multi-column.test.tscovering: default (3-column, no-regression) behavior, opting into the extras viaparts, per-part@mapoverrides for the extras, assemble/split round-trips with one/both/neither extra present, and null-clearing writes — mirroring the existingimage()contentDispositioncoverage.pnpm testinpackages/storage— 167 passed (8 files)pnpm buildinpackages/coreandpackages/storage(typecheck)pnpm lint(repo root) — clean (only pre-existing, unrelated warnings)pnpm format/pnpm manypkg fix(repo root)@opensaas/stack-storage: minor)Closes #815
Generated by Claude Code