Skip to content

Install templates with static assets and ship connector logos - #256

Merged
tnkuehne merged 2 commits into
mainfrom
feat/template-assets
Nov 21, 2026
Merged

tnkuehne merged 2 commits into
mainfrom
feat/template-assets

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Templates installed from the catalog cannot ship static assets. The app builder rejects a Wrangler file with assets ("Projects with static assets are deployed with the Widefleet CLI"), and the control plane read template files as text, which corrupts binary files. So the connector templates have no favicon, and the app list, My connections and the catalogs cannot show their logos.

Change

Template installs deploy static assets as widefleet deploy does.

  • The control plane reads assets.directory and assets.binding from the template's wrangler.jsonc. Files in that directory stay out of the builder's sources. They become the asset manifest, with the Wrangler-compatible hash. The control plane uploads missing files to the deployment's upload session through the same path the CLI uses, then publishes with the configured binding.
  • Template files are fetched as bytes, so binary assets stay intact.
  • The CLI's limits apply: 25 MiB per file, 10,000 files and 250 MiB in total. Custom .assetsignore rules are rejected, as the CLI rejects them. Source maps inside the asset directory are rejected with a clear message; the CLI attaches them to debug metadata, which template installs do not yet do.

The app builder accepts the assets configuration.

  • It still bundles code only.
  • As the CLI does, static assets give an app a URL, even without a default export (web: true).

The GitHub, Gmail and OneDrive templates ship their logo. Each has public/favicon.svg and links it from its pages. The GitHub mark switches to a light fill in dark mode.

Tests

  • template-project.test.ts covers code and asset separation, binary bytes, deduplication and the rejected cases.
  • The template install integration test checks that the builder never receives public/, and that the artifact manifest and storage hold the favicon.
  • The builder test bundles an app with static assets and no default export, and expects web: true.
  • Ran pnpm check, all unit and integration tests, and the builder suite (RUN_BUILDER_TESTS=1).

Showing the logos follows in the next PR of this stack.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the previous asset-settings issue is fixed.

Summary

Template installs now keep binary assets intact, separate them from builder sources, and upload them before publishing. The connector templates also ship favicons.

  • Template installs upload static assets with the worker.
  • The builder accepts asset-backed apps and gives them a web URL.
  • GitHub, Gmail, and OneDrive templates each ship a favicon.

Reviews (2) · Last reviewed commit: "Reject asset settings the upload cannot ..." · Reviewed by Greptile

Template installs from the catalog now deploy static assets as
`widefleet deploy` does. The control plane reads the asset directory from
the template's wrangler.jsonc, keeps its files out of the builder's
sources, uploads them to the deployment's upload session and publishes
the manifest. Asset limits follow the CLI. Template files are fetched as
bytes, so binary assets stay intact.

The app builder accepts the assets configuration and, as the CLI does,
gives an app with static assets a URL.

The GitHub, Gmail and OneDrive templates ship their logo as
public/favicon.svg and link it from their pages.
@tnkuehne
tnkuehne added this pull request to stack #258 November 20, 2026 23:04
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs 90e3618 Nov 21 2026, 10:19 AM

@tnkuehne
tnkuehne merged commit dc7b751 into main Nov 21, 2026
16 checks passed
@tnkuehne
tnkuehne deleted the feat/template-assets branch November 21, 2026 10:30
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.

1 participant