dineway 0.1.8 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +9 -0
- package/README.md +63 -17
- package/dist/activity-events-BsMaXdJa.mjs +540 -0
- package/dist/allowed-origins-DG86sH8U.mjs +68 -0
- package/dist/api/route-utils.d.mts +41 -0
- package/dist/api/route-utils.mjs +26 -0
- package/dist/api/schemas/index.d.mts +3 -0
- package/dist/api/schemas/index.mjs +6 -0
- package/dist/api/schemas/setup.d.mts +42 -0
- package/dist/api/schemas/setup.mjs +39 -0
- package/dist/api-Cmy8Rjk5.mjs +2704 -0
- package/dist/api-tokens-Bu3ez1MO.mjs +153 -0
- package/dist/api-tokens-DzloJxuh.mjs +3 -0
- package/dist/{apply-iVSqz2qs.mjs → apply-Co5imxxT.mjs} +15 -689
- package/dist/astro/index.d.mts +10 -6
- package/dist/astro/index.mjs +86 -11
- package/dist/astro/middleware/auth.d.mts +10 -7
- package/dist/astro/middleware/auth.mjs +19 -104
- package/dist/astro/middleware/redirect.mjs +24 -14
- package/dist/astro/middleware/request-context.mjs +9 -6
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +86 -145
- package/dist/astro/routes/PluginRegistry.d.mts +14 -0
- package/dist/astro/routes/PluginRegistry.mjs +24 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.d.mts +14 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +65 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.d.mts +14 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +65 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.d.mts +10 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +33 -0
- package/dist/astro/routes/api/admin/api-tokens/index.d.mts +16 -0
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +59 -0
- package/dist/astro/routes/api/admin/briefing.d.mts +7 -0
- package/dist/astro/routes/api/admin/briefing.mjs +71 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +74 -0
- package/dist/astro/routes/api/admin/bylines/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/bylines/index.mjs +61 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts +7 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +80 -0
- package/dist/astro/routes/api/admin/comments/_id_.d.mts +14 -0
- package/dist/astro/routes/api/admin/comments/_id_.mjs +46 -0
- package/dist/astro/routes/api/admin/comments/bulk.d.mts +7 -0
- package/dist/astro/routes/api/admin/comments/bulk.mjs +36 -0
- package/dist/astro/routes/api/admin/comments/counts.d.mts +7 -0
- package/dist/astro/routes/api/admin/comments/counts.mjs +24 -0
- package/dist/astro/routes/api/admin/comments/index.d.mts +10 -0
- package/dist/astro/routes/api/admin/comments/index.mjs +40 -0
- package/dist/astro/routes/api/admin/context/_id_/history.d.mts +7 -0
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +45 -0
- package/dist/astro/routes/api/admin/context/_id_/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +45 -0
- package/dist/astro/routes/api/admin/context/_id_/review.d.mts +7 -0
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +60 -0
- package/dist/astro/routes/api/admin/context/_id_/supersede.d.mts +7 -0
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +63 -0
- package/dist/astro/routes/api/admin/context/diff.d.mts +7 -0
- package/dist/astro/routes/api/admin/context/diff.mjs +49 -0
- package/dist/astro/routes/api/admin/context/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/context/index.mjs +71 -0
- package/dist/astro/routes/api/admin/context/stale.d.mts +7 -0
- package/dist/astro/routes/api/admin/context/stale.mjs +49 -0
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +51 -0
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.d.mts +7 -0
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +67 -0
- package/dist/astro/routes/api/admin/hitl-requests/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +55 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.d.mts +7 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +98 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +33 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.d.mts +18 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +79 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.d.mts +14 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +58 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +89 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +89 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +54 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +98 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +131 -0
- package/dist/astro/routes/api/admin/plugins/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/index.mjs +52 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +36 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +54 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +128 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +61 -0
- package/dist/astro/routes/api/admin/plugins/updates.d.mts +7 -0
- package/dist/astro/routes/api/admin/plugins/updates.mjs +52 -0
- package/dist/astro/routes/api/admin/review-requests/_id_/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +26 -0
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.d.mts +7 -0
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +97 -0
- package/dist/astro/routes/api/admin/review-requests/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/review-requests/index.mjs +31 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +54 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.d.mts +7 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +36 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +70 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.d.mts +7 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +38 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.d.mts +7 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +29 -0
- package/dist/astro/routes/api/admin/users/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +104 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.d.mts +7 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +43 -0
- package/dist/astro/routes/api/admin/users/index.d.mts +7 -0
- package/dist/astro/routes/api/admin/users/index.mjs +54 -0
- package/dist/astro/routes/api/auth/dev-bypass.d.mts +8 -0
- package/dist/astro/routes/api/auth/dev-bypass.mjs +81 -0
- package/dist/astro/routes/api/auth/invite/accept.d.mts +7 -0
- package/dist/astro/routes/api/auth/invite/accept.mjs +31 -0
- package/dist/astro/routes/api/auth/invite/complete.d.mts +7 -0
- package/dist/astro/routes/api/auth/invite/complete.mjs +54 -0
- package/dist/astro/routes/api/auth/invite/index.d.mts +7 -0
- package/dist/astro/routes/api/auth/invite/index.mjs +51 -0
- package/dist/astro/routes/api/auth/invite/register-options.d.mts +7 -0
- package/dist/astro/routes/api/auth/invite/register-options.mjs +44 -0
- package/dist/astro/routes/api/auth/logout.d.mts +7 -0
- package/dist/astro/routes/api/auth/logout.mjs +24 -0
- package/dist/astro/routes/api/auth/magic-link/send.d.mts +7 -0
- package/dist/astro/routes/api/auth/magic-link/send.mjs +48 -0
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts +7 -0
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +32 -0
- package/dist/astro/routes/api/auth/me.d.mts +13 -0
- package/dist/astro/routes/api/auth/me.mjs +41 -0
- package/dist/astro/routes/api/auth/mode.d.mts +7 -0
- package/dist/astro/routes/api/auth/mode.mjs +28 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts +7 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +114 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.d.mts +7 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +58 -0
- package/dist/astro/routes/api/auth/passkey/_id_.d.mts +14 -0
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +62 -0
- package/dist/astro/routes/api/auth/passkey/index.d.mts +7 -0
- package/dist/astro/routes/api/auth/passkey/index.mjs +25 -0
- package/dist/astro/routes/api/auth/passkey/options.d.mts +7 -0
- package/dist/astro/routes/api/auth/passkey/options.mjs +46 -0
- package/dist/astro/routes/api/auth/passkey/register/options.d.mts +7 -0
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +44 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.d.mts +7 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +59 -0
- package/dist/astro/routes/api/auth/passkey/verify.d.mts +7 -0
- package/dist/astro/routes/api/auth/passkey/verify.mjs +47 -0
- package/dist/astro/routes/api/auth/signup/complete.d.mts +7 -0
- package/dist/astro/routes/api/auth/signup/complete.mjs +55 -0
- package/dist/astro/routes/api/auth/signup/request.d.mts +7 -0
- package/dist/astro/routes/api/auth/signup/request.mjs +44 -0
- package/dist/astro/routes/api/auth/signup/verify.d.mts +7 -0
- package/dist/astro/routes/api/auth/signup/verify.mjs +32 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +14 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +193 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +17 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +36 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +39 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +31 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +78 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +92 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +36 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +19 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +75 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts +14 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +85 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +40 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +36 -0
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts +9 -0
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +114 -0
- package/dist/astro/routes/api/content/_collection_/index.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs +74 -0
- package/dist/astro/routes/api/content/_collection_/trash.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/trash.mjs +23 -0
- package/dist/astro/routes/api/dashboard.d.mts +7 -0
- package/dist/astro/routes/api/dashboard.mjs +26 -0
- package/dist/astro/routes/api/dev/emails.d.mts +8 -0
- package/dist/astro/routes/api/dev/emails.mjs +17 -0
- package/dist/astro/routes/api/health.d.mts +7 -0
- package/dist/astro/routes/api/health.mjs +34 -0
- package/dist/astro/routes/api/import/probe.d.mts +17 -0
- package/dist/astro/routes/api/import/probe.mjs +33 -0
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts +87 -0
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +305 -0
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +37 -0
- package/dist/astro/routes/api/import/wordpress/execute.mjs +197 -0
- package/dist/astro/routes/api/import/wordpress/media.d.mts +35 -0
- package/dist/astro/routes/api/import/wordpress/media.mjs +222 -0
- package/dist/astro/routes/api/import/wordpress/prepare.d.mts +19 -0
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +155 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +21 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +289 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +15 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +69 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.d.mts +7 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +28 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +19 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +268 -0
- package/dist/astro/routes/api/manifest.d.mts +7 -0
- package/dist/astro/routes/api/manifest.mjs +50 -0
- package/dist/astro/routes/api/mcp.d.mts +15 -0
- package/dist/astro/routes/api/mcp.mjs +2700 -0
- package/dist/astro/routes/api/media/_id_/confirm.d.mts +10 -0
- package/dist/astro/routes/api/media/_id_/confirm.mjs +59 -0
- package/dist/astro/routes/api/media/_id_.d.mts +22 -0
- package/dist/astro/routes/api/media/_id_.mjs +81 -0
- package/dist/astro/routes/api/media/file/_...key_.d.mts +7 -0
- package/dist/astro/routes/api/media/file/_...key_.mjs +49 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.d.mts +14 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +49 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.d.mts +14 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +72 -0
- package/dist/astro/routes/api/media/providers/index.d.mts +10 -0
- package/dist/astro/routes/api/media/providers/index.mjs +18 -0
- package/dist/astro/routes/api/media/upload-url.d.mts +10 -0
- package/dist/astro/routes/api/media/upload-url.mjs +82 -0
- package/dist/astro/routes/api/media.d.mts +16 -0
- package/dist/astro/routes/api/media.mjs +137 -0
- package/dist/astro/routes/api/menus/_name_/items.d.mts +9 -0
- package/{src/astro/routes/api/menus/[name]/items.ts → dist/astro/routes/api/menus/_name_/items.mjs} +63 -105
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts +7 -0
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +77 -0
- package/dist/astro/routes/api/menus/_name_.d.mts +9 -0
- package/dist/astro/routes/api/menus/_name_.mjs +123 -0
- package/dist/astro/routes/api/menus/index.d.mts +8 -0
- package/dist/astro/routes/api/menus/index.mjs +84 -0
- package/dist/astro/routes/api/oauth/authorize.d.mts +8 -0
- package/dist/astro/routes/api/oauth/authorize.mjs +265 -0
- package/dist/astro/routes/api/oauth/device/authorize.d.mts +7 -0
- package/dist/astro/routes/api/oauth/device/authorize.mjs +30 -0
- package/dist/astro/routes/api/oauth/device/code.d.mts +7 -0
- package/dist/astro/routes/api/oauth/device/code.mjs +34 -0
- package/dist/astro/routes/api/oauth/device/token.d.mts +7 -0
- package/dist/astro/routes/api/oauth/device/token.mjs +45 -0
- package/dist/astro/routes/api/oauth/register.d.mts +8 -0
- package/dist/astro/routes/api/oauth/register.mjs +115 -0
- package/dist/astro/routes/api/oauth/token/refresh.d.mts +7 -0
- package/dist/astro/routes/api/oauth/token/refresh.mjs +28 -0
- package/dist/astro/routes/api/oauth/token/revoke.d.mts +7 -0
- package/dist/astro/routes/api/oauth/token/revoke.mjs +25 -0
- package/dist/astro/routes/api/oauth/token.d.mts +8 -0
- package/dist/astro/routes/api/oauth/token.mjs +138 -0
- package/dist/astro/routes/api/openapi.json.d.mts +7 -0
- package/dist/astro/routes/api/openapi.json.mjs +2638 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts +11 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +77 -0
- package/dist/astro/routes/api/redirects/404s/index.d.mts +9 -0
- package/dist/astro/routes/api/redirects/404s/index.mjs +62 -0
- package/dist/astro/routes/api/redirects/404s/summary.d.mts +7 -0
- package/dist/astro/routes/api/redirects/404s/summary.mjs +34 -0
- package/dist/astro/routes/api/redirects/_id_.d.mts +9 -0
- package/dist/astro/routes/api/redirects/_id_.mjs +152 -0
- package/dist/astro/routes/api/redirects/index.d.mts +8 -0
- package/dist/astro/routes/api/redirects/index.mjs +97 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.d.mts +7 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +16 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.d.mts +7 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +23 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts +9 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +98 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +80 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.d.mts +7 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +67 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +97 -0
- package/dist/astro/routes/api/schema/collections/index.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/index.mjs +77 -0
- package/dist/astro/routes/api/schema/index.d.mts +7 -0
- package/dist/astro/routes/api/schema/index.mjs +79 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.d.mts +7 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +58 -0
- package/dist/astro/routes/api/schema/orphans/index.d.mts +7 -0
- package/dist/astro/routes/api/schema/orphans/index.mjs +53 -0
- package/dist/astro/routes/api/search/enable.d.mts +15 -0
- package/dist/astro/routes/api/search/enable.mjs +55 -0
- package/dist/astro/routes/api/search/index.d.mts +16 -0
- package/dist/astro/routes/api/search/index.mjs +52 -0
- package/dist/astro/routes/api/search/rebuild.d.mts +13 -0
- package/dist/astro/routes/api/search/rebuild.mjs +48 -0
- package/dist/astro/routes/api/search/stats.d.mts +10 -0
- package/dist/astro/routes/api/search/stats.mjs +28 -0
- package/dist/astro/routes/api/search/suggest.d.mts +15 -0
- package/dist/astro/routes/api/search/suggest.mjs +43 -0
- package/dist/astro/routes/api/sections/_slug_.d.mts +9 -0
- package/dist/astro/routes/api/sections/_slug_.mjs +156 -0
- package/dist/astro/routes/api/sections/index.d.mts +8 -0
- package/dist/astro/routes/api/sections/index.mjs +99 -0
- package/dist/astro/routes/api/settings/email.d.mts +17 -0
- package/dist/astro/routes/api/settings/email.mjs +102 -0
- package/dist/astro/routes/api/settings.d.mts +20 -0
- package/dist/astro/routes/api/settings.mjs +101 -0
- package/dist/astro/routes/api/setup/admin-verify.d.mts +7 -0
- package/dist/astro/routes/api/setup/admin-verify.mjs +67 -0
- package/dist/astro/routes/api/setup/admin.d.mts +7 -0
- package/dist/astro/routes/api/setup/admin.mjs +68 -0
- package/dist/astro/routes/api/setup/dev-bypass.d.mts +8 -0
- package/dist/astro/routes/api/setup/dev-bypass.mjs +137 -0
- package/dist/astro/routes/api/setup/dev-reset.d.mts +7 -0
- package/dist/astro/routes/api/setup/dev-reset.mjs +22 -0
- package/dist/astro/routes/api/setup/index.d.mts +7 -0
- package/dist/astro/routes/api/setup/index.mjs +93 -0
- package/dist/astro/routes/api/setup/status.d.mts +7 -0
- package/dist/astro/routes/api/setup/status.mjs +57 -0
- package/dist/astro/routes/api/snapshot.d.mts +7 -0
- package/dist/astro/routes/api/snapshot.mjs +227 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts +18 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +189 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts +14 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +113 -0
- package/dist/astro/routes/api/taxonomies/index.d.mts +14 -0
- package/dist/astro/routes/api/taxonomies/index.mjs +103 -0
- package/dist/astro/routes/api/themes/preview.d.mts +7 -0
- package/dist/astro/routes/api/themes/preview.mjs +47 -0
- package/dist/astro/routes/api/typegen.d.mts +17 -0
- package/dist/astro/routes/api/typegen.mjs +75 -0
- package/dist/astro/routes/api/well-known/auth.d.mts +7 -0
- package/dist/astro/routes/api/well-known/auth.mjs +42 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.d.mts +7 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +33 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.d.mts +7 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +21 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts +7 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +88 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts +8 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +158 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts +7 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +104 -0
- package/dist/astro/routes/api/widget-areas/_name_.d.mts +8 -0
- package/dist/astro/routes/api/widget-areas/_name_.mjs +99 -0
- package/dist/astro/routes/api/widget-areas/index.d.mts +8 -0
- package/dist/astro/routes/api/widget-areas/index.mjs +108 -0
- package/dist/astro/routes/api/widget-components.d.mts +7 -0
- package/dist/astro/routes/api/widget-components.mjs +15 -0
- package/dist/astro/routes/robots.txt.d.mts +7 -0
- package/dist/astro/routes/robots.txt.mjs +60 -0
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts +7 -0
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +70 -0
- package/dist/astro/routes/sitemap.xml.d.mts +7 -0
- package/dist/astro/routes/sitemap.xml.mjs +63 -0
- package/dist/astro/types.d.mts +41 -9
- package/dist/auth/providers/github-admin.d.mts +9 -0
- package/dist/auth/providers/github-admin.mjs +27 -0
- package/dist/auth/providers/github.d.mts +12 -0
- package/dist/auth/providers/github.mjs +17 -0
- package/dist/auth/providers/google-admin.d.mts +9 -0
- package/dist/auth/providers/google-admin.mjs +43 -0
- package/dist/auth/providers/google.d.mts +12 -0
- package/dist/auth/providers/google.mjs +17 -0
- package/dist/auth-control-guard-DKUe_1oa.mjs +13 -0
- package/dist/authorize-BBj8C6Y8.mjs +36 -0
- package/dist/briefing-BrXCuMEE.mjs +1294 -0
- package/dist/briefing-ClWw4mc9.mjs +29 -0
- package/dist/{byline-OhH2dlRu.mjs → byline-naZxOPSa.mjs} +3 -3
- package/dist/{bylines-BGpD9_hy.mjs → bylines-BcOPh6Ej.mjs} +20 -53
- package/dist/bylines-HfUKum_j.d.mts +2023 -0
- package/dist/{cache-BdSY-gQN.mjs → cache-DEbQ13c9.mjs} +21 -11
- package/dist/challenge-store-DHMgBGOq.mjs +48 -0
- package/dist/cli/index.mjs +142 -22
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +3 -3
- package/dist/comment-DFO-gWDH.mjs +246 -0
- package/dist/comments-Gy3zLBaP.mjs +186 -0
- package/dist/components-DND2rd3D.mjs +107 -0
- package/dist/{content-DWi4d0rT.mjs → content-CyLkb-qH.mjs} +33 -44
- package/dist/context-bE5Kyvcj.mjs +184 -0
- package/dist/context-nxMyOe3p.mjs +849 -0
- package/dist/context-route-helpers-D-6uCQ0S.mjs +45 -0
- package/dist/context-types-C-LwdAxx.mjs +23 -0
- package/dist/cron-DGzVTtJp.mjs +263 -0
- package/dist/dashboard-DqnYU8EU.mjs +120 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/libsql.mjs +3 -3
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -2
- package/dist/device-flow-7AhWNwCK.mjs +487 -0
- package/dist/email-console-CgLVZbcn.mjs +36 -0
- package/dist/entity-aliases-C0v-yNET.mjs +51 -0
- package/dist/error-DEGjx2Xw.mjs +435 -0
- package/dist/escape-mNZr4t2A.mjs +8 -0
- package/dist/experimental-workflows-DldxJlqV.mjs +38 -0
- package/dist/fts-manager-B1pTNEG_.mjs +297 -0
- package/dist/hash-CDX7M0ze.mjs +32 -0
- package/dist/hitl-requests-Bx3Bkk9l.mjs +118 -0
- package/dist/hitl-route-helpers-DMmJRS7B.mjs +96 -0
- package/dist/import-DD3f2jkc.mjs +243 -0
- package/dist/import-DVZcYlDp.mjs +1323 -0
- package/dist/index-CkljPf5F.d.mts +227 -0
- package/dist/index.d.mts +15 -11
- package/dist/index.mjs +60 -22
- package/dist/{loader-sMG4TZ-u.mjs → loader-PZnPxFLc.mjs} +42 -5
- package/dist/{manifest-schema-D1MSVnoI.mjs → manifest-schema-DYoCQ5np.mjs} +22 -10
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -1
- package/dist/media/local-runtime.d.mts +11 -7
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/{media-DMTr80Gv.mjs → media-_7Fxdu45.mjs} +1 -1
- package/dist/menus-BacxVCCo.mjs +312 -0
- package/dist/menus-CrzHokKj.mjs +3502 -0
- package/dist/normalize-C49G_o1k.mjs +126 -0
- package/dist/oauth-authorization-C1qiw4hd.mjs +283 -0
- package/dist/oauth-clients-CvWatf5p.mjs +298 -0
- package/dist/oauth-state-store-hSdzxsEe.mjs +48 -0
- package/dist/oauth-user-lookup-B4OcmsLV.mjs +25 -0
- package/dist/options-z8VVg1Ll.mjs +114 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/parse-BeQXIt1U.mjs +88 -0
- package/dist/passkey-config-Daqs5fjq.mjs +42 -0
- package/dist/{patterns-CrCYkMBb.mjs → patterns-K0DLqWir.mjs} +53 -1
- package/dist/{placeholder-Cp8g5Emj.mjs → placeholder-C2P5fKa4.mjs} +1 -126
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -5
- package/dist/plugins/adapt-sandbox-entry.mjs +4 -4
- package/dist/preview-C_4DyVox.mjs +788 -0
- package/dist/public-url-BB_umF5G.mjs +71 -0
- package/dist/{query-kDmwCsHh.mjs → query-RiobVwB5.mjs} +93 -19
- package/dist/rate-limit-CbJoj_fT.mjs +112 -0
- package/dist/{redirect-DnEWAkVg.mjs → redirect-CGl64yOX.mjs} +9 -5
- package/dist/redirect-ClSmMOtC.mjs +16 -0
- package/dist/redirects-B69T59hK.mjs +499 -0
- package/dist/redirects-CqaxraTO.mjs +1070 -0
- package/dist/{registry-C0zjeB9P.mjs → registry-C-_hxLqa.mjs} +26 -294
- package/dist/request-meta-Bd0mQfiS.mjs +130 -0
- package/dist/review-requests-C2DIHwlJ.mjs +148 -0
- package/dist/review-requests-DIyjw-K_.mjs +79 -0
- package/dist/{runner-CFI6B6J2.d.mts → runner-9eIQXuc2.d.mts} +1 -1
- package/dist/{index-yvc6E_17.d.mts → runtime-C4-7y7xK.d.mts} +1539 -2007
- package/dist/runtime.d.mts +10 -6
- package/dist/runtime.mjs +3 -3
- package/dist/schema-BNpI53of.mjs +40 -0
- package/dist/search-DM6CVti3.mjs +337 -0
- package/dist/secrets-dI8zzTV7.mjs +160 -0
- package/dist/sections-DZFyAQXd.mjs +338 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +18 -13
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo-BBgTCOYU.mjs +85 -0
- package/dist/seo-CUQctrog.mjs +129 -0
- package/dist/service-CSfcQguB.mjs +194 -0
- package/dist/settings-4XnpVMOS.mjs +223 -0
- package/dist/settings-Bw93cLfe.mjs +50 -0
- package/dist/setup-complete-DidsDQ1e.mjs +21 -0
- package/dist/setup-nonce-pml1PMKo.mjs +17 -0
- package/dist/sidecar-client-vzwV98K4.mjs +66 -0
- package/dist/site-activity-B8FjLIVh.mjs +104 -0
- package/dist/site-context-Bpu_Paur.mjs +4122 -0
- package/dist/site-url-CYIcO0Tj.mjs +12 -0
- package/dist/slugify-PDTDtMXp.mjs +30 -0
- package/dist/ssrf-CmM76lLV.mjs +248 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +2 -2
- package/dist/{taxonomies-1s5PaS_8.mjs → taxonomies-BvBgfzn3.mjs} +11 -7
- package/dist/taxonomies-CpqGcIJD.mjs +355 -0
- package/dist/taxonomy-D5cbhc8u.mjs +165 -0
- package/dist/{tokens-CJz9ubV6.mjs → tokens-DLTo4dO2.mjs} +1 -1
- package/dist/{transport-DB5eDN4x.mjs → transport-C9e_h-BF.mjs} +5 -4
- package/dist/trusted-proxy-Bi0Cuk5n.mjs +30 -0
- package/dist/{types-BawVha09.mjs → types-Bs6lTBBW.mjs} +1 -1
- package/dist/types-C982qI5I.d.mts +344 -0
- package/dist/types-D4XVOt01.d.mts +165 -0
- package/dist/{types-Cj0KMIZV.d.mts → types-DgfUZqcd.d.mts} +54 -16
- package/dist/{types-BuMDPy5C.d.mts → types-IPACEM14.d.mts} +6 -0
- package/dist/user-CcXq-zoL.mjs +154 -0
- package/dist/utils-D2in-zwy.mjs +285 -0
- package/dist/{validate-BZ5wnLLp.mjs → validate-BJgA6TW_.mjs} +1 -1
- package/dist/{validate-IPf8n4Fj.d.mts → validate-JCZihRIa.d.mts} +3 -3
- package/dist/version-DH53KCQd.mjs +6 -0
- package/dist/widgets-B7Q_7bxN.mjs +104 -0
- package/dist/wordpress-slugs-BevajWrC.mjs +14 -0
- package/dist/zod-generator-DBVP8D0P.mjs +132 -0
- package/locals.d.ts +1 -6
- package/package.json +96 -41
- package/src/components/DinewayHead.astro +8 -4
- package/src/components/DinewayImage.astro +7 -5
- package/src/components/DinewayMedia.astro +9 -3
- package/src/components/Gallery.astro +5 -3
- package/src/components/Image.astro +5 -1
- package/src/components/InlinePortableTextEditor.tsx +68 -19
- package/dist/error-BmL6QipT.mjs +0 -30
- package/dist/search-Hlm6g8Td.mjs +0 -11200
- package/dist/version-DxxaFHZ_.mjs +0 -6
- package/src/astro/routes/PluginRegistry.tsx +0 -21
- package/src/astro/routes/api/admin/allowed-domains/[domain].ts +0 -112
- package/src/astro/routes/api/admin/allowed-domains/index.ts +0 -108
- package/src/astro/routes/api/admin/api-tokens/[id].ts +0 -44
- package/src/astro/routes/api/admin/api-tokens/index.ts +0 -90
- package/src/astro/routes/api/admin/briefing.ts +0 -76
- package/src/astro/routes/api/admin/bylines/[id]/index.ts +0 -90
- package/src/astro/routes/api/admin/bylines/index.ts +0 -74
- package/src/astro/routes/api/admin/comments/[id]/status.ts +0 -120
- package/src/astro/routes/api/admin/comments/[id].ts +0 -64
- package/src/astro/routes/api/admin/comments/bulk.ts +0 -42
- package/src/astro/routes/api/admin/comments/counts.ts +0 -30
- package/src/astro/routes/api/admin/comments/index.ts +0 -46
- package/src/astro/routes/api/admin/context/[id]/history.ts +0 -35
- package/src/astro/routes/api/admin/context/[id]/index.ts +0 -35
- package/src/astro/routes/api/admin/context/[id]/review.ts +0 -57
- package/src/astro/routes/api/admin/context/[id]/supersede.ts +0 -58
- package/src/astro/routes/api/admin/context/diff.ts +0 -35
- package/src/astro/routes/api/admin/context/index.ts +0 -69
- package/src/astro/routes/api/admin/context/stale.ts +0 -35
- package/src/astro/routes/api/admin/hitl-requests/[id]/index.ts +0 -38
- package/src/astro/routes/api/admin/hitl-requests/[id]/resolve.ts +0 -54
- package/src/astro/routes/api/admin/hitl-requests/index.ts +0 -38
- package/src/astro/routes/api/admin/hooks/exclusive/[hookName].ts +0 -132
- package/src/astro/routes/api/admin/hooks/exclusive/index.ts +0 -51
- package/src/astro/routes/api/admin/oauth-clients/[id].ts +0 -137
- package/src/astro/routes/api/admin/oauth-clients/index.ts +0 -95
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +0 -91
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +0 -91
- package/src/astro/routes/api/admin/plugins/[id]/index.ts +0 -38
- package/src/astro/routes/api/admin/plugins/[id]/uninstall.ts +0 -98
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +0 -154
- package/src/astro/routes/api/admin/plugins/index.ts +0 -32
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/icon.ts +0 -62
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/index.ts +0 -33
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +0 -135
- package/src/astro/routes/api/admin/plugins/marketplace/index.ts +0 -38
- package/src/astro/routes/api/admin/plugins/updates.ts +0 -28
- package/src/astro/routes/api/admin/review-requests/[id]/index.ts +0 -35
- package/src/astro/routes/api/admin/review-requests/[id]/resolve.ts +0 -52
- package/src/astro/routes/api/admin/review-requests/index.ts +0 -35
- package/src/astro/routes/api/admin/themes/marketplace/[id]/index.ts +0 -33
- package/src/astro/routes/api/admin/themes/marketplace/[id]/thumbnail.ts +0 -62
- package/src/astro/routes/api/admin/themes/marketplace/index.ts +0 -45
- package/src/astro/routes/api/admin/users/[id]/disable.ts +0 -72
- package/src/astro/routes/api/admin/users/[id]/enable.ts +0 -48
- package/src/astro/routes/api/admin/users/[id]/index.ts +0 -166
- package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +0 -72
- package/src/astro/routes/api/admin/users/index.ts +0 -66
- package/src/astro/routes/api/auth/dev-bypass.ts +0 -139
- package/src/astro/routes/api/auth/invite/accept.ts +0 -52
- package/src/astro/routes/api/auth/invite/complete.ts +0 -86
- package/src/astro/routes/api/auth/invite/index.ts +0 -99
- package/src/astro/routes/api/auth/invite/register-options.ts +0 -73
- package/src/astro/routes/api/auth/logout.ts +0 -40
- package/src/astro/routes/api/auth/magic-link/send.ts +0 -90
- package/src/astro/routes/api/auth/magic-link/verify.ts +0 -71
- package/src/astro/routes/api/auth/me.ts +0 -60
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +0 -221
- package/src/astro/routes/api/auth/oauth/[provider].ts +0 -120
- package/src/astro/routes/api/auth/passkey/[id].ts +0 -124
- package/src/astro/routes/api/auth/passkey/index.ts +0 -54
- package/src/astro/routes/api/auth/passkey/options.ts +0 -85
- package/src/astro/routes/api/auth/passkey/register/options.ts +0 -88
- package/src/astro/routes/api/auth/passkey/register/verify.ts +0 -119
- package/src/astro/routes/api/auth/passkey/verify.ts +0 -72
- package/src/astro/routes/api/auth/signup/complete.ts +0 -87
- package/src/astro/routes/api/auth/signup/request.ts +0 -89
- package/src/astro/routes/api/auth/signup/verify.ts +0 -53
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +0 -310
- package/src/astro/routes/api/content/[collection]/[id]/compare.ts +0 -28
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +0 -68
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +0 -77
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +0 -42
- package/src/astro/routes/api/content/[collection]/[id]/preview-url.ts +0 -107
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +0 -100
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +0 -64
- package/src/astro/routes/api/content/[collection]/[id]/revisions.ts +0 -31
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +0 -129
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +0 -143
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +0 -50
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +0 -69
- package/src/astro/routes/api/content/[collection]/[id].ts +0 -173
- package/src/astro/routes/api/content/[collection]/index.ts +0 -103
- package/src/astro/routes/api/content/[collection]/trash.ts +0 -33
- package/src/astro/routes/api/dashboard.ts +0 -32
- package/src/astro/routes/api/dev/emails.ts +0 -36
- package/src/astro/routes/api/health.ts +0 -54
- package/src/astro/routes/api/import/probe.ts +0 -47
- package/src/astro/routes/api/import/wordpress/analyze.ts +0 -523
- package/src/astro/routes/api/import/wordpress/execute.ts +0 -330
- package/src/astro/routes/api/import/wordpress/media.ts +0 -338
- package/src/astro/routes/api/import/wordpress/prepare.ts +0 -212
- package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +0 -425
- package/src/astro/routes/api/import/wordpress-plugin/analyze.ts +0 -111
- package/src/astro/routes/api/import/wordpress-plugin/callback.ts +0 -58
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +0 -399
- package/src/astro/routes/api/manifest.ts +0 -75
- package/src/astro/routes/api/mcp.ts +0 -125
- package/src/astro/routes/api/media/[id]/confirm.ts +0 -93
- package/src/astro/routes/api/media/[id].ts +0 -145
- package/src/astro/routes/api/media/file/[...key].ts +0 -79
- package/src/astro/routes/api/media/providers/[providerId]/[itemId].ts +0 -91
- package/src/astro/routes/api/media/providers/[providerId]/index.ts +0 -111
- package/src/astro/routes/api/media/providers/index.ts +0 -30
- package/src/astro/routes/api/media/upload-url.ts +0 -146
- package/src/astro/routes/api/media.ts +0 -204
- package/src/astro/routes/api/menus/[name]/reorder.ts +0 -79
- package/src/astro/routes/api/menus/[name].ts +0 -145
- package/src/astro/routes/api/menus/index.ts +0 -91
- package/src/astro/routes/api/oauth/authorize.ts +0 -430
- package/src/astro/routes/api/oauth/device/authorize.ts +0 -45
- package/src/astro/routes/api/oauth/device/code.ts +0 -56
- package/src/astro/routes/api/oauth/device/token.ts +0 -70
- package/src/astro/routes/api/oauth/register.ts +0 -182
- package/src/astro/routes/api/oauth/token/refresh.ts +0 -38
- package/src/astro/routes/api/oauth/token/revoke.ts +0 -38
- package/src/astro/routes/api/oauth/token.ts +0 -195
- package/src/astro/routes/api/openapi.json.ts +0 -33
- package/src/astro/routes/api/plugins/[pluginId]/[...path].ts +0 -109
- package/src/astro/routes/api/redirects/404s/index.ts +0 -72
- package/src/astro/routes/api/redirects/404s/summary.ts +0 -33
- package/src/astro/routes/api/redirects/[id].ts +0 -183
- package/src/astro/routes/api/redirects/index.ts +0 -100
- package/src/astro/routes/api/revisions/[revisionId]/index.ts +0 -29
- package/src/astro/routes/api/revisions/[revisionId]/restore.ts +0 -62
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +0 -104
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +0 -67
- package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +0 -45
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +0 -107
- package/src/astro/routes/api/schema/collections/index.ts +0 -61
- package/src/astro/routes/api/schema/index.ts +0 -109
- package/src/astro/routes/api/schema/orphans/[slug].ts +0 -36
- package/src/astro/routes/api/schema/orphans/index.ts +0 -26
- package/src/astro/routes/api/search/enable.ts +0 -64
- package/src/astro/routes/api/search/index.ts +0 -52
- package/src/astro/routes/api/search/rebuild.ts +0 -72
- package/src/astro/routes/api/search/stats.ts +0 -35
- package/src/astro/routes/api/search/suggest.ts +0 -50
- package/src/astro/routes/api/sections/[slug].ts +0 -203
- package/src/astro/routes/api/sections/index.ts +0 -107
- package/src/astro/routes/api/settings/email.ts +0 -150
- package/src/astro/routes/api/settings.ts +0 -116
- package/src/astro/routes/api/setup/admin-verify.ts +0 -122
- package/src/astro/routes/api/setup/admin.ts +0 -104
- package/src/astro/routes/api/setup/dev-bypass.ts +0 -200
- package/src/astro/routes/api/setup/dev-reset.ts +0 -40
- package/src/astro/routes/api/setup/index.ts +0 -128
- package/src/astro/routes/api/setup/status.ts +0 -122
- package/src/astro/routes/api/snapshot.ts +0 -76
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +0 -232
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +0 -131
- package/src/astro/routes/api/taxonomies/index.ts +0 -114
- package/src/astro/routes/api/themes/preview.ts +0 -78
- package/src/astro/routes/api/typegen.ts +0 -114
- package/src/astro/routes/api/well-known/auth.ts +0 -71
- package/src/astro/routes/api/well-known/oauth-authorization-server.ts +0 -48
- package/src/astro/routes/api/well-known/oauth-protected-resource.ts +0 -39
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +0 -114
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +0 -213
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +0 -126
- package/src/astro/routes/api/widget-areas/[name].ts +0 -135
- package/src/astro/routes/api/widget-areas/index.ts +0 -149
- package/src/astro/routes/api/widget-components.ts +0 -22
- package/src/astro/routes/robots.txt.ts +0 -81
- package/src/astro/routes/sitemap-[collection].xml.ts +0 -104
- package/src/astro/routes/sitemap.xml.ts +0 -92
- /package/dist/{adapters-C2ypTrZZ.d.mts → adapters-BLDldpJg.d.mts} +0 -0
- /package/{src → dist}/astro/routes/admin.astro +0 -0
- /package/dist/{base64-F8-DUraK.mjs → base64-Cz-aU0X1.mjs} +0 -0
- /package/dist/{chunks--4F8ddV4.mjs → chunks-D_jVet6z.mjs} +0 -0
- /package/dist/{config-BXwuX8Bx.mjs → config-CAMFxGaV.mjs} +0 -0
- /package/dist/{db-errors-CEqD7qH9.mjs → db-errors-DKUg_NgF.mjs} +0 -0
- /package/dist/{default-VjJyuuG9.mjs → default-C3PZN-bz.mjs} +0 -0
- /package/dist/{load-Coc9HpHH.mjs → load-D-9NhLmF.mjs} +0 -0
- /package/dist/{mode-47goXBBK.mjs → mode-C80mAZQv.mjs} +0 -0
- /package/dist/{placeholder--wOi4TbO.d.mts → placeholder-CHkLckzK.d.mts} +0 -0
- /package/dist/{request-cache-Dk5qPSOx.mjs → request-cache-DHMRr2Lf.mjs} +0 -0
- /package/dist/{transaction-Cn2rjY78.mjs → transaction-x2tJQ-A1.mjs} +0 -0
- /package/dist/{transport-Wge_IzKl.d.mts → transport-6RefuBdV.d.mts} +0 -0
- /package/dist/{types-griIBQOQ.mjs → types-B9gKVOHk.mjs} +0 -0
- /package/dist/{types-CWbdtiux.d.mts → types-B9qVtiHb.d.mts} +0 -0
- /package/dist/{types-COeOq9nK.mjs → types-DL7Y8D_t.mjs} +0 -0
- /package/dist/{types-BzcUjoqg.d.mts → types-Djdp0cZO.d.mts} +0 -0
- /package/dist/{types-DOrVigru.d.mts → types-Du8jreyC.d.mts} +0 -0
|
@@ -1,18 +1,210 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Database } from "./types-
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { a as ContentSeoInput, c as FindManyOptions, l as FindManyResult, o as CreateContentInput, r as ContentItem, t as BylineSummary, u as UpdateContentInput } from "./types-Djdp0cZO.mjs";
|
|
2
|
+
import { t as Database } from "./types-Du8jreyC.mjs";
|
|
3
|
+
import { A as PageMetadataContribution, B as PluginDefinition, D as PageFragmentContribution, H as PluginManifest, J as RequestMeta, O as PageFragmentEvent, W as PluginStorageConfig, X as ResolvedPlugin, a as CommentAfterModerateEvent, g as EmailMessage, h as CronEvent, j as PageMetadataEvent, r as CommentAfterCreateEvent, s as CommentBeforeCreateEvent, tt as StandardPluginDefinition, w as MediaItem$1 } from "./types-DgfUZqcd.mjs";
|
|
4
|
+
import { a as Collection, b as UpdateFieldInput, c as CollectionWithFields, d as CreateFieldInput, i as SiteSettings, p as Field, r as SiteSettingKey, u as CreateCollectionInput, y as UpdateCollectionInput } from "./types-IPACEM14.mjs";
|
|
5
|
+
import { r as AuthProviderDescriptor, t as AuthDescriptor } from "./types-D4XVOt01.mjs";
|
|
6
|
+
import { t as DatabaseDescriptor } from "./adapters-BLDldpJg.mjs";
|
|
7
|
+
import { _ as MediaValue, m as MediaProviderDescriptor } from "./placeholder-CHkLckzK.mjs";
|
|
8
|
+
import { S as ContentBylineInput } from "./index-CkljPf5F.mjs";
|
|
9
|
+
import { d as Storage } from "./types-B9qVtiHb.mjs";
|
|
8
10
|
import { Kysely } from "kysely";
|
|
9
11
|
import { z } from "astro/zod";
|
|
10
12
|
import { z as z$1 } from "zod";
|
|
11
|
-
import { PortableTextBlock } from "@dineway-ai/gutenberg-to-portable-text";
|
|
12
|
-
import { Readable } from "node:stream";
|
|
13
13
|
import { MiddlewareHandler } from "astro";
|
|
14
14
|
import { LiveLoader } from "astro/loaders";
|
|
15
15
|
|
|
16
|
+
//#region src/api/types.d.ts
|
|
17
|
+
/**
|
|
18
|
+
* List response with cursor pagination
|
|
19
|
+
*/
|
|
20
|
+
interface ListResponse<T> {
|
|
21
|
+
items: T[];
|
|
22
|
+
nextCursor?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Content API responses
|
|
26
|
+
*/
|
|
27
|
+
interface ContentListResponse extends ListResponse<ContentItem> {}
|
|
28
|
+
interface ContentResponse {
|
|
29
|
+
item: ContentItem;
|
|
30
|
+
/** Opaque revision token for optimistic concurrency */
|
|
31
|
+
_rev?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Manifest API response
|
|
35
|
+
*/
|
|
36
|
+
interface ManifestResponse {
|
|
37
|
+
version: string;
|
|
38
|
+
commit?: string;
|
|
39
|
+
hash: string;
|
|
40
|
+
features?: {
|
|
41
|
+
siteContextWorkflows: boolean;
|
|
42
|
+
};
|
|
43
|
+
collections: Record<string, {
|
|
44
|
+
label: string;
|
|
45
|
+
labelSingular: string;
|
|
46
|
+
supports: string[];
|
|
47
|
+
fields: Record<string, FieldDescriptor>;
|
|
48
|
+
}>;
|
|
49
|
+
plugins: Record<string, {
|
|
50
|
+
adminPages?: Array<{
|
|
51
|
+
path: string;
|
|
52
|
+
component: string;
|
|
53
|
+
}>;
|
|
54
|
+
widgets?: string[];
|
|
55
|
+
}>;
|
|
56
|
+
}
|
|
57
|
+
interface FieldDescriptor {
|
|
58
|
+
kind: string;
|
|
59
|
+
label?: string;
|
|
60
|
+
required?: boolean;
|
|
61
|
+
options?: Array<{
|
|
62
|
+
value: string;
|
|
63
|
+
label: string;
|
|
64
|
+
}> | Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Discriminated union for handler results.
|
|
68
|
+
*
|
|
69
|
+
* Handlers return `ApiResult<T>` -- either `{ success: true, data: T }` or
|
|
70
|
+
* `{ success: false, error: { code, message } }`. The `success` literal
|
|
71
|
+
* enables TypeScript narrowing on `.data`.
|
|
72
|
+
*
|
|
73
|
+
* The generic `E` parameter defaults to `ErrorCode` but can be narrowed to
|
|
74
|
+
* `OAuthErrorCode` for OAuth token-endpoint handlers.
|
|
75
|
+
*
|
|
76
|
+
* Use `unwrapResult()` from `error.ts` to convert to an HTTP Response.
|
|
77
|
+
*/
|
|
78
|
+
type ApiResult<T, E extends string = string> = {
|
|
79
|
+
success: true;
|
|
80
|
+
data: T;
|
|
81
|
+
} | {
|
|
82
|
+
success: false;
|
|
83
|
+
error: {
|
|
84
|
+
code: E;
|
|
85
|
+
message: string;
|
|
86
|
+
details?: Record<string, unknown>;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* API request context
|
|
91
|
+
*/
|
|
92
|
+
interface ApiContext {
|
|
93
|
+
userId?: string;
|
|
94
|
+
userRole?: string;
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/api/error.d.ts
|
|
98
|
+
/**
|
|
99
|
+
* Create a standardized error response.
|
|
100
|
+
*
|
|
101
|
+
* Always returns `{ error: { code, message, details? } }` with correct Content-Type.
|
|
102
|
+
* Use this for all error responses in API routes.
|
|
103
|
+
*/
|
|
104
|
+
declare function apiError(code: string, message: string, status: number, details?: Record<string, unknown>): Response;
|
|
105
|
+
/**
|
|
106
|
+
* Create a standardized success response.
|
|
107
|
+
*
|
|
108
|
+
* Always returns `{ data: T }` with correct status code.
|
|
109
|
+
* Use this for all success responses in API routes.
|
|
110
|
+
*/
|
|
111
|
+
declare function apiSuccess<T>(data: T, status?: number): Response;
|
|
112
|
+
/**
|
|
113
|
+
* Handle an unknown error in a catch block.
|
|
114
|
+
*
|
|
115
|
+
* - Logs the full error server-side
|
|
116
|
+
* - Returns a generic message to the client (never leaks error.message)
|
|
117
|
+
* - Use `fallbackMessage` for the public-facing message
|
|
118
|
+
* - Use `fallbackCode` for the error code
|
|
119
|
+
*/
|
|
120
|
+
declare function handleError(error: unknown, fallbackMessage: string, fallbackCode: string): Response;
|
|
121
|
+
//#endregion
|
|
122
|
+
//#region src/api/parse.d.ts
|
|
123
|
+
/**
|
|
124
|
+
* Result of parsing: either the validated data or an error Response.
|
|
125
|
+
* Routes should check `if (result instanceof Response) return result;`
|
|
126
|
+
*/
|
|
127
|
+
type ParseResult<T> = T | Response;
|
|
128
|
+
/**
|
|
129
|
+
* Parse and validate a JSON request body against a Zod schema.
|
|
130
|
+
*
|
|
131
|
+
* Returns the validated data on success, or a 400 Response on failure.
|
|
132
|
+
* Replaces all `(await request.json()) as T` casts.
|
|
133
|
+
*/
|
|
134
|
+
declare function parseBody<T extends z$1.ZodType>(request: Request, schema: T): Promise<ParseResult<z$1.infer<T>>>;
|
|
135
|
+
/**
|
|
136
|
+
* Parse and validate URL search params against a Zod schema.
|
|
137
|
+
*
|
|
138
|
+
* Converts searchParams to a plain object before validation.
|
|
139
|
+
* Zod coercion handles string -> number/boolean conversion.
|
|
140
|
+
* Replaces manual `url.searchParams.get()` + `parseInt()` patterns.
|
|
141
|
+
*/
|
|
142
|
+
declare function parseQuery<T extends z$1.ZodType>(url: URL, schema: T): ParseResult<z$1.infer<T>>;
|
|
143
|
+
/**
|
|
144
|
+
* Type guard to check if a ParseResult is an error Response.
|
|
145
|
+
* Usage: `if (isParseError(result)) return result;`
|
|
146
|
+
*/
|
|
147
|
+
declare function isParseError<T>(result: ParseResult<T>): result is Response;
|
|
148
|
+
//#endregion
|
|
149
|
+
//#region src/database/repositories/options.d.ts
|
|
150
|
+
/**
|
|
151
|
+
* Options repository for key-value settings storage
|
|
152
|
+
*
|
|
153
|
+
* Used for site settings, plugin configuration, and other arbitrary key-value data.
|
|
154
|
+
* Values are stored as JSON for flexibility.
|
|
155
|
+
*/
|
|
156
|
+
declare class OptionsRepository {
|
|
157
|
+
private db;
|
|
158
|
+
constructor(db: Kysely<Database>);
|
|
159
|
+
/**
|
|
160
|
+
* Get an option value
|
|
161
|
+
*/
|
|
162
|
+
get<T = unknown>(name: string): Promise<T | null>;
|
|
163
|
+
/**
|
|
164
|
+
* Get an option value with a default
|
|
165
|
+
*/
|
|
166
|
+
getOrDefault<T>(name: string, defaultValue: T): Promise<T>;
|
|
167
|
+
/**
|
|
168
|
+
* Set an option value (creates or updates)
|
|
169
|
+
*/
|
|
170
|
+
set<T = unknown>(name: string, value: T): Promise<void>;
|
|
171
|
+
/**
|
|
172
|
+
* Set an option value only if no row with that name exists.
|
|
173
|
+
*
|
|
174
|
+
* Returns true when the row was inserted, false when a row already existed,
|
|
175
|
+
* regardless of its value.
|
|
176
|
+
*/
|
|
177
|
+
setIfAbsent<T = unknown>(name: string, value: T): Promise<boolean>;
|
|
178
|
+
/**
|
|
179
|
+
* Delete an option
|
|
180
|
+
*/
|
|
181
|
+
delete(name: string): Promise<boolean>;
|
|
182
|
+
/**
|
|
183
|
+
* Check if an option exists
|
|
184
|
+
*/
|
|
185
|
+
exists(name: string): Promise<boolean>;
|
|
186
|
+
/**
|
|
187
|
+
* Get multiple options at once
|
|
188
|
+
*/
|
|
189
|
+
getMany<T = unknown>(names: string[]): Promise<Map<string, T>>;
|
|
190
|
+
/**
|
|
191
|
+
* Set multiple options at once
|
|
192
|
+
*/
|
|
193
|
+
setMany<T = unknown>(options: Record<string, T>): Promise<void>;
|
|
194
|
+
/**
|
|
195
|
+
* Get all options (use sparingly)
|
|
196
|
+
*/
|
|
197
|
+
getAll(): Promise<Map<string, unknown>>;
|
|
198
|
+
/**
|
|
199
|
+
* Get all options matching a prefix
|
|
200
|
+
*/
|
|
201
|
+
getByPrefix<T = unknown>(prefix: string): Promise<Map<string, T>>;
|
|
202
|
+
/**
|
|
203
|
+
* Delete all options matching a prefix
|
|
204
|
+
*/
|
|
205
|
+
deleteByPrefix(prefix: string): Promise<number>;
|
|
206
|
+
}
|
|
207
|
+
//#endregion
|
|
16
208
|
//#region src/database/connection.d.ts
|
|
17
209
|
interface DatabaseConfig {
|
|
18
210
|
url: string;
|
|
@@ -158,8 +350,11 @@ declare class ContentRepository {
|
|
|
158
350
|
* Syncs the draft revision's data into the content table columns so the
|
|
159
351
|
* content table always reflects the published version.
|
|
160
352
|
* If no draft revision exists, creates one from current data and publishes it.
|
|
353
|
+
*
|
|
354
|
+
* `publishedAt` overrides the publication timestamp. If omitted, an existing
|
|
355
|
+
* `published_at` is preserved and first publish falls back to the current time.
|
|
161
356
|
*/
|
|
162
|
-
publish(type: string, id: string): Promise<ContentItem>;
|
|
357
|
+
publish(type: string, id: string, publishedAt?: string): Promise<ContentItem>;
|
|
163
358
|
/**
|
|
164
359
|
* Stage an existing revision as the draft for a content item.
|
|
165
360
|
*
|
|
@@ -348,12 +543,6 @@ interface PublicComment {
|
|
|
348
543
|
replies?: PublicComment[];
|
|
349
544
|
}
|
|
350
545
|
//#endregion
|
|
351
|
-
//#region src/database/repositories/byline.d.ts
|
|
352
|
-
interface ContentBylineInput {
|
|
353
|
-
bylineId: string;
|
|
354
|
-
roleLabel?: string | null;
|
|
355
|
-
}
|
|
356
|
-
//#endregion
|
|
357
546
|
//#region src/fields/types.d.ts
|
|
358
547
|
/**
|
|
359
548
|
* SQLite column types that map from field types
|
|
@@ -389,7 +578,7 @@ interface FieldUIHints {
|
|
|
389
578
|
/**
|
|
390
579
|
* Portable Text block structure
|
|
391
580
|
*/
|
|
392
|
-
interface PortableTextBlock$
|
|
581
|
+
interface PortableTextBlock$1 {
|
|
393
582
|
_type: string;
|
|
394
583
|
_key: string;
|
|
395
584
|
[key: string]: unknown;
|
|
@@ -436,88 +625,7 @@ declare function reference(collection: string, options?: {
|
|
|
436
625
|
*/
|
|
437
626
|
declare function portableText(options?: {
|
|
438
627
|
required?: boolean;
|
|
439
|
-
}): FieldDefinition<PortableTextBlock$
|
|
440
|
-
//#endregion
|
|
441
|
-
//#region src/api/types.d.ts
|
|
442
|
-
/**
|
|
443
|
-
* List response with cursor pagination
|
|
444
|
-
*/
|
|
445
|
-
interface ListResponse<T> {
|
|
446
|
-
items: T[];
|
|
447
|
-
nextCursor?: string;
|
|
448
|
-
}
|
|
449
|
-
/**
|
|
450
|
-
* Content API responses
|
|
451
|
-
*/
|
|
452
|
-
interface ContentListResponse extends ListResponse<ContentItem> {}
|
|
453
|
-
interface ContentResponse {
|
|
454
|
-
item: ContentItem;
|
|
455
|
-
/** Opaque revision token for optimistic concurrency */
|
|
456
|
-
_rev?: string;
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Manifest API response
|
|
460
|
-
*/
|
|
461
|
-
interface ManifestResponse {
|
|
462
|
-
version: string;
|
|
463
|
-
commit?: string;
|
|
464
|
-
hash: string;
|
|
465
|
-
features?: {
|
|
466
|
-
siteContextWorkflows: boolean;
|
|
467
|
-
};
|
|
468
|
-
collections: Record<string, {
|
|
469
|
-
label: string;
|
|
470
|
-
labelSingular: string;
|
|
471
|
-
supports: string[];
|
|
472
|
-
fields: Record<string, FieldDescriptor>;
|
|
473
|
-
}>;
|
|
474
|
-
plugins: Record<string, {
|
|
475
|
-
adminPages?: Array<{
|
|
476
|
-
path: string;
|
|
477
|
-
component: string;
|
|
478
|
-
}>;
|
|
479
|
-
widgets?: string[];
|
|
480
|
-
}>;
|
|
481
|
-
}
|
|
482
|
-
interface FieldDescriptor {
|
|
483
|
-
kind: string;
|
|
484
|
-
label?: string;
|
|
485
|
-
required?: boolean;
|
|
486
|
-
options?: Array<{
|
|
487
|
-
value: string;
|
|
488
|
-
label: string;
|
|
489
|
-
}>;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Discriminated union for handler results.
|
|
493
|
-
*
|
|
494
|
-
* Handlers return `ApiResult<T>` -- either `{ success: true, data: T }` or
|
|
495
|
-
* `{ success: false, error: { code, message } }`. The `success` literal
|
|
496
|
-
* enables TypeScript narrowing on `.data`.
|
|
497
|
-
*
|
|
498
|
-
* The generic `E` parameter defaults to `ErrorCode` but can be narrowed to
|
|
499
|
-
* `OAuthErrorCode` for OAuth token-endpoint handlers.
|
|
500
|
-
*
|
|
501
|
-
* Use `unwrapResult()` from `error.ts` to convert to an HTTP Response.
|
|
502
|
-
*/
|
|
503
|
-
type ApiResult<T, E extends string = string> = {
|
|
504
|
-
success: true;
|
|
505
|
-
data: T;
|
|
506
|
-
} | {
|
|
507
|
-
success: false;
|
|
508
|
-
error: {
|
|
509
|
-
code: E;
|
|
510
|
-
message: string;
|
|
511
|
-
details?: Record<string, unknown>;
|
|
512
|
-
};
|
|
513
|
-
};
|
|
514
|
-
/**
|
|
515
|
-
* API request context
|
|
516
|
-
*/
|
|
517
|
-
interface ApiContext {
|
|
518
|
-
userId?: string;
|
|
519
|
-
userRole?: string;
|
|
520
|
-
}
|
|
628
|
+
}): FieldDefinition<PortableTextBlock$1[] | undefined>;
|
|
521
629
|
//#endregion
|
|
522
630
|
//#region src/api/handlers/content.d.ts
|
|
523
631
|
/**
|
|
@@ -589,6 +697,7 @@ declare function handleContentUpdate(db: Kysely<Database>, collection: string, i
|
|
|
589
697
|
bylines?: ContentBylineInput[];
|
|
590
698
|
_rev?: string;
|
|
591
699
|
seo?: ContentSeoInput;
|
|
700
|
+
publishedAt?: string | null;
|
|
592
701
|
}): Promise<ApiResult<ContentResponse>>;
|
|
593
702
|
/**
|
|
594
703
|
* Duplicate content item.
|
|
@@ -649,7 +758,9 @@ declare function handleContentUnschedule(db: Kysely<Database>, collection: strin
|
|
|
649
758
|
* (syncDataColumns, slug sync, status/revision update) that must
|
|
650
759
|
* be atomic to prevent FTS shadow table corruption on crash.
|
|
651
760
|
*/
|
|
652
|
-
declare function handleContentPublish(db: Kysely<Database>, collection: string, id: string
|
|
761
|
+
declare function handleContentPublish(db: Kysely<Database>, collection: string, id: string, options?: {
|
|
762
|
+
publishedAt?: string;
|
|
763
|
+
}): Promise<ApiResult<ContentResponse>>;
|
|
653
764
|
/**
|
|
654
765
|
* Unpublish content (revert to draft).
|
|
655
766
|
*
|
|
@@ -813,6 +924,10 @@ declare class SchemaRegistry {
|
|
|
813
924
|
* List all collections
|
|
814
925
|
*/
|
|
815
926
|
listCollections(): Promise<Collection[]>;
|
|
927
|
+
/**
|
|
928
|
+
* List all collections with their fields using bounded query shapes.
|
|
929
|
+
*/
|
|
930
|
+
listCollectionsWithFields(): Promise<CollectionWithFields[]>;
|
|
816
931
|
/**
|
|
817
932
|
* Get a collection by slug
|
|
818
933
|
*/
|
|
@@ -982,7 +1097,7 @@ interface Section {
|
|
|
982
1097
|
title: string;
|
|
983
1098
|
description?: string;
|
|
984
1099
|
keywords: string[];
|
|
985
|
-
content: PortableTextBlock$
|
|
1100
|
+
content: PortableTextBlock$1[];
|
|
986
1101
|
previewUrl?: string;
|
|
987
1102
|
source: SectionSource;
|
|
988
1103
|
themeId?: string;
|
|
@@ -997,7 +1112,7 @@ interface CreateSectionInput {
|
|
|
997
1112
|
title: string;
|
|
998
1113
|
description?: string;
|
|
999
1114
|
keywords?: string[];
|
|
1000
|
-
content: PortableTextBlock$
|
|
1115
|
+
content: PortableTextBlock$1[];
|
|
1001
1116
|
previewMediaId?: string;
|
|
1002
1117
|
source?: SectionSource;
|
|
1003
1118
|
themeId?: string;
|
|
@@ -1010,7 +1125,7 @@ interface UpdateSectionInput {
|
|
|
1010
1125
|
title?: string;
|
|
1011
1126
|
description?: string;
|
|
1012
1127
|
keywords?: string[];
|
|
1013
|
-
content?: PortableTextBlock$
|
|
1128
|
+
content?: PortableTextBlock$1[];
|
|
1014
1129
|
previewMediaId?: string | null;
|
|
1015
1130
|
}
|
|
1016
1131
|
/**
|
|
@@ -1292,7 +1407,7 @@ interface PortableTextUnknownBlock {
|
|
|
1292
1407
|
/**
|
|
1293
1408
|
* Any Portable Text block
|
|
1294
1409
|
*/
|
|
1295
|
-
type PortableTextBlock
|
|
1410
|
+
type PortableTextBlock = PortableTextTextBlock | PortableTextImageBlock | PortableTextCodeBlock | PortableTextUnknownBlock;
|
|
1296
1411
|
/**
|
|
1297
1412
|
* ProseMirror JSON types (simplified for TipTap)
|
|
1298
1413
|
*/
|
|
@@ -1316,13 +1431,13 @@ interface ProseMirrorDocument {
|
|
|
1316
1431
|
/**
|
|
1317
1432
|
* Convert ProseMirror document to Portable Text
|
|
1318
1433
|
*/
|
|
1319
|
-
declare function prosemirrorToPortableText(doc: ProseMirrorDocument): PortableTextBlock
|
|
1434
|
+
declare function prosemirrorToPortableText(doc: ProseMirrorDocument): PortableTextBlock[];
|
|
1320
1435
|
//#endregion
|
|
1321
1436
|
//#region src/content/converters/portable-text-to-prosemirror.d.ts
|
|
1322
1437
|
/**
|
|
1323
1438
|
* Convert Portable Text to ProseMirror document
|
|
1324
1439
|
*/
|
|
1325
|
-
declare function portableTextToProsemirror(blocks: PortableTextBlock
|
|
1440
|
+
declare function portableTextToProsemirror(blocks: PortableTextBlock[]): ProseMirrorDocument;
|
|
1326
1441
|
//#endregion
|
|
1327
1442
|
//#region src/utils/hash.d.ts
|
|
1328
1443
|
/**
|
|
@@ -1341,12 +1456,6 @@ declare function hashString(content: string): Promise<string>;
|
|
|
1341
1456
|
*/
|
|
1342
1457
|
declare function computeContentHash(content: Uint8Array | ArrayBuffer): Promise<string>;
|
|
1343
1458
|
//#endregion
|
|
1344
|
-
//#region src/utils/slugify.d.ts
|
|
1345
|
-
/**
|
|
1346
|
-
* Decode a URI-encoded slug route parameter before database lookup.
|
|
1347
|
-
*/
|
|
1348
|
-
declare function decodeSlug(raw: string | undefined): string | undefined;
|
|
1349
|
-
//#endregion
|
|
1350
1459
|
//#region src/utils/url.d.ts
|
|
1351
1460
|
/**
|
|
1352
1461
|
* URL scheme validation utilities
|
|
@@ -1913,146 +2022,9 @@ declare function getDb(): Promise<Kysely<Database>>;
|
|
|
1913
2022
|
*/
|
|
1914
2023
|
declare function dinewayLoader(): LiveLoader<EntryData, EntryFilter, CollectionFilter>;
|
|
1915
2024
|
//#endregion
|
|
1916
|
-
//#region src/
|
|
1917
|
-
/**
|
|
1918
|
-
* Parsed WordPress export data
|
|
1919
|
-
*/
|
|
1920
|
-
interface WxrData {
|
|
1921
|
-
/** Site metadata */
|
|
1922
|
-
site: WxrSite;
|
|
1923
|
-
/** Posts (including custom post types) */
|
|
1924
|
-
posts: WxrPost[];
|
|
1925
|
-
/** Media attachments */
|
|
1926
|
-
attachments: WxrAttachment[];
|
|
1927
|
-
/** Categories */
|
|
1928
|
-
categories: WxrCategory[];
|
|
1929
|
-
/** Tags */
|
|
1930
|
-
tags: WxrTag[];
|
|
1931
|
-
/** Authors */
|
|
1932
|
-
authors: WxrAuthor[];
|
|
1933
|
-
/** All taxonomy terms (including custom taxonomies and nav_menu) */
|
|
1934
|
-
terms: WxrTerm[];
|
|
1935
|
-
/** Parsed navigation menus */
|
|
1936
|
-
navMenus: WxrNavMenu[];
|
|
1937
|
-
}
|
|
1938
|
-
interface WxrSite {
|
|
1939
|
-
title?: string;
|
|
1940
|
-
link?: string;
|
|
1941
|
-
description?: string;
|
|
1942
|
-
language?: string;
|
|
1943
|
-
baseSiteUrl?: string;
|
|
1944
|
-
baseBlogUrl?: string;
|
|
1945
|
-
}
|
|
1946
|
-
interface WxrPost {
|
|
1947
|
-
id?: number;
|
|
1948
|
-
title?: string;
|
|
1949
|
-
link?: string;
|
|
1950
|
-
pubDate?: string;
|
|
1951
|
-
creator?: string;
|
|
1952
|
-
guid?: string;
|
|
1953
|
-
description?: string;
|
|
1954
|
-
content?: string;
|
|
1955
|
-
excerpt?: string;
|
|
1956
|
-
postDate?: string;
|
|
1957
|
-
postDateGmt?: string;
|
|
1958
|
-
postModified?: string;
|
|
1959
|
-
postModifiedGmt?: string;
|
|
1960
|
-
commentStatus?: string;
|
|
1961
|
-
pingStatus?: string;
|
|
1962
|
-
status?: string;
|
|
1963
|
-
postType?: string;
|
|
1964
|
-
postName?: string;
|
|
1965
|
-
postPassword?: string;
|
|
1966
|
-
isSticky?: boolean;
|
|
1967
|
-
/** Parent post ID for hierarchical content (pages) */
|
|
1968
|
-
postParent?: number;
|
|
1969
|
-
/** Menu order for sorting */
|
|
1970
|
-
menuOrder?: number;
|
|
1971
|
-
categories: string[];
|
|
1972
|
-
tags: string[];
|
|
1973
|
-
/** Custom taxonomy assignments beyond categories/tags */
|
|
1974
|
-
customTaxonomies?: Map<string, string[]>;
|
|
1975
|
-
meta: Map<string, string>;
|
|
1976
|
-
}
|
|
1977
|
-
interface WxrAttachment {
|
|
1978
|
-
id?: number;
|
|
1979
|
-
title?: string;
|
|
1980
|
-
url?: string;
|
|
1981
|
-
postDate?: string;
|
|
1982
|
-
meta: Map<string, string>;
|
|
1983
|
-
}
|
|
1984
|
-
interface WxrCategory {
|
|
1985
|
-
id?: number;
|
|
1986
|
-
nicename?: string;
|
|
1987
|
-
name?: string;
|
|
1988
|
-
parent?: string;
|
|
1989
|
-
description?: string;
|
|
1990
|
-
}
|
|
1991
|
-
interface WxrTag {
|
|
1992
|
-
id?: number;
|
|
1993
|
-
slug?: string;
|
|
1994
|
-
name?: string;
|
|
1995
|
-
description?: string;
|
|
1996
|
-
}
|
|
1997
|
-
/**
|
|
1998
|
-
* Generic taxonomy term (categories, tags, nav_menu, custom taxonomies)
|
|
1999
|
-
*/
|
|
2000
|
-
interface WxrTerm {
|
|
2001
|
-
id: number;
|
|
2002
|
-
taxonomy: string;
|
|
2003
|
-
slug: string;
|
|
2004
|
-
name: string;
|
|
2005
|
-
parent?: string;
|
|
2006
|
-
description?: string;
|
|
2007
|
-
}
|
|
2008
|
-
/**
|
|
2009
|
-
* Navigation menu structure
|
|
2010
|
-
*/
|
|
2011
|
-
interface WxrNavMenu {
|
|
2012
|
-
id: number;
|
|
2013
|
-
name: string;
|
|
2014
|
-
label: string;
|
|
2015
|
-
items: WxrNavMenuItem[];
|
|
2016
|
-
}
|
|
2017
|
-
/**
|
|
2018
|
-
* Navigation menu item
|
|
2019
|
-
*/
|
|
2020
|
-
interface WxrNavMenuItem {
|
|
2021
|
-
id: number;
|
|
2022
|
-
menuId: number;
|
|
2023
|
-
parentId?: number;
|
|
2024
|
-
sortOrder: number;
|
|
2025
|
-
type: "custom" | "post_type" | "taxonomy";
|
|
2026
|
-
objectType?: string;
|
|
2027
|
-
objectId?: number;
|
|
2028
|
-
url?: string;
|
|
2029
|
-
title: string;
|
|
2030
|
-
target?: string;
|
|
2031
|
-
classes?: string;
|
|
2032
|
-
}
|
|
2033
|
-
interface WxrAuthor {
|
|
2034
|
-
id?: number;
|
|
2035
|
-
login?: string;
|
|
2036
|
-
email?: string;
|
|
2037
|
-
displayName?: string;
|
|
2038
|
-
firstName?: string;
|
|
2039
|
-
lastName?: string;
|
|
2040
|
-
}
|
|
2041
|
-
/**
|
|
2042
|
-
* Parse a WordPress WXR export file
|
|
2043
|
-
*/
|
|
2044
|
-
declare function parseWxr(stream: Readable): Promise<WxrData>;
|
|
2025
|
+
//#region src/plugins/define-plugin.d.ts
|
|
2045
2026
|
/**
|
|
2046
|
-
*
|
|
2047
|
-
*
|
|
2048
|
-
* Uses the non-streaming SAX parser API for compatibility with
|
|
2049
|
-
* environments that don't expose Node.js streams.
|
|
2050
|
-
*/
|
|
2051
|
-
declare function parseWxrString(xml: string): Promise<WxrData>;
|
|
2052
|
-
//#endregion
|
|
2053
|
-
//#region src/plugins/define-plugin.d.ts
|
|
2054
|
-
/**
|
|
2055
|
-
* Define a Dineway plugin.
|
|
2027
|
+
* Define a Dineway plugin.
|
|
2056
2028
|
*
|
|
2057
2029
|
* **Standard format** -- the canonical format for plugins that work in both
|
|
2058
2030
|
* trusted and sandboxed modes. No id/version -- those come from the descriptor.
|
|
@@ -2087,7 +2059,7 @@ declare function parseWxrString(xml: string): Promise<WxrData>;
|
|
|
2087
2059
|
* export default definePlugin({
|
|
2088
2060
|
* id: "my-plugin",
|
|
2089
2061
|
* version: "1.0.0",
|
|
2090
|
-
* capabilities: ["read
|
|
2062
|
+
* capabilities: ["content:read"],
|
|
2091
2063
|
* hooks: {
|
|
2092
2064
|
* "content:beforeSave": async (event, ctx) => {
|
|
2093
2065
|
* ctx.log.info("Saving content", { collection: event.collection });
|
|
@@ -2107,984 +2079,470 @@ declare function parseWxrString(xml: string): Promise<WxrData>;
|
|
|
2107
2079
|
declare function definePlugin<TStorage extends PluginStorageConfig>(definition: PluginDefinition<TStorage>): ResolvedPlugin<TStorage>;
|
|
2108
2080
|
declare function definePlugin(definition: StandardPluginDefinition): StandardPluginDefinition;
|
|
2109
2081
|
//#endregion
|
|
2110
|
-
//#region src/
|
|
2082
|
+
//#region src/plugins/manifest-schema.d.ts
|
|
2111
2083
|
/**
|
|
2112
|
-
*
|
|
2084
|
+
* Zod schema matching the PluginManifest interface from types.ts.
|
|
2113
2085
|
*
|
|
2114
|
-
*
|
|
2115
|
-
* External auth adapters implement these interfaces.
|
|
2086
|
+
* Every JSON.parse of a manifest.json should validate through this.
|
|
2116
2087
|
*/
|
|
2088
|
+
declare const pluginManifestSchema: z$1.ZodObject<{
|
|
2089
|
+
id: z$1.ZodString;
|
|
2090
|
+
version: z$1.ZodString;
|
|
2091
|
+
capabilities: z$1.ZodArray<z$1.ZodEnum<{
|
|
2092
|
+
"network:request": "network:request";
|
|
2093
|
+
"network:request:unrestricted": "network:request:unrestricted";
|
|
2094
|
+
"content:read": "content:read";
|
|
2095
|
+
"content:write": "content:write";
|
|
2096
|
+
"media:read": "media:read";
|
|
2097
|
+
"media:write": "media:write";
|
|
2098
|
+
"users:read": "users:read";
|
|
2099
|
+
"email:send": "email:send";
|
|
2100
|
+
"hooks.email-transport:register": "hooks.email-transport:register";
|
|
2101
|
+
"hooks.email-events:register": "hooks.email-events:register";
|
|
2102
|
+
"hooks.page-fragments:register": "hooks.page-fragments:register";
|
|
2103
|
+
}>>;
|
|
2104
|
+
allowedHosts: z$1.ZodArray<z$1.ZodString>;
|
|
2105
|
+
storage: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
2106
|
+
indexes: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodArray<z$1.ZodString>]>>;
|
|
2107
|
+
uniqueIndexes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodArray<z$1.ZodString>]>>>;
|
|
2108
|
+
}, z$1.core.$strip>>;
|
|
2109
|
+
hooks: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodEnum<{
|
|
2110
|
+
"plugin:install": "plugin:install";
|
|
2111
|
+
"plugin:activate": "plugin:activate";
|
|
2112
|
+
"plugin:deactivate": "plugin:deactivate";
|
|
2113
|
+
"plugin:uninstall": "plugin:uninstall";
|
|
2114
|
+
"content:beforeSave": "content:beforeSave";
|
|
2115
|
+
"content:afterSave": "content:afterSave";
|
|
2116
|
+
"content:beforeDelete": "content:beforeDelete";
|
|
2117
|
+
"content:afterDelete": "content:afterDelete";
|
|
2118
|
+
"content:afterPublish": "content:afterPublish";
|
|
2119
|
+
"content:afterUnpublish": "content:afterUnpublish";
|
|
2120
|
+
"media:beforeUpload": "media:beforeUpload";
|
|
2121
|
+
"media:afterUpload": "media:afterUpload";
|
|
2122
|
+
cron: "cron";
|
|
2123
|
+
"email:beforeSend": "email:beforeSend";
|
|
2124
|
+
"email:deliver": "email:deliver";
|
|
2125
|
+
"email:afterSend": "email:afterSend";
|
|
2126
|
+
"comment:beforeCreate": "comment:beforeCreate";
|
|
2127
|
+
"comment:moderate": "comment:moderate";
|
|
2128
|
+
"comment:afterCreate": "comment:afterCreate";
|
|
2129
|
+
"comment:afterModerate": "comment:afterModerate";
|
|
2130
|
+
"page:metadata": "page:metadata";
|
|
2131
|
+
"page:fragments": "page:fragments";
|
|
2132
|
+
}>, z$1.ZodObject<{
|
|
2133
|
+
name: z$1.ZodEnum<{
|
|
2134
|
+
"plugin:install": "plugin:install";
|
|
2135
|
+
"plugin:activate": "plugin:activate";
|
|
2136
|
+
"plugin:deactivate": "plugin:deactivate";
|
|
2137
|
+
"plugin:uninstall": "plugin:uninstall";
|
|
2138
|
+
"content:beforeSave": "content:beforeSave";
|
|
2139
|
+
"content:afterSave": "content:afterSave";
|
|
2140
|
+
"content:beforeDelete": "content:beforeDelete";
|
|
2141
|
+
"content:afterDelete": "content:afterDelete";
|
|
2142
|
+
"content:afterPublish": "content:afterPublish";
|
|
2143
|
+
"content:afterUnpublish": "content:afterUnpublish";
|
|
2144
|
+
"media:beforeUpload": "media:beforeUpload";
|
|
2145
|
+
"media:afterUpload": "media:afterUpload";
|
|
2146
|
+
cron: "cron";
|
|
2147
|
+
"email:beforeSend": "email:beforeSend";
|
|
2148
|
+
"email:deliver": "email:deliver";
|
|
2149
|
+
"email:afterSend": "email:afterSend";
|
|
2150
|
+
"comment:beforeCreate": "comment:beforeCreate";
|
|
2151
|
+
"comment:moderate": "comment:moderate";
|
|
2152
|
+
"comment:afterCreate": "comment:afterCreate";
|
|
2153
|
+
"comment:afterModerate": "comment:afterModerate";
|
|
2154
|
+
"page:metadata": "page:metadata";
|
|
2155
|
+
"page:fragments": "page:fragments";
|
|
2156
|
+
}>;
|
|
2157
|
+
exclusive: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2158
|
+
priority: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2159
|
+
timeout: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2160
|
+
}, z$1.core.$strip>]>>;
|
|
2161
|
+
routes: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
2162
|
+
name: z$1.ZodString;
|
|
2163
|
+
public: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2164
|
+
}, z$1.core.$strip>]>>;
|
|
2165
|
+
admin: z$1.ZodObject<{
|
|
2166
|
+
entry: z$1.ZodOptional<z$1.ZodString>;
|
|
2167
|
+
settingsSchema: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2168
|
+
type: z$1.ZodLiteral<"string">;
|
|
2169
|
+
default: z$1.ZodOptional<z$1.ZodString>;
|
|
2170
|
+
multiline: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2171
|
+
label: z$1.ZodString;
|
|
2172
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2173
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2174
|
+
type: z$1.ZodLiteral<"number">;
|
|
2175
|
+
default: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2176
|
+
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2177
|
+
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2178
|
+
label: z$1.ZodString;
|
|
2179
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2180
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2181
|
+
type: z$1.ZodLiteral<"boolean">;
|
|
2182
|
+
default: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2183
|
+
label: z$1.ZodString;
|
|
2184
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2185
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2186
|
+
type: z$1.ZodLiteral<"select">;
|
|
2187
|
+
options: z$1.ZodArray<z$1.ZodObject<{
|
|
2188
|
+
value: z$1.ZodString;
|
|
2189
|
+
label: z$1.ZodString;
|
|
2190
|
+
}, z$1.core.$strip>>;
|
|
2191
|
+
default: z$1.ZodOptional<z$1.ZodString>;
|
|
2192
|
+
label: z$1.ZodString;
|
|
2193
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2194
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2195
|
+
type: z$1.ZodLiteral<"secret">;
|
|
2196
|
+
label: z$1.ZodString;
|
|
2197
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2198
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2199
|
+
type: z$1.ZodLiteral<"url">;
|
|
2200
|
+
default: z$1.ZodOptional<z$1.ZodString>;
|
|
2201
|
+
placeholder: z$1.ZodOptional<z$1.ZodString>;
|
|
2202
|
+
label: z$1.ZodString;
|
|
2203
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2204
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2205
|
+
type: z$1.ZodLiteral<"email">;
|
|
2206
|
+
default: z$1.ZodOptional<z$1.ZodString>;
|
|
2207
|
+
placeholder: z$1.ZodOptional<z$1.ZodString>;
|
|
2208
|
+
label: z$1.ZodString;
|
|
2209
|
+
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2210
|
+
}, z$1.core.$strip>], "type">>>;
|
|
2211
|
+
pages: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2212
|
+
path: z$1.ZodString;
|
|
2213
|
+
label: z$1.ZodString;
|
|
2214
|
+
icon: z$1.ZodOptional<z$1.ZodString>;
|
|
2215
|
+
}, z$1.core.$strip>>>;
|
|
2216
|
+
widgets: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2217
|
+
id: z$1.ZodString;
|
|
2218
|
+
size: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2219
|
+
full: "full";
|
|
2220
|
+
half: "half";
|
|
2221
|
+
third: "third";
|
|
2222
|
+
}>>;
|
|
2223
|
+
title: z$1.ZodOptional<z$1.ZodString>;
|
|
2224
|
+
}, z$1.core.$strip>>>;
|
|
2225
|
+
fieldWidgets: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2226
|
+
name: z$1.ZodString;
|
|
2227
|
+
label: z$1.ZodString;
|
|
2228
|
+
fieldTypes: z$1.ZodArray<z$1.ZodEnum<{
|
|
2229
|
+
string: "string";
|
|
2230
|
+
number: "number";
|
|
2231
|
+
boolean: "boolean";
|
|
2232
|
+
file: "file";
|
|
2233
|
+
slug: "slug";
|
|
2234
|
+
image: "image";
|
|
2235
|
+
datetime: "datetime";
|
|
2236
|
+
text: "text";
|
|
2237
|
+
integer: "integer";
|
|
2238
|
+
select: "select";
|
|
2239
|
+
multiSelect: "multiSelect";
|
|
2240
|
+
portableText: "portableText";
|
|
2241
|
+
reference: "reference";
|
|
2242
|
+
json: "json";
|
|
2243
|
+
repeater: "repeater";
|
|
2244
|
+
}>>;
|
|
2245
|
+
elements: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2246
|
+
type: z$1.ZodString;
|
|
2247
|
+
action_id: z$1.ZodString;
|
|
2248
|
+
label: z$1.ZodOptional<z$1.ZodString>;
|
|
2249
|
+
}, z$1.core.$loose>>>;
|
|
2250
|
+
}, z$1.core.$strip>>>;
|
|
2251
|
+
}, z$1.core.$strip>;
|
|
2252
|
+
}, z$1.core.$strip>;
|
|
2253
|
+
type ValidatedPluginManifest = z$1.infer<typeof pluginManifestSchema>;
|
|
2254
|
+
//#endregion
|
|
2255
|
+
//#region src/plugins/hooks.d.ts
|
|
2256
|
+
type HookNameV2 = "plugin:install" | "plugin:activate" | "plugin:deactivate" | "plugin:uninstall" | "content:beforeSave" | "content:afterSave" | "content:beforeDelete" | "content:afterDelete" | "content:afterPublish" | "content:afterUnpublish" | "media:beforeUpload" | "media:afterUpload" | "cron" | "email:beforeSend" | "email:deliver" | "email:afterSend" | "comment:beforeCreate" | "comment:moderate" | "comment:afterCreate" | "comment:afterModerate" | "page:metadata" | "page:fragments";
|
|
2117
2257
|
/**
|
|
2118
|
-
*
|
|
2258
|
+
* Hook execution result
|
|
2119
2259
|
*/
|
|
2120
|
-
interface
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
role: number;
|
|
2127
|
-
/** Provider-specific subject ID */
|
|
2128
|
-
subject?: string;
|
|
2129
|
-
/** Additional provider-specific data */
|
|
2130
|
-
metadata?: Record<string, unknown>;
|
|
2260
|
+
interface HookResult<T> {
|
|
2261
|
+
success: boolean;
|
|
2262
|
+
value?: T;
|
|
2263
|
+
error?: Error;
|
|
2264
|
+
pluginId: string;
|
|
2265
|
+
duration: number;
|
|
2131
2266
|
}
|
|
2132
2267
|
/**
|
|
2133
|
-
*
|
|
2134
|
-
*
|
|
2135
|
-
* Similar to DatabaseDescriptor and StorageDescriptor, this allows
|
|
2136
|
-
* auth providers to be configured at build time and loaded at runtime.
|
|
2268
|
+
* Hook pipeline for executing hooks in order
|
|
2137
2269
|
*/
|
|
2138
|
-
|
|
2270
|
+
declare class HookPipeline {
|
|
2271
|
+
private hooks;
|
|
2272
|
+
private pluginMap;
|
|
2273
|
+
private contextFactory;
|
|
2274
|
+
/** Stored so setContextFactory can merge incrementally. */
|
|
2275
|
+
private contextFactoryOptions;
|
|
2276
|
+
/** Hook names where at least one handler declared exclusive: true */
|
|
2277
|
+
private exclusiveHookNames;
|
|
2139
2278
|
/**
|
|
2140
|
-
*
|
|
2141
|
-
*
|
|
2279
|
+
* Selected provider plugin ID for each exclusive hook.
|
|
2280
|
+
* Set by the PluginManager after resolution.
|
|
2142
2281
|
*/
|
|
2143
|
-
|
|
2282
|
+
private exclusiveSelections;
|
|
2283
|
+
constructor(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions);
|
|
2144
2284
|
/**
|
|
2145
|
-
*
|
|
2146
|
-
*
|
|
2147
|
-
*
|
|
2285
|
+
* Set or update the context factory options.
|
|
2286
|
+
*
|
|
2287
|
+
* When called on a pipeline that already has a factory, the new options
|
|
2288
|
+
* are merged on top of the existing ones so that callers don't need to
|
|
2289
|
+
* repeat every field (e.g. adding `cronReschedule` without losing
|
|
2290
|
+
* `storage` / `getUploadUrl`).
|
|
2148
2291
|
*/
|
|
2149
|
-
|
|
2292
|
+
setContextFactory(options: Partial<PluginContextFactoryOptions>): void;
|
|
2150
2293
|
/**
|
|
2151
|
-
*
|
|
2294
|
+
* Get context for a plugin
|
|
2152
2295
|
*/
|
|
2153
|
-
|
|
2154
|
-
}
|
|
2155
|
-
/**
|
|
2156
|
-
* Auth provider module interface
|
|
2157
|
-
*
|
|
2158
|
-
* Modules specified by AuthDescriptor.entrypoint must export
|
|
2159
|
-
* an `authenticate` function matching this signature.
|
|
2160
|
-
*/
|
|
2161
|
-
interface AuthProviderModule {
|
|
2296
|
+
private getContext;
|
|
2162
2297
|
/**
|
|
2163
|
-
*
|
|
2298
|
+
* Get typed hooks for a specific hook name.
|
|
2299
|
+
* The internal map stores ResolvedHook<unknown>, but we know each name
|
|
2300
|
+
* maps to a specific handler type via HookHandlerMap.
|
|
2164
2301
|
*
|
|
2165
|
-
*
|
|
2166
|
-
*
|
|
2167
|
-
* @returns Authentication result if valid, throws if invalid
|
|
2302
|
+
* Exclusive hooks that have a selected provider are filtered out — they
|
|
2303
|
+
* should only run via invokeExclusiveHook(), not in the regular pipeline.
|
|
2168
2304
|
*/
|
|
2169
|
-
|
|
2170
|
-
}
|
|
2171
|
-
/**
|
|
2172
|
-
* Configuration options common to external auth providers
|
|
2173
|
-
*/
|
|
2174
|
-
interface ExternalAuthConfig {
|
|
2305
|
+
private getTypedHooks;
|
|
2175
2306
|
/**
|
|
2176
|
-
*
|
|
2177
|
-
*
|
|
2307
|
+
* Register all hooks from plugins.
|
|
2308
|
+
*
|
|
2309
|
+
* Registers each hook name individually to preserve type safety. The
|
|
2310
|
+
* internal map stores ResolvedHook<unknown> since it's keyed by string,
|
|
2311
|
+
* but getTypedHooks() restores the correct handler type on retrieval.
|
|
2178
2312
|
*/
|
|
2179
|
-
|
|
2313
|
+
private registerPlugins;
|
|
2180
2314
|
/**
|
|
2181
|
-
*
|
|
2182
|
-
*
|
|
2315
|
+
* Maps hook names to the capability required to register them.
|
|
2316
|
+
*
|
|
2317
|
+
* Hooks not listed here have no capability requirement (e.g. lifecycle
|
|
2318
|
+
* hooks, cron). Any plugin declaring a listed hook without the required
|
|
2319
|
+
* capability will have that hook silently skipped at registration time.
|
|
2183
2320
|
*/
|
|
2184
|
-
|
|
2321
|
+
private static readonly HOOK_REQUIRED_CAPABILITY;
|
|
2185
2322
|
/**
|
|
2186
|
-
*
|
|
2187
|
-
* When false, role is only set on first provisioning
|
|
2188
|
-
* @default false
|
|
2323
|
+
* Register a single plugin's hook by name
|
|
2189
2324
|
*/
|
|
2190
|
-
|
|
2325
|
+
private registerPluginHook;
|
|
2191
2326
|
/**
|
|
2192
|
-
*
|
|
2193
|
-
* First match wins if user is in multiple groups
|
|
2194
|
-
*
|
|
2195
|
-
* @example
|
|
2196
|
-
* ```ts
|
|
2197
|
-
* roleMapping: {
|
|
2198
|
-
* "Admins": 50, // Admin
|
|
2199
|
-
* "Developers": 40, // Developer
|
|
2200
|
-
* "Content Team": 30, // Editor
|
|
2201
|
-
* }
|
|
2202
|
-
* ```
|
|
2327
|
+
* Register a single hook
|
|
2203
2328
|
*/
|
|
2204
|
-
|
|
2205
|
-
}
|
|
2206
|
-
//#endregion
|
|
2207
|
-
//#region src/astro/storage/types.d.ts
|
|
2208
|
-
/**
|
|
2209
|
-
* Serializable storage configuration descriptor
|
|
2210
|
-
*/
|
|
2211
|
-
interface StorageDescriptor {
|
|
2212
|
-
/** Module path exporting createStorage function */
|
|
2213
|
-
entrypoint: string;
|
|
2214
|
-
/** Serializable config passed to createStorage at runtime */
|
|
2215
|
-
config: unknown;
|
|
2216
|
-
}
|
|
2217
|
-
/**
|
|
2218
|
-
* S3-compatible storage configuration
|
|
2219
|
-
*/
|
|
2220
|
-
interface S3StorageConfig {
|
|
2221
|
-
/** S3 endpoint URL */
|
|
2222
|
-
endpoint: string;
|
|
2223
|
-
/** Bucket name */
|
|
2224
|
-
bucket: string;
|
|
2329
|
+
private registerHook;
|
|
2225
2330
|
/**
|
|
2226
|
-
*
|
|
2227
|
-
* May be resolved from `S3_ACCESS_KEY_ID` at runtime on Node.
|
|
2228
|
-
* Must be provided together with `secretAccessKey`, or both omitted.
|
|
2331
|
+
* Sort hooks by priority and dependencies
|
|
2229
2332
|
*/
|
|
2230
|
-
|
|
2333
|
+
private sortHooks;
|
|
2231
2334
|
/**
|
|
2232
|
-
*
|
|
2233
|
-
* May be resolved from `S3_SECRET_ACCESS_KEY` at runtime on Node.
|
|
2234
|
-
* Must be provided together with `accessKeyId`, or both omitted.
|
|
2335
|
+
* Execute a hook with timeout
|
|
2235
2336
|
*/
|
|
2236
|
-
|
|
2237
|
-
/** Optional region (defaults to "auto") */
|
|
2238
|
-
region?: string;
|
|
2239
|
-
/** Optional public URL prefix for CDN */
|
|
2240
|
-
publicUrl?: string;
|
|
2241
|
-
}
|
|
2242
|
-
/**
|
|
2243
|
-
* Local filesystem storage configuration
|
|
2244
|
-
*/
|
|
2245
|
-
interface LocalStorageConfig {
|
|
2246
|
-
/** Directory path for storing files */
|
|
2247
|
-
directory: string;
|
|
2248
|
-
/** Base URL for serving files */
|
|
2249
|
-
baseUrl: string;
|
|
2250
|
-
}
|
|
2251
|
-
//#endregion
|
|
2252
|
-
//#region src/astro/integration/runtime.d.ts
|
|
2253
|
-
/**
|
|
2254
|
-
* Admin page definition (copied from plugins/types to avoid circular deps)
|
|
2255
|
-
*/
|
|
2256
|
-
interface PluginAdminPage {
|
|
2257
|
-
path: string;
|
|
2258
|
-
label: string;
|
|
2259
|
-
icon?: string;
|
|
2260
|
-
}
|
|
2261
|
-
/**
|
|
2262
|
-
* Dashboard widget definition (copied from plugins/types to avoid circular deps)
|
|
2263
|
-
*/
|
|
2264
|
-
interface PluginDashboardWidget {
|
|
2265
|
-
id: string;
|
|
2266
|
-
size?: "full" | "half" | "third";
|
|
2267
|
-
title?: string;
|
|
2268
|
-
}
|
|
2269
|
-
/**
|
|
2270
|
-
* Plugin descriptor - returned by plugin factory functions
|
|
2271
|
-
*
|
|
2272
|
-
* Contains all static metadata needed for manifest and admin UI,
|
|
2273
|
-
* plus the entrypoint for runtime instantiation.
|
|
2274
|
-
*
|
|
2275
|
-
* @example
|
|
2276
|
-
* ```ts
|
|
2277
|
-
* export function myPlugin(options?: MyPluginOptions): PluginDescriptor {
|
|
2278
|
-
* return {
|
|
2279
|
-
* id: "my-plugin",
|
|
2280
|
-
* version: "1.0.0",
|
|
2281
|
-
* entrypoint: "@my-org/dineway-plugin-foo",
|
|
2282
|
-
* options: options ?? {},
|
|
2283
|
-
* adminEntry: "@my-org/dineway-plugin-foo/admin",
|
|
2284
|
-
* adminPages: [{ path: "/settings", label: "Settings" }],
|
|
2285
|
-
* };
|
|
2286
|
-
* }
|
|
2287
|
-
* ```
|
|
2288
|
-
*/
|
|
2289
|
-
/**
|
|
2290
|
-
* Storage collection declaration for sandboxed plugins
|
|
2291
|
-
*/
|
|
2292
|
-
interface StorageCollectionDeclaration {
|
|
2293
|
-
indexes?: string[];
|
|
2294
|
-
uniqueIndexes?: string[];
|
|
2295
|
-
}
|
|
2296
|
-
interface PluginDescriptor<TOptions = Record<string, unknown>> {
|
|
2297
|
-
/** Unique plugin identifier */
|
|
2298
|
-
id: string;
|
|
2299
|
-
/** Plugin version (semver) */
|
|
2300
|
-
version: string;
|
|
2301
|
-
/** Module specifier to import (e.g., "@dineway-ai/plugin-api-test") */
|
|
2302
|
-
entrypoint: string;
|
|
2337
|
+
private executeWithTimeout;
|
|
2303
2338
|
/**
|
|
2304
|
-
*
|
|
2305
|
-
* Standard-format plugins configure themselves via KV settings
|
|
2306
|
-
* and Block Kit admin pages -- not constructor options.
|
|
2339
|
+
* Run plugin:install hooks
|
|
2307
2340
|
*/
|
|
2308
|
-
|
|
2341
|
+
runPluginInstall(pluginId: string): Promise<HookResult<void>[]>;
|
|
2309
2342
|
/**
|
|
2310
|
-
*
|
|
2311
|
-
* - `"standard"` -- exports `definePlugin({ hooks, routes })` as default.
|
|
2312
|
-
* Wrapped with `adaptSandboxEntry` for in-process execution. Can run in both
|
|
2313
|
-
* `plugins: []` (in-process) and `sandboxed: []` (isolate).
|
|
2314
|
-
* - `"native"` -- exports `createPlugin(options)` returning a `ResolvedPlugin`.
|
|
2315
|
-
* Can only run in `plugins: []`. Cannot be sandboxed or published to marketplace.
|
|
2316
|
-
*
|
|
2317
|
-
* Defaults to `"native"` when unset.
|
|
2318
|
-
*
|
|
2343
|
+
* Run plugin:activate hooks
|
|
2319
2344
|
*/
|
|
2320
|
-
|
|
2321
|
-
/** Admin UI module specifier (e.g., "@dineway-ai/plugin-audit-log/admin") */
|
|
2322
|
-
adminEntry?: string;
|
|
2323
|
-
/** Module specifier for site-side Astro rendering components (must export `blockComponents`) */
|
|
2324
|
-
componentsEntry?: string;
|
|
2325
|
-
/** Admin pages for navigation */
|
|
2326
|
-
adminPages?: PluginAdminPage[];
|
|
2327
|
-
/** Dashboard widgets */
|
|
2328
|
-
adminWidgets?: PluginDashboardWidget[];
|
|
2345
|
+
runPluginActivate(pluginId: string): Promise<HookResult<void>[]>;
|
|
2329
2346
|
/**
|
|
2330
|
-
*
|
|
2331
|
-
* For standard-format plugins, capabilities are enforced in both trusted and
|
|
2332
|
-
* sandboxed modes via the PluginContextFactory.
|
|
2347
|
+
* Run plugin:deactivate hooks
|
|
2333
2348
|
*/
|
|
2334
|
-
|
|
2349
|
+
runPluginDeactivate(pluginId: string): Promise<HookResult<void>[]>;
|
|
2335
2350
|
/**
|
|
2336
|
-
*
|
|
2337
|
-
* Supports wildcards like "*.example.com"
|
|
2351
|
+
* Run plugin:uninstall hooks
|
|
2338
2352
|
*/
|
|
2339
|
-
|
|
2353
|
+
runPluginUninstall(pluginId: string, deleteData: boolean): Promise<HookResult<void>[]>;
|
|
2354
|
+
private runLifecycleHook;
|
|
2340
2355
|
/**
|
|
2341
|
-
*
|
|
2342
|
-
*
|
|
2356
|
+
* Run content:beforeSave hooks
|
|
2357
|
+
* Returns modified content from the pipeline
|
|
2343
2358
|
*/
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
*
|
|
2349
|
-
* These run in isolated environments provided by the configured sandbox runner.
|
|
2350
|
-
* The `entrypoint` is resolved to a file and bundled at build time.
|
|
2351
|
-
*/
|
|
2352
|
-
type SandboxedPluginDescriptor<TOptions = Record<string, unknown>> = PluginDescriptor<TOptions>;
|
|
2353
|
-
interface DinewayFontsConfig {
|
|
2359
|
+
runContentBeforeSave(content: Record<string, unknown>, collection: string, isNew: boolean): Promise<{
|
|
2360
|
+
content: Record<string, unknown>;
|
|
2361
|
+
results: HookResult<Record<string, unknown>>[];
|
|
2362
|
+
}>;
|
|
2354
2363
|
/**
|
|
2355
|
-
*
|
|
2356
|
-
*
|
|
2357
|
-
* Use script names like "arabic", "farsi", "japanese", or "chinese-simplified".
|
|
2364
|
+
* Run content:afterSave hooks
|
|
2358
2365
|
*/
|
|
2359
|
-
|
|
2360
|
-
}
|
|
2361
|
-
interface DinewayConfig {
|
|
2366
|
+
runContentAfterSave(content: Record<string, unknown>, collection: string, isNew: boolean): Promise<HookResult<void>[]>;
|
|
2362
2367
|
/**
|
|
2363
|
-
*
|
|
2364
|
-
*
|
|
2365
|
-
* Use one of the adapter functions:
|
|
2366
|
-
* - `libsql({ url: process.env.DINEWAY_DATABASE_URL || "file:./data.db" })` - Default Node/libSQL path
|
|
2367
|
-
* - `sqlite({ url: "file:./data.db" })` - Local SQLite only
|
|
2368
|
-
* - `postgres({ connectionString: process.env.DATABASE_URL! })` - PostgreSQL deployments
|
|
2369
|
-
*
|
|
2370
|
-
* @example
|
|
2371
|
-
* ```ts
|
|
2372
|
-
* import { libsql } from "dineway/db";
|
|
2373
|
-
*
|
|
2374
|
-
* dineway({
|
|
2375
|
-
* database: libsql({ url: process.env.DINEWAY_DATABASE_URL || "file:./data.db" }),
|
|
2376
|
-
* })
|
|
2377
|
-
* ```
|
|
2368
|
+
* Run content:beforeDelete hooks
|
|
2369
|
+
* Returns whether deletion is allowed
|
|
2378
2370
|
*/
|
|
2379
|
-
|
|
2371
|
+
runContentBeforeDelete(id: string, collection: string): Promise<{
|
|
2372
|
+
allowed: boolean;
|
|
2373
|
+
results: HookResult<boolean>[];
|
|
2374
|
+
}>;
|
|
2380
2375
|
/**
|
|
2381
|
-
*
|
|
2376
|
+
* Run content:afterDelete hooks
|
|
2382
2377
|
*/
|
|
2383
|
-
|
|
2378
|
+
runContentAfterDelete(id: string, collection: string, permanent: boolean): Promise<HookResult<void>[]>;
|
|
2384
2379
|
/**
|
|
2385
|
-
*
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
*
|
|
2390
|
-
|
|
2380
|
+
* Run content:afterPublish hooks (fire-and-forget).
|
|
2381
|
+
*/
|
|
2382
|
+
runContentAfterPublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
|
|
2383
|
+
/**
|
|
2384
|
+
* Run content:afterUnpublish hooks (fire-and-forget).
|
|
2385
|
+
*/
|
|
2386
|
+
runContentAfterUnpublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
|
|
2387
|
+
/**
|
|
2388
|
+
* Run media:beforeUpload hooks
|
|
2389
|
+
*/
|
|
2390
|
+
runMediaBeforeUpload(file: {
|
|
2391
|
+
name: string;
|
|
2392
|
+
type: string;
|
|
2393
|
+
size: number;
|
|
2394
|
+
}): Promise<{
|
|
2395
|
+
file: {
|
|
2396
|
+
name: string;
|
|
2397
|
+
type: string;
|
|
2398
|
+
size: number;
|
|
2399
|
+
};
|
|
2400
|
+
results: HookResult<{
|
|
2401
|
+
name: string;
|
|
2402
|
+
type: string;
|
|
2403
|
+
size: number;
|
|
2404
|
+
}>[];
|
|
2405
|
+
}>;
|
|
2406
|
+
/**
|
|
2407
|
+
* Run media:afterUpload hooks
|
|
2408
|
+
*/
|
|
2409
|
+
runMediaAfterUpload(media: {
|
|
2410
|
+
id: string;
|
|
2411
|
+
filename: string;
|
|
2412
|
+
mimeType: string;
|
|
2413
|
+
size: number | null;
|
|
2414
|
+
url: string;
|
|
2415
|
+
createdAt: string;
|
|
2416
|
+
}): Promise<HookResult<void>[]>;
|
|
2417
|
+
/**
|
|
2418
|
+
* Invoke the cron hook for a specific plugin.
|
|
2391
2419
|
*
|
|
2392
|
-
*
|
|
2393
|
-
*
|
|
2394
|
-
* auditLogPlugin(),
|
|
2395
|
-
* webhookNotifierPlugin({ url: "https://example.com/webhook" }),
|
|
2396
|
-
* ],
|
|
2397
|
-
* })
|
|
2398
|
-
* ```
|
|
2420
|
+
* Unlike other hooks which broadcast to all plugins, the cron hook is
|
|
2421
|
+
* dispatched only to the target plugin — the one that owns the task.
|
|
2399
2422
|
*/
|
|
2400
|
-
|
|
2423
|
+
invokeCronHook(pluginId: string, event: CronEvent): Promise<HookResult<void>>;
|
|
2401
2424
|
/**
|
|
2402
|
-
*
|
|
2425
|
+
* Run email:beforeSend hooks (middleware pipeline).
|
|
2403
2426
|
*
|
|
2404
|
-
*
|
|
2405
|
-
*
|
|
2427
|
+
* Each handler receives the message and returns a modified message or
|
|
2428
|
+
* `false` to cancel delivery. The pipeline chains message transformations —
|
|
2429
|
+
* each handler receives the output of the previous one.
|
|
2430
|
+
*/
|
|
2431
|
+
runEmailBeforeSend(message: EmailMessage, source: string): Promise<{
|
|
2432
|
+
message: EmailMessage | false;
|
|
2433
|
+
results: HookResult<EmailMessage | false>[];
|
|
2434
|
+
}>;
|
|
2435
|
+
/**
|
|
2436
|
+
* Run email:afterSend hooks (fire-and-forget).
|
|
2406
2437
|
*
|
|
2407
|
-
*
|
|
2408
|
-
|
|
2409
|
-
|
|
2438
|
+
* Errors are logged but don't propagate — they don't affect the caller.
|
|
2439
|
+
*/
|
|
2440
|
+
runEmailAfterSend(message: EmailMessage, source: string): Promise<HookResult<void>[]>;
|
|
2441
|
+
/**
|
|
2442
|
+
* Run comment:beforeCreate hooks (middleware pipeline).
|
|
2410
2443
|
*
|
|
2411
|
-
*
|
|
2412
|
-
*
|
|
2413
|
-
*
|
|
2414
|
-
* })
|
|
2415
|
-
* ```
|
|
2444
|
+
* Each handler receives the event and returns a modified event or
|
|
2445
|
+
* `false` to reject the comment. The pipeline chains transformations —
|
|
2446
|
+
* each handler receives the output of the previous one.
|
|
2416
2447
|
*/
|
|
2417
|
-
|
|
2448
|
+
runCommentBeforeCreate(event: CommentBeforeCreateEvent): Promise<CommentBeforeCreateEvent | false>;
|
|
2418
2449
|
/**
|
|
2419
|
-
*
|
|
2420
|
-
* When omitted, Dineway uses its built-in Node sandbox runner.
|
|
2450
|
+
* Run comment:afterCreate hooks (fire-and-forget).
|
|
2421
2451
|
*
|
|
2422
|
-
*
|
|
2423
|
-
* ```ts
|
|
2424
|
-
* import { createNodeSandboxRunner } from "dineway";
|
|
2425
|
-
*
|
|
2426
|
-
* export const createSandboxRunner = createNodeSandboxRunner;
|
|
2427
|
-
* ```
|
|
2428
|
-
*
|
|
2429
|
-
* @example
|
|
2430
|
-
* ```ts
|
|
2431
|
-
* dineway({
|
|
2432
|
-
* sandboxRunner: "./src/sandbox-runner.ts",
|
|
2433
|
-
* })
|
|
2434
|
-
* ```
|
|
2452
|
+
* Errors are logged but don't propagate — they don't affect the caller.
|
|
2435
2453
|
*/
|
|
2436
|
-
|
|
2454
|
+
runCommentAfterCreate(event: CommentAfterCreateEvent): Promise<void>;
|
|
2437
2455
|
/**
|
|
2438
|
-
*
|
|
2439
|
-
*
|
|
2440
|
-
* Use an auth descriptor or an adapter function from a provider package.
|
|
2441
|
-
*
|
|
2442
|
-
* When an external auth provider is configured, passkey auth is disabled.
|
|
2456
|
+
* Run comment:afterModerate hooks (fire-and-forget).
|
|
2443
2457
|
*
|
|
2444
|
-
*
|
|
2445
|
-
* ```ts
|
|
2446
|
-
* dineway({
|
|
2447
|
-
* auth: {
|
|
2448
|
-
* type: "header-auth",
|
|
2449
|
-
* entrypoint: "./src/header-auth.ts",
|
|
2450
|
-
* config: {
|
|
2451
|
-
* userHeader: "x-forwarded-user-email",
|
|
2452
|
-
* roleHeader: "x-forwarded-user-role",
|
|
2453
|
-
* },
|
|
2454
|
-
* },
|
|
2455
|
-
* })
|
|
2456
|
-
* ```
|
|
2458
|
+
* Errors are logged but don't propagate — they don't affect the caller.
|
|
2457
2459
|
*/
|
|
2458
|
-
|
|
2460
|
+
runCommentAfterModerate(event: CommentAfterModerateEvent): Promise<void>;
|
|
2459
2461
|
/**
|
|
2460
|
-
*
|
|
2461
|
-
*
|
|
2462
|
-
* Exposes an MCP Streamable HTTP server at `/_dineway/api/mcp`
|
|
2463
|
-
* that allows AI agents and tools to interact with the CMS using
|
|
2464
|
-
* the standardized MCP protocol.
|
|
2465
|
-
*
|
|
2466
|
-
* Enabled by default. The endpoint requires bearer token auth, so
|
|
2467
|
-
* it has no practical effect unless the user creates an API token
|
|
2468
|
-
* or configures an OAuth client. Set to `false` to disable.
|
|
2469
|
-
*
|
|
2470
|
-
* @default true
|
|
2471
|
-
*
|
|
2472
|
-
* @example
|
|
2473
|
-
* ```ts
|
|
2474
|
-
* dineway({
|
|
2475
|
-
* mcp: false,
|
|
2476
|
-
* })
|
|
2477
|
-
* ```
|
|
2462
|
+
* Run page:metadata hooks. Each handler returns contributions that are
|
|
2463
|
+
* merged by the metadata collector. Errors are logged but don't propagate.
|
|
2478
2464
|
*/
|
|
2479
|
-
|
|
2465
|
+
runPageMetadata(event: PageMetadataEvent): Promise<Array<{
|
|
2466
|
+
pluginId: string;
|
|
2467
|
+
contributions: PageMetadataContribution[];
|
|
2468
|
+
}>>;
|
|
2480
2469
|
/**
|
|
2481
|
-
*
|
|
2482
|
-
*
|
|
2483
|
-
* When set, enables the marketplace features: browse, install, update,
|
|
2484
|
-
* and uninstall plugins from a remote marketplace.
|
|
2485
|
-
*
|
|
2486
|
-
* Must be an HTTPS URL in production, or localhost/127.0.0.1 in dev.
|
|
2487
|
-
* Marketplace plugins run in the built-in Node sandbox runner unless
|
|
2488
|
-
* `sandboxRunner` is set to override it.
|
|
2489
|
-
*
|
|
2490
|
-
* @example
|
|
2491
|
-
* ```ts
|
|
2492
|
-
* dineway({
|
|
2493
|
-
* marketplace: "https://marketplace.example.com",
|
|
2494
|
-
* })
|
|
2495
|
-
* ```
|
|
2470
|
+
* Run page:fragments hooks. Only trusted plugins should be registered
|
|
2471
|
+
* for this hook. Errors are logged but don't propagate.
|
|
2496
2472
|
*/
|
|
2497
|
-
|
|
2473
|
+
runPageFragments(event: PageFragmentEvent): Promise<Array<{
|
|
2474
|
+
pluginId: string;
|
|
2475
|
+
contributions: PageFragmentContribution[];
|
|
2476
|
+
}>>;
|
|
2498
2477
|
/**
|
|
2499
|
-
*
|
|
2500
|
-
*
|
|
2501
|
-
* Applies to both direct multipart uploads and signed-URL uploads.
|
|
2502
|
-
* When omitted, Dineway defaults to 52_428_800 (50 MB).
|
|
2503
|
-
*
|
|
2504
|
-
* @example
|
|
2505
|
-
* ```ts
|
|
2506
|
-
* dineway({ maxUploadSize: 100 * 1024 * 1024 }) // 100 MB
|
|
2507
|
-
* ```
|
|
2478
|
+
* Check if any hooks are registered for a given name
|
|
2508
2479
|
*/
|
|
2509
|
-
|
|
2480
|
+
hasHooks(name: HookNameV2): boolean;
|
|
2510
2481
|
/**
|
|
2511
|
-
*
|
|
2512
|
-
*
|
|
2513
|
-
* Use this to customize the logo, name, and favicon shown in the
|
|
2514
|
-
* Dineway admin panel without changing public site identity settings.
|
|
2515
|
-
*
|
|
2516
|
-
* @example
|
|
2517
|
-
* ```ts
|
|
2518
|
-
* dineway({
|
|
2519
|
-
* admin: {
|
|
2520
|
-
* logo: "/images/agency-logo.svg",
|
|
2521
|
-
* siteName: "Agency Console",
|
|
2522
|
-
* favicon: "/agency-favicon.ico",
|
|
2523
|
-
* },
|
|
2524
|
-
* })
|
|
2525
|
-
* ```
|
|
2482
|
+
* Get hook count for debugging
|
|
2526
2483
|
*/
|
|
2527
|
-
|
|
2528
|
-
/** URL or path to a custom logo image for the admin UI. */logo?: string; /** Custom name displayed in the admin sidebar and browser tab. */
|
|
2529
|
-
siteName?: string; /** URL or path to a custom favicon for the admin panel. */
|
|
2530
|
-
favicon?: string;
|
|
2531
|
-
};
|
|
2484
|
+
getHookCount(name: HookNameV2): number;
|
|
2532
2485
|
/**
|
|
2533
|
-
*
|
|
2534
|
-
*
|
|
2535
|
-
* By default, Dineway uses the Astro Font API to load Noto Sans at
|
|
2536
|
-
* build time and self-host the generated font files. Set to false to
|
|
2537
|
-
* disable Dineway-managed fonts and use system fonts.
|
|
2538
|
-
*
|
|
2539
|
-
* @example
|
|
2540
|
-
* ```ts
|
|
2541
|
-
* dineway({
|
|
2542
|
-
* fonts: {
|
|
2543
|
-
* scripts: ["arabic", "farsi", "japanese"],
|
|
2544
|
-
* },
|
|
2545
|
-
* })
|
|
2546
|
-
* ```
|
|
2486
|
+
* Get all registered hook names
|
|
2547
2487
|
*/
|
|
2548
|
-
|
|
2488
|
+
getRegisteredHooks(): HookNameV2[];
|
|
2549
2489
|
/**
|
|
2550
|
-
*
|
|
2551
|
-
*
|
|
2552
|
-
* Use when `Astro.url` / `request.url` do not match what users open — common with a
|
|
2553
|
-
* **TLS-terminating reverse proxy**: the app often sees `http://` on the internal hop
|
|
2554
|
-
* while the browser uses `https://`, which breaks WebAuthn, CSRF, OAuth, and redirect URLs.
|
|
2555
|
-
*
|
|
2556
|
-
* Set to the full origin users type in the address bar (no path), e.g.
|
|
2557
|
-
* `https://mysite.example.com`. When not set, falls back to environment variables
|
|
2558
|
-
* `DINEWAY_SITE_URL` > `SITE_URL`, then to the request URL's origin.
|
|
2559
|
-
*
|
|
2560
|
-
* Replaces `passkeyPublicOrigin` (which only fixed passkeys).
|
|
2490
|
+
* Returns hook names where at least one handler declared exclusive: true
|
|
2561
2491
|
*/
|
|
2562
|
-
|
|
2492
|
+
getRegisteredExclusiveHooks(): string[];
|
|
2563
2493
|
/**
|
|
2564
|
-
*
|
|
2565
|
-
*
|
|
2566
|
-
* Defaults to no trusted headers. Set this only when Dineway is deployed
|
|
2567
|
-
* behind a reverse proxy you control and that proxy strips or overwrites
|
|
2568
|
-
* incoming client-supplied copies of these headers.
|
|
2569
|
-
*
|
|
2570
|
-
* When omitted, Dineway falls back to `DINEWAY_TRUSTED_PROXY_HEADERS`.
|
|
2571
|
-
*
|
|
2572
|
-
* @example
|
|
2573
|
-
* ```ts
|
|
2574
|
-
* dineway({
|
|
2575
|
-
* trustedProxyHeaders: ["x-real-ip", "x-forwarded-for"],
|
|
2576
|
-
* })
|
|
2577
|
-
* ```
|
|
2494
|
+
* Check if a hook is exclusive
|
|
2578
2495
|
*/
|
|
2579
|
-
|
|
2496
|
+
isExclusiveHook(name: string): boolean;
|
|
2580
2497
|
/**
|
|
2581
|
-
*
|
|
2582
|
-
*
|
|
2583
|
-
* When set, the integration injects a playground middleware (order: "pre")
|
|
2584
|
-
* that runs BEFORE the normal Dineway middleware chain. It creates an
|
|
2585
|
-
* isolated session database per visitor, runs migrations, applies the
|
|
2586
|
-
* seed, creates an anonymous admin user, and stashes the request-scoped
|
|
2587
|
-
* database on locals so the runtime and request-context middleware can
|
|
2588
|
-
* pick it up.
|
|
2589
|
-
*
|
|
2590
|
-
* Setup and auth middleware are skipped because the playground middleware
|
|
2591
|
-
* handles bootstrap and user injection.
|
|
2592
|
-
*
|
|
2593
|
-
* For the first portable release, playground sidecars are explicitly
|
|
2594
|
-
* single-instance only.
|
|
2595
|
-
*
|
|
2596
|
-
* @example
|
|
2597
|
-
* ```ts
|
|
2598
|
-
* import { fileURLToPath } from "node:url";
|
|
2599
|
-
* import { libsql } from "dineway/db";
|
|
2600
|
-
*
|
|
2601
|
-
* dineway({
|
|
2602
|
-
* database: libsql({ url: process.env.DINEWAY_DATABASE_URL || "file:./playground.db" }),
|
|
2603
|
-
* playground: {
|
|
2604
|
-
* middlewareEntrypoint: fileURLToPath(
|
|
2605
|
-
* new URL("./src/playground-middleware.ts", import.meta.url)
|
|
2606
|
-
* ),
|
|
2607
|
-
* },
|
|
2608
|
-
* })
|
|
2609
|
-
* ```
|
|
2498
|
+
* Set the selected provider for an exclusive hook.
|
|
2499
|
+
* Called by PluginManager after resolution.
|
|
2610
2500
|
*/
|
|
2611
|
-
|
|
2612
|
-
/** Module path for the playground middleware. */middlewareEntrypoint: string;
|
|
2613
|
-
};
|
|
2501
|
+
setExclusiveSelection(hookName: string, pluginId: string): void;
|
|
2614
2502
|
/**
|
|
2615
|
-
*
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
*
|
|
2503
|
+
* Clear the selected provider for an exclusive hook.
|
|
2504
|
+
*/
|
|
2505
|
+
clearExclusiveSelection(hookName: string): void;
|
|
2506
|
+
/**
|
|
2507
|
+
* Get the selected provider for an exclusive hook (if any).
|
|
2508
|
+
*/
|
|
2509
|
+
getExclusiveSelection(hookName: string): string | undefined;
|
|
2510
|
+
/**
|
|
2511
|
+
* Get all plugins that registered a handler for a given exclusive hook.
|
|
2512
|
+
*/
|
|
2513
|
+
getExclusiveHookProviders(hookName: string): Array<{
|
|
2514
|
+
pluginId: string;
|
|
2515
|
+
}>;
|
|
2516
|
+
/**
|
|
2517
|
+
* Get all plugins that registered a non-exclusive handler for a given hook,
|
|
2518
|
+
* preserving priority order. This partitions with getExclusiveHookProviders().
|
|
2519
|
+
*/
|
|
2520
|
+
getHookProviders(hookName: string): Array<{
|
|
2521
|
+
pluginId: string;
|
|
2522
|
+
}>;
|
|
2523
|
+
/**
|
|
2524
|
+
* Invoke an exclusive hook — dispatch only to the selected provider.
|
|
2525
|
+
* Returns null if no provider is selected or if the selected hook
|
|
2526
|
+
* is not found in the pipeline.
|
|
2620
2527
|
*
|
|
2621
|
-
*
|
|
2622
|
-
*
|
|
2623
|
-
*
|
|
2528
|
+
* This is a generic dispatch used by the email pipeline and other
|
|
2529
|
+
* exclusive hook consumers. The handler type is unknown — callers
|
|
2530
|
+
* must know the expected signature.
|
|
2624
2531
|
*
|
|
2625
|
-
*
|
|
2626
|
-
*
|
|
2627
|
-
* unsplash({ accessKey: "..." }),
|
|
2628
|
-
* ],
|
|
2629
|
-
* })
|
|
2630
|
-
* ```
|
|
2532
|
+
* Errors are isolated: a failing handler returns an error result
|
|
2533
|
+
* instead of propagating the exception to the caller.
|
|
2631
2534
|
*/
|
|
2632
|
-
|
|
2535
|
+
invokeExclusiveHook(hookName: string, event: unknown): Promise<{
|
|
2536
|
+
result: unknown;
|
|
2537
|
+
pluginId: string;
|
|
2538
|
+
error?: Error;
|
|
2539
|
+
duration: number;
|
|
2540
|
+
} | null>;
|
|
2633
2541
|
}
|
|
2634
2542
|
/**
|
|
2635
|
-
*
|
|
2636
|
-
* This is set by the virtual module at build time
|
|
2543
|
+
* Create a hook pipeline from plugins
|
|
2637
2544
|
*/
|
|
2638
|
-
declare function
|
|
2639
|
-
declare global {
|
|
2640
|
-
var __dinewayConfig: DinewayConfig | undefined;
|
|
2641
|
-
}
|
|
2642
|
-
//#endregion
|
|
2643
|
-
//#region src/plugins/manifest-schema.d.ts
|
|
2644
|
-
/**
|
|
2645
|
-
* Zod schema matching the PluginManifest interface from types.ts.
|
|
2646
|
-
*
|
|
2647
|
-
* Every JSON.parse of a manifest.json should validate through this.
|
|
2648
|
-
*/
|
|
2649
|
-
declare const pluginManifestSchema: z$1.ZodObject<{
|
|
2650
|
-
id: z$1.ZodString;
|
|
2651
|
-
version: z$1.ZodString;
|
|
2652
|
-
capabilities: z$1.ZodArray<z$1.ZodEnum<{
|
|
2653
|
-
"network:fetch": "network:fetch";
|
|
2654
|
-
"network:fetch:any": "network:fetch:any";
|
|
2655
|
-
"read:content": "read:content";
|
|
2656
|
-
"write:content": "write:content";
|
|
2657
|
-
"read:media": "read:media";
|
|
2658
|
-
"write:media": "write:media";
|
|
2659
|
-
"read:users": "read:users";
|
|
2660
|
-
"email:send": "email:send";
|
|
2661
|
-
"email:provide": "email:provide";
|
|
2662
|
-
"email:intercept": "email:intercept";
|
|
2663
|
-
"page:inject": "page:inject";
|
|
2664
|
-
}>>;
|
|
2665
|
-
allowedHosts: z$1.ZodArray<z$1.ZodString>;
|
|
2666
|
-
storage: z$1.ZodRecord<z$1.ZodString, z$1.ZodObject<{
|
|
2667
|
-
indexes: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodArray<z$1.ZodString>]>>;
|
|
2668
|
-
uniqueIndexes: z$1.ZodOptional<z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodArray<z$1.ZodString>]>>>;
|
|
2669
|
-
}, z$1.core.$strip>>;
|
|
2670
|
-
hooks: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodEnum<{
|
|
2671
|
-
"plugin:install": "plugin:install";
|
|
2672
|
-
"plugin:activate": "plugin:activate";
|
|
2673
|
-
"plugin:deactivate": "plugin:deactivate";
|
|
2674
|
-
"plugin:uninstall": "plugin:uninstall";
|
|
2675
|
-
"content:beforeSave": "content:beforeSave";
|
|
2676
|
-
"content:afterSave": "content:afterSave";
|
|
2677
|
-
"content:beforeDelete": "content:beforeDelete";
|
|
2678
|
-
"content:afterDelete": "content:afterDelete";
|
|
2679
|
-
"content:afterPublish": "content:afterPublish";
|
|
2680
|
-
"content:afterUnpublish": "content:afterUnpublish";
|
|
2681
|
-
"media:beforeUpload": "media:beforeUpload";
|
|
2682
|
-
"media:afterUpload": "media:afterUpload";
|
|
2683
|
-
cron: "cron";
|
|
2684
|
-
"email:beforeSend": "email:beforeSend";
|
|
2685
|
-
"email:deliver": "email:deliver";
|
|
2686
|
-
"email:afterSend": "email:afterSend";
|
|
2687
|
-
"comment:beforeCreate": "comment:beforeCreate";
|
|
2688
|
-
"comment:moderate": "comment:moderate";
|
|
2689
|
-
"comment:afterCreate": "comment:afterCreate";
|
|
2690
|
-
"comment:afterModerate": "comment:afterModerate";
|
|
2691
|
-
"page:metadata": "page:metadata";
|
|
2692
|
-
"page:fragments": "page:fragments";
|
|
2693
|
-
}>, z$1.ZodObject<{
|
|
2694
|
-
name: z$1.ZodEnum<{
|
|
2695
|
-
"plugin:install": "plugin:install";
|
|
2696
|
-
"plugin:activate": "plugin:activate";
|
|
2697
|
-
"plugin:deactivate": "plugin:deactivate";
|
|
2698
|
-
"plugin:uninstall": "plugin:uninstall";
|
|
2699
|
-
"content:beforeSave": "content:beforeSave";
|
|
2700
|
-
"content:afterSave": "content:afterSave";
|
|
2701
|
-
"content:beforeDelete": "content:beforeDelete";
|
|
2702
|
-
"content:afterDelete": "content:afterDelete";
|
|
2703
|
-
"content:afterPublish": "content:afterPublish";
|
|
2704
|
-
"content:afterUnpublish": "content:afterUnpublish";
|
|
2705
|
-
"media:beforeUpload": "media:beforeUpload";
|
|
2706
|
-
"media:afterUpload": "media:afterUpload";
|
|
2707
|
-
cron: "cron";
|
|
2708
|
-
"email:beforeSend": "email:beforeSend";
|
|
2709
|
-
"email:deliver": "email:deliver";
|
|
2710
|
-
"email:afterSend": "email:afterSend";
|
|
2711
|
-
"comment:beforeCreate": "comment:beforeCreate";
|
|
2712
|
-
"comment:moderate": "comment:moderate";
|
|
2713
|
-
"comment:afterCreate": "comment:afterCreate";
|
|
2714
|
-
"comment:afterModerate": "comment:afterModerate";
|
|
2715
|
-
"page:metadata": "page:metadata";
|
|
2716
|
-
"page:fragments": "page:fragments";
|
|
2717
|
-
}>;
|
|
2718
|
-
exclusive: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2719
|
-
priority: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2720
|
-
timeout: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2721
|
-
}, z$1.core.$strip>]>>;
|
|
2722
|
-
routes: z$1.ZodArray<z$1.ZodUnion<readonly [z$1.ZodString, z$1.ZodObject<{
|
|
2723
|
-
name: z$1.ZodString;
|
|
2724
|
-
public: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2725
|
-
}, z$1.core.$strip>]>>;
|
|
2726
|
-
admin: z$1.ZodObject<{
|
|
2727
|
-
entry: z$1.ZodOptional<z$1.ZodString>;
|
|
2728
|
-
settingsSchema: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
2729
|
-
type: z$1.ZodLiteral<"string">;
|
|
2730
|
-
default: z$1.ZodOptional<z$1.ZodString>;
|
|
2731
|
-
multiline: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2732
|
-
label: z$1.ZodString;
|
|
2733
|
-
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2734
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2735
|
-
type: z$1.ZodLiteral<"number">;
|
|
2736
|
-
default: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2737
|
-
min: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2738
|
-
max: z$1.ZodOptional<z$1.ZodNumber>;
|
|
2739
|
-
label: z$1.ZodString;
|
|
2740
|
-
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2741
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2742
|
-
type: z$1.ZodLiteral<"boolean">;
|
|
2743
|
-
default: z$1.ZodOptional<z$1.ZodBoolean>;
|
|
2744
|
-
label: z$1.ZodString;
|
|
2745
|
-
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2746
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2747
|
-
type: z$1.ZodLiteral<"select">;
|
|
2748
|
-
options: z$1.ZodArray<z$1.ZodObject<{
|
|
2749
|
-
value: z$1.ZodString;
|
|
2750
|
-
label: z$1.ZodString;
|
|
2751
|
-
}, z$1.core.$strip>>;
|
|
2752
|
-
default: z$1.ZodOptional<z$1.ZodString>;
|
|
2753
|
-
label: z$1.ZodString;
|
|
2754
|
-
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2755
|
-
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2756
|
-
type: z$1.ZodLiteral<"secret">;
|
|
2757
|
-
label: z$1.ZodString;
|
|
2758
|
-
description: z$1.ZodOptional<z$1.ZodString>;
|
|
2759
|
-
}, z$1.core.$strip>], "type">>>;
|
|
2760
|
-
pages: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2761
|
-
path: z$1.ZodString;
|
|
2762
|
-
label: z$1.ZodString;
|
|
2763
|
-
icon: z$1.ZodOptional<z$1.ZodString>;
|
|
2764
|
-
}, z$1.core.$strip>>>;
|
|
2765
|
-
widgets: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2766
|
-
id: z$1.ZodString;
|
|
2767
|
-
size: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2768
|
-
full: "full";
|
|
2769
|
-
half: "half";
|
|
2770
|
-
third: "third";
|
|
2771
|
-
}>>;
|
|
2772
|
-
title: z$1.ZodOptional<z$1.ZodString>;
|
|
2773
|
-
}, z$1.core.$strip>>>;
|
|
2774
|
-
fieldWidgets: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2775
|
-
name: z$1.ZodString;
|
|
2776
|
-
label: z$1.ZodString;
|
|
2777
|
-
fieldTypes: z$1.ZodArray<z$1.ZodEnum<{
|
|
2778
|
-
string: "string";
|
|
2779
|
-
number: "number";
|
|
2780
|
-
boolean: "boolean";
|
|
2781
|
-
text: "text";
|
|
2782
|
-
integer: "integer";
|
|
2783
|
-
datetime: "datetime";
|
|
2784
|
-
select: "select";
|
|
2785
|
-
multiSelect: "multiSelect";
|
|
2786
|
-
portableText: "portableText";
|
|
2787
|
-
image: "image";
|
|
2788
|
-
file: "file";
|
|
2789
|
-
reference: "reference";
|
|
2790
|
-
json: "json";
|
|
2791
|
-
slug: "slug";
|
|
2792
|
-
repeater: "repeater";
|
|
2793
|
-
}>>;
|
|
2794
|
-
elements: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
|
|
2795
|
-
type: z$1.ZodString;
|
|
2796
|
-
action_id: z$1.ZodString;
|
|
2797
|
-
label: z$1.ZodOptional<z$1.ZodString>;
|
|
2798
|
-
}, z$1.core.$loose>>>;
|
|
2799
|
-
}, z$1.core.$strip>>>;
|
|
2800
|
-
}, z$1.core.$strip>;
|
|
2801
|
-
}, z$1.core.$strip>;
|
|
2802
|
-
type ValidatedPluginManifest = z$1.infer<typeof pluginManifestSchema>;
|
|
2803
|
-
//#endregion
|
|
2804
|
-
//#region src/plugins/hooks.d.ts
|
|
2805
|
-
type HookNameV2 = "plugin:install" | "plugin:activate" | "plugin:deactivate" | "plugin:uninstall" | "content:beforeSave" | "content:afterSave" | "content:beforeDelete" | "content:afterDelete" | "content:afterPublish" | "content:afterUnpublish" | "media:beforeUpload" | "media:afterUpload" | "cron" | "email:beforeSend" | "email:deliver" | "email:afterSend" | "comment:beforeCreate" | "comment:moderate" | "comment:afterCreate" | "comment:afterModerate" | "page:metadata" | "page:fragments";
|
|
2806
|
-
/**
|
|
2807
|
-
* Hook execution result
|
|
2808
|
-
*/
|
|
2809
|
-
interface HookResult<T> {
|
|
2810
|
-
success: boolean;
|
|
2811
|
-
value?: T;
|
|
2812
|
-
error?: Error;
|
|
2813
|
-
pluginId: string;
|
|
2814
|
-
duration: number;
|
|
2815
|
-
}
|
|
2816
|
-
/**
|
|
2817
|
-
* Hook pipeline for executing hooks in order
|
|
2818
|
-
*/
|
|
2819
|
-
declare class HookPipeline {
|
|
2820
|
-
private hooks;
|
|
2821
|
-
private pluginMap;
|
|
2822
|
-
private contextFactory;
|
|
2823
|
-
/** Stored so setContextFactory can merge incrementally. */
|
|
2824
|
-
private contextFactoryOptions;
|
|
2825
|
-
/** Hook names where at least one handler declared exclusive: true */
|
|
2826
|
-
private exclusiveHookNames;
|
|
2827
|
-
/**
|
|
2828
|
-
* Selected provider plugin ID for each exclusive hook.
|
|
2829
|
-
* Set by the PluginManager after resolution.
|
|
2830
|
-
*/
|
|
2831
|
-
private exclusiveSelections;
|
|
2832
|
-
constructor(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions);
|
|
2833
|
-
/**
|
|
2834
|
-
* Set or update the context factory options.
|
|
2835
|
-
*
|
|
2836
|
-
* When called on a pipeline that already has a factory, the new options
|
|
2837
|
-
* are merged on top of the existing ones so that callers don't need to
|
|
2838
|
-
* repeat every field (e.g. adding `cronReschedule` without losing
|
|
2839
|
-
* `storage` / `getUploadUrl`).
|
|
2840
|
-
*/
|
|
2841
|
-
setContextFactory(options: Partial<PluginContextFactoryOptions>): void;
|
|
2842
|
-
/**
|
|
2843
|
-
* Get context for a plugin
|
|
2844
|
-
*/
|
|
2845
|
-
private getContext;
|
|
2846
|
-
/**
|
|
2847
|
-
* Get typed hooks for a specific hook name.
|
|
2848
|
-
* The internal map stores ResolvedHook<unknown>, but we know each name
|
|
2849
|
-
* maps to a specific handler type via HookHandlerMap.
|
|
2850
|
-
*
|
|
2851
|
-
* Exclusive hooks that have a selected provider are filtered out — they
|
|
2852
|
-
* should only run via invokeExclusiveHook(), not in the regular pipeline.
|
|
2853
|
-
*/
|
|
2854
|
-
private getTypedHooks;
|
|
2855
|
-
/**
|
|
2856
|
-
* Register all hooks from plugins.
|
|
2857
|
-
*
|
|
2858
|
-
* Registers each hook name individually to preserve type safety. The
|
|
2859
|
-
* internal map stores ResolvedHook<unknown> since it's keyed by string,
|
|
2860
|
-
* but getTypedHooks() restores the correct handler type on retrieval.
|
|
2861
|
-
*/
|
|
2862
|
-
private registerPlugins;
|
|
2863
|
-
/**
|
|
2864
|
-
* Maps hook names to the capability required to register them.
|
|
2865
|
-
*
|
|
2866
|
-
* Hooks not listed here have no capability requirement (e.g. lifecycle
|
|
2867
|
-
* hooks, cron). Any plugin declaring a listed hook without the required
|
|
2868
|
-
* capability will have that hook silently skipped at registration time.
|
|
2869
|
-
*/
|
|
2870
|
-
private static readonly HOOK_REQUIRED_CAPABILITY;
|
|
2871
|
-
/**
|
|
2872
|
-
* Register a single plugin's hook by name
|
|
2873
|
-
*/
|
|
2874
|
-
private registerPluginHook;
|
|
2875
|
-
/**
|
|
2876
|
-
* Register a single hook
|
|
2877
|
-
*/
|
|
2878
|
-
private registerHook;
|
|
2879
|
-
/**
|
|
2880
|
-
* Sort hooks by priority and dependencies
|
|
2881
|
-
*/
|
|
2882
|
-
private sortHooks;
|
|
2883
|
-
/**
|
|
2884
|
-
* Execute a hook with timeout
|
|
2885
|
-
*/
|
|
2886
|
-
private executeWithTimeout;
|
|
2887
|
-
/**
|
|
2888
|
-
* Run plugin:install hooks
|
|
2889
|
-
*/
|
|
2890
|
-
runPluginInstall(pluginId: string): Promise<HookResult<void>[]>;
|
|
2891
|
-
/**
|
|
2892
|
-
* Run plugin:activate hooks
|
|
2893
|
-
*/
|
|
2894
|
-
runPluginActivate(pluginId: string): Promise<HookResult<void>[]>;
|
|
2895
|
-
/**
|
|
2896
|
-
* Run plugin:deactivate hooks
|
|
2897
|
-
*/
|
|
2898
|
-
runPluginDeactivate(pluginId: string): Promise<HookResult<void>[]>;
|
|
2899
|
-
/**
|
|
2900
|
-
* Run plugin:uninstall hooks
|
|
2901
|
-
*/
|
|
2902
|
-
runPluginUninstall(pluginId: string, deleteData: boolean): Promise<HookResult<void>[]>;
|
|
2903
|
-
private runLifecycleHook;
|
|
2904
|
-
/**
|
|
2905
|
-
* Run content:beforeSave hooks
|
|
2906
|
-
* Returns modified content from the pipeline
|
|
2907
|
-
*/
|
|
2908
|
-
runContentBeforeSave(content: Record<string, unknown>, collection: string, isNew: boolean): Promise<{
|
|
2909
|
-
content: Record<string, unknown>;
|
|
2910
|
-
results: HookResult<Record<string, unknown>>[];
|
|
2911
|
-
}>;
|
|
2912
|
-
/**
|
|
2913
|
-
* Run content:afterSave hooks
|
|
2914
|
-
*/
|
|
2915
|
-
runContentAfterSave(content: Record<string, unknown>, collection: string, isNew: boolean): Promise<HookResult<void>[]>;
|
|
2916
|
-
/**
|
|
2917
|
-
* Run content:beforeDelete hooks
|
|
2918
|
-
* Returns whether deletion is allowed
|
|
2919
|
-
*/
|
|
2920
|
-
runContentBeforeDelete(id: string, collection: string): Promise<{
|
|
2921
|
-
allowed: boolean;
|
|
2922
|
-
results: HookResult<boolean>[];
|
|
2923
|
-
}>;
|
|
2924
|
-
/**
|
|
2925
|
-
* Run content:afterDelete hooks
|
|
2926
|
-
*/
|
|
2927
|
-
runContentAfterDelete(id: string, collection: string, permanent: boolean): Promise<HookResult<void>[]>;
|
|
2928
|
-
/**
|
|
2929
|
-
* Run content:afterPublish hooks (fire-and-forget).
|
|
2930
|
-
*/
|
|
2931
|
-
runContentAfterPublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
|
|
2932
|
-
/**
|
|
2933
|
-
* Run content:afterUnpublish hooks (fire-and-forget).
|
|
2934
|
-
*/
|
|
2935
|
-
runContentAfterUnpublish(content: Record<string, unknown>, collection: string): Promise<HookResult<void>[]>;
|
|
2936
|
-
/**
|
|
2937
|
-
* Run media:beforeUpload hooks
|
|
2938
|
-
*/
|
|
2939
|
-
runMediaBeforeUpload(file: {
|
|
2940
|
-
name: string;
|
|
2941
|
-
type: string;
|
|
2942
|
-
size: number;
|
|
2943
|
-
}): Promise<{
|
|
2944
|
-
file: {
|
|
2945
|
-
name: string;
|
|
2946
|
-
type: string;
|
|
2947
|
-
size: number;
|
|
2948
|
-
};
|
|
2949
|
-
results: HookResult<{
|
|
2950
|
-
name: string;
|
|
2951
|
-
type: string;
|
|
2952
|
-
size: number;
|
|
2953
|
-
}>[];
|
|
2954
|
-
}>;
|
|
2955
|
-
/**
|
|
2956
|
-
* Run media:afterUpload hooks
|
|
2957
|
-
*/
|
|
2958
|
-
runMediaAfterUpload(media: {
|
|
2959
|
-
id: string;
|
|
2960
|
-
filename: string;
|
|
2961
|
-
mimeType: string;
|
|
2962
|
-
size: number | null;
|
|
2963
|
-
url: string;
|
|
2964
|
-
createdAt: string;
|
|
2965
|
-
}): Promise<HookResult<void>[]>;
|
|
2966
|
-
/**
|
|
2967
|
-
* Invoke the cron hook for a specific plugin.
|
|
2968
|
-
*
|
|
2969
|
-
* Unlike other hooks which broadcast to all plugins, the cron hook is
|
|
2970
|
-
* dispatched only to the target plugin — the one that owns the task.
|
|
2971
|
-
*/
|
|
2972
|
-
invokeCronHook(pluginId: string, event: CronEvent): Promise<HookResult<void>>;
|
|
2973
|
-
/**
|
|
2974
|
-
* Run email:beforeSend hooks (middleware pipeline).
|
|
2975
|
-
*
|
|
2976
|
-
* Each handler receives the message and returns a modified message or
|
|
2977
|
-
* `false` to cancel delivery. The pipeline chains message transformations —
|
|
2978
|
-
* each handler receives the output of the previous one.
|
|
2979
|
-
*/
|
|
2980
|
-
runEmailBeforeSend(message: EmailMessage, source: string): Promise<{
|
|
2981
|
-
message: EmailMessage | false;
|
|
2982
|
-
results: HookResult<EmailMessage | false>[];
|
|
2983
|
-
}>;
|
|
2984
|
-
/**
|
|
2985
|
-
* Run email:afterSend hooks (fire-and-forget).
|
|
2986
|
-
*
|
|
2987
|
-
* Errors are logged but don't propagate — they don't affect the caller.
|
|
2988
|
-
*/
|
|
2989
|
-
runEmailAfterSend(message: EmailMessage, source: string): Promise<HookResult<void>[]>;
|
|
2990
|
-
/**
|
|
2991
|
-
* Run comment:beforeCreate hooks (middleware pipeline).
|
|
2992
|
-
*
|
|
2993
|
-
* Each handler receives the event and returns a modified event or
|
|
2994
|
-
* `false` to reject the comment. The pipeline chains transformations —
|
|
2995
|
-
* each handler receives the output of the previous one.
|
|
2996
|
-
*/
|
|
2997
|
-
runCommentBeforeCreate(event: CommentBeforeCreateEvent): Promise<CommentBeforeCreateEvent | false>;
|
|
2998
|
-
/**
|
|
2999
|
-
* Run comment:afterCreate hooks (fire-and-forget).
|
|
3000
|
-
*
|
|
3001
|
-
* Errors are logged but don't propagate — they don't affect the caller.
|
|
3002
|
-
*/
|
|
3003
|
-
runCommentAfterCreate(event: CommentAfterCreateEvent): Promise<void>;
|
|
3004
|
-
/**
|
|
3005
|
-
* Run comment:afterModerate hooks (fire-and-forget).
|
|
3006
|
-
*
|
|
3007
|
-
* Errors are logged but don't propagate — they don't affect the caller.
|
|
3008
|
-
*/
|
|
3009
|
-
runCommentAfterModerate(event: CommentAfterModerateEvent): Promise<void>;
|
|
3010
|
-
/**
|
|
3011
|
-
* Run page:metadata hooks. Each handler returns contributions that are
|
|
3012
|
-
* merged by the metadata collector. Errors are logged but don't propagate.
|
|
3013
|
-
*/
|
|
3014
|
-
runPageMetadata(event: PageMetadataEvent): Promise<Array<{
|
|
3015
|
-
pluginId: string;
|
|
3016
|
-
contributions: PageMetadataContribution[];
|
|
3017
|
-
}>>;
|
|
3018
|
-
/**
|
|
3019
|
-
* Run page:fragments hooks. Only trusted plugins should be registered
|
|
3020
|
-
* for this hook. Errors are logged but don't propagate.
|
|
3021
|
-
*/
|
|
3022
|
-
runPageFragments(event: PageFragmentEvent): Promise<Array<{
|
|
3023
|
-
pluginId: string;
|
|
3024
|
-
contributions: PageFragmentContribution[];
|
|
3025
|
-
}>>;
|
|
3026
|
-
/**
|
|
3027
|
-
* Check if any hooks are registered for a given name
|
|
3028
|
-
*/
|
|
3029
|
-
hasHooks(name: HookNameV2): boolean;
|
|
3030
|
-
/**
|
|
3031
|
-
* Get hook count for debugging
|
|
3032
|
-
*/
|
|
3033
|
-
getHookCount(name: HookNameV2): number;
|
|
3034
|
-
/**
|
|
3035
|
-
* Get all registered hook names
|
|
3036
|
-
*/
|
|
3037
|
-
getRegisteredHooks(): HookNameV2[];
|
|
3038
|
-
/**
|
|
3039
|
-
* Returns hook names where at least one handler declared exclusive: true
|
|
3040
|
-
*/
|
|
3041
|
-
getRegisteredExclusiveHooks(): string[];
|
|
3042
|
-
/**
|
|
3043
|
-
* Check if a hook is exclusive
|
|
3044
|
-
*/
|
|
3045
|
-
isExclusiveHook(name: string): boolean;
|
|
3046
|
-
/**
|
|
3047
|
-
* Set the selected provider for an exclusive hook.
|
|
3048
|
-
* Called by PluginManager after resolution.
|
|
3049
|
-
*/
|
|
3050
|
-
setExclusiveSelection(hookName: string, pluginId: string): void;
|
|
3051
|
-
/**
|
|
3052
|
-
* Clear the selected provider for an exclusive hook.
|
|
3053
|
-
*/
|
|
3054
|
-
clearExclusiveSelection(hookName: string): void;
|
|
3055
|
-
/**
|
|
3056
|
-
* Get the selected provider for an exclusive hook (if any).
|
|
3057
|
-
*/
|
|
3058
|
-
getExclusiveSelection(hookName: string): string | undefined;
|
|
3059
|
-
/**
|
|
3060
|
-
* Get all plugins that registered a handler for a given exclusive hook.
|
|
3061
|
-
*/
|
|
3062
|
-
getExclusiveHookProviders(hookName: string): Array<{
|
|
3063
|
-
pluginId: string;
|
|
3064
|
-
}>;
|
|
3065
|
-
/**
|
|
3066
|
-
* Invoke an exclusive hook — dispatch only to the selected provider.
|
|
3067
|
-
* Returns null if no provider is selected or if the selected hook
|
|
3068
|
-
* is not found in the pipeline.
|
|
3069
|
-
*
|
|
3070
|
-
* This is a generic dispatch used by the email pipeline and other
|
|
3071
|
-
* exclusive hook consumers. The handler type is unknown — callers
|
|
3072
|
-
* must know the expected signature.
|
|
3073
|
-
*
|
|
3074
|
-
* Errors are isolated: a failing handler returns an error result
|
|
3075
|
-
* instead of propagating the exception to the caller.
|
|
3076
|
-
*/
|
|
3077
|
-
invokeExclusiveHook(hookName: string, event: unknown): Promise<{
|
|
3078
|
-
result: unknown;
|
|
3079
|
-
pluginId: string;
|
|
3080
|
-
error?: Error;
|
|
3081
|
-
duration: number;
|
|
3082
|
-
} | null>;
|
|
3083
|
-
}
|
|
3084
|
-
/**
|
|
3085
|
-
* Create a hook pipeline from plugins
|
|
3086
|
-
*/
|
|
3087
|
-
declare function createHookPipeline(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions): HookPipeline;
|
|
2545
|
+
declare function createHookPipeline(plugins: ResolvedPlugin[], factoryOptions?: PluginContextFactoryOptions): HookPipeline;
|
|
3088
2546
|
//#endregion
|
|
3089
2547
|
//#region src/plugins/email.d.ts
|
|
3090
2548
|
/**
|
|
@@ -3412,517 +2870,104 @@ declare class PluginManager {
|
|
|
3412
2870
|
/**
|
|
3413
2871
|
* Set the selected provider for an exclusive hook in the options table.
|
|
3414
2872
|
* Pass null to clear the selection.
|
|
3415
|
-
*/
|
|
3416
|
-
setExclusiveHookSelection(hookName: string, pluginId: string | null): Promise<void>;
|
|
3417
|
-
/**
|
|
3418
|
-
* Resolution algorithm for exclusive hooks.
|
|
3419
|
-
*
|
|
3420
|
-
* Delegates to the shared resolveExclusiveHooks() function.
|
|
3421
|
-
* See hooks.ts for the full algorithm description.
|
|
3422
|
-
*/
|
|
3423
|
-
resolveExclusiveHooks(preferredHints?: Map<string, string[]>): Promise<void>;
|
|
3424
|
-
/**
|
|
3425
|
-
* Get all exclusive hooks with their providers and current selections.
|
|
3426
|
-
* Used by the admin API.
|
|
3427
|
-
*/
|
|
3428
|
-
getExclusiveHooksInfo(): Promise<Array<{
|
|
3429
|
-
hookName: string;
|
|
3430
|
-
providers: Array<{
|
|
3431
|
-
pluginId: string;
|
|
3432
|
-
}>;
|
|
3433
|
-
selectedPluginId: string | null;
|
|
3434
|
-
}>>;
|
|
3435
|
-
/**
|
|
3436
|
-
* Initialize or reinitialize the hook pipeline and route registry
|
|
3437
|
-
*/
|
|
3438
|
-
private ensureInitialized;
|
|
3439
|
-
/**
|
|
3440
|
-
* Force reinitialization (useful after plugin state changes)
|
|
3441
|
-
*/
|
|
3442
|
-
reinitialize(): void;
|
|
3443
|
-
/**
|
|
3444
|
-
* Delete all cron tasks for a plugin.
|
|
3445
|
-
* Used during uninstall.
|
|
3446
|
-
*/
|
|
3447
|
-
private deleteCronTasks;
|
|
3448
|
-
}
|
|
3449
|
-
/**
|
|
3450
|
-
* Create a plugin manager
|
|
3451
|
-
*/
|
|
3452
|
-
declare function createPluginManager(options: PluginManagerOptions): PluginManager;
|
|
3453
|
-
//#endregion
|
|
3454
|
-
//#region src/plugins/sandbox/noop.d.ts
|
|
3455
|
-
/**
|
|
3456
|
-
* Error thrown when attempting to use sandboxing on an unsupported platform.
|
|
3457
|
-
*/
|
|
3458
|
-
declare class SandboxNotAvailableError extends Error {
|
|
3459
|
-
constructor();
|
|
3460
|
-
}
|
|
3461
|
-
/**
|
|
3462
|
-
* No-op sandbox runner for platforms without isolation support.
|
|
3463
|
-
*
|
|
3464
|
-
* - `isAvailable()` returns false
|
|
3465
|
-
* - `load()` throws SandboxNotAvailableError
|
|
3466
|
-
* - `terminateAll()` is a no-op
|
|
3467
|
-
*
|
|
3468
|
-
* This is the default runner when no platform adapter is configured.
|
|
3469
|
-
*/
|
|
3470
|
-
declare class NoopSandboxRunner implements SandboxRunner {
|
|
3471
|
-
/**
|
|
3472
|
-
* Always returns false - sandboxing is not available.
|
|
3473
|
-
*/
|
|
3474
|
-
isAvailable(): boolean;
|
|
3475
|
-
/**
|
|
3476
|
-
* Always throws - can't load sandboxed plugins without isolation.
|
|
3477
|
-
*/
|
|
3478
|
-
load(_manifest: PluginManifest, _code: string): Promise<SandboxedPlugin>;
|
|
3479
|
-
/**
|
|
3480
|
-
* No-op - sandboxing not available, email callback is irrelevant.
|
|
3481
|
-
*/
|
|
3482
|
-
setEmailSend(): void;
|
|
3483
|
-
/**
|
|
3484
|
-
* No-op - nothing to terminate.
|
|
3485
|
-
*/
|
|
3486
|
-
terminateAll(): Promise<void>;
|
|
3487
|
-
}
|
|
3488
|
-
/**
|
|
3489
|
-
* Create a no-op sandbox runner.
|
|
3490
|
-
* This is used as the default when no platform adapter is configured.
|
|
3491
|
-
*/
|
|
3492
|
-
declare function createNoopSandboxRunner(_options?: SandboxOptions): SandboxRunner;
|
|
3493
|
-
//#endregion
|
|
3494
|
-
//#region src/plugins/sandbox/runtime-options.d.ts
|
|
3495
|
-
interface SandboxRunnerRuntimeOptions extends SandboxOptions {
|
|
3496
|
-
mediaStorage?: Storage;
|
|
3497
|
-
cronReschedule?: () => void;
|
|
3498
|
-
}
|
|
3499
|
-
//#endregion
|
|
3500
|
-
//#region src/plugins/sandbox/node.d.ts
|
|
3501
|
-
declare class NodeSandboxRunner implements SandboxRunner {
|
|
3502
|
-
private readonly options;
|
|
3503
|
-
private readonly limits;
|
|
3504
|
-
private readonly activeWorkers;
|
|
3505
|
-
private emailSend;
|
|
3506
|
-
constructor(options: SandboxRunnerRuntimeOptions);
|
|
3507
|
-
isAvailable(): boolean;
|
|
3508
|
-
load(manifest: PluginManifest, code: string): Promise<SandboxedPlugin>;
|
|
3509
|
-
setEmailSend(callback: SandboxEmailSendCallback | null): void;
|
|
3510
|
-
terminateAll(): Promise<void>;
|
|
3511
|
-
}
|
|
3512
|
-
declare function createNodeSandboxRunner(options: SandboxRunnerRuntimeOptions): SandboxRunner;
|
|
3513
|
-
//#endregion
|
|
3514
|
-
//#region src/import/types.d.ts
|
|
3515
|
-
/** Author info from WordPress */
|
|
3516
|
-
interface WpAuthorInfo {
|
|
3517
|
-
id?: number;
|
|
3518
|
-
login?: string;
|
|
3519
|
-
email?: string;
|
|
3520
|
-
displayName?: string;
|
|
3521
|
-
postCount: number;
|
|
3522
|
-
}
|
|
3523
|
-
/** File-based input (WXR upload) */
|
|
3524
|
-
interface FileInput {
|
|
3525
|
-
type: "file";
|
|
3526
|
-
file: File;
|
|
3527
|
-
}
|
|
3528
|
-
/** URL-based input (REST API probe) */
|
|
3529
|
-
interface UrlInput {
|
|
3530
|
-
type: "url";
|
|
3531
|
-
url: string;
|
|
3532
|
-
/** Optional auth token for authenticated requests */
|
|
3533
|
-
token?: string;
|
|
3534
|
-
}
|
|
3535
|
-
/** OAuth-based input (WordPress.com) */
|
|
3536
|
-
interface OAuthInput {
|
|
3537
|
-
type: "oauth";
|
|
3538
|
-
url: string;
|
|
3539
|
-
accessToken: string;
|
|
3540
|
-
/** Site ID for WordPress.com */
|
|
3541
|
-
siteId?: string;
|
|
3542
|
-
}
|
|
3543
|
-
type SourceInput = FileInput | UrlInput | OAuthInput;
|
|
3544
|
-
/** Auth requirements for an import source */
|
|
3545
|
-
interface SourceAuth {
|
|
3546
|
-
type: "oauth" | "token" | "password" | "none";
|
|
3547
|
-
/** OAuth provider identifier */
|
|
3548
|
-
provider?: string;
|
|
3549
|
-
/** OAuth authorization URL */
|
|
3550
|
-
oauthUrl?: string;
|
|
3551
|
-
/** Human-readable instructions */
|
|
3552
|
-
instructions?: string;
|
|
3553
|
-
}
|
|
3554
|
-
/** What the source can provide */
|
|
3555
|
-
interface SourceCapabilities {
|
|
3556
|
-
/** Can fetch published content without auth */
|
|
3557
|
-
publicContent: boolean;
|
|
3558
|
-
/** Can fetch drafts/private (may need auth) */
|
|
3559
|
-
privateContent: boolean;
|
|
3560
|
-
/** Can fetch all custom post types */
|
|
3561
|
-
customPostTypes: boolean;
|
|
3562
|
-
/** Can fetch all meta fields */
|
|
3563
|
-
allMeta: boolean;
|
|
3564
|
-
/** Can stream media directly */
|
|
3565
|
-
mediaStream: boolean;
|
|
3566
|
-
}
|
|
3567
|
-
/** Suggested next action after probe */
|
|
3568
|
-
type SuggestedAction = {
|
|
3569
|
-
type: "proceed";
|
|
3570
|
-
} | {
|
|
3571
|
-
type: "oauth";
|
|
3572
|
-
url: string;
|
|
3573
|
-
provider: string;
|
|
3574
|
-
} | {
|
|
3575
|
-
type: "upload";
|
|
3576
|
-
instructions: string;
|
|
3577
|
-
} | {
|
|
3578
|
-
type: "install-plugin";
|
|
3579
|
-
instructions: string;
|
|
3580
|
-
};
|
|
3581
|
-
/** Detected i18n/multilingual plugin info */
|
|
3582
|
-
interface I18nDetection {
|
|
3583
|
-
/** Multilingual plugin name (e.g. "wpml", "polylang") */
|
|
3584
|
-
plugin: string;
|
|
3585
|
-
/** BCP 47 default locale */
|
|
3586
|
-
defaultLocale: string;
|
|
3587
|
-
/** All configured locales */
|
|
3588
|
-
locales: string[];
|
|
3589
|
-
}
|
|
3590
|
-
/** Result of probing a URL for a specific source */
|
|
3591
|
-
interface SourceProbeResult {
|
|
3592
|
-
/** Which source can handle this */
|
|
3593
|
-
sourceId: string;
|
|
3594
|
-
/** Confidence level */
|
|
3595
|
-
confidence: "definite" | "likely" | "possible";
|
|
3596
|
-
/** What we detected */
|
|
3597
|
-
detected: {
|
|
3598
|
-
platform: string;
|
|
3599
|
-
version?: string;
|
|
3600
|
-
siteTitle?: string;
|
|
3601
|
-
siteUrl?: string;
|
|
3602
|
-
};
|
|
3603
|
-
/** What capabilities are available */
|
|
3604
|
-
capabilities: SourceCapabilities;
|
|
3605
|
-
/** What auth is needed, if any */
|
|
3606
|
-
auth?: SourceAuth;
|
|
3607
|
-
/** Suggested next step */
|
|
3608
|
-
suggestedAction: SuggestedAction;
|
|
3609
|
-
/** Preview data if available (e.g., post counts from REST API) */
|
|
3610
|
-
preview?: {
|
|
3611
|
-
posts?: number;
|
|
3612
|
-
pages?: number;
|
|
3613
|
-
media?: number;
|
|
3614
|
-
};
|
|
3615
|
-
/** Detected multilingual plugin. Absent when none detected. */
|
|
3616
|
-
i18n?: I18nDetection;
|
|
3617
|
-
}
|
|
3618
|
-
/** Combined probe result from all sources */
|
|
3619
|
-
interface ProbeResult {
|
|
3620
|
-
url: string;
|
|
3621
|
-
isWordPress: boolean;
|
|
3622
|
-
/** Best matching source (highest confidence) */
|
|
3623
|
-
bestMatch: SourceProbeResult | null;
|
|
3624
|
-
/** All matching sources */
|
|
3625
|
-
allMatches: SourceProbeResult[];
|
|
3626
|
-
}
|
|
3627
|
-
/** Field definition for import */
|
|
3628
|
-
interface ImportFieldDef {
|
|
3629
|
-
slug: string;
|
|
3630
|
-
label: string;
|
|
3631
|
-
type: string;
|
|
3632
|
-
required: boolean;
|
|
3633
|
-
searchable?: boolean;
|
|
3634
|
-
}
|
|
3635
|
-
/** Field compatibility with existing schema */
|
|
3636
|
-
type FieldCompatibility = "compatible" | "type_mismatch" | "missing";
|
|
3637
|
-
/** Schema status for a collection */
|
|
3638
|
-
interface CollectionSchemaStatus {
|
|
3639
|
-
exists: boolean;
|
|
3640
|
-
fieldStatus: Record<string, {
|
|
3641
|
-
status: FieldCompatibility;
|
|
3642
|
-
existingType?: string;
|
|
3643
|
-
requiredType: string;
|
|
3644
|
-
}>;
|
|
3645
|
-
canImport: boolean;
|
|
3646
|
-
reason?: string;
|
|
3647
|
-
}
|
|
3648
|
-
/** Analysis of a single post type */
|
|
3649
|
-
interface PostTypeAnalysis {
|
|
3650
|
-
name: string;
|
|
3651
|
-
count: number;
|
|
3652
|
-
suggestedCollection: string;
|
|
3653
|
-
requiredFields: ImportFieldDef[];
|
|
3654
|
-
schemaStatus: CollectionSchemaStatus;
|
|
3655
|
-
}
|
|
3656
|
-
/** Attachment/media info */
|
|
3657
|
-
interface AttachmentInfo {
|
|
3658
|
-
id?: number;
|
|
3659
|
-
title?: string;
|
|
3660
|
-
url?: string;
|
|
3661
|
-
filename?: string;
|
|
3662
|
-
mimeType?: string;
|
|
3663
|
-
alt?: string;
|
|
3664
|
-
caption?: string;
|
|
3665
|
-
width?: number;
|
|
3666
|
-
height?: number;
|
|
3667
|
-
}
|
|
3668
|
-
/** Navigation menu analysis */
|
|
3669
|
-
interface NavMenuAnalysis {
|
|
3670
|
-
/** Menu name/slug */
|
|
3671
|
-
name: string;
|
|
3672
|
-
/** Menu display label */
|
|
3673
|
-
label: string;
|
|
3674
|
-
/** Number of items in this menu */
|
|
3675
|
-
itemCount: number;
|
|
3676
|
-
}
|
|
3677
|
-
/** Custom taxonomy analysis */
|
|
3678
|
-
interface TaxonomyAnalysis {
|
|
3679
|
-
/** Taxonomy slug (e.g., 'genre', 'portfolio_category') */
|
|
3680
|
-
slug: string;
|
|
3681
|
-
/** Number of terms in this taxonomy */
|
|
3682
|
-
termCount: number;
|
|
3683
|
-
/** Sample term names */
|
|
3684
|
-
sampleTerms: string[];
|
|
3685
|
-
}
|
|
3686
|
-
/** Reusable block analysis (wp_block post type) */
|
|
3687
|
-
interface ReusableBlockAnalysis {
|
|
3688
|
-
/** Original WP ID */
|
|
3689
|
-
id: number;
|
|
3690
|
-
/** Block title */
|
|
3691
|
-
title: string;
|
|
3692
|
-
/** Block slug */
|
|
3693
|
-
slug: string;
|
|
3694
|
-
}
|
|
3695
|
-
/** Normalized analysis result - same format for all sources */
|
|
3696
|
-
interface ImportAnalysis {
|
|
3697
|
-
/** Source that produced this analysis */
|
|
3698
|
-
sourceId: string;
|
|
3699
|
-
site: {
|
|
3700
|
-
title: string;
|
|
3701
|
-
url: string;
|
|
3702
|
-
};
|
|
3703
|
-
postTypes: PostTypeAnalysis[];
|
|
3704
|
-
attachments: {
|
|
3705
|
-
count: number;
|
|
3706
|
-
items: AttachmentInfo[];
|
|
3707
|
-
};
|
|
3708
|
-
categories: number;
|
|
3709
|
-
tags: number;
|
|
3710
|
-
authors: WpAuthorInfo[];
|
|
3711
|
-
/** Navigation menus found in the export */
|
|
3712
|
-
navMenus?: NavMenuAnalysis[];
|
|
3713
|
-
/** Custom taxonomies (beyond categories/tags) */
|
|
3714
|
-
customTaxonomies?: TaxonomyAnalysis[];
|
|
3715
|
-
/** Reusable blocks (wp_block post type) - will be imported as sections */
|
|
3716
|
-
reusableBlocks?: ReusableBlockAnalysis[];
|
|
3717
|
-
/** Source-specific custom fields analysis */
|
|
3718
|
-
customFields?: Array<{
|
|
3719
|
-
key: string;
|
|
3720
|
-
count: number;
|
|
3721
|
-
samples: string[];
|
|
3722
|
-
suggestedField: string;
|
|
3723
|
-
suggestedType: "string" | "number" | "boolean" | "date" | "json";
|
|
3724
|
-
isInternal: boolean;
|
|
3725
|
-
}>;
|
|
3726
|
-
/** Detected multilingual plugin. Absent when none detected. */
|
|
3727
|
-
i18n?: I18nDetection;
|
|
3728
|
-
}
|
|
3729
|
-
/** Normalized content item - produced by all sources */
|
|
3730
|
-
interface NormalizedItem {
|
|
3731
|
-
/** Original ID from source */
|
|
3732
|
-
sourceId: string | number;
|
|
3733
|
-
/** WordPress post type */
|
|
3734
|
-
postType: string;
|
|
3735
|
-
/** Content status */
|
|
3736
|
-
status: "publish" | "draft" | "pending" | "private" | "future";
|
|
3737
|
-
/** URL slug */
|
|
3738
|
-
slug: string;
|
|
3739
|
-
/** Title */
|
|
3740
|
-
title: string;
|
|
3741
|
-
/** Content as Portable Text (already converted) */
|
|
3742
|
-
content: PortableTextBlock[];
|
|
3743
|
-
/** Excerpt/summary */
|
|
3744
|
-
excerpt?: string;
|
|
3745
|
-
/** Publication date */
|
|
3746
|
-
date: Date;
|
|
3747
|
-
/** Last modified date */
|
|
3748
|
-
modified?: Date;
|
|
3749
|
-
/** Author identifier */
|
|
3750
|
-
author?: string;
|
|
3751
|
-
/** Category slugs */
|
|
3752
|
-
categories?: string[];
|
|
3753
|
-
/** Tag slugs */
|
|
3754
|
-
tags?: string[];
|
|
3755
|
-
/** Custom meta fields */
|
|
3756
|
-
meta?: Record<string, unknown>;
|
|
3757
|
-
/** Featured image URL */
|
|
3758
|
-
featuredImage?: string;
|
|
3759
|
-
/** Parent post ID (for hierarchical content like pages) */
|
|
3760
|
-
parentId?: string | number;
|
|
3761
|
-
/** Menu order for sorting */
|
|
3762
|
-
menuOrder?: number;
|
|
3763
|
-
/** Custom taxonomy assignments beyond categories/tags */
|
|
3764
|
-
customTaxonomies?: Record<string, string[]>;
|
|
3765
|
-
/** BCP 47 locale code. When omitted, defaults to defaultLocale. */
|
|
3766
|
-
locale?: string;
|
|
3767
|
-
/**
|
|
3768
|
-
* Source-side translation group ID (opaque string from the origin system).
|
|
3769
|
-
* Items sharing the same translationGroup are linked as translations.
|
|
3770
|
-
* Resolved to a Dineway translation_group ULID during execute.
|
|
3771
|
-
*/
|
|
3772
|
-
translationGroup?: string;
|
|
3773
|
-
}
|
|
3774
|
-
/** Post type mapping configuration */
|
|
3775
|
-
interface PostTypeMapping {
|
|
3776
|
-
enabled: boolean;
|
|
3777
|
-
collection: string;
|
|
3778
|
-
}
|
|
3779
|
-
/** Import configuration */
|
|
3780
|
-
interface ImportConfig {
|
|
3781
|
-
postTypeMappings: Record<string, PostTypeMapping>;
|
|
3782
|
-
skipExisting?: boolean;
|
|
3783
|
-
}
|
|
3784
|
-
/** Options for fetching content */
|
|
3785
|
-
interface FetchOptions {
|
|
3786
|
-
/** Post types to fetch */
|
|
3787
|
-
postTypes: string[];
|
|
3788
|
-
/** Whether to include drafts */
|
|
3789
|
-
includeDrafts?: boolean;
|
|
3790
|
-
/** Limit number of items (for testing) */
|
|
3791
|
-
limit?: number;
|
|
3792
|
-
}
|
|
3793
|
-
/** Import result */
|
|
3794
|
-
interface ImportResult {
|
|
3795
|
-
success: boolean;
|
|
3796
|
-
imported: number;
|
|
3797
|
-
skipped: number;
|
|
3798
|
-
errors: Array<{
|
|
3799
|
-
title: string;
|
|
3800
|
-
error: string;
|
|
3801
|
-
}>;
|
|
3802
|
-
byCollection: Record<string, number>;
|
|
3803
|
-
}
|
|
3804
|
-
/**
|
|
3805
|
-
* An import source provides content from an external system.
|
|
3806
|
-
* All sources produce the same normalized analysis and content format.
|
|
3807
|
-
*/
|
|
3808
|
-
interface ImportSource {
|
|
3809
|
-
/** Unique identifier */
|
|
3810
|
-
id: string;
|
|
3811
|
-
/** Display name */
|
|
3812
|
-
name: string;
|
|
3813
|
-
/** Description for UI */
|
|
3814
|
-
description: string;
|
|
3815
|
-
/** Icon identifier */
|
|
3816
|
-
icon: "upload" | "globe" | "wordpress" | "plug";
|
|
3817
|
-
/** Whether this source requires a file upload */
|
|
3818
|
-
requiresFile?: boolean;
|
|
3819
|
-
/** Whether this source can probe URLs */
|
|
3820
|
-
canProbe?: boolean;
|
|
2873
|
+
*/
|
|
2874
|
+
setExclusiveHookSelection(hookName: string, pluginId: string | null): Promise<void>;
|
|
2875
|
+
/**
|
|
2876
|
+
* Resolution algorithm for exclusive hooks.
|
|
2877
|
+
*
|
|
2878
|
+
* Delegates to the shared resolveExclusiveHooks() function.
|
|
2879
|
+
* See hooks.ts for the full algorithm description.
|
|
2880
|
+
*/
|
|
2881
|
+
resolveExclusiveHooks(preferredHints?: Map<string, string[]>): Promise<void>;
|
|
3821
2882
|
/**
|
|
3822
|
-
*
|
|
3823
|
-
*
|
|
2883
|
+
* Get all exclusive hooks with their providers and current selections.
|
|
2884
|
+
* Used by the admin API.
|
|
3824
2885
|
*/
|
|
3825
|
-
|
|
2886
|
+
getExclusiveHooksInfo(): Promise<Array<{
|
|
2887
|
+
hookName: string;
|
|
2888
|
+
providers: Array<{
|
|
2889
|
+
pluginId: string;
|
|
2890
|
+
}>;
|
|
2891
|
+
selectedPluginId: string | null;
|
|
2892
|
+
}>>;
|
|
3826
2893
|
/**
|
|
3827
|
-
*
|
|
3828
|
-
* Returns normalized ImportAnalysis.
|
|
2894
|
+
* Initialize or reinitialize the hook pipeline and route registry
|
|
3829
2895
|
*/
|
|
3830
|
-
|
|
2896
|
+
private ensureInitialized;
|
|
3831
2897
|
/**
|
|
3832
|
-
*
|
|
3833
|
-
* Yields normalized content items.
|
|
2898
|
+
* Force reinitialization (useful after plugin state changes)
|
|
3834
2899
|
*/
|
|
3835
|
-
|
|
2900
|
+
reinitialize(): void;
|
|
3836
2901
|
/**
|
|
3837
|
-
*
|
|
3838
|
-
* Used
|
|
2902
|
+
* Delete all cron tasks for a plugin.
|
|
2903
|
+
* Used during uninstall.
|
|
3839
2904
|
*/
|
|
3840
|
-
|
|
3841
|
-
}
|
|
3842
|
-
/** Context passed to import sources */
|
|
3843
|
-
interface ImportContext {
|
|
3844
|
-
/** Database connection for schema checks */
|
|
3845
|
-
db?: unknown;
|
|
3846
|
-
/** Function to check existing collections */
|
|
3847
|
-
getExistingCollections?: () => Promise<Map<string, {
|
|
3848
|
-
slug: string;
|
|
3849
|
-
fields: Map<string, {
|
|
3850
|
-
type: string;
|
|
3851
|
-
}>;
|
|
3852
|
-
}>>;
|
|
3853
|
-
}
|
|
3854
|
-
//#endregion
|
|
3855
|
-
//#region src/import/sections.d.ts
|
|
3856
|
-
/**
|
|
3857
|
-
* Result of sections import operation
|
|
3858
|
-
*/
|
|
3859
|
-
interface SectionsImportResult {
|
|
3860
|
-
/** Number of sections created */
|
|
3861
|
-
sectionsCreated: number;
|
|
3862
|
-
/** Number of sections skipped (already exist) */
|
|
3863
|
-
sectionsSkipped: number;
|
|
3864
|
-
/** Errors encountered during import */
|
|
3865
|
-
errors: Array<{
|
|
3866
|
-
title: string;
|
|
3867
|
-
error: string;
|
|
3868
|
-
}>;
|
|
2905
|
+
private deleteCronTasks;
|
|
3869
2906
|
}
|
|
3870
2907
|
/**
|
|
3871
|
-
*
|
|
3872
|
-
*
|
|
3873
|
-
* @param posts - All posts from WXR (will filter to wp_block)
|
|
3874
|
-
* @param db - Database connection
|
|
3875
|
-
* @returns Import result with counts
|
|
2908
|
+
* Create a plugin manager
|
|
3876
2909
|
*/
|
|
3877
|
-
declare function
|
|
2910
|
+
declare function createPluginManager(options: PluginManagerOptions): PluginManager;
|
|
3878
2911
|
//#endregion
|
|
3879
|
-
//#region src/
|
|
3880
|
-
/**
|
|
3881
|
-
* Register an import source
|
|
3882
|
-
*/
|
|
3883
|
-
declare function registerSource(source: ImportSource): void;
|
|
3884
|
-
/**
|
|
3885
|
-
* Get a source by ID
|
|
3886
|
-
*/
|
|
3887
|
-
declare function getSource(id: string): ImportSource | undefined;
|
|
3888
|
-
/**
|
|
3889
|
-
* Get all registered sources
|
|
3890
|
-
*/
|
|
3891
|
-
declare function getAllSources(): ImportSource[];
|
|
3892
|
-
/**
|
|
3893
|
-
* Get sources that can handle file uploads
|
|
3894
|
-
*/
|
|
3895
|
-
declare function getFileSources(): ImportSource[];
|
|
2912
|
+
//#region src/plugins/sandbox/noop.d.ts
|
|
3896
2913
|
/**
|
|
3897
|
-
*
|
|
2914
|
+
* Error thrown when attempting to use sandboxing on an unsupported platform.
|
|
3898
2915
|
*/
|
|
3899
|
-
declare
|
|
2916
|
+
declare class SandboxNotAvailableError extends Error {
|
|
2917
|
+
constructor();
|
|
2918
|
+
}
|
|
3900
2919
|
/**
|
|
3901
|
-
*
|
|
2920
|
+
* No-op sandbox runner for platforms without isolation support.
|
|
2921
|
+
*
|
|
2922
|
+
* - `isAvailable()` returns false
|
|
2923
|
+
* - `load()` throws SandboxNotAvailableError
|
|
2924
|
+
* - `terminateAll()` is a no-op
|
|
3902
2925
|
*
|
|
3903
|
-
*
|
|
2926
|
+
* This is the default runner when no platform adapter is configured.
|
|
3904
2927
|
*/
|
|
3905
|
-
declare
|
|
2928
|
+
declare class NoopSandboxRunner implements SandboxRunner {
|
|
2929
|
+
/**
|
|
2930
|
+
* Always returns false - sandboxing is not available.
|
|
2931
|
+
*/
|
|
2932
|
+
isAvailable(): boolean;
|
|
2933
|
+
/**
|
|
2934
|
+
* Always throws - can't load sandboxed plugins without isolation.
|
|
2935
|
+
*/
|
|
2936
|
+
load(_manifest: PluginManifest, _code: string): Promise<SandboxedPlugin>;
|
|
2937
|
+
/**
|
|
2938
|
+
* No-op - sandboxing not available, email callback is irrelevant.
|
|
2939
|
+
*/
|
|
2940
|
+
setEmailSend(): void;
|
|
2941
|
+
/**
|
|
2942
|
+
* No-op - nothing to terminate.
|
|
2943
|
+
*/
|
|
2944
|
+
terminateAll(): Promise<void>;
|
|
2945
|
+
}
|
|
3906
2946
|
/**
|
|
3907
|
-
*
|
|
2947
|
+
* Create a no-op sandbox runner.
|
|
2948
|
+
* This is used as the default when no platform adapter is configured.
|
|
3908
2949
|
*/
|
|
3909
|
-
declare function
|
|
2950
|
+
declare function createNoopSandboxRunner(_options?: SandboxOptions): SandboxRunner;
|
|
3910
2951
|
//#endregion
|
|
3911
|
-
//#region src/
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
* 2. pubDate (RFC 2822, includes timezone offset)
|
|
3917
|
-
* 3. Site-local date (MySQL datetime without timezone, imprecise but best available)
|
|
3918
|
-
*
|
|
3919
|
-
* Returns undefined when none of the inputs yield a valid date.
|
|
3920
|
-
* Callers that need a guaranteed Date should use `?? new Date()`.
|
|
3921
|
-
*/
|
|
3922
|
-
declare function parseWxrDate(gmtDate: string | undefined, pubDate: string | undefined, localDate: string | undefined): Date | undefined;
|
|
2952
|
+
//#region src/plugins/sandbox/runtime-options.d.ts
|
|
2953
|
+
interface SandboxRunnerRuntimeOptions extends SandboxOptions {
|
|
2954
|
+
mediaStorage?: Storage;
|
|
2955
|
+
cronReschedule?: () => void;
|
|
2956
|
+
}
|
|
3923
2957
|
//#endregion
|
|
3924
|
-
//#region src/
|
|
3925
|
-
declare
|
|
2958
|
+
//#region src/plugins/sandbox/node.d.ts
|
|
2959
|
+
declare class NodeSandboxRunner implements SandboxRunner {
|
|
2960
|
+
private readonly options;
|
|
2961
|
+
private readonly limits;
|
|
2962
|
+
private readonly activeWorkers;
|
|
2963
|
+
private emailSend;
|
|
2964
|
+
constructor(options: SandboxRunnerRuntimeOptions);
|
|
2965
|
+
isAvailable(): boolean;
|
|
2966
|
+
load(manifest: PluginManifest, code: string): Promise<SandboxedPlugin>;
|
|
2967
|
+
setEmailSend(callback: SandboxEmailSendCallback | null): void;
|
|
2968
|
+
terminateAll(): Promise<void>;
|
|
2969
|
+
}
|
|
2970
|
+
declare function createNodeSandboxRunner(options: SandboxRunnerRuntimeOptions): SandboxRunner;
|
|
3926
2971
|
//#endregion
|
|
3927
2972
|
//#region src/preview/tokens.d.ts
|
|
3928
2973
|
/**
|
|
@@ -4039,8 +3084,16 @@ interface GetPreviewUrlOptions {
|
|
|
4039
3084
|
expiresIn?: string | number;
|
|
4040
3085
|
/** Base URL of the site. If not provided, returns a relative URL. */
|
|
4041
3086
|
baseUrl?: string;
|
|
4042
|
-
/**
|
|
3087
|
+
/**
|
|
3088
|
+
* Custom path pattern. Supports `{collection}`, `{id}`, and `{locale}` placeholders.
|
|
3089
|
+
* Default: "/{collection}/{id}".
|
|
3090
|
+
*/
|
|
4043
3091
|
pathPattern?: string;
|
|
3092
|
+
/**
|
|
3093
|
+
* Locale segment substituted for `{locale}`. Use an empty string to omit the
|
|
3094
|
+
* locale segment; adjacent slashes are collapsed.
|
|
3095
|
+
*/
|
|
3096
|
+
locale?: string;
|
|
4044
3097
|
}
|
|
4045
3098
|
/**
|
|
4046
3099
|
* Generate a preview URL for content
|
|
@@ -4414,485 +3467,964 @@ declare function getByline(id: string): Promise<BylineSummary | null>;
|
|
|
4414
3467
|
* }
|
|
4415
3468
|
* ```
|
|
4416
3469
|
*/
|
|
4417
|
-
declare function getBylineBySlug(slug: string): Promise<BylineSummary | null>;
|
|
4418
|
-
//#endregion
|
|
4419
|
-
//#region src/taxonomies/types.d.ts
|
|
3470
|
+
declare function getBylineBySlug(slug: string): Promise<BylineSummary | null>;
|
|
3471
|
+
//#endregion
|
|
3472
|
+
//#region src/taxonomies/types.d.ts
|
|
3473
|
+
/**
|
|
3474
|
+
* Taxonomy types for Dineway Agentic Web builder
|
|
3475
|
+
*/
|
|
3476
|
+
/**
|
|
3477
|
+
* Taxonomy definition - describes a taxonomy like "category" or "tag"
|
|
3478
|
+
*/
|
|
3479
|
+
interface TaxonomyDef {
|
|
3480
|
+
id: string;
|
|
3481
|
+
name: string;
|
|
3482
|
+
label: string;
|
|
3483
|
+
labelSingular?: string;
|
|
3484
|
+
hierarchical: boolean;
|
|
3485
|
+
collections: string[];
|
|
3486
|
+
}
|
|
3487
|
+
/**
|
|
3488
|
+
* Taxonomy term - a specific term within a taxonomy (e.g., "News" in "category")
|
|
3489
|
+
*/
|
|
3490
|
+
interface TaxonomyTerm {
|
|
3491
|
+
id: string;
|
|
3492
|
+
name: string;
|
|
3493
|
+
slug: string;
|
|
3494
|
+
label: string;
|
|
3495
|
+
parentId?: string;
|
|
3496
|
+
description?: string;
|
|
3497
|
+
children: TaxonomyTerm[];
|
|
3498
|
+
count?: number;
|
|
3499
|
+
}
|
|
3500
|
+
/**
|
|
3501
|
+
* Flat version for DB row
|
|
3502
|
+
*/
|
|
3503
|
+
interface TaxonomyTermRow {
|
|
3504
|
+
id: string;
|
|
3505
|
+
name: string;
|
|
3506
|
+
slug: string;
|
|
3507
|
+
label: string;
|
|
3508
|
+
parent_id: string | null;
|
|
3509
|
+
data: string | null;
|
|
3510
|
+
}
|
|
3511
|
+
/**
|
|
3512
|
+
* Input for creating a term
|
|
3513
|
+
*/
|
|
3514
|
+
interface CreateTermInput {
|
|
3515
|
+
slug: string;
|
|
3516
|
+
label: string;
|
|
3517
|
+
parentId?: string;
|
|
3518
|
+
description?: string;
|
|
3519
|
+
}
|
|
3520
|
+
/**
|
|
3521
|
+
* Input for updating a term
|
|
3522
|
+
*/
|
|
3523
|
+
interface UpdateTermInput {
|
|
3524
|
+
slug?: string;
|
|
3525
|
+
label?: string;
|
|
3526
|
+
parentId?: string | null;
|
|
3527
|
+
description?: string;
|
|
3528
|
+
}
|
|
3529
|
+
//#endregion
|
|
3530
|
+
//#region src/taxonomies/index.d.ts
|
|
3531
|
+
/**
|
|
3532
|
+
* Get all taxonomy definitions
|
|
3533
|
+
*/
|
|
3534
|
+
declare function getTaxonomyDefs(): Promise<TaxonomyDef[]>;
|
|
3535
|
+
/**
|
|
3536
|
+
* Get a single taxonomy definition by name
|
|
3537
|
+
*/
|
|
3538
|
+
declare function getTaxonomyDef(name: string): Promise<TaxonomyDef | null>;
|
|
3539
|
+
/**
|
|
3540
|
+
* Get all terms for a taxonomy (as tree for hierarchical, flat for tags)
|
|
3541
|
+
*/
|
|
3542
|
+
declare function getTaxonomyTerms(taxonomyName: string): Promise<TaxonomyTerm[]>;
|
|
3543
|
+
/**
|
|
3544
|
+
* Get a single term by taxonomy and slug
|
|
3545
|
+
*/
|
|
3546
|
+
declare function getTerm(taxonomyName: string, slug: string): Promise<TaxonomyTerm | null>;
|
|
3547
|
+
/**
|
|
3548
|
+
* Get terms assigned to an entry
|
|
3549
|
+
*/
|
|
3550
|
+
declare function getEntryTerms(collection: string, entryId: string, taxonomyName?: string): Promise<TaxonomyTerm[]>;
|
|
3551
|
+
/**
|
|
3552
|
+
* Get terms for multiple entries in a single query (batched API)
|
|
3553
|
+
*
|
|
3554
|
+
* This is more efficient than calling getEntryTerms for each entry
|
|
3555
|
+
* when you need terms for a list of entries.
|
|
3556
|
+
*
|
|
3557
|
+
* @param collection - The collection type (e.g., "posts")
|
|
3558
|
+
* @param entryIds - Array of entry IDs
|
|
3559
|
+
* @param taxonomyName - The taxonomy name (e.g., "categories")
|
|
3560
|
+
* @returns Map from entry ID to array of terms
|
|
3561
|
+
*/
|
|
3562
|
+
declare function getTermsForEntries(collection: string, entryIds: string[], taxonomyName: string): Promise<Map<string, TaxonomyTerm[]>>;
|
|
3563
|
+
/**
|
|
3564
|
+
* Get entries by term (wraps getDinewayCollection)
|
|
3565
|
+
*/
|
|
3566
|
+
declare function getEntriesByTerm(collection: string, taxonomyName: string, termSlug: string): Promise<Array<{
|
|
3567
|
+
id: string;
|
|
3568
|
+
data: Record<string, unknown>;
|
|
3569
|
+
}>>;
|
|
3570
|
+
//#endregion
|
|
3571
|
+
//#region src/widgets/types.d.ts
|
|
3572
|
+
type WidgetType = "content" | "menu" | "component";
|
|
3573
|
+
interface Widget {
|
|
3574
|
+
id: string;
|
|
3575
|
+
type: WidgetType;
|
|
3576
|
+
title?: string;
|
|
3577
|
+
content?: PortableTextBlock$1[];
|
|
3578
|
+
menuName?: string;
|
|
3579
|
+
componentId?: string;
|
|
3580
|
+
componentProps?: Record<string, unknown>;
|
|
3581
|
+
}
|
|
3582
|
+
interface WidgetArea {
|
|
3583
|
+
id: string;
|
|
3584
|
+
name: string;
|
|
3585
|
+
label: string;
|
|
3586
|
+
description?: string;
|
|
3587
|
+
widgets: Widget[];
|
|
3588
|
+
}
|
|
3589
|
+
interface WidgetComponentDef {
|
|
3590
|
+
id: string;
|
|
3591
|
+
label: string;
|
|
3592
|
+
description?: string;
|
|
3593
|
+
props: Record<string, PropDef>;
|
|
3594
|
+
}
|
|
3595
|
+
interface PropDef {
|
|
3596
|
+
type: "string" | "number" | "boolean" | "select";
|
|
3597
|
+
label: string;
|
|
3598
|
+
default?: unknown;
|
|
3599
|
+
options?: Array<{
|
|
3600
|
+
value: string;
|
|
3601
|
+
label: string;
|
|
3602
|
+
}>;
|
|
3603
|
+
}
|
|
3604
|
+
interface CreateWidgetAreaInput {
|
|
3605
|
+
name: string;
|
|
3606
|
+
label: string;
|
|
3607
|
+
description?: string;
|
|
3608
|
+
}
|
|
3609
|
+
interface CreateWidgetInput {
|
|
3610
|
+
type: WidgetType;
|
|
3611
|
+
title?: string;
|
|
3612
|
+
content?: PortableTextBlock$1[];
|
|
3613
|
+
menuName?: string;
|
|
3614
|
+
componentId?: string;
|
|
3615
|
+
componentProps?: Record<string, unknown>;
|
|
3616
|
+
}
|
|
3617
|
+
interface UpdateWidgetInput extends Partial<CreateWidgetInput> {}
|
|
3618
|
+
interface ReorderWidgetsInput {
|
|
3619
|
+
widgetIds: string[];
|
|
3620
|
+
}
|
|
3621
|
+
//#endregion
|
|
3622
|
+
//#region src/widgets/index.d.ts
|
|
3623
|
+
/**
|
|
3624
|
+
* Get a widget area by name, with all its widgets
|
|
3625
|
+
*/
|
|
3626
|
+
declare function getWidgetArea(name: string): Promise<WidgetArea | null>;
|
|
4420
3627
|
/**
|
|
4421
|
-
*
|
|
3628
|
+
* Get all widget areas with their widgets
|
|
4422
3629
|
*/
|
|
3630
|
+
declare function getWidgetAreas(): Promise<WidgetArea[]>;
|
|
4423
3631
|
/**
|
|
4424
|
-
*
|
|
3632
|
+
* Get available widget components (for admin UI)
|
|
4425
3633
|
*/
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
label: string;
|
|
4430
|
-
labelSingular?: string;
|
|
4431
|
-
hierarchical: boolean;
|
|
4432
|
-
collections: string[];
|
|
4433
|
-
}
|
|
3634
|
+
declare function getWidgetComponents(): WidgetComponentDef[];
|
|
3635
|
+
//#endregion
|
|
3636
|
+
//#region src/search/types.d.ts
|
|
4434
3637
|
/**
|
|
4435
|
-
*
|
|
3638
|
+
* Search Types
|
|
3639
|
+
*
|
|
3640
|
+
* Type definitions for the Dineway search system.
|
|
4436
3641
|
*/
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
count?: number;
|
|
3642
|
+
/**
|
|
3643
|
+
* Search configuration for a collection
|
|
3644
|
+
*/
|
|
3645
|
+
interface SearchConfig {
|
|
3646
|
+
/** Whether search is enabled for this collection */
|
|
3647
|
+
enabled: boolean;
|
|
3648
|
+
/** Field weights for ranking (higher = more important) */
|
|
3649
|
+
weights?: Record<string, number>;
|
|
4446
3650
|
}
|
|
4447
3651
|
/**
|
|
4448
|
-
*
|
|
3652
|
+
* Options for search queries
|
|
4449
3653
|
*/
|
|
4450
|
-
interface
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
3654
|
+
interface SearchOptions {
|
|
3655
|
+
/** Collections to search (defaults to all searchable collections) */
|
|
3656
|
+
collections?: string[];
|
|
3657
|
+
/** Filter by content status (defaults to 'published') */
|
|
3658
|
+
status?: string;
|
|
3659
|
+
/** Filter by locale (omit to search all locales) */
|
|
3660
|
+
locale?: string;
|
|
3661
|
+
/** Maximum results to return (defaults to 20) */
|
|
3662
|
+
limit?: number;
|
|
3663
|
+
/** Pagination cursor */
|
|
3664
|
+
cursor?: string;
|
|
4457
3665
|
}
|
|
4458
3666
|
/**
|
|
4459
|
-
*
|
|
3667
|
+
* Options for collection-specific search
|
|
4460
3668
|
*/
|
|
4461
|
-
interface
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
3669
|
+
interface CollectionSearchOptions {
|
|
3670
|
+
/** Filter by content status (defaults to 'published') */
|
|
3671
|
+
status?: string;
|
|
3672
|
+
/** Filter by locale (omit to search all locales) */
|
|
3673
|
+
locale?: string;
|
|
3674
|
+
/** Maximum results to return (defaults to 20) */
|
|
3675
|
+
limit?: number;
|
|
3676
|
+
/** Pagination cursor */
|
|
3677
|
+
cursor?: string;
|
|
4466
3678
|
}
|
|
4467
3679
|
/**
|
|
4468
|
-
*
|
|
3680
|
+
* A single search result
|
|
4469
3681
|
*/
|
|
4470
|
-
interface
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
3682
|
+
interface SearchResult {
|
|
3683
|
+
/** Collection the result belongs to */
|
|
3684
|
+
collection: string;
|
|
3685
|
+
/** Entry ID */
|
|
3686
|
+
id: string;
|
|
3687
|
+
/** Entry slug */
|
|
3688
|
+
slug: string | null;
|
|
3689
|
+
/** Content locale */
|
|
3690
|
+
locale: string;
|
|
3691
|
+
/** Entry title (if available) */
|
|
3692
|
+
title?: string;
|
|
3693
|
+
/**
|
|
3694
|
+
* Highlighted snippet showing match context.
|
|
3695
|
+
*
|
|
3696
|
+
* Safe to render as HTML: source text is escaped, and matched terms
|
|
3697
|
+
* are wrapped in literal `<mark>...</mark>` tags.
|
|
3698
|
+
*/
|
|
3699
|
+
snippet?: string;
|
|
3700
|
+
/** Relevance score (higher = more relevant) */
|
|
3701
|
+
score: number;
|
|
4475
3702
|
}
|
|
4476
|
-
//#endregion
|
|
4477
|
-
//#region src/taxonomies/index.d.ts
|
|
4478
3703
|
/**
|
|
4479
|
-
*
|
|
3704
|
+
* Response from a search query
|
|
4480
3705
|
*/
|
|
4481
|
-
|
|
3706
|
+
interface SearchResponse {
|
|
3707
|
+
/** Search results */
|
|
3708
|
+
items: SearchResult[];
|
|
3709
|
+
/** Cursor for next page of results */
|
|
3710
|
+
nextCursor?: string;
|
|
3711
|
+
}
|
|
4482
3712
|
/**
|
|
4483
|
-
*
|
|
3713
|
+
* Options for suggestion/autocomplete queries
|
|
4484
3714
|
*/
|
|
4485
|
-
|
|
3715
|
+
interface SuggestOptions {
|
|
3716
|
+
/** Collections to search (defaults to all searchable collections) */
|
|
3717
|
+
collections?: string[];
|
|
3718
|
+
/** Filter by locale (omit to search all locales) */
|
|
3719
|
+
locale?: string;
|
|
3720
|
+
/** Maximum suggestions to return (defaults to 5) */
|
|
3721
|
+
limit?: number;
|
|
3722
|
+
}
|
|
4486
3723
|
/**
|
|
4487
|
-
*
|
|
3724
|
+
* A single suggestion result
|
|
4488
3725
|
*/
|
|
4489
|
-
|
|
3726
|
+
interface Suggestion {
|
|
3727
|
+
/** Collection the suggestion belongs to */
|
|
3728
|
+
collection: string;
|
|
3729
|
+
/** Entry ID */
|
|
3730
|
+
id: string;
|
|
3731
|
+
/** Entry title */
|
|
3732
|
+
title: string;
|
|
3733
|
+
}
|
|
4490
3734
|
/**
|
|
4491
|
-
*
|
|
3735
|
+
* Search index statistics
|
|
4492
3736
|
*/
|
|
4493
|
-
|
|
3737
|
+
interface SearchStats {
|
|
3738
|
+
collections: Record<string, {
|
|
3739
|
+
/** Number of indexed entries */indexed: number; /** When the index was last rebuilt */
|
|
3740
|
+
lastRebuilt?: string;
|
|
3741
|
+
}>;
|
|
3742
|
+
}
|
|
3743
|
+
//#endregion
|
|
3744
|
+
//#region src/search/fts-manager.d.ts
|
|
4494
3745
|
/**
|
|
4495
|
-
*
|
|
3746
|
+
* FTS5 Manager
|
|
3747
|
+
*
|
|
3748
|
+
* Handles creation, deletion, and management of FTS5 virtual tables
|
|
3749
|
+
* for full-text search on content collections.
|
|
4496
3750
|
*/
|
|
4497
|
-
declare
|
|
3751
|
+
declare class FTSManager {
|
|
3752
|
+
private db;
|
|
3753
|
+
constructor(db: Kysely<Database>);
|
|
3754
|
+
/**
|
|
3755
|
+
* Validate a collection slug and its searchable field names.
|
|
3756
|
+
* Must be called before any raw SQL interpolation.
|
|
3757
|
+
*/
|
|
3758
|
+
private validateInputs;
|
|
3759
|
+
/**
|
|
3760
|
+
* Get the FTS table name for a collection
|
|
3761
|
+
* Uses _dineway_ prefix to clearly mark as internal/system table
|
|
3762
|
+
*/
|
|
3763
|
+
getFtsTableName(collectionSlug: string): string;
|
|
3764
|
+
/**
|
|
3765
|
+
* Get the content table name for a collection
|
|
3766
|
+
*/
|
|
3767
|
+
getContentTableName(collectionSlug: string): string;
|
|
3768
|
+
/**
|
|
3769
|
+
* Check if an FTS table exists for a collection
|
|
3770
|
+
*/
|
|
3771
|
+
ftsTableExists(collectionSlug: string): Promise<boolean>;
|
|
3772
|
+
/**
|
|
3773
|
+
* Create an FTS5 virtual table for a collection.
|
|
3774
|
+
* FTS5 is SQLite-only; on other dialects this is a no-op.
|
|
3775
|
+
*
|
|
3776
|
+
* @param collectionSlug - The collection slug
|
|
3777
|
+
* @param searchableFields - Array of field names to index
|
|
3778
|
+
* @param weights - Optional field weights for ranking
|
|
3779
|
+
*/
|
|
3780
|
+
createFtsTable(collectionSlug: string, searchableFields: string[], _weights?: Record<string, number>): Promise<void>;
|
|
3781
|
+
/**
|
|
3782
|
+
* Create triggers to keep FTS table in sync with content table.
|
|
3783
|
+
*
|
|
3784
|
+
* Insert and update triggers only add rows to the FTS index when
|
|
3785
|
+
* `deleted_at IS NULL`. This keeps soft-deleted content out of the
|
|
3786
|
+
* index and keeps repair counts aligned with searchable content.
|
|
3787
|
+
*/
|
|
3788
|
+
private createTriggers;
|
|
3789
|
+
/**
|
|
3790
|
+
* Drop triggers for a collection
|
|
3791
|
+
*/
|
|
3792
|
+
private dropTriggers;
|
|
3793
|
+
/**
|
|
3794
|
+
* Drop the FTS table and triggers for a collection
|
|
3795
|
+
*/
|
|
3796
|
+
dropFtsTable(collectionSlug: string): Promise<void>;
|
|
3797
|
+
/**
|
|
3798
|
+
* Rebuild the FTS index for a collection
|
|
3799
|
+
*
|
|
3800
|
+
* This is useful after bulk imports or if the index gets out of sync.
|
|
3801
|
+
*/
|
|
3802
|
+
rebuildIndex(collectionSlug: string, searchableFields: string[], weights?: Record<string, number>): Promise<void>;
|
|
3803
|
+
/**
|
|
3804
|
+
* Populate the FTS table from existing content
|
|
3805
|
+
*/
|
|
3806
|
+
populateFromContent(collectionSlug: string, searchableFields: string[]): Promise<void>;
|
|
3807
|
+
/**
|
|
3808
|
+
* Get the search configuration for a collection
|
|
3809
|
+
*/
|
|
3810
|
+
getSearchConfig(collectionSlug: string): Promise<SearchConfig | null>;
|
|
3811
|
+
/**
|
|
3812
|
+
* Update the search configuration for a collection
|
|
3813
|
+
*/
|
|
3814
|
+
setSearchConfig(collectionSlug: string, config: SearchConfig): Promise<void>;
|
|
3815
|
+
/**
|
|
3816
|
+
* Get searchable fields for a collection
|
|
3817
|
+
*/
|
|
3818
|
+
getSearchableFields(collectionSlug: string): Promise<string[]>;
|
|
3819
|
+
/**
|
|
3820
|
+
* Enable search for a collection.
|
|
3821
|
+
*
|
|
3822
|
+
* Rebuilds from scratch to ensure stale tables or triggers do not survive
|
|
3823
|
+
* repeated enablement.
|
|
3824
|
+
*/
|
|
3825
|
+
enableSearch(collectionSlug: string, options?: {
|
|
3826
|
+
weights?: Record<string, number>;
|
|
3827
|
+
}): Promise<void>;
|
|
3828
|
+
/**
|
|
3829
|
+
* Disable search for a collection
|
|
3830
|
+
*
|
|
3831
|
+
* Drops the FTS table and triggers.
|
|
3832
|
+
*/
|
|
3833
|
+
disableSearch(collectionSlug: string): Promise<void>;
|
|
3834
|
+
/**
|
|
3835
|
+
* Get index statistics for a collection
|
|
3836
|
+
*/
|
|
3837
|
+
getIndexStats(collectionSlug: string): Promise<{
|
|
3838
|
+
indexed: number;
|
|
3839
|
+
lastRebuilt?: string;
|
|
3840
|
+
} | null>;
|
|
3841
|
+
/**
|
|
3842
|
+
* Verify FTS index integrity and rebuild if corrupted.
|
|
3843
|
+
*
|
|
3844
|
+
* Checks for row count mismatch between content table and FTS table.
|
|
3845
|
+
*
|
|
3846
|
+
* Returns true if the index was rebuilt, false if it was healthy.
|
|
3847
|
+
*/
|
|
3848
|
+
verifyAndRepairIndex(collectionSlug: string): Promise<boolean>;
|
|
3849
|
+
/**
|
|
3850
|
+
* Verify and repair FTS indexes for all search-enabled collections.
|
|
3851
|
+
*
|
|
3852
|
+
* Intended to run at startup to auto-heal any corruption from
|
|
3853
|
+
* previous process crashes.
|
|
3854
|
+
*/
|
|
3855
|
+
verifyAndRepairAll(): Promise<number>;
|
|
3856
|
+
}
|
|
3857
|
+
//#endregion
|
|
3858
|
+
//#region src/search/query.d.ts
|
|
4498
3859
|
/**
|
|
4499
|
-
*
|
|
3860
|
+
* Search across multiple collections
|
|
4500
3861
|
*
|
|
4501
|
-
*
|
|
4502
|
-
* when you need terms for a list of entries.
|
|
3862
|
+
* Public API that auto-injects the database.
|
|
4503
3863
|
*
|
|
4504
|
-
* @param
|
|
4505
|
-
* @param
|
|
4506
|
-
* @
|
|
4507
|
-
*
|
|
3864
|
+
* @param query - Search query (FTS5 syntax supported)
|
|
3865
|
+
* @param options - Search options
|
|
3866
|
+
* @returns Search results with pagination
|
|
3867
|
+
*
|
|
3868
|
+
* @example
|
|
3869
|
+
* ```typescript
|
|
3870
|
+
* import { search } from "dineway";
|
|
3871
|
+
*
|
|
3872
|
+
* const results = await search("hello world", {
|
|
3873
|
+
* collections: ["posts", "pages"],
|
|
3874
|
+
* limit: 20
|
|
3875
|
+
* });
|
|
3876
|
+
* ```
|
|
4508
3877
|
*/
|
|
4509
|
-
declare function
|
|
3878
|
+
declare function search(query: string, options?: SearchOptions): Promise<SearchResponse>;
|
|
4510
3879
|
/**
|
|
4511
|
-
*
|
|
3880
|
+
* Search across multiple collections (with explicit db)
|
|
3881
|
+
*
|
|
3882
|
+
* @internal Use `search()` in templates. This variant is for admin routes
|
|
3883
|
+
* that already have a database handle.
|
|
3884
|
+
*
|
|
3885
|
+
* @param db - Kysely database instance
|
|
3886
|
+
* @param query - Search query (FTS5 syntax supported)
|
|
3887
|
+
* @param options - Search options
|
|
3888
|
+
* @returns Search results with pagination
|
|
4512
3889
|
*/
|
|
4513
|
-
declare function
|
|
4514
|
-
id: string;
|
|
4515
|
-
data: Record<string, unknown>;
|
|
4516
|
-
}>>;
|
|
4517
|
-
//#endregion
|
|
4518
|
-
//#region src/widgets/types.d.ts
|
|
4519
|
-
type WidgetType = "content" | "menu" | "component";
|
|
4520
|
-
interface Widget {
|
|
4521
|
-
id: string;
|
|
4522
|
-
type: WidgetType;
|
|
4523
|
-
title?: string;
|
|
4524
|
-
content?: PortableTextBlock$2[];
|
|
4525
|
-
menuName?: string;
|
|
4526
|
-
componentId?: string;
|
|
4527
|
-
componentProps?: Record<string, unknown>;
|
|
4528
|
-
}
|
|
4529
|
-
interface WidgetArea {
|
|
4530
|
-
id: string;
|
|
4531
|
-
name: string;
|
|
4532
|
-
label: string;
|
|
4533
|
-
description?: string;
|
|
4534
|
-
widgets: Widget[];
|
|
4535
|
-
}
|
|
4536
|
-
interface WidgetComponentDef {
|
|
4537
|
-
id: string;
|
|
4538
|
-
label: string;
|
|
4539
|
-
description?: string;
|
|
4540
|
-
props: Record<string, PropDef>;
|
|
4541
|
-
}
|
|
4542
|
-
interface PropDef {
|
|
4543
|
-
type: "string" | "number" | "boolean" | "select";
|
|
4544
|
-
label: string;
|
|
4545
|
-
default?: unknown;
|
|
4546
|
-
options?: Array<{
|
|
4547
|
-
value: string;
|
|
4548
|
-
label: string;
|
|
4549
|
-
}>;
|
|
4550
|
-
}
|
|
4551
|
-
interface CreateWidgetAreaInput {
|
|
4552
|
-
name: string;
|
|
4553
|
-
label: string;
|
|
4554
|
-
description?: string;
|
|
4555
|
-
}
|
|
4556
|
-
interface CreateWidgetInput {
|
|
4557
|
-
type: WidgetType;
|
|
4558
|
-
title?: string;
|
|
4559
|
-
content?: PortableTextBlock$2[];
|
|
4560
|
-
menuName?: string;
|
|
4561
|
-
componentId?: string;
|
|
4562
|
-
componentProps?: Record<string, unknown>;
|
|
4563
|
-
}
|
|
4564
|
-
interface UpdateWidgetInput extends Partial<CreateWidgetInput> {}
|
|
4565
|
-
interface ReorderWidgetsInput {
|
|
4566
|
-
widgetIds: string[];
|
|
4567
|
-
}
|
|
4568
|
-
//#endregion
|
|
4569
|
-
//#region src/widgets/index.d.ts
|
|
3890
|
+
declare function searchWithDb(db: Kysely<Database>, query: string, options?: SearchOptions): Promise<SearchResponse>;
|
|
4570
3891
|
/**
|
|
4571
|
-
*
|
|
3892
|
+
* Search within a single collection
|
|
3893
|
+
*
|
|
3894
|
+
* @param db - Kysely database instance
|
|
3895
|
+
* @param collection - Collection slug
|
|
3896
|
+
* @param query - Search query (FTS5 syntax supported)
|
|
3897
|
+
* @param options - Search options
|
|
3898
|
+
* @returns Search results with pagination
|
|
3899
|
+
*
|
|
3900
|
+
* @example
|
|
3901
|
+
* ```typescript
|
|
3902
|
+
* const results = await searchCollection(db, "posts", "hello world", {
|
|
3903
|
+
* limit: 10
|
|
3904
|
+
* });
|
|
3905
|
+
* ```
|
|
4572
3906
|
*/
|
|
4573
|
-
declare function
|
|
3907
|
+
declare function searchCollection(db: Kysely<Database>, collection: string, query: string, options?: CollectionSearchOptions): Promise<SearchResponse>;
|
|
4574
3908
|
/**
|
|
4575
|
-
* Get
|
|
3909
|
+
* Get search suggestions for autocomplete
|
|
3910
|
+
*
|
|
3911
|
+
* @param db - Kysely database instance
|
|
3912
|
+
* @param query - Partial search query
|
|
3913
|
+
* @param options - Suggestion options
|
|
3914
|
+
* @returns Array of suggestions
|
|
4576
3915
|
*/
|
|
4577
|
-
declare function
|
|
3916
|
+
declare function getSuggestions(db: Kysely<Database>, query: string, options?: SuggestOptions): Promise<Suggestion[]>;
|
|
4578
3917
|
/**
|
|
4579
|
-
* Get
|
|
3918
|
+
* Get search statistics for all collections
|
|
4580
3919
|
*/
|
|
4581
|
-
declare function
|
|
3920
|
+
declare function getSearchStats(db: Kysely<Database>): Promise<SearchStats>;
|
|
4582
3921
|
//#endregion
|
|
4583
|
-
//#region src/search/
|
|
3922
|
+
//#region src/search/text-extraction.d.ts
|
|
4584
3923
|
/**
|
|
4585
|
-
*
|
|
3924
|
+
* Extract plain text from Portable Text blocks
|
|
4586
3925
|
*
|
|
4587
|
-
*
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
*
|
|
3926
|
+
* Uses @portabletext/toolkit's toPlainText for standard blocks,
|
|
3927
|
+
* plus extracts text from custom block types (code, images with alt/caption).
|
|
3928
|
+
*
|
|
3929
|
+
* @param blocks - Array of Portable Text blocks (or a JSON string)
|
|
3930
|
+
* @returns Plain text content
|
|
3931
|
+
*
|
|
3932
|
+
* @example
|
|
3933
|
+
* ```typescript
|
|
3934
|
+
* const text = extractPlainText([
|
|
3935
|
+
* {
|
|
3936
|
+
* _type: "block",
|
|
3937
|
+
* _key: "abc",
|
|
3938
|
+
* children: [{ _type: "span", _key: "s1", text: "Hello World" }]
|
|
3939
|
+
* }
|
|
3940
|
+
* ]);
|
|
3941
|
+
* // Returns: "Hello World"
|
|
3942
|
+
* ```
|
|
4591
3943
|
*/
|
|
4592
|
-
|
|
4593
|
-
/** Whether search is enabled for this collection */
|
|
4594
|
-
enabled: boolean;
|
|
4595
|
-
/** Field weights for ranking (higher = more important) */
|
|
4596
|
-
weights?: Record<string, number>;
|
|
4597
|
-
}
|
|
3944
|
+
declare function extractPlainText(blocks: PortableTextBlock[] | string | null | undefined): string;
|
|
4598
3945
|
/**
|
|
4599
|
-
*
|
|
3946
|
+
* Extract searchable text from a content entry
|
|
3947
|
+
*
|
|
3948
|
+
* Extracts text from specified fields, handling both plain text and Portable Text.
|
|
3949
|
+
*
|
|
3950
|
+
* @param entry - Content entry data
|
|
3951
|
+
* @param fields - Field names to extract text from
|
|
3952
|
+
* @returns Object mapping field names to extracted text
|
|
4600
3953
|
*/
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
/** Filter by content status (defaults to 'published') */
|
|
4605
|
-
status?: string;
|
|
4606
|
-
/** Filter by locale (omit to search all locales) */
|
|
4607
|
-
locale?: string;
|
|
4608
|
-
/** Maximum results to return (defaults to 20) */
|
|
4609
|
-
limit?: number;
|
|
4610
|
-
/** Pagination cursor */
|
|
4611
|
-
cursor?: string;
|
|
4612
|
-
}
|
|
3954
|
+
declare function extractSearchableFields(entry: Record<string, unknown>, fields: string[]): Record<string, string>;
|
|
3955
|
+
//#endregion
|
|
3956
|
+
//#region src/astro/storage/types.d.ts
|
|
4613
3957
|
/**
|
|
4614
|
-
*
|
|
3958
|
+
* Serializable storage configuration descriptor
|
|
4615
3959
|
*/
|
|
4616
|
-
interface
|
|
4617
|
-
/**
|
|
4618
|
-
|
|
4619
|
-
/**
|
|
4620
|
-
|
|
4621
|
-
/** Maximum results to return (defaults to 20) */
|
|
4622
|
-
limit?: number;
|
|
4623
|
-
/** Pagination cursor */
|
|
4624
|
-
cursor?: string;
|
|
3960
|
+
interface StorageDescriptor {
|
|
3961
|
+
/** Module path exporting createStorage function */
|
|
3962
|
+
entrypoint: string;
|
|
3963
|
+
/** Serializable config passed to createStorage at runtime */
|
|
3964
|
+
config: unknown;
|
|
4625
3965
|
}
|
|
4626
3966
|
/**
|
|
4627
|
-
*
|
|
3967
|
+
* S3-compatible storage configuration
|
|
4628
3968
|
*/
|
|
4629
|
-
interface
|
|
4630
|
-
/**
|
|
4631
|
-
|
|
4632
|
-
/**
|
|
4633
|
-
|
|
4634
|
-
/**
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
/**
|
|
4641
|
-
|
|
4642
|
-
|
|
4643
|
-
|
|
3969
|
+
interface S3StorageConfig {
|
|
3970
|
+
/** S3 endpoint URL */
|
|
3971
|
+
endpoint: string;
|
|
3972
|
+
/** Bucket name */
|
|
3973
|
+
bucket: string;
|
|
3974
|
+
/**
|
|
3975
|
+
* Access key ID.
|
|
3976
|
+
* May be resolved from `S3_ACCESS_KEY_ID` at runtime on Node.
|
|
3977
|
+
* Must be provided together with `secretAccessKey`, or both omitted.
|
|
3978
|
+
*/
|
|
3979
|
+
accessKeyId?: string;
|
|
3980
|
+
/**
|
|
3981
|
+
* Secret access key.
|
|
3982
|
+
* May be resolved from `S3_SECRET_ACCESS_KEY` at runtime on Node.
|
|
3983
|
+
* Must be provided together with `accessKeyId`, or both omitted.
|
|
3984
|
+
*/
|
|
3985
|
+
secretAccessKey?: string;
|
|
3986
|
+
/** Optional region (defaults to "auto") */
|
|
3987
|
+
region?: string;
|
|
3988
|
+
/** Optional public URL prefix for CDN */
|
|
3989
|
+
publicUrl?: string;
|
|
4644
3990
|
}
|
|
4645
3991
|
/**
|
|
4646
|
-
*
|
|
3992
|
+
* Local filesystem storage configuration
|
|
4647
3993
|
*/
|
|
4648
|
-
interface
|
|
4649
|
-
/**
|
|
4650
|
-
|
|
4651
|
-
/**
|
|
4652
|
-
|
|
3994
|
+
interface LocalStorageConfig {
|
|
3995
|
+
/** Directory path for storing files */
|
|
3996
|
+
directory: string;
|
|
3997
|
+
/** Base URL for serving files */
|
|
3998
|
+
baseUrl: string;
|
|
4653
3999
|
}
|
|
4000
|
+
//#endregion
|
|
4001
|
+
//#region src/astro/integration/runtime.d.ts
|
|
4654
4002
|
/**
|
|
4655
|
-
*
|
|
4003
|
+
* Admin page definition (copied from plugins/types to avoid circular deps)
|
|
4656
4004
|
*/
|
|
4657
|
-
interface
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
locale?: string;
|
|
4662
|
-
/** Maximum suggestions to return (defaults to 5) */
|
|
4663
|
-
limit?: number;
|
|
4005
|
+
interface PluginAdminPage {
|
|
4006
|
+
path: string;
|
|
4007
|
+
label: string;
|
|
4008
|
+
icon?: string;
|
|
4664
4009
|
}
|
|
4665
4010
|
/**
|
|
4666
|
-
*
|
|
4011
|
+
* Dashboard widget definition (copied from plugins/types to avoid circular deps)
|
|
4667
4012
|
*/
|
|
4668
|
-
interface
|
|
4669
|
-
/** Collection the suggestion belongs to */
|
|
4670
|
-
collection: string;
|
|
4671
|
-
/** Entry ID */
|
|
4013
|
+
interface PluginDashboardWidget {
|
|
4672
4014
|
id: string;
|
|
4673
|
-
|
|
4674
|
-
title
|
|
4015
|
+
size?: "full" | "half" | "third";
|
|
4016
|
+
title?: string;
|
|
4675
4017
|
}
|
|
4676
4018
|
/**
|
|
4677
|
-
*
|
|
4019
|
+
* Plugin descriptor - returned by plugin factory functions
|
|
4020
|
+
*
|
|
4021
|
+
* Contains all static metadata needed for manifest and admin UI,
|
|
4022
|
+
* plus the entrypoint for runtime instantiation.
|
|
4023
|
+
*
|
|
4024
|
+
* @example
|
|
4025
|
+
* ```ts
|
|
4026
|
+
* export function myPlugin(options?: MyPluginOptions): PluginDescriptor {
|
|
4027
|
+
* return {
|
|
4028
|
+
* id: "my-plugin",
|
|
4029
|
+
* version: "1.0.0",
|
|
4030
|
+
* entrypoint: "@my-org/dineway-plugin-foo",
|
|
4031
|
+
* options: options ?? {},
|
|
4032
|
+
* adminEntry: "@my-org/dineway-plugin-foo/admin",
|
|
4033
|
+
* adminPages: [{ path: "/settings", label: "Settings" }],
|
|
4034
|
+
* };
|
|
4035
|
+
* }
|
|
4036
|
+
* ```
|
|
4678
4037
|
*/
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4038
|
+
/**
|
|
4039
|
+
* Storage collection declaration for sandboxed plugins
|
|
4040
|
+
*/
|
|
4041
|
+
interface StorageCollectionDeclaration {
|
|
4042
|
+
indexes?: string[];
|
|
4043
|
+
uniqueIndexes?: string[];
|
|
4044
|
+
}
|
|
4045
|
+
interface PluginDescriptor<TOptions = Record<string, unknown>> {
|
|
4046
|
+
/** Unique plugin identifier */
|
|
4047
|
+
id: string;
|
|
4048
|
+
/** Plugin version (semver) */
|
|
4049
|
+
version: string;
|
|
4050
|
+
/** Module specifier to import (e.g., "@dineway-ai/plugin-api-test") */
|
|
4051
|
+
entrypoint: string;
|
|
4052
|
+
/**
|
|
4053
|
+
* Options to pass to createPlugin(). Native format only.
|
|
4054
|
+
* Standard-format plugins configure themselves via KV settings
|
|
4055
|
+
* and Block Kit admin pages -- not constructor options.
|
|
4056
|
+
*/
|
|
4057
|
+
options?: TOptions;
|
|
4058
|
+
/**
|
|
4059
|
+
* Plugin format. Determines how the entrypoint is loaded:
|
|
4060
|
+
* - `"standard"` -- exports `definePlugin({ hooks, routes })` as default.
|
|
4061
|
+
* Wrapped with `adaptSandboxEntry` for in-process execution. Can run in both
|
|
4062
|
+
* `plugins: []` (in-process) and `sandboxed: []` (isolate).
|
|
4063
|
+
* - `"native"` -- exports `createPlugin(options)` returning a `ResolvedPlugin`.
|
|
4064
|
+
* Can only run in `plugins: []`. Cannot be sandboxed or published to marketplace.
|
|
4065
|
+
*
|
|
4066
|
+
* Defaults to `"native"` when unset.
|
|
4067
|
+
*
|
|
4068
|
+
*/
|
|
4069
|
+
format?: "standard" | "native";
|
|
4070
|
+
/** Admin UI module specifier (e.g., "@dineway-ai/plugin-audit-log/admin") */
|
|
4071
|
+
adminEntry?: string;
|
|
4072
|
+
/** Module specifier for site-side Astro rendering components (must export `blockComponents`) */
|
|
4073
|
+
componentsEntry?: string;
|
|
4074
|
+
/** Admin pages for navigation */
|
|
4075
|
+
adminPages?: PluginAdminPage[];
|
|
4076
|
+
/** Dashboard widgets */
|
|
4077
|
+
adminWidgets?: PluginDashboardWidget[];
|
|
4078
|
+
/**
|
|
4079
|
+
* Capabilities the plugin requests.
|
|
4080
|
+
* For standard-format plugins, capabilities are enforced in both trusted and
|
|
4081
|
+
* sandboxed modes via the PluginContextFactory.
|
|
4082
|
+
*/
|
|
4083
|
+
capabilities?: string[];
|
|
4084
|
+
/**
|
|
4085
|
+
* Allowed hosts for network:request capability
|
|
4086
|
+
* Supports wildcards like "*.example.com"
|
|
4087
|
+
*/
|
|
4088
|
+
allowedHosts?: string[];
|
|
4089
|
+
/**
|
|
4090
|
+
* Storage collections the plugin declares
|
|
4091
|
+
* Sandboxed plugins can only access declared collections.
|
|
4092
|
+
*/
|
|
4093
|
+
storage?: Record<string, StorageCollectionDeclaration>;
|
|
4684
4094
|
}
|
|
4685
|
-
//#endregion
|
|
4686
|
-
//#region src/search/fts-manager.d.ts
|
|
4687
4095
|
/**
|
|
4688
|
-
*
|
|
4096
|
+
* Sandboxed plugin descriptor - same format as PluginDescriptor
|
|
4689
4097
|
*
|
|
4690
|
-
*
|
|
4691
|
-
*
|
|
4098
|
+
* These run in isolated environments provided by the configured sandbox runner.
|
|
4099
|
+
* The `entrypoint` is resolved to a file and bundled at build time.
|
|
4692
4100
|
*/
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
constructor(db: Kysely<Database>);
|
|
4101
|
+
type SandboxedPluginDescriptor<TOptions = Record<string, unknown>> = PluginDescriptor<TOptions>;
|
|
4102
|
+
interface DinewayFontsConfig {
|
|
4696
4103
|
/**
|
|
4697
|
-
*
|
|
4698
|
-
*
|
|
4104
|
+
* Additional Noto Sans or compatible script families to include in the admin UI.
|
|
4105
|
+
*
|
|
4106
|
+
* Use script names like "arabic", "farsi", "japanese", or "chinese-simplified".
|
|
4699
4107
|
*/
|
|
4700
|
-
|
|
4108
|
+
scripts?: string[];
|
|
4109
|
+
}
|
|
4110
|
+
interface DinewayConfig {
|
|
4701
4111
|
/**
|
|
4702
|
-
*
|
|
4703
|
-
*
|
|
4112
|
+
* Database configuration
|
|
4113
|
+
*
|
|
4114
|
+
* Use one of the adapter functions:
|
|
4115
|
+
* - `libsql({ url: process.env.DINEWAY_DATABASE_URL || "file:./data.db" })` - Default Node/libSQL path
|
|
4116
|
+
* - `sqlite({ url: "file:./data.db" })` - Local SQLite only
|
|
4117
|
+
* - `postgres({ connectionString: process.env.DATABASE_URL! })` - PostgreSQL deployments
|
|
4118
|
+
*
|
|
4119
|
+
* @example
|
|
4120
|
+
* ```ts
|
|
4121
|
+
* import { libsql } from "dineway/db";
|
|
4122
|
+
*
|
|
4123
|
+
* dineway({
|
|
4124
|
+
* database: libsql({ url: process.env.DINEWAY_DATABASE_URL || "file:./data.db" }),
|
|
4125
|
+
* })
|
|
4126
|
+
* ```
|
|
4704
4127
|
*/
|
|
4705
|
-
|
|
4128
|
+
database?: DatabaseDescriptor;
|
|
4706
4129
|
/**
|
|
4707
|
-
*
|
|
4130
|
+
* Storage configuration (for media)
|
|
4708
4131
|
*/
|
|
4709
|
-
|
|
4132
|
+
storage?: StorageDescriptor;
|
|
4710
4133
|
/**
|
|
4711
|
-
*
|
|
4134
|
+
* Trusted plugins to load (run in main isolate)
|
|
4135
|
+
*
|
|
4136
|
+
* @example
|
|
4137
|
+
* ```ts
|
|
4138
|
+
* import { auditLogPlugin } from "@dineway-ai/plugin-audit-log";
|
|
4139
|
+
* import { webhookNotifierPlugin } from "@dineway-ai/plugin-webhook-notifier";
|
|
4140
|
+
*
|
|
4141
|
+
* dineway({
|
|
4142
|
+
* plugins: [
|
|
4143
|
+
* auditLogPlugin(),
|
|
4144
|
+
* webhookNotifierPlugin({ url: "https://example.com/webhook" }),
|
|
4145
|
+
* ],
|
|
4146
|
+
* })
|
|
4147
|
+
* ```
|
|
4712
4148
|
*/
|
|
4713
|
-
|
|
4149
|
+
plugins?: PluginDescriptor[];
|
|
4714
4150
|
/**
|
|
4715
|
-
*
|
|
4716
|
-
* FTS5 is SQLite-only; on other dialects this is a no-op.
|
|
4151
|
+
* Sandboxed plugins to load (run behind the configured `SandboxRunner`)
|
|
4717
4152
|
*
|
|
4718
|
-
*
|
|
4719
|
-
*
|
|
4720
|
-
*
|
|
4153
|
+
* Uses the same format as `plugins`; the configured sandbox runner decides
|
|
4154
|
+
* how isolation is enforced for the current runtime.
|
|
4155
|
+
*
|
|
4156
|
+
* @example
|
|
4157
|
+
* ```ts
|
|
4158
|
+
* import { untrustedPlugin } from "some-third-party-plugin";
|
|
4159
|
+
*
|
|
4160
|
+
* dineway({
|
|
4161
|
+
* plugins: [trustedPlugin()], // runs in host
|
|
4162
|
+
* sandboxed: [untrustedPlugin()], // runs in the default Node sandbox
|
|
4163
|
+
* })
|
|
4164
|
+
* ```
|
|
4721
4165
|
*/
|
|
4722
|
-
|
|
4166
|
+
sandboxed?: SandboxedPluginDescriptor[];
|
|
4723
4167
|
/**
|
|
4724
|
-
*
|
|
4168
|
+
* Optional module that exports a custom sandbox runner factory.
|
|
4169
|
+
* When omitted, Dineway uses its built-in Node sandbox runner.
|
|
4725
4170
|
*
|
|
4726
|
-
*
|
|
4727
|
-
*
|
|
4728
|
-
*
|
|
4171
|
+
* @example
|
|
4172
|
+
* ```ts
|
|
4173
|
+
* import { createNodeSandboxRunner } from "dineway";
|
|
4174
|
+
*
|
|
4175
|
+
* export const createSandboxRunner = createNodeSandboxRunner;
|
|
4176
|
+
* ```
|
|
4177
|
+
*
|
|
4178
|
+
* @example
|
|
4179
|
+
* ```ts
|
|
4180
|
+
* dineway({
|
|
4181
|
+
* sandboxRunner: "./src/sandbox-runner.ts",
|
|
4182
|
+
* })
|
|
4183
|
+
* ```
|
|
4729
4184
|
*/
|
|
4730
|
-
|
|
4185
|
+
sandboxRunner?: string;
|
|
4731
4186
|
/**
|
|
4732
|
-
*
|
|
4187
|
+
* Authentication configuration
|
|
4188
|
+
*
|
|
4189
|
+
* Use an auth descriptor or an adapter function from a provider package.
|
|
4190
|
+
*
|
|
4191
|
+
* When an external auth provider is configured, passkey auth is disabled.
|
|
4192
|
+
*
|
|
4193
|
+
* @example
|
|
4194
|
+
* ```ts
|
|
4195
|
+
* dineway({
|
|
4196
|
+
* auth: {
|
|
4197
|
+
* type: "header-auth",
|
|
4198
|
+
* entrypoint: "./src/header-auth.ts",
|
|
4199
|
+
* config: {
|
|
4200
|
+
* userHeader: "x-forwarded-user-email",
|
|
4201
|
+
* roleHeader: "x-forwarded-user-role",
|
|
4202
|
+
* },
|
|
4203
|
+
* },
|
|
4204
|
+
* })
|
|
4205
|
+
* ```
|
|
4733
4206
|
*/
|
|
4734
|
-
|
|
4207
|
+
auth?: AuthDescriptor;
|
|
4735
4208
|
/**
|
|
4736
|
-
*
|
|
4209
|
+
* Interactive login providers shown on the admin login page and setup wizard.
|
|
4210
|
+
*
|
|
4211
|
+
* These are additive to built-in passkey auth. Transparent request auth still
|
|
4212
|
+
* uses `auth`; when `auth` is configured, the external provider owns login.
|
|
4737
4213
|
*/
|
|
4738
|
-
|
|
4214
|
+
authProviders?: AuthProviderDescriptor[];
|
|
4739
4215
|
/**
|
|
4740
|
-
*
|
|
4216
|
+
* MCP (Model Context Protocol) server endpoint.
|
|
4741
4217
|
*
|
|
4742
|
-
*
|
|
4218
|
+
* Exposes an MCP Streamable HTTP server at `/_dineway/api/mcp`
|
|
4219
|
+
* that allows AI agents and tools to interact with the CMS using
|
|
4220
|
+
* the standardized MCP protocol.
|
|
4221
|
+
*
|
|
4222
|
+
* Enabled by default. The endpoint requires bearer token auth, so
|
|
4223
|
+
* it has no practical effect unless the user creates an API token
|
|
4224
|
+
* or configures an OAuth client. Set to `false` to disable.
|
|
4225
|
+
*
|
|
4226
|
+
* @default true
|
|
4227
|
+
*
|
|
4228
|
+
* @example
|
|
4229
|
+
* ```ts
|
|
4230
|
+
* dineway({
|
|
4231
|
+
* mcp: false,
|
|
4232
|
+
* })
|
|
4233
|
+
* ```
|
|
4743
4234
|
*/
|
|
4744
|
-
|
|
4235
|
+
mcp?: boolean;
|
|
4745
4236
|
/**
|
|
4746
|
-
*
|
|
4237
|
+
* Plugin marketplace URL
|
|
4238
|
+
*
|
|
4239
|
+
* When set, enables the marketplace features: browse, install, update,
|
|
4240
|
+
* and uninstall plugins from a remote marketplace.
|
|
4241
|
+
*
|
|
4242
|
+
* Must be an HTTPS URL in production, or localhost/127.0.0.1 in dev.
|
|
4243
|
+
* Marketplace plugins run in the built-in Node sandbox runner unless
|
|
4244
|
+
* `sandboxRunner` is set to override it.
|
|
4245
|
+
*
|
|
4246
|
+
* @example
|
|
4247
|
+
* ```ts
|
|
4248
|
+
* dineway({
|
|
4249
|
+
* marketplace: "https://marketplace.example.com",
|
|
4250
|
+
* })
|
|
4251
|
+
* ```
|
|
4747
4252
|
*/
|
|
4748
|
-
|
|
4253
|
+
marketplace?: string;
|
|
4749
4254
|
/**
|
|
4750
|
-
*
|
|
4255
|
+
* Maximum allowed media file upload size in bytes.
|
|
4256
|
+
*
|
|
4257
|
+
* Applies to both direct multipart uploads and signed-URL uploads.
|
|
4258
|
+
* When omitted, Dineway defaults to 52_428_800 (50 MB).
|
|
4259
|
+
*
|
|
4260
|
+
* @example
|
|
4261
|
+
* ```ts
|
|
4262
|
+
* dineway({ maxUploadSize: 100 * 1024 * 1024 }) // 100 MB
|
|
4263
|
+
* ```
|
|
4751
4264
|
*/
|
|
4752
|
-
|
|
4265
|
+
maxUploadSize?: number;
|
|
4753
4266
|
/**
|
|
4754
|
-
*
|
|
4267
|
+
* Admin UI branding.
|
|
4268
|
+
*
|
|
4269
|
+
* Use this to customize the logo, name, and favicon shown in the
|
|
4270
|
+
* Dineway admin panel without changing public site identity settings.
|
|
4271
|
+
*
|
|
4272
|
+
* @example
|
|
4273
|
+
* ```ts
|
|
4274
|
+
* dineway({
|
|
4275
|
+
* admin: {
|
|
4276
|
+
* logo: "/images/agency-logo.svg",
|
|
4277
|
+
* siteName: "Agency Console",
|
|
4278
|
+
* favicon: "/agency-favicon.ico",
|
|
4279
|
+
* },
|
|
4280
|
+
* })
|
|
4281
|
+
* ```
|
|
4755
4282
|
*/
|
|
4756
|
-
|
|
4283
|
+
admin?: {
|
|
4284
|
+
/** URL or path to a custom logo image for the admin UI. */logo?: string; /** Custom name displayed in the admin sidebar and browser tab. */
|
|
4285
|
+
siteName?: string; /** URL or path to a custom favicon for the admin panel. */
|
|
4286
|
+
favicon?: string;
|
|
4287
|
+
};
|
|
4757
4288
|
/**
|
|
4758
|
-
*
|
|
4289
|
+
* Admin UI font configuration.
|
|
4290
|
+
*
|
|
4291
|
+
* By default, Dineway uses the Astro Font API to load Noto Sans at
|
|
4292
|
+
* build time and self-host the generated font files. Set to false to
|
|
4293
|
+
* disable Dineway-managed fonts and use system fonts.
|
|
4294
|
+
*
|
|
4295
|
+
* @example
|
|
4296
|
+
* ```ts
|
|
4297
|
+
* dineway({
|
|
4298
|
+
* fonts: {
|
|
4299
|
+
* scripts: ["arabic", "farsi", "japanese"],
|
|
4300
|
+
* },
|
|
4301
|
+
* })
|
|
4302
|
+
* ```
|
|
4759
4303
|
*/
|
|
4760
|
-
|
|
4304
|
+
fonts?: false | DinewayFontsConfig;
|
|
4761
4305
|
/**
|
|
4762
|
-
*
|
|
4306
|
+
* Public browser-facing origin for the site.
|
|
4763
4307
|
*
|
|
4764
|
-
*
|
|
4765
|
-
*
|
|
4308
|
+
* Use when `Astro.url` / `request.url` do not match what users open — common with a
|
|
4309
|
+
* **TLS-terminating reverse proxy**: the app often sees `http://` on the internal hop
|
|
4310
|
+
* while the browser uses `https://`, which breaks WebAuthn, CSRF, OAuth, and redirect URLs.
|
|
4311
|
+
*
|
|
4312
|
+
* Set to the full origin users type in the address bar (no path), e.g.
|
|
4313
|
+
* `https://mysite.example.com`. When not set, falls back to environment variables
|
|
4314
|
+
* `DINEWAY_SITE_URL` > `SITE_URL`, then to the request URL's origin.
|
|
4315
|
+
*
|
|
4316
|
+
* Replaces `passkeyPublicOrigin` (which only fixed passkeys).
|
|
4766
4317
|
*/
|
|
4767
|
-
|
|
4768
|
-
weights?: Record<string, number>;
|
|
4769
|
-
}): Promise<void>;
|
|
4318
|
+
siteUrl?: string;
|
|
4770
4319
|
/**
|
|
4771
|
-
*
|
|
4320
|
+
* Additional origins accepted by passkey verification.
|
|
4772
4321
|
*
|
|
4773
|
-
*
|
|
4322
|
+
* When the same Dineway deployment is reachable under several hostnames
|
|
4323
|
+
* sharing a registrable parent (e.g. `https://example.com` plus
|
|
4324
|
+
* `https://preview.example.com`), the canonical `siteUrl` defines the
|
|
4325
|
+
* `rpId` and the entries here are the additional origins from which
|
|
4326
|
+
* assertions are accepted. Each entry must be the same hostname as
|
|
4327
|
+
* `siteUrl` or a subdomain of it; WebAuthn requires `rpId` to be a
|
|
4328
|
+
* registrable suffix of every origin.
|
|
4329
|
+
*
|
|
4330
|
+
* Merged at runtime with the `DINEWAY_ALLOWED_ORIGINS` env var
|
|
4331
|
+
* (comma-separated), falling back to `ALLOWED_ORIGINS` when the prefixed
|
|
4332
|
+
* variable is absent. Validation:
|
|
4333
|
+
* - Config-declared entries are shape-checked at Astro startup.
|
|
4334
|
+
* - Subdomain relationship to `siteUrl` is checked at startup when
|
|
4335
|
+
* `siteUrl` is also config-declared, otherwise at first passkey
|
|
4336
|
+
* verification because `siteUrl` may come from `DINEWAY_SITE_URL`.
|
|
4337
|
+
*
|
|
4338
|
+
* Mismatches throw with a source-attributed message naming
|
|
4339
|
+
* `config.allowedOrigins`, `DINEWAY_ALLOWED_ORIGINS`, or `ALLOWED_ORIGINS`.
|
|
4340
|
+
*
|
|
4341
|
+
* @example
|
|
4342
|
+
* ```ts
|
|
4343
|
+
* dineway({
|
|
4344
|
+
* siteUrl: "https://example.com",
|
|
4345
|
+
* allowedOrigins: ["https://preview.example.com"],
|
|
4346
|
+
* })
|
|
4347
|
+
* ```
|
|
4774
4348
|
*/
|
|
4775
|
-
|
|
4349
|
+
allowedOrigins?: string[];
|
|
4776
4350
|
/**
|
|
4777
|
-
*
|
|
4351
|
+
* Reverse-proxy headers that Dineway may trust for client IP resolution.
|
|
4352
|
+
*
|
|
4353
|
+
* Defaults to no trusted headers. Set this only when Dineway is deployed
|
|
4354
|
+
* behind a reverse proxy you control and that proxy strips or overwrites
|
|
4355
|
+
* incoming client-supplied copies of these headers.
|
|
4356
|
+
*
|
|
4357
|
+
* When omitted, Dineway falls back to `DINEWAY_TRUSTED_PROXY_HEADERS`.
|
|
4358
|
+
*
|
|
4359
|
+
* @example
|
|
4360
|
+
* ```ts
|
|
4361
|
+
* dineway({
|
|
4362
|
+
* trustedProxyHeaders: ["x-real-ip", "x-forwarded-for"],
|
|
4363
|
+
* })
|
|
4364
|
+
* ```
|
|
4778
4365
|
*/
|
|
4779
|
-
|
|
4780
|
-
indexed: number;
|
|
4781
|
-
lastRebuilt?: string;
|
|
4782
|
-
} | null>;
|
|
4366
|
+
trustedProxyHeaders?: string[];
|
|
4783
4367
|
/**
|
|
4784
|
-
*
|
|
4368
|
+
* Enable playground mode for ephemeral "try Dineway" sites.
|
|
4785
4369
|
*
|
|
4786
|
-
*
|
|
4370
|
+
* When set, the integration injects a playground middleware (order: "pre")
|
|
4371
|
+
* that runs BEFORE the normal Dineway middleware chain. It creates an
|
|
4372
|
+
* isolated session database per visitor, runs migrations, applies the
|
|
4373
|
+
* seed, creates an anonymous admin user, and stashes the request-scoped
|
|
4374
|
+
* database on locals so the runtime and request-context middleware can
|
|
4375
|
+
* pick it up.
|
|
4787
4376
|
*
|
|
4788
|
-
*
|
|
4377
|
+
* Setup and auth middleware are skipped because the playground middleware
|
|
4378
|
+
* handles bootstrap and user injection.
|
|
4379
|
+
*
|
|
4380
|
+
* For the first portable release, playground sidecars are explicitly
|
|
4381
|
+
* single-instance only.
|
|
4382
|
+
*
|
|
4383
|
+
* @example
|
|
4384
|
+
* ```ts
|
|
4385
|
+
* import { fileURLToPath } from "node:url";
|
|
4386
|
+
* import { libsql } from "dineway/db";
|
|
4387
|
+
*
|
|
4388
|
+
* dineway({
|
|
4389
|
+
* database: libsql({ url: process.env.DINEWAY_DATABASE_URL || "file:./playground.db" }),
|
|
4390
|
+
* playground: {
|
|
4391
|
+
* middlewareEntrypoint: fileURLToPath(
|
|
4392
|
+
* new URL("./src/playground-middleware.ts", import.meta.url)
|
|
4393
|
+
* ),
|
|
4394
|
+
* },
|
|
4395
|
+
* })
|
|
4396
|
+
* ```
|
|
4789
4397
|
*/
|
|
4790
|
-
|
|
4398
|
+
playground?: {
|
|
4399
|
+
/** Module path for the playground middleware. */middlewareEntrypoint: string;
|
|
4400
|
+
};
|
|
4791
4401
|
/**
|
|
4792
|
-
*
|
|
4402
|
+
* Media providers for browsing and uploading media
|
|
4793
4403
|
*
|
|
4794
|
-
*
|
|
4795
|
-
*
|
|
4404
|
+
* The local media provider (using storage adapter) is available by default.
|
|
4405
|
+
* Additional providers can be added for external services like Unsplash,
|
|
4406
|
+
* Cloudinary, Mux, and other provider packages.
|
|
4407
|
+
*
|
|
4408
|
+
* @example
|
|
4409
|
+
* ```ts
|
|
4410
|
+
* import { unsplash } from "@dineway-ai/provider-unsplash";
|
|
4411
|
+
*
|
|
4412
|
+
* dineway({
|
|
4413
|
+
* mediaProviders: [
|
|
4414
|
+
* unsplash({ accessKey: "..." }),
|
|
4415
|
+
* ],
|
|
4416
|
+
* })
|
|
4417
|
+
* ```
|
|
4796
4418
|
*/
|
|
4797
|
-
|
|
4419
|
+
mediaProviders?: MediaProviderDescriptor[];
|
|
4798
4420
|
}
|
|
4799
|
-
//#endregion
|
|
4800
|
-
//#region src/search/query.d.ts
|
|
4801
|
-
/**
|
|
4802
|
-
* Search across multiple collections
|
|
4803
|
-
*
|
|
4804
|
-
* Public API that auto-injects the database.
|
|
4805
|
-
*
|
|
4806
|
-
* @param query - Search query (FTS5 syntax supported)
|
|
4807
|
-
* @param options - Search options
|
|
4808
|
-
* @returns Search results with pagination
|
|
4809
|
-
*
|
|
4810
|
-
* @example
|
|
4811
|
-
* ```typescript
|
|
4812
|
-
* import { search } from "dineway";
|
|
4813
|
-
*
|
|
4814
|
-
* const results = await search("hello world", {
|
|
4815
|
-
* collections: ["posts", "pages"],
|
|
4816
|
-
* limit: 20
|
|
4817
|
-
* });
|
|
4818
|
-
* ```
|
|
4819
|
-
*/
|
|
4820
|
-
declare function search(query: string, options?: SearchOptions): Promise<SearchResponse>;
|
|
4821
|
-
/**
|
|
4822
|
-
* Search across multiple collections (with explicit db)
|
|
4823
|
-
*
|
|
4824
|
-
* @internal Use `search()` in templates. This variant is for admin routes
|
|
4825
|
-
* that already have a database handle.
|
|
4826
|
-
*
|
|
4827
|
-
* @param db - Kysely database instance
|
|
4828
|
-
* @param query - Search query (FTS5 syntax supported)
|
|
4829
|
-
* @param options - Search options
|
|
4830
|
-
* @returns Search results with pagination
|
|
4831
|
-
*/
|
|
4832
|
-
declare function searchWithDb(db: Kysely<Database>, query: string, options?: SearchOptions): Promise<SearchResponse>;
|
|
4833
|
-
/**
|
|
4834
|
-
* Search within a single collection
|
|
4835
|
-
*
|
|
4836
|
-
* @param db - Kysely database instance
|
|
4837
|
-
* @param collection - Collection slug
|
|
4838
|
-
* @param query - Search query (FTS5 syntax supported)
|
|
4839
|
-
* @param options - Search options
|
|
4840
|
-
* @returns Search results with pagination
|
|
4841
|
-
*
|
|
4842
|
-
* @example
|
|
4843
|
-
* ```typescript
|
|
4844
|
-
* const results = await searchCollection(db, "posts", "hello world", {
|
|
4845
|
-
* limit: 10
|
|
4846
|
-
* });
|
|
4847
|
-
* ```
|
|
4848
|
-
*/
|
|
4849
|
-
declare function searchCollection(db: Kysely<Database>, collection: string, query: string, options?: CollectionSearchOptions): Promise<SearchResponse>;
|
|
4850
|
-
/**
|
|
4851
|
-
* Get search suggestions for autocomplete
|
|
4852
|
-
*
|
|
4853
|
-
* @param db - Kysely database instance
|
|
4854
|
-
* @param query - Partial search query
|
|
4855
|
-
* @param options - Suggestion options
|
|
4856
|
-
* @returns Array of suggestions
|
|
4857
|
-
*/
|
|
4858
|
-
declare function getSuggestions(db: Kysely<Database>, query: string, options?: SuggestOptions): Promise<Suggestion[]>;
|
|
4859
|
-
/**
|
|
4860
|
-
* Get search statistics for all collections
|
|
4861
|
-
*/
|
|
4862
|
-
declare function getSearchStats(db: Kysely<Database>): Promise<SearchStats>;
|
|
4863
|
-
//#endregion
|
|
4864
|
-
//#region src/search/text-extraction.d.ts
|
|
4865
|
-
/**
|
|
4866
|
-
* Extract plain text from Portable Text blocks
|
|
4867
|
-
*
|
|
4868
|
-
* Uses @portabletext/toolkit's toPlainText for standard blocks,
|
|
4869
|
-
* plus extracts text from custom block types (code, images with alt/caption).
|
|
4870
|
-
*
|
|
4871
|
-
* @param blocks - Array of Portable Text blocks (or a JSON string)
|
|
4872
|
-
* @returns Plain text content
|
|
4873
|
-
*
|
|
4874
|
-
* @example
|
|
4875
|
-
* ```typescript
|
|
4876
|
-
* const text = extractPlainText([
|
|
4877
|
-
* {
|
|
4878
|
-
* _type: "block",
|
|
4879
|
-
* _key: "abc",
|
|
4880
|
-
* children: [{ _type: "span", _key: "s1", text: "Hello World" }]
|
|
4881
|
-
* }
|
|
4882
|
-
* ]);
|
|
4883
|
-
* // Returns: "Hello World"
|
|
4884
|
-
* ```
|
|
4885
|
-
*/
|
|
4886
|
-
declare function extractPlainText(blocks: PortableTextBlock$1[] | string | null | undefined): string;
|
|
4887
4421
|
/**
|
|
4888
|
-
*
|
|
4889
|
-
*
|
|
4890
|
-
* Extracts text from specified fields, handling both plain text and Portable Text.
|
|
4891
|
-
*
|
|
4892
|
-
* @param entry - Content entry data
|
|
4893
|
-
* @param fields - Field names to extract text from
|
|
4894
|
-
* @returns Object mapping field names to extracted text
|
|
4422
|
+
* Get stored config from global
|
|
4423
|
+
* This is set by the virtual module at build time
|
|
4895
4424
|
*/
|
|
4896
|
-
declare function
|
|
4425
|
+
declare function getStoredConfig(): DinewayConfig | null;
|
|
4426
|
+
declare global {
|
|
4427
|
+
var __dinewayConfig: DinewayConfig | undefined;
|
|
4428
|
+
}
|
|
4897
4429
|
//#endregion
|
|
4898
|
-
export {
|
|
4430
|
+
export { Menu as $, PortableTextCodeBlock as $n, handleContentSchedule as $r, EntryFilter as $t, UpdateWidgetInput as A, ListResponse as Ai, DinewayCollections as An, handleMediaGet as Ar, PreviewTokenPayload as At, getTerm as B, getTranslations as Bn, handleContentCountScheduled as Br, createNoopSandboxRunner as Bt, getWidgetArea as C, apiError as Ci, isI18nEnabled as Cn, getCollectionInfo as Cr, isBlockedInPreview as Ct, CreateWidgetInput as D, ContentListResponse as Di, CollectionFilter$1 as Dn, MediaResponse as Dr, buildPreviewUrl as Dt, CreateWidgetAreaInput as E, ApiContext as Ei, CacheHint as En, MediaListResponse as Er, GetPreviewUrlOptions as Et, getEntriesByTerm as F, TranslationSummary as Fn, handleRevisionGet as Fr, verifyPreviewToken as Ft, TaxonomyTermRow as G, createEditable as Gn, handleContentDuplicate as Gr, HookPipeline as Gt, CreateTermInput as H, CMSAnnotation as Hn, handleContentCreate as Hr, createPluginManager as Ht, getEntryTerms as I, TranslationsResult as In, handleRevisionList as Ir, NodeSandboxRunner as It, getBylineBySlug as J, sanitizeHref as Jn, handleContentList as Jr, ValidatedPluginManifest as Jt, UpdateTermInput as K, createNoop as Kn, handleContentGet as Kr, HookResult as Kt, getTaxonomyDef as L, getDinewayCollection as Ln, handleRevisionRestore as Lr, createNodeSandboxRunner as Lt, WidgetArea as M, EntryResult as Mn, handleMediaUpdate as Mr, VerifyPreviewTokenResult as Mt, WidgetComponentDef as N, InferCollectionData as Nn, RevisionListResponse as Nr, generatePreviewToken as Nt, PropDef as O, ContentResponse as Oi, CollectionResult as On, handleMediaCreate as Or, getPreviewUrl as Ot, WidgetType as P, ResolvePathResult as Pn, RevisionResponse as Pr, parseContentId as Pt, CreateMenuItemInput as Q, prosemirrorToPortableText as Qn, handleContentRestore as Qr, EntryData as Qt, getTaxonomyDefs as R, getDinewayEntry as Rn, generateManifest as Rr, NoopSandboxRunner as Rt, Suggestion as S, parseQuery as Si, getI18nConfig as Sn, UpdateSectionInput as Sr, renderPreviewLoadingPage as St, getWidgetComponents as T, handleError as Ti, after as Tn, SchemaRegistry as Tr, isPreviewRequest as Tt, TaxonomyDef as U, EditProxy as Un, handleContentDelete as Ur, PluginRouteError as Ut, getTermsForEntries as V, resolveDinewayPath as Vn, handleContentCountTrashed as Vr, PluginManager as Vt, TaxonomyTerm as W, FieldAnnotation as Wn, handleContentDiscardDraft as Wr, EmailPipeline as Wt, getMenus as X, hashString as Xn, handleContentPermanentDelete as Xr, definePlugin as Xt, getMenu as Y, computeContentHash as Yn, handleContentListTrashed as Yr, pluginManifestSchema as Yt, CreateMenuInput as Z, portableTextToProsemirror as Zn, handleContentPublish as Zr, CollectionFilter as Zt, SearchOptions as _, DinewayDatabaseError as _i, parsePreviewSignatureHeader as _n, getSections as _r, ApplySnapshotToDatabaseOptions as _t, S3StorageConfig as a, reference as ai, FileSessionDatabaseFactoryOptions as an, PortableTextUnknownBlock as ar, GetCommentsOptions as at, SearchStats as b, isParseError as bi, I18nConfig as bn, Section as br, getAppliedSnapshotMeta as bt, extractSearchableFields as c, FieldUIHints as ci, SessionDatabaseHandle as cn, ProseMirrorNode as cr, getComments as ct, search as d, PortableTextBlock$1 as di, SessionOpenOptions as dn, SandboxOptions as dr, getSiteSetting as dt, handleContentTranslations as ei, dinewayLoader as en, PortableTextImageBlock as er, MenuItem as et, searchCollection as f, CreateMediaInput as fi, SessionOpenOrCreateOptions as fn, SandboxRunner as fr, getSiteSettings as ft, SearchConfig as g, DatabaseConfig as gi, defaultPreviewSidecarClient as gn, getSection as gr, AppliedSnapshotMeta as gt, CollectionSearchOptions as h, ContentRepository as hi, buildPreviewSignatureHeader as hn, SerializedRequest as hr, renderPreviewToolbar as ht, LocalStorageConfig as i, portableText as ii, FileSessionDatabaseFactory as in, PortableTextTextBlock as ir, UpdateMenuItemInput as it, Widget as j, ManifestResponse as ji, EditFieldMeta as jn, handleMediaList as jr, VerifyPreviewTokenOptions as jt, ReorderWidgetsInput as k, FieldDescriptor as ki, ContentEntry as kn, handleMediaDelete as kr, GeneratePreviewTokenOptions as kt, getSearchStats as l, FileValue as li, SessionDatabaseInfo as ln, SandboxEmailMessage as lr, getPluginSetting as lt, FTSManager as m, MediaRepository as mi, PreviewSidecarSignature as mn, SandboxedPlugin as mr, PreviewToolbarConfig as mt, PluginDescriptor as n, handleContentUnschedule as ni, FilePreviewMiddlewareConfig as nn, PortableTextMarkDef as nr, ReorderMenuItemsInput as nt, StorageDescriptor as o, image as oi, SessionCleanupResult as on, ProseMirrorDocument as or, GetCommentsResult as ot, searchWithDb as p, MediaItem as pi, PreviewSidecarClient as pn, SandboxRunnerFactory as pr, setSiteSettings as pt, getByline as q, isSafeHref as qn, handleContentGetIncludingTrashed as qr, createHookPipeline as qt, getStoredConfig as r, handleContentUpdate as ri, createFilePreviewMiddleware as rn, PortableTextSpan as rr, UpdateMenuInput as rt, extractPlainText as s, FieldDefinition as si, SessionDatabaseFactory as sn, ProseMirrorMark as sr, getCommentCount as st, DinewayConfig as t, handleContentUnpublish as ti, getDb as tn, PortableTextLinkMark as tr, MenuItemType as tt, getSuggestions as u, ImageValue as ui, SessionDatabaseLimitError as un, SandboxEmailSendCallback as ur, getPluginSettings as ut, SearchResponse as v, OptionsRepository as vi, signPreviewUrl as vn, CreateSectionInput as vr, applySnapshotToDatabase as vt, getWidgetAreas as w, apiSuccess as wi, AfterCallback as wn, SchemaError as wr, getPreviewToken as wt, SuggestOptions as x, parseBody as xi, getFallbackChain as xn, SectionSource as xr, Snapshot as xt, SearchResult as y, ParseResult as yi, verifyPreviewSignature as yn, GetSectionsOptions as yr, dropSessionDatabaseTables as yt, getTaxonomyTerms as z, getEditMeta as zn, handleContentCompare as zr, SandboxNotAvailableError as zt };
|