clay/amphora

Plugin Meta Updates Need to Be Published

jonwinton opened this issue · 0 comments

Updates to the meta object of pages/layouts from plugins need to be:

  1. Controlled as to not allow overriding of core data
  2. Trigger a meta update bus event every time.

Idea: plugins get two three db methods:

  1. getMeta: can retrieve the meta object
  2. patchMeta: should be allowed to set/change certain properties (not protected properties)
  3. raw: allows for configuration of schema/tables/inserts/etc (https://knexjs.org/#Raw)

Problem: exposing the raw query potentially allows a plugin to truly mess up the DB, but a plugin can do that anyways if it just wants to connect to the DB itself. Maybe the solution is only to provide meta helpers but not raw? it'd be a shame for one clay instance to have a client for every plugin though.