emdash 0.12.0 → 0.13.0
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/dist/{adapters-BktHA7EO.d.mts → adapters-9DybjTO6.d.mts} +1 -1
- package/dist/{adapters-BktHA7EO.d.mts.map → adapters-9DybjTO6.d.mts.map} +1 -1
- package/dist/allowed-origins-CDdG-4Gd.mjs +116 -0
- package/dist/allowed-origins-CDdG-4Gd.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +68 -0
- package/dist/api/route-utils.d.mts.map +1 -0
- package/dist/api/route-utils.mjs +44 -0
- package/dist/api/route-utils.mjs.map +1 -0
- package/dist/api/schemas/index.d.mts +2 -0
- package/dist/api/schemas/index.mjs +4 -0
- package/dist/api-ayIQ7rIe.mjs +3941 -0
- package/dist/api-ayIQ7rIe.mjs.map +1 -0
- package/dist/api-tokens-D3C9v02m.mjs +3 -0
- package/dist/api-tokens-eYymBhIT.mjs +153 -0
- package/dist/api-tokens-eYymBhIT.mjs.map +1 -0
- package/dist/{apply-C1ZORgcy.mjs → apply-v4DBgjPw.mjs} +19 -346
- package/dist/apply-v4DBgjPw.mjs.map +1 -0
- package/dist/astro/index.d.mts +10 -6
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +42 -83
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +9 -5
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +25 -65
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/redirect.mjs +5 -5
- package/dist/astro/middleware/request-context.mjs +4 -4
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +140 -69
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/PluginRegistry.d.mts +15 -0
- package/dist/astro/routes/PluginRegistry.d.mts.map +1 -0
- package/dist/astro/routes/PluginRegistry.mjs +25 -0
- package/dist/astro/routes/PluginRegistry.mjs.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.d.mts +15 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +67 -0
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.d.mts +15 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +67 -0
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.d.mts +11 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +33 -0
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/index.d.mts +17 -0
- package/dist/astro/routes/api/admin/api-tokens/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +52 -0
- package/dist/astro/routes/api/admin/api-tokens/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts +10 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +74 -0
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/bylines/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/bylines/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/bylines/index.mjs +61 -0
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts +8 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +80 -0
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_.d.mts +15 -0
- package/dist/astro/routes/api/admin/comments/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/_id_.mjs +47 -0
- package/dist/astro/routes/api/admin/comments/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/bulk.d.mts +8 -0
- package/dist/astro/routes/api/admin/comments/bulk.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/bulk.mjs +36 -0
- package/dist/astro/routes/api/admin/comments/bulk.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/counts.d.mts +8 -0
- package/dist/astro/routes/api/admin/comments/counts.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/counts.mjs +25 -0
- package/dist/astro/routes/api/admin/comments/counts.mjs.map +1 -0
- package/dist/astro/routes/api/admin/comments/index.d.mts +11 -0
- package/dist/astro/routes/api/admin/comments/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/comments/index.mjs +40 -0
- package/dist/astro/routes/api/admin/comments/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.d.mts +8 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +48 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +36 -0
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.d.mts +19 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +69 -0
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.d.mts +15 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +50 -0
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +56 -0
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +59 -0
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +51 -0
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +58 -0
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +66 -0
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/index.mjs +49 -0
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +39 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +51 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +69 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +58 -0
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +72 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/updates.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/updates.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/updates.mjs +49 -0
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +51 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.d.mts +8 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +39 -0
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +67 -0
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +43 -0
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +32 -0
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/index.d.mts +9 -0
- package/dist/astro/routes/api/admin/users/_id_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +106 -0
- package/dist/astro/routes/api/admin/users/_id_/index.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +46 -0
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -0
- package/dist/astro/routes/api/admin/users/index.d.mts +8 -0
- package/dist/astro/routes/api/admin/users/index.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/users/index.mjs +56 -0
- package/dist/astro/routes/api/admin/users/index.mjs.map +1 -0
- package/dist/astro/routes/api/auth/dev-bypass.d.mts +9 -0
- package/dist/astro/routes/api/auth/dev-bypass.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/dev-bypass.mjs +84 -0
- package/dist/astro/routes/api/auth/dev-bypass.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/accept.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/accept.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/accept.mjs +34 -0
- package/dist/astro/routes/api/auth/invite/accept.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/complete.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/complete.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/complete.mjs +56 -0
- package/dist/astro/routes/api/auth/invite/complete.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/index.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/index.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/index.mjs +53 -0
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -0
- package/dist/astro/routes/api/auth/invite/register-options.d.mts +8 -0
- package/dist/astro/routes/api/auth/invite/register-options.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/invite/register-options.mjs +46 -0
- package/dist/astro/routes/api/auth/invite/register-options.mjs.map +1 -0
- package/dist/astro/routes/api/auth/logout.d.mts +8 -0
- package/dist/astro/routes/api/auth/logout.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/logout.mjs +27 -0
- package/dist/astro/routes/api/auth/logout.mjs.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/send.d.mts +8 -0
- package/dist/astro/routes/api/auth/magic-link/send.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/send.mjs +50 -0
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/magic-link/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +35 -0
- package/dist/astro/routes/api/auth/magic-link/verify.mjs.map +1 -0
- package/dist/astro/routes/api/auth/me.d.mts +14 -0
- package/dist/astro/routes/api/auth/me.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/me.mjs +43 -0
- package/dist/astro/routes/api/auth/me.mjs.map +1 -0
- package/dist/astro/routes/api/auth/mode.d.mts +8 -0
- package/dist/astro/routes/api/auth/mode.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/mode.mjs +29 -0
- package/dist/astro/routes/api/auth/mode.mjs.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts +8 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +130 -0
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.d.mts +8 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +60 -0
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/_id_.d.mts +15 -0
- package/dist/astro/routes/api/auth/passkey/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +64 -0
- package/dist/astro/routes/api/auth/passkey/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/index.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/index.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/index.mjs +28 -0
- package/dist/astro/routes/api/auth/passkey/index.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/options.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/options.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/options.mjs +48 -0
- package/dist/astro/routes/api/auth/passkey/options.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/options.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/register/options.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +46 -0
- package/dist/astro/routes/api/auth/passkey/register/options.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +61 -0
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs.map +1 -0
- package/dist/astro/routes/api/auth/passkey/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/passkey/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/passkey/verify.mjs +49 -0
- package/dist/astro/routes/api/auth/passkey/verify.mjs.map +1 -0
- package/dist/astro/routes/api/auth/signup/complete.d.mts +8 -0
- package/dist/astro/routes/api/auth/signup/complete.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/signup/complete.mjs +57 -0
- package/dist/astro/routes/api/auth/signup/complete.mjs.map +1 -0
- package/dist/astro/routes/api/auth/signup/request.d.mts +8 -0
- package/dist/astro/routes/api/auth/signup/request.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/signup/request.mjs +46 -0
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -0
- package/dist/astro/routes/api/auth/signup/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/signup/verify.d.mts.map +1 -0
- package/dist/astro/routes/api/auth/signup/verify.mjs +35 -0
- package/dist/astro/routes/api/auth/signup/verify.mjs.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +15 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +193 -0
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +20 -0
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +28 -0
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +30 -0
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +23 -0
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +78 -0
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +48 -0
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +28 -0
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +22 -0
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts +9 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +58 -0
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts +15 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +85 -0
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +43 -0
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +28 -0
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts +10 -0
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +88 -0
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/index.d.mts +9 -0
- package/dist/astro/routes/api/content/_collection_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs +61 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/trash.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/trash.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/trash.mjs +25 -0
- package/dist/astro/routes/api/content/_collection_/trash.mjs.map +1 -0
- package/dist/astro/routes/api/dashboard.d.mts +8 -0
- package/dist/astro/routes/api/dashboard.d.mts.map +1 -0
- package/dist/astro/routes/api/dashboard.mjs +26 -0
- package/dist/astro/routes/api/dashboard.mjs.map +1 -0
- package/dist/astro/routes/api/dev/emails.d.mts +9 -0
- package/dist/astro/routes/api/dev/emails.d.mts.map +1 -0
- package/dist/astro/routes/api/dev/emails.mjs +20 -0
- package/dist/astro/routes/api/dev/emails.mjs.map +1 -0
- package/dist/astro/routes/api/import/probe.d.mts +18 -0
- package/dist/astro/routes/api/import/probe.d.mts.map +1 -0
- package/dist/astro/routes/api/import/probe.mjs +35 -0
- package/dist/astro/routes/api/import/probe.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts +88 -0
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +313 -0
- package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +93 -0
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/execute.mjs +593 -0
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/media.d.mts +36 -0
- package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/media.mjs +225 -0
- package/dist/astro/routes/api/import/wordpress/media.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/prepare.d.mts +20 -0
- package/dist/astro/routes/api/import/wordpress/prepare.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +120 -0
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts +49 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs +131 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-url-helpers.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +22 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +139 -0
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +16 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +71 -0
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.d.mts +8 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +29 -0
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +20 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +219 -0
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -0
- package/dist/astro/routes/api/manifest.d.mts +8 -0
- package/dist/astro/routes/api/manifest.d.mts.map +1 -0
- package/dist/astro/routes/api/manifest.mjs +47 -0
- package/dist/astro/routes/api/manifest.mjs.map +1 -0
- package/dist/astro/routes/api/mcp.d.mts +16 -0
- package/dist/astro/routes/api/mcp.d.mts.map +1 -0
- package/dist/astro/routes/api/mcp.mjs +1414 -0
- package/dist/astro/routes/api/mcp.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/confirm.d.mts +11 -0
- package/dist/astro/routes/api/media/_id_/confirm.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/confirm.mjs +61 -0
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_.d.mts +23 -0
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_.mjs +83 -0
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/media/file/_...key_.d.mts +8 -0
- package/dist/astro/routes/api/media/file/_...key_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/file/_...key_.mjs +52 -0
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.d.mts +15 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.d.mts.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +52 -0
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.d.mts +15 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +75 -0
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs.map +1 -0
- package/dist/astro/routes/api/media/providers/index.d.mts +11 -0
- package/dist/astro/routes/api/media/providers/index.d.mts.map +1 -0
- package/dist/astro/routes/api/media/providers/index.mjs +21 -0
- package/dist/astro/routes/api/media/providers/index.mjs.map +1 -0
- package/dist/astro/routes/api/media/upload-url.d.mts +11 -0
- package/dist/astro/routes/api/media/upload-url.d.mts.map +1 -0
- package/dist/astro/routes/api/media/upload-url.mjs +82 -0
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -0
- package/dist/astro/routes/api/media.d.mts +17 -0
- package/dist/astro/routes/api/media.d.mts.map +1 -0
- package/dist/astro/routes/api/media.mjs +138 -0
- package/dist/astro/routes/api/media.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts +9 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +48 -0
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items.d.mts +8 -0
- package/dist/astro/routes/api/menus/_name_/items.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/items.mjs +31 -0
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +31 -0
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_/translations.d.mts +9 -0
- package/dist/astro/routes/api/menus/_name_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_/translations.mjs +62 -0
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/menus/_name_.d.mts +10 -0
- package/dist/astro/routes/api/menus/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/_name_.mjs +60 -0
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/menus/index.d.mts +9 -0
- package/dist/astro/routes/api/menus/index.d.mts.map +1 -0
- package/dist/astro/routes/api/menus/index.mjs +40 -0
- package/dist/astro/routes/api/menus/index.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/authorize.d.mts +9 -0
- package/dist/astro/routes/api/oauth/authorize.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/authorize.mjs +260 -0
- package/dist/astro/routes/api/oauth/authorize.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/device/authorize.d.mts +8 -0
- package/dist/astro/routes/api/oauth/device/authorize.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/device/authorize.mjs +32 -0
- package/dist/astro/routes/api/oauth/device/authorize.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/device/code.d.mts +8 -0
- package/dist/astro/routes/api/oauth/device/code.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/device/code.mjs +36 -0
- package/dist/astro/routes/api/oauth/device/code.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/device/token.d.mts +8 -0
- package/dist/astro/routes/api/oauth/device/token.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/device/token.mjs +47 -0
- package/dist/astro/routes/api/oauth/device/token.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/register.d.mts +9 -0
- package/dist/astro/routes/api/oauth/register.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/register.mjs +113 -0
- package/dist/astro/routes/api/oauth/register.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/token/refresh.d.mts +8 -0
- package/dist/astro/routes/api/oauth/token/refresh.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/token/refresh.mjs +30 -0
- package/dist/astro/routes/api/oauth/token/refresh.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/token/revoke.d.mts +8 -0
- package/dist/astro/routes/api/oauth/token/revoke.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/token/revoke.mjs +27 -0
- package/dist/astro/routes/api/oauth/token/revoke.mjs.map +1 -0
- package/dist/astro/routes/api/oauth/token.d.mts +9 -0
- package/dist/astro/routes/api/oauth/token.d.mts.map +1 -0
- package/dist/astro/routes/api/oauth/token.mjs +141 -0
- package/dist/astro/routes/api/oauth/token.mjs.map +1 -0
- package/dist/astro/routes/api/openapi.json.d.mts +8 -0
- package/dist/astro/routes/api/openapi.json.d.mts.map +1 -0
- package/dist/astro/routes/api/openapi.json.mjs +2642 -0
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts +12 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.d.mts.map +1 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +78 -0
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/404s/index.d.mts +10 -0
- package/dist/astro/routes/api/redirects/404s/index.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/404s/index.mjs +62 -0
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/404s/summary.d.mts +8 -0
- package/dist/astro/routes/api/redirects/404s/summary.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/404s/summary.mjs +34 -0
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/_id_.d.mts +10 -0
- package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/_id_.mjs +71 -0
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/redirects/index.d.mts +9 -0
- package/dist/astro/routes/api/redirects/index.d.mts.map +1 -0
- package/dist/astro/routes/api/redirects/index.mjs +52 -0
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.d.mts +8 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +19 -0
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.d.mts +8 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.d.mts.map +1 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +26 -0
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts +10 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +75 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +63 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +54 -0
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts +10 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +79 -0
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/collections/index.d.mts +9 -0
- package/dist/astro/routes/api/schema/collections/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/index.mjs +63 -0
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/index.d.mts +8 -0
- package/dist/astro/routes/api/schema/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/index.mjs +82 -0
- package/dist/astro/routes/api/schema/index.mjs.map +1 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.d.mts +8 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +55 -0
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/schema/orphans/index.d.mts +8 -0
- package/dist/astro/routes/api/schema/orphans/index.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/orphans/index.mjs +50 -0
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -0
- package/dist/astro/routes/api/search/enable.d.mts +16 -0
- package/dist/astro/routes/api/search/enable.d.mts.map +1 -0
- package/dist/astro/routes/api/search/enable.mjs +55 -0
- package/dist/astro/routes/api/search/enable.mjs.map +1 -0
- package/dist/astro/routes/api/search/index.d.mts +17 -0
- package/dist/astro/routes/api/search/index.d.mts.map +1 -0
- package/dist/astro/routes/api/search/index.mjs +52 -0
- package/dist/astro/routes/api/search/index.mjs.map +1 -0
- package/dist/astro/routes/api/search/rebuild.d.mts +14 -0
- package/dist/astro/routes/api/search/rebuild.d.mts.map +1 -0
- package/dist/astro/routes/api/search/rebuild.mjs +48 -0
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -0
- package/dist/astro/routes/api/search/stats.d.mts +11 -0
- package/dist/astro/routes/api/search/stats.d.mts.map +1 -0
- package/dist/astro/routes/api/search/stats.mjs +29 -0
- package/dist/astro/routes/api/search/stats.mjs.map +1 -0
- package/dist/astro/routes/api/search/suggest.d.mts +16 -0
- package/dist/astro/routes/api/search/suggest.d.mts.map +1 -0
- package/dist/astro/routes/api/search/suggest.mjs +43 -0
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -0
- package/dist/astro/routes/api/sections/_slug_.d.mts +10 -0
- package/dist/astro/routes/api/sections/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/sections/_slug_.mjs +65 -0
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/sections/index.d.mts +9 -0
- package/dist/astro/routes/api/sections/index.d.mts.map +1 -0
- package/dist/astro/routes/api/sections/index.mjs +48 -0
- package/dist/astro/routes/api/sections/index.mjs.map +1 -0
- package/dist/astro/routes/api/settings/email.d.mts +18 -0
- package/dist/astro/routes/api/settings/email.d.mts.map +1 -0
- package/dist/astro/routes/api/settings/email.mjs +105 -0
- package/dist/astro/routes/api/settings/email.mjs.map +1 -0
- package/dist/astro/routes/api/settings.d.mts +21 -0
- package/dist/astro/routes/api/settings.d.mts.map +1 -0
- package/dist/astro/routes/api/settings.mjs +58 -0
- package/dist/astro/routes/api/settings.mjs.map +1 -0
- package/dist/astro/routes/api/setup/admin-verify.d.mts +8 -0
- package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/admin-verify.mjs +68 -0
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -0
- package/dist/astro/routes/api/setup/admin.d.mts +8 -0
- package/dist/astro/routes/api/setup/admin.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/admin.mjs +69 -0
- package/dist/astro/routes/api/setup/admin.mjs.map +1 -0
- package/dist/astro/routes/api/setup/dev-bypass.d.mts +9 -0
- package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/dev-bypass.mjs +139 -0
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -0
- package/dist/astro/routes/api/setup/dev-reset.d.mts +8 -0
- package/dist/astro/routes/api/setup/dev-reset.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/dev-reset.mjs +25 -0
- package/dist/astro/routes/api/setup/dev-reset.mjs.map +1 -0
- package/dist/astro/routes/api/setup/index.d.mts +8 -0
- package/dist/astro/routes/api/setup/index.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/index.mjs +93 -0
- package/dist/astro/routes/api/setup/index.mjs.map +1 -0
- package/dist/astro/routes/api/setup/status.d.mts +8 -0
- package/dist/astro/routes/api/setup/status.d.mts.map +1 -0
- package/dist/astro/routes/api/setup/status.mjs +60 -0
- package/dist/astro/routes/api/setup/status.mjs.map +1 -0
- package/dist/astro/routes/api/snapshot.d.mts +8 -0
- package/dist/astro/routes/api/snapshot.d.mts.map +1 -0
- package/dist/astro/routes/api/snapshot.mjs +270 -0
- package/dist/astro/routes/api/snapshot.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts +9 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +72 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts +19 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +80 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts +15 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +59 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/index.d.mts +15 -0
- package/dist/astro/routes/api/taxonomies/index.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/index.mjs +55 -0
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -0
- package/dist/astro/routes/api/themes/preview.d.mts +8 -0
- package/dist/astro/routes/api/themes/preview.d.mts.map +1 -0
- package/dist/astro/routes/api/themes/preview.mjs +49 -0
- package/dist/astro/routes/api/themes/preview.mjs.map +1 -0
- package/dist/astro/routes/api/typegen.d.mts +18 -0
- package/dist/astro/routes/api/typegen.d.mts.map +1 -0
- package/dist/astro/routes/api/typegen.mjs +78 -0
- package/dist/astro/routes/api/typegen.mjs.map +1 -0
- package/dist/astro/routes/api/well-known/auth.d.mts +8 -0
- package/dist/astro/routes/api/well-known/auth.d.mts.map +1 -0
- package/dist/astro/routes/api/well-known/auth.mjs +42 -0
- package/dist/astro/routes/api/well-known/auth.mjs.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.d.mts +8 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.d.mts.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +32 -0
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.d.mts +8 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.d.mts.map +1 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +21 -0
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +36 -0
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts +9 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +62 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts +8 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +49 -0
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_.d.mts +9 -0
- package/dist/astro/routes/api/widget-areas/_name_.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/_name_.mjs +49 -0
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -0
- package/dist/astro/routes/api/widget-areas/index.d.mts +9 -0
- package/dist/astro/routes/api/widget-areas/index.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-areas/index.mjs +59 -0
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -0
- package/dist/astro/routes/api/widget-components.d.mts +8 -0
- package/dist/astro/routes/api/widget-components.d.mts.map +1 -0
- package/dist/astro/routes/api/widget-components.mjs +18 -0
- package/dist/astro/routes/api/widget-components.mjs.map +1 -0
- package/dist/astro/routes/robots.txt.d.mts +8 -0
- package/dist/astro/routes/robots.txt.d.mts.map +1 -0
- package/dist/astro/routes/robots.txt.mjs +61 -0
- package/dist/astro/routes/robots.txt.mjs.map +1 -0
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts +8 -0
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -0
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +71 -0
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -0
- package/dist/astro/routes/sitemap.xml.d.mts +8 -0
- package/dist/astro/routes/sitemap.xml.d.mts.map +1 -0
- package/dist/astro/routes/sitemap.xml.mjs +64 -0
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -0
- package/dist/astro/types.d.mts +48 -8
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +13 -0
- package/dist/auth/providers/github.d.mts.map +1 -0
- package/dist/auth/providers/github.mjs +18 -0
- package/dist/auth/providers/github.mjs.map +1 -0
- package/dist/auth/providers/google.d.mts +13 -0
- package/dist/auth/providers/google.d.mts.map +1 -0
- package/dist/auth/providers/google.mjs +18 -0
- package/dist/auth/providers/google.mjs.map +1 -0
- package/dist/authorize-BlyCH-96.mjs +37 -0
- package/dist/authorize-BlyCH-96.mjs.map +1 -0
- package/dist/{base64-MBPo9ozB.mjs → base64-CqR-7kqF.mjs} +1 -1
- package/dist/{base64-MBPo9ozB.mjs.map → base64-CqR-7kqF.mjs.map} +1 -1
- package/dist/{byline-gFn1r0vA.mjs → byline-D09BaS4j.mjs} +4 -4
- package/dist/{byline-gFn1r0vA.mjs.map → byline-D09BaS4j.mjs.map} +1 -1
- package/dist/{bylines-DTFI8nDM.mjs → bylines-BTM2xtP8.mjs} +6 -6
- package/dist/{bylines-DTFI8nDM.mjs.map → bylines-BTM2xtP8.mjs.map} +1 -1
- package/dist/bylines-C6eYUWlZ.d.mts +1971 -0
- package/dist/bylines-C6eYUWlZ.d.mts.map +1 -0
- package/dist/{cache-BAJbeoZ8.mjs → cache-CXCpjWiL.mjs} +3 -3
- package/dist/{cache-BAJbeoZ8.mjs.map → cache-CXCpjWiL.mjs.map} +1 -1
- package/dist/challenge-store-CJ0OOHOr.mjs +49 -0
- package/dist/challenge-store-CJ0OOHOr.mjs.map +1 -0
- package/dist/{chunks-BK1oZS-l.mjs → chunks-DyGtu1Bv.mjs} +2 -2
- package/dist/{chunks-BK1oZS-l.mjs.map → chunks-DyGtu1Bv.mjs.map} +1 -1
- package/dist/cli/index.mjs +23 -18
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +2 -2
- package/dist/client/index.mjs.map +1 -1
- package/dist/comment-Dd9MI82-.mjs +247 -0
- package/dist/comment-Dd9MI82-.mjs.map +1 -0
- package/dist/comments-koGI0FrK.mjs +204 -0
- package/dist/comments-koGI0FrK.mjs.map +1 -0
- package/dist/components-mZem7pbe.mjs +108 -0
- package/dist/components-mZem7pbe.mjs.map +1 -0
- package/dist/{content-CERxPUN0.mjs → content-D6YG26WG.mjs} +10 -34
- package/dist/content-D6YG26WG.mjs.map +1 -0
- package/dist/context-qF8d3IPR.mjs +879 -0
- package/dist/context-qF8d3IPR.mjs.map +1 -0
- package/dist/cron-H8eJ46dv.mjs +264 -0
- package/dist/cron-H8eJ46dv.mjs.map +1 -0
- package/dist/dashboard-BmWSIUwY.mjs +105 -0
- package/dist/dashboard-BmWSIUwY.mjs.map +1 -0
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{db-errors-B7P2pSCn.mjs → db-errors-CGN9kJfo.mjs} +1 -1
- package/dist/{db-errors-B7P2pSCn.mjs.map → db-errors-CGN9kJfo.mjs.map} +1 -1
- package/dist/{default-pHuz9WF6.mjs → default-Dbs22Gg4.mjs} +1 -1
- package/dist/{default-pHuz9WF6.mjs.map → default-Dbs22Gg4.mjs.map} +1 -1
- package/dist/device-flow-BqJRxa0Q.mjs +467 -0
- package/dist/device-flow-BqJRxa0Q.mjs.map +1 -0
- package/dist/email-console-Dmp5Q-P2.mjs +50 -0
- package/dist/email-console-Dmp5Q-P2.mjs.map +1 -0
- package/dist/error-tSQWIl5U.mjs +437 -0
- package/dist/error-tSQWIl5U.mjs.map +1 -0
- package/dist/escape-B8bdIryO.mjs +9 -0
- package/dist/escape-B8bdIryO.mjs.map +1 -0
- package/dist/fts-manager-B633C-kQ.mjs +339 -0
- package/dist/fts-manager-B633C-kQ.mjs.map +1 -0
- package/dist/hash-DlUxGhQS.mjs +33 -0
- package/dist/hash-DlUxGhQS.mjs.map +1 -0
- package/dist/import-CNfLOgDE.mjs +1531 -0
- package/dist/import-CNfLOgDE.mjs.map +1 -0
- package/dist/index-D2gvztOP.d.mts +262 -0
- package/dist/index-D2gvztOP.d.mts.map +1 -0
- package/dist/{index-Dlkzhb4C.d.mts → index-UmOMt9T-.d.mts} +310 -911
- package/dist/index-UmOMt9T-.d.mts.map +1 -0
- package/dist/index.d.mts +17 -11
- package/dist/index.mjs +57 -28
- package/dist/{load-DR1VwFXR.mjs → load-QzYRpVN3.mjs} +2 -2
- package/dist/{load-DR1VwFXR.mjs.map → load-QzYRpVN3.mjs.map} +1 -1
- package/dist/{loader-ou_PXAjg.mjs → loader-Cs6-Bqe6.mjs} +4 -4
- package/dist/{loader-ou_PXAjg.mjs.map → loader-Cs6-Bqe6.mjs.map} +1 -1
- package/dist/{manifest-schema-Bp6d4d4n.mjs → manifest-schema-HCtSh4Jq.mjs} +1 -1
- package/dist/{manifest-schema-Bp6d4d4n.mjs.map → manifest-schema-HCtSh4Jq.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -1
- package/dist/media/index.mjs.map +1 -1
- package/dist/media/local-runtime.d.mts +11 -7
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +7 -6
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/media-Dg7he9uK.mjs +209 -0
- package/dist/media-Dg7he9uK.mjs.map +1 -0
- package/dist/media-allowlist-B8EX01DH.mjs +32 -0
- package/dist/media-allowlist-B8EX01DH.mjs.map +1 -0
- package/dist/menus-DOzIecHi.mjs +723 -0
- package/dist/menus-DOzIecHi.mjs.map +1 -0
- package/dist/menus-X4Z-eBA1.mjs +2788 -0
- package/dist/menus-X4Z-eBA1.mjs.map +1 -0
- package/dist/mime-KV5TqkMN.mjs +36 -0
- package/dist/mime-KV5TqkMN.mjs.map +1 -0
- package/dist/{mode-YhqNVef_.mjs → mode-DPRPvJYm.mjs} +1 -1
- package/dist/{mode-YhqNVef_.mjs.map → mode-DPRPvJYm.mjs.map} +1 -1
- package/dist/normalize-CN5kRSMC.mjs +151 -0
- package/dist/normalize-CN5kRSMC.mjs.map +1 -0
- package/dist/oauth-authorization-62GmpGIH.mjs +275 -0
- package/dist/oauth-authorization-62GmpGIH.mjs.map +1 -0
- package/dist/oauth-clients-D_B0_-Bz.mjs +266 -0
- package/dist/oauth-clients-D_B0_-Bz.mjs.map +1 -0
- package/dist/oauth-state-store-DpsZViTu.mjs +49 -0
- package/dist/oauth-state-store-DpsZViTu.mjs.map +1 -0
- package/dist/oauth-user-lookup-meyS2oB1.mjs +26 -0
- package/dist/oauth-user-lookup-meyS2oB1.mjs.map +1 -0
- package/dist/{options-nPxWnrya.mjs → options-BL4X94qY.mjs} +1 -1
- package/dist/{options-nPxWnrya.mjs.map → options-BL4X94qY.mjs.map} +1 -1
- package/dist/options-Cq64Wx0O.d.mts +207 -0
- package/dist/options-Cq64Wx0O.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/parse-BFTPon-J.mjs +89 -0
- package/dist/parse-BFTPon-J.mjs.map +1 -0
- package/dist/passkey-config-Cg86_ISa.mjs +46 -0
- package/dist/passkey-config-Cg86_ISa.mjs.map +1 -0
- package/dist/{patterns-DsUZ4uxI.mjs → patterns-CqG5Ya3i.mjs} +54 -2
- package/dist/{patterns-DsUZ4uxI.mjs.map → patterns-CqG5Ya3i.mjs.map} +1 -1
- package/dist/{placeholder-CDPtkelt.d.mts → placeholder-D3cFCU9y.d.mts} +2 -1
- package/dist/{placeholder-CDPtkelt.d.mts.map → placeholder-D3cFCU9y.d.mts.map} +1 -1
- package/dist/placeholder-LqmHqvBw.mjs +143 -0
- package/dist/placeholder-LqmHqvBw.mjs.map +1 -0
- package/dist/plugin-types.d.mts +122 -0
- package/dist/plugin-types.d.mts.map +1 -0
- package/dist/plugin-types.mjs +1 -0
- package/dist/plugins/adapt-sandbox-entry.d.mts +20 -12
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +46 -23
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/preview-C1LOEbWZ.mjs +107 -0
- package/dist/preview-C1LOEbWZ.mjs.map +1 -0
- package/dist/{public-url-B1AxbbbQ.mjs → public-url-CseXl9Fv.mjs} +39 -2
- package/dist/{public-url-B1AxbbbQ.mjs.map → public-url-CseXl9Fv.mjs.map} +1 -1
- package/dist/{query-yA3-rFji.mjs → query-axZmO6Tn.mjs} +12 -12
- package/dist/{query-yA3-rFji.mjs.map → query-axZmO6Tn.mjs.map} +1 -1
- package/dist/rate-limit-t5CVjCO6.mjs +120 -0
- package/dist/rate-limit-t5CVjCO6.mjs.map +1 -0
- package/dist/redirect-DGRsLO2I.mjs +17 -0
- package/dist/redirect-DGRsLO2I.mjs.map +1 -0
- package/dist/{redirect-C5H7VGIX.mjs → redirect-DkaDxq8e.mjs} +3 -3
- package/dist/{redirect-C5H7VGIX.mjs.map → redirect-DkaDxq8e.mjs.map} +1 -1
- package/dist/redirects-D1fdd68T.mjs +573 -0
- package/dist/redirects-D1fdd68T.mjs.map +1 -0
- package/dist/redirects-Dmj6KRU3.mjs +1141 -0
- package/dist/redirects-Dmj6KRU3.mjs.map +1 -0
- package/dist/{registry-Do34mz_P.mjs → registry-BnCeHYsf.mjs} +8 -300
- package/dist/registry-BnCeHYsf.mjs.map +1 -0
- package/dist/{request-cache-D4I69LeL.mjs → request-cache-dzCt8TZB.mjs} +1 -1
- package/dist/{request-cache-D4I69LeL.mjs.map → request-cache-dzCt8TZB.mjs.map} +1 -1
- package/dist/request-meta-CLCwSQOS.mjs +140 -0
- package/dist/request-meta-CLCwSQOS.mjs.map +1 -0
- package/dist/{runner-Iu3IZSDM.d.mts → runner-DcfZewkO.d.mts} +2 -2
- package/dist/{runner-Iu3IZSDM.d.mts.map → runner-DcfZewkO.d.mts.map} +1 -1
- package/dist/{runner-DIcU2UCC.mjs → runner-DdnQIwz_.mjs} +436 -187
- package/dist/runner-DdnQIwz_.mjs.map +1 -0
- package/dist/runtime.d.mts +10 -6
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +3 -3
- package/dist/schema-BmqagCwG.mjs +41 -0
- package/dist/schema-BmqagCwG.mjs.map +1 -0
- package/dist/search-CPrvO5u8.mjs +376 -0
- package/dist/search-CPrvO5u8.mjs.map +1 -0
- package/dist/{secrets-CZ8rxLX3.mjs → secrets-6pgZyq0K.mjs} +3 -3
- package/dist/{secrets-CZ8rxLX3.mjs.map → secrets-6pgZyq0K.mjs.map} +1 -1
- package/dist/sections-Cm-zb-gZ.mjs +346 -0
- package/dist/sections-Cm-zb-gZ.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +19 -15
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo-BoR4wCUh.mjs +86 -0
- package/dist/seo-BoR4wCUh.mjs.map +1 -0
- package/dist/seo-DRq9-EPP.mjs +130 -0
- package/dist/seo-DRq9-EPP.mjs.map +1 -0
- package/dist/service-vByySp-2.mjs +195 -0
- package/dist/service-vByySp-2.mjs.map +1 -0
- package/dist/settings-CBBj7HUd.mjs +51 -0
- package/dist/settings-CBBj7HUd.mjs.map +1 -0
- package/dist/settings-xQKsWnzQ.mjs +235 -0
- package/dist/settings-xQKsWnzQ.mjs.map +1 -0
- package/dist/setup-BGAJ2uXs.mjs +137 -0
- package/dist/setup-BGAJ2uXs.mjs.map +1 -0
- package/dist/setup-complete-C6ZCLhKo.mjs +26 -0
- package/dist/setup-complete-C6ZCLhKo.mjs.map +1 -0
- package/dist/setup-nonce-CY1gQiAU.mjs +25 -0
- package/dist/setup-nonce-CY1gQiAU.mjs.map +1 -0
- package/dist/site-url-D-M4Fd8O.mjs +13 -0
- package/dist/site-url-D-M4Fd8O.mjs.map +1 -0
- package/dist/slugify-Cjh1ssOZ.mjs +30 -0
- package/dist/slugify-Cjh1ssOZ.mjs.map +1 -0
- package/dist/ssrf-CTul4uQi.mjs +1 -0
- package/dist/ssrf-DzFN_qV-.mjs +332 -0
- package/dist/ssrf-DzFN_qV-.mjs.map +1 -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 +1 -1
- package/dist/{taxonomies-JmQQZiG1.mjs → taxonomies-Cn9UpaR2.mjs} +7 -7
- package/dist/{taxonomies-JmQQZiG1.mjs.map → taxonomies-Cn9UpaR2.mjs.map} +1 -1
- package/dist/taxonomies-Dc0mzlms.mjs +508 -0
- package/dist/taxonomies-Dc0mzlms.mjs.map +1 -0
- package/dist/{taxonomy-D6NvlKo8.mjs → taxonomy-wPfusMK9.mjs} +3 -3
- package/dist/{taxonomy-D6NvlKo8.mjs.map → taxonomy-wPfusMK9.mjs.map} +1 -1
- package/dist/{tokens-CyRDPVW2.mjs → tokens-DILYNZMi.mjs} +2 -2
- package/dist/{tokens-CyRDPVW2.mjs.map → tokens-DILYNZMi.mjs.map} +1 -1
- package/dist/{transaction-D44LBXvU.mjs → transaction-NQj4VJ7Z.mjs} +1 -1
- package/dist/{transaction-D44LBXvU.mjs.map → transaction-NQj4VJ7Z.mjs.map} +1 -1
- package/dist/{transport-DX_5rpsq.d.mts → transport-GeXlLscf.d.mts} +1 -1
- package/dist/{transport-DX_5rpsq.d.mts.map → transport-GeXlLscf.d.mts.map} +1 -1
- package/dist/{transport-xpzIjCIB.mjs → transport-fw-mKJzT.mjs} +1 -1
- package/dist/{transport-xpzIjCIB.mjs.map → transport-fw-mKJzT.mjs.map} +1 -1
- package/dist/trusted-proxy-CJhQIk65.mjs +51 -0
- package/dist/trusted-proxy-CJhQIk65.mjs.map +1 -0
- package/dist/{types-DgSc9Rpc.d.mts → types-B05e2naf.d.mts} +5 -59
- package/dist/types-B05e2naf.d.mts.map +1 -0
- package/dist/{types-B1gLSAH2.d.mts → types-BWhaSS7U.d.mts} +2 -75
- package/dist/types-BWhaSS7U.d.mts.map +1 -0
- package/dist/{types-BQx6ZXpR.d.mts → types-C1KKK4VP.d.mts} +3 -1
- package/dist/{types-BQx6ZXpR.d.mts.map → types-C1KKK4VP.d.mts.map} +1 -1
- package/dist/types-Cb2UCDJg.d.mts +345 -0
- package/dist/types-Cb2UCDJg.d.mts.map +1 -0
- package/dist/{types-BIgulNsW.mjs → types-CwXMEPRr.mjs} +10 -3
- package/dist/types-CwXMEPRr.mjs.map +1 -0
- package/dist/{types-B_CXXnzh.d.mts → types-CzvJd1ND.d.mts} +7 -1
- package/dist/{types-B_CXXnzh.d.mts.map → types-CzvJd1ND.d.mts.map} +1 -1
- package/dist/types-DFowNO60.d.mts +198 -0
- package/dist/types-DFowNO60.d.mts.map +1 -0
- package/dist/{types-56BKbld_.mjs → types-DSZl1Dsv.mjs} +1 -1
- package/dist/{types-56BKbld_.mjs.map → types-DSZl1Dsv.mjs.map} +1 -1
- package/dist/types-DW1l0gCv.d.mts +75 -0
- package/dist/types-DW1l0gCv.d.mts.map +1 -0
- package/dist/types-Db67HHlU.mjs +3 -0
- package/dist/{types-C-aFbqmA.d.mts → types-DmxPPXGf.d.mts} +1 -1
- package/dist/{types-C-aFbqmA.d.mts.map → types-DmxPPXGf.d.mts.map} +1 -1
- package/dist/{types-PafqtQuM.mjs → types-Dz9CGX_d.mjs} +1 -1
- package/dist/{types-PafqtQuM.mjs.map → types-Dz9CGX_d.mjs.map} +1 -1
- package/dist/user-Dr1bOCqS.mjs +155 -0
- package/dist/user-Dr1bOCqS.mjs.map +1 -0
- package/dist/utils-_F-rWBTN.mjs +286 -0
- package/dist/utils-_F-rWBTN.mjs.map +1 -0
- package/dist/{validate-BcC3m2O7.d.mts → validate-BpQGsmd7.d.mts} +5 -4
- package/dist/validate-BpQGsmd7.d.mts.map +1 -0
- package/dist/{validate-UK4Ja1uo.mjs → validate-DlFxcVVK.mjs} +3 -3
- package/dist/{validate-UK4Ja1uo.mjs.map → validate-DlFxcVVK.mjs.map} +1 -1
- package/dist/{validation-Vc5DQkJa.mjs → validation-BiFJqUp5.mjs} +6 -5
- package/dist/{validation-Vc5DQkJa.mjs.map → validation-BiFJqUp5.mjs.map} +1 -1
- package/dist/version-Dw7Z5PVU.mjs +7 -0
- package/dist/{version-BdP--J1g.mjs.map → version-Dw7Z5PVU.mjs.map} +1 -1
- package/dist/widgets-B9j_yzlk.mjs +106 -0
- package/dist/widgets-B9j_yzlk.mjs.map +1 -0
- package/dist/zod-generator-DSyz01KE.mjs +234 -0
- package/dist/zod-generator-DSyz01KE.mjs.map +1 -0
- package/locals.d.ts +1 -1
- package/package.json +37 -14
- package/src/api/handlers/content.ts +1 -0
- package/src/api/handlers/index.ts +7 -0
- package/src/api/handlers/marketplace.ts +27 -6
- package/src/api/handlers/menus.ts +157 -580
- package/src/api/handlers/plugins.ts +77 -31
- package/src/api/handlers/registry.ts +1086 -0
- package/src/api/openapi/document.ts +10 -4
- package/src/api/schemas/content.ts +1 -0
- package/src/api/schemas/menus.ts +27 -23
- package/src/api/types.ts +6 -0
- package/src/astro/integration/index.ts +1 -0
- package/src/astro/integration/route-naming.ts +19 -0
- package/src/astro/integration/routes.ts +25 -3
- package/src/astro/integration/runtime.ts +35 -8
- package/src/astro/middleware/auth.ts +8 -2
- package/src/astro/middleware/csp.ts +25 -3
- package/src/astro/middleware.ts +3 -0
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +10 -0
- package/src/astro/routes/api/admin/plugins/registry/install.ts +107 -0
- package/src/astro/routes/api/auth/invite/register-options.ts +8 -1
- package/src/astro/routes/api/import/wordpress/execute.ts +185 -6
- package/src/astro/routes/api/menus/[name]/items/[id].ts +69 -0
- package/src/astro/routes/api/menus/[name]/items.ts +4 -65
- package/src/astro/types.ts +38 -0
- package/src/cli/wxr/parser.ts +263 -0
- package/src/client/index.ts +2 -1
- package/src/database/migrations/036_i18n_menus_and_taxonomies.ts +166 -49
- package/src/database/migrations/038_registry_plugin_state.ts +130 -0
- package/src/database/migrations/039_fix_fts5_triggers.ts +264 -0
- package/src/database/migrations/runner.ts +4 -0
- package/src/database/repositories/content.ts +5 -1
- package/src/database/repositories/index.ts +14 -0
- package/src/database/repositories/menu.ts +644 -0
- package/src/database/repositories/types.ts +6 -0
- package/src/database/types.ts +5 -1
- package/src/emdash-runtime.ts +122 -34
- package/src/import/sources/wordpress-plugin.ts +9 -2
- package/src/import/sources/wxr.ts +16 -2
- package/src/import/ssrf.ts +20 -500
- package/src/import/wxr-taxonomies.ts +730 -0
- package/src/index.ts +3 -10
- package/src/media/normalize.ts +37 -4
- package/src/plugin-types.ts +240 -0
- package/src/plugins/adapt-sandbox-entry.ts +115 -39
- package/src/plugins/define-plugin.ts +34 -56
- package/src/plugins/index.ts +1 -9
- package/src/plugins/marketplace.ts +63 -4
- package/src/plugins/sandbox/index.ts +1 -1
- package/src/plugins/sandbox/noop.ts +2 -2
- package/src/plugins/sandbox/types.ts +7 -4
- package/src/plugins/state.ts +84 -38
- package/src/plugins/types.ts +2 -79
- package/src/registry/config.ts +311 -0
- package/src/registry/plugin-id.ts +116 -0
- package/src/registry/types.ts +206 -0
- package/src/search/fts-manager.ts +77 -15
- package/src/security/ssrf.ts +501 -0
- package/dist/apply-C1ZORgcy.mjs.map +0 -1
- package/dist/content-CERxPUN0.mjs.map +0 -1
- package/dist/error-D6LuHLw9.mjs +0 -27
- package/dist/error-D6LuHLw9.mjs.map +0 -1
- package/dist/index-Dlkzhb4C.d.mts.map +0 -1
- package/dist/placeholder-Ci0RLeCk.mjs +0 -268
- package/dist/placeholder-Ci0RLeCk.mjs.map +0 -1
- package/dist/registry-Do34mz_P.mjs.map +0 -1
- package/dist/runner-DIcU2UCC.mjs.map +0 -1
- package/dist/search-n-ZCMfr3.mjs +0 -9914
- package/dist/search-n-ZCMfr3.mjs.map +0 -1
- package/dist/settings-nTXPRi3D.mjs +0 -440
- package/dist/settings-nTXPRi3D.mjs.map +0 -1
- package/dist/types-B1gLSAH2.d.mts.map +0 -1
- package/dist/types-BIgulNsW.mjs.map +0 -1
- package/dist/types-Cug_RO3W.mjs +0 -16
- package/dist/types-Cug_RO3W.mjs.map +0 -1
- package/dist/types-DgSc9Rpc.d.mts.map +0 -1
- package/dist/validate-BcC3m2O7.d.mts.map +0 -1
- package/dist/version-BdP--J1g.mjs +0 -7
- package/dist/zod-generator-CHnJUP2l.mjs +0 -137
- package/dist/zod-generator-CHnJUP2l.mjs.map +0 -1
|
@@ -23,8 +23,8 @@ var __exportAll = (all, no_symbols) => {
|
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/database/migrations/001_initial.ts
|
|
25
25
|
var _001_initial_exports = /* @__PURE__ */ __exportAll({
|
|
26
|
-
down: () => down$
|
|
27
|
-
up: () => up$
|
|
26
|
+
down: () => down$37,
|
|
27
|
+
up: () => up$37
|
|
28
28
|
});
|
|
29
29
|
/**
|
|
30
30
|
* Initial schema migration
|
|
@@ -33,7 +33,7 @@ var _001_initial_exports = /* @__PURE__ */ __exportAll({
|
|
|
33
33
|
* by the SchemaRegistry when collections are added via the admin UI.
|
|
34
34
|
* This migration only creates system tables.
|
|
35
35
|
*/
|
|
36
|
-
async function up$
|
|
36
|
+
async function up$37(db) {
|
|
37
37
|
await db.schema.createTable("revisions").ifNotExists().addColumn("id", "text", (col) => col.primaryKey()).addColumn("collection", "text", (col) => col.notNull()).addColumn("entry_id", "text", (col) => col.notNull()).addColumn("data", "text", (col) => col.notNull()).addColumn("author_id", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
38
38
|
await db.schema.createIndex("idx_revisions_entry").ifNotExists().on("revisions").columns(["collection", "entry_id"]).execute();
|
|
39
39
|
await db.schema.createTable("taxonomies").ifNotExists().addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull()).addColumn("slug", "text", (col) => col.notNull()).addColumn("label", "text", (col) => col.notNull()).addColumn("parent_id", "text").addColumn("data", "text").addUniqueConstraint("taxonomies_name_slug_unique", ["name", "slug"]).addForeignKeyConstraint("taxonomies_parent_fk", ["parent_id"], "taxonomies", ["id"], (cb) => cb.onDelete("set null")).execute();
|
|
@@ -53,7 +53,7 @@ async function up$35(db) {
|
|
|
53
53
|
await db.schema.createIndex("idx_audit_action").ifNotExists().on("audit_logs").column("action").execute();
|
|
54
54
|
await db.schema.createIndex("idx_audit_timestamp").ifNotExists().on("audit_logs").column("timestamp").execute();
|
|
55
55
|
}
|
|
56
|
-
async function down$
|
|
56
|
+
async function down$37(db) {
|
|
57
57
|
await db.schema.dropTable("audit_logs").execute();
|
|
58
58
|
await db.schema.dropTable("options").execute();
|
|
59
59
|
await db.schema.dropTable("users").execute();
|
|
@@ -66,26 +66,26 @@ async function down$35(db) {
|
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/database/migrations/002_media_status.ts
|
|
68
68
|
var _002_media_status_exports = /* @__PURE__ */ __exportAll({
|
|
69
|
-
down: () => down$
|
|
70
|
-
up: () => up$
|
|
69
|
+
down: () => down$36,
|
|
70
|
+
up: () => up$36
|
|
71
71
|
});
|
|
72
72
|
/**
|
|
73
73
|
* Add status column to media table for tracking upload state.
|
|
74
74
|
* Status values: 'pending' | 'ready' | 'failed'
|
|
75
75
|
*/
|
|
76
|
-
async function up$
|
|
76
|
+
async function up$36(db) {
|
|
77
77
|
await db.schema.alterTable("media").addColumn("status", "text", (col) => col.notNull().defaultTo("ready")).execute();
|
|
78
78
|
await db.schema.createIndex("idx_media_status").on("media").column("status").execute();
|
|
79
79
|
}
|
|
80
|
-
async function down$
|
|
80
|
+
async function down$36(db) {
|
|
81
81
|
await db.schema.dropIndex("idx_media_status").execute();
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region src/database/migrations/003_schema_registry.ts
|
|
86
86
|
var _003_schema_registry_exports = /* @__PURE__ */ __exportAll({
|
|
87
|
-
down: () => down$
|
|
88
|
-
up: () => up$
|
|
87
|
+
down: () => down$35,
|
|
88
|
+
up: () => up$35
|
|
89
89
|
});
|
|
90
90
|
/**
|
|
91
91
|
* Migration: Schema Registry Tables
|
|
@@ -93,14 +93,14 @@ var _003_schema_registry_exports = /* @__PURE__ */ __exportAll({
|
|
|
93
93
|
* Creates the schema registry tables that store collection and field definitions.
|
|
94
94
|
* This enables dynamic schema management where D1 is the source of truth.
|
|
95
95
|
*/
|
|
96
|
-
async function up$
|
|
96
|
+
async function up$35(db) {
|
|
97
97
|
await db.schema.createTable("_emdash_collections").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("label_singular", "text").addColumn("description", "text").addColumn("icon", "text").addColumn("supports", "text").addColumn("source", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
98
98
|
await db.schema.createTable("_emdash_fields").addColumn("id", "text", (col) => col.primaryKey()).addColumn("collection_id", "text", (col) => col.notNull()).addColumn("slug", "text", (col) => col.notNull()).addColumn("label", "text", (col) => col.notNull()).addColumn("type", "text", (col) => col.notNull()).addColumn("column_type", "text", (col) => col.notNull()).addColumn("required", "integer", (col) => col.defaultTo(0)).addColumn("unique", "integer", (col) => col.defaultTo(0)).addColumn("default_value", "text").addColumn("validation", "text").addColumn("widget", "text").addColumn("options", "text").addColumn("sort_order", "integer", (col) => col.defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("fields_collection_fk", ["collection_id"], "_emdash_collections", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
99
99
|
await db.schema.createIndex("idx_fields_collection_slug").on("_emdash_fields").columns(["collection_id", "slug"]).unique().execute();
|
|
100
100
|
await db.schema.createIndex("idx_fields_collection").on("_emdash_fields").column("collection_id").execute();
|
|
101
101
|
await db.schema.createIndex("idx_fields_sort").on("_emdash_fields").columns(["collection_id", "sort_order"]).execute();
|
|
102
102
|
}
|
|
103
|
-
async function down$
|
|
103
|
+
async function down$35(db) {
|
|
104
104
|
await db.schema.dropTable("_emdash_fields").execute();
|
|
105
105
|
await db.schema.dropTable("_emdash_collections").execute();
|
|
106
106
|
}
|
|
@@ -108,8 +108,8 @@ async function down$33(db) {
|
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/database/migrations/004_plugins.ts
|
|
110
110
|
var _004_plugins_exports = /* @__PURE__ */ __exportAll({
|
|
111
|
-
down: () => down$
|
|
112
|
-
up: () => up$
|
|
111
|
+
down: () => down$34,
|
|
112
|
+
up: () => up$34
|
|
113
113
|
});
|
|
114
114
|
/**
|
|
115
115
|
* Migration: Plugin System Tables
|
|
@@ -119,7 +119,7 @@ var _004_plugins_exports = /* @__PURE__ */ __exportAll({
|
|
|
119
119
|
*
|
|
120
120
|
* @see PLUGIN-SYSTEM.md § Plugin Storage
|
|
121
121
|
*/
|
|
122
|
-
async function up$
|
|
122
|
+
async function up$34(db) {
|
|
123
123
|
await db.schema.createTable("_plugin_storage").addColumn("plugin_id", "text", (col) => col.notNull()).addColumn("collection", "text", (col) => col.notNull()).addColumn("id", "text", (col) => col.notNull()).addColumn("data", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addPrimaryKeyConstraint("pk_plugin_storage", [
|
|
124
124
|
"plugin_id",
|
|
125
125
|
"collection",
|
|
@@ -137,7 +137,7 @@ async function up$32(db) {
|
|
|
137
137
|
"index_name"
|
|
138
138
|
]).execute();
|
|
139
139
|
}
|
|
140
|
-
async function down$
|
|
140
|
+
async function down$34(db) {
|
|
141
141
|
await db.schema.dropTable("_plugin_indexes").execute();
|
|
142
142
|
await db.schema.dropTable("_plugin_state").execute();
|
|
143
143
|
await db.schema.dropTable("_plugin_storage").execute();
|
|
@@ -146,8 +146,8 @@ async function down$32(db) {
|
|
|
146
146
|
//#endregion
|
|
147
147
|
//#region src/database/migrations/005_menus.ts
|
|
148
148
|
var _005_menus_exports = /* @__PURE__ */ __exportAll({
|
|
149
|
-
down: () => down$
|
|
150
|
-
up: () => up$
|
|
149
|
+
down: () => down$33,
|
|
150
|
+
up: () => up$33
|
|
151
151
|
});
|
|
152
152
|
/**
|
|
153
153
|
* Navigation Menus migration
|
|
@@ -155,13 +155,13 @@ var _005_menus_exports = /* @__PURE__ */ __exportAll({
|
|
|
155
155
|
* Creates tables for admin-editable navigation menus.
|
|
156
156
|
* Menu items can reference content entries, taxonomy terms, or custom URLs.
|
|
157
157
|
*/
|
|
158
|
-
async function up$
|
|
158
|
+
async function up$33(db) {
|
|
159
159
|
await db.schema.createTable("_emdash_menus").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
160
160
|
await db.schema.createTable("_emdash_menu_items").addColumn("id", "text", (col) => col.primaryKey()).addColumn("menu_id", "text", (col) => col.notNull()).addColumn("parent_id", "text").addColumn("sort_order", "integer", (col) => col.notNull().defaultTo(0)).addColumn("type", "text", (col) => col.notNull()).addColumn("reference_collection", "text").addColumn("reference_id", "text").addColumn("custom_url", "text").addColumn("label", "text", (col) => col.notNull()).addColumn("title_attr", "text").addColumn("target", "text").addColumn("css_classes", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("menu_items_menu_fk", ["menu_id"], "_emdash_menus", ["id"], (cb) => cb.onDelete("cascade")).addForeignKeyConstraint("menu_items_parent_fk", ["parent_id"], "_emdash_menu_items", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
161
161
|
await db.schema.createIndex("idx_menu_items_menu").on("_emdash_menu_items").columns(["menu_id", "sort_order"]).execute();
|
|
162
162
|
await db.schema.createIndex("idx_menu_items_parent").on("_emdash_menu_items").column("parent_id").execute();
|
|
163
163
|
}
|
|
164
|
-
async function down$
|
|
164
|
+
async function down$33(db) {
|
|
165
165
|
await db.schema.dropTable("_emdash_menu_items").execute();
|
|
166
166
|
await db.schema.dropTable("_emdash_menus").execute();
|
|
167
167
|
}
|
|
@@ -169,8 +169,8 @@ async function down$31(db) {
|
|
|
169
169
|
//#endregion
|
|
170
170
|
//#region src/database/migrations/006_taxonomy_defs.ts
|
|
171
171
|
var _006_taxonomy_defs_exports = /* @__PURE__ */ __exportAll({
|
|
172
|
-
down: () => down$
|
|
173
|
-
up: () => up$
|
|
172
|
+
down: () => down$32,
|
|
173
|
+
up: () => up$32
|
|
174
174
|
});
|
|
175
175
|
/**
|
|
176
176
|
* Taxonomy definitions migration
|
|
@@ -178,7 +178,7 @@ var _006_taxonomy_defs_exports = /* @__PURE__ */ __exportAll({
|
|
|
178
178
|
* Adds _emdash_taxonomy_defs table to store taxonomy definitions (category, tag, custom)
|
|
179
179
|
* and seeds default category and tag taxonomies.
|
|
180
180
|
*/
|
|
181
|
-
async function up$
|
|
181
|
+
async function up$32(db) {
|
|
182
182
|
await db.schema.createTable("_emdash_taxonomy_defs").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("label_singular", "text").addColumn("hierarchical", "integer", (col) => col.defaultTo(0)).addColumn("collections", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
183
183
|
await db.insertInto("_emdash_taxonomy_defs").values([{
|
|
184
184
|
id: "taxdef_category",
|
|
@@ -196,22 +196,22 @@ async function up$30(db) {
|
|
|
196
196
|
collections: JSON.stringify(["posts"])
|
|
197
197
|
}]).execute();
|
|
198
198
|
}
|
|
199
|
-
async function down$
|
|
199
|
+
async function down$32(db) {
|
|
200
200
|
await db.schema.dropTable("_emdash_taxonomy_defs").execute();
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
//#endregion
|
|
204
204
|
//#region src/database/migrations/007_widgets.ts
|
|
205
205
|
var _007_widgets_exports = /* @__PURE__ */ __exportAll({
|
|
206
|
-
down: () => down$
|
|
207
|
-
up: () => up$
|
|
206
|
+
down: () => down$31,
|
|
207
|
+
up: () => up$31
|
|
208
208
|
});
|
|
209
|
-
async function up$
|
|
209
|
+
async function up$31(db) {
|
|
210
210
|
await db.schema.createTable("_emdash_widget_areas").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("description", "text").addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
211
211
|
await db.schema.createTable("_emdash_widgets").addColumn("id", "text", (col) => col.primaryKey()).addColumn("area_id", "text", (col) => col.notNull().references("_emdash_widget_areas.id").onDelete("cascade")).addColumn("sort_order", "integer", (col) => col.notNull().defaultTo(0)).addColumn("type", "text", (col) => col.notNull()).addColumn("title", "text").addColumn("content", "text").addColumn("menu_name", "text").addColumn("component_id", "text").addColumn("component_props", "text").addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
212
212
|
await db.schema.createIndex("idx_widgets_area").on("_emdash_widgets").columns(["area_id", "sort_order"]).execute();
|
|
213
213
|
}
|
|
214
|
-
async function down$
|
|
214
|
+
async function down$31(db) {
|
|
215
215
|
await db.schema.dropTable("_emdash_widgets").execute();
|
|
216
216
|
await db.schema.dropTable("_emdash_widget_areas").execute();
|
|
217
217
|
}
|
|
@@ -219,8 +219,8 @@ async function down$29(db) {
|
|
|
219
219
|
//#endregion
|
|
220
220
|
//#region src/database/migrations/008_auth.ts
|
|
221
221
|
var _008_auth_exports = /* @__PURE__ */ __exportAll({
|
|
222
|
-
down: () => down$
|
|
223
|
-
up: () => up$
|
|
222
|
+
down: () => down$30,
|
|
223
|
+
up: () => up$30
|
|
224
224
|
});
|
|
225
225
|
/**
|
|
226
226
|
* Auth migration - passkey-first authentication
|
|
@@ -234,7 +234,7 @@ var _008_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
234
234
|
* - Creates oauth_accounts table (external provider links)
|
|
235
235
|
* - Creates allowed_domains table (self-signup)
|
|
236
236
|
*/
|
|
237
|
-
async function up$
|
|
237
|
+
async function up$30(db) {
|
|
238
238
|
await db.schema.createTable("users_new").addColumn("id", "text", (col) => col.primaryKey()).addColumn("email", "text", (col) => col.notNull().unique()).addColumn("name", "text").addColumn("avatar_url", "text").addColumn("role", "integer", (col) => col.notNull().defaultTo(10)).addColumn("email_verified", "integer", (col) => col.notNull().defaultTo(0)).addColumn("data", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
239
239
|
await sql`
|
|
240
240
|
INSERT INTO users_new (id, email, name, role, data, created_at, updated_at)
|
|
@@ -267,7 +267,7 @@ async function up$28(db) {
|
|
|
267
267
|
await db.schema.createTable("auth_challenges").addColumn("challenge", "text", (col) => col.primaryKey()).addColumn("type", "text", (col) => col.notNull()).addColumn("user_id", "text").addColumn("data", "text").addColumn("expires_at", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
268
268
|
await db.schema.createIndex("idx_auth_challenges_expires").on("auth_challenges").column("expires_at").execute();
|
|
269
269
|
}
|
|
270
|
-
async function down$
|
|
270
|
+
async function down$30(db) {
|
|
271
271
|
await db.schema.dropTable("auth_challenges").execute();
|
|
272
272
|
await db.schema.dropTable("allowed_domains").execute();
|
|
273
273
|
await db.schema.dropTable("oauth_accounts").execute();
|
|
@@ -300,8 +300,8 @@ async function down$28(db) {
|
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region src/database/migrations/009_user_disabled.ts
|
|
302
302
|
var _009_user_disabled_exports = /* @__PURE__ */ __exportAll({
|
|
303
|
-
down: () => down$
|
|
304
|
-
up: () => up$
|
|
303
|
+
down: () => down$29,
|
|
304
|
+
up: () => up$29
|
|
305
305
|
});
|
|
306
306
|
/**
|
|
307
307
|
* User disabled column - for soft-disabling users
|
|
@@ -310,19 +310,19 @@ var _009_user_disabled_exports = /* @__PURE__ */ __exportAll({
|
|
|
310
310
|
* - Adds disabled column to users table (INTEGER, default 0)
|
|
311
311
|
* - Disabled users cannot log in
|
|
312
312
|
*/
|
|
313
|
-
async function up$
|
|
313
|
+
async function up$29(db) {
|
|
314
314
|
await sql`ALTER TABLE users ADD COLUMN disabled INTEGER NOT NULL DEFAULT 0`.execute(db);
|
|
315
315
|
await db.schema.createIndex("idx_users_disabled").on("users").column("disabled").execute();
|
|
316
316
|
}
|
|
317
|
-
async function down$
|
|
317
|
+
async function down$29(db) {
|
|
318
318
|
await db.schema.dropIndex("idx_users_disabled").execute();
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
//#endregion
|
|
322
322
|
//#region src/database/migrations/011_sections.ts
|
|
323
323
|
var _011_sections_exports = /* @__PURE__ */ __exportAll({
|
|
324
|
-
down: () => down$
|
|
325
|
-
up: () => up$
|
|
324
|
+
down: () => down$28,
|
|
325
|
+
up: () => up$28
|
|
326
326
|
});
|
|
327
327
|
/**
|
|
328
328
|
* Migration: Add sections tables and performance indexes
|
|
@@ -331,13 +331,13 @@ var _011_sections_exports = /* @__PURE__ */ __exportAll({
|
|
|
331
331
|
* They provide a library of pre-built page sections (heroes, CTAs, testimonials, etc.)
|
|
332
332
|
* that content authors can browse and insert with a single click.
|
|
333
333
|
*/
|
|
334
|
-
async function up$
|
|
334
|
+
async function up$28(db) {
|
|
335
335
|
await db.schema.createTable("_emdash_section_categories").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("sort_order", "integer", (col) => col.defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
336
336
|
await db.schema.createTable("_emdash_sections").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("title", "text", (col) => col.notNull()).addColumn("description", "text").addColumn("category_id", "text", (col) => col.references("_emdash_section_categories.id").onDelete("set null")).addColumn("keywords", "text").addColumn("content", "text", (col) => col.notNull()).addColumn("preview_media_id", "text").addColumn("source", "text", (col) => col.notNull().defaultTo("user")).addColumn("theme_id", "text").addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).addColumn("updated_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
337
337
|
await db.schema.createIndex("idx_sections_category").on("_emdash_sections").columns(["category_id"]).execute();
|
|
338
338
|
await db.schema.createIndex("idx_sections_source").on("_emdash_sections").columns(["source"]).execute();
|
|
339
339
|
}
|
|
340
|
-
async function down$
|
|
340
|
+
async function down$28(db) {
|
|
341
341
|
await db.schema.dropIndex("idx_sections_source").execute();
|
|
342
342
|
await db.schema.dropIndex("idx_sections_category").execute();
|
|
343
343
|
await db.schema.dropTable("_emdash_sections").execute();
|
|
@@ -347,8 +347,8 @@ async function down$26(db) {
|
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region src/database/migrations/012_search.ts
|
|
349
349
|
var _012_search_exports = /* @__PURE__ */ __exportAll({
|
|
350
|
-
down: () => down$
|
|
351
|
-
up: () => up$
|
|
350
|
+
down: () => down$27,
|
|
351
|
+
up: () => up$27
|
|
352
352
|
});
|
|
353
353
|
/**
|
|
354
354
|
* Migration: Search Support
|
|
@@ -356,11 +356,11 @@ var _012_search_exports = /* @__PURE__ */ __exportAll({
|
|
|
356
356
|
* Adds search configuration to collections and searchable flag to fields.
|
|
357
357
|
* FTS5 tables are created dynamically when search is enabled for a collection.
|
|
358
358
|
*/
|
|
359
|
-
async function up$
|
|
359
|
+
async function up$27(db) {
|
|
360
360
|
await db.schema.alterTable("_emdash_collections").addColumn("search_config", "text").execute();
|
|
361
361
|
await db.schema.alterTable("_emdash_fields").addColumn("searchable", "integer", (col) => col.defaultTo(0)).execute();
|
|
362
362
|
}
|
|
363
|
-
async function down$
|
|
363
|
+
async function down$27(db) {
|
|
364
364
|
await db.schema.alterTable("_emdash_fields").dropColumn("searchable").execute();
|
|
365
365
|
await db.schema.alterTable("_emdash_collections").dropColumn("search_config").execute();
|
|
366
366
|
}
|
|
@@ -368,8 +368,8 @@ async function down$25(db) {
|
|
|
368
368
|
//#endregion
|
|
369
369
|
//#region src/database/migrations/013_scheduled_publishing.ts
|
|
370
370
|
var _013_scheduled_publishing_exports = /* @__PURE__ */ __exportAll({
|
|
371
|
-
down: () => down$
|
|
372
|
-
up: () => up$
|
|
371
|
+
down: () => down$26,
|
|
372
|
+
up: () => up$26
|
|
373
373
|
});
|
|
374
374
|
/**
|
|
375
375
|
* Migration: Add scheduled publishing support
|
|
@@ -378,7 +378,7 @@ var _013_scheduled_publishing_exports = /* @__PURE__ */ __exportAll({
|
|
|
378
378
|
* When scheduled_at is set and status is 'scheduled', the content
|
|
379
379
|
* will be auto-published when the scheduled time is reached.
|
|
380
380
|
*/
|
|
381
|
-
async function up$
|
|
381
|
+
async function up$26(db) {
|
|
382
382
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
383
383
|
for (const tableName of tableNames) {
|
|
384
384
|
const table = { name: tableName };
|
|
@@ -393,7 +393,7 @@ async function up$24(db) {
|
|
|
393
393
|
`.execute(db);
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
async function down$
|
|
396
|
+
async function down$26(db) {
|
|
397
397
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
398
398
|
for (const tableName of tableNames) {
|
|
399
399
|
const table = { name: tableName };
|
|
@@ -410,10 +410,10 @@ async function down$24(db) {
|
|
|
410
410
|
//#endregion
|
|
411
411
|
//#region src/database/migrations/014_draft_revisions.ts
|
|
412
412
|
var _014_draft_revisions_exports = /* @__PURE__ */ __exportAll({
|
|
413
|
-
down: () => down$
|
|
414
|
-
up: () => up$
|
|
413
|
+
down: () => down$25,
|
|
414
|
+
up: () => up$25
|
|
415
415
|
});
|
|
416
|
-
async function up$
|
|
416
|
+
async function up$25(db) {
|
|
417
417
|
const tables = await db.selectFrom("_emdash_collections").select("slug").execute();
|
|
418
418
|
for (const row of tables) {
|
|
419
419
|
const tableName = `ec_${row.slug}`;
|
|
@@ -435,7 +435,7 @@ async function up$23(db) {
|
|
|
435
435
|
`.execute(db);
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
|
-
async function down$
|
|
438
|
+
async function down$25(db) {
|
|
439
439
|
const tables = await db.selectFrom("_emdash_collections").select("slug").execute();
|
|
440
440
|
for (const row of tables) {
|
|
441
441
|
const tableName = `ec_${row.slug}`;
|
|
@@ -459,8 +459,8 @@ async function down$23(db) {
|
|
|
459
459
|
//#endregion
|
|
460
460
|
//#region src/database/migrations/015_indexes.ts
|
|
461
461
|
var _015_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
462
|
-
down: () => down$
|
|
463
|
-
up: () => up$
|
|
462
|
+
down: () => down$24,
|
|
463
|
+
up: () => up$24
|
|
464
464
|
});
|
|
465
465
|
/**
|
|
466
466
|
* Add performance indexes for common query patterns.
|
|
@@ -473,7 +473,7 @@ var _015_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
|
473
473
|
* 5. Retroactive author_id + updated_at on existing ec_* content tables
|
|
474
474
|
* (new tables get these from createContentTable() in registry.ts)
|
|
475
475
|
*/
|
|
476
|
-
async function up$
|
|
476
|
+
async function up$24(db) {
|
|
477
477
|
await db.schema.createIndex("idx_media_mime_type").on("media").column("mime_type").execute();
|
|
478
478
|
await db.schema.createIndex("idx_media_filename").on("media").column("filename").execute();
|
|
479
479
|
await db.schema.createIndex("idx_media_created_at").on("media").column("created_at").execute();
|
|
@@ -493,7 +493,7 @@ async function up$22(db) {
|
|
|
493
493
|
`.execute(db);
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
async function down$
|
|
496
|
+
async function down$24(db) {
|
|
497
497
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
498
498
|
for (const tableName of tableNames) {
|
|
499
499
|
const table = { name: tableName };
|
|
@@ -511,8 +511,8 @@ async function down$22(db) {
|
|
|
511
511
|
//#endregion
|
|
512
512
|
//#region src/database/migrations/016_api_tokens.ts
|
|
513
513
|
var _016_api_tokens_exports = /* @__PURE__ */ __exportAll({
|
|
514
|
-
down: () => down$
|
|
515
|
-
up: () => up$
|
|
514
|
+
down: () => down$23,
|
|
515
|
+
up: () => up$23
|
|
516
516
|
});
|
|
517
517
|
/**
|
|
518
518
|
* API token tables for programmatic access.
|
|
@@ -530,7 +530,7 @@ var _016_api_tokens_exports = /* @__PURE__ */ __exportAll({
|
|
|
530
530
|
* top. Without these guards, the retry crashed with `table ... already
|
|
531
531
|
* exists` and blocked every subsequent boot of the Worker.
|
|
532
532
|
*/
|
|
533
|
-
async function up$
|
|
533
|
+
async function up$23(db) {
|
|
534
534
|
await db.schema.createTable("_emdash_api_tokens").ifNotExists().addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull()).addColumn("token_hash", "text", (col) => col.notNull().unique()).addColumn("prefix", "text", (col) => col.notNull()).addColumn("user_id", "text", (col) => col.notNull()).addColumn("scopes", "text", (col) => col.notNull()).addColumn("expires_at", "text").addColumn("last_used_at", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("api_tokens_user_fk", ["user_id"], "users", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
535
535
|
await db.schema.createIndex("idx_api_tokens_token_hash").ifNotExists().on("_emdash_api_tokens").column("token_hash").execute();
|
|
536
536
|
await db.schema.createIndex("idx_api_tokens_user_id").ifNotExists().on("_emdash_api_tokens").column("user_id").execute();
|
|
@@ -539,7 +539,7 @@ async function up$21(db) {
|
|
|
539
539
|
await db.schema.createIndex("idx_oauth_tokens_expires").ifNotExists().on("_emdash_oauth_tokens").column("expires_at").execute();
|
|
540
540
|
await db.schema.createTable("_emdash_device_codes").ifNotExists().addColumn("device_code", "text", (col) => col.primaryKey()).addColumn("user_code", "text", (col) => col.notNull().unique()).addColumn("scopes", "text", (col) => col.notNull()).addColumn("user_id", "text").addColumn("status", "text", (col) => col.notNull().defaultTo("pending")).addColumn("expires_at", "text", (col) => col.notNull()).addColumn("interval", "integer", (col) => col.notNull().defaultTo(5)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
541
541
|
}
|
|
542
|
-
async function down$
|
|
542
|
+
async function down$23(db) {
|
|
543
543
|
await db.schema.dropTable("_emdash_device_codes").ifExists().execute();
|
|
544
544
|
await db.schema.dropTable("_emdash_oauth_tokens").ifExists().execute();
|
|
545
545
|
await db.schema.dropTable("_emdash_api_tokens").ifExists().execute();
|
|
@@ -548,8 +548,8 @@ async function down$21(db) {
|
|
|
548
548
|
//#endregion
|
|
549
549
|
//#region src/database/migrations/017_authorization_codes.ts
|
|
550
550
|
var _017_authorization_codes_exports = /* @__PURE__ */ __exportAll({
|
|
551
|
-
down: () => down$
|
|
552
|
-
up: () => up$
|
|
551
|
+
down: () => down$22,
|
|
552
|
+
up: () => up$22
|
|
553
553
|
});
|
|
554
554
|
/**
|
|
555
555
|
* Authorization codes for OAuth 2.1 Authorization Code + PKCE flow.
|
|
@@ -559,20 +559,20 @@ var _017_authorization_codes_exports = /* @__PURE__ */ __exportAll({
|
|
|
559
559
|
*
|
|
560
560
|
* Also adds client_id tracking to oauth_tokens for per-client revocation.
|
|
561
561
|
*/
|
|
562
|
-
async function up$
|
|
562
|
+
async function up$22(db) {
|
|
563
563
|
await db.schema.createTable("_emdash_authorization_codes").addColumn("code_hash", "text", (col) => col.primaryKey()).addColumn("client_id", "text", (col) => col.notNull()).addColumn("redirect_uri", "text", (col) => col.notNull()).addColumn("user_id", "text", (col) => col.notNull()).addColumn("scopes", "text", (col) => col.notNull()).addColumn("code_challenge", "text", (col) => col.notNull()).addColumn("code_challenge_method", "text", (col) => col.notNull().defaultTo("S256")).addColumn("resource", "text").addColumn("expires_at", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("auth_codes_user_fk", ["user_id"], "users", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
564
564
|
await db.schema.createIndex("idx_auth_codes_expires").on("_emdash_authorization_codes").column("expires_at").execute();
|
|
565
565
|
await sql`ALTER TABLE _emdash_oauth_tokens ADD COLUMN client_id TEXT`.execute(db);
|
|
566
566
|
}
|
|
567
|
-
async function down$
|
|
567
|
+
async function down$22(db) {
|
|
568
568
|
await db.schema.dropTable("_emdash_authorization_codes").execute();
|
|
569
569
|
}
|
|
570
570
|
|
|
571
571
|
//#endregion
|
|
572
572
|
//#region src/database/migrations/018_seo.ts
|
|
573
573
|
var _018_seo_exports = /* @__PURE__ */ __exportAll({
|
|
574
|
-
down: () => down$
|
|
575
|
-
up: () => up$
|
|
574
|
+
down: () => down$21,
|
|
575
|
+
up: () => up$21
|
|
576
576
|
});
|
|
577
577
|
/**
|
|
578
578
|
* Migration: SEO support
|
|
@@ -585,7 +585,7 @@ var _018_seo_exports = /* @__PURE__ */ __exportAll({
|
|
|
585
585
|
* need it. The `has_seo` flag controls whether the admin shows SEO fields
|
|
586
586
|
* and whether the collection's content appears in sitemaps.
|
|
587
587
|
*/
|
|
588
|
-
async function up$
|
|
588
|
+
async function up$21(db) {
|
|
589
589
|
await db.schema.createTable("_emdash_seo").addColumn("collection", "text", (col) => col.notNull()).addColumn("content_id", "text", (col) => col.notNull()).addColumn("seo_title", "text").addColumn("seo_description", "text").addColumn("seo_image", "text").addColumn("seo_canonical", "text").addColumn("seo_no_index", "integer", (col) => col.notNull().defaultTo(0)).addColumn("created_at", "text", (col) => col.notNull().defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.notNull().defaultTo(currentTimestamp(db))).addPrimaryKeyConstraint("_emdash_seo_pk", ["collection", "content_id"]).execute();
|
|
590
590
|
await sql`
|
|
591
591
|
CREATE INDEX idx_emdash_seo_collection
|
|
@@ -596,7 +596,7 @@ async function up$19(db) {
|
|
|
596
596
|
ADD COLUMN has_seo INTEGER NOT NULL DEFAULT 0
|
|
597
597
|
`.execute(db);
|
|
598
598
|
}
|
|
599
|
-
async function down$
|
|
599
|
+
async function down$21(db) {
|
|
600
600
|
await sql`DROP TABLE IF EXISTS _emdash_seo`.execute(db);
|
|
601
601
|
await sql`
|
|
602
602
|
ALTER TABLE _emdash_collections
|
|
@@ -607,8 +607,8 @@ async function down$19(db) {
|
|
|
607
607
|
//#endregion
|
|
608
608
|
//#region src/database/migrations/019_i18n.ts
|
|
609
609
|
var _019_i18n_exports = /* @__PURE__ */ __exportAll({
|
|
610
|
-
down: () => down$
|
|
611
|
-
up: () => up$
|
|
610
|
+
down: () => down$20,
|
|
611
|
+
up: () => up$20
|
|
612
612
|
});
|
|
613
613
|
/**
|
|
614
614
|
* Quote an identifier for use in raw SQL. Escapes embedded double-quotes
|
|
@@ -677,7 +677,7 @@ function validateCreateIndexSql(sqlStr, idxName) {
|
|
|
677
677
|
* PostgreSQL path: ALTER TABLE supports ADD COLUMN and DROP CONSTRAINT directly.
|
|
678
678
|
* No table rebuild needed.
|
|
679
679
|
*/
|
|
680
|
-
async function upPostgres(db) {
|
|
680
|
+
async function upPostgres$1(db) {
|
|
681
681
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
682
682
|
for (const t of tableNames) {
|
|
683
683
|
validateTableName(t);
|
|
@@ -721,8 +721,8 @@ async function upPostgres(db) {
|
|
|
721
721
|
ADD COLUMN translatable INTEGER NOT NULL DEFAULT 1
|
|
722
722
|
`.execute(db);
|
|
723
723
|
}
|
|
724
|
-
async function up$
|
|
725
|
-
if (!isSqlite(db)) return upPostgres(db);
|
|
724
|
+
async function up$20(db) {
|
|
725
|
+
if (!isSqlite(db)) return upPostgres$1(db);
|
|
726
726
|
const orphanedTmps = await listTablesLike(db, "ec_%_i18n_tmp");
|
|
727
727
|
for (const tmpName of orphanedTmps) {
|
|
728
728
|
validateTableName(tmpName.replace(I18N_TMP_SUFFIX, ""));
|
|
@@ -838,7 +838,7 @@ async function downPostgres(db) {
|
|
|
838
838
|
await sql`ALTER TABLE ${sql.ref(t)} DROP COLUMN translation_group`.execute(db);
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
|
-
async function down$
|
|
841
|
+
async function down$20(db) {
|
|
842
842
|
if (!isSqlite(db)) return downPostgres(db);
|
|
843
843
|
await sql`
|
|
844
844
|
ALTER TABLE _emdash_fields
|
|
@@ -945,8 +945,8 @@ async function down$18(db) {
|
|
|
945
945
|
//#endregion
|
|
946
946
|
//#region src/database/migrations/020_collection_url_pattern.ts
|
|
947
947
|
var _020_collection_url_pattern_exports = /* @__PURE__ */ __exportAll({
|
|
948
|
-
down: () => down$
|
|
949
|
-
up: () => up$
|
|
948
|
+
down: () => down$19,
|
|
949
|
+
up: () => up$19
|
|
950
950
|
});
|
|
951
951
|
/**
|
|
952
952
|
* Migration: URL pattern for collections
|
|
@@ -955,13 +955,13 @@ var _020_collection_url_pattern_exports = /* @__PURE__ */ __exportAll({
|
|
|
955
955
|
* can declare its own URL structure (e.g. "/{slug}" for pages, "/blog/{slug}"
|
|
956
956
|
* for posts). Used for menu URL resolution, sitemaps, and path-based lookups.
|
|
957
957
|
*/
|
|
958
|
-
async function up$
|
|
958
|
+
async function up$19(db) {
|
|
959
959
|
await sql`
|
|
960
960
|
ALTER TABLE _emdash_collections
|
|
961
961
|
ADD COLUMN url_pattern TEXT
|
|
962
962
|
`.execute(db);
|
|
963
963
|
}
|
|
964
|
-
async function down$
|
|
964
|
+
async function down$19(db) {
|
|
965
965
|
await sql`
|
|
966
966
|
ALTER TABLE _emdash_collections
|
|
967
967
|
DROP COLUMN url_pattern
|
|
@@ -971,8 +971,8 @@ async function down$17(db) {
|
|
|
971
971
|
//#endregion
|
|
972
972
|
//#region src/database/migrations/021_remove_section_categories.ts
|
|
973
973
|
var _021_remove_section_categories_exports = /* @__PURE__ */ __exportAll({
|
|
974
|
-
down: () => down$
|
|
975
|
-
up: () => up$
|
|
974
|
+
down: () => down$18,
|
|
975
|
+
up: () => up$18
|
|
976
976
|
});
|
|
977
977
|
/**
|
|
978
978
|
* Migration: Remove section categories
|
|
@@ -981,12 +981,12 @@ var _021_remove_section_categories_exports = /* @__PURE__ */ __exportAll({
|
|
|
981
981
|
* Rather than building the missing UI for a feature with very little need at this stage,
|
|
982
982
|
* we're removing the feature entirely.
|
|
983
983
|
*/
|
|
984
|
-
async function up$
|
|
984
|
+
async function up$18(db) {
|
|
985
985
|
await db.schema.dropIndex("idx_sections_category").ifExists().execute();
|
|
986
986
|
await db.schema.alterTable("_emdash_sections").dropColumn("category_id").execute();
|
|
987
987
|
await db.schema.dropTable("_emdash_section_categories").execute();
|
|
988
988
|
}
|
|
989
|
-
async function down$
|
|
989
|
+
async function down$18(db) {
|
|
990
990
|
await db.schema.createTable("_emdash_section_categories").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("sort_order", "integer", (col) => col.defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
991
991
|
await db.schema.alterTable("_emdash_sections").addColumn("category_id", "text", (col) => col.references("_emdash_section_categories.id").onDelete("set null")).execute();
|
|
992
992
|
await db.schema.createIndex("idx_sections_category").on("_emdash_sections").columns(["category_id"]).execute();
|
|
@@ -995,8 +995,8 @@ async function down$16(db) {
|
|
|
995
995
|
//#endregion
|
|
996
996
|
//#region src/database/migrations/022_marketplace_plugin_state.ts
|
|
997
997
|
var _022_marketplace_plugin_state_exports = /* @__PURE__ */ __exportAll({
|
|
998
|
-
down: () => down$
|
|
999
|
-
up: () => up$
|
|
998
|
+
down: () => down$17,
|
|
999
|
+
up: () => up$17
|
|
1000
1000
|
});
|
|
1001
1001
|
/**
|
|
1002
1002
|
* Migration: Add marketplace fields to _plugin_state
|
|
@@ -1005,7 +1005,7 @@ var _022_marketplace_plugin_state_exports = /* @__PURE__ */ __exportAll({
|
|
|
1005
1005
|
* whether a plugin was installed from config or marketplace,
|
|
1006
1006
|
* and which marketplace version is installed.
|
|
1007
1007
|
*/
|
|
1008
|
-
async function up$
|
|
1008
|
+
async function up$17(db) {
|
|
1009
1009
|
await sql`
|
|
1010
1010
|
ALTER TABLE _plugin_state
|
|
1011
1011
|
ADD COLUMN source TEXT NOT NULL DEFAULT 'config'
|
|
@@ -1020,7 +1020,7 @@ async function up$15(db) {
|
|
|
1020
1020
|
WHERE source = 'marketplace'
|
|
1021
1021
|
`.execute(db);
|
|
1022
1022
|
}
|
|
1023
|
-
async function down$
|
|
1023
|
+
async function down$17(db) {
|
|
1024
1024
|
await sql`
|
|
1025
1025
|
DROP INDEX IF EXISTS idx_plugin_state_source
|
|
1026
1026
|
`.execute(db);
|
|
@@ -1037,8 +1037,8 @@ async function down$15(db) {
|
|
|
1037
1037
|
//#endregion
|
|
1038
1038
|
//#region src/database/migrations/023_plugin_metadata.ts
|
|
1039
1039
|
var _023_plugin_metadata_exports = /* @__PURE__ */ __exportAll({
|
|
1040
|
-
down: () => down$
|
|
1041
|
-
up: () => up$
|
|
1040
|
+
down: () => down$16,
|
|
1041
|
+
up: () => up$16
|
|
1042
1042
|
});
|
|
1043
1043
|
/**
|
|
1044
1044
|
* Migration: Add display metadata to _plugin_state
|
|
@@ -1047,7 +1047,7 @@ var _023_plugin_metadata_exports = /* @__PURE__ */ __exportAll({
|
|
|
1047
1047
|
* so the admin UI can show meaningful info without re-fetching
|
|
1048
1048
|
* from the marketplace on every page load.
|
|
1049
1049
|
*/
|
|
1050
|
-
async function up$
|
|
1050
|
+
async function up$16(db) {
|
|
1051
1051
|
await sql`
|
|
1052
1052
|
ALTER TABLE _plugin_state
|
|
1053
1053
|
ADD COLUMN display_name TEXT
|
|
@@ -1057,7 +1057,7 @@ async function up$14(db) {
|
|
|
1057
1057
|
ADD COLUMN description TEXT
|
|
1058
1058
|
`.execute(db);
|
|
1059
1059
|
}
|
|
1060
|
-
async function down$
|
|
1060
|
+
async function down$16(db) {
|
|
1061
1061
|
await sql`
|
|
1062
1062
|
ALTER TABLE _plugin_state
|
|
1063
1063
|
DROP COLUMN description
|
|
@@ -1071,8 +1071,8 @@ async function down$14(db) {
|
|
|
1071
1071
|
//#endregion
|
|
1072
1072
|
//#region src/database/migrations/024_media_placeholders.ts
|
|
1073
1073
|
var _024_media_placeholders_exports = /* @__PURE__ */ __exportAll({
|
|
1074
|
-
down: () => down$
|
|
1075
|
-
up: () => up$
|
|
1074
|
+
down: () => down$15,
|
|
1075
|
+
up: () => up$15
|
|
1076
1076
|
});
|
|
1077
1077
|
/**
|
|
1078
1078
|
* Migration: Add placeholder columns to media table
|
|
@@ -1080,7 +1080,7 @@ var _024_media_placeholders_exports = /* @__PURE__ */ __exportAll({
|
|
|
1080
1080
|
* Stores blurhash and dominant_color for LQIP (Low Quality Image Placeholder)
|
|
1081
1081
|
* support. Generated at upload time from image pixel data.
|
|
1082
1082
|
*/
|
|
1083
|
-
async function up$
|
|
1083
|
+
async function up$15(db) {
|
|
1084
1084
|
await sql`
|
|
1085
1085
|
ALTER TABLE media
|
|
1086
1086
|
ADD COLUMN blurhash TEXT
|
|
@@ -1090,7 +1090,7 @@ async function up$13(db) {
|
|
|
1090
1090
|
ADD COLUMN dominant_color TEXT
|
|
1091
1091
|
`.execute(db);
|
|
1092
1092
|
}
|
|
1093
|
-
async function down$
|
|
1093
|
+
async function down$15(db) {
|
|
1094
1094
|
await sql`
|
|
1095
1095
|
ALTER TABLE media
|
|
1096
1096
|
DROP COLUMN dominant_color
|
|
@@ -1104,8 +1104,8 @@ async function down$13(db) {
|
|
|
1104
1104
|
//#endregion
|
|
1105
1105
|
//#region src/database/migrations/025_oauth_clients.ts
|
|
1106
1106
|
var _025_oauth_clients_exports = /* @__PURE__ */ __exportAll({
|
|
1107
|
-
down: () => down$
|
|
1108
|
-
up: () => up$
|
|
1107
|
+
down: () => down$14,
|
|
1108
|
+
up: () => up$14
|
|
1109
1109
|
});
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Migration: Create OAuth clients table
|
|
@@ -1116,18 +1116,18 @@ var _025_oauth_clients_exports = /* @__PURE__ */ __exportAll({
|
|
|
1116
1116
|
* Each client has a set of pre-registered redirect URIs (JSON array).
|
|
1117
1117
|
* The authorize endpoint rejects any redirect_uri not in the client's list.
|
|
1118
1118
|
*/
|
|
1119
|
-
async function up$
|
|
1119
|
+
async function up$14(db) {
|
|
1120
1120
|
await db.schema.createTable("_emdash_oauth_clients").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull()).addColumn("redirect_uris", "text", (col) => col.notNull()).addColumn("scopes", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1121
1121
|
}
|
|
1122
|
-
async function down$
|
|
1122
|
+
async function down$14(db) {
|
|
1123
1123
|
await db.schema.dropTable("_emdash_oauth_clients").execute();
|
|
1124
1124
|
}
|
|
1125
1125
|
|
|
1126
1126
|
//#endregion
|
|
1127
1127
|
//#region src/database/migrations/026_cron_tasks.ts
|
|
1128
1128
|
var _026_cron_tasks_exports = /* @__PURE__ */ __exportAll({
|
|
1129
|
-
down: () => down$
|
|
1130
|
-
up: () => up$
|
|
1129
|
+
down: () => down$13,
|
|
1130
|
+
up: () => up$13
|
|
1131
1131
|
});
|
|
1132
1132
|
/**
|
|
1133
1133
|
* Migration: Create cron tasks table for plugin scheduled tasks.
|
|
@@ -1138,7 +1138,7 @@ var _026_cron_tasks_exports = /* @__PURE__ */ __exportAll({
|
|
|
1138
1138
|
* The `next_run_at` + `status` + `enabled` index drives the "find overdue
|
|
1139
1139
|
* tasks" query used by CronExecutor.tick().
|
|
1140
1140
|
*/
|
|
1141
|
-
async function up$
|
|
1141
|
+
async function up$13(db) {
|
|
1142
1142
|
await db.schema.createTable("_emdash_cron_tasks").addColumn("id", "text", (col) => col.primaryKey()).addColumn("plugin_id", "text", (col) => col.notNull()).addColumn("task_name", "text", (col) => col.notNull()).addColumn("schedule", "text", (col) => col.notNull()).addColumn("is_oneshot", "integer", (col) => col.notNull().defaultTo(0)).addColumn("data", "text").addColumn("next_run_at", "text", (col) => col.notNull()).addColumn("last_run_at", "text").addColumn("status", "text", (col) => col.notNull().defaultTo("idle")).addColumn("locked_at", "text").addColumn("enabled", "integer", (col) => col.notNull().defaultTo(1)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addUniqueConstraint("uq_cron_tasks_plugin_task", ["plugin_id", "task_name"]).execute();
|
|
1143
1143
|
await db.schema.createIndex("idx_cron_tasks_due").on("_emdash_cron_tasks").columns([
|
|
1144
1144
|
"enabled",
|
|
@@ -1147,17 +1147,17 @@ async function up$11(db) {
|
|
|
1147
1147
|
]).execute();
|
|
1148
1148
|
await db.schema.createIndex("idx_cron_tasks_plugin").on("_emdash_cron_tasks").column("plugin_id").execute();
|
|
1149
1149
|
}
|
|
1150
|
-
async function down$
|
|
1150
|
+
async function down$13(db) {
|
|
1151
1151
|
await db.schema.dropTable("_emdash_cron_tasks").execute();
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
1154
|
//#endregion
|
|
1155
1155
|
//#region src/database/migrations/027_comments.ts
|
|
1156
1156
|
var _027_comments_exports = /* @__PURE__ */ __exportAll({
|
|
1157
|
-
down: () => down$
|
|
1158
|
-
up: () => up$
|
|
1157
|
+
down: () => down$12,
|
|
1158
|
+
up: () => up$12
|
|
1159
1159
|
});
|
|
1160
|
-
async function up$
|
|
1160
|
+
async function up$12(db) {
|
|
1161
1161
|
await db.schema.createTable("_emdash_comments").addColumn("id", "text", (col) => col.primaryKey()).addColumn("collection", "text", (col) => col.notNull()).addColumn("content_id", "text", (col) => col.notNull()).addColumn("parent_id", "text", (col) => col.references("_emdash_comments.id").onDelete("cascade")).addColumn("author_name", "text", (col) => col.notNull()).addColumn("author_email", "text", (col) => col.notNull()).addColumn("author_url", "text").addColumn("author_user_id", "text", (col) => col.references("users.id").onDelete("set null")).addColumn("body", "text", (col) => col.notNull()).addColumn("status", "text", (col) => col.notNull().defaultTo("pending")).addColumn("ip_hash", "text").addColumn("user_agent", "text").addColumn("moderation_metadata", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1162
1162
|
await db.schema.createIndex("idx_comments_content").on("_emdash_comments").columns([
|
|
1163
1163
|
"collection",
|
|
@@ -1173,30 +1173,30 @@ async function up$10(db) {
|
|
|
1173
1173
|
await db.schema.alterTable("_emdash_collections").addColumn("comments_closed_after_days", "integer", (col) => col.defaultTo(90)).execute();
|
|
1174
1174
|
await db.schema.alterTable("_emdash_collections").addColumn("comments_auto_approve_users", "integer", (col) => col.defaultTo(1)).execute();
|
|
1175
1175
|
}
|
|
1176
|
-
async function down$
|
|
1176
|
+
async function down$12(db) {
|
|
1177
1177
|
await db.schema.dropTable("_emdash_comments").execute();
|
|
1178
1178
|
}
|
|
1179
1179
|
|
|
1180
1180
|
//#endregion
|
|
1181
1181
|
//#region src/database/migrations/028_drop_author_url.ts
|
|
1182
1182
|
var _028_drop_author_url_exports = /* @__PURE__ */ __exportAll({
|
|
1183
|
-
down: () => down$
|
|
1184
|
-
up: () => up$
|
|
1183
|
+
down: () => down$11,
|
|
1184
|
+
up: () => up$11
|
|
1185
1185
|
});
|
|
1186
|
-
async function up$
|
|
1186
|
+
async function up$11(db) {
|
|
1187
1187
|
await sql`ALTER TABLE _emdash_comments DROP COLUMN author_url`.execute(db);
|
|
1188
1188
|
}
|
|
1189
|
-
async function down$
|
|
1189
|
+
async function down$11(db) {
|
|
1190
1190
|
await db.schema.alterTable("_emdash_comments").addColumn("author_url", "text").execute();
|
|
1191
1191
|
}
|
|
1192
1192
|
|
|
1193
1193
|
//#endregion
|
|
1194
1194
|
//#region src/database/migrations/029_redirects.ts
|
|
1195
1195
|
var _029_redirects_exports = /* @__PURE__ */ __exportAll({
|
|
1196
|
-
down: () => down$
|
|
1197
|
-
up: () => up$
|
|
1196
|
+
down: () => down$10,
|
|
1197
|
+
up: () => up$10
|
|
1198
1198
|
});
|
|
1199
|
-
async function up$
|
|
1199
|
+
async function up$10(db) {
|
|
1200
1200
|
await db.schema.createTable("_emdash_redirects").addColumn("id", "text", (col) => col.primaryKey()).addColumn("source", "text", (col) => col.notNull()).addColumn("destination", "text", (col) => col.notNull()).addColumn("type", "integer", (col) => col.notNull().defaultTo(301)).addColumn("is_pattern", "integer", (col) => col.notNull().defaultTo(0)).addColumn("enabled", "integer", (col) => col.notNull().defaultTo(1)).addColumn("hits", "integer", (col) => col.notNull().defaultTo(0)).addColumn("last_hit_at", "text").addColumn("group_name", "text").addColumn("auto", "integer", (col) => col.notNull().defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1201
1201
|
await db.schema.createIndex("idx_redirects_source").on("_emdash_redirects").column("source").execute();
|
|
1202
1202
|
await db.schema.createIndex("idx_redirects_enabled").on("_emdash_redirects").column("enabled").execute();
|
|
@@ -1205,7 +1205,7 @@ async function up$8(db) {
|
|
|
1205
1205
|
await db.schema.createIndex("idx_404_log_path").on("_emdash_404_log").column("path").execute();
|
|
1206
1206
|
await db.schema.createIndex("idx_404_log_created").on("_emdash_404_log").column("created_at").execute();
|
|
1207
1207
|
}
|
|
1208
|
-
async function down$
|
|
1208
|
+
async function down$10(db) {
|
|
1209
1209
|
await db.schema.dropTable("_emdash_404_log").execute();
|
|
1210
1210
|
await db.schema.dropTable("_emdash_redirects").execute();
|
|
1211
1211
|
}
|
|
@@ -1213,8 +1213,8 @@ async function down$8(db) {
|
|
|
1213
1213
|
//#endregion
|
|
1214
1214
|
//#region src/database/migrations/030_widen_scheduled_index.ts
|
|
1215
1215
|
var _030_widen_scheduled_index_exports = /* @__PURE__ */ __exportAll({
|
|
1216
|
-
down: () => down$
|
|
1217
|
-
up: () => up$
|
|
1216
|
+
down: () => down$9,
|
|
1217
|
+
up: () => up$9
|
|
1218
1218
|
});
|
|
1219
1219
|
/**
|
|
1220
1220
|
* Migration: Widen scheduled publishing index
|
|
@@ -1223,7 +1223,7 @@ var _030_widen_scheduled_index_exports = /* @__PURE__ */ __exportAll({
|
|
|
1223
1223
|
* Published posts can now have scheduled draft changes, so widen the
|
|
1224
1224
|
* index to cover all rows where scheduled_at IS NOT NULL.
|
|
1225
1225
|
*/
|
|
1226
|
-
async function up$
|
|
1226
|
+
async function up$9(db) {
|
|
1227
1227
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1228
1228
|
for (const tableName of tableNames) {
|
|
1229
1229
|
const table = { name: tableName };
|
|
@@ -1237,7 +1237,7 @@ async function up$7(db) {
|
|
|
1237
1237
|
`.execute(db);
|
|
1238
1238
|
}
|
|
1239
1239
|
}
|
|
1240
|
-
async function down$
|
|
1240
|
+
async function down$9(db) {
|
|
1241
1241
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1242
1242
|
for (const tableName of tableNames) {
|
|
1243
1243
|
const table = { name: tableName };
|
|
@@ -1255,10 +1255,10 @@ async function down$7(db) {
|
|
|
1255
1255
|
//#endregion
|
|
1256
1256
|
//#region src/database/migrations/031_bylines.ts
|
|
1257
1257
|
var _031_bylines_exports = /* @__PURE__ */ __exportAll({
|
|
1258
|
-
down: () => down$
|
|
1259
|
-
up: () => up$
|
|
1258
|
+
down: () => down$8,
|
|
1259
|
+
up: () => up$8
|
|
1260
1260
|
});
|
|
1261
|
-
async function up$
|
|
1261
|
+
async function up$8(db) {
|
|
1262
1262
|
await db.schema.createTable("_emdash_bylines").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("display_name", "text", (col) => col.notNull()).addColumn("bio", "text").addColumn("avatar_media_id", "text", (col) => col.references("media.id").onDelete("set null")).addColumn("website_url", "text").addColumn("user_id", "text", (col) => col.references("users.id").onDelete("set null")).addColumn("is_guest", "integer", (col) => col.notNull().defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1263
1263
|
await sql`
|
|
1264
1264
|
CREATE UNIQUE INDEX ${sql.ref("idx_bylines_user_id_unique")}
|
|
@@ -1290,7 +1290,7 @@ async function up$6(db) {
|
|
|
1290
1290
|
`.execute(db);
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
|
-
async function down$
|
|
1293
|
+
async function down$8(db) {
|
|
1294
1294
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1295
1295
|
for (const tableName of tableNames) {
|
|
1296
1296
|
await sql`
|
|
@@ -1308,8 +1308,8 @@ async function down$6(db) {
|
|
|
1308
1308
|
//#endregion
|
|
1309
1309
|
//#region src/database/migrations/032_rate_limits.ts
|
|
1310
1310
|
var _032_rate_limits_exports = /* @__PURE__ */ __exportAll({
|
|
1311
|
-
down: () => down$
|
|
1312
|
-
up: () => up$
|
|
1311
|
+
down: () => down$7,
|
|
1312
|
+
up: () => up$7
|
|
1313
1313
|
});
|
|
1314
1314
|
/**
|
|
1315
1315
|
* Migration: Rate limits table + device code polling tracking.
|
|
@@ -1320,12 +1320,12 @@ var _032_rate_limits_exports = /* @__PURE__ */ __exportAll({
|
|
|
1320
1320
|
* 2. Add last_polled_at column to _emdash_device_codes for
|
|
1321
1321
|
* RFC 8628 slow_down enforcement.
|
|
1322
1322
|
*/
|
|
1323
|
-
async function up$
|
|
1323
|
+
async function up$7(db) {
|
|
1324
1324
|
await db.schema.createTable("_emdash_rate_limits").addColumn("key", "text", (col) => col.notNull()).addColumn("window", "text", (col) => col.notNull()).addColumn("count", "integer", (col) => col.notNull().defaultTo(1)).addPrimaryKeyConstraint("pk_rate_limits", ["key", "window"]).execute();
|
|
1325
1325
|
await db.schema.createIndex("idx_rate_limits_window").on("_emdash_rate_limits").column("window").execute();
|
|
1326
1326
|
await db.schema.alterTable("_emdash_device_codes").addColumn("last_polled_at", "text").execute();
|
|
1327
1327
|
}
|
|
1328
|
-
async function down$
|
|
1328
|
+
async function down$7(db) {
|
|
1329
1329
|
await db.schema.dropTable("_emdash_rate_limits").execute();
|
|
1330
1330
|
await db.schema.alterTable("_emdash_device_codes").dropColumn("last_polled_at").execute();
|
|
1331
1331
|
}
|
|
@@ -1333,8 +1333,8 @@ async function down$5(db) {
|
|
|
1333
1333
|
//#endregion
|
|
1334
1334
|
//#region src/database/migrations/033_optimize_content_indexes.ts
|
|
1335
1335
|
var _033_optimize_content_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
1336
|
-
down: () => down$
|
|
1337
|
-
up: () => up$
|
|
1336
|
+
down: () => down$6,
|
|
1337
|
+
up: () => up$6
|
|
1338
1338
|
});
|
|
1339
1339
|
/**
|
|
1340
1340
|
* Migration: Optimize content table indexes for D1 performance
|
|
@@ -1347,7 +1347,7 @@ var _033_optimize_content_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
|
1347
1347
|
*
|
|
1348
1348
|
* Impact: Reduces D1 row reads by 90%+ for admin panel operations.
|
|
1349
1349
|
*/
|
|
1350
|
-
async function up$
|
|
1350
|
+
async function up$6(db) {
|
|
1351
1351
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1352
1352
|
for (const tableName of tableNames) {
|
|
1353
1353
|
const table = { name: tableName };
|
|
@@ -1389,7 +1389,7 @@ async function up$4(db) {
|
|
|
1389
1389
|
WHERE status = 'trash'
|
|
1390
1390
|
`.execute(db);
|
|
1391
1391
|
}
|
|
1392
|
-
async function down$
|
|
1392
|
+
async function down$6(db) {
|
|
1393
1393
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1394
1394
|
for (const tableName of tableNames) {
|
|
1395
1395
|
const table = { name: tableName };
|
|
@@ -1422,10 +1422,10 @@ async function down$4(db) {
|
|
|
1422
1422
|
//#endregion
|
|
1423
1423
|
//#region src/database/migrations/034_published_at_index.ts
|
|
1424
1424
|
var _034_published_at_index_exports = /* @__PURE__ */ __exportAll({
|
|
1425
|
-
down: () => down$
|
|
1426
|
-
up: () => up$
|
|
1425
|
+
down: () => down$5,
|
|
1426
|
+
up: () => up$5
|
|
1427
1427
|
});
|
|
1428
|
-
async function up$
|
|
1428
|
+
async function up$5(db) {
|
|
1429
1429
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1430
1430
|
for (const tableName of tableNames) {
|
|
1431
1431
|
const table = { name: tableName };
|
|
@@ -1435,7 +1435,7 @@ async function up$3(db) {
|
|
|
1435
1435
|
`.execute(db);
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
|
-
async function down$
|
|
1438
|
+
async function down$5(db) {
|
|
1439
1439
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1440
1440
|
for (const tableName of tableNames) {
|
|
1441
1441
|
const table = { name: tableName };
|
|
@@ -1446,8 +1446,8 @@ async function down$3(db) {
|
|
|
1446
1446
|
//#endregion
|
|
1447
1447
|
//#region src/database/migrations/035_bounded_404_log.ts
|
|
1448
1448
|
var _035_bounded_404_log_exports = /* @__PURE__ */ __exportAll({
|
|
1449
|
-
down: () => down$
|
|
1450
|
-
up: () => up$
|
|
1449
|
+
down: () => down$4,
|
|
1450
|
+
up: () => up$4
|
|
1451
1451
|
});
|
|
1452
1452
|
/**
|
|
1453
1453
|
* Migration: Bounded 404 logging
|
|
@@ -1465,7 +1465,7 @@ var _035_bounded_404_log_exports = /* @__PURE__ */ __exportAll({
|
|
|
1465
1465
|
* path and summing hits
|
|
1466
1466
|
* - Adds a UNIQUE index on `path` so upsert semantics work
|
|
1467
1467
|
*/
|
|
1468
|
-
async function up$
|
|
1468
|
+
async function up$4(db) {
|
|
1469
1469
|
const hitsExists = await columnExists(db, "_emdash_404_log", "hits");
|
|
1470
1470
|
if (!hitsExists) await db.schema.alterTable("_emdash_404_log").addColumn("hits", "integer", (col) => col.notNull().defaultTo(1)).execute();
|
|
1471
1471
|
if (!await columnExists(db, "_emdash_404_log", "last_seen_at")) await db.schema.alterTable("_emdash_404_log").addColumn("last_seen_at", "text").execute();
|
|
@@ -1514,7 +1514,7 @@ async function up$2(db) {
|
|
|
1514
1514
|
await db.schema.dropIndex("idx_404_log_path").ifExists().execute();
|
|
1515
1515
|
await db.schema.createIndex("idx_404_log_last_seen").ifNotExists().on("_emdash_404_log").column("last_seen_at").execute();
|
|
1516
1516
|
}
|
|
1517
|
-
async function down$
|
|
1517
|
+
async function down$4(db) {
|
|
1518
1518
|
await db.schema.dropIndex("idx_404_log_last_seen").ifExists().execute();
|
|
1519
1519
|
await db.schema.dropIndex("idx_404_log_path_unique").ifExists().execute();
|
|
1520
1520
|
await db.schema.createIndex("idx_404_log_path").ifNotExists().on("_emdash_404_log").column("path").execute();
|
|
@@ -1525,8 +1525,8 @@ async function down$2(db) {
|
|
|
1525
1525
|
//#endregion
|
|
1526
1526
|
//#region src/database/migrations/036_i18n_menus_and_taxonomies.ts
|
|
1527
1527
|
var _036_i18n_menus_and_taxonomies_exports = /* @__PURE__ */ __exportAll({
|
|
1528
|
-
down: () => down$
|
|
1529
|
-
up: () => up$
|
|
1528
|
+
down: () => down$3,
|
|
1529
|
+
up: () => up$3
|
|
1530
1530
|
});
|
|
1531
1531
|
/**
|
|
1532
1532
|
* i18n for menus + taxonomies. Adds `locale` + `translation_group` to system
|
|
@@ -1537,20 +1537,15 @@ var _036_i18n_menus_and_taxonomies_exports = /* @__PURE__ */ __exportAll({
|
|
|
1537
1537
|
function getDefaultLocale() {
|
|
1538
1538
|
return getI18nConfig()?.defaultLocale ?? "en";
|
|
1539
1539
|
}
|
|
1540
|
-
async function up$
|
|
1540
|
+
async function up$3(db) {
|
|
1541
1541
|
const defaultLocale = getDefaultLocale();
|
|
1542
1542
|
if (isSqlite(db)) {
|
|
1543
|
-
await
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
await rebuildContentTaxonomies(db);
|
|
1550
|
-
await remapMenuItemRefs(db);
|
|
1551
|
-
} finally {
|
|
1552
|
-
await sql.raw(`PRAGMA foreign_keys = ON`).execute(db);
|
|
1553
|
-
}
|
|
1543
|
+
await rebuildContentTaxonomies(db);
|
|
1544
|
+
await rebuildMenuItems(db, defaultLocale);
|
|
1545
|
+
await rebuildMenus(db, defaultLocale);
|
|
1546
|
+
await rebuildTaxonomies(db, defaultLocale);
|
|
1547
|
+
await rebuildTaxonomyDefs(db, defaultLocale);
|
|
1548
|
+
await remapMenuItemRefs(db);
|
|
1554
1549
|
return;
|
|
1555
1550
|
}
|
|
1556
1551
|
await pgWiden(db, "_emdash_menus", ["name"], ["name", "locale"], defaultLocale);
|
|
@@ -1577,11 +1572,26 @@ async function rebuildMenus(db, defaultLocale) {
|
|
|
1577
1572
|
await db.schema.createIndex("idx__emdash_menus_locale").on("_emdash_menus").column("locale").execute();
|
|
1578
1573
|
await db.schema.createIndex("idx__emdash_menus_translation_group").on("_emdash_menus").column("translation_group").execute();
|
|
1579
1574
|
}
|
|
1580
|
-
async function
|
|
1575
|
+
async function rebuildMenuItems(db, defaultLocale) {
|
|
1581
1576
|
if (await hasColumn(db, "_emdash_menu_items", "locale")) return;
|
|
1582
|
-
await
|
|
1583
|
-
await db.schema.
|
|
1584
|
-
await sql`
|
|
1577
|
+
await sql.raw(`DROP TABLE IF EXISTS "_emdash_menu_items_new"`).execute(db);
|
|
1578
|
+
await db.schema.createTable("_emdash_menu_items_new").addColumn("id", "text", (c) => c.primaryKey()).addColumn("menu_id", "text", (c) => c.notNull()).addColumn("parent_id", "text").addColumn("sort_order", "integer", (c) => c.notNull().defaultTo(0)).addColumn("type", "text", (c) => c.notNull()).addColumn("reference_collection", "text").addColumn("reference_id", "text").addColumn("custom_url", "text").addColumn("label", "text", (c) => c.notNull()).addColumn("title_attr", "text").addColumn("target", "text").addColumn("css_classes", "text").addColumn("created_at", "text", (c) => c.defaultTo(currentTimestamp(db))).addColumn("locale", "text", (c) => c.notNull().defaultTo(defaultLocale)).addColumn("translation_group", "text").execute();
|
|
1579
|
+
await sql`
|
|
1580
|
+
INSERT INTO _emdash_menu_items_new (
|
|
1581
|
+
id, menu_id, parent_id, sort_order, type, reference_collection,
|
|
1582
|
+
reference_id, custom_url, label, title_attr, target, css_classes,
|
|
1583
|
+
created_at, locale, translation_group
|
|
1584
|
+
)
|
|
1585
|
+
SELECT
|
|
1586
|
+
id, menu_id, parent_id, sort_order, type, reference_collection,
|
|
1587
|
+
reference_id, custom_url, label, title_attr, target, css_classes,
|
|
1588
|
+
created_at, ${defaultLocale}, id
|
|
1589
|
+
FROM _emdash_menu_items
|
|
1590
|
+
`.execute(db);
|
|
1591
|
+
await db.schema.dropTable("_emdash_menu_items").execute();
|
|
1592
|
+
await sql`ALTER TABLE _emdash_menu_items_new RENAME TO _emdash_menu_items`.execute(db);
|
|
1593
|
+
await db.schema.createIndex("idx_menu_items_menu").on("_emdash_menu_items").columns(["menu_id", "sort_order"]).execute();
|
|
1594
|
+
await db.schema.createIndex("idx_menu_items_parent").on("_emdash_menu_items").column("parent_id").execute();
|
|
1585
1595
|
await db.schema.createIndex("idx__emdash_menu_items_locale").on("_emdash_menu_items").column("locale").execute();
|
|
1586
1596
|
await db.schema.createIndex("idx__emdash_menu_items_translation_group").on("_emdash_menu_items").column("translation_group").execute();
|
|
1587
1597
|
}
|
|
@@ -1593,7 +1603,7 @@ async function rebuildTaxonomies(db, defaultLocale) {
|
|
|
1593
1603
|
"name",
|
|
1594
1604
|
"slug",
|
|
1595
1605
|
"locale"
|
|
1596
|
-
]).addForeignKeyConstraint("taxonomies_parent_fk", ["parent_id"], "
|
|
1606
|
+
]).addForeignKeyConstraint("taxonomies_parent_fk", ["parent_id"], "taxonomies_new", ["id"], (cb) => cb.onDelete("set null")).execute();
|
|
1597
1607
|
await sql`
|
|
1598
1608
|
INSERT INTO taxonomies_new (id, name, slug, label, parent_id, data, locale, translation_group)
|
|
1599
1609
|
SELECT id, name, slug, label, parent_id, data, ${defaultLocale}, id FROM taxonomies
|
|
@@ -1629,14 +1639,11 @@ async function rebuildContentTaxonomies(db) {
|
|
|
1629
1639
|
]).execute();
|
|
1630
1640
|
await sql`
|
|
1631
1641
|
INSERT OR IGNORE INTO content_taxonomies_new (collection, entry_id, taxonomy_id)
|
|
1632
|
-
SELECT
|
|
1633
|
-
(SELECT t.translation_group FROM taxonomies t WHERE t.id = ct.taxonomy_id),
|
|
1634
|
-
ct.taxonomy_id
|
|
1635
|
-
)
|
|
1636
|
-
FROM content_taxonomies ct
|
|
1642
|
+
SELECT collection, entry_id, taxonomy_id FROM content_taxonomies
|
|
1637
1643
|
`.execute(db);
|
|
1638
1644
|
await db.schema.dropTable("content_taxonomies").execute();
|
|
1639
1645
|
await sql`ALTER TABLE content_taxonomies_new RENAME TO content_taxonomies`.execute(db);
|
|
1646
|
+
await sql`CREATE INDEX IF NOT EXISTS idx_content_taxonomies_term ON content_taxonomies(taxonomy_id)`.execute(db);
|
|
1640
1647
|
}
|
|
1641
1648
|
async function remapMenuItemRefs(db) {
|
|
1642
1649
|
const collections = await sql`SELECT slug FROM _emdash_collections`.execute(db);
|
|
@@ -1707,6 +1714,23 @@ function validateSystemIdent(name) {
|
|
|
1707
1714
|
if (!SYSTEM_IDENT.test(name)) throw new Error(`Invalid identifier: "${name}"`);
|
|
1708
1715
|
}
|
|
1709
1716
|
/**
|
|
1717
|
+
* down() restores the FK on content_taxonomies. Rows whose taxonomy_id doesn't
|
|
1718
|
+
* resolve to a (translation_group, defaultLocale) pair would fail the rebuild
|
|
1719
|
+
* after other tables are already stripped — leaving the user mid-rollback.
|
|
1720
|
+
* Surface dangling rows up front instead.
|
|
1721
|
+
*/
|
|
1722
|
+
async function assertContentTaxonomiesResolve(db, defaultLocale) {
|
|
1723
|
+
const result = await sql`
|
|
1724
|
+
SELECT COUNT(*) AS count FROM content_taxonomies ct
|
|
1725
|
+
WHERE NOT EXISTS (
|
|
1726
|
+
SELECT 1 FROM taxonomies t
|
|
1727
|
+
WHERE t.translation_group = ct.taxonomy_id AND t.locale = ${defaultLocale}
|
|
1728
|
+
)
|
|
1729
|
+
`.execute(db);
|
|
1730
|
+
const count = Number(result.rows[0]?.count ?? 0);
|
|
1731
|
+
if (count > 0) throw new Error(`Cannot revert migration 036_i18n_menus_and_taxonomies: ${count} row(s) in "content_taxonomies" reference a translation_group with no row in "taxonomies" at locale="${defaultLocale}". Clean up the dangling associations before rolling back.`);
|
|
1732
|
+
}
|
|
1733
|
+
/**
|
|
1710
1734
|
* down() is destructive on multi-locale installs (dropping `locale` collapses
|
|
1711
1735
|
* translated rows onto an ambiguous unique key). Refuse to run when any row
|
|
1712
1736
|
* sits at a locale other than the configured defaultLocale.
|
|
@@ -1726,9 +1750,10 @@ async function assertSingleLocale(db, defaultLocale) {
|
|
|
1726
1750
|
if (count > 0) throw new Error(`Cannot revert migration 036_i18n_menus_and_taxonomies: ${count} row(s) in "${table}" use a non-default locale (defaultLocale="${defaultLocale}"). Reverting would drop them silently. Export translations first (or delete them) and re-run the rollback. See packages/core/src/database/migrations/036_i18n_menus_and_taxonomies.ts.`);
|
|
1727
1751
|
}
|
|
1728
1752
|
}
|
|
1729
|
-
async function down$
|
|
1753
|
+
async function down$3(db) {
|
|
1730
1754
|
const defaultLocale = getDefaultLocale();
|
|
1731
1755
|
await assertSingleLocale(db, defaultLocale);
|
|
1756
|
+
await assertContentTaxonomiesResolve(db, defaultLocale);
|
|
1732
1757
|
const widenedTables = [
|
|
1733
1758
|
"_emdash_menus",
|
|
1734
1759
|
"_emdash_menu_items",
|
|
@@ -1736,20 +1761,16 @@ async function down$1(db) {
|
|
|
1736
1761
|
"_emdash_taxonomy_defs"
|
|
1737
1762
|
];
|
|
1738
1763
|
if (isSqlite(db)) {
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
await sql.raw(`DROP INDEX IF EXISTS idx_${t}_locale`).execute(db);
|
|
1743
|
-
await sql.raw(`DROP INDEX IF EXISTS idx_${t}_translation_group`).execute(db);
|
|
1744
|
-
}
|
|
1745
|
-
await rebuildContentTaxonomiesDown(db, defaultLocale);
|
|
1746
|
-
await rebuildMenusDown(db);
|
|
1747
|
-
await rebuildMenuItemsDown(db);
|
|
1748
|
-
await rebuildTaxonomiesDown(db);
|
|
1749
|
-
await rebuildTaxonomyDefsDown(db);
|
|
1750
|
-
} finally {
|
|
1751
|
-
await sql.raw(`PRAGMA foreign_keys = ON`).execute(db);
|
|
1764
|
+
for (const t of widenedTables) {
|
|
1765
|
+
await sql.raw(`DROP INDEX IF EXISTS idx_${t}_locale`).execute(db);
|
|
1766
|
+
await sql.raw(`DROP INDEX IF EXISTS idx_${t}_translation_group`).execute(db);
|
|
1752
1767
|
}
|
|
1768
|
+
await remapContentTaxonomiesDown(db, defaultLocale);
|
|
1769
|
+
await rebuildMenusDown(db);
|
|
1770
|
+
await rebuildMenuItemsDown(db);
|
|
1771
|
+
await rebuildTaxonomiesDown(db);
|
|
1772
|
+
await rebuildTaxonomyDefsDown(db);
|
|
1773
|
+
await restoreContentTaxonomiesFk(db);
|
|
1753
1774
|
return;
|
|
1754
1775
|
}
|
|
1755
1776
|
for (const t of widenedTables) {
|
|
@@ -1759,7 +1780,18 @@ async function down$1(db) {
|
|
|
1759
1780
|
await sql.raw(`ALTER TABLE "${t}" DROP COLUMN IF EXISTS translation_group`).execute(db);
|
|
1760
1781
|
}
|
|
1761
1782
|
}
|
|
1762
|
-
async function
|
|
1783
|
+
async function remapContentTaxonomiesDown(db, defaultLocale) {
|
|
1784
|
+
await sql`
|
|
1785
|
+
UPDATE content_taxonomies
|
|
1786
|
+
SET taxonomy_id = COALESCE(
|
|
1787
|
+
(SELECT t.id FROM taxonomies t
|
|
1788
|
+
WHERE t.translation_group = content_taxonomies.taxonomy_id
|
|
1789
|
+
AND t.locale = ${defaultLocale}),
|
|
1790
|
+
taxonomy_id
|
|
1791
|
+
)
|
|
1792
|
+
`.execute(db);
|
|
1793
|
+
}
|
|
1794
|
+
async function restoreContentTaxonomiesFk(db) {
|
|
1763
1795
|
await sql.raw(`DROP TABLE IF EXISTS "content_taxonomies_new"`).execute(db);
|
|
1764
1796
|
await db.schema.createTable("content_taxonomies_new").addColumn("collection", "text", (c) => c.notNull()).addColumn("entry_id", "text", (c) => c.notNull()).addColumn("taxonomy_id", "text", (c) => c.notNull()).addPrimaryKeyConstraint("content_taxonomies_pk", [
|
|
1765
1797
|
"collection",
|
|
@@ -1768,14 +1800,11 @@ async function rebuildContentTaxonomiesDown(db, defaultLocale) {
|
|
|
1768
1800
|
]).addForeignKeyConstraint("content_taxonomies_taxonomy_fk", ["taxonomy_id"], "taxonomies", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
1769
1801
|
await sql`
|
|
1770
1802
|
INSERT OR IGNORE INTO content_taxonomies_new (collection, entry_id, taxonomy_id)
|
|
1771
|
-
SELECT
|
|
1772
|
-
(SELECT t.id FROM taxonomies t WHERE t.translation_group = ct.taxonomy_id AND t.locale = ${defaultLocale}),
|
|
1773
|
-
ct.taxonomy_id
|
|
1774
|
-
)
|
|
1775
|
-
FROM content_taxonomies ct
|
|
1803
|
+
SELECT collection, entry_id, taxonomy_id FROM content_taxonomies
|
|
1776
1804
|
`.execute(db);
|
|
1777
1805
|
await db.schema.dropTable("content_taxonomies").execute();
|
|
1778
1806
|
await sql`ALTER TABLE content_taxonomies_new RENAME TO content_taxonomies`.execute(db);
|
|
1807
|
+
await sql`CREATE INDEX IF NOT EXISTS idx_content_taxonomies_term ON content_taxonomies(taxonomy_id)`.execute(db);
|
|
1779
1808
|
}
|
|
1780
1809
|
async function rebuildMenusDown(db) {
|
|
1781
1810
|
await sql.raw(`DROP TABLE IF EXISTS "_emdash_menus_old"`).execute(db);
|
|
@@ -1818,14 +1847,232 @@ async function rebuildTaxonomyDefsDown(db) {
|
|
|
1818
1847
|
//#endregion
|
|
1819
1848
|
//#region src/database/migrations/037_credential_algorithm.ts
|
|
1820
1849
|
var _037_credential_algorithm_exports = /* @__PURE__ */ __exportAll({
|
|
1850
|
+
down: () => down$2,
|
|
1851
|
+
up: () => up$2
|
|
1852
|
+
});
|
|
1853
|
+
async function up$2(db) {
|
|
1854
|
+
if (!await columnExists(db, "credentials", "algorithm")) await db.schema.alterTable("credentials").addColumn("algorithm", "integer", (col) => col.notNull().defaultTo(-7)).execute();
|
|
1855
|
+
}
|
|
1856
|
+
async function down$2(db) {
|
|
1857
|
+
if (await columnExists(db, "credentials", "algorithm")) await db.schema.alterTable("credentials").dropColumn("algorithm").execute();
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
//#endregion
|
|
1861
|
+
//#region src/database/migrations/038_registry_plugin_state.ts
|
|
1862
|
+
var _038_registry_plugin_state_exports = /* @__PURE__ */ __exportAll({
|
|
1863
|
+
down: () => down$1,
|
|
1864
|
+
up: () => up$1
|
|
1865
|
+
});
|
|
1866
|
+
/**
|
|
1867
|
+
* Migration: Add registry fields to _plugin_state
|
|
1868
|
+
*
|
|
1869
|
+
* Extends the marketplace columns added in 022 to support the
|
|
1870
|
+
* experimental decentralized plugin registry (see RFC #694). Rather
|
|
1871
|
+
* than introducing a separate `_registry_plugin_state` table, we
|
|
1872
|
+
* reuse the same row shape and distinguish registry installs via the
|
|
1873
|
+
* existing `source` column (now `'config' | 'marketplace' | 'registry'`).
|
|
1874
|
+
*
|
|
1875
|
+
* Registry plugins are addressed by `(publisher_did, slug)` in their
|
|
1876
|
+
* lexicon records but stored under a hashed, opaque `plugin_id` for
|
|
1877
|
+
* runtime compatibility -- see `packages/core/src/registry/plugin-id.ts`.
|
|
1878
|
+
* The `(publisher_did, slug)` pair is preserved here for update
|
|
1879
|
+
* resolution against the currently configured aggregator and for admin
|
|
1880
|
+
* UI rendering ("by @example.dev").
|
|
1881
|
+
*
|
|
1882
|
+
* All new columns are nullable; existing marketplace and config rows
|
|
1883
|
+
* keep working unchanged.
|
|
1884
|
+
*
|
|
1885
|
+
* Idempotency: D1 and SQLite don't honor the migration runner's
|
|
1886
|
+
* advisory lock, so a partial re-apply (cold start race between two
|
|
1887
|
+
* isolates, retry after a connection drop) can re-enter this `up`
|
|
1888
|
+
* function with the columns or index already in place. Each step
|
|
1889
|
+
* checks before adding to keep the migration safe under partial
|
|
1890
|
+
* re-application. The same pattern is used in 019_i18n.ts.
|
|
1891
|
+
*/
|
|
1892
|
+
async function up$1(db) {
|
|
1893
|
+
if (isSqlite(db)) await upSqlite(db);
|
|
1894
|
+
else await upPostgres(db);
|
|
1895
|
+
}
|
|
1896
|
+
async function upSqlite(db) {
|
|
1897
|
+
const cols = await sql`PRAGMA table_info(_plugin_state)`.execute(db);
|
|
1898
|
+
const colNames = new Set(cols.rows.map((c) => c.name));
|
|
1899
|
+
if (!colNames.has("registry_publisher_did")) await sql`
|
|
1900
|
+
ALTER TABLE _plugin_state
|
|
1901
|
+
ADD COLUMN registry_publisher_did TEXT
|
|
1902
|
+
`.execute(db);
|
|
1903
|
+
if (!colNames.has("registry_slug")) await sql`
|
|
1904
|
+
ALTER TABLE _plugin_state
|
|
1905
|
+
ADD COLUMN registry_slug TEXT
|
|
1906
|
+
`.execute(db);
|
|
1907
|
+
const indexes = await sql`PRAGMA index_list(_plugin_state)`.execute(db);
|
|
1908
|
+
if (!new Set(indexes.rows.map((i) => i.name)).has("idx_plugin_state_registry")) await sql`
|
|
1909
|
+
CREATE INDEX idx_plugin_state_registry
|
|
1910
|
+
ON _plugin_state (source)
|
|
1911
|
+
WHERE source = 'registry'
|
|
1912
|
+
`.execute(db);
|
|
1913
|
+
}
|
|
1914
|
+
async function upPostgres(db) {
|
|
1915
|
+
const cols = await sql`
|
|
1916
|
+
SELECT column_name FROM information_schema.columns
|
|
1917
|
+
WHERE table_name = '_plugin_state'
|
|
1918
|
+
AND table_schema = current_schema()
|
|
1919
|
+
`.execute(db);
|
|
1920
|
+
const colNames = new Set(cols.rows.map((c) => c.column_name));
|
|
1921
|
+
if (!colNames.has("registry_publisher_did")) await sql`
|
|
1922
|
+
ALTER TABLE _plugin_state
|
|
1923
|
+
ADD COLUMN registry_publisher_did TEXT
|
|
1924
|
+
`.execute(db);
|
|
1925
|
+
if (!colNames.has("registry_slug")) await sql`
|
|
1926
|
+
ALTER TABLE _plugin_state
|
|
1927
|
+
ADD COLUMN registry_slug TEXT
|
|
1928
|
+
`.execute(db);
|
|
1929
|
+
await sql`
|
|
1930
|
+
CREATE INDEX IF NOT EXISTS idx_plugin_state_registry
|
|
1931
|
+
ON _plugin_state (source)
|
|
1932
|
+
WHERE source = 'registry'
|
|
1933
|
+
`.execute(db);
|
|
1934
|
+
}
|
|
1935
|
+
async function down$1(db) {
|
|
1936
|
+
await sql`
|
|
1937
|
+
DROP INDEX IF EXISTS idx_plugin_state_registry
|
|
1938
|
+
`.execute(db);
|
|
1939
|
+
await sql`
|
|
1940
|
+
ALTER TABLE _plugin_state
|
|
1941
|
+
DROP COLUMN registry_slug
|
|
1942
|
+
`.execute(db);
|
|
1943
|
+
await sql`
|
|
1944
|
+
ALTER TABLE _plugin_state
|
|
1945
|
+
DROP COLUMN registry_publisher_did
|
|
1946
|
+
`.execute(db);
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
//#endregion
|
|
1950
|
+
//#region src/database/migrations/039_fix_fts5_triggers.ts
|
|
1951
|
+
var _039_fix_fts5_triggers_exports = /* @__PURE__ */ __exportAll({
|
|
1821
1952
|
down: () => down,
|
|
1822
1953
|
up: () => up
|
|
1823
1954
|
});
|
|
1824
1955
|
async function up(db) {
|
|
1825
|
-
if (!
|
|
1956
|
+
if (!isSqlite(db)) return;
|
|
1957
|
+
const collections = await sql`
|
|
1958
|
+
SELECT slug, search_config FROM _emdash_collections
|
|
1959
|
+
WHERE search_config IS NOT NULL
|
|
1960
|
+
`.execute(db);
|
|
1961
|
+
for (const collection of collections.rows) {
|
|
1962
|
+
if (!isSearchEnabled(collection.search_config)) continue;
|
|
1963
|
+
try {
|
|
1964
|
+
validateIdentifier(collection.slug, "collection slug");
|
|
1965
|
+
} catch (error) {
|
|
1966
|
+
console.warn(`[migration 039] skipping FTS rebuild for collection "${collection.slug}": ${error instanceof Error ? error.message : String(error)}`);
|
|
1967
|
+
continue;
|
|
1968
|
+
}
|
|
1969
|
+
const fields = await getSearchableFields(db, collection.slug);
|
|
1970
|
+
if (fields.length === 0) {
|
|
1971
|
+
await dropFtsObjects(db, collection.slug);
|
|
1972
|
+
await sql`
|
|
1973
|
+
UPDATE _emdash_collections
|
|
1974
|
+
SET search_config = json_set(search_config, '$.enabled', json('false'))
|
|
1975
|
+
WHERE slug = ${collection.slug}
|
|
1976
|
+
`.execute(db);
|
|
1977
|
+
continue;
|
|
1978
|
+
}
|
|
1979
|
+
await rebuildIndex(db, collection.slug, fields);
|
|
1980
|
+
}
|
|
1826
1981
|
}
|
|
1827
|
-
|
|
1828
|
-
|
|
1982
|
+
/**
|
|
1983
|
+
* Forward-only migration. Down is a no-op: we cannot meaningfully
|
|
1984
|
+
* "restore the broken triggers" and there is no migration-level state
|
|
1985
|
+
* to roll back. The FTS tables themselves are managed by `FTSManager`
|
|
1986
|
+
* at runtime, not by this migration, so leaving them in their
|
|
1987
|
+
* corruption-safe state on rollback is correct.
|
|
1988
|
+
*/
|
|
1989
|
+
async function down(_db) {}
|
|
1990
|
+
function isSearchEnabled(searchConfig) {
|
|
1991
|
+
if (!searchConfig) return false;
|
|
1992
|
+
try {
|
|
1993
|
+
const parsed = JSON.parse(searchConfig);
|
|
1994
|
+
return typeof parsed === "object" && parsed !== null && "enabled" in parsed && parsed.enabled === true;
|
|
1995
|
+
} catch {
|
|
1996
|
+
return false;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
async function getSearchableFields(db, collectionSlug) {
|
|
2000
|
+
const rows = await sql`
|
|
2001
|
+
SELECT f.slug FROM _emdash_fields f
|
|
2002
|
+
INNER JOIN _emdash_collections c ON c.id = f.collection_id
|
|
2003
|
+
WHERE c.slug = ${collectionSlug} AND f.searchable = 1
|
|
2004
|
+
`.execute(db);
|
|
2005
|
+
const out = [];
|
|
2006
|
+
for (const row of rows.rows) try {
|
|
2007
|
+
validateIdentifier(row.slug, "searchable field name");
|
|
2008
|
+
out.push(row.slug);
|
|
2009
|
+
} catch {
|
|
2010
|
+
console.warn(`[migration 039] skipping invalid searchable field "${row.slug}" on collection "${collectionSlug}"`);
|
|
2011
|
+
}
|
|
2012
|
+
return out;
|
|
2013
|
+
}
|
|
2014
|
+
async function rebuildIndex(db, collectionSlug, fields) {
|
|
2015
|
+
const ftsTable = `_emdash_fts_${collectionSlug}`;
|
|
2016
|
+
const contentTable = `ec_${collectionSlug}`;
|
|
2017
|
+
const columnList = [
|
|
2018
|
+
"id UNINDEXED",
|
|
2019
|
+
"locale UNINDEXED",
|
|
2020
|
+
...fields
|
|
2021
|
+
].join(", ");
|
|
2022
|
+
const fieldList = fields.join(", ");
|
|
2023
|
+
const newFieldList = fields.map((f) => `NEW.${f}`).join(", ");
|
|
2024
|
+
const oldFieldList = fields.map((f) => `OLD.${f}`).join(", ");
|
|
2025
|
+
await dropFtsObjects(db, collectionSlug);
|
|
2026
|
+
await sql.raw(`
|
|
2027
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS "${ftsTable}" USING fts5(
|
|
2028
|
+
${columnList},
|
|
2029
|
+
content='${contentTable}',
|
|
2030
|
+
content_rowid='rowid',
|
|
2031
|
+
tokenize='porter unicode61'
|
|
2032
|
+
)
|
|
2033
|
+
`).execute(db);
|
|
2034
|
+
await sql.raw(`
|
|
2035
|
+
CREATE TRIGGER IF NOT EXISTS "${ftsTable}_insert"
|
|
2036
|
+
AFTER INSERT ON "${contentTable}"
|
|
2037
|
+
WHEN NEW.deleted_at IS NULL
|
|
2038
|
+
BEGIN
|
|
2039
|
+
INSERT INTO "${ftsTable}"(rowid, id, locale, ${fieldList})
|
|
2040
|
+
VALUES (NEW.rowid, NEW.id, NEW.locale, ${newFieldList});
|
|
2041
|
+
END
|
|
2042
|
+
`).execute(db);
|
|
2043
|
+
await sql.raw(`
|
|
2044
|
+
CREATE TRIGGER IF NOT EXISTS "${ftsTable}_update"
|
|
2045
|
+
AFTER UPDATE ON "${contentTable}"
|
|
2046
|
+
BEGIN
|
|
2047
|
+
INSERT INTO "${ftsTable}"("${ftsTable}", rowid, id, locale, ${fieldList})
|
|
2048
|
+
SELECT 'delete', OLD.rowid, OLD.id, OLD.locale, ${oldFieldList}
|
|
2049
|
+
WHERE OLD.deleted_at IS NULL;
|
|
2050
|
+
INSERT INTO "${ftsTable}"(rowid, id, locale, ${fieldList})
|
|
2051
|
+
SELECT NEW.rowid, NEW.id, NEW.locale, ${newFieldList}
|
|
2052
|
+
WHERE NEW.deleted_at IS NULL;
|
|
2053
|
+
END
|
|
2054
|
+
`).execute(db);
|
|
2055
|
+
await sql.raw(`
|
|
2056
|
+
CREATE TRIGGER IF NOT EXISTS "${ftsTable}_delete"
|
|
2057
|
+
AFTER DELETE ON "${contentTable}"
|
|
2058
|
+
BEGIN
|
|
2059
|
+
INSERT INTO "${ftsTable}"("${ftsTable}", rowid, id, locale, ${fieldList})
|
|
2060
|
+
SELECT 'delete', OLD.rowid, OLD.id, OLD.locale, ${oldFieldList}
|
|
2061
|
+
WHERE OLD.deleted_at IS NULL;
|
|
2062
|
+
END
|
|
2063
|
+
`).execute(db);
|
|
2064
|
+
await sql.raw(`
|
|
2065
|
+
INSERT INTO "${ftsTable}"(rowid, id, locale, ${fieldList})
|
|
2066
|
+
SELECT rowid, id, locale, ${fieldList} FROM "${contentTable}"
|
|
2067
|
+
WHERE deleted_at IS NULL
|
|
2068
|
+
`).execute(db);
|
|
2069
|
+
}
|
|
2070
|
+
async function dropFtsObjects(db, collectionSlug) {
|
|
2071
|
+
const ftsTable = `_emdash_fts_${collectionSlug}`;
|
|
2072
|
+
await sql.raw(`DROP TRIGGER IF EXISTS "${ftsTable}_insert"`).execute(db);
|
|
2073
|
+
await sql.raw(`DROP TRIGGER IF EXISTS "${ftsTable}_update"`).execute(db);
|
|
2074
|
+
await sql.raw(`DROP TRIGGER IF EXISTS "${ftsTable}_delete"`).execute(db);
|
|
2075
|
+
await sql.raw(`DROP TABLE IF EXISTS "${ftsTable}"`).execute(db);
|
|
1829
2076
|
}
|
|
1830
2077
|
|
|
1831
2078
|
//#endregion
|
|
@@ -1866,7 +2113,9 @@ const MIGRATIONS = Object.freeze({
|
|
|
1866
2113
|
"034_published_at_index": _034_published_at_index_exports,
|
|
1867
2114
|
"035_bounded_404_log": _035_bounded_404_log_exports,
|
|
1868
2115
|
"036_i18n_menus_and_taxonomies": _036_i18n_menus_and_taxonomies_exports,
|
|
1869
|
-
"037_credential_algorithm": _037_credential_algorithm_exports
|
|
2116
|
+
"037_credential_algorithm": _037_credential_algorithm_exports,
|
|
2117
|
+
"038_registry_plugin_state": _038_registry_plugin_state_exports,
|
|
2118
|
+
"039_fix_fts5_triggers": _039_fix_fts5_triggers_exports
|
|
1870
2119
|
});
|
|
1871
2120
|
/** Total number of registered migrations. Exported for use in tests. */
|
|
1872
2121
|
const MIGRATION_COUNT = Object.keys(MIGRATIONS).length;
|
|
@@ -2063,4 +2312,4 @@ async function rollbackMigration(db) {
|
|
|
2063
2312
|
|
|
2064
2313
|
//#endregion
|
|
2065
2314
|
export { __exportAll as i, rollbackMigration as n, runMigrations as r, getMigrationStatus as t };
|
|
2066
|
-
//# sourceMappingURL=runner-
|
|
2315
|
+
//# sourceMappingURL=runner-DdnQIwz_.mjs.map
|