Commit Graph

29 Commits

Author SHA1 Message Date
seslly
d2114523a5 fix: passkeys behind TLS reverse proxy (#225)
* fix: passkeys behind TLS reverse proxy

Add passkeyPublicOrigin and wire it through passkey routes so origin/rpId match
the browser when dev runs behind nginx. Expose dev-only /_emdash/api/dev/passkey-url,
add admin messaging for insecure WebAuthn contexts, nginx repro under demos/simple,
and direct kysely dependency for the simple demo Node adapter bundle.

Made-with: Cursor

* docs: add passkeyPublicOrigin to configuration reference

Adds the new passkeyPublicOrigin option and reverse proxy guidance
to the public-facing configuration docs as requested in PR review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* update tests and more docs

* fix: add missing refresh-server-pat fixture and restore docs heading

---------

Co-authored-by: Joseph Eftekhari <jdeftekhari@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 07:41:07 +01:00
Filip Ilić
9d10d2791f fix(admin): use collection urlPattern for preview button fallback URL (#181)
* fix(admin): use collection urlPattern for preview button fallback URL

The preview button hardcoded fallback URLs as /${collection}/${slug},
ignoring the collection's urlPattern setting. Collections with custom
URL patterns (e.g. urlPattern: "/biljke/{slug}" on a "biljka" collection)
would open a 404 instead of the correct page.

Thread urlPattern through the manifest and use it in the ContentEditor
preview fallback.

Fixes #167

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Signed-off-by: Filip Ilic <ilic.filip@gmail.com>

* chore: add changeset for preview URL pattern fix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Signed-off-by: Filip Ilic <ilic.filip@gmail.com>

---------

Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-04 19:00:28 +00:00
Justin White
9269759674 fix: magic links missing root prefix (#133)
* Fix magic links

* Include changeset

---------

Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-04 19:47:05 +01:00
jul
66beb4da1f fix DOM XSS via unvalidated form redirects (#120)
* implement safe url validation for redirects

added validation for safe redirect urls to prevent xss attacks

* add changeset: fix dom xss in form redirects
(marked as patch version bump for @emdash-cms/plugin-forms)

---------

Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-04 15:51:36 +01:00
Matt Kane
9ebc8b1f3f docs: audit and fix documentation for release (#230)
* docs: fix critical errors in import paths, types, and API references

- Fix Cloudflare adapter imports: d1/r2 come from @emdash-cms/cloudflare, not emdash/db or emdash/astro
- Fix PortableText import path: emdash/ui, not emdash/astro
- Replace set:html with PortableText component for Portable Text content
- Fix CLI binary alias: em, not ec
- Fix media upload API: POST multipart to /api/media, not JSON to /api/media/upload
- Fix MediaValue type: src not url, provider is optional, add previewUrl
- Fix EmDashMedia to Image component (actual export name)
- Fix Cloudflare Access auth config: use access() function, not nested object
- Fix REST API methods: content/media update is PUT not PATCH, settings is POST not PUT
- Fix contributing docs: Node.js 22+, pnpm 10+, correct E2E test command
- Fix WordPress migration: remove undocumented CLI import command

* docs: fix high-priority technical errors across docs

- Fix hook names: beforeSave/afterSave, not beforeCreate/afterCreate
- Fix status values: draft/published/scheduled, not archived
- Fix field type count: 14, not 15
- Fix MCP tool count: 33, not 28
- Fix Section.previewUrl type: string, not object
- Fix getSections examples to show { items } destructuring
- Add missing CollectionSupport values: search, seo
- Update reserved field slugs to match actual code
- Add MCP server enablement note (mcp: true required)
- Clarify getStaticPaths guidance: themes must be SSR, other sites can use static
- Delete orphaned duplicate migration/plugin-porting.mdx

* docs: fix medium-priority issues across docs

- Fix broken internal links: /guides/media/ -> /guides/media-library/, /guides/seeding/ -> /themes/seed-files/
- Standardize env var to EMDASH_PREVIEW_SECRET throughout preview guide
- Fix featuredImage -> featured_image in widgets guide
- Remove Discord social link (no Discord server exists)
- Fix formatting config reference: .oxfmtrc.json, not .prettierrc
- Add audienceEnvVar to Cloudflare Access config options
- Fix content model type declarations to show actual return types

* docs: document missing plugin hooks, capabilities, and context properties

- Add 10 missing hooks to reference: cron, email (beforeSend, deliver, afterSend),
  comment (beforeCreate, moderate, afterCreate, afterModerate), page (metadata, fragments)
- Document all hook event types, handler signatures, and return values
- Add exclusive hook option to configuration tables
- Add 6 missing capabilities: network:fetch:any, read:users, email:send/provide/intercept, page:inject
- Add 6 missing context properties: ctx.site, ctx.url(), ctx.users, ctx.cron, ctx.email
- Update hooks reference tables in both plugins/hooks.mdx and reference/hooks.mdx

* Format
2026-04-04 09:17:00 +01:00
Foysal Zihak
018be7f1c3 fix(admin): use infinite scroll for content list to support large dat… (#135)
* fix(admin): use infinite scroll for content list to support large datasets

* chore: apply copilot review suggestions and add changeset
2026-04-04 09:02:57 +01:00
saram ali
e9a6f7ac3c perf(db): optimize D1 indexes to eliminate full table scans (#214)
* perf(db): optimize D1 indexes to eliminate full table scans

- Add composite indexes to ec_* tables for common query patterns
- Replace single-column indexes with (deleted_at, updated_at, id) composite
- Add (deleted_at, status) index for count queries
- Add (deleted_at, created_at, id) index for chronological ordering
- Optimize comment counting with partial indexes per status
- Rewrite countByStatus() to use parallel WHERE queries instead of GROUP BY

Fixes #131

* chore: add changeset for D1 index optimization

* style: wrap changeset description for formatting compliance
2026-04-04 08:17:56 +01:00
Matt Kane
12e0aa71bc feat(cloudflare): add logo branding to playground and preview pages (#202)
- Playground loading: replace "Em<span>Dash</span>" text with inline
  SVG icon mark + "EmDash" wordmark, add favicon
- Preview loading: add favicon
2026-04-03 21:48:13 +00:00
Matt Kane
422018aeb2 feat(admin): add proper EmDash logo branding to admin UI (#200)
Replace placeholder text branding ("— EmDash") with actual logo SVGs
from the brand assets. Adds Logo.tsx with LogoIcon (icon mark) and
LogoLockup (icon + wordmark) components.

- Sidebar: gradient icon mark replaces em dash text character
- Login, Signup, Setup: full lockup SVG with currentColor wordmark
- Welcome modal: logo icon replaces Sparkle placeholder
- Favicon: real gradient icon SVG replaces emoji
2026-04-03 22:23:02 +01:00
Matt Kane
7924d54072 Playground interstitial (#16) 2026-04-02 18:32:52 +01:00
Matt Kane
8e28cfc5d6 fix: resolve smoke test failures -- CLI JSON output, port collision, stale DBs 2026-04-02 15:30:36 +01:00
github-actions[bot]
2463da9556 ci: release 2026-04-01 15:02:06 +00:00
Matt Kane
4413226dd8 chore: fix changeset config -- ignore private packages, reduce cascade to minor 2026-04-01 15:57:41 +01:00
Matt Kane
755b501790 chore: add minor changeset for first beta release 2026-04-01 15:37:30 +01:00
Matt Kane
9db4c2cba2 fix(create-emdash): remove manual bootstrap step from CLI output 2026-04-01 15:23:54 +01:00
github-actions[bot]
144d7e488a ci: release 2026-04-01 13:28:55 +00:00
Matt Kane
0c6c66fe44 Merge pull request #7 from emdash-cms/fix/create-emdash-spinner
fix(create-emdash): fix spinner hanging during dep install
2026-04-01 14:24:28 +01:00
Matt Kane
3c319ed641 fix: redirect to setup wizard on fresh deployments when public page is first request
On a fresh CF deployment, if the first request hits a public page, the
middleware fast-path skips runtime init. Template helpers like
getSiteSettings() then query an empty database and crash with
'no such table: options'.

Add a one-time setup probe in the middleware fast-path: check if the
migrations table exists, and redirect to the setup wizard if not.
The check is cached for the worker lifetime after first success.

Also includes release workflow update to use GitHub App token and
admin branding changeset.
2026-04-01 14:14:05 +01:00
Matt Kane
2022b77341 fix(create-emdash): use async exec so spinner animates during install 2026-04-01 13:45:04 +01:00
github-actions[bot]
90e31e8e43 ci: release 2026-04-01 12:35:38 +00:00
Matt Kane
8e389d5ef8 chore: add changeset for create-emdash UX improvements 2026-04-01 13:25:43 +01:00
github-actions[bot]
be76e0781e ci: release 2026-04-01 12:07:38 +00:00
Matt Kane
841a75093c Merge pull request #3 from emdash-cms/fix/create-emdash
fix: update create-emdash for standalone templates repo
2026-04-01 13:05:11 +01:00
Matt Kane
7687d5ca6c Fix changeset config 2026-04-01 12:58:43 +01:00
Matt Kane
2dc5815f03 fix: update create-emdash for standalone templates repo 2026-04-01 12:52:56 +01:00
Matt Kane
b09bfd51ce fix: exclude virtual:emdash from optimizeDeps to fix npm installs on Cloudflare 2026-04-01 12:27:00 +01:00
Matt Kane
4bafdb9781 Add publish CI with OIDC trusted publishing and changesets 2026-04-01 12:01:32 +01:00
Matt Kane
c2120a4961 Fix repo names 2026-04-01 11:18:28 +01:00
Matt Kane
43fcb9a131 first commit 2026-04-01 10:44:22 +01:00