emdash 0.13.0 → 0.15.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-9DybjTO6.d.mts → adapters-C4yd_UJR.d.mts} +1 -1
- package/dist/{adapters-9DybjTO6.d.mts.map → adapters-C4yd_UJR.d.mts.map} +1 -1
- package/dist/{allowed-origins-CDdG-4Gd.mjs → allowed-origins-D0fFk9a6.mjs} +2 -2
- package/dist/{allowed-origins-CDdG-4Gd.mjs.map → allowed-origins-D0fFk9a6.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +15 -15
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-ayIQ7rIe.mjs → api-CLwG_3dh.mjs} +523 -59
- package/dist/api-CLwG_3dh.mjs.map +1 -0
- package/dist/{api-tokens-eYymBhIT.mjs → api-tokens-ucpcNXDt.mjs} +2 -2
- package/dist/{api-tokens-eYymBhIT.mjs.map → api-tokens-ucpcNXDt.mjs.map} +1 -1
- package/dist/{apply-v4DBgjPw.mjs → apply-wJhM_bwU.mjs} +17 -17
- package/dist/{apply-v4DBgjPw.mjs.map → apply-wJhM_bwU.mjs.map} +1 -1
- package/dist/astro/index.d.mts +10 -10
- package/dist/astro/index.mjs +21 -5
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +9 -9
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +353 -71
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +5 -5
- package/dist/astro/routes/api/admin/bylines/_id_/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +14 -17
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts +9 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +70 -0
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -0
- package/dist/astro/routes/api/admin/bylines/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +25 -16
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +8 -8
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +4 -4
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +32 -31
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +32 -31
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +31 -30
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +31 -30
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +33 -31
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +31 -30
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +31 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +33 -31
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +31 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +59 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts +8 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.d.mts.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +72 -0
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -0
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +31 -30
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +44 -31
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +31 -30
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +31 -30
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +5 -5
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +9 -9
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
- package/dist/astro/routes/api/auth/logout.mjs +3 -3
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.mjs +5 -5
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs.map +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs.map +1 -1
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +5 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/complete.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +10 -9
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/index.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
- package/dist/astro/routes/api/dashboard.mjs +7 -7
- package/dist/astro/routes/api/dev/emails.mjs +3 -3
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +9 -8
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +7 -7
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +29 -29
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +6 -6
- package/dist/astro/routes/api/media/_id_.mjs +6 -6
- package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
- package/dist/astro/routes/api/media/providers/index.mjs +3 -3
- package/dist/astro/routes/api/media/upload-url.mjs +7 -7
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/items.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/translations.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_.mjs +7 -7
- package/dist/astro/routes/api/menus/index.mjs +7 -7
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +3 -3
- package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +3 -3
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +8 -8
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +8 -8
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +9 -9
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +9 -9
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +3 -3
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +31 -30
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +31 -30
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +31 -30
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +31 -30
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +31 -30
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +6 -6
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +31 -30
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +31 -30
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +9 -9
- package/dist/astro/routes/api/search/index.mjs +8 -8
- package/dist/astro/routes/api/search/rebuild.mjs +9 -9
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +8 -8
- package/dist/astro/routes/api/sections/_slug_.mjs +8 -8
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +8 -8
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings.mjs +10 -10
- package/dist/astro/routes/api/setup/admin-verify.mjs +10 -10
- package/dist/astro/routes/api/setup/admin.mjs +9 -9
- package/dist/astro/routes/api/setup/dev-bypass.mjs +22 -22
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +22 -22
- package/dist/astro/routes/api/setup/status.mjs +4 -4
- package/dist/astro/routes/api/snapshot.mjs +5 -5
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +11 -10
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/index.mjs +8 -8
- package/dist/astro/routes/api/widget-components.mjs +3 -3
- package/dist/astro/routes/robots.txt.mjs +5 -5
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +4 -4
- package/dist/astro/routes/sitemap.xml.mjs +5 -5
- package/dist/astro/types.d.mts +13 -12
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-BlyCH-96.mjs → authorize-Bkwe8kuL.mjs} +2 -2
- package/dist/{authorize-BlyCH-96.mjs.map → authorize-Bkwe8kuL.mjs.map} +1 -1
- package/dist/byline-CTaWkMh5.mjs +404 -0
- package/dist/byline-CTaWkMh5.mjs.map +1 -0
- package/dist/bylines-BYHWU3T7.mjs +174 -0
- package/dist/bylines-BYHWU3T7.mjs.map +1 -0
- package/dist/{bylines-C6eYUWlZ.d.mts → bylines-DtDRNF1n.d.mts} +63 -18
- package/dist/bylines-DtDRNF1n.d.mts.map +1 -0
- package/dist/bylines-H0Xh5TMy.mjs +118 -0
- package/dist/bylines-H0Xh5TMy.mjs.map +1 -0
- package/dist/{cache-CXCpjWiL.mjs → cache-CNk1jIxp.mjs} +2 -2
- package/dist/{cache-CXCpjWiL.mjs.map → cache-CNk1jIxp.mjs.map} +1 -1
- package/dist/{challenge-store-CJ0OOHOr.mjs → challenge-store-Dng1SxKT.mjs} +1 -1
- package/dist/{challenge-store-CJ0OOHOr.mjs.map → challenge-store-Dng1SxKT.mjs.map} +1 -1
- package/dist/{chunks-DyGtu1Bv.mjs → chunks-BkfVdD-3.mjs} +2 -2
- package/dist/{chunks-DyGtu1Bv.mjs.map → chunks-BkfVdD-3.mjs.map} +1 -1
- package/dist/cli/index.mjs +21 -29
- 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.mjs +1 -1
- package/dist/client/index.mjs.map +1 -1
- package/dist/{comment-Dd9MI82-.mjs → comment-_yzlBYPx.mjs} +2 -2
- package/dist/{comment-Dd9MI82-.mjs.map → comment-_yzlBYPx.mjs.map} +1 -1
- package/dist/{comments-koGI0FrK.mjs → comments-DxID-rsd.mjs} +3 -3
- package/dist/{comments-koGI0FrK.mjs.map → comments-DxID-rsd.mjs.map} +1 -1
- package/dist/{components-mZem7pbe.mjs → components-Dx3DM0gg.mjs} +1 -1
- package/dist/{components-mZem7pbe.mjs.map → components-Dx3DM0gg.mjs.map} +1 -1
- package/dist/config-CVssduLe.mjs.map +1 -1
- package/dist/{content-D6YG26WG.mjs → content-C0ooIs-f.mjs} +3 -3
- package/dist/{content-D6YG26WG.mjs.map → content-C0ooIs-f.mjs.map} +1 -1
- package/dist/{context-qF8d3IPR.mjs → context-sAnCaUIR.mjs} +10 -10
- package/dist/context-sAnCaUIR.mjs.map +1 -0
- package/dist/{cron-H8eJ46dv.mjs → cron-Bd3b3iuj.mjs} +1 -1
- package/dist/{cron-H8eJ46dv.mjs.map → cron-Bd3b3iuj.mjs.map} +1 -1
- package/dist/{dashboard-BmWSIUwY.mjs → dashboard-Cqw3ay2X.mjs} +4 -4
- package/dist/{dashboard-BmWSIUwY.mjs.map → dashboard-Cqw3ay2X.mjs.map} +1 -1
- 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/{default-Dbs22Gg4.mjs → default-BvTAYCzx.mjs} +1 -1
- package/dist/{default-Dbs22Gg4.mjs.map → default-BvTAYCzx.mjs.map} +1 -1
- package/dist/{device-flow-BqJRxa0Q.mjs → device-flow-B9oG8PwP.mjs} +4 -4
- package/dist/{device-flow-BqJRxa0Q.mjs.map → device-flow-B9oG8PwP.mjs.map} +1 -1
- package/dist/{email-console-Dmp5Q-P2.mjs → email-console-CubRll9q.mjs} +1 -1
- package/dist/email-console-CubRll9q.mjs.map +1 -0
- package/dist/{error-tSQWIl5U.mjs → error-CPh_8eLq.mjs} +16 -8
- package/dist/error-CPh_8eLq.mjs.map +1 -0
- package/dist/{escape-B8bdIryO.mjs → escape-Cg6kMELH.mjs} +1 -1
- package/dist/{escape-B8bdIryO.mjs.map → escape-Cg6kMELH.mjs.map} +1 -1
- package/dist/{fts-manager-B633C-kQ.mjs → fts-manager-Mnrtn-r2.mjs} +2 -2
- package/dist/{fts-manager-B633C-kQ.mjs.map → fts-manager-Mnrtn-r2.mjs.map} +1 -1
- package/dist/{import-CNfLOgDE.mjs → import-DG80rC_I.mjs} +3 -3
- package/dist/{import-CNfLOgDE.mjs.map → import-DG80rC_I.mjs.map} +1 -1
- package/dist/{index-UmOMt9T-.d.mts → index-Bv1Wf1zB.d.mts} +235 -18
- package/dist/index-Bv1Wf1zB.d.mts.map +1 -0
- package/dist/{index-D2gvztOP.d.mts → index-CC42STEm.d.mts} +3 -3
- package/dist/{index-D2gvztOP.d.mts.map → index-CC42STEm.d.mts.map} +1 -1
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +50 -49
- package/dist/{load-QzYRpVN3.mjs → load-DmXNVhst.mjs} +2 -2
- package/dist/{load-QzYRpVN3.mjs.map → load-DmXNVhst.mjs.map} +1 -1
- package/dist/{loader-Cs6-Bqe6.mjs → loader-Chm5h7Gr.mjs} +3 -3
- package/dist/loader-Chm5h7Gr.mjs.map +1 -0
- package/dist/{manifest-schema-HCtSh4Jq.mjs → manifest-schema-Czqf0TLu.mjs} +1 -1
- package/dist/{manifest-schema-HCtSh4Jq.mjs.map → manifest-schema-Czqf0TLu.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +11 -11
- package/dist/media/local-runtime.mjs +4 -4
- package/dist/{media-allowlist-B8EX01DH.mjs → media-allowlist-BNloC69x.mjs} +1 -1
- package/dist/{media-allowlist-B8EX01DH.mjs.map → media-allowlist-BNloC69x.mjs.map} +1 -1
- package/dist/{media-Dg7he9uK.mjs → media-oqRcNiQf.mjs} +2 -2
- package/dist/media-oqRcNiQf.mjs.map +1 -0
- package/dist/{menus-DOzIecHi.mjs → menus-Bjf5R1Qq.mjs} +2 -2
- package/dist/menus-Bjf5R1Qq.mjs.map +1 -0
- package/dist/{menus-X4Z-eBA1.mjs → menus-C75SSmRy.mjs} +30 -11
- package/dist/menus-C75SSmRy.mjs.map +1 -0
- package/dist/mime-KV5TqkMN.mjs.map +1 -1
- package/dist/{mode-DPRPvJYm.mjs → mode-CaaiebZI.mjs} +1 -1
- package/dist/{mode-DPRPvJYm.mjs.map → mode-CaaiebZI.mjs.map} +1 -1
- package/dist/{oauth-authorization-62GmpGIH.mjs → oauth-authorization-CTMeVfvj.mjs} +4 -4
- package/dist/{oauth-authorization-62GmpGIH.mjs.map → oauth-authorization-CTMeVfvj.mjs.map} +1 -1
- package/dist/{oauth-clients-D_B0_-Bz.mjs → oauth-clients-eJCbkVSG.mjs} +1 -1
- package/dist/oauth-clients-eJCbkVSG.mjs.map +1 -0
- package/dist/{oauth-state-store-DpsZViTu.mjs → oauth-state-store-vOSdOeGe.mjs} +1 -1
- package/dist/{oauth-state-store-DpsZViTu.mjs.map → oauth-state-store-vOSdOeGe.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-meyS2oB1.mjs → oauth-user-lookup-3JwsVw6N.mjs} +1 -1
- package/dist/{oauth-user-lookup-meyS2oB1.mjs.map → oauth-user-lookup-3JwsVw6N.mjs.map} +1 -1
- package/dist/options-BL4X94qY.mjs.map +1 -1
- package/dist/{options-Cq64Wx0O.d.mts → options-DhV-gwJb.d.mts} +4 -4
- package/dist/options-DhV-gwJb.d.mts.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-BFTPon-J.mjs → parse-3-caTKgt.mjs} +2 -2
- package/dist/{parse-BFTPon-J.mjs.map → parse-3-caTKgt.mjs.map} +1 -1
- package/dist/{passkey-config-Cg86_ISa.mjs → passkey-config-BloQOT3y.mjs} +1 -1
- package/dist/{passkey-config-Cg86_ISa.mjs.map → passkey-config-BloQOT3y.mjs.map} +1 -1
- package/dist/{placeholder-D3cFCU9y.d.mts → placeholder-KCkkCtgQ.d.mts} +1 -1
- package/dist/{placeholder-D3cFCU9y.d.mts.map → placeholder-KCkkCtgQ.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +26 -15
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/{preview-C1LOEbWZ.mjs → preview-D4z0WONU.mjs} +2 -2
- package/dist/{preview-C1LOEbWZ.mjs.map → preview-D4z0WONU.mjs.map} +1 -1
- package/dist/{public-url-CseXl9Fv.mjs → public-url-CUWWFME2.mjs} +1 -1
- package/dist/{public-url-CseXl9Fv.mjs.map → public-url-CUWWFME2.mjs.map} +1 -1
- package/dist/{query-axZmO6Tn.mjs → query-BJn8TOPk.mjs} +16 -13
- package/dist/{query-axZmO6Tn.mjs.map → query-BJn8TOPk.mjs.map} +1 -1
- package/dist/{rate-limit-t5CVjCO6.mjs → rate-limit-D_-gAeJ0.mjs} +2 -2
- package/dist/{rate-limit-t5CVjCO6.mjs.map → rate-limit-D_-gAeJ0.mjs.map} +1 -1
- package/dist/{redirect-DGRsLO2I.mjs → redirect-BINiRYq4.mjs} +1 -1
- package/dist/{redirect-DGRsLO2I.mjs.map → redirect-BINiRYq4.mjs.map} +1 -1
- package/dist/{redirect-DkaDxq8e.mjs → redirect-CNv4mHX2.mjs} +2 -2
- package/dist/{redirect-DkaDxq8e.mjs.map → redirect-CNv4mHX2.mjs.map} +1 -1
- package/dist/{redirects-D1fdd68T.mjs → redirects-B-CUZ1Xh.mjs} +3 -3
- package/dist/{redirects-D1fdd68T.mjs.map → redirects-B-CUZ1Xh.mjs.map} +1 -1
- package/dist/{redirects-Dmj6KRU3.mjs → redirects-COMLwsV5.mjs} +19 -5
- package/dist/redirects-COMLwsV5.mjs.map +1 -0
- package/dist/{registry-BnCeHYsf.mjs → registry-DqrAQDXH.mjs} +4 -4
- package/dist/{registry-BnCeHYsf.mjs.map → registry-DqrAQDXH.mjs.map} +1 -1
- package/dist/request-cache-dzCt8TZB.mjs.map +1 -1
- package/dist/request-context.mjs.map +1 -1
- package/dist/{request-meta-CLCwSQOS.mjs → request-meta-C_Cjii-T.mjs} +2 -2
- package/dist/{request-meta-CLCwSQOS.mjs.map → request-meta-C_Cjii-T.mjs.map} +1 -1
- package/dist/resolve-Cj98DuqN.mjs +39 -0
- package/dist/resolve-Cj98DuqN.mjs.map +1 -0
- package/dist/{runner-DdnQIwz_.mjs → runner-CGlojznK.mjs} +472 -165
- package/dist/runner-CGlojznK.mjs.map +1 -0
- package/dist/{runner-DcfZewkO.d.mts → runner-CNHRo1mT.d.mts} +2 -2
- package/dist/{runner-DcfZewkO.d.mts.map → runner-CNHRo1mT.d.mts.map} +1 -1
- package/dist/runtime.d.mts +10 -10
- package/dist/runtime.mjs +2 -2
- package/dist/{schema-BmqagCwG.mjs → schema-Djdlfi5G.mjs} +4 -4
- package/dist/{schema-BmqagCwG.mjs.map → schema-Djdlfi5G.mjs.map} +1 -1
- package/dist/{search-CPrvO5u8.mjs → search-By-NN3da.mjs} +4 -4
- package/dist/{search-CPrvO5u8.mjs.map → search-By-NN3da.mjs.map} +1 -1
- package/dist/{secrets-6pgZyq0K.mjs → secrets-rPdhEBkD.mjs} +1 -1
- package/dist/{secrets-6pgZyq0K.mjs.map → secrets-rPdhEBkD.mjs.map} +1 -1
- package/dist/{sections-Cm-zb-gZ.mjs → sections-DcBIlOq1.mjs} +3 -3
- package/dist/{sections-Cm-zb-gZ.mjs.map → sections-DcBIlOq1.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +16 -16
- package/dist/seo/index.d.mts +1 -1
- package/dist/{seo-DRq9-EPP.mjs → seo-bjDoq9Eg.mjs} +2 -2
- package/dist/{seo-DRq9-EPP.mjs.map → seo-bjDoq9Eg.mjs.map} +1 -1
- package/dist/{service-vByySp-2.mjs → service-BuuTdGAT.mjs} +3 -3
- package/dist/{service-vByySp-2.mjs.map → service-BuuTdGAT.mjs.map} +1 -1
- package/dist/{settings-CBBj7HUd.mjs → settings-CJnKiWuR.mjs} +3 -3
- package/dist/{settings-CBBj7HUd.mjs.map → settings-CJnKiWuR.mjs.map} +1 -1
- package/dist/{settings-xQKsWnzQ.mjs → settings-hcubRfkr.mjs} +3 -3
- package/dist/settings-hcubRfkr.mjs.map +1 -0
- package/dist/{setup-BGAJ2uXs.mjs → setup-Cf_TyOv5.mjs} +2 -2
- package/dist/{setup-BGAJ2uXs.mjs.map → setup-Cf_TyOv5.mjs.map} +1 -1
- package/dist/{setup-complete-C6ZCLhKo.mjs → setup-complete-MzzN9u0b.mjs} +1 -1
- package/dist/{setup-complete-C6ZCLhKo.mjs.map → setup-complete-MzzN9u0b.mjs.map} +1 -1
- package/dist/{setup-nonce-CY1gQiAU.mjs → setup-nonce-DXuriHsg.mjs} +1 -1
- package/dist/{setup-nonce-CY1gQiAU.mjs.map → setup-nonce-DXuriHsg.mjs.map} +1 -1
- package/dist/{site-url-D-M4Fd8O.mjs → site-url-xkhw1tcz.mjs} +1 -1
- package/dist/{site-url-D-M4Fd8O.mjs.map → site-url-xkhw1tcz.mjs.map} +1 -1
- package/dist/{ssrf-DzFN_qV-.mjs → ssrf-MZ-zrG6-.mjs} +1 -1
- package/dist/{ssrf-DzFN_qV-.mjs.map → ssrf-MZ-zrG6-.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/local.mjs.map +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/{taxonomies-Dc0mzlms.mjs → taxonomies-CLs9HPE2.mjs} +4 -4
- package/dist/{taxonomies-Dc0mzlms.mjs.map → taxonomies-CLs9HPE2.mjs.map} +1 -1
- package/dist/{taxonomies-Cn9UpaR2.mjs → taxonomies-WamPVA2x.mjs} +7 -42
- package/dist/taxonomies-WamPVA2x.mjs.map +1 -0
- package/dist/{taxonomy-wPfusMK9.mjs → taxonomy-D4Uc2LsZ.mjs} +3 -3
- package/dist/{taxonomy-wPfusMK9.mjs.map → taxonomy-D4Uc2LsZ.mjs.map} +1 -1
- package/dist/{tokens-DILYNZMi.mjs → tokens-N8otWMmj.mjs} +1 -1
- package/dist/{tokens-DILYNZMi.mjs.map → tokens-N8otWMmj.mjs.map} +1 -1
- package/dist/{transport-fw-mKJzT.mjs → transport-B6CHddbu.mjs} +1 -1
- package/dist/{transport-fw-mKJzT.mjs.map → transport-B6CHddbu.mjs.map} +1 -1
- package/dist/{transport-GeXlLscf.d.mts → transport-DOxLfUir.d.mts} +1 -1
- package/dist/{transport-GeXlLscf.d.mts.map → transport-DOxLfUir.d.mts.map} +1 -1
- package/dist/{trusted-proxy-CJhQIk65.mjs → trusted-proxy-97pajC2f.mjs} +1 -1
- package/dist/{trusted-proxy-CJhQIk65.mjs.map → trusted-proxy-97pajC2f.mjs.map} +1 -1
- package/dist/{types-CwXMEPRr.mjs → types-ByV5sgsv.mjs} +2 -2
- package/dist/types-ByV5sgsv.mjs.map +1 -0
- package/dist/{types-Dz9CGX_d.mjs → types-Cd9UCu3t.mjs} +1 -1
- package/dist/{types-Dz9CGX_d.mjs.map → types-Cd9UCu3t.mjs.map} +1 -1
- package/dist/{types-DmxPPXGf.d.mts → types-CkDSF81F.d.mts} +1 -1
- package/dist/{types-DmxPPXGf.d.mts.map → types-CkDSF81F.d.mts.map} +1 -1
- package/dist/{types-BWhaSS7U.d.mts → types-CpUuGcd5.d.mts} +1 -1
- package/dist/{types-BWhaSS7U.d.mts.map → types-CpUuGcd5.d.mts.map} +1 -1
- package/dist/{types-DFowNO60.d.mts → types-D599-ruj.d.mts} +1 -1
- package/dist/{types-DFowNO60.d.mts.map → types-D599-ruj.d.mts.map} +1 -1
- package/dist/{types-B05e2naf.d.mts → types-DGHWRQgr.d.mts} +3 -3
- package/dist/{types-B05e2naf.d.mts.map → types-DGHWRQgr.d.mts.map} +1 -1
- package/dist/{types-CzvJd1ND.d.mts → types-DaYDYW6g.d.mts} +14 -1
- package/dist/types-DaYDYW6g.d.mts.map +1 -0
- package/dist/{types-C1KKK4VP.d.mts → types-DaqNzqVt.d.mts} +16 -1
- package/dist/{types-C1KKK4VP.d.mts.map → types-DaqNzqVt.d.mts.map} +1 -1
- package/dist/{types-DW1l0gCv.d.mts → types-Dgo6y-Ut.d.mts} +1 -1
- package/dist/{types-DW1l0gCv.d.mts.map → types-Dgo6y-Ut.d.mts.map} +1 -1
- package/dist/{types-Cb2UCDJg.d.mts → types-bYmRn_Uy.d.mts} +1 -1
- package/dist/{types-Cb2UCDJg.d.mts.map → types-bYmRn_Uy.d.mts.map} +1 -1
- package/dist/{user-Dr1bOCqS.mjs → user-D3BD5zdT.mjs} +2 -2
- package/dist/{user-Dr1bOCqS.mjs.map → user-D3BD5zdT.mjs.map} +1 -1
- package/dist/{utils-_F-rWBTN.mjs → utils-C3wTAP-P.mjs} +1 -1
- package/dist/{utils-_F-rWBTN.mjs.map → utils-C3wTAP-P.mjs.map} +1 -1
- package/dist/{validate-BpQGsmd7.d.mts → validate-DQtHw9NT.d.mts} +5 -5
- package/dist/{validate-BpQGsmd7.d.mts.map → validate-DQtHw9NT.d.mts.map} +1 -1
- package/dist/{validate-DlFxcVVK.mjs → validate-mz87i8_1.mjs} +2 -2
- package/dist/{validate-DlFxcVVK.mjs.map → validate-mz87i8_1.mjs.map} +1 -1
- package/dist/{validation-BiFJqUp5.mjs → validation-DKHhXjPr.mjs} +5 -5
- package/dist/{validation-BiFJqUp5.mjs.map → validation-DKHhXjPr.mjs.map} +1 -1
- package/dist/version-Ct7C6RSo.mjs +7 -0
- package/dist/{version-Dw7Z5PVU.mjs.map → version-Ct7C6RSo.mjs.map} +1 -1
- package/dist/{widgets-B9j_yzlk.mjs → widgets-lShIQXU5.mjs} +3 -3
- package/dist/widgets-lShIQXU5.mjs.map +1 -0
- package/dist/{zod-generator-DSyz01KE.mjs → zod-generator-dvxgmd1M.mjs} +2 -2
- package/dist/{zod-generator-DSyz01KE.mjs.map → zod-generator-dvxgmd1M.mjs.map} +1 -1
- package/package.json +10 -8
- package/src/api/error.ts +18 -3
- package/src/api/errors.ts +6 -0
- package/src/api/handlers/bylines.ts +161 -0
- package/src/api/handlers/content.ts +125 -43
- package/src/api/handlers/index.ts +6 -0
- package/src/api/handlers/marketplace.ts +27 -5
- package/src/api/handlers/oauth-clients.ts +1 -1
- package/src/api/handlers/registry.ts +568 -22
- package/src/api/openapi/document.ts +1 -1
- package/src/api/schemas/bylines.ts +46 -0
- package/src/astro/integration/index.ts +1 -1
- package/src/astro/integration/routes.ts +5 -0
- package/src/astro/integration/runtime.ts +12 -1
- package/src/astro/integration/virtual-modules.ts +19 -2
- package/src/astro/integration/vite-config.ts +2 -2
- package/src/astro/middleware/auth.ts +7 -7
- package/src/astro/middleware/request-context.ts +1 -1
- package/src/astro/middleware.ts +31 -20
- package/src/astro/routes/api/admin/bylines/[id]/index.ts +3 -12
- package/src/astro/routes/api/admin/bylines/[id]/translations.ts +99 -0
- package/src/astro/routes/api/admin/bylines/index.ts +22 -11
- package/src/astro/routes/api/admin/plugins/[id]/update.ts +1 -0
- package/src/astro/routes/api/admin/plugins/marketplace/[id]/install.ts +6 -1
- package/src/astro/routes/api/admin/plugins/registry/[id]/uninstall.ts +51 -0
- package/src/astro/routes/api/admin/plugins/registry/[id]/update.ts +79 -0
- package/src/astro/routes/api/admin/plugins/updates.ts +43 -6
- package/src/astro/routes/api/admin/themes/marketplace/index.ts +1 -1
- package/src/astro/routes/api/auth/oauth/[provider]/callback.ts +2 -2
- package/src/astro/routes/api/auth/oauth/[provider].ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +6 -6
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id].ts +6 -6
- package/src/astro/routes/api/import/wordpress/execute.ts +1 -1
- package/src/astro/routes/api/import/wordpress/prepare.ts +2 -2
- package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +3 -3
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +2 -2
- package/src/astro/routes/api/media/upload-url.ts +1 -1
- package/src/astro/routes/api/redirects/404s/index.ts +3 -3
- package/src/astro/routes/api/redirects/404s/summary.ts +1 -1
- package/src/astro/routes/api/redirects/[id].ts +3 -3
- package/src/astro/routes/api/redirects/index.ts +2 -2
- package/src/astro/routes/api/schema/collections/[slug]/fields/[fieldSlug].ts +4 -4
- package/src/astro/routes/api/schema/collections/[slug]/fields/index.ts +2 -6
- package/src/astro/routes/api/schema/collections/[slug]/fields/reorder.ts +1 -1
- package/src/astro/routes/api/schema/collections/[slug]/index.ts +6 -6
- package/src/astro/routes/api/schema/collections/index.ts +4 -4
- package/src/astro/routes/api/schema/index.ts +1 -1
- package/src/astro/routes/api/schema/orphans/[slug].ts +1 -1
- package/src/astro/routes/api/schema/orphans/index.ts +1 -1
- package/src/astro/routes/api/sections/[slug].ts +3 -3
- package/src/astro/routes/api/sections/index.ts +2 -2
- package/src/astro/types.ts +4 -0
- package/src/auth/rate-limit.ts +1 -1
- package/src/auth/trusted-proxy.ts +1 -1
- package/src/bylines/index.ts +154 -55
- package/src/cli/commands/init.ts +4 -8
- package/src/client/index.ts +1 -1
- package/src/components/InlinePortableTextEditor.tsx +5 -1
- package/src/components/inline-code-block.tsx +343 -0
- package/src/config/secrets.ts +3 -3
- package/src/database/migrations/006_taxonomy_defs.ts +1 -1
- package/src/database/migrations/014_draft_revisions.ts +6 -6
- package/src/database/migrations/040_byline_i18n.ts +497 -0
- package/src/database/migrations/runner.ts +4 -1
- package/src/database/repositories/audit.ts +2 -2
- package/src/database/repositories/byline.ts +320 -50
- package/src/database/repositories/media.ts +2 -2
- package/src/database/repositories/menu.ts +1 -1
- package/src/database/repositories/options.ts +3 -3
- package/src/database/repositories/plugin-storage.ts +3 -3
- package/src/database/repositories/types.ts +13 -0
- package/src/database/types.ts +15 -0
- package/src/emdash-runtime.ts +492 -20
- package/src/i18n/config.ts +1 -1
- package/src/index.ts +7 -0
- package/src/loader.ts +1 -1
- package/src/mcp/server.ts +3 -3
- package/src/media/mime.ts +1 -1
- package/src/page/absolute-url.ts +1 -1
- package/src/plugins/adapt-sandbox-entry.ts +45 -40
- package/src/plugins/email-console.ts +1 -1
- package/src/plugins/index.ts +1 -0
- package/src/plugins/marketplace.ts +1 -1
- package/src/plugins/sandbox/index.ts +1 -0
- package/src/plugins/sandbox/noop.ts +11 -3
- package/src/plugins/sandbox/types.ts +28 -0
- package/src/query.ts +17 -2
- package/src/registry/config.ts +1 -1
- package/src/request-cache.ts +3 -3
- package/src/request-context.ts +1 -1
- package/src/settings/index.ts +4 -4
- package/src/storage/local.ts +1 -1
- package/src/storage/s3.ts +3 -3
- package/src/widgets/index.ts +1 -1
- package/dist/api-ayIQ7rIe.mjs.map +0 -1
- package/dist/byline-D09BaS4j.mjs +0 -220
- package/dist/byline-D09BaS4j.mjs.map +0 -1
- package/dist/bylines-BTM2xtP8.mjs +0 -113
- package/dist/bylines-BTM2xtP8.mjs.map +0 -1
- package/dist/bylines-C6eYUWlZ.d.mts.map +0 -1
- package/dist/context-qF8d3IPR.mjs.map +0 -1
- package/dist/email-console-Dmp5Q-P2.mjs.map +0 -1
- package/dist/error-tSQWIl5U.mjs.map +0 -1
- package/dist/index-UmOMt9T-.d.mts.map +0 -1
- package/dist/loader-Cs6-Bqe6.mjs.map +0 -1
- package/dist/media-Dg7he9uK.mjs.map +0 -1
- package/dist/menus-DOzIecHi.mjs.map +0 -1
- package/dist/menus-X4Z-eBA1.mjs.map +0 -1
- package/dist/oauth-clients-D_B0_-Bz.mjs.map +0 -1
- package/dist/options-Cq64Wx0O.d.mts.map +0 -1
- package/dist/redirects-Dmj6KRU3.mjs.map +0 -1
- package/dist/runner-DdnQIwz_.mjs.map +0 -1
- package/dist/settings-xQKsWnzQ.mjs.map +0 -1
- package/dist/taxonomies-Cn9UpaR2.mjs.map +0 -1
- package/dist/types-CwXMEPRr.mjs.map +0 -1
- package/dist/types-CzvJd1ND.d.mts.map +0 -1
- package/dist/version-Dw7Z5PVU.mjs +0 -7
- package/dist/widgets-B9j_yzlk.mjs.map +0 -1
- /package/dist/{api-tokens-D3C9v02m.mjs → api-tokens-iPIHAY8N.mjs} +0 -0
- /package/dist/{ssrf-CTul4uQi.mjs → ssrf-BIcd-aXW.mjs} +0 -0
- /package/dist/{types-Db67HHlU.mjs → types-1NNkmTIn.mjs} +0 -0
|
@@ -1,75 +1,76 @@
|
|
|
1
|
-
import { r as runMigrations } from "../runner-
|
|
1
|
+
import { r as runMigrations } from "../runner-CGlojznK.mjs";
|
|
2
2
|
import { createRequestMetrics, getRequestContext, runWithContext } from "../request-context.mjs";
|
|
3
3
|
import { createRecorder, flushRecorder, isInstrumentationEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
4
4
|
import "../connection-2igzM-AT.mjs";
|
|
5
5
|
import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
|
|
6
6
|
import { o as isSqlite } from "../dialect-helpers-BKCvISIQ.mjs";
|
|
7
7
|
import { i as setI18nConfig } from "../config-CVssduLe.mjs";
|
|
8
|
-
import { _ as
|
|
9
|
-
import { r as RevisionRepository } from "../content-
|
|
8
|
+
import { _ as definePlugin, f as PluginRouteRegistry, g as resolveExclusiveHooks, h as createHookPipeline, p as EmailPipeline, v as after } from "../menus-C75SSmRy.mjs";
|
|
9
|
+
import { r as RevisionRepository } from "../content-C0ooIs-f.mjs";
|
|
10
10
|
import "../base64-CqR-7kqF.mjs";
|
|
11
|
-
import "../types-
|
|
12
|
-
import { t as MediaRepository } from "../media-
|
|
13
|
-
import "../user-
|
|
14
|
-
import "../taxonomy-
|
|
15
|
-
import "../comment-
|
|
11
|
+
import "../types-ByV5sgsv.mjs";
|
|
12
|
+
import { t as MediaRepository } from "../media-oqRcNiQf.mjs";
|
|
13
|
+
import "../user-D3BD5zdT.mjs";
|
|
14
|
+
import "../taxonomy-D4Uc2LsZ.mjs";
|
|
15
|
+
import "../comment-_yzlBYPx.mjs";
|
|
16
16
|
import { t as OptionsRepository } from "../options-BL4X94qY.mjs";
|
|
17
|
-
import "../context-
|
|
18
|
-
import "../menus-
|
|
19
|
-
import "../redirect-
|
|
20
|
-
import "../byline-
|
|
17
|
+
import "../context-sAnCaUIR.mjs";
|
|
18
|
+
import "../menus-Bjf5R1Qq.mjs";
|
|
19
|
+
import "../redirect-CNv4mHX2.mjs";
|
|
20
|
+
import "../byline-CTaWkMh5.mjs";
|
|
21
21
|
import { t as normalizeMediaValue } from "../normalize-CN5kRSMC.mjs";
|
|
22
22
|
import "../placeholder-LqmHqvBw.mjs";
|
|
23
|
-
import "../seo-
|
|
24
|
-
import { $ as
|
|
23
|
+
import "../seo-bjDoq9Eg.mjs";
|
|
24
|
+
import { $ as handleContentPermanentDelete, B as handleRevisionRestore, F as handleMediaGet, G as handleContentCreate, H as handleContentCompare, I as handleMediaList, J as handleContentDuplicate, K as handleContentDelete, L as handleMediaUpdate, N as handleMediaCreate, P as handleMediaDelete, Q as handleContentListTrashed, R as handleRevisionGet, U as handleContentCountScheduled, W as handleContentCountTrashed, X as handleContentGetIncludingTrashed, Y as handleContentGet, Z as handleContentList, a as normalizeRegistryConfig, at as handleContentUnschedule, et as handleContentPublish, it as handleContentUnpublish, m as loadBundleFromR2, nt as handleContentSchedule, ot as handleContentUpdate, q as handleContentDiscardDraft, rt as handleContentTranslations, st as validateRev, tt as handleContentRestore, y as PluginStateRepository, z as handleRevisionList } from "../api-CLwG_3dh.mjs";
|
|
25
25
|
import { n as requestCached } from "../request-cache-dzCt8TZB.mjs";
|
|
26
|
-
import "../dashboard-
|
|
26
|
+
import "../dashboard-Cqw3ay2X.mjs";
|
|
27
27
|
import { n as hashString } from "../hash-DlUxGhQS.mjs";
|
|
28
|
-
import { t as FTSManager } from "../fts-manager-
|
|
29
|
-
import { n as SchemaRegistry } from "../registry-
|
|
30
|
-
import { r as getDb } from "../loader-
|
|
31
|
-
import "../schema-
|
|
32
|
-
import "../zod-generator-
|
|
28
|
+
import { t as FTSManager } from "../fts-manager-Mnrtn-r2.mjs";
|
|
29
|
+
import { n as SchemaRegistry } from "../registry-DqrAQDXH.mjs";
|
|
30
|
+
import { r as getDb } from "../loader-Chm5h7Gr.mjs";
|
|
31
|
+
import "../schema-Djdlfi5G.mjs";
|
|
32
|
+
import "../zod-generator-dvxgmd1M.mjs";
|
|
33
33
|
import "../seo-BoR4wCUh.mjs";
|
|
34
|
-
import "../sections-
|
|
35
|
-
import { o as invalidateSiteSettingsCache } from "../settings-
|
|
36
|
-
import "../settings-
|
|
37
|
-
import "../
|
|
38
|
-
import "../taxonomies-
|
|
39
|
-
import
|
|
40
|
-
import "../
|
|
41
|
-
import "../
|
|
42
|
-
import "../
|
|
43
|
-
import "../
|
|
44
|
-
import "../
|
|
45
|
-
import "../
|
|
46
|
-
import
|
|
47
|
-
import "../
|
|
48
|
-
import
|
|
49
|
-
import {
|
|
50
|
-
import "../
|
|
51
|
-
import
|
|
52
|
-
import {
|
|
53
|
-
import "../
|
|
54
|
-
import "../
|
|
55
|
-
import "../
|
|
56
|
-
import "../
|
|
57
|
-
import "../
|
|
58
|
-
import "../
|
|
59
|
-
import "../
|
|
60
|
-
import "../
|
|
34
|
+
import "../sections-DcBIlOq1.mjs";
|
|
35
|
+
import { o as invalidateSiteSettingsCache } from "../settings-hcubRfkr.mjs";
|
|
36
|
+
import "../settings-CJnKiWuR.mjs";
|
|
37
|
+
import "../resolve-Cj98DuqN.mjs";
|
|
38
|
+
import "../taxonomies-WamPVA2x.mjs";
|
|
39
|
+
import "../taxonomies-CLs9HPE2.mjs";
|
|
40
|
+
import { r as normalizeManifestRoute } from "../manifest-schema-Czqf0TLu.mjs";
|
|
41
|
+
import "../types-1NNkmTIn.mjs";
|
|
42
|
+
import "../ssrf-MZ-zrG6-.mjs";
|
|
43
|
+
import "../error-CPh_8eLq.mjs";
|
|
44
|
+
import "../parse-3-caTKgt.mjs";
|
|
45
|
+
import "../redirects-COMLwsV5.mjs";
|
|
46
|
+
import "../setup-Cf_TyOv5.mjs";
|
|
47
|
+
import { a as invalidateUrlPatternCache } from "../query-BJn8TOPk.mjs";
|
|
48
|
+
import "../import-DG80rC_I.mjs";
|
|
49
|
+
import { t as getTrustedProxyHeaders } from "../trusted-proxy-97pajC2f.mjs";
|
|
50
|
+
import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-C_Cjii-T.mjs";
|
|
51
|
+
import "../ssrf-BIcd-aXW.mjs";
|
|
52
|
+
import { n as CronExecutor } from "../cron-Bd3b3iuj.mjs";
|
|
53
|
+
import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from "../email-console-CubRll9q.mjs";
|
|
54
|
+
import "../utils-C3wTAP-P.mjs";
|
|
55
|
+
import "../tokens-N8otWMmj.mjs";
|
|
56
|
+
import "../preview-D4z0WONU.mjs";
|
|
57
|
+
import "../bylines-BYHWU3T7.mjs";
|
|
58
|
+
import "../widgets-lShIQXU5.mjs";
|
|
59
|
+
import "../apply-wJhM_bwU.mjs";
|
|
60
|
+
import "../load-DmXNVhst.mjs";
|
|
61
|
+
import "../search-By-NN3da.mjs";
|
|
61
62
|
import "../index.mjs";
|
|
62
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
63
|
-
import { t as getAuthMode } from "../mode-
|
|
64
|
-
import { t as cleanupExpiredChallenges } from "../challenge-store-
|
|
65
|
-
import { a as validateEncryptionKeyAtStartup } from "../secrets-
|
|
63
|
+
import { n as VERSION, t as COMMIT } from "../version-Ct7C6RSo.mjs";
|
|
64
|
+
import { t as getAuthMode } from "../mode-CaaiebZI.mjs";
|
|
65
|
+
import { t as cleanupExpiredChallenges } from "../challenge-store-Dng1SxKT.mjs";
|
|
66
|
+
import { a as validateEncryptionKeyAtStartup } from "../secrets-rPdhEBkD.mjs";
|
|
66
67
|
import { Kysely, sql } from "kysely";
|
|
67
68
|
import { defineMiddleware } from "astro:middleware";
|
|
68
69
|
import virtualConfig from "virtual:emdash/config";
|
|
69
70
|
import { createDialect, createRequestScopedDb } from "virtual:emdash/dialect";
|
|
70
71
|
import { mediaProviders } from "virtual:emdash/media-providers";
|
|
71
72
|
import { plugins } from "virtual:emdash/plugins";
|
|
72
|
-
import
|
|
73
|
+
import * as virtualSandboxRunnerModule from "virtual:emdash/sandbox-runner";
|
|
73
74
|
import { sandboxedPlugins } from "virtual:emdash/sandboxed-plugins";
|
|
74
75
|
import { createStorage } from "virtual:emdash/storage";
|
|
75
76
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
@@ -484,6 +485,15 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
484
485
|
return sandboxRunner;
|
|
485
486
|
}
|
|
486
487
|
/**
|
|
488
|
+
* Whether the sandbox bypass mode (sandbox: false) is active.
|
|
489
|
+
* Marketplace install/update handlers use this to skip the
|
|
490
|
+
* SANDBOX_NOT_AVAILABLE gate, since the bypass path loads
|
|
491
|
+
* marketplace plugins in-process via syncMarketplacePlugins().
|
|
492
|
+
*/
|
|
493
|
+
isSandboxBypassed() {
|
|
494
|
+
return this.runtimeDeps.sandboxBypassed === true;
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
487
497
|
* Tick the cron system from request context (piggyback mode).
|
|
488
498
|
* Call this from middleware on each request to ensure cron tasks
|
|
489
499
|
* execute even when no dedicated scheduler is available.
|
|
@@ -548,6 +558,10 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
548
558
|
*/
|
|
549
559
|
async syncMarketplacePlugins() {
|
|
550
560
|
if (!this.config.marketplace) return;
|
|
561
|
+
if (this.runtimeDeps.sandboxBypassed) {
|
|
562
|
+
await this.syncMarketplacePluginsBypassed();
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
551
565
|
await this.syncSandboxedSourcePlugins("marketplace");
|
|
552
566
|
}
|
|
553
567
|
/**
|
|
@@ -564,8 +578,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
564
578
|
/**
|
|
565
579
|
* Internal: reconcile in-memory sandboxed-plugin state with the
|
|
566
580
|
* `_plugin_state` table for the given source tier. Shared
|
|
567
|
-
* implementation behind
|
|
568
|
-
*
|
|
581
|
+
* implementation behind {@link syncMarketplacePlugins} and
|
|
582
|
+
* {@link syncRegistryPlugins}.
|
|
569
583
|
*
|
|
570
584
|
* Each source tier has its own key set in `${source}PluginKeys` so a
|
|
571
585
|
* sync for one tier doesn't invalidate the other.
|
|
@@ -649,6 +663,117 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
649
663
|
}
|
|
650
664
|
}
|
|
651
665
|
/**
|
|
666
|
+
* Remove a plugin from the in-memory pipeline lists by ID.
|
|
667
|
+
* Mutates allPipelinePlugins and configuredPlugins in place.
|
|
668
|
+
*/
|
|
669
|
+
removePluginFromLists(pluginId) {
|
|
670
|
+
const allIdx = this.allPipelinePlugins.findIndex((p) => p.id === pluginId);
|
|
671
|
+
if (allIdx !== -1) this.allPipelinePlugins.splice(allIdx, 1);
|
|
672
|
+
const configIdx = this.configuredPlugins.findIndex((p) => p.id === pluginId);
|
|
673
|
+
if (configIdx !== -1) this.configuredPlugins.splice(configIdx, 1);
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Sync marketplace plugin metadata in sandbox: false bypass mode.
|
|
677
|
+
*
|
|
678
|
+
* In bypass mode the noop runner can't load plugins, but admin pages,
|
|
679
|
+
* widgets, and route metadata still need to refresh in-process when an
|
|
680
|
+
* admin installs/updates/uninstalls a marketplace plugin. Otherwise the
|
|
681
|
+
* admin UI shows stale data until the server restarts.
|
|
682
|
+
*
|
|
683
|
+
* Hooks and routes still won't execute under bypass (matches the
|
|
684
|
+
* cold-start bypass behavior in loadMarketplacePluginsBypassed).
|
|
685
|
+
*
|
|
686
|
+
* Known limitation: bypass plugins are loaded via `import(dataUrl)`,
|
|
687
|
+
* which Node's ESM cache keys on the full URL. Updates create fresh
|
|
688
|
+
* module objects, but old ones remain cached for the worker's lifetime.
|
|
689
|
+
* In practice this is a few KB per update — only matters for sites with
|
|
690
|
+
* very frequent marketplace updates running long-lived processes. The
|
|
691
|
+
* fix would be vm.SourceTextModule for explicit lifecycle management.
|
|
692
|
+
*/
|
|
693
|
+
async syncMarketplacePluginsBypassed() {
|
|
694
|
+
if (!this.storage) return;
|
|
695
|
+
try {
|
|
696
|
+
const marketplaceStates = await new PluginStateRepository(this.db).getMarketplacePlugins();
|
|
697
|
+
const desired = /* @__PURE__ */ new Map();
|
|
698
|
+
for (const state of marketplaceStates) {
|
|
699
|
+
this.pluginStates.set(state.pluginId, state.status);
|
|
700
|
+
if (state.status === "active") this.enabledPlugins.add(state.pluginId);
|
|
701
|
+
else this.enabledPlugins.delete(state.pluginId);
|
|
702
|
+
if (state.status !== "active") continue;
|
|
703
|
+
desired.set(state.pluginId, state.marketplaceVersion ?? state.version);
|
|
704
|
+
}
|
|
705
|
+
const toRemove = [];
|
|
706
|
+
for (const pluginId of marketplaceManifestCache.keys()) if (!desired.has(pluginId)) toRemove.push(pluginId);
|
|
707
|
+
for (const pluginId of toRemove) {
|
|
708
|
+
const resolved = this.allPipelinePlugins.find((p) => p.id === pluginId);
|
|
709
|
+
if (resolved) try {
|
|
710
|
+
const deactivateHook = resolved.hooks?.["plugin:deactivate"];
|
|
711
|
+
if (deactivateHook) {
|
|
712
|
+
const handler = typeof deactivateHook === "function" ? deactivateHook : deactivateHook.handler;
|
|
713
|
+
if (typeof handler === "function") await handler({ pluginId }, {});
|
|
714
|
+
}
|
|
715
|
+
} catch (err) {
|
|
716
|
+
console.warn(`[emdash] plugin:deactivate hook failed for ${pluginId}:`, err);
|
|
717
|
+
}
|
|
718
|
+
marketplaceManifestCache.delete(pluginId);
|
|
719
|
+
sandboxedRouteMetaCache.delete(pluginId);
|
|
720
|
+
this.removePluginFromLists(pluginId);
|
|
721
|
+
this.enabledPlugins.delete(pluginId);
|
|
722
|
+
}
|
|
723
|
+
const { adaptSandboxEntry } = await import("../plugins/adapt-sandbox-entry.mjs");
|
|
724
|
+
const newPlugins = [];
|
|
725
|
+
for (const [pluginId, version] of desired) {
|
|
726
|
+
const bundle = await loadBundleFromR2(this.storage, pluginId, version);
|
|
727
|
+
if (!bundle) {
|
|
728
|
+
console.warn(`EmDash: Marketplace plugin ${pluginId}@${version} not found in R2`);
|
|
729
|
+
continue;
|
|
730
|
+
}
|
|
731
|
+
marketplaceManifestCache.set(pluginId, {
|
|
732
|
+
id: bundle.manifest.id,
|
|
733
|
+
version: bundle.manifest.version,
|
|
734
|
+
admin: bundle.manifest.admin
|
|
735
|
+
});
|
|
736
|
+
if (bundle.manifest.routes.length > 0) {
|
|
737
|
+
const routeMetaMap = /* @__PURE__ */ new Map();
|
|
738
|
+
for (const entry of bundle.manifest.routes) {
|
|
739
|
+
const normalized = normalizeManifestRoute(entry);
|
|
740
|
+
routeMetaMap.set(normalized.name, { public: normalized.public === true });
|
|
741
|
+
}
|
|
742
|
+
sandboxedRouteMetaCache.set(pluginId, routeMetaMap);
|
|
743
|
+
} else sandboxedRouteMetaCache.delete(pluginId);
|
|
744
|
+
const existing = this.allPipelinePlugins.find((p) => p.id === pluginId);
|
|
745
|
+
if (existing && existing.version === bundle.manifest.version) continue;
|
|
746
|
+
if (existing) this.removePluginFromLists(pluginId);
|
|
747
|
+
try {
|
|
748
|
+
const pluginModule = await import(`data:text/javascript;base64,${Buffer.from(bundle.backendCode).toString("base64")}`);
|
|
749
|
+
const adapted = adaptSandboxEntry(pluginModule.default ?? pluginModule, {
|
|
750
|
+
id: bundle.manifest.id,
|
|
751
|
+
version: bundle.manifest.version,
|
|
752
|
+
entrypoint: "",
|
|
753
|
+
capabilities: bundle.manifest.capabilities ?? [],
|
|
754
|
+
allowedHosts: bundle.manifest.allowedHosts ?? [],
|
|
755
|
+
storage: bundle.manifest.storage ?? {},
|
|
756
|
+
adminPages: bundle.manifest.admin?.pages,
|
|
757
|
+
adminWidgets: bundle.manifest.admin?.widgets?.map((w) => ({
|
|
758
|
+
id: w.id,
|
|
759
|
+
title: w.title,
|
|
760
|
+
size: w.size === "full" || w.size === "half" || w.size === "third" ? w.size : void 0
|
|
761
|
+
}))
|
|
762
|
+
});
|
|
763
|
+
newPlugins.push(adapted);
|
|
764
|
+
this.allPipelinePlugins.push(adapted);
|
|
765
|
+
this.configuredPlugins.push(adapted);
|
|
766
|
+
this.enabledPlugins.add(adapted.id);
|
|
767
|
+
} catch (error) {
|
|
768
|
+
console.error(`EmDash: Failed to load marketplace plugin ${pluginId}@${version} in-process:`, error);
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
if (toRemove.length > 0 || newPlugins.length > 0) await this.rebuildHookPipeline();
|
|
772
|
+
} catch (error) {
|
|
773
|
+
console.error("EmDash: Failed to sync marketplace plugins (bypass):", error);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
652
777
|
* Create and initialize the runtime
|
|
653
778
|
*/
|
|
654
779
|
static async create(deps, timings) {
|
|
@@ -696,6 +821,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
696
821
|
} catch {}
|
|
697
822
|
});
|
|
698
823
|
const allPipelinePlugins = [...deps.plugins];
|
|
824
|
+
const bypassedPluginsList = [];
|
|
699
825
|
if (import.meta.env.DEV) try {
|
|
700
826
|
const devConsolePlugin = definePlugin({
|
|
701
827
|
id: DEV_CONSOLE_EMAIL_PLUGIN_ID,
|
|
@@ -726,6 +852,26 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
726
852
|
} catch (error) {
|
|
727
853
|
console.warn("[comments] Failed to register default moderator:", error);
|
|
728
854
|
}
|
|
855
|
+
if (deps.sandboxBypassed && deps.sandboxedPluginEntries.length > 0) {
|
|
856
|
+
if (typeof navigator !== "undefined" && typeof navigator.userAgent === "string" && navigator.userAgent.includes("Cloudflare-Workers")) throw new Error("sandbox: false is not supported in Cloudflare Workers. Remove the sandbox: false option or use the Cloudflare sandbox runner.");
|
|
857
|
+
console.info("EmDash: Sandbox disabled (sandbox: false). Sandboxed plugins will run in-process without isolation.");
|
|
858
|
+
const bypassedPlugins = await EmDashRuntime.loadBypassedPlugins(deps.sandboxedPluginEntries);
|
|
859
|
+
for (const plugin of bypassedPlugins) {
|
|
860
|
+
allPipelinePlugins.push(plugin);
|
|
861
|
+
bypassedPluginsList.push(plugin);
|
|
862
|
+
const status = pluginStates.get(plugin.id);
|
|
863
|
+
if (status === void 0 || status === "active") enabledPlugins.add(plugin.id);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
if (deps.sandboxBypassed && deps.config.marketplace && storage) {
|
|
867
|
+
const marketplaceBypassed = await EmDashRuntime.loadMarketplacePluginsBypassed(db, storage);
|
|
868
|
+
for (const plugin of marketplaceBypassed) {
|
|
869
|
+
allPipelinePlugins.push(plugin);
|
|
870
|
+
bypassedPluginsList.push(plugin);
|
|
871
|
+
const status = pluginStates.get(plugin.id);
|
|
872
|
+
if (status === void 0 || status === "active") enabledPlugins.add(plugin.id);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
729
875
|
const enabledPluginList = allPipelinePlugins.filter((p) => enabledPlugins.has(p.id));
|
|
730
876
|
const pipelineFactoryOptions = {
|
|
731
877
|
db,
|
|
@@ -733,8 +879,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
733
879
|
siteInfo
|
|
734
880
|
};
|
|
735
881
|
const pipeline = createHookPipeline(enabledPluginList, pipelineFactoryOptions);
|
|
736
|
-
const sandboxedPlugins = await phase("rt.sandbox", "Sandboxed plugins", () => EmDashRuntime.loadSandboxedPlugins(deps, db));
|
|
737
|
-
if (deps.config.marketplace && storage) await phase("rt.market", "Marketplace plugins", () => EmDashRuntime.loadInstalledSandboxedPlugins("marketplace", db, storage, deps, sandboxedPlugins));
|
|
882
|
+
const sandboxedPlugins = await phase("rt.sandbox", "Sandboxed plugins", () => EmDashRuntime.loadSandboxedPlugins(deps, db, storage));
|
|
883
|
+
if (deps.config.marketplace && storage && !deps.sandboxBypassed) await phase("rt.market", "Marketplace plugins", () => EmDashRuntime.loadInstalledSandboxedPlugins("marketplace", db, storage, deps, sandboxedPlugins));
|
|
738
884
|
if (deps.config.experimental?.registry && storage) await phase("rt.registry", "Registry plugins", () => EmDashRuntime.loadInstalledSandboxedPlugins("registry", db, storage, deps, sandboxedPlugins));
|
|
739
885
|
const mediaProviders = /* @__PURE__ */ new Map();
|
|
740
886
|
const mediaProviderEntries = deps.mediaProviderEntries ?? [];
|
|
@@ -792,7 +938,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
792
938
|
return new EmDashRuntime({
|
|
793
939
|
db,
|
|
794
940
|
storage,
|
|
795
|
-
configuredPlugins: deps.plugins,
|
|
941
|
+
configuredPlugins: [...deps.plugins, ...bypassedPluginsList],
|
|
796
942
|
sandboxedPlugins,
|
|
797
943
|
sandboxedPluginEntries: deps.sandboxedPluginEntries,
|
|
798
944
|
hooks: pipeline,
|
|
@@ -859,9 +1005,9 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
859
1005
|
}
|
|
860
1006
|
})();
|
|
861
1007
|
if (collectionCount.count === 0 && !setupDone) {
|
|
862
|
-
const { applySeed } = await import("../apply-
|
|
863
|
-
const { loadSeed } = await import("../load-
|
|
864
|
-
const { validateSeed } = await import("../validate-
|
|
1008
|
+
const { applySeed } = await import("../apply-wJhM_bwU.mjs").then((n) => n.n);
|
|
1009
|
+
const { loadSeed } = await import("../load-DmXNVhst.mjs").then((n) => n.r);
|
|
1010
|
+
const { validateSeed } = await import("../validate-mz87i8_1.mjs").then((n) => n.n);
|
|
865
1011
|
const seed = await loadSeed();
|
|
866
1012
|
if (validateSeed(seed).valid) {
|
|
867
1013
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -892,17 +1038,73 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
892
1038
|
return storage;
|
|
893
1039
|
}
|
|
894
1040
|
/**
|
|
1041
|
+
* Load sandboxed plugin entries as trusted in-process plugins.
|
|
1042
|
+
* Used by the sandbox: false debugging escape hatch.
|
|
1043
|
+
*
|
|
1044
|
+
* Imports each plugin's bundled ESM code via a data URL, adapts it
|
|
1045
|
+
* with adaptSandboxEntry, and returns ResolvedPlugin objects ready
|
|
1046
|
+
* to be merged into the pipeline plugin list.
|
|
1047
|
+
*/
|
|
1048
|
+
static async loadBypassedPlugins(entries) {
|
|
1049
|
+
const { adaptSandboxEntry } = await import("../plugins/adapt-sandbox-entry.mjs");
|
|
1050
|
+
const plugins = [];
|
|
1051
|
+
for (const entry of entries) try {
|
|
1052
|
+
const pluginModule = await import(`data:text/javascript;base64,${Buffer.from(entry.code).toString("base64")}`);
|
|
1053
|
+
const pluginDef = pluginModule.default ?? pluginModule;
|
|
1054
|
+
const adminPages = entry.adminPages?.map((p) => ({
|
|
1055
|
+
path: p.path,
|
|
1056
|
+
label: p.label ?? p.path,
|
|
1057
|
+
icon: p.icon
|
|
1058
|
+
}));
|
|
1059
|
+
const adminWidgets = entry.adminWidgets?.map((w) => {
|
|
1060
|
+
const size = w.size === "full" || w.size === "half" || w.size === "third" ? w.size : void 0;
|
|
1061
|
+
return {
|
|
1062
|
+
id: w.id,
|
|
1063
|
+
title: w.title,
|
|
1064
|
+
size
|
|
1065
|
+
};
|
|
1066
|
+
});
|
|
1067
|
+
const resolved = adaptSandboxEntry(pluginDef, {
|
|
1068
|
+
id: entry.id,
|
|
1069
|
+
version: entry.version,
|
|
1070
|
+
entrypoint: "",
|
|
1071
|
+
capabilities: entry.capabilities,
|
|
1072
|
+
allowedHosts: entry.allowedHosts,
|
|
1073
|
+
storage: entry.storage,
|
|
1074
|
+
adminPages,
|
|
1075
|
+
adminWidgets
|
|
1076
|
+
});
|
|
1077
|
+
plugins.push(resolved);
|
|
1078
|
+
console.log(`EmDash: Loaded plugin ${entry.id}:${entry.version} in-process (sandbox bypassed)`);
|
|
1079
|
+
} catch (error) {
|
|
1080
|
+
console.error(`EmDash: Failed to load sandboxed plugin ${entry.id} in-process:`, error);
|
|
1081
|
+
}
|
|
1082
|
+
return plugins;
|
|
1083
|
+
}
|
|
1084
|
+
/**
|
|
895
1085
|
* Load sandboxed plugins using SandboxRunner
|
|
896
1086
|
*/
|
|
897
|
-
static async loadSandboxedPlugins(deps, db) {
|
|
1087
|
+
static async loadSandboxedPlugins(deps, db, mediaStorage) {
|
|
898
1088
|
if (sandboxedPluginCache.size > 0) return sandboxedPluginCache;
|
|
899
|
-
if (!deps.sandboxEnabled
|
|
900
|
-
if (!sandboxRunner && deps.createSandboxRunner) sandboxRunner = deps.createSandboxRunner({
|
|
1089
|
+
if (!deps.sandboxEnabled) return sandboxedPluginCache;
|
|
1090
|
+
if (!sandboxRunner && deps.createSandboxRunner) sandboxRunner = deps.createSandboxRunner({
|
|
1091
|
+
db,
|
|
1092
|
+
mediaStorage: mediaStorage ? {
|
|
1093
|
+
upload: (opts) => mediaStorage.upload({
|
|
1094
|
+
key: opts.key,
|
|
1095
|
+
body: opts.body,
|
|
1096
|
+
contentType: opts.contentType
|
|
1097
|
+
}),
|
|
1098
|
+
delete: (key) => mediaStorage.delete(key)
|
|
1099
|
+
} : void 0
|
|
1100
|
+
});
|
|
901
1101
|
if (!sandboxRunner) return sandboxedPluginCache;
|
|
902
1102
|
if (!sandboxRunner.isAvailable()) {
|
|
903
|
-
console.
|
|
1103
|
+
console.warn("EmDash: Plugin sandbox is configured but not available on this platform. Sandboxed plugins will not be loaded. If using @emdash-cms/sandbox-workerd/sandbox, ensure workerd is installed.");
|
|
904
1104
|
return sandboxedPluginCache;
|
|
905
1105
|
}
|
|
1106
|
+
if (deps.sandboxedPluginEntries.length === 0) return sandboxedPluginCache;
|
|
1107
|
+
if (deps.sandboxBypassed) return sandboxedPluginCache;
|
|
906
1108
|
for (const entry of deps.sandboxedPluginEntries) {
|
|
907
1109
|
const pluginKey = `${entry.id}:${entry.version}`;
|
|
908
1110
|
if (sandboxedPluginCache.has(pluginKey)) continue;
|
|
@@ -941,7 +1143,18 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
941
1143
|
* demand after install / update / uninstall handlers.
|
|
942
1144
|
*/
|
|
943
1145
|
static async loadInstalledSandboxedPlugins(source, db, storage, deps, cache) {
|
|
944
|
-
if (!sandboxRunner && deps.createSandboxRunner) sandboxRunner = deps.createSandboxRunner({
|
|
1146
|
+
if (!sandboxRunner && deps.createSandboxRunner) sandboxRunner = deps.createSandboxRunner({
|
|
1147
|
+
db,
|
|
1148
|
+
mediaStorage: {
|
|
1149
|
+
upload: (opts) => storage.upload({
|
|
1150
|
+
key: opts.key,
|
|
1151
|
+
body: opts.body,
|
|
1152
|
+
contentType: opts.contentType
|
|
1153
|
+
}),
|
|
1154
|
+
delete: (key) => storage.delete(key)
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
if (deps.sandboxBypassed) return;
|
|
945
1158
|
if (!sandboxRunner || !sandboxRunner.isAvailable()) return;
|
|
946
1159
|
const keySet = source === "marketplace" ? marketplacePluginKeys : registryPluginKeys;
|
|
947
1160
|
try {
|
|
@@ -982,6 +1195,72 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
982
1195
|
} catch {}
|
|
983
1196
|
}
|
|
984
1197
|
/**
|
|
1198
|
+
* Cold-start: load marketplace plugins in bypass mode (sandbox: false).
|
|
1199
|
+
*
|
|
1200
|
+
* Each active marketplace bundle is read, evaluated via data URL, adapted
|
|
1201
|
+
* with adaptSandboxEntry, and returned as a ResolvedPlugin. The caller is
|
|
1202
|
+
* responsible for merging these into allPipelinePlugins / configuredPlugins
|
|
1203
|
+
* BEFORE the hook pipeline is created, so hooks and routes register in
|
|
1204
|
+
* the trusted pipeline.
|
|
1205
|
+
*
|
|
1206
|
+
* Also caches manifest and route metadata so admin UI / getManifest() work.
|
|
1207
|
+
*
|
|
1208
|
+
* Returns ResolvedPlugins to be merged into the pipeline.
|
|
1209
|
+
*/
|
|
1210
|
+
static async loadMarketplacePluginsBypassed(db, storage) {
|
|
1211
|
+
const resolved = [];
|
|
1212
|
+
try {
|
|
1213
|
+
const marketplacePlugins = await new PluginStateRepository(db).getMarketplacePlugins();
|
|
1214
|
+
if (marketplacePlugins.length === 0) return resolved;
|
|
1215
|
+
console.info("EmDash: Sandbox disabled (sandbox: false). Marketplace plugins will run in-process without isolation.");
|
|
1216
|
+
const { adaptSandboxEntry } = await import("../plugins/adapt-sandbox-entry.mjs");
|
|
1217
|
+
for (const plugin of marketplacePlugins) {
|
|
1218
|
+
if (plugin.status !== "active") continue;
|
|
1219
|
+
const version = plugin.marketplaceVersion ?? plugin.version;
|
|
1220
|
+
try {
|
|
1221
|
+
const bundle = await loadBundleFromR2(storage, plugin.pluginId, version);
|
|
1222
|
+
if (!bundle) {
|
|
1223
|
+
console.warn(`EmDash: Marketplace plugin ${plugin.pluginId}@${version} not found in R2`);
|
|
1224
|
+
continue;
|
|
1225
|
+
}
|
|
1226
|
+
marketplaceManifestCache.set(plugin.pluginId, {
|
|
1227
|
+
id: bundle.manifest.id,
|
|
1228
|
+
version: bundle.manifest.version,
|
|
1229
|
+
admin: bundle.manifest.admin
|
|
1230
|
+
});
|
|
1231
|
+
if (bundle.manifest.routes.length > 0) {
|
|
1232
|
+
const routeMeta = /* @__PURE__ */ new Map();
|
|
1233
|
+
for (const entry of bundle.manifest.routes) {
|
|
1234
|
+
const normalized = normalizeManifestRoute(entry);
|
|
1235
|
+
routeMeta.set(normalized.name, { public: normalized.public === true });
|
|
1236
|
+
}
|
|
1237
|
+
sandboxedRouteMetaCache.set(plugin.pluginId, routeMeta);
|
|
1238
|
+
}
|
|
1239
|
+
const pluginModule = await import(`data:text/javascript;base64,${Buffer.from(bundle.backendCode).toString("base64")}`);
|
|
1240
|
+
const adapted = adaptSandboxEntry(pluginModule.default ?? pluginModule, {
|
|
1241
|
+
id: bundle.manifest.id,
|
|
1242
|
+
version: bundle.manifest.version,
|
|
1243
|
+
entrypoint: "",
|
|
1244
|
+
capabilities: bundle.manifest.capabilities ?? [],
|
|
1245
|
+
allowedHosts: bundle.manifest.allowedHosts ?? [],
|
|
1246
|
+
storage: bundle.manifest.storage ?? {},
|
|
1247
|
+
adminPages: bundle.manifest.admin?.pages,
|
|
1248
|
+
adminWidgets: bundle.manifest.admin?.widgets?.map((w) => ({
|
|
1249
|
+
id: w.id,
|
|
1250
|
+
title: w.title,
|
|
1251
|
+
size: w.size === "full" || w.size === "half" || w.size === "third" ? w.size : void 0
|
|
1252
|
+
}))
|
|
1253
|
+
});
|
|
1254
|
+
resolved.push(adapted);
|
|
1255
|
+
console.log(`EmDash: Loaded marketplace plugin ${plugin.pluginId}@${version} in-process (sandbox bypassed)`);
|
|
1256
|
+
} catch (error) {
|
|
1257
|
+
console.error(`EmDash: Failed to load marketplace plugin ${plugin.pluginId} in-process:`, error);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
} catch {}
|
|
1261
|
+
return resolved;
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
985
1264
|
* Resolve exclusive hook selections on startup.
|
|
986
1265
|
*
|
|
987
1266
|
* Delegates to the shared resolveExclusiveHooks() in hooks.ts.
|
|
@@ -1259,7 +1538,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1259
1538
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(body.data, collection, true)).content;
|
|
1260
1539
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, true);
|
|
1261
1540
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1262
|
-
const { validateContentData } = await import("../validation-
|
|
1541
|
+
const { validateContentData } = await import("../validation-DKHhXjPr.mjs");
|
|
1263
1542
|
const validation = await validateContentData(this.db, collection, processedData, { partial: false });
|
|
1264
1543
|
if (!validation.ok) return {
|
|
1265
1544
|
success: false,
|
|
@@ -1275,7 +1554,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1275
1554
|
return result;
|
|
1276
1555
|
}
|
|
1277
1556
|
async handleContentUpdate(collection, id, body) {
|
|
1278
|
-
const { ContentRepository } = await import("../content-
|
|
1557
|
+
const { ContentRepository } = await import("../content-C0ooIs-f.mjs").then((n) => n.n);
|
|
1279
1558
|
const repo = new ContentRepository(this.db);
|
|
1280
1559
|
const resolvedItem = await repo.findByIdOrSlug(collection, id);
|
|
1281
1560
|
const resolvedId = resolvedItem?.id ?? id;
|
|
@@ -1302,7 +1581,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1302
1581
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(bodyWithoutRev.data, collection, false)).content;
|
|
1303
1582
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, false);
|
|
1304
1583
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1305
|
-
const { validateContentData } = await import("../validation-
|
|
1584
|
+
const { validateContentData } = await import("../validation-DKHhXjPr.mjs");
|
|
1306
1585
|
const validation = await validateContentData(this.db, collection, processedData, { partial: true });
|
|
1307
1586
|
if (!validation.ok) return {
|
|
1308
1587
|
success: false,
|
|
@@ -1888,14 +2167,16 @@ function getPlugins() {
|
|
|
1888
2167
|
* Build runtime dependencies from virtual modules
|
|
1889
2168
|
*/
|
|
1890
2169
|
function buildDependencies(config) {
|
|
2170
|
+
const sandboxModule = virtualSandboxRunnerModule;
|
|
1891
2171
|
return {
|
|
1892
2172
|
config,
|
|
1893
2173
|
plugins: getPlugins(),
|
|
1894
2174
|
createDialect,
|
|
1895
2175
|
createStorage,
|
|
1896
|
-
sandboxEnabled,
|
|
2176
|
+
sandboxEnabled: sandboxModule.sandboxEnabled,
|
|
2177
|
+
sandboxBypassed: sandboxModule.sandboxBypassed ?? false,
|
|
1897
2178
|
sandboxedPluginEntries: sandboxedPlugins || [],
|
|
1898
|
-
createSandboxRunner,
|
|
2179
|
+
createSandboxRunner: sandboxModule.createSandboxRunner,
|
|
1899
2180
|
mediaProviderEntries: mediaProviders || []
|
|
1900
2181
|
};
|
|
1901
2182
|
}
|
|
@@ -2027,7 +2308,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
2027
2308
|
if (!setupVerified) {
|
|
2028
2309
|
const t0 = performance.now();
|
|
2029
2310
|
try {
|
|
2030
|
-
const { getDb } = await import("../loader-
|
|
2311
|
+
const { getDb } = await import("../loader-Chm5h7Gr.mjs").then((n) => n.i);
|
|
2031
2312
|
await (await getDb()).selectFrom("_emdash_migrations").selectAll().limit(1).execute();
|
|
2032
2313
|
setupVerified = true;
|
|
2033
2314
|
} catch {
|
|
@@ -2164,6 +2445,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
2164
2445
|
getManifest: runtime.getManifest.bind(runtime),
|
|
2165
2446
|
invalidateUrlPatternCache,
|
|
2166
2447
|
getSandboxRunner: runtime.getSandboxRunner.bind(runtime),
|
|
2448
|
+
isSandboxBypassed: runtime.isSandboxBypassed.bind(runtime),
|
|
2167
2449
|
syncMarketplacePlugins: runtime.syncMarketplacePlugins.bind(runtime),
|
|
2168
2450
|
syncRegistryPlugins: runtime.syncRegistryPlugins.bind(runtime),
|
|
2169
2451
|
setPluginStatus: runtime.setPluginStatus.bind(runtime)
|