Repository navigation
fix: expose additional binary multipart fields as file flags - #272
Open
petebacondarwin wants to merge 1 commit into
Open
petebacondarwin wants to merge 1 commit into
petebacondarwin wants to merge 1 commit into
Conversation
commit: |
Contributor
|
LGTM |
Contributor
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 214.1 ms | 3.7 ms | 207.7 ms | 221.6 ms |
| base | 213.5 ms | 4.5 ms | 207.0 ms | 226.4 ms |
Δ (PR vs base): — +0.6 ms (+0.3%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
edmundhung
reviewed
Oct 14, 2026
edmundhung
left a comment
Member
There was a problem hiding this comment.
I think this needs a rebase to resolve the conflict introduced from the recent refactor. I will move this back to draft first. Just ping me when it is ready 🙏🏼
edmundhung
marked this pull request as draft
October 14, 2026 11:37
Fixes #177. Co-authored-by: Pete Bacon Darwin <pbacondarwin@cloudflare.com>
petebacondarwin
force-pushed
the
codex/fix-177-multipart-files
branch
from
October 14, 2026 12:04
4d0f0d0 to
ab4adcf
Compare
petebacondarwin
marked this pull request as ready for review
October 14, 2026 12:05
Contributor
|
LGTM |
edmundhung
reviewed
Oct 14, 2026
edmundhung
left a comment
Member
There was a problem hiding this comment.
I wonder if it's worth reusing the @ syntax for multipart fields here.
As I understand, every string-typed body flag in cf already accepts an '@path/to/file' token, following curl's '-d @file' convention:
cf mtls-certificates create --certificates @./cert.pem \
--private-key @./key.pem --ca
cf origin-ca-certificates create --csr @./csr.pem ...
cf d1 database query <id> --sql @./query.sqlWhat if we follow the same pattern so the behavior here could be:
--worker-js @./worker.js # Read the file
--worker-js 'export default { ... }' # Send literal source
petebacondarwin
requested review from
a team and
dario-piotrowicz
and removed request for
a team
October 23, 2026 13:00
dario-piotrowicz
removed their request for review
October 23, 2026 14:11
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.
Multipart commands previously exposed only the primary binary field through
--file, leaving other binary fields inaccessible. Add path-valued flags for those fields and upload their bytes under the original multipart names. Pages deployment creation now exposes--worker-js,--routes-json,--redirects,--worker-bundle, and--functions-filepath-routing-config-json; Cloudforce One asset uploads expose--source.Keep the primary
--filebehavior, prevent collisions with existing flags and aliases, and include the new fields in command metadata and dry-run previews. Implemented in the current Forge generator plugin, with regression coverage for uploaded bytes, original field names, paths with spaces and Unicode, invalid files, primary-file coexistence, and mixed multipart/octet-stream selection. Includes a minor changeset for the new flags. Based on the contributor patch linked in the issue, with nahwan-kim's authorship preserved.Validation:
pnpm checkpassed, including regeneration, formatting, lint, builds, and workspace type checks.pnpm --filter cf test: 1,622 tests passed, 6 skipped.pnpm --filter @cloudflare/wrangler-tests test: 637 tests passed; existing skipped/todo cases remain.Fixes #177.