emdash 0.30.0 → 0.31.1
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/api/route-utils.mjs +13 -13
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-b8WIiGU4.mjs → api-BkqFzIu4.mjs} +23 -23
- package/dist/api-BkqFzIu4.mjs.map +1 -0
- package/dist/{apply-CmIJK9j8.mjs → apply-DuXsqll7.mjs} +26 -25
- package/dist/apply-DuXsqll7.mjs.map +1 -0
- package/dist/astro/index.d.mts +2 -2
- package/dist/astro/index.mjs +1 -1
- package/dist/astro/middleware/auth.d.mts +2 -2
- package/dist/astro/middleware/auth.mjs +2 -2
- package/dist/astro/middleware/redirect.mjs +5 -5
- package/dist/astro/middleware/request-context.mjs +1 -1
- package/dist/astro/middleware.d.mts +2 -2
- package/dist/astro/middleware.mjs +146 -70
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +6 -6
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +2 -2
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +7 -7
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +7 -7
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +7 -7
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +14 -14
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +14 -14
- package/dist/astro/routes/api/admin/bylines/index.d.mts.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +18 -17
- 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 +9 -9
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
- 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/media-usage/repair.mjs +10 -10
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/index.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/updates.mjs +34 -34
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +34 -34
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +34 -34
- 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 +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +6 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/register-options.mjs +6 -6
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +7 -7
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +7 -7
- package/dist/astro/routes/api/auth/mode.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/verify.mjs +6 -6
- package/dist/astro/routes/api/auth/signup/complete.mjs +6 -6
- package/dist/astro/routes/api/auth/signup/request.mjs +7 -7
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +10 -10
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +10 -10
- 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_/duplicate.mjs +3 -3
- 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 +7 -7
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/authors.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/index.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
- package/dist/astro/routes/api/dashboard.mjs +7 -7
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/import/probe.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +2 -2
- package/dist/astro/routes/api/import/wordpress/execute.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/media.d.mts +2 -2
- package/dist/astro/routes/api/import/wordpress/media.mjs +7 -7
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +2 -2
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +2 -2
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +19 -19
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/mcp.mjs +39 -39
- package/dist/astro/routes/api/media/_id_/confirm.mjs +7 -7
- package/dist/astro/routes/api/media/_id_/usage.mjs +11 -11
- package/dist/astro/routes/api/media/_id_.mjs +10 -10
- 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.mjs +10 -10
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/items.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/translations.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_.mjs +8 -8
- package/dist/astro/routes/api/menus/index.mjs +8 -8
- package/dist/astro/routes/api/oauth/authorize.d.mts.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +23 -9
- package/dist/astro/routes/api/oauth/authorize.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/device/authorize.mjs +3 -3
- package/dist/astro/routes/api/oauth/device/code.mjs +4 -4
- package/dist/astro/routes/api/oauth/device/token.mjs +4 -4
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +3 -3
- package/dist/astro/routes/api/oauth/token/revoke.mjs +3 -3
- package/dist/astro/routes/api/oauth/token.mjs +2 -2
- package/dist/astro/routes/api/openapi.json.mjs +4 -4
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +10 -10
- package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
- package/dist/astro/routes/api/redirects/_id_.mjs +11 -11
- package/dist/astro/routes/api/redirects/index.mjs +11 -11
- package/dist/astro/routes/api/relations/_id_/index.mjs +14 -14
- package/dist/astro/routes/api/relations/_id_/translations.mjs +10 -10
- package/dist/astro/routes/api/relations/index.mjs +14 -14
- 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 +34 -34
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +34 -34
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +34 -34
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +34 -34
- package/dist/astro/routes/api/schema/collections/index.mjs +34 -34
- package/dist/astro/routes/api/schema/index.mjs +8 -8
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +34 -34
- package/dist/astro/routes/api/schema/orphans/index.mjs +34 -34
- package/dist/astro/routes/api/search/enable.mjs +11 -11
- package/dist/astro/routes/api/search/index.mjs +10 -10
- package/dist/astro/routes/api/search/rebuild.mjs +11 -11
- package/dist/astro/routes/api/search/stats.mjs +7 -7
- package/dist/astro/routes/api/search/suggest.mjs +10 -10
- package/dist/astro/routes/api/sections/_slug_.mjs +10 -10
- package/dist/astro/routes/api/sections/index.mjs +10 -10
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/export.mjs +4 -4
- package/dist/astro/routes/api/settings/backups/index.mjs +5 -5
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings.mjs +12 -12
- package/dist/astro/routes/api/setup/admin-verify.mjs +6 -6
- package/dist/astro/routes/api/setup/admin.mjs +6 -6
- package/dist/astro/routes/api/setup/dev-bypass.mjs +18 -18
- 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 +3 -3
- package/dist/astro/routes/api/snapshot.mjs +4 -4
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/index.mjs +13 -13
- package/dist/astro/routes/api/themes/preview.mjs +4 -4
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +7 -7
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +10 -10
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +10 -10
- package/dist/astro/routes/api/widget-areas/_name_.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/index.mjs +10 -10
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +5 -5
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +7 -7
- package/dist/astro/routes/sitemap.xml.mjs +5 -5
- package/dist/astro/types.d.mts +2 -2
- package/dist/{authorize-WxsiePzy.mjs → authorize-6WPZa1xZ.mjs} +2 -2
- package/dist/{authorize-WxsiePzy.mjs.map → authorize-6WPZa1xZ.mjs.map} +1 -1
- package/dist/{backup-S8kFWtwD.mjs → backup-DoW-H0r4.mjs} +2 -2
- package/dist/{backup-S8kFWtwD.mjs.map → backup-DoW-H0r4.mjs.map} +1 -1
- package/dist/{byline-XEjchwzZ.mjs → byline-BTOxUlFF.mjs} +6 -6
- package/dist/{byline-XEjchwzZ.mjs.map → byline-BTOxUlFF.mjs.map} +1 -1
- package/dist/{bylines-czseViYo.mjs → bylines-Bc-3xtpz.mjs} +6 -6
- package/dist/{bylines-czseViYo.mjs.map → bylines-Bc-3xtpz.mjs.map} +1 -1
- package/dist/{bylines-BJbT4gKS.mjs → bylines-oVN0iPwX.mjs} +12 -8
- package/dist/bylines-oVN0iPwX.mjs.map +1 -0
- package/dist/{cache-CGCd6AVM.mjs → cache-DDwy3JDW.mjs} +2 -2
- package/dist/{cache-CGCd6AVM.mjs.map → cache-DDwy3JDW.mjs.map} +1 -1
- package/dist/{chunks-BxXyunY-.mjs → chunks-Bq-5DPrD.mjs} +2 -2
- package/dist/{chunks-BxXyunY-.mjs.map → chunks-Bq-5DPrD.mjs.map} +1 -1
- package/dist/cli/index.mjs +18 -18
- package/dist/{comment-DPT0WKyd.mjs → comment-B9cUud8H.mjs} +2 -2
- package/dist/{comment-DPT0WKyd.mjs.map → comment-B9cUud8H.mjs.map} +1 -1
- package/dist/{comment-reaction-C65MldIB.mjs → comment-reaction-VUXO981F.mjs} +2 -2
- package/dist/{comment-reaction-C65MldIB.mjs.map → comment-reaction-VUXO981F.mjs.map} +1 -1
- package/dist/{comments-Bz6sCbgD.mjs → comments-PXj1E9Si.mjs} +3 -3
- package/dist/{comments-Bz6sCbgD.mjs.map → comments-PXj1E9Si.mjs.map} +1 -1
- package/dist/{config-CVssduLe.mjs → config-B6b_BobR.mjs} +6 -2
- package/dist/config-B6b_BobR.mjs.map +1 -0
- package/dist/{content-Ci04z2z-.mjs → content-BC43pICM.mjs} +4 -4
- package/dist/{content-Ci04z2z-.mjs.map → content-BC43pICM.mjs.map} +1 -1
- package/dist/{content-refresh-D4khvC0R.mjs → content-refresh-CPMSauD3.mjs} +4 -4
- package/dist/{content-refresh-D4khvC0R.mjs.map → content-refresh-CPMSauD3.mjs.map} +1 -1
- package/dist/{context-B6hc7zJL.mjs → context-DOurRIrb.mjs} +10 -10
- package/dist/{context-B6hc7zJL.mjs.map → context-DOurRIrb.mjs.map} +1 -1
- package/dist/{dashboard-C5NkXFbi.mjs → dashboard-CBm4zhc3.mjs} +4 -4
- package/dist/{dashboard-C5NkXFbi.mjs.map → dashboard-CBm4zhc3.mjs.map} +1 -1
- package/dist/database/pg-migration-lock.d.mts.map +1 -1
- package/dist/database/pg-migration-lock.mjs +1 -4
- package/dist/database/pg-migration-lock.mjs.map +1 -1
- package/dist/db/index.mjs +2 -2
- package/dist/{dialect-helpers-HxEQGl_1.mjs → dialect-helpers-BtOwo2us.mjs} +4 -4
- package/dist/dialect-helpers-BtOwo2us.mjs.map +1 -0
- package/dist/{error-CEGF6UZb.mjs → error-DJ98TRbQ.mjs} +2 -2
- package/dist/{error-CEGF6UZb.mjs.map → error-DJ98TRbQ.mjs.map} +1 -1
- package/dist/{field-defs-cache-DvmlgP-D.mjs → field-defs-cache-KfNJ_qLQ.mjs} +2 -2
- package/dist/{field-defs-cache-DvmlgP-D.mjs.map → field-defs-cache-KfNJ_qLQ.mjs.map} +1 -1
- package/dist/{fts-manager-DzqIBrrW.mjs → fts-manager-hyCU9OOp.mjs} +3 -3
- package/dist/{fts-manager-DzqIBrrW.mjs.map → fts-manager-hyCU9OOp.mjs.map} +1 -1
- package/dist/{hreflang-db2Tpb2o.mjs → hreflang-CbYeCzl9.mjs} +7 -7
- package/dist/{hreflang-db2Tpb2o.mjs.map → hreflang-CbYeCzl9.mjs.map} +1 -1
- package/dist/{import-Dmkm8S1W.mjs → import-oDYCgNYQ.mjs} +2 -2
- package/dist/{import-Dmkm8S1W.mjs.map → import-oDYCgNYQ.mjs.map} +1 -1
- package/dist/{index-wYnC6u4o.d.mts → index-BZJ_5FOX.d.mts} +50 -4
- package/dist/index-BZJ_5FOX.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +48 -48
- package/dist/{load-Cx27ki1l.mjs → load-Dg5gtWma.mjs} +2 -2
- package/dist/{load-Cx27ki1l.mjs.map → load-Dg5gtWma.mjs.map} +1 -1
- package/dist/{loader-Be3ouI5L.mjs → loader-D4rigvjR.mjs} +4 -4
- package/dist/{loader-Be3ouI5L.mjs.map → loader-D4rigvjR.mjs.map} +1 -1
- package/dist/media/local-runtime.d.mts +2 -2
- package/dist/media/local-runtime.mjs +5 -5
- package/dist/{media-kIV1IxFf.mjs → media-BJ6SRY3g.mjs} +8 -4
- package/dist/media-BJ6SRY3g.mjs.map +1 -0
- package/dist/{media-BjhhENaJ.mjs → media-its1WLYv.mjs} +2 -2
- package/dist/{media-BjhhENaJ.mjs.map → media-its1WLYv.mjs.map} +1 -1
- package/dist/{media-upload-D2wk3EIt.mjs → media-upload-DNu3QySc.mjs} +4 -4
- package/dist/{media-upload-D2wk3EIt.mjs.map → media-upload-DNu3QySc.mjs.map} +1 -1
- package/dist/{media-usage-CljdO1mc.mjs → media-usage-DPQ3K4xB.mjs} +6 -6
- package/dist/{media-usage-CljdO1mc.mjs.map → media-usage-DPQ3K4xB.mjs.map} +1 -1
- package/dist/{menus-CZyG6rvx.mjs → menus-BMGzWyWH.mjs} +15 -8
- package/dist/menus-BMGzWyWH.mjs.map +1 -0
- package/dist/{menus-BcyElFtI.mjs → menus-CPf_SW7u.mjs} +86 -8
- package/dist/menus-CPf_SW7u.mjs.map +1 -0
- package/dist/{parse-C_-6klII.mjs → parse-53zyxlpv.mjs} +2 -2
- package/dist/{parse-C_-6klII.mjs.map → parse-53zyxlpv.mjs.map} +1 -1
- package/dist/plugin-utils.d.mts +2 -2
- package/dist/plugins/adapt-sandbox-entry.d.mts +2 -2
- package/dist/{query-DR73ZNfm.mjs → query-Bz9bWZfm.mjs} +14 -14
- package/dist/{query-DR73ZNfm.mjs.map → query-Bz9bWZfm.mjs.map} +1 -1
- package/dist/{query-Di7DOmPV.mjs → query-DdFGHzQF.mjs} +3 -3
- package/dist/{query-Di7DOmPV.mjs.map → query-DdFGHzQF.mjs.map} +1 -1
- package/dist/{rate-limit-CMj83JNW.mjs → rate-limit-D3IEiUi2.mjs} +2 -2
- package/dist/{rate-limit-CMj83JNW.mjs.map → rate-limit-D3IEiUi2.mjs.map} +1 -1
- package/dist/{redirect-CgLPYflR.mjs → redirect-BoUac4NT.mjs} +3 -3
- package/dist/{redirect-CgLPYflR.mjs.map → redirect-BoUac4NT.mjs.map} +1 -1
- package/dist/{redirects-B7t9bKsL.mjs → redirects-ChbpqKiS.mjs} +3 -3
- package/dist/{redirects-B7t9bKsL.mjs.map → redirects-ChbpqKiS.mjs.map} +1 -1
- package/dist/{redirects-BBq3n2Rj.mjs → redirects-D457qwt0.mjs} +8 -8
- package/dist/redirects-D457qwt0.mjs.map +1 -0
- package/dist/{registry-FV15nLge.mjs → registry-y21kjhfG.mjs} +6 -6
- package/dist/{registry-FV15nLge.mjs.map → registry-y21kjhfG.mjs.map} +1 -1
- package/dist/{relation-9M9j_UWo.mjs → relation-Du0r04E0.mjs} +3 -3
- package/dist/{relation-9M9j_UWo.mjs.map → relation-Du0r04E0.mjs.map} +1 -1
- package/dist/{relations-5_avdrN_.mjs → relations-CZMpBqEd.mjs} +3 -3
- package/dist/{relations-5_avdrN_.mjs.map → relations-CZMpBqEd.mjs.map} +1 -1
- package/dist/{relations-BKvO39-9.mjs → relations-DtX1UMBH.mjs} +13 -7
- package/dist/relations-DtX1UMBH.mjs.map +1 -0
- package/dist/{relations-Bh8jlFsU.d.mts → relations-qKmSj9KM.d.mts} +27 -23
- package/dist/relations-qKmSj9KM.d.mts.map +1 -0
- package/dist/{resolve-Cd9dzclN.mjs → resolve-DFr4kq72.mjs} +2 -2
- package/dist/{resolve-Cd9dzclN.mjs.map → resolve-DFr4kq72.mjs.map} +1 -1
- package/dist/{runner-DfnZ5eUr.mjs → runner-BdeLEgad.mjs} +3 -3
- package/dist/{runner-DfnZ5eUr.mjs.map → runner-BdeLEgad.mjs.map} +1 -1
- package/dist/runtime.d.mts +2 -2
- package/dist/runtime.mjs +3 -3
- package/dist/{schema-BXxlHeAf.mjs → schema-BH8P8vaC.mjs} +3 -3
- package/dist/{schema-BXxlHeAf.mjs.map → schema-BH8P8vaC.mjs.map} +1 -1
- package/dist/{scopes-Bl4IwHA-.mjs → scopes-DTIkIaGA.mjs} +2 -2
- package/dist/{scopes-Bl4IwHA-.mjs.map → scopes-DTIkIaGA.mjs.map} +1 -1
- package/dist/{search-Bff-7jFt.mjs → search-D-Yhpmvs.mjs} +8 -7
- package/dist/search-D-Yhpmvs.mjs.map +1 -0
- package/dist/{secrets-CSwQIl4q.mjs → secrets-CQ-69kF9.mjs} +23 -17
- package/dist/secrets-CQ-69kF9.mjs.map +1 -0
- package/dist/{sections-CwW4s1al.mjs → sections-CzVBAKjw.mjs} +3 -3
- package/dist/{sections-CwW4s1al.mjs.map → sections-CzVBAKjw.mjs.map} +1 -1
- package/dist/seed/index.mjs +16 -16
- package/dist/seo/index.mjs +12 -12
- package/dist/{seo-2cmFHZns.mjs → seo-kJzVAmmu.mjs} +2 -2
- package/dist/{seo-2cmFHZns.mjs.map → seo-kJzVAmmu.mjs.map} +1 -1
- package/dist/{service-DkGTWGIi.mjs → service-CQnc276a.mjs} +2 -2
- package/dist/{service-DkGTWGIi.mjs.map → service-CQnc276a.mjs.map} +1 -1
- package/dist/{settings-CpA4lQFt.mjs → settings-C2PaBS49.mjs} +3 -3
- package/dist/{settings-CpA4lQFt.mjs.map → settings-C2PaBS49.mjs.map} +1 -1
- package/dist/{settings-C4s8hFQm.mjs → settings-Dtc0DU31.mjs} +3 -3
- package/dist/{settings-C4s8hFQm.mjs.map → settings-Dtc0DU31.mjs.map} +1 -1
- package/dist/{taxonomies-Ce49uIzY.mjs → taxonomies-BN6M9Nrv.mjs} +26 -17
- package/dist/taxonomies-BN6M9Nrv.mjs.map +1 -0
- package/dist/{taxonomies-DjSKBZpq.mjs → taxonomies-r7pqLBCn.mjs} +53 -24
- package/dist/taxonomies-r7pqLBCn.mjs.map +1 -0
- package/dist/{taxonomy-DfVooU4W.mjs → taxonomy-0mCI25HN.mjs} +3 -3
- package/dist/{taxonomy-DfVooU4W.mjs.map → taxonomy-0mCI25HN.mjs.map} +1 -1
- package/dist/{types-D1iJ3DpO.mjs → types-CrRUFdej.mjs} +2 -2
- package/dist/{types-D1iJ3DpO.mjs.map → types-CrRUFdej.mjs.map} +1 -1
- package/dist/{user-Bh-L1qo6.mjs → user-aTXqmXBz.mjs} +3 -3
- package/dist/{user-Bh-L1qo6.mjs.map → user-aTXqmXBz.mjs.map} +1 -1
- package/dist/{validate-V9nCwq_-.mjs → validate-CDT1jl6_.mjs} +11 -6
- package/dist/validate-CDT1jl6_.mjs.map +1 -0
- package/dist/validate-DULfgpJP.d.mts.map +1 -1
- package/dist/{validation-BsVUJfsP.mjs → validation-DlD0E35W.mjs} +8 -8
- package/dist/{validation-BsVUJfsP.mjs.map → validation-DlD0E35W.mjs.map} +1 -1
- package/dist/version-BRMngh9I.mjs +7 -0
- package/dist/{version-907opKac.mjs.map → version-BRMngh9I.mjs.map} +1 -1
- package/dist/{widgets-DGv1Z04V.mjs → widgets-5fipNkMT.mjs} +2 -2
- package/dist/{widgets-DGv1Z04V.mjs.map → widgets-5fipNkMT.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-Cs1N6O8z.mjs → wxr-taxonomies-DrihupaC.mjs} +4 -4
- package/dist/{wxr-taxonomies-Cs1N6O8z.mjs.map → wxr-taxonomies-DrihupaC.mjs.map} +1 -1
- package/dist/{zod-generator-B5prQ5M4.mjs → zod-generator-CwkHWz4f.mjs} +2 -2
- package/dist/{zod-generator-B5prQ5M4.mjs.map → zod-generator-CwkHWz4f.mjs.map} +1 -1
- package/package.json +7 -7
- package/src/api/handlers/bylines.ts +5 -4
- package/src/api/handlers/content.ts +25 -7
- package/src/api/handlers/menus.ts +11 -6
- package/src/api/handlers/relations.ts +7 -2
- package/src/api/handlers/taxonomies.ts +22 -14
- package/src/api/schemas/bylines.ts +4 -4
- package/src/api/schemas/common.ts +7 -6
- package/src/api/schemas/menus.ts +2 -1
- package/src/api/schemas/relations.ts +3 -1
- package/src/api/schemas/taxonomies.ts +4 -2
- package/src/astro/prefetch.ts +7 -2
- package/src/astro/routes/api/admin/bylines/index.ts +5 -8
- package/src/astro/routes/api/oauth/authorize.ts +42 -10
- package/src/components/Gallery.astro +141 -26
- package/src/components/widgets/Categories.astro +1 -1
- package/src/components/widgets/Tags.astro +1 -1
- package/src/config/secrets.ts +25 -19
- package/src/content/converters/gallery.ts +61 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +19 -0
- package/src/content/converters/prosemirror-to-portable-text.ts +18 -0
- package/src/content/converters/types.ts +36 -0
- package/src/database/dialect-helpers.ts +3 -4
- package/src/database/pg-migration-lock.ts +1 -4
- package/src/emdash-runtime.ts +55 -17
- package/src/i18n/config.ts +8 -0
- package/src/i18n/repair-locale-casing.ts +51 -0
- package/src/search/query.ts +3 -2
- package/src/seed/apply.ts +9 -7
- package/src/seed/validate.ts +15 -4
- package/src/taxonomies/index.ts +64 -23
- package/dist/api-b8WIiGU4.mjs.map +0 -1
- package/dist/apply-CmIJK9j8.mjs.map +0 -1
- package/dist/bylines-BJbT4gKS.mjs.map +0 -1
- package/dist/config-CVssduLe.mjs.map +0 -1
- package/dist/dialect-helpers-HxEQGl_1.mjs.map +0 -1
- package/dist/index-wYnC6u4o.d.mts.map +0 -1
- package/dist/media-kIV1IxFf.mjs.map +0 -1
- package/dist/menus-BcyElFtI.mjs.map +0 -1
- package/dist/menus-CZyG6rvx.mjs.map +0 -1
- package/dist/redirects-BBq3n2Rj.mjs.map +0 -1
- package/dist/relations-BKvO39-9.mjs.map +0 -1
- package/dist/relations-Bh8jlFsU.d.mts.map +0 -1
- package/dist/search-Bff-7jFt.mjs.map +0 -1
- package/dist/secrets-CSwQIl4q.mjs.map +0 -1
- package/dist/taxonomies-Ce49uIzY.mjs.map +0 -1
- package/dist/taxonomies-DjSKBZpq.mjs.map +0 -1
- package/dist/validate-V9nCwq_-.mjs.map +0 -1
- package/dist/version-907opKac.mjs +0 -7
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { a as runMigrations, n as MIGRATION_RACE_WAIT_MS, t as ConcurrentMigrationTimeoutError } from "../runner-
|
|
1
|
+
import { a as runMigrations, n as MIGRATION_RACE_WAIT_MS, t as ConcurrentMigrationTimeoutError } from "../runner-BdeLEgad.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
|
|
3
|
-
import { s as isSqlite } from "../dialect-helpers-
|
|
4
|
-
import {
|
|
5
|
-
import { E as AuditRepository, _ as createHookPipeline, h as EmailPipeline, m as buildRouteMeta, p as PluginRouteRegistry, t as getMenu, v as resolveExclusiveHooks, y as definePlugin } from "../menus-
|
|
3
|
+
import { c as listTablesLike, s as isSqlite } from "../dialect-helpers-BtOwo2us.mjs";
|
|
4
|
+
import { a as setI18nConfig, n as getI18nConfig } from "../config-B6b_BobR.mjs";
|
|
5
|
+
import { E as AuditRepository, _ as createHookPipeline, h as EmailPipeline, m as buildRouteMeta, p as PluginRouteRegistry, t as getMenu, v as resolveExclusiveHooks, y as definePlugin } from "../menus-CPf_SW7u.mjs";
|
|
6
6
|
import { t as after } from "../after-B1IIdH3Y.mjs";
|
|
7
7
|
import { createRequestMetrics, getRequestContext, runWithContext } from "../request-context.mjs";
|
|
8
8
|
import "../object-cache-Bok5j2ae.mjs";
|
|
9
|
-
import { r as RevisionRepository, t as ContentRepository } from "../content-
|
|
9
|
+
import { r as RevisionRepository, t as ContentRepository } from "../content-BC43pICM.mjs";
|
|
10
10
|
import { n as isMissingTableError } from "../db-errors-CcWLaRiR.mjs";
|
|
11
11
|
import "../base64-B-PsqheR.mjs";
|
|
12
|
-
import "../types-
|
|
13
|
-
import { t as MediaRepository } from "../media-
|
|
14
|
-
import "../user-
|
|
15
|
-
import "../taxonomy-
|
|
16
|
-
import "../comment-
|
|
12
|
+
import "../types-CrRUFdej.mjs";
|
|
13
|
+
import { t as MediaRepository } from "../media-its1WLYv.mjs";
|
|
14
|
+
import "../user-aTXqmXBz.mjs";
|
|
15
|
+
import "../taxonomy-0mCI25HN.mjs";
|
|
16
|
+
import "../comment-B9cUud8H.mjs";
|
|
17
17
|
import { t as OptionsRepository } from "../options-BlmBHTvX.mjs";
|
|
18
|
-
import { r as createSiteInfo } from "../context-
|
|
19
|
-
import "../menus-
|
|
20
|
-
import "../redirect-
|
|
18
|
+
import { r as createSiteInfo } from "../context-DOurRIrb.mjs";
|
|
19
|
+
import "../menus-BMGzWyWH.mjs";
|
|
20
|
+
import "../redirect-BoUac4NT.mjs";
|
|
21
21
|
import { i as setRequestCacheEntry, r as requestCached } from "../request-cache-BSUptuJR.mjs";
|
|
22
22
|
import "../byline-registry-BCuOp4UF.mjs";
|
|
23
23
|
import { n as initWithLock, t as createInitLock } from "../init-lock-DJkX6Hto.mjs";
|
|
24
|
-
import "../field-defs-cache-
|
|
25
|
-
import "../byline-
|
|
26
|
-
import "../relation-
|
|
24
|
+
import "../field-defs-cache-KfNJ_qLQ.mjs";
|
|
25
|
+
import "../byline-BTOxUlFF.mjs";
|
|
26
|
+
import "../relation-Du0r04E0.mjs";
|
|
27
27
|
import { n as normalizeMediaValue } from "../normalize-C-SHXmra.mjs";
|
|
28
28
|
import "../enrich-CFJJgxs_.mjs";
|
|
29
|
-
import "../seo-
|
|
30
|
-
import { t as FTSManager } from "../fts-manager-
|
|
31
|
-
import "../resolve-
|
|
29
|
+
import "../seo-kJzVAmmu.mjs";
|
|
30
|
+
import { t as FTSManager } from "../fts-manager-hyCU9OOp.mjs";
|
|
31
|
+
import "../resolve-DFr4kq72.mjs";
|
|
32
32
|
import { createRecorder, flushRecorder, isInstrumentationEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
33
|
-
import { a as getDb } from "../loader-
|
|
34
|
-
import { a as getTaxonomyDefs, o as getTaxonomyTerms } from "../taxonomies-
|
|
35
|
-
import { $ as handleContentDiscardDraft, B as handleMediaGet, G as handleRevisionRestore, H as handleMediaUpdate, J as handleContentCompare, Q as handleContentDelete, R as handleMediaCreate, U as handleRevisionGet, V as handleMediaList, W as handleRevisionList, X as handleContentCountTrashed, Y as handleContentCountScheduled, Z as handleContentCreate, _ as loadBundleFromR2, at as handleContentPermanentDelete, ct as handleContentSchedule, dt as handleContentUnschedule, et as handleContentDuplicate, ft as handleContentUpdate, it as handleContentListTrashed, lt as handleContentTranslations, nt as handleContentGetIncludingTrashed, ot as handleContentPublish, pt as validateRev, q as handleContentAuthors, rt as handleContentList, s as normalizeRegistryConfig, st as handleContentRestore, tt as handleContentGet, ut as handleContentUnpublish, z as handleMediaDelete } from "../api-
|
|
36
|
-
import "../dashboard-
|
|
33
|
+
import { a as getDb } from "../loader-D4rigvjR.mjs";
|
|
34
|
+
import { a as getTaxonomyDefs, o as getTaxonomyTerms } from "../taxonomies-r7pqLBCn.mjs";
|
|
35
|
+
import { $ as handleContentDiscardDraft, B as handleMediaGet, G as handleRevisionRestore, H as handleMediaUpdate, J as handleContentCompare, Q as handleContentDelete, R as handleMediaCreate, U as handleRevisionGet, V as handleMediaList, W as handleRevisionList, X as handleContentCountTrashed, Y as handleContentCountScheduled, Z as handleContentCreate, _ as loadBundleFromR2, at as handleContentPermanentDelete, ct as handleContentSchedule, dt as handleContentUnschedule, et as handleContentDuplicate, ft as handleContentUpdate, it as handleContentListTrashed, lt as handleContentTranslations, nt as handleContentGetIncludingTrashed, ot as handleContentPublish, pt as validateRev, q as handleContentAuthors, rt as handleContentList, s as normalizeRegistryConfig, st as handleContentRestore, tt as handleContentGet, ut as handleContentUnpublish, z as handleMediaDelete } from "../api-BkqFzIu4.mjs";
|
|
36
|
+
import "../dashboard-CBm4zhc3.mjs";
|
|
37
37
|
import { n as hashString } from "../hash-DFFrkivP.mjs";
|
|
38
|
-
import { a as findNonTranslatableSiblingContentIds, c as refreshContentMediaUsageAfterWrite, o as markContentMediaUsageCollectionStale, r as deleteContentMediaUsage } from "../content-refresh-
|
|
39
|
-
import "../media-usage-
|
|
40
|
-
import { n as SchemaRegistry } from "../registry-
|
|
41
|
-
import "../query-
|
|
42
|
-
import "../zod-generator-
|
|
43
|
-
import "../schema-
|
|
38
|
+
import { a as findNonTranslatableSiblingContentIds, c as refreshContentMediaUsageAfterWrite, o as markContentMediaUsageCollectionStale, r as deleteContentMediaUsage } from "../content-refresh-CPMSauD3.mjs";
|
|
39
|
+
import "../media-usage-DPQ3K4xB.mjs";
|
|
40
|
+
import { n as SchemaRegistry } from "../registry-y21kjhfG.mjs";
|
|
41
|
+
import "../query-DdFGHzQF.mjs";
|
|
42
|
+
import "../zod-generator-CwkHWz4f.mjs";
|
|
43
|
+
import "../schema-BH8P8vaC.mjs";
|
|
44
44
|
import "../seo-C3GDfT0V.mjs";
|
|
45
45
|
import { t as PluginStateRepository } from "../state-xxv6ZTMv.mjs";
|
|
46
|
-
import "../sections-
|
|
46
|
+
import "../sections-CzVBAKjw.mjs";
|
|
47
47
|
import { r as singleFlightCached, t as createSingleFlightCache } from "../single-flight-cache-C2exrGAi.mjs";
|
|
48
|
-
import { i as getSiteSettings, o as invalidateSiteSettingsCache } from "../settings-
|
|
49
|
-
import "../settings-
|
|
50
|
-
import "../taxonomies-
|
|
48
|
+
import { i as getSiteSettings, o as invalidateSiteSettingsCache } from "../settings-C2PaBS49.mjs";
|
|
49
|
+
import "../settings-Dtc0DU31.mjs";
|
|
50
|
+
import "../taxonomies-BN6M9Nrv.mjs";
|
|
51
51
|
import { r as normalizeManifestRoute } from "../manifest-schema-bCq54i7F.mjs";
|
|
52
52
|
import "../types-CK0LxPUQ.mjs";
|
|
53
53
|
import "../ssrf-CviKqWmq.mjs";
|
|
54
|
-
import "../error-
|
|
55
|
-
import "../parse-
|
|
56
|
-
import "../media-
|
|
57
|
-
import "../redirects-
|
|
58
|
-
import "../relations-
|
|
54
|
+
import "../error-DJ98TRbQ.mjs";
|
|
55
|
+
import "../parse-53zyxlpv.mjs";
|
|
56
|
+
import "../media-BJ6SRY3g.mjs";
|
|
57
|
+
import "../redirects-D457qwt0.mjs";
|
|
58
|
+
import "../relations-CZMpBqEd.mjs";
|
|
59
59
|
import "../status-COfycGIU.mjs";
|
|
60
|
-
import { a as invalidateUrlPatternCache } from "../query-
|
|
61
|
-
import "../import-
|
|
60
|
+
import { a as invalidateUrlPatternCache } from "../query-Bz9bWZfm.mjs";
|
|
61
|
+
import "../import-oDYCgNYQ.mjs";
|
|
62
62
|
import { t as getTrustedProxyHeaders } from "../trusted-proxy-CwjQj0YG.mjs";
|
|
63
63
|
import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-DzXYYI-n.mjs";
|
|
64
64
|
import "../ssrf-BB__xfNM.mjs";
|
|
@@ -67,20 +67,20 @@ import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from ".
|
|
|
67
67
|
import "../utils-BbUgmeZG.mjs";
|
|
68
68
|
import "../tokens-DVltpO2D.mjs";
|
|
69
69
|
import "../preview-D4Jnbfx7.mjs";
|
|
70
|
-
import "../hreflang-
|
|
71
|
-
import "../comment-reaction-
|
|
72
|
-
import "../bylines-
|
|
73
|
-
import { n as getWidgetAreas } from "../widgets-
|
|
74
|
-
import "../apply-
|
|
75
|
-
import "../load-
|
|
76
|
-
import "../search-
|
|
70
|
+
import "../hreflang-CbYeCzl9.mjs";
|
|
71
|
+
import "../comment-reaction-VUXO981F.mjs";
|
|
72
|
+
import "../bylines-Bc-3xtpz.mjs";
|
|
73
|
+
import { n as getWidgetAreas } from "../widgets-5fipNkMT.mjs";
|
|
74
|
+
import "../apply-DuXsqll7.mjs";
|
|
75
|
+
import "../load-Dg5gtWma.mjs";
|
|
76
|
+
import "../search-D-Yhpmvs.mjs";
|
|
77
77
|
import "../index.mjs";
|
|
78
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
78
|
+
import { n as VERSION, t as COMMIT } from "../version-BRMngh9I.mjs";
|
|
79
79
|
import { t as getAuthMode } from "../mode-fiXRMfeA.mjs";
|
|
80
80
|
import "../snapshot-BdpUJKD-.mjs";
|
|
81
|
-
import { u as maybeRunScheduledBackup } from "../backup-
|
|
81
|
+
import { u as maybeRunScheduledBackup } from "../backup-DoW-H0r4.mjs";
|
|
82
82
|
import { t as cleanupExpiredChallenges } from "../challenge-store-BFzgFRog.mjs";
|
|
83
|
-
import { a as validateEncryptionKeyAtStartup } from "../secrets-
|
|
83
|
+
import { a as validateEncryptionKeyAtStartup } from "../secrets-CQ-69kF9.mjs";
|
|
84
84
|
import { t as resolveSessionUser } from "../session-user-DbHqKDKe.mjs";
|
|
85
85
|
import { Kysely, sql } from "kysely";
|
|
86
86
|
import { z } from "zod";
|
|
@@ -96,6 +96,49 @@ import { createScheduler } from "virtual:emdash/scheduler";
|
|
|
96
96
|
import { createStorage } from "virtual:emdash/storage";
|
|
97
97
|
import { createKyselyAdapter } from "@emdash-cms/auth/adapters/kysely";
|
|
98
98
|
|
|
99
|
+
//#region src/i18n/repair-locale-casing.ts
|
|
100
|
+
/** Rewrite stored locales to the exact casing used by the site configuration. */
|
|
101
|
+
async function repairLocaleCasing(db, configuredLocales) {
|
|
102
|
+
const tableNames = await listTablesLike(db, "ec_%");
|
|
103
|
+
for (const tableName of tableNames) {
|
|
104
|
+
const table = sql.ref(tableName);
|
|
105
|
+
const slug = tableName.slice(3);
|
|
106
|
+
for (const locale of configuredLocales) {
|
|
107
|
+
await sql`
|
|
108
|
+
UPDATE ${table} AS target
|
|
109
|
+
SET locale = ${locale}
|
|
110
|
+
WHERE lower(target.locale) = lower(${locale})
|
|
111
|
+
AND target.locale != ${locale}
|
|
112
|
+
AND NOT EXISTS (
|
|
113
|
+
SELECT 1
|
|
114
|
+
FROM ${table} AS existing
|
|
115
|
+
WHERE existing.slug = target.slug AND existing.locale = ${locale}
|
|
116
|
+
)
|
|
117
|
+
AND target.id = (
|
|
118
|
+
SELECT MIN(candidate.id)
|
|
119
|
+
FROM ${table} AS candidate
|
|
120
|
+
WHERE candidate.slug = target.slug
|
|
121
|
+
AND lower(candidate.locale) = lower(${locale})
|
|
122
|
+
AND candidate.locale != ${locale}
|
|
123
|
+
)
|
|
124
|
+
`.execute(db);
|
|
125
|
+
await sql`
|
|
126
|
+
UPDATE content_taxonomies AS pivot
|
|
127
|
+
SET locale = ${locale}
|
|
128
|
+
WHERE pivot.collection = ${slug}
|
|
129
|
+
AND lower(pivot.locale) = lower(${locale})
|
|
130
|
+
AND pivot.locale != ${locale}
|
|
131
|
+
AND EXISTS (
|
|
132
|
+
SELECT 1
|
|
133
|
+
FROM ${table} AS content
|
|
134
|
+
WHERE content.id = pivot.entry_id AND content.locale = ${locale}
|
|
135
|
+
)
|
|
136
|
+
`.execute(db);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
//#endregion
|
|
99
142
|
//#region src/plugins/sandbox/runner-options.ts
|
|
100
143
|
/**
|
|
101
144
|
* Build platform sandbox options with the same normalized site context used
|
|
@@ -304,6 +347,11 @@ async function publishDueContent(db, options = {}) {
|
|
|
304
347
|
* Created once per worker lifetime, cached and reused across requests.
|
|
305
348
|
*/
|
|
306
349
|
const LEADING_SLASH_PATTERN = /^\//;
|
|
350
|
+
const LOCALE_CASING_REPAIR_OPTION = "emdash:repair_locale_casing";
|
|
351
|
+
function getLocaleCasingRepairVersion(locales) {
|
|
352
|
+
if (locales.length === 0) return null;
|
|
353
|
+
return `1:${locales.toSorted().join(",")}`;
|
|
354
|
+
}
|
|
307
355
|
/**
|
|
308
356
|
* Parse a JSON column expected to contain an array of strings.
|
|
309
357
|
*
|
|
@@ -901,6 +949,9 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
901
949
|
await phase("rt.secrets", "Validate encryption key", () => validateEncryptionKeyAtStartup());
|
|
902
950
|
const storage = EmDashRuntime.getStorage(deps);
|
|
903
951
|
let pluginStates = /* @__PURE__ */ new Map();
|
|
952
|
+
const configuredLocales = virtualConfig?.i18n?.locales ?? getI18nConfig()?.locales ?? [];
|
|
953
|
+
const localeCasingRepairVersion = getLocaleCasingRepairVersion(configuredLocales);
|
|
954
|
+
let storedLocaleCasingRepairVersion;
|
|
904
955
|
let siteInfo;
|
|
905
956
|
let seedGate = {
|
|
906
957
|
collectionCount: 1,
|
|
@@ -927,8 +978,10 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
927
978
|
const siteOpts = await optionsRepo.getMany([
|
|
928
979
|
"emdash:site_title",
|
|
929
980
|
"emdash:site_url",
|
|
930
|
-
"emdash:locale"
|
|
981
|
+
"emdash:locale",
|
|
982
|
+
LOCALE_CASING_REPAIR_OPTION
|
|
931
983
|
]);
|
|
984
|
+
storedLocaleCasingRepairVersion = siteOpts.get(LOCALE_CASING_REPAIR_OPTION);
|
|
932
985
|
return {
|
|
933
986
|
siteName: siteOpts.get("emdash:site_title") ?? void 0,
|
|
934
987
|
siteUrl: siteOpts.get("emdash:site_url") ?? void 0,
|
|
@@ -963,14 +1016,18 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
963
1016
|
} catch {}
|
|
964
1017
|
}));
|
|
965
1018
|
await Promise.all(coldStartReads);
|
|
1019
|
+
if (localeCasingRepairVersion && (configuredLocales.some((locale) => locale.includes("-") || locale !== locale.toLowerCase()) || storedLocaleCasingRepairVersion !== void 0) && storedLocaleCasingRepairVersion !== localeCasingRepairVersion) await phase("rt.locale", "Repair locale casing", async () => {
|
|
1020
|
+
await repairLocaleCasing(db, configuredLocales);
|
|
1021
|
+
await new OptionsRepository(db).set(LOCALE_CASING_REPAIR_OPTION, localeCasingRepairVersion);
|
|
1022
|
+
});
|
|
966
1023
|
if (seedGate.collectionCount === 0 && !seedGate.setupDone) {
|
|
967
1024
|
const seedKey = deps.config.database?.entrypoint ?? "default";
|
|
968
1025
|
const seedHolder = getSeedHolder();
|
|
969
1026
|
try {
|
|
970
1027
|
await initWithLock(seedHolder.lock, () => seedHolder.done.has(seedKey) ? true : void 0, async () => {
|
|
971
|
-
const { applySeed } = await import("../apply-
|
|
972
|
-
const { loadSeed } = await import("../load-
|
|
973
|
-
const { validateSeed } = await import("../validate-
|
|
1028
|
+
const { applySeed } = await import("../apply-DuXsqll7.mjs").then((n) => n.n);
|
|
1029
|
+
const { loadSeed } = await import("../load-Dg5gtWma.mjs").then((n) => n.r);
|
|
1030
|
+
const { validateSeed } = await import("../validate-CDT1jl6_.mjs").then((n) => n.n);
|
|
974
1031
|
const seed = await loadSeed();
|
|
975
1032
|
if (validateSeed(seed).valid) {
|
|
976
1033
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -1730,7 +1787,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1730
1787
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(body.data, collection, true)).content;
|
|
1731
1788
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, true);
|
|
1732
1789
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1733
|
-
const { validateContentData } = await import("../validation-
|
|
1790
|
+
const { validateContentData } = await import("../validation-DlD0E35W.mjs");
|
|
1734
1791
|
const validation = await validateContentData(this.db, collection, processedData, { partial: false });
|
|
1735
1792
|
if (!validation.ok) return {
|
|
1736
1793
|
success: false,
|
|
@@ -1747,7 +1804,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1747
1804
|
return result;
|
|
1748
1805
|
}
|
|
1749
1806
|
async handleContentUpdate(collection, id, body) {
|
|
1750
|
-
const { ContentRepository } = await import("../content-
|
|
1807
|
+
const { ContentRepository } = await import("../content-BC43pICM.mjs").then((n) => n.n);
|
|
1751
1808
|
const repo = new ContentRepository(this.db);
|
|
1752
1809
|
const resolvedItem = await repo.findByIdOrSlug(collection, id, body.locale);
|
|
1753
1810
|
const resolvedId = resolvedItem?.id ?? id;
|
|
@@ -1774,7 +1831,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1774
1831
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(bodyWithoutRev.data, collection, false)).content;
|
|
1775
1832
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, false);
|
|
1776
1833
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1777
|
-
const { validateContentData } = await import("../validation-
|
|
1834
|
+
const { validateContentData } = await import("../validation-DlD0E35W.mjs");
|
|
1778
1835
|
const validation = await validateContentData(this.db, collection, processedData, { partial: true });
|
|
1779
1836
|
if (!validation.ok) return {
|
|
1780
1837
|
success: false,
|
|
@@ -2324,16 +2381,30 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
2324
2381
|
});
|
|
2325
2382
|
}
|
|
2326
2383
|
runAfterDeleteHooks(id, collection, permanent) {
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2384
|
+
after(async () => {
|
|
2385
|
+
if (this.hooks.hasHooks("content:afterDelete")) try {
|
|
2386
|
+
await this.hooks.runContentAfterDelete(id, collection, permanent);
|
|
2387
|
+
} catch (err) {
|
|
2388
|
+
console.error("EmDash afterDelete hook error:", err);
|
|
2389
|
+
}
|
|
2390
|
+
const tasks = [];
|
|
2391
|
+
for (const [pluginKey, plugin] of this.sandboxedPlugins) {
|
|
2392
|
+
const [pluginId] = pluginKey.split(":");
|
|
2393
|
+
if (!pluginId || !this.isPluginEnabled(pluginId)) continue;
|
|
2394
|
+
tasks.push((async () => {
|
|
2395
|
+
try {
|
|
2396
|
+
await plugin.invokeHook("content:afterDelete", {
|
|
2397
|
+
id,
|
|
2398
|
+
collection,
|
|
2399
|
+
permanent
|
|
2400
|
+
});
|
|
2401
|
+
} catch (err) {
|
|
2402
|
+
console.error(`EmDash: Sandboxed plugin ${pluginId} afterDelete error:`, err);
|
|
2403
|
+
}
|
|
2404
|
+
})());
|
|
2405
|
+
}
|
|
2406
|
+
await Promise.allSettled(tasks);
|
|
2407
|
+
});
|
|
2337
2408
|
}
|
|
2338
2409
|
runDeferredContentHook(name, content, collection) {
|
|
2339
2410
|
const label = name.slice(8);
|
|
@@ -2716,10 +2787,15 @@ async function prefetchWidgetAreas() {
|
|
|
2716
2787
|
const areas = await getWidgetAreas();
|
|
2717
2788
|
for (const area of areas) setRequestCacheEntry(`widget-area:${area.name}`, area);
|
|
2718
2789
|
}
|
|
2719
|
-
/**
|
|
2790
|
+
/**
|
|
2791
|
+
* Warm every taxonomy's term list via the real helper (primes per-name keys).
|
|
2792
|
+
* Counts are left out: they cost an aggregate over the whole assignment pivot
|
|
2793
|
+
* per taxonomy, and only a consumer that renders one can say it's needed. A
|
|
2794
|
+
* consumer that does asks for it and reuses the term list warmed here.
|
|
2795
|
+
*/
|
|
2720
2796
|
async function prefetchTaxonomyTerms() {
|
|
2721
2797
|
const defs = await getTaxonomyDefs();
|
|
2722
|
-
await Promise.allSettled(defs.map((def) => getTaxonomyTerms(def.name)));
|
|
2798
|
+
await Promise.allSettled(defs.map((def) => getTaxonomyTerms(def.name, { includeCounts: false })));
|
|
2723
2799
|
}
|
|
2724
2800
|
/** Warm every menu via the real helper (primes `menu:${name}:${locale}`). */
|
|
2725
2801
|
async function prefetchMenus() {
|
|
@@ -3123,7 +3199,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
3123
3199
|
if (!isSetupVerified() && !context.isPrerendered) {
|
|
3124
3200
|
const t0 = performance.now();
|
|
3125
3201
|
try {
|
|
3126
|
-
const { getDb } = await import("../loader-
|
|
3202
|
+
const { getDb } = await import("../loader-D4rigvjR.mjs").then((n) => n.o);
|
|
3127
3203
|
await (await getDb()).selectFrom("_emdash_migrations").selectAll().limit(1).execute();
|
|
3128
3204
|
markSetupVerified();
|
|
3129
3205
|
} catch (error) {
|