Commit Graph

89 Commits

Author SHA1 Message Date
Matt Kane
8fb4173036 fix: format router.tsx to pass oxfmt check 2026-04-04 16:00:27 +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
Mason Hall
036e0fc23a fix(x402): add tsdown config to build middleware entry point (#48)
* fix(x402): add tsdown config to build middleware entry point

* adds optimizeDeps.exclude and ssr.optimizeDeps.exclude for @emdash-cms/x402 in the integration's Vite config

* fix CI typecheck

---------

Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-04 09:03:41 +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
5b29819caf feat(docs): replace placeholder logos and favicon with brand assets (#224)
- Logo lockup SVGs (light/dark) replace dizzy emoji + text logos
- Favicon SVG replaces sparkle icon with gradient icon mark
2026-04-04 06:49:10 +00:00
Erez Rokah
85b3d1aacd chore: Tighten /format command trigger conditions (#201)
Use exact match and add author_association check for the /format
comment command workflow.
2026-04-03 22:02:11 +00: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
Will (liruifengv)
e4a44eca62 docs: fix repo links and update command for create project (#164)
Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-03 22:42:07 +01:00
Matt Kane
0aae9d806b docs: add changeset guidelines for contributors and agents (#198)
* docs: add changeset guidelines to contributing docs

Contributors and agents need to know when and how to add changesets.
Without one, changes to published packages won't trigger a release.

- CONTRIBUTING.md: full Changesets section with when/when-not, how to
  add, writing descriptions, examples for patch/minor/major
- AGENTS.md: concise changeset subsection using --empty for
  non-interactive use, added as step in PR flow
- PR template: changeset checkbox in checklist

* docs: note that multiple changes need separate changesets
2026-04-03 22:36:37 +01: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
Charlie Gleason
3089e3fa55 Update template display and detail on README.md (#44)
* Reposition template image links in README

* Fix formatting in README

---------

Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-03 19:28:00 +00:00
Cotton Hou
4f92c63702 fix(auth): secureCompare to reuse constantTimeEqual from @oslojs/crypto (#180) 2026-04-03 20:00:51 +01:00
Matt Kane
d3cf93f171 ci: add /format comment command for PRs (#195) 2026-04-03 19:45:21 +01:00
Matt Kane
73b5a787b8 fix: use Node 24 for release workflow to get npm OIDC support (#165)
Node 22 ships npm 10.x which doesn't support trusted publishing via
OIDC (requires npm 11.5.1+). Node 24 bundles it natively, removing the
need for the `npm install -g npm@latest` step which was failing with a
`Cannot find module 'promise-retry'` error due to npm corrupting itself
during self-upgrade.
2026-04-03 09:14:45 +01:00
Casey Grzecka
403f728222 renames the Why EmDash content page to match the slug used in the astro config (#123)
Co-authored-by: Matt Kane <mkane@cloudflare.com>
2026-04-02 21:46:15 +01:00
Matt Kane
fd8f44cd24 chore: add E2E rollup job and exempt emdashbot from PR compliance (#132)
Add a rollup job that gates on all 8 E2E shards so it can be a single
required check. Exempt emdashbot from PR template validation alongside
dependabot and renovate.
2026-04-02 20:23:10 +00:00
Matt Kane
b82a5fe7d6 fix: use GitHub App token for release workflow (#130)
GITHUB_TOKEN can't trigger CI on PRs it creates, so the changesets
release PR could never pass required checks. Use a GitHub App token
instead, which triggers workflows normally.

Also pins all actions to commit SHAs and uses frozen lockfile.
2026-04-02 21:10:51 +01:00
Matt Kane
ed5df8e453 Add PR template, issue templates, and contribution policy (#126)
* chore: add PR template, issue templates, and contribution policy

Drive-by feature PRs are becoming a problem. This adds guardrails:

- PR template with type selection, checklist, and AI disclosure
- Bug report issue template (structured YAML form)
- Issue config that redirects features to Discussions and disables blank issues
- PR compliance workflow that enforces template completion and requires
  a Discussion link for feature PRs
- Contribution policy in CONTRIBUTING.md (acceptance tiers, AI PR rules)
- Agent-facing rules in AGENTS.md (follow the template, no bulk changes)

* fornat
2026-04-02 21:02:10 +01:00
Matt Kane
953815969a fix(tests): use global hookTimeout for integration test beforeAll hooks (#125)
* fix(tests): remove explicit beforeAll timeouts that override global hookTimeout

Integration tests passed 60s timeouts to beforeAll, overriding the
120s hookTimeout in vitest.smoke.config.ts. On CI the dev server
startup can consume the full 60s, leaving no time for setup + seeding.

Also bumps createTestServer's default waitForServer timeout from 60s
to 90s, leaving 30s margin within the 120s hook budget.

* fix(tests): don't remove shared node_modules symlink during cleanup

Multiple integration test suites run concurrently and share the
fixture/node_modules symlink. When the suite that created it finishes
first, its cleanup deletes the symlink, causing other suites to fail
with MODULE_NOT_FOUND when their server process tries to resolve astro.

The symlink is gitignored so it's safe to leave in place.
2026-04-02 20:33:07 +01:00
Matt Kane
7924d54072 Playground interstitial (#16) 2026-04-02 18:32:52 +01:00
Matt Kane
61b73aeb01 fix: add explicit permissions to CLA workflow, drop PAT (#121) 2026-04-02 18:07:59 +01:00
Matt Kane
f2c10fc029 chore: add CLA Assistant workflow (#114) 2026-04-02 17:55:11 +01:00
Matt Kane
ecdfa08199 Merge pull request #105 from emdash-cms/fix/smoke-test-failures
fix: resolve smoke test failures -- CLI JSON output, port collision, stale DBs
2026-04-02 16:44:44 +01:00
Matt Kane
25a327baf2 fix: set hookTimeout for smoke tests to prevent beforeAll timeouts 2026-04-02 16:30:43 +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
Matt ‘TK’ Taylor
01af46fb83 Merge pull request #42 from emdash-cms/fix/readme-dynamic-workers-note
Update README with Dynamic Worker Loaders note
2026-04-01 23:22:23 +01:00
Matt ‘TK’ Taylor
a69d529d08 Update README.md
Co-authored-by: Fred K. Schott <622227+FredKSchott@users.noreply.github.com>
2026-04-01 23:22:12 +01:00
Matt ‘TK’ Taylor
a9d3b9feae Update README with Dynamic Worker Loaders note
Added important note about Dynamic Worker Loaders dependency for sandboxed plugins.
2026-04-01 23:10:53 +01:00
Matt Kane
b4c8248f07 Merge pull request #24 from yanthomasdev/fix-shell-globs
Fix globs in package.json scripts
2026-04-01 20:04:24 +01:00
Yan
e868a60f06 Fix globs in package.json scripts 2026-04-01 15:29:23 -03:00
Matt Kane
0363bf3a4e Merge pull request #18 from delucis/patch-1
Fix broken README links
2026-04-01 17:34:50 +01:00
Matt Kane
273d934020 Merge pull request #17 from yanthomasdev/patch-1
Fix documentation link syntax
2026-04-01 17:34:11 +01:00
Chris Swithinbank
e957663308 Fix broken README links 2026-04-01 18:20:55 +02:00
Yan
06bb3cdb0e Fix documentation link syntax 2026-04-01 13:19:06 -03:00
Matt Kane
27c2c48937 Add license 2026-04-01 16:33:52 +01:00
Matt Kane
b0110e803a Merge pull request #13 from emdash-cms/changeset-release/main
ci: release
2026-04-01 16:17:43 +01:00
Matt Kane
53329df155 Format 2026-04-01 16:16:45 +01:00
Matt Kane
78019103e0 Fix wrangler.jsonc 2026-04-01 16:12:02 +01:00
Matt Kane
de70c72aa8 fix: set all plugin versions to 0.1.0 (not 1.0.0)
Changesets treats minor on 0.0.x as a major bump per semver convention.
All packages should be 0.1.0 for the first beta release.
2026-04-01 16:10:06 +01:00
github-actions[bot]
2463da9556 ci: release 2026-04-01 15:02:06 +00:00
Matt Kane
dad55bb80a Merge pull request #15 from emdash-cms/fix/changeset-config
fix: changeset config -- ignore private packages, reduce cascade to minor
2026-04-01 15:59:49 +01: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
71f390c4f1 Merge pull request #14 from emdash-cms/fix/lint-and-test-cleanup
fix: resolve all lint warnings and fix failing playground toolbar test
2026-04-01 15:42:29 +01:00
Matt Kane
755b501790 chore: add minor changeset for first beta release 2026-04-01 15:37:30 +01:00
Matt Kane
c7d2401b8b fix: resolve all lint warnings and fix failing playground toolbar test
- Fix playground-toolbar test: URL changed to github.com but test still expected docs.emdashcms.com
- create-emdash: extract selectTemplate() to eliminate unsafe/unnecessary type assertions
- create-emdash: use type-safe Object.keys filter instead of bare cast
- cloudflare/cache: use Reflect.get with typeof guard instead of double type assertion
- x402/enforcer: replace unsafe request cast with Reflect.get type guards for CF bot management
- x402/middleware: suppress unavoidable virtual module any-cast with eslint comment
2026-04-01 15:35:06 +01:00
Matt Kane
15b4b3aae2 Merge pull request #12 from emdash-cms/fix/remove-bootstrap-step
fix(create-emdash): remove manual bootstrap step from CLI output
2026-04-01 15:26:08 +01:00
Matt Kane
ca398cc3f8 format 2026-04-01 15:25:41 +01:00
Matt Kane
9db4c2cba2 fix(create-emdash): remove manual bootstrap step from CLI output 2026-04-01 15:23:54 +01:00