[wrangler] add artifacts binding support#13326
Open
mattzcarey wants to merge 8 commits intocloudflare:mainfrom
Open
[wrangler] add artifacts binding support#13326mattzcarey wants to merge 8 commits intocloudflare:mainfrom
mattzcarey wants to merge 8 commits intocloudflare:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 0a533dc The changes in this PR will be included in the next version bump. 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 |
443ef3e to
bc7c37b
Compare
8b20700 to
b2a644d
Compare
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
15abfc4 to
c863b00
Compare
8111fb7 to
6806c5b
Compare
6806c5b to
9c677cc
Compare
dcd0292 to
d3475c8
Compare
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Member
|
Note The types are being introduced in cloudflare/workerd#6508 but the API is not fully finalized just yet |
edmundhung
approved these changes
Apr 15, 2026
workers-devprod
approved these changes
Apr 17, 2026
Contributor
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
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
Add wrangler configuration, deployment, and type generation support for the Artifacts binding (16 files changed, 294 insertions).
Binding config
Type generation
Generates
Artifactstype reference from the workerd type definitions:Changes (16 files)
packages/workers-utils(7 files)src/config/config.tsartifacts: []defaultsrc/config/environment.tsartifactsbinding type definition (binding+namespace, both required)src/config/validation.tsvalidateArtifactsBindingvalidator,ConfigBindingFieldName,friendlyBindingNames,bindingTypeFriendlyNames,notInheritablecall,safeBindingsentry, previews allowed keys + validationsrc/types.tsartifactstoWorkerMetadataBindingunion +Bindingunion, importCfArtifactssrc/worker.tsCfArtifactsinterfacesrc/map-worker-metadata-bindings.ts"artifacts"case in metadata binding mappingtests/.../normalize-and-validate-config.test.tsartifacts: []to expected defaults + 4 new test cases (object error, null error, valid bindings, invalid bindings)packages/wrangler(9 files)src/api/startDevWorker/utils.ts"artifacts"case inconvertConfigToBindingssrc/deploy/config-diffs.tsartifacts: trueto reorderable bindingssrc/deployment-bundle/create-worker-upload-form.tssrc/preview/shared.ts"artifacts"case ingetBindingValue+ extract artifacts inextractConfigBindingssrc/type-generation/index.tscollectCoreBindingsandcollectCoreBindingsPerEnvironment(generatesArtifactstype)src/utils/add-created-resource-config.ts"artifacts"toValidKeysexclusionsrc/utils/print-bindings.tssrc/__tests__/type-generation.test.tsMY_ARTIFACTSbinding to mock config +MY_ARTIFACTS: Artifactsto 3 expected type output blocksRoot
.changeset/artifacts-binding-support.mdwrangler+@cloudflare/workers-utils