Skip to content

pantoken / platforms/canvas-theme-editor/src / CdnProvider

Interface: CdnProvider

Alpha

A CDN that can serve npm package files. Providers never hardcode a package name — they only know how to shape a URL from a CdnFile.

Properties

id

id: string

Alpha

Stable identifier, e.g. "jsdelivr".


label

label: string

Alpha

Human-readable name, e.g. "jsDelivr".


supportsCombine

supportsCombine: boolean

Alpha

Whether CdnProvider.buildCombineUrl is implemented.

Methods

buildUrl()

buildUrl(file, options?): string

Alpha

Builds the URL for a single file.

Parameters

file

CdnFile

options?

CdnBuildOptions

Returns

string


buildCombineUrl()?

optional buildCombineUrl(files, options?): string

Alpha

Builds one URL that serves multiple files concatenated together. Required iff supportsCombine.

Parameters

files

CdnFile[]

options?

CdnBuildOptions

Returns

string