Skip to content

feat(core): Add keycdn provider support - #49

Open
stefashkaa wants to merge 1 commit into
mainfrom
feat/add-keycdn-provider
Open

feat(core): Add keycdn provider support#49
stefashkaa wants to merge 1 commit into
mainfrom
feat/add-keycdn-provider

Conversation

@stefashkaa

@stefashkaa stefashkaa commented Sep 14, 2026

Copy link
Copy Markdown
Member

Description

  • What does this PR do?
    • Adds and exports a built-in KeyCDN provider through the core registry and provider subpath
    • Supports resizing, fit, position, background, quality, and JPEG, PNG, and WebP output. Preserves existing URL parameters and fragments, normalizes modifiers, and rejects unsupported formats
    • Adds KeyCDN setup documentation, a provider icon, and unit tests covering the shared image APIs
    • Derives website provider counts from the built-in registry and replaces fixed totals with durable wording in READMEs, package descriptions, and existing changelog text
    • Removes the explicit low fetch priority from provider gallery images
  • Why is this change needed?
    • Applications using KeyCDN can generate responsive image URLs through the shared API without maintaining a custom provider.
    • Adding providers no longer requires manually updating totals throughout the website and package metadata.
    • Addresses Add KeyCDN image provider support #9.

Type of Change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change
  • Documentation update
  • Tests
  • Other (describe below): Provider metadata maintenance and gallery loading configuration

Testing

  • pnpm check:release

Screenshots (if applicable)

  • N/A

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Comments added for complex code
  • Documentation updated
  • No new warnings generated
  • Tests added/updated
  • All tests passing

Manual Coverage (Optional)

Run Coverage Workflow

Maintainers only (write/maintain/admin access): open the workflow, click Run workflow, and set pr_number to this PR number to post/update a coverage comment on this PR

Summary by CodeRabbit

  • New Features

    • Added built-in KeyCDN image provider support, including URL transformations, format handling, backgrounds, resizing, and responsive images.
    • Added KeyCDN provider documentation and configuration examples.
    • Provider counts across the demo now update automatically as providers change.
  • Documentation

    • Updated package descriptions, READMEs, changelogs, and provider listings to describe dozens of built-in providers rather than a fixed total.
    • Updated provider catalog references to include KeyCDN.
  • Bug Fixes

    • Removed the low-fetch-priority setting from gallery images to allow normal browser prioritization.

Copilot AI lite review requested due to automatic review settings September 14, 2026 11:40
@vercel

vercel Bot commented Sep 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
image-demo Ready Ready Preview Sep 14, 2026 11:40am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 93cbe0de-8627-40d1-894f-a64180c4c698

📥 Commits

Reviewing files that changed from the base of the PR and between d4d4d19 and 5baad8d.

⛔ Files ignored due to path filters (1)
  • demo/static/providers/keycdn.png is excluded by !**/*.png
📒 Files selected for processing (26)
  • README.md
  • demo/src/lib/Gallery.svelte
  • demo/src/lib/SiteFooter.svelte
  • demo/src/lib/home/BenefitsSection.svelte
  • demo/src/lib/home/CtaSection.svelte
  • demo/src/lib/home/HeroSection.svelte
  • demo/src/lib/home/ProvidersSection.svelte
  • demo/src/lib/providers.ts
  • demo/src/lib/server/provider-docs.ts
  • demo/src/routes/+page.svelte
  • packages/angular/CHANGELOG.md
  • packages/angular/README.md
  • packages/angular/package.json
  • packages/core/CHANGELOG.md
  • packages/core/README.md
  • packages/core/package.json
  • packages/core/src/providers/index.ts
  • packages/core/src/providers/keycdn.ts
  • packages/core/src/providers/registry.ts
  • packages/core/test/unit/providers/keycdn.test.ts
  • packages/react/CHANGELOG.md
  • packages/react/README.md
  • packages/react/package.json
  • packages/svelte/CHANGELOG.md
  • packages/svelte/README.md
  • packages/svelte/package.json
💤 Files with no reviewable changes (1)
  • demo/src/lib/Gallery.svelte

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The PR adds the KeyCDN image provider, registers it as built in, and adds tests and demo documentation. It also derives displayed provider counts from the registry and replaces fixed count wording across repository and package documentation.

Changes

KeyCDN provider implementation

Layer / File(s) Summary
Provider implementation, registration, and tests
packages/core/src/providers/keycdn.ts, packages/core/src/providers/index.ts, packages/core/src/providers/registry.ts, packages/core/test/unit/providers/keycdn.test.ts
Adds KeyCDN URL transformation, modifier mapping, format validation, public exports, built-in registration, and unit tests.

Demo provider catalog

Layer / File(s) Summary
Shared count and demo integration
demo/src/lib/providers.ts, demo/src/lib/home/*, demo/src/lib/SiteFooter.svelte, demo/src/routes/+page.svelte, demo/src/lib/Gallery.svelte, demo/src/lib/server/provider-docs.ts
Adds the registry-derived providerCount, displays it across the demo, documents KeyCDN, and removes the gallery image fetchpriority="low" attribute.

Documentation updates

Layer / File(s) Summary
Provider-count wording and catalog documentation
README.md, packages/angular/*, packages/core/README.md, packages/core/CHANGELOG.md, packages/react/*, packages/svelte/*
Replaces fixed provider counts with generalized wording and updates provider listings and release documentation.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant ImageRequest
  participant keycdnProvider
  participant getImage
  participant KeyCDNURL
  ImageRequest->>keycdnProvider: configure provider options
  keycdnProvider->>getImage: create configured image handler
  getImage->>getImage: map modifiers and validate format
  getImage->>KeyCDNURL: build transformed URL
  KeyCDNURL-->>ImageRequest: return image URL
Loading

Merge Risk: ⚪ Minimal · up to 5baad

The KeyCDN adapter intentionally requires callers to sign the final transformed URL, so the implementation is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 6 files. (19 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding KeyCDN provider support in the core package.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 6 files. (19 skipped: 19 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-keycdn-provider

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit counts providers in a row
KeyCDN shapes the URLs to go
Fixed numbers fade from every page
Tests guard each transformation stage
The catalog grows with steady cheer

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T11:43:51.874371Z 5baad8d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Adds KeyCDN provider support with image transformation capabilities (resizing, fit, position, background, quality) and multiple output formats (JPEG, PNG, WebP). Updates provider documentation, metadata maintenance, and test coverage. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Important

Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new providerCount usage imports a heavier $lib/providers module in multiple landing-page components, which can unnecessarily bloat/execute provider-directory code in client bundles.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds first-class KeyCDN Image Processing support to the core provider registry, alongside documentation/test coverage updates and website copy changes that avoid hard-coded provider totals.

Changes:

  • Added a built-in keycdn provider to @desource/image (registry + provider export) with modifier mapping and unsupported-format rejection.
  • Added unit tests for KeyCDN provider behavior (query preservation/replacement, background mapping, and format validation).
  • Updated READMEs/site copy to use durable “dozens/built-in” wording and derived provider counts (plus removed fetchpriority="low" from provider gallery thumbnails).
File summaries
File Description
README.md Updates marketing copy to remove hard-coded provider totals; adds keycdn to supported provider list.
packages/svelte/README.md Replaces fixed provider total with durable wording.
packages/svelte/package.json Updates package description to remove hard-coded provider count.
packages/svelte/CHANGELOG.md Updates changelog wording to remove hard-coded provider count.
packages/react/README.md Replaces fixed provider total with durable wording.
packages/react/package.json Updates package description to remove hard-coded provider count.
packages/react/CHANGELOG.md Updates changelog wording to remove hard-coded provider count.
packages/core/test/unit/providers/keycdn.test.ts Adds KeyCDN provider unit tests covering URL building, query preservation, and format rejection.
packages/core/src/providers/registry.ts Registers keycdn as a built-in provider and includes it in createBuiltInProviders().
packages/core/src/providers/keycdn.ts Implements KeyCDN provider query construction and modifier mapping.
packages/core/src/providers/index.ts Exports keycdnProvider and KeyCDNProviderOptions.
packages/core/README.md Updates provider list and wording to remove hard-coded provider totals; includes keycdn.
packages/core/package.json Updates core package description to remove hard-coded provider count.
packages/core/CHANGELOG.md Updates changelog wording to remove hard-coded provider count.
packages/angular/README.md Replaces fixed provider total with durable wording.
packages/angular/package.json Updates package description to remove hard-coded provider count.
packages/angular/CHANGELOG.md Updates changelog wording to remove hard-coded provider count.
demo/src/routes/+page.svelte Uses derived provider count in social meta description.
demo/src/lib/SiteFooter.svelte Uses derived provider count in footer copy.
demo/src/lib/server/provider-docs.ts Adds KeyCDN provider documentation entry (options/modifiers/notes).
demo/src/lib/providers.ts Adds keycdn display name and exports providerCount derived from the built-in registry.
demo/src/lib/home/ProvidersSection.svelte Uses derived provider count in headings/summary text.
demo/src/lib/home/HeroSection.svelte Displays derived provider count in hero stats.
demo/src/lib/home/CtaSection.svelte Displays derived provider count in CTA footer text.
demo/src/lib/home/BenefitsSection.svelte Displays derived provider count in benefits copy.
demo/src/lib/Gallery.svelte Removes explicit fetchpriority="low" from gallery images.
Review details
  • Files reviewed: 26/27 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

<script lang="ts">
import { DsPicture } from '@desource/image-svelte';
import RayField from '$lib/RayField.svelte';
import { providerCount } from '$lib/providers';
Comment thread demo/src/lib/providers.ts
icon: `/providers/${toProviderSlug(sharedIconProviders[id] ?? id)}.png`
}));

export const providerCount = BUILT_IN_PROVIDER_NAMES.length;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants