Replies: 1 comment 1 reply
-
|
I think this is valuable, but I'm in two minds as to whether this would be better with a new |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The plugin API currently has no way to read taxonomies.
ctx.contentcovers collection entries (get/list), but taxonomy definitions and terms — which classify that same content — are invisible to plugins:That blocks a whole family of otherwise-sandboxable plugins: SEO tooling that emits term-aware structured data, importers/exporters that need to map terms, related-content/analytics widgets grouped by category, etc. Today the only workarounds are running natively with direct DB access, or duplicating term data into plugin storage by hand.
Proposal
Treat taxonomy reads as part of the existing
content:readsurface (terms classify content; no new capability, no consent-dialog churn, no lexicon/wire-contract change) and add three read-only methods toContentAccess:All three accept an optional
locale; terms come back flat withparentId(the parent's locale-agnostic translation group) so hierarchical taxonomies can be reconstructed, plus the term'sdata(description etc.) andtranslationGroupfor i18n-aware plugins.Write access is deliberately out of scope — term writes have admin-side invariants (translation groups, pivot table semantics) that shouldn't be re-exposed casually.
Implementation notes
createContentAccess(core) on top ofTaxonomyRepository, socontent:writecontexts inherit it via the existing spread.content:readin both bridges (CloudflarePluginBridge+sandbox-workerdbridge handler) with the same return shapes, matching the existing strict-parity approach between runners.I have a working branch with this (incl. integration tests and docs) and can open a PR if this direction sounds right.
Beta Was this translation helpful? Give feedback.
All reactions