emdash 0.32.0 → 0.33.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-C0ONzkUP.d.mts → adapters-BMyNSSZi.d.mts} +9 -1
- package/dist/adapters-BMyNSSZi.d.mts.map +1 -0
- package/dist/after-CBU2vkoO.mjs +96 -0
- package/dist/after-CBU2vkoO.mjs.map +1 -0
- package/dist/{allowed-origins-CCEi9bPI.mjs → allowed-origins-CG1pACtS.mjs} +2 -2
- package/dist/{allowed-origins-CCEi9bPI.mjs.map → allowed-origins-CG1pACtS.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -4
- package/dist/api/route-utils.d.mts.map +1 -1
- package/dist/api/route-utils.mjs +22 -22
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-DgPbMlng.mjs → api-D2hunekQ.mjs} +247 -45
- package/dist/api-D2hunekQ.mjs.map +1 -0
- package/dist/{api-tokens-p-iMzvXR.mjs → api-tokens-CSND0i1z.mjs} +2 -2
- package/dist/{api-tokens-p-iMzvXR.mjs.map → api-tokens-CSND0i1z.mjs.map} +1 -1
- package/dist/{apply-1_6ra7NP.mjs → apply-kwNEJW2l.mjs} +35 -22
- package/dist/apply-kwNEJW2l.mjs.map +1 -0
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.mjs +13 -3
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +8 -8
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.mjs +4 -4
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +10 -10
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +344 -173
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -7
- 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/byline-fields/_slug_/usage.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +10 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +10 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +10 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +18 -18
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +18 -18
- package/dist/astro/routes/api/admin/bylines/index.mjs +18 -18
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +16 -16
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/counts.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +12 -12
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +12 -12
- 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 +46 -45
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +46 -45
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +5 -5
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +45 -44
- 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 +45 -44
- 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 +45 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +46 -45
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +46 -45
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +45 -44
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +45 -44
- 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 +45 -44
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +8 -8
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/index.mjs +7 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs.map +1 -1
- package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -11
- package/dist/astro/routes/api/auth/logout.mjs +3 -3
- package/dist/astro/routes/api/auth/magic-link/send.mjs +12 -12
- package/dist/astro/routes/api/auth/magic-link/send.mjs.map +1 -1
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.mjs +8 -8
- package/dist/astro/routes/api/auth/mode.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +4 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +13 -13
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs.map +1 -1
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +18 -18
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs.map +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +15 -15
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +18 -18
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +18 -18
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +16 -16
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/authors.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/index.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -8
- package/dist/astro/routes/api/dashboard.mjs +9 -9
- 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 +19 -19
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +15 -15
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/media.mjs +10 -10
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +19 -19
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +11 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +27 -27
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +42 -42
- package/dist/astro/routes/api/media/_id_/confirm.mjs +10 -10
- package/dist/astro/routes/api/media/_id_/upload.mjs +6 -6
- package/dist/astro/routes/api/media/_id_/usage.mjs +14 -14
- package/dist/astro/routes/api/media/_id_.mjs +13 -13
- 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 +9 -9
- package/dist/astro/routes/api/media.mjs +13 -13
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/items.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_/translations.mjs +11 -11
- package/dist/astro/routes/api/menus/_name_.mjs +11 -11
- package/dist/astro/routes/api/menus/index.mjs +11 -11
- 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 +36 -5
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +5 -5
- package/dist/astro/routes/api/redirects/404s/index.mjs +12 -12
- package/dist/astro/routes/api/redirects/404s/summary.mjs +12 -12
- package/dist/astro/routes/api/redirects/_id_.mjs +14 -13
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +14 -13
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +18 -18
- package/dist/astro/routes/api/relations/_id_/translations.mjs +13 -13
- package/dist/astro/routes/api/relations/index.mjs +18 -18
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +4 -4
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +45 -44
- 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 +45 -44
- 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 +45 -44
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +45 -44
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +45 -44
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.d.mts +8 -0
- package/dist/astro/routes/api/schema/collections/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs +66 -0
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/schema/index.mjs +11 -9
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +45 -44
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +45 -44
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.d.mts +1 -0
- package/dist/astro/routes/api/search/enable.d.mts.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +17 -13
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +11 -11
- package/dist/astro/routes/api/search/rebuild.mjs +13 -13
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +7 -7
- package/dist/astro/routes/api/search/suggest.mjs +11 -11
- package/dist/astro/routes/api/sections/_slug_.mjs +11 -11
- package/dist/astro/routes/api/sections/index.mjs +11 -11
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +6 -6
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings.mjs +16 -16
- package/dist/astro/routes/api/setup/admin-verify.mjs +13 -13
- package/dist/astro/routes/api/setup/admin.mjs +12 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +30 -30
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.mjs +32 -32
- package/dist/astro/routes/api/setup/status.mjs +4 -4
- package/dist/astro/routes/api/snapshot.mjs +9 -9
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts +8 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +43 -0
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -0
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +16 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +16 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +16 -16
- package/dist/astro/routes/api/taxonomies/index.mjs +16 -16
- package/dist/astro/routes/api/themes/preview.mjs +7 -7
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- 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 +8 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +11 -11
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +11 -11
- package/dist/astro/routes/api/widget-areas/_name_.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/index.mjs +11 -11
- package/dist/astro/routes/api/widget-components.mjs +3 -3
- package/dist/astro/routes/robots.txt.mjs +9 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +12 -12
- package/dist/astro/routes/sitemap.xml.mjs +10 -10
- package/dist/astro/types.d.mts +19 -13
- 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-R5iYYrpa.mjs → authorize-qRhWQnel.mjs} +2 -2
- package/dist/{authorize-R5iYYrpa.mjs.map → authorize-qRhWQnel.mjs.map} +1 -1
- package/dist/{backup-LpQ1V_sR.mjs → backup-CtA6LDNw.mjs} +5 -5
- package/dist/{backup-LpQ1V_sR.mjs.map → backup-CtA6LDNw.mjs.map} +1 -1
- package/dist/{byline-C5TAqs8N.mjs → byline-Cp6csL84.mjs} +9 -9
- package/dist/{byline-C5TAqs8N.mjs.map → byline-Cp6csL84.mjs.map} +1 -1
- package/dist/{byline-fields-T9ZLZMxJ.mjs → byline-fields-CNc0Yq5i.mjs} +2 -2
- package/dist/{byline-fields-T9ZLZMxJ.mjs.map → byline-fields-CNc0Yq5i.mjs.map} +1 -1
- package/dist/{byline-registry-BCuOp4UF.mjs → byline-registry-ZkPKqEwC.mjs} +4 -4
- package/dist/{byline-registry-BCuOp4UF.mjs.map → byline-registry-ZkPKqEwC.mjs.map} +1 -1
- package/dist/{bylines-B8-WGdja.mjs → bylines-CEj5CdT4.mjs} +7 -7
- package/dist/{bylines-B8-WGdja.mjs.map → bylines-CEj5CdT4.mjs.map} +1 -1
- package/dist/{bylines-DGuqBLjV.mjs → bylines-cf-C9lmF.mjs} +4 -4
- package/dist/{bylines-DGuqBLjV.mjs.map → bylines-cf-C9lmF.mjs.map} +1 -1
- package/dist/cache-C9FptTFR.mjs +108 -0
- package/dist/cache-C9FptTFR.mjs.map +1 -0
- package/dist/{challenge-store-BFzgFRog.mjs → challenge-store-D9VNKELo.mjs} +1 -1
- package/dist/{challenge-store-BFzgFRog.mjs.map → challenge-store-D9VNKELo.mjs.map} +1 -1
- package/dist/{chunks-D5dlPeRb.mjs → chunks-DbYzib_k.mjs} +2 -2
- package/dist/{chunks-D5dlPeRb.mjs.map → chunks-DbYzib_k.mjs.map} +1 -1
- package/dist/cli/index.mjs +40 -32
- 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 +2 -2
- package/dist/{comment-DnTxxVHv.mjs → comment-BIkJ6Fil.mjs} +3 -3
- package/dist/{comment-DnTxxVHv.mjs.map → comment-BIkJ6Fil.mjs.map} +1 -1
- package/dist/{comment-reaction-BUlUz2bh.mjs → comment-reaction-D-laEceb.mjs} +2 -2
- package/dist/{comment-reaction-BUlUz2bh.mjs.map → comment-reaction-D-laEceb.mjs.map} +1 -1
- package/dist/{comments-QPKgK3nk.mjs → comments-0_w6KChA.mjs} +3 -3
- package/dist/{comments-QPKgK3nk.mjs.map → comments-0_w6KChA.mjs.map} +1 -1
- package/dist/{components-DZkL4Fx0.mjs → components-BPxrRjpE.mjs} +1 -1
- package/dist/{components-DZkL4Fx0.mjs.map → components-BPxrRjpE.mjs.map} +1 -1
- package/dist/{content-CpfKV9QE.mjs → content-CJ94NEx5.mjs} +165 -112
- package/dist/content-CJ94NEx5.mjs.map +1 -0
- package/dist/{content-refresh-DgqUBeTv.mjs → content-refresh-Xw7aKmou.mjs} +6 -6
- package/dist/{content-refresh-DgqUBeTv.mjs.map → content-refresh-Xw7aKmou.mjs.map} +1 -1
- package/dist/{context-kO4YZB03.mjs → context-C_1nrqnW.mjs} +14 -14
- package/dist/{context-kO4YZB03.mjs.map → context-C_1nrqnW.mjs.map} +1 -1
- package/dist/{cron-BlKIMD_e.mjs → cron-DRV-UC4K.mjs} +1 -1
- package/dist/{cron-BlKIMD_e.mjs.map → cron-DRV-UC4K.mjs.map} +1 -1
- package/dist/{dashboard-DoBwPnON.mjs → dashboard-DINnNVVU.mjs} +5 -5
- package/dist/{dashboard-DoBwPnON.mjs.map → dashboard-DINnNVVU.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/index.mjs.map +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-C4v9KP56.mjs → default-BD2FG0xV.mjs} +1 -1
- package/dist/{default-C4v9KP56.mjs.map → default-BD2FG0xV.mjs.map} +1 -1
- package/dist/deferred-tasks-C-WRCcKo.d.mts +9 -0
- package/dist/deferred-tasks-C-WRCcKo.d.mts.map +1 -0
- package/dist/{device-flow-DhUsyJU6.mjs → device-flow-CTqd8mud.mjs} +5 -5
- package/dist/{device-flow-DhUsyJU6.mjs.map → device-flow-CTqd8mud.mjs.map} +1 -1
- package/dist/{dialect-helpers-DFwyWjTM.mjs → dialect-helpers-BSbfaO3F.mjs} +24 -16
- package/dist/dialect-helpers-BSbfaO3F.mjs.map +1 -0
- package/dist/{email-console-C-9Ng8DM.mjs → email-console-C6WdcWbL.mjs} +1 -1
- package/dist/{email-console-C-9Ng8DM.mjs.map → email-console-C6WdcWbL.mjs.map} +1 -1
- package/dist/{error-DmmN74gW.mjs → error-oh_9i6bR.mjs} +3 -3
- package/dist/{error-DmmN74gW.mjs.map → error-oh_9i6bR.mjs.map} +1 -1
- package/dist/{errors-DtEXIQQV.mjs → errors-BucQ8VYz.mjs} +2 -1
- package/dist/errors-BucQ8VYz.mjs.map +1 -0
- package/dist/{escape-CdW31WsG.mjs → escape-CXps5F_v.mjs} +1 -1
- package/dist/{escape-CdW31WsG.mjs.map → escape-CXps5F_v.mjs.map} +1 -1
- package/dist/{field-defs-cache-QMVnzTH6.mjs → field-defs-cache-WD82dMQq.mjs} +4 -4
- package/dist/{field-defs-cache-QMVnzTH6.mjs.map → field-defs-cache-WD82dMQq.mjs.map} +1 -1
- package/dist/{fts-manager-vncsZIJm.mjs → fts-manager-BITakW_R.mjs} +37 -13
- package/dist/fts-manager-BITakW_R.mjs.map +1 -0
- package/dist/{hash-Cb7U1b5M.mjs → hash-Cg0TXJPV.mjs} +1 -1
- package/dist/{hash-Cb7U1b5M.mjs.map → hash-Cg0TXJPV.mjs.map} +1 -1
- package/dist/{hreflang-CZbSx6Bg.d.mts → hreflang-BaLCNcDx.d.mts} +2 -2
- package/dist/{hreflang-CZbSx6Bg.d.mts.map → hreflang-BaLCNcDx.d.mts.map} +1 -1
- package/dist/{hreflang-Bg-zMpkr.mjs → hreflang-BdZuVBhL.mjs} +6 -6
- package/dist/{hreflang-Bg-zMpkr.mjs.map → hreflang-BdZuVBhL.mjs.map} +1 -1
- package/dist/{import-PKhLeXvn.mjs → import-C-9uqyT3.mjs} +6 -6
- package/dist/{import-PKhLeXvn.mjs.map → import-C-9uqyT3.mjs.map} +1 -1
- package/dist/{index-j9rTh3cp.d.mts → index-M37iz29I.d.mts} +75 -35
- package/dist/index-M37iz29I.d.mts.map +1 -0
- package/dist/{index-BeNto_Vs.d.mts → index-MGw47uWq.d.mts} +3 -3
- package/dist/{index-BeNto_Vs.d.mts.map → index-MGw47uWq.d.mts.map} +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.mjs +68 -66
- package/dist/{load-BwTdWE8B.mjs → load-DV1DZuUJ.mjs} +2 -2
- package/dist/{load-BwTdWE8B.mjs.map → load-DV1DZuUJ.mjs.map} +1 -1
- package/dist/{loader-C1XOLV5b.mjs → loader-CGugY7Zl.mjs} +29 -15
- package/dist/loader-CGugY7Zl.mjs.map +1 -0
- package/dist/{manifest-schema-bCq54i7F.mjs → manifest-schema-Da7kj23y.mjs} +1 -1
- package/dist/{manifest-schema-bCq54i7F.mjs.map → manifest-schema-Da7kj23y.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/media/local-runtime.mjs +8 -8
- package/dist/{media-tQDZEdu7.mjs → media-BP7S-nHT.mjs} +2 -2
- package/dist/{media-tQDZEdu7.mjs.map → media-BP7S-nHT.mjs.map} +1 -1
- package/dist/{media-DWIzoVFL.mjs → media-OhYL-7Io.mjs} +1 -1
- package/dist/{media-DWIzoVFL.mjs.map → media-OhYL-7Io.mjs.map} +1 -1
- package/dist/{media-allowlist-B7TPD6aq.mjs → media-allowlist-D-peH1H5.mjs} +1 -1
- package/dist/{media-allowlist-B7TPD6aq.mjs.map → media-allowlist-D-peH1H5.mjs.map} +1 -1
- package/dist/{media-upload-Bc9Nc5Zf.mjs → media-upload-DtrwU2B0.mjs} +7 -7
- package/dist/{media-upload-Bc9Nc5Zf.mjs.map → media-upload-DtrwU2B0.mjs.map} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs → media-url-DYs_YLOx.mjs} +1 -1
- package/dist/{media-url-BCm5vBn6.mjs.map → media-url-DYs_YLOx.mjs.map} +1 -1
- package/dist/{media-usage-DPJcNaAq.mjs → media-usage-BlxfTkN0.mjs} +8 -8
- package/dist/{media-usage-DPJcNaAq.mjs.map → media-usage-BlxfTkN0.mjs.map} +1 -1
- package/dist/{menus-BxPLFfIc.mjs → menus-BcQWxeXu.mjs} +4 -4
- package/dist/{menus-BxPLFfIc.mjs.map → menus-BcQWxeXu.mjs.map} +1 -1
- package/dist/{menus-C6qhqP4X.mjs → menus-Y54RDPIN.mjs} +215 -38
- package/dist/menus-Y54RDPIN.mjs.map +1 -0
- package/dist/{mode-fiXRMfeA.mjs → mode-BWyTBe3I.mjs} +1 -1
- package/dist/{mode-fiXRMfeA.mjs.map → mode-BWyTBe3I.mjs.map} +1 -1
- package/dist/{oauth-authorization-C9tFinly.mjs → oauth-authorization-ClvktmrL.mjs} +5 -5
- package/dist/{oauth-authorization-C9tFinly.mjs.map → oauth-authorization-ClvktmrL.mjs.map} +1 -1
- package/dist/{oauth-clients-BwTxE1aE.mjs → oauth-clients-8ao-U66l.mjs} +1 -1
- package/dist/{oauth-clients-BwTxE1aE.mjs.map → oauth-clients-8ao-U66l.mjs.map} +1 -1
- package/dist/{oauth-state-store-DaRUwPWO.mjs → oauth-state-store-B1ofdTiQ.mjs} +1 -1
- package/dist/{oauth-state-store-DaRUwPWO.mjs.map → oauth-state-store-B1ofdTiQ.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-CzuzOSlF.mjs → oauth-user-lookup-CscEuIiR.mjs} +1 -1
- package/dist/{oauth-user-lookup-CzuzOSlF.mjs.map → oauth-user-lookup-CscEuIiR.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-Bok5j2ae.mjs → object-cache-71tPfV4A.mjs} +106 -5
- package/dist/object-cache-71tPfV4A.mjs.map +1 -0
- package/dist/{options-aeIs8WFu.d.mts → options-CA4eVX6P.d.mts} +3 -3
- package/dist/{options-aeIs8WFu.d.mts.map → options-CA4eVX6P.d.mts.map} +1 -1
- package/dist/{options-BlmBHTvX.mjs → options-CBXIHUoT.mjs} +1 -1
- package/dist/{options-BlmBHTvX.mjs.map → options-CBXIHUoT.mjs.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-BL49yb9D.mjs → parse-CJKNuewM.mjs} +2 -2
- package/dist/{parse-BL49yb9D.mjs.map → parse-CJKNuewM.mjs.map} +1 -1
- package/dist/{passkey-config-KMhgFjdQ.mjs → passkey-config-D-zrzMJI.mjs} +1 -1
- package/dist/{passkey-config-KMhgFjdQ.mjs.map → passkey-config-D-zrzMJI.mjs.map} +1 -1
- package/dist/{placeholder-Dxo5Zt58.d.mts → placeholder-DaeNS-VG.d.mts} +1 -1
- package/dist/{placeholder-Dxo5Zt58.d.mts.map → placeholder-DaeNS-VG.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{portable-text-CNahFfj6.mjs → portable-text-B_kqBmXB.mjs} +1 -1
- package/dist/{portable-text-CNahFfj6.mjs.map → portable-text-B_kqBmXB.mjs.map} +1 -1
- package/dist/{preview-D4Jnbfx7.mjs → preview-BU6PaLpM.mjs} +2 -2
- package/dist/{preview-D4Jnbfx7.mjs.map → preview-BU6PaLpM.mjs.map} +1 -1
- package/dist/{public-url-DSGTnJFw.mjs → public-url-Ox9oOlgp.mjs} +14 -3
- package/dist/public-url-Ox9oOlgp.mjs.map +1 -0
- package/dist/{query-DCiXI7OZ.mjs → query-C5w7PsRQ.mjs} +20 -41
- package/dist/query-C5w7PsRQ.mjs.map +1 -0
- package/dist/{query-1xOcEy18.mjs → query-rC9HKv1N.mjs} +4 -4
- package/dist/{query-1xOcEy18.mjs.map → query-rC9HKv1N.mjs.map} +1 -1
- package/dist/{rate-limit-Vkp9gQ1Y.mjs → rate-limit-kug6q99V.mjs} +2 -2
- package/dist/{rate-limit-Vkp9gQ1Y.mjs.map → rate-limit-kug6q99V.mjs.map} +1 -1
- package/dist/{redirect-BJ6d1yHh.mjs → redirect-DIJxXKOG.mjs} +3 -3
- package/dist/{redirect-BJ6d1yHh.mjs.map → redirect-DIJxXKOG.mjs.map} +1 -1
- package/dist/{redirect-CDgfv9vh.mjs → redirect-Egf2R9yP.mjs} +1 -1
- package/dist/{redirect-CDgfv9vh.mjs.map → redirect-Egf2R9yP.mjs.map} +1 -1
- package/dist/{redirects-Cwkq2H-G.mjs → redirects-Bzm812bY.mjs} +5 -5
- package/dist/{redirects-Cwkq2H-G.mjs.map → redirects-Bzm812bY.mjs.map} +1 -1
- package/dist/{redirects-BOn2DIUs.mjs → redirects-G8wAhWAf.mjs} +20 -6
- package/dist/redirects-G8wAhWAf.mjs.map +1 -0
- package/dist/{registry-BP1JK2xh.mjs → registry-Dbodb4Uo.mjs} +59 -14
- package/dist/registry-Dbodb4Uo.mjs.map +1 -0
- package/dist/{relation-DJ5DZh7B.mjs → relation-Cbe3Sd3m.mjs} +3 -3
- package/dist/{relation-DJ5DZh7B.mjs.map → relation-Cbe3Sd3m.mjs.map} +1 -1
- package/dist/{relations-C4duJnwI.mjs → relations-Bw_E1TXo.mjs} +3 -3
- package/dist/{relations-C4duJnwI.mjs.map → relations-Bw_E1TXo.mjs.map} +1 -1
- package/dist/{relations-DHFQGX0h.d.mts → relations-G2ta7GIl.d.mts} +36 -9
- package/dist/relations-G2ta7GIl.d.mts.map +1 -0
- package/dist/{relations-DpTjftCl.mjs → relations-qHwpUe66.mjs} +5 -5
- package/dist/{relations-DpTjftCl.mjs.map → relations-qHwpUe66.mjs.map} +1 -1
- package/dist/request-context.d.mts +3 -0
- package/dist/request-context.d.mts.map +1 -1
- package/dist/request-context.mjs.map +1 -1
- package/dist/{request-meta-DzXYYI-n.mjs → request-meta-Df-jFbAd.mjs} +2 -2
- package/dist/{request-meta-DzXYYI-n.mjs.map → request-meta-Df-jFbAd.mjs.map} +1 -1
- package/dist/{resolve-BUvFE0Lr.mjs → resolve-DZzG4HqM.mjs} +1 -1
- package/dist/{resolve-BUvFE0Lr.mjs.map → resolve-DZzG4HqM.mjs.map} +1 -1
- package/dist/{runner-BsI18UgP.mjs → runner-BFTrkYhu.mjs} +482 -216
- package/dist/runner-BFTrkYhu.mjs.map +1 -0
- package/dist/{runner-CHdkERbt.d.mts → runner-BaADli8l.d.mts} +2 -2
- package/dist/{runner-CHdkERbt.d.mts.map → runner-BaADli8l.d.mts.map} +1 -1
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +3 -3
- package/dist/{schema-eqZhkR0S.mjs → schema-CiQXr6_F.mjs} +3 -3
- package/dist/{schema-eqZhkR0S.mjs.map → schema-CiQXr6_F.mjs.map} +1 -1
- package/dist/{scopes-Be2d8bSb.mjs → scopes-CNJVT5i5.mjs} +3 -3
- package/dist/{scopes-Be2d8bSb.mjs.map → scopes-CNJVT5i5.mjs.map} +1 -1
- package/dist/{search-CeO678cp.mjs → search-FZhx5dDU.mjs} +6 -6
- package/dist/{search-CeO678cp.mjs.map → search-FZhx5dDU.mjs.map} +1 -1
- package/dist/{secrets-870d-7yA.mjs → secrets-DLd8RXee.mjs} +4 -4
- package/dist/{secrets-870d-7yA.mjs.map → secrets-DLd8RXee.mjs.map} +1 -1
- package/dist/{sections-DSuEfirn.mjs → sections-BrIrMUCn.mjs} +3 -3
- package/dist/{sections-DSuEfirn.mjs.map → sections-BrIrMUCn.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +24 -24
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +17 -17
- package/dist/{seo-C3GDfT0V.mjs → seo-CobNfOvb.mjs} +2 -2
- package/dist/{seo-C3GDfT0V.mjs.map → seo-CobNfOvb.mjs.map} +1 -1
- package/dist/{seo-BAPKiED8.mjs → seo-DTHRntNC.mjs} +3 -3
- package/dist/{seo-BAPKiED8.mjs.map → seo-DTHRntNC.mjs.map} +1 -1
- package/dist/{service-DyFT-k-R.mjs → service-B-pYGPgR.mjs} +4 -4
- package/dist/{service-DyFT-k-R.mjs.map → service-B-pYGPgR.mjs.map} +1 -1
- package/dist/{session-user-BrK2zz7S.mjs → session-user-BvM9-zNl.mjs} +2 -2
- package/dist/{session-user-BrK2zz7S.mjs.map → session-user-BvM9-zNl.mjs.map} +1 -1
- package/dist/{settings-CREKyj8I.mjs → settings-DPHau-WH.mjs} +3 -3
- package/dist/{settings-CREKyj8I.mjs.map → settings-DPHau-WH.mjs.map} +1 -1
- package/dist/{settings-DgKouY2S.mjs → settings-kJhGiQ4z.mjs} +7 -7
- package/dist/{settings-DgKouY2S.mjs.map → settings-kJhGiQ4z.mjs.map} +1 -1
- package/dist/{setup-complete-L7bMK2VI.mjs → setup-complete-u50Qm8rY.mjs} +2 -2
- package/dist/{setup-complete-L7bMK2VI.mjs.map → setup-complete-u50Qm8rY.mjs.map} +1 -1
- package/dist/{setup-nonce-Ct5tjWcq.mjs → setup-nonce-DCjiiOD2.mjs} +1 -1
- package/dist/{setup-nonce-Ct5tjWcq.mjs.map → setup-nonce-DCjiiOD2.mjs.map} +1 -1
- package/dist/{single-flight-cache-C2exrGAi.mjs → single-flight-cache-DW3w11Pu.mjs} +1 -1
- package/dist/{single-flight-cache-C2exrGAi.mjs.map → single-flight-cache-DW3w11Pu.mjs.map} +1 -1
- package/dist/site-url-I-lJ5kma.mjs +16 -0
- package/dist/site-url-I-lJ5kma.mjs.map +1 -0
- package/dist/{snapshot-BdpUJKD-.mjs → snapshot-I_fjLDaD.mjs} +2 -2
- package/dist/{snapshot-BdpUJKD-.mjs.map → snapshot-I_fjLDaD.mjs.map} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs → ssrf-CTa6v21i.mjs} +1 -1
- package/dist/{ssrf-CviKqWmq.mjs.map → ssrf-CTa6v21i.mjs.map} +1 -1
- package/dist/{state-xxv6ZTMv.mjs → state-CQvoefYP.mjs} +1 -1
- package/dist/{state-xxv6ZTMv.mjs.map → state-CQvoefYP.mjs.map} +1 -1
- package/dist/{status-COfycGIU.mjs → status-CIsmlC1E.mjs} +1 -1
- package/dist/{status-COfycGIU.mjs.map → status-CIsmlC1E.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{taxonomies-Dbdki3Un.mjs → taxonomies-CKuaZER5.mjs} +85 -5
- package/dist/taxonomies-CKuaZER5.mjs.map +1 -0
- package/dist/{taxonomies-B61CRSha.mjs → taxonomies-CLN1N92E.mjs} +16 -17
- package/dist/taxonomies-CLN1N92E.mjs.map +1 -0
- package/dist/{taxonomy-DvwWAPvA.mjs → taxonomy-pOrB2kZe.mjs} +142 -15
- package/dist/taxonomy-pOrB2kZe.mjs.map +1 -0
- package/dist/{tokens-DVltpO2D.mjs → tokens-DagaJGK8.mjs} +1 -1
- package/dist/{tokens-DVltpO2D.mjs.map → tokens-DagaJGK8.mjs.map} +1 -1
- package/dist/{transaction-D0FOsb3X.mjs → transaction-NQj4VJ7Z.mjs} +1 -1
- package/dist/{transaction-D0FOsb3X.mjs.map → transaction-NQj4VJ7Z.mjs.map} +1 -1
- package/dist/{transport-DokJOScS.d.mts → transport-CAwTaTp_.d.mts} +1 -1
- package/dist/{transport-DokJOScS.d.mts.map → transport-CAwTaTp_.d.mts.map} +1 -1
- package/dist/{transport-BWQo0Foy.mjs → transport-DVsa5YYo.mjs} +1 -1
- package/dist/{transport-BWQo0Foy.mjs.map → transport-DVsa5YYo.mjs.map} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs → trusted-proxy-D20_7fyX.mjs} +1 -1
- package/dist/{trusted-proxy-CwjQj0YG.mjs.map → trusted-proxy-D20_7fyX.mjs.map} +1 -1
- package/dist/{types-DqZVPILm.d.mts → types-BGWPMiBO.d.mts} +2 -2
- package/dist/{types-DqZVPILm.d.mts.map → types-BGWPMiBO.d.mts.map} +1 -1
- package/dist/{types-DsAMyD_o.d.mts → types-BK6U01Ro.d.mts} +1 -1
- package/dist/{types-DsAMyD_o.d.mts.map → types-BK6U01Ro.d.mts.map} +1 -1
- package/dist/{types-BD40g7zz.mjs → types-BjxTKxrZ.mjs} +1 -1
- package/dist/{types-BD40g7zz.mjs.map → types-BjxTKxrZ.mjs.map} +1 -1
- package/dist/{types-jISEalTX.d.mts → types-BnFP1M3J.d.mts} +22 -1
- package/dist/types-BnFP1M3J.d.mts.map +1 -0
- package/dist/{types-Dr2GLlwu.d.mts → types-C8oz_ayJ.d.mts} +1 -1
- package/dist/{types-Dr2GLlwu.d.mts.map → types-C8oz_ayJ.d.mts.map} +1 -1
- package/dist/{types-C9P3ysxq.d.mts → types-CbUcuxxc.d.mts} +1 -1
- package/dist/{types-C9P3ysxq.d.mts.map → types-CbUcuxxc.d.mts.map} +1 -1
- package/dist/{types-XrQQ-Aex.mjs → types-Cd8iuS1J.mjs} +10 -3
- package/dist/{types-XrQQ-Aex.mjs.map → types-Cd8iuS1J.mjs.map} +1 -1
- package/dist/types-CtzytVXn.mjs +18 -0
- package/dist/types-CtzytVXn.mjs.map +1 -0
- package/dist/{types-BQY7VYw6.d.mts → types-Cz8hNch2.d.mts} +5 -5
- package/dist/{types-BQY7VYw6.d.mts.map → types-Cz8hNch2.d.mts.map} +1 -1
- package/dist/{types-CcSZCcF1.d.mts → types-DLG4IFEQ.d.mts} +1 -1
- package/dist/{types-CcSZCcF1.d.mts.map → types-DLG4IFEQ.d.mts.map} +1 -1
- package/dist/{types-84Bque3-.d.mts → types-Dc4ntQjQ.d.mts} +10 -1
- package/dist/types-Dc4ntQjQ.d.mts.map +1 -0
- package/dist/{types-DQLZ58GV.d.mts → types-LoagAGzH.d.mts} +1 -1
- package/dist/{types-DQLZ58GV.d.mts.map → types-LoagAGzH.d.mts.map} +1 -1
- package/dist/{types-o7xo7VgH.mjs → types-NBI3rF-_.mjs} +3 -2
- package/dist/types-NBI3rF-_.mjs.map +1 -0
- package/dist/{upload-attempts-C5yd6Gae.mjs → upload-attempts-D8QAFLUJ.mjs} +1 -1
- package/dist/{upload-attempts-C5yd6Gae.mjs.map → upload-attempts-D8QAFLUJ.mjs.map} +1 -1
- package/dist/{user-BAumEmpA.mjs → user-DBrq4UVq.mjs} +3 -3
- package/dist/{user-BAumEmpA.mjs.map → user-DBrq4UVq.mjs.map} +1 -1
- package/dist/{utils-BbUgmeZG.mjs → utils-hLzi_2Fn.mjs} +2 -2
- package/dist/{utils-BbUgmeZG.mjs.map → utils-hLzi_2Fn.mjs.map} +1 -1
- package/dist/{validate-VPnKoIzW.mjs → validate-BpwoDOgt.mjs} +25 -2
- package/dist/validate-BpwoDOgt.mjs.map +1 -0
- package/dist/{validate-CdYcY-Ln.d.mts → validate-C3oSmA7F.d.mts} +15 -5
- package/dist/validate-C3oSmA7F.d.mts.map +1 -0
- package/dist/{validate-Bs_wT2ul.mjs → validate-mKo3RxBM.mjs} +3 -3
- package/dist/{validate-Bs_wT2ul.mjs.map → validate-mKo3RxBM.mjs.map} +1 -1
- package/dist/{validation-BngR0nit.mjs → validation-BgpucsvF.mjs} +10 -10
- package/dist/{validation-BngR0nit.mjs.map → validation-BgpucsvF.mjs.map} +1 -1
- package/dist/version-C4PnpmoV.mjs +7 -0
- package/dist/{version-Bdfb34kk.mjs.map → version-C4PnpmoV.mjs.map} +1 -1
- package/dist/{widgets-L-VndTKD.mjs → widgets-CJJtkiKh.mjs} +3 -3
- package/dist/{widgets-L-VndTKD.mjs.map → widgets-CJJtkiKh.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-BexjtNid.mjs → wxr-taxonomies-9PPSy8X6.mjs} +4 -4
- package/dist/{wxr-taxonomies-BexjtNid.mjs.map → wxr-taxonomies-9PPSy8X6.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-DueaLFd9.d.mts → wxr-taxonomies-Bkpp_2tK.d.mts} +1 -1
- package/dist/{wxr-taxonomies-DueaLFd9.d.mts.map → wxr-taxonomies-Bkpp_2tK.d.mts.map} +1 -1
- package/dist/{zod-generator-DMzfga3g.mjs → zod-generator-CG64Hnbh.mjs} +3 -3
- package/dist/{zod-generator-DMzfga3g.mjs.map → zod-generator-CG64Hnbh.mjs.map} +1 -1
- package/package.json +11 -8
- package/src/after.ts +6 -1
- package/src/api/errors.ts +1 -0
- package/src/api/handlers/content.ts +45 -4
- package/src/api/handlers/marketplace.ts +14 -0
- package/src/api/handlers/registry.ts +14 -0
- package/src/api/handlers/revision.ts +19 -5
- package/src/api/handlers/schema.ts +37 -0
- package/src/api/handlers/snapshot.ts +1 -1
- package/src/api/handlers/taxonomies.ts +101 -1
- package/src/api/openapi/document.ts +48 -0
- package/src/api/public-url.ts +14 -2
- package/src/api/schemas/schema.ts +13 -0
- package/src/api/schemas/search.ts +2 -0
- package/src/api/schemas/taxonomies.ts +18 -0
- package/src/api/site-url.ts +16 -6
- package/src/astro/integration/routes.ts +14 -0
- package/src/astro/integration/runtime.ts +13 -0
- package/src/astro/integration/virtual-modules.ts +2 -0
- package/src/astro/middleware/redirect.ts +2 -10
- package/src/astro/middleware/scoped-db.ts +35 -4
- package/src/astro/middleware.ts +56 -22
- package/src/astro/routes/api/admin/comments/[id]/status.ts +1 -1
- package/src/astro/routes/api/admin/users/[id]/send-recovery.ts +2 -2
- package/src/astro/routes/api/auth/invite/index.ts +2 -2
- package/src/astro/routes/api/auth/magic-link/send.ts +2 -2
- package/src/astro/routes/api/auth/signup/request.ts +2 -2
- package/src/astro/routes/api/comments/[collection]/[contentId]/index.ts +1 -1
- package/src/astro/routes/api/schema/collections/reorder.ts +31 -0
- package/src/astro/routes/api/schema/index.ts +2 -0
- package/src/astro/routes/api/search/enable.ts +5 -1
- package/src/astro/routes/api/search/rebuild.ts +6 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +41 -0
- package/src/astro/types.ts +6 -0
- package/src/cleanup.ts +31 -26
- package/src/cli/commands/dev.ts +13 -3
- package/src/cli/commands/export-seed.ts +2 -0
- package/src/cli/index.ts +1 -1
- package/src/components/CommentForm.astro +1 -1
- package/src/components/Comments.astro +1 -1
- package/src/components/InlinePortableTextEditor.tsx +171 -31
- package/src/components/OrderedList.astro +14 -0
- package/src/components/PortableText.astro +26 -4
- package/src/components/index.ts +12 -1
- package/src/components/ordered-list.ts +549 -0
- package/src/content/converters/numbered-list.ts +148 -0
- package/src/content/converters/portable-text-to-prosemirror.ts +59 -9
- package/src/content/converters/prosemirror-to-portable-text.ts +23 -12
- package/src/content/converters/types.ts +2 -0
- package/src/content/portable-text-lists.ts +205 -0
- package/src/database/dialect-helpers.ts +3 -22
- package/src/database/migrations/055_content_translation_group_locale_index.ts +67 -0
- package/src/database/migrations/056_taxonomy_term_sort_order.ts +189 -0
- package/src/database/migrations/057_collection_hidden.ts +24 -0
- package/src/database/migrations/058_collection_sort_order.ts +20 -0
- package/src/database/migrations/059_revision_prune_queue.ts +36 -0
- package/src/database/migrations/runner.ts +10 -0
- package/src/database/repositories/content.ts +191 -178
- package/src/database/repositories/revision.ts +82 -17
- package/src/database/repositories/taxonomy.ts +202 -7
- package/src/database/repositories/types.ts +7 -0
- package/src/database/types.ts +13 -1
- package/src/database/validate.ts +39 -0
- package/src/db/adapters.ts +8 -0
- package/src/deferred-tasks.ts +71 -0
- package/src/emdash-runtime.ts +268 -92
- package/src/index.ts +2 -0
- package/src/loader.ts +46 -24
- package/src/media/usage/gc.ts +50 -0
- package/src/object-cache/index.ts +160 -3
- package/src/plugins/routes.ts +34 -0
- package/src/plugins/storage-indexes.ts +50 -11
- package/src/query.ts +21 -42
- package/src/redirects/cache.ts +79 -19
- package/src/request-context.ts +3 -0
- package/src/scheduled-publish.ts +6 -1
- package/src/schema/registry.ts +95 -3
- package/src/schema/types.ts +24 -0
- package/src/search/fts-manager.ts +50 -10
- package/src/search/index.ts +2 -0
- package/src/search/types.ts +6 -0
- package/src/seed/apply.ts +22 -2
- package/src/seed/types.ts +10 -0
- package/src/taxonomies/index.ts +11 -7
- package/src/taxonomies/term-counts.ts +2 -4
- package/src/ui-comments.ts +19 -0
- package/src/ui.ts +11 -3
- package/src/virtual-modules.d.ts +8 -0
- package/dist/adapters-C0ONzkUP.d.mts.map +0 -1
- package/dist/after-B1IIdH3Y.mjs +0 -29
- package/dist/after-B1IIdH3Y.mjs.map +0 -1
- package/dist/api-DgPbMlng.mjs.map +0 -1
- package/dist/apply-1_6ra7NP.mjs.map +0 -1
- package/dist/cache-B26cufFd.mjs +0 -65
- package/dist/cache-B26cufFd.mjs.map +0 -1
- package/dist/content-CpfKV9QE.mjs.map +0 -1
- package/dist/dialect-helpers-DFwyWjTM.mjs.map +0 -1
- package/dist/errors-DtEXIQQV.mjs.map +0 -1
- package/dist/fts-manager-vncsZIJm.mjs.map +0 -1
- package/dist/index-j9rTh3cp.d.mts.map +0 -1
- package/dist/loader-C1XOLV5b.mjs.map +0 -1
- package/dist/menus-C6qhqP4X.mjs.map +0 -1
- package/dist/object-cache-Bok5j2ae.mjs.map +0 -1
- package/dist/public-url-DSGTnJFw.mjs.map +0 -1
- package/dist/query-DCiXI7OZ.mjs.map +0 -1
- package/dist/redirects-BOn2DIUs.mjs.map +0 -1
- package/dist/registry-BP1JK2xh.mjs.map +0 -1
- package/dist/relations-DHFQGX0h.d.mts.map +0 -1
- package/dist/runner-BsI18UgP.mjs.map +0 -1
- package/dist/site-url-8N3kSyVZ.mjs +0 -13
- package/dist/site-url-8N3kSyVZ.mjs.map +0 -1
- package/dist/taxonomies-B61CRSha.mjs.map +0 -1
- package/dist/taxonomies-Dbdki3Un.mjs.map +0 -1
- package/dist/taxonomy-DvwWAPvA.mjs.map +0 -1
- package/dist/types-84Bque3-.d.mts.map +0 -1
- package/dist/types-jISEalTX.d.mts.map +0 -1
- package/dist/types-o7xo7VgH.mjs.map +0 -1
- package/dist/validate-CdYcY-Ln.d.mts.map +0 -1
- package/dist/validate-VPnKoIzW.mjs.map +0 -1
- package/dist/version-Bdfb34kk.mjs +0 -7
- /package/dist/{api-tokens-CEsW_jCg.mjs → api-tokens-Dai9dND0.mjs} +0 -0
- /package/dist/{ssrf-BB__xfNM.mjs → ssrf-Cj568Dgs.mjs} +0 -0
- /package/dist/{types-CK0LxPUQ.mjs → types-DKuWPYV5.mjs} +0 -0
package/src/emdash-runtime.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
import { Permissions } from "@emdash-cms/auth";
|
|
11
11
|
import type { Element } from "@emdash-cms/blocks";
|
|
12
|
-
import { Kysely,
|
|
12
|
+
import { Kysely, type Dialect } from "kysely";
|
|
13
13
|
import virtualConfig from "virtual:emdash/config";
|
|
14
14
|
import { z } from "zod";
|
|
15
15
|
|
|
@@ -30,12 +30,13 @@ import {
|
|
|
30
30
|
runMigrations,
|
|
31
31
|
} from "./database/migrations/runner.js";
|
|
32
32
|
import { AuditRepository } from "./database/repositories/audit.js";
|
|
33
|
+
import { ContentRepository } from "./database/repositories/content.js";
|
|
33
34
|
import { RevisionRepository } from "./database/repositories/revision.js";
|
|
35
|
+
import { ContentMutationConflictError } from "./database/repositories/types.js";
|
|
34
36
|
import type {
|
|
35
37
|
ContentItem as ContentItemInternal,
|
|
36
38
|
ContentDateField,
|
|
37
39
|
} from "./database/repositories/types.js";
|
|
38
|
-
import { validateIdentifier } from "./database/validate.js";
|
|
39
40
|
import { getI18nConfig } from "./i18n/config.js";
|
|
40
41
|
import { repairLocaleCasing } from "./i18n/repair-locale-casing.js";
|
|
41
42
|
import { normalizeMediaValue } from "./media/normalize.js";
|
|
@@ -182,6 +183,7 @@ import {
|
|
|
182
183
|
type Storage,
|
|
183
184
|
} from "./index.js";
|
|
184
185
|
import { getDb } from "./loader.js";
|
|
186
|
+
import { isRecord } from "./plugin-utils.js";
|
|
185
187
|
import { CronExecutor, type InvokeCronHookFn } from "./plugins/cron.js";
|
|
186
188
|
import { definePlugin } from "./plugins/define-plugin.js";
|
|
187
189
|
import { DEV_CONSOLE_EMAIL_PLUGIN_ID, devConsoleEmailDeliver } from "./plugins/email-console.js";
|
|
@@ -193,9 +195,15 @@ import {
|
|
|
193
195
|
} from "./plugins/hooks.js";
|
|
194
196
|
import { normalizeManifestRoute } from "./plugins/manifest-schema.js";
|
|
195
197
|
import { extractRequestMeta, sanitizeHeadersForSandbox } from "./plugins/request-meta.js";
|
|
196
|
-
import {
|
|
198
|
+
import {
|
|
199
|
+
buildRouteMeta,
|
|
200
|
+
parseRouteInput,
|
|
201
|
+
PluginRouteRegistry,
|
|
202
|
+
type RouteMeta,
|
|
203
|
+
} from "./plugins/routes.js";
|
|
197
204
|
import type { CronScheduler } from "./plugins/scheduler/types.js";
|
|
198
205
|
import { PluginStateRepository } from "./plugins/state.js";
|
|
206
|
+
import { syncDeclaredStorageIndexes } from "./plugins/storage-indexes.js";
|
|
199
207
|
import { normalizeRegistryConfig } from "./registry/config.js";
|
|
200
208
|
import { requestCached } from "./request-cache.js";
|
|
201
209
|
import { getRequestContext } from "./request-context.js";
|
|
@@ -226,6 +234,7 @@ const FIELD_TYPE_TO_KIND: Record<FieldType, string> = {
|
|
|
226
234
|
};
|
|
227
235
|
|
|
228
236
|
const DRAFT_ONLY_UPDATE_KEYS = new Set(["data", "slug", "locale", "skipRevision"]);
|
|
237
|
+
const MAX_DRAFT_STAGE_ATTEMPTS = 32;
|
|
229
238
|
|
|
230
239
|
/**
|
|
231
240
|
* Sandboxed plugin entry from virtual module
|
|
@@ -243,6 +252,10 @@ export interface SandboxedPluginEntry {
|
|
|
243
252
|
storage: PluginStorageConfig;
|
|
244
253
|
/** Serialized MCP declarations emitted at plugin build time. */
|
|
245
254
|
mcp?: PluginMcpManifestConfig;
|
|
255
|
+
/** Route declarations (name + public/permission/cacheControl), used for route auth decisions */
|
|
256
|
+
routes?: PluginManifest["routes"];
|
|
257
|
+
/** Hook declarations this plugin implements */
|
|
258
|
+
hooks?: PluginManifest["hooks"];
|
|
246
259
|
/** Admin pages */
|
|
247
260
|
adminPages?: Array<{ path: string; label?: string; icon?: string }>;
|
|
248
261
|
/** Dashboard widgets */
|
|
@@ -494,6 +507,7 @@ const marketplaceManifestCache = new Map<
|
|
|
494
507
|
settingsSchema?: Record<string, SettingField>;
|
|
495
508
|
};
|
|
496
509
|
mcp?: PluginMcpManifestConfig;
|
|
510
|
+
storage?: PluginManifest["storage"];
|
|
497
511
|
}
|
|
498
512
|
>();
|
|
499
513
|
/** Route metadata for sandboxed plugins: pluginId -> routeName -> RouteMeta */
|
|
@@ -555,6 +569,8 @@ export class EmDashRuntime {
|
|
|
555
569
|
/** All plugins eligible for the hook pipeline (includes built-in plugins).
|
|
556
570
|
* Stored so we can rebuild the pipeline when plugins are enabled/disabled. */
|
|
557
571
|
private allPipelinePlugins: ResolvedPlugin[];
|
|
572
|
+
/** Guards the once-per-process plugin storage-index sync. */
|
|
573
|
+
private storageIndexesSynced = false;
|
|
558
574
|
/** Factory options for the hook pipeline context factory */
|
|
559
575
|
private pipelineFactoryOptions: {
|
|
560
576
|
db: Kysely<Database>;
|
|
@@ -685,12 +701,36 @@ export class EmDashRuntime {
|
|
|
685
701
|
console.error("[cleanup] System cleanup failed:", error);
|
|
686
702
|
}
|
|
687
703
|
|
|
704
|
+
try {
|
|
705
|
+
await this.syncPluginStorageIndexesOnce();
|
|
706
|
+
} catch (error) {
|
|
707
|
+
console.error("[plugins] Storage index sync failed:", error);
|
|
708
|
+
}
|
|
709
|
+
|
|
688
710
|
// Never throws; no-op unless scheduled backups are enabled and due.
|
|
689
711
|
await maybeRunScheduledBackup(this.db, this.storage ?? undefined);
|
|
690
712
|
|
|
691
713
|
return { published };
|
|
692
714
|
}
|
|
693
715
|
|
|
716
|
+
/**
|
|
717
|
+
* Materialize plugin-declared storage indexes, once per process.
|
|
718
|
+
*
|
|
719
|
+
* Called from the scheduler path, not from request handlers — configured
|
|
720
|
+
* plugins have no install handler, so the tick is their only sync moment.
|
|
721
|
+
*/
|
|
722
|
+
async syncPluginStorageIndexesOnce(): Promise<void> {
|
|
723
|
+
if (this.storageIndexesSynced) return;
|
|
724
|
+
this.storageIndexesSynced = true;
|
|
725
|
+
// Sandboxed marketplace/registry plugins never join allPipelinePlugins;
|
|
726
|
+
// their manifests are cached at bundle load. Without them, plugins
|
|
727
|
+
// installed before this feature shipped would never get their indexes.
|
|
728
|
+
await syncDeclaredStorageIndexes(this.db, [
|
|
729
|
+
...this.allPipelinePlugins,
|
|
730
|
+
...marketplaceManifestCache.values(),
|
|
731
|
+
]);
|
|
732
|
+
}
|
|
733
|
+
|
|
694
734
|
/**
|
|
695
735
|
* Stop the cron scheduler gracefully.
|
|
696
736
|
* Call during worker shutdown or hot-reload.
|
|
@@ -898,6 +938,7 @@ export class EmDashRuntime {
|
|
|
898
938
|
version: bundle.manifest.version,
|
|
899
939
|
admin: bundle.manifest.admin,
|
|
900
940
|
mcp: bundle.manifest.mcp,
|
|
941
|
+
storage: bundle.manifest.storage,
|
|
901
942
|
});
|
|
902
943
|
|
|
903
944
|
// Cache route metadata from manifest for auth decisions
|
|
@@ -1013,6 +1054,7 @@ export class EmDashRuntime {
|
|
|
1013
1054
|
version: bundle.manifest.version,
|
|
1014
1055
|
admin: bundle.manifest.admin,
|
|
1015
1056
|
mcp: bundle.manifest.mcp,
|
|
1057
|
+
storage: bundle.manifest.storage,
|
|
1016
1058
|
});
|
|
1017
1059
|
if (bundle.manifest.routes.length > 0) {
|
|
1018
1060
|
const routeMetaMap = new Map<string, RouteMeta>();
|
|
@@ -1614,6 +1656,11 @@ export class EmDashRuntime {
|
|
|
1614
1656
|
// by runSystemCleanup. This catches unexpected errors.
|
|
1615
1657
|
console.error("[cleanup] System cleanup failed:", error);
|
|
1616
1658
|
}
|
|
1659
|
+
try {
|
|
1660
|
+
await runtimeRef.current?.syncPluginStorageIndexesOnce();
|
|
1661
|
+
} catch (error) {
|
|
1662
|
+
console.error("[plugins] Storage index sync failed:", error);
|
|
1663
|
+
}
|
|
1617
1664
|
// Never throws; no-op unless scheduled backups are enabled and due.
|
|
1618
1665
|
await maybeRunScheduledBackup(db, storage ?? undefined);
|
|
1619
1666
|
});
|
|
@@ -1979,8 +2026,8 @@ export class EmDashRuntime {
|
|
|
1979
2026
|
capabilities: entry.capabilities ?? [],
|
|
1980
2027
|
allowedHosts: entry.allowedHosts ?? [],
|
|
1981
2028
|
storage: entry.storage ?? {},
|
|
1982
|
-
hooks: [],
|
|
1983
|
-
routes: [],
|
|
2029
|
+
hooks: entry.hooks ?? [],
|
|
2030
|
+
routes: entry.routes ?? [],
|
|
1984
2031
|
admin: {},
|
|
1985
2032
|
mcp: entry.mcp,
|
|
1986
2033
|
};
|
|
@@ -1990,6 +2037,17 @@ export class EmDashRuntime {
|
|
|
1990
2037
|
console.log(
|
|
1991
2038
|
`EmDash: Loaded sandboxed plugin ${pluginKey} with capabilities: [${manifest.capabilities.join(", ")}]`,
|
|
1992
2039
|
);
|
|
2040
|
+
|
|
2041
|
+
if (manifest.routes.length > 0) {
|
|
2042
|
+
const routeMetaMap = new Map<string, RouteMeta>();
|
|
2043
|
+
for (const routeEntry of manifest.routes) {
|
|
2044
|
+
const normalized = normalizeManifestRoute(routeEntry);
|
|
2045
|
+
routeMetaMap.set(normalized.name, buildRouteMeta(normalized));
|
|
2046
|
+
}
|
|
2047
|
+
sandboxedRouteMetaCache.set(entry.id, routeMetaMap);
|
|
2048
|
+
} else {
|
|
2049
|
+
sandboxedRouteMetaCache.delete(entry.id);
|
|
2050
|
+
}
|
|
1993
2051
|
} catch (error) {
|
|
1994
2052
|
console.error(`EmDash: Failed to load sandboxed plugin ${entry.id}:`, error);
|
|
1995
2053
|
}
|
|
@@ -2092,6 +2150,7 @@ export class EmDashRuntime {
|
|
|
2092
2150
|
version: bundle.manifest.version,
|
|
2093
2151
|
admin: bundle.manifest.admin,
|
|
2094
2152
|
mcp: bundle.manifest.mcp,
|
|
2153
|
+
storage: bundle.manifest.storage,
|
|
2095
2154
|
});
|
|
2096
2155
|
|
|
2097
2156
|
// Cache route metadata from manifest for auth decisions
|
|
@@ -2164,6 +2223,7 @@ export class EmDashRuntime {
|
|
|
2164
2223
|
version: bundle.manifest.version,
|
|
2165
2224
|
admin: bundle.manifest.admin,
|
|
2166
2225
|
mcp: bundle.manifest.mcp,
|
|
2226
|
+
storage: bundle.manifest.storage,
|
|
2167
2227
|
});
|
|
2168
2228
|
if (bundle.manifest.routes.length > 0) {
|
|
2169
2229
|
const routeMeta = new Map<string, RouteMeta>();
|
|
@@ -2364,6 +2424,7 @@ export class EmDashRuntime {
|
|
|
2364
2424
|
supports: collection.supports || [],
|
|
2365
2425
|
hasSeo: collection.hasSeo,
|
|
2366
2426
|
urlPattern: collection.urlPattern,
|
|
2427
|
+
...(collection.hidden ? { hidden: true } : {}),
|
|
2367
2428
|
fields,
|
|
2368
2429
|
};
|
|
2369
2430
|
}
|
|
@@ -2771,13 +2832,12 @@ export class EmDashRuntime {
|
|
|
2771
2832
|
taxonomies?: Record<string, string[]>;
|
|
2772
2833
|
publishedAt?: string | null;
|
|
2773
2834
|
locale?: string;
|
|
2774
|
-
/**
|
|
2835
|
+
/** Replace the previous autosave revision after staging this save. */
|
|
2775
2836
|
skipRevision?: boolean;
|
|
2776
2837
|
_rev?: string;
|
|
2777
2838
|
},
|
|
2778
2839
|
) {
|
|
2779
2840
|
// Resolve slug → ID if needed (before any lookups)
|
|
2780
|
-
const { ContentRepository } = await import("./database/repositories/content.js");
|
|
2781
2841
|
const repo = new ContentRepository(this.db);
|
|
2782
2842
|
const resolvedItem = await repo.findByIdOrSlug(collection, id, body.locale);
|
|
2783
2843
|
const resolvedId = resolvedItem?.id ?? id;
|
|
@@ -2840,81 +2900,119 @@ export class EmDashRuntime {
|
|
|
2840
2900
|
let usesDraftRevisions = false;
|
|
2841
2901
|
let draftStorageChanged = false;
|
|
2842
2902
|
if (processedData) {
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
if (existing) {
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2903
|
+
const collectionInfo = await this.schemaRegistry.getCollectionWithFields(collection);
|
|
2904
|
+
if (collectionInfo?.supports?.includes("revisions")) {
|
|
2905
|
+
usesDraftRevisions = true;
|
|
2906
|
+
const revisionRepo = new RevisionRepository(this.db);
|
|
2907
|
+
let existing = await repo.findById(collection, resolvedId);
|
|
2908
|
+
|
|
2909
|
+
for (let attempt = 0; existing && attempt < MAX_DRAFT_STAGE_ATTEMPTS; attempt++) {
|
|
2910
|
+
let baseData: Record<string, unknown>;
|
|
2911
|
+
if (existing.draftRevisionId) {
|
|
2912
|
+
const draftRevision = await revisionRepo.findById(existing.draftRevisionId);
|
|
2913
|
+
baseData = draftRevision?.data ?? existing.data;
|
|
2914
|
+
} else {
|
|
2915
|
+
baseData = existing.data;
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
const mergedData = { ...baseData, ...processedData };
|
|
2919
|
+
if (bodyWithoutRev.slug !== undefined) {
|
|
2920
|
+
mergedData._slug = bodyWithoutRev.slug;
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
const revision = await revisionRepo.create({
|
|
2924
|
+
collection,
|
|
2925
|
+
entryId: resolvedId,
|
|
2926
|
+
data: mergedData,
|
|
2927
|
+
authorId: bodyWithoutRev.authorId ?? undefined,
|
|
2928
|
+
});
|
|
2929
|
+
|
|
2930
|
+
let staged: boolean;
|
|
2931
|
+
try {
|
|
2932
|
+
staged = await repo.replaceDraftRevision(collection, resolvedId, revision.id, existing);
|
|
2933
|
+
} catch (error) {
|
|
2934
|
+
try {
|
|
2935
|
+
await revisionRepo.deleteIfUnreferenced(collection, resolvedId, revision.id);
|
|
2936
|
+
} catch (cleanupError) {
|
|
2937
|
+
console.error(
|
|
2938
|
+
`[emdash] Failed to clean up unstaged revision ${revision.id}:`,
|
|
2939
|
+
cleanupError,
|
|
2940
|
+
);
|
|
2860
2941
|
}
|
|
2942
|
+
throw error;
|
|
2943
|
+
}
|
|
2861
2944
|
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2945
|
+
if (!staged) {
|
|
2946
|
+
try {
|
|
2947
|
+
await revisionRepo.deleteIfUnreferenced(collection, resolvedId, revision.id);
|
|
2948
|
+
} catch (cleanupError) {
|
|
2949
|
+
console.error(
|
|
2950
|
+
`[emdash] Failed to clean up unstaged revision ${revision.id}:`,
|
|
2951
|
+
cleanupError,
|
|
2952
|
+
);
|
|
2953
|
+
}
|
|
2954
|
+
if (body._rev || attempt === MAX_DRAFT_STAGE_ATTEMPTS - 1) {
|
|
2955
|
+
const error = new ContentMutationConflictError();
|
|
2956
|
+
return {
|
|
2957
|
+
success: false as const,
|
|
2958
|
+
error: { code: "CONFLICT", message: error.message },
|
|
2959
|
+
};
|
|
2866
2960
|
}
|
|
2961
|
+
existing = await repo.findById(collection, resolvedId);
|
|
2962
|
+
continue;
|
|
2963
|
+
}
|
|
2867
2964
|
|
|
2868
|
-
|
|
2869
|
-
// Autosave: update existing draft revision in place
|
|
2870
|
-
await revisionRepo.updateData(existing.draftRevisionId, mergedData);
|
|
2871
|
-
draftStorageChanged = true;
|
|
2872
|
-
} else {
|
|
2873
|
-
// Create new draft revision
|
|
2874
|
-
const revision = await revisionRepo.create({
|
|
2875
|
-
collection,
|
|
2876
|
-
entryId: resolvedId,
|
|
2877
|
-
data: mergedData,
|
|
2878
|
-
authorId: bodyWithoutRev.authorId ?? undefined,
|
|
2879
|
-
});
|
|
2965
|
+
draftStorageChanged = true;
|
|
2880
2966
|
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
// Fire-and-forget: prune old revisions to prevent unbounded growth
|
|
2894
|
-
void revisionRepo.pruneOldRevisions(collection, resolvedId, 50).catch(() => {});
|
|
2967
|
+
if (bodyWithoutRev.skipRevision && existing.draftRevisionId) {
|
|
2968
|
+
try {
|
|
2969
|
+
await revisionRepo.deleteIfUnreferenced(
|
|
2970
|
+
collection,
|
|
2971
|
+
resolvedId,
|
|
2972
|
+
existing.draftRevisionId,
|
|
2973
|
+
);
|
|
2974
|
+
} catch (error) {
|
|
2975
|
+
console.error(
|
|
2976
|
+
`[emdash] Failed to clean up superseded revision ${existing.draftRevisionId}:`,
|
|
2977
|
+
error,
|
|
2978
|
+
);
|
|
2895
2979
|
}
|
|
2980
|
+
} else {
|
|
2981
|
+
after(async () => {
|
|
2982
|
+
try {
|
|
2983
|
+
await revisionRepo.pruneQueuedEntry(collection, resolvedId, revision.id, 50);
|
|
2984
|
+
} catch (error) {
|
|
2985
|
+
console.error(
|
|
2986
|
+
`[revisions] Failed to prune revisions for ${collection}/${resolvedId}:`,
|
|
2987
|
+
error,
|
|
2988
|
+
);
|
|
2989
|
+
}
|
|
2990
|
+
});
|
|
2896
2991
|
}
|
|
2992
|
+
break;
|
|
2897
2993
|
}
|
|
2898
|
-
} catch {
|
|
2899
|
-
// Don't fail the update if revision creation fails
|
|
2900
2994
|
}
|
|
2901
2995
|
}
|
|
2902
2996
|
|
|
2903
|
-
// Update the content table:
|
|
2904
|
-
// - If collection uses draft revisions: only update metadata (no data fields, no slug)
|
|
2905
|
-
// - Otherwise: update everything as before
|
|
2906
|
-
const result = await handleContentUpdate(this.db, collection, resolvedId, {
|
|
2907
|
-
...bodyWithoutRev,
|
|
2908
|
-
data: usesDraftRevisions ? undefined : processedData,
|
|
2909
|
-
slug: usesDraftRevisions ? undefined : bodyWithoutRev.slug,
|
|
2910
|
-
authorId: bodyWithoutRev.authorId,
|
|
2911
|
-
bylines: bodyWithoutRev.bylines,
|
|
2912
|
-
});
|
|
2913
|
-
|
|
2914
2997
|
// Public HTML comes from live columns / SEO / taxonomies, not draft revisions.
|
|
2915
2998
|
const liveMetaTouched = Object.entries(bodyWithoutRev).some(
|
|
2916
2999
|
([key, value]) => value !== undefined && !DRAFT_ONLY_UPDATE_KEYS.has(key),
|
|
2917
3000
|
);
|
|
3001
|
+
|
|
3002
|
+
// Update the content table:
|
|
3003
|
+
// - If collection uses draft revisions: only update metadata (no data fields, no slug)
|
|
3004
|
+
// - Otherwise: update everything as before
|
|
3005
|
+
const result =
|
|
3006
|
+
usesDraftRevisions && !liveMetaTouched
|
|
3007
|
+
? await handleContentGet(this.db, collection, resolvedId)
|
|
3008
|
+
: await handleContentUpdate(this.db, collection, resolvedId, {
|
|
3009
|
+
...bodyWithoutRev,
|
|
3010
|
+
data: usesDraftRevisions ? undefined : processedData,
|
|
3011
|
+
slug: usesDraftRevisions ? undefined : bodyWithoutRev.slug,
|
|
3012
|
+
authorId: bodyWithoutRev.authorId,
|
|
3013
|
+
bylines: bodyWithoutRev.bylines,
|
|
3014
|
+
});
|
|
3015
|
+
|
|
2918
3016
|
const liveContentChanged = usesDraftRevisions
|
|
2919
3017
|
? liveMetaTouched
|
|
2920
3018
|
: Boolean(processedData || bodyWithoutRev.slug !== undefined || liveMetaTouched);
|
|
@@ -3072,7 +3170,11 @@ export class EmDashRuntime {
|
|
|
3072
3170
|
async handleContentPublish(
|
|
3073
3171
|
collection: string,
|
|
3074
3172
|
id: string,
|
|
3075
|
-
options: {
|
|
3173
|
+
options: {
|
|
3174
|
+
publishedAt?: string;
|
|
3175
|
+
requireScheduledDue?: boolean;
|
|
3176
|
+
expectedScheduledAt?: string;
|
|
3177
|
+
} = {},
|
|
3076
3178
|
) {
|
|
3077
3179
|
const result = await handleContentPublish(this.db, collection, id, options);
|
|
3078
3180
|
if (result.success && result.data) {
|
|
@@ -3295,6 +3397,18 @@ export class EmDashRuntime {
|
|
|
3295
3397
|
// must then `content_publish` to promote the restored draft to
|
|
3296
3398
|
// live, matching the documented tool contract.
|
|
3297
3399
|
try {
|
|
3400
|
+
const contentRepo = new ContentRepository(this.db);
|
|
3401
|
+
const existing = await contentRepo.findById(revision.collection, revision.entryId);
|
|
3402
|
+
if (!existing) {
|
|
3403
|
+
return {
|
|
3404
|
+
success: false as const,
|
|
3405
|
+
error: {
|
|
3406
|
+
code: "NOT_FOUND",
|
|
3407
|
+
message: `Content item not found: ${revision.entryId}`,
|
|
3408
|
+
},
|
|
3409
|
+
};
|
|
3410
|
+
}
|
|
3411
|
+
|
|
3298
3412
|
const newDraft = await revisionRepo.create({
|
|
3299
3413
|
collection: revision.collection,
|
|
3300
3414
|
entryId: revision.entryId,
|
|
@@ -3302,18 +3416,45 @@ export class EmDashRuntime {
|
|
|
3302
3416
|
authorId: callerUserId,
|
|
3303
3417
|
});
|
|
3304
3418
|
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3419
|
+
try {
|
|
3420
|
+
const staged = await contentRepo.replaceDraftRevision(
|
|
3421
|
+
revision.collection,
|
|
3422
|
+
revision.entryId,
|
|
3423
|
+
newDraft.id,
|
|
3424
|
+
existing,
|
|
3425
|
+
);
|
|
3426
|
+
if (!staged) throw new ContentMutationConflictError();
|
|
3427
|
+
} catch (error) {
|
|
3428
|
+
try {
|
|
3429
|
+
await revisionRepo.deleteIfUnreferenced(
|
|
3430
|
+
revision.collection,
|
|
3431
|
+
revision.entryId,
|
|
3432
|
+
newDraft.id,
|
|
3433
|
+
);
|
|
3434
|
+
} catch (cleanupError) {
|
|
3435
|
+
console.error(
|
|
3436
|
+
`[emdash] Failed to clean up unrestored revision ${newDraft.id}:`,
|
|
3437
|
+
cleanupError,
|
|
3438
|
+
);
|
|
3439
|
+
}
|
|
3440
|
+
throw error;
|
|
3441
|
+
}
|
|
3312
3442
|
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3443
|
+
after(async () => {
|
|
3444
|
+
try {
|
|
3445
|
+
await revisionRepo.pruneQueuedEntry(
|
|
3446
|
+
revision.collection,
|
|
3447
|
+
revision.entryId,
|
|
3448
|
+
newDraft.id,
|
|
3449
|
+
50,
|
|
3450
|
+
);
|
|
3451
|
+
} catch (error) {
|
|
3452
|
+
console.error(
|
|
3453
|
+
`[revisions] Failed to prune revisions for ${revision.collection}/${revision.entryId}:`,
|
|
3454
|
+
error,
|
|
3455
|
+
);
|
|
3456
|
+
}
|
|
3457
|
+
});
|
|
3317
3458
|
|
|
3318
3459
|
// Return the freshly-fetched item with the new draft hydrated
|
|
3319
3460
|
// onto `data`. Without this the response would echo the live
|
|
@@ -3326,6 +3467,12 @@ export class EmDashRuntime {
|
|
|
3326
3467
|
}
|
|
3327
3468
|
return hydrated;
|
|
3328
3469
|
} catch (error) {
|
|
3470
|
+
if (error instanceof ContentMutationConflictError) {
|
|
3471
|
+
return {
|
|
3472
|
+
success: false as const,
|
|
3473
|
+
error: { code: "CONFLICT", message: error.message },
|
|
3474
|
+
};
|
|
3475
|
+
}
|
|
3329
3476
|
console.error("[emdash] revision restore failed:", error);
|
|
3330
3477
|
return {
|
|
3331
3478
|
success: false as const,
|
|
@@ -3459,12 +3606,8 @@ export class EmDashRuntime {
|
|
|
3459
3606
|
|
|
3460
3607
|
const routeKey = path.replace(LEADING_SLASH_PATTERN, "");
|
|
3461
3608
|
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
body = await request.json();
|
|
3465
|
-
} catch {
|
|
3466
|
-
// No body or not JSON
|
|
3467
|
-
}
|
|
3609
|
+
// Body methods parse JSON; GET/HEAD/DELETE parse the query string (#2146).
|
|
3610
|
+
const body = await parseRouteInput(request);
|
|
3468
3611
|
|
|
3469
3612
|
return routeRegistry.invoke(pluginId, routeKey, { request, body });
|
|
3470
3613
|
}
|
|
@@ -3675,7 +3818,13 @@ export class EmDashRuntime {
|
|
|
3675
3818
|
const imageFields = collectionInfo.fields.filter(
|
|
3676
3819
|
(f) => f.type === "image" || f.type === "file",
|
|
3677
3820
|
);
|
|
3678
|
-
|
|
3821
|
+
// Repeater fields can contain image sub-fields, whose values need the same normalization
|
|
3822
|
+
// (a bare media id posted inside a repeater item would otherwise be stored verbatim and
|
|
3823
|
+
// render as "Image not found" in the admin).
|
|
3824
|
+
const repeaterFields = collectionInfo.fields.filter(
|
|
3825
|
+
(f) => f.type === "repeater" && Array.isArray(f.validation?.subFields),
|
|
3826
|
+
);
|
|
3827
|
+
if (imageFields.length === 0 && repeaterFields.length === 0) return data;
|
|
3679
3828
|
|
|
3680
3829
|
const getProvider = (id: string) => this.getMediaProvider(id);
|
|
3681
3830
|
const result = { ...data };
|
|
@@ -3694,6 +3843,37 @@ export class EmDashRuntime {
|
|
|
3694
3843
|
}
|
|
3695
3844
|
}
|
|
3696
3845
|
|
|
3846
|
+
for (const field of repeaterFields) {
|
|
3847
|
+
const value = result[field.slug];
|
|
3848
|
+
if (!Array.isArray(value)) continue;
|
|
3849
|
+
|
|
3850
|
+
const mediaSubFieldSlugs = (field.validation?.subFields ?? [])
|
|
3851
|
+
.filter((sub) => sub.type === "image")
|
|
3852
|
+
.map((sub) => sub.slug);
|
|
3853
|
+
if (mediaSubFieldSlugs.length === 0) continue;
|
|
3854
|
+
|
|
3855
|
+
const items: unknown[] = value;
|
|
3856
|
+
result[field.slug] = await Promise.all(
|
|
3857
|
+
items.map(async (item) => {
|
|
3858
|
+
if (!isRecord(item)) return item;
|
|
3859
|
+
const normalizedItem: Record<string, unknown> = { ...item };
|
|
3860
|
+
for (const slug of mediaSubFieldSlugs) {
|
|
3861
|
+
const subValue = normalizedItem[slug];
|
|
3862
|
+
if (subValue == null) continue;
|
|
3863
|
+
try {
|
|
3864
|
+
const normalized = await normalizeMediaValue(subValue, getProvider);
|
|
3865
|
+
if (normalized) {
|
|
3866
|
+
normalizedItem[slug] = normalized;
|
|
3867
|
+
}
|
|
3868
|
+
} catch {
|
|
3869
|
+
// Don't fail the save if normalization fails for a single sub-field
|
|
3870
|
+
}
|
|
3871
|
+
}
|
|
3872
|
+
return normalizedItem;
|
|
3873
|
+
}),
|
|
3874
|
+
);
|
|
3875
|
+
}
|
|
3876
|
+
|
|
3697
3877
|
return result;
|
|
3698
3878
|
}
|
|
3699
3879
|
|
|
@@ -3906,12 +4086,8 @@ export class EmDashRuntime {
|
|
|
3906
4086
|
}> {
|
|
3907
4087
|
const routeName = path.replace(LEADING_SLASH_PATTERN, "");
|
|
3908
4088
|
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
body = await request.json();
|
|
3912
|
-
} catch {
|
|
3913
|
-
// No body or not JSON
|
|
3914
|
-
}
|
|
4089
|
+
// Body methods parse JSON; GET/HEAD/DELETE parse the query string (#2146).
|
|
4090
|
+
const body = await parseRouteInput(request);
|
|
3915
4091
|
|
|
3916
4092
|
try {
|
|
3917
4093
|
const headers = sanitizeHeadersForSandbox(request.headers);
|
package/src/index.ts
CHANGED
|
@@ -510,6 +510,7 @@ export type {
|
|
|
510
510
|
|
|
511
511
|
// Search
|
|
512
512
|
export {
|
|
513
|
+
SEARCH_TOKENIZERS,
|
|
513
514
|
FTSManager,
|
|
514
515
|
search,
|
|
515
516
|
searchWithDb,
|
|
@@ -521,6 +522,7 @@ export {
|
|
|
521
522
|
} from "./search/index.js";
|
|
522
523
|
export type {
|
|
523
524
|
SearchConfig,
|
|
525
|
+
SearchTokenizer,
|
|
524
526
|
SearchOptions,
|
|
525
527
|
CollectionSearchOptions,
|
|
526
528
|
SearchResult,
|