diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index d954ce9d..b4ab9d72 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -10,6 +10,7 @@ import useEntries from './lib/hooks/useEntries'; import useHasChildErrors from './lib/hooks/useHasChildErrors'; import useMediaFiles from './lib/hooks/useMediaFiles'; import useFolderSupport from './lib/hooks/useFolderSupport'; +import { currentBackend } from './backend'; export * from './backends'; export * from './interface'; @@ -20,6 +21,7 @@ export * from './widgets'; const CMS = { ...Registry, init: bootstrap, + currentBackend, }; if (typeof window !== 'undefined') { diff --git a/packages/core/src/lib/registry.ts b/packages/core/src/lib/registry.ts index b329b130..73ed45bb 100644 --- a/packages/core/src/lib/registry.ts +++ b/packages/core/src/lib/registry.ts @@ -583,8 +583,7 @@ export async function invokeEvent(event: { console.info( `[StaticCMS] Firing change event for field "${field}" for${ event.file ? ` "${event.file}" file in` : '' - } "${collection}" collection, new value:`, - data, + } "${collection}" collection`, ); const collectionHandlers = registry.eventHandlers[name][collection] ?? {}; @@ -790,7 +789,7 @@ export function getAdditionalLink(id: string): AdditionalLink | undefined { * Markdown editor shortcodes */ export function registerShortcode
(name: string, config: ShortcodeConfig
) { - if (registry.backends[name]) { + if (registry.shortcodes[name]) { console.error(`Shortcode [${name}] already registered. Please choose a different name.`); return; }