Repository navigation
Conversation
Adds extract, generate and transform for Dynjandi image URLs (https://cdn.dynjandi.dev). Supports resize, crop, format and quality, and drops anything the service would reject. Wire-up follows separately.
🦋 Changeset detectedLatest commit: d278a46 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
baldurpan
marked this pull request as draft
October 4, 2026 22:09
baldurpan
marked this pull request as ready for review
November 4, 2026 00:36
Author
|
Hi @ascorbic, this is ready for review whenever you have a moment. Could you approve the workflow runs? The previous ones expired after 30 days waiting for approval. The description covers what to expect from CI. The only failures should be the six e2e steps that already fail on |
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.
Adds Dynjandi as an image CDN provider. Dynjandi is a hosted image CDN, currently in a free, invitation-only beta, with paid plans after the beta. Its spec and SDK are open source at dynjandi-dev/dynjandi.
URL shape
Dynjandi serves an uploaded image at
/<id>and a variant at/<id>/followed by a chain of-/<operation>/<arguments>/segments, applied in order:The grammar is specified in the project's OpenAPI spec (the "Variant URL grammar" section).
Operations
widthandheightmap toresize/<w>x<h>/, either side optional. With both, the service scales to cover and centre-crops, which is the default fit unpic asks for.formatmaps toformat/<f>/forjpeg,png,webpandavif.jpgis sent asjpeg.qualitymaps toquality/<q>/: an integer from 1 to 100, or one of the service's named levels (lightest,lighter,normal,smart,better,best).cropis provider-specific and carries the grammar's<w>x<h>/<position>text (compass,attention,entropy, face chains, orfocal/<x>x<y>).scale_cropis read ascrop.extractreads crops back, sotransformof an already-cropped URL keeps the crop.The service answers any operation it doesn't support with a 400, so anything without a Dynjandi equivalent is dropped, never sent. That includes out-of-range or non-integer sizes, unsupported formats and unknown quality values.
Defaults and caveats
Accept, andformat/autois a 400, so when no format is given the original format is served.CONTRIBUTING.md. It is documented in the provider's header comment.Detection
cdn.dynjandi.devis added todata/domains.json. Custom domains aren't detected and needprovider: "dynjandi".Checks
deno check src/is clean, anddeno test -A src/passes (88 tests, 314 steps).deno fmt --checkis clean on every touched file exceptdeno.jsonc, which already lacks a final newline onmain.deno publish --dry-runpasses.e2e.test.ts: both Dynjandi steps pass against production with the demo image, a CC0 photo of the Dynjandi waterfall. Six other steps (Cloudflare ×2, IPX ×2, Next.js, Vercel) fail the same way on the base commit without this change.generatewere parsed with the service's own grammar package (@dynjandi/transform-grammar). They cover a matrix of every operation, alone and combined, at boundary values. URLs built by the Dynjandi SDK extract back to the same width, height, format, quality and crop.@unpic/corewith this provider loads at every width (640w to 1600w).CI
Deno test: everything up to the e2e step passes. The e2e step fails on the six steps above, the same ones that fail onmain(red since January) and on feat(imagor): add imagor provider #196.Format: its auto-commit step can't push to a fork branch, so it fails on every fork PR.deno fmt srcleaves every file this PR touches unchanged. The only file it would reformat issrc/providers/cloudflare.ts(one whitespace-only line, already onmain).