emdash 0.31.1 → 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 +23 -21
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-BkqFzIu4.mjs → api-D2hunekQ.mjs} +254 -48
- package/dist/api-D2hunekQ.mjs.map +1 -0
- package/dist/{api-tokens-uPt8UDpx.mjs → api-tokens-CSND0i1z.mjs} +2 -2
- package/dist/{api-tokens-uPt8UDpx.mjs.map → api-tokens-CSND0i1z.mjs.map} +1 -1
- package/dist/{apply-DuXsqll7.mjs → apply-kwNEJW2l.mjs} +36 -23
- package/dist/apply-kwNEJW2l.mjs.map +1 -0
- package/dist/astro/index.d.mts +12 -12
- package/dist/astro/index.mjs +17 -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 +370 -171
- 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 +19 -18
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +19 -18
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +19 -19
- 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 +13 -11
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- 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 +47 -44
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +46 -43
- 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 +46 -43
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +46 -43
- 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 +46 -43
- 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 +46 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +46 -43
- 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 +47 -44
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +46 -43
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +46 -43
- 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 +46 -43
- 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 +7 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs.map +1 -1
- 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 +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +19 -17
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +19 -17
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- 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 +17 -16
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- 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 +16 -15
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- 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 +13 -11
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +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 +28 -27
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +106 -37
- package/dist/astro/routes/api/media/_id_/confirm.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/upload.d.mts +8 -0
- package/dist/astro/routes/api/media/_id_/upload.d.mts.map +1 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs +168 -0
- package/dist/astro/routes/api/media/_id_/upload.mjs.map +1 -0
- package/dist/astro/routes/api/media/_id_/usage.mjs +15 -13
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +22 -15
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- 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.d.mts.map +1 -1
- package/dist/astro/routes/api/media/upload-url.mjs +35 -24
- package/dist/astro/routes/api/media/upload-url.mjs.map +1 -1
- package/dist/astro/routes/api/media.mjs +14 -13
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +12 -11
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +12 -11
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- 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 +62 -9
- 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 +19 -17
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/translations.mjs +14 -12
- package/dist/astro/routes/api/relations/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +19 -17
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +4 -4
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +46 -43
- 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 +46 -43
- 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 +46 -43
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +46 -43
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +46 -43
- 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 +12 -8
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +46 -43
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +46 -43
- 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 +18 -13
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +12 -11
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +14 -13
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +8 -7
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +12 -11
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- 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 +31 -29
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.mjs +33 -31
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- 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 +17 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +17 -16
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +22 -18
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +17 -16
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- 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 +13 -13
- package/dist/astro/routes/sitemap.xml.mjs +10 -10
- package/dist/astro/types.d.mts +20 -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-6WPZa1xZ.mjs → authorize-qRhWQnel.mjs} +2 -2
- package/dist/{authorize-6WPZa1xZ.mjs.map → authorize-qRhWQnel.mjs.map} +1 -1
- package/dist/{backup-DoW-H0r4.mjs → backup-CtA6LDNw.mjs} +5 -5
- package/dist/{backup-DoW-H0r4.mjs.map → backup-CtA6LDNw.mjs.map} +1 -1
- package/dist/{byline-BTOxUlFF.mjs → byline-Cp6csL84.mjs} +9 -9
- package/dist/{byline-BTOxUlFF.mjs.map → byline-Cp6csL84.mjs.map} +1 -1
- package/dist/{byline-fields-CdU_LTF1.mjs → byline-fields-CNc0Yq5i.mjs} +2 -2
- package/dist/{byline-fields-CdU_LTF1.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-Bc-3xtpz.mjs → bylines-CEj5CdT4.mjs} +7 -7
- package/dist/{bylines-Bc-3xtpz.mjs.map → bylines-CEj5CdT4.mjs.map} +1 -1
- package/dist/{bylines-oVN0iPwX.mjs → bylines-cf-C9lmF.mjs} +5 -5
- package/dist/{bylines-oVN0iPwX.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-Bq-5DPrD.mjs → chunks-DbYzib_k.mjs} +2 -2
- package/dist/{chunks-Bq-5DPrD.mjs.map → chunks-DbYzib_k.mjs.map} +1 -1
- package/dist/cli/index.mjs +41 -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-B9cUud8H.mjs → comment-BIkJ6Fil.mjs} +3 -3
- package/dist/{comment-B9cUud8H.mjs.map → comment-BIkJ6Fil.mjs.map} +1 -1
- package/dist/{comment-reaction-VUXO981F.mjs → comment-reaction-D-laEceb.mjs} +2 -2
- package/dist/{comment-reaction-VUXO981F.mjs.map → comment-reaction-D-laEceb.mjs.map} +1 -1
- package/dist/{comments-PXj1E9Si.mjs → comments-0_w6KChA.mjs} +3 -3
- package/dist/{comments-PXj1E9Si.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/{config-B6b_BobR.mjs → config-DyF3OKg_.mjs} +15 -10
- package/dist/config-DyF3OKg_.mjs.map +1 -0
- package/dist/{content-BC43pICM.mjs → content-CJ94NEx5.mjs} +170 -117
- package/dist/content-CJ94NEx5.mjs.map +1 -0
- package/dist/{content-refresh-CPMSauD3.mjs → content-refresh-Xw7aKmou.mjs} +7 -7
- package/dist/{content-refresh-CPMSauD3.mjs.map → content-refresh-Xw7aKmou.mjs.map} +1 -1
- package/dist/{context-DOurRIrb.mjs → context-C_1nrqnW.mjs} +14 -14
- package/dist/{context-DOurRIrb.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-CBm4zhc3.mjs → dashboard-DINnNVVU.mjs} +5 -5
- package/dist/{dashboard-CBm4zhc3.mjs.map → dashboard-DINnNVVU.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +3 -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-BeA6lUS1.mjs → device-flow-CTqd8mud.mjs} +5 -5
- package/dist/{device-flow-BeA6lUS1.mjs.map → device-flow-CTqd8mud.mjs.map} +1 -1
- package/dist/{dialect-helpers-BtOwo2us.mjs → dialect-helpers-BSbfaO3F.mjs} +43 -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-DJ98TRbQ.mjs → error-oh_9i6bR.mjs} +3 -3
- package/dist/{error-DJ98TRbQ.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-CFedIB1C.mjs → escape-CXps5F_v.mjs} +1 -1
- package/dist/{escape-CFedIB1C.mjs.map → escape-CXps5F_v.mjs.map} +1 -1
- package/dist/{field-defs-cache-KfNJ_qLQ.mjs → field-defs-cache-WD82dMQq.mjs} +4 -4
- package/dist/{field-defs-cache-KfNJ_qLQ.mjs.map → field-defs-cache-WD82dMQq.mjs.map} +1 -1
- package/dist/{fts-manager-hyCU9OOp.mjs → fts-manager-BITakW_R.mjs} +37 -13
- package/dist/fts-manager-BITakW_R.mjs.map +1 -0
- package/dist/{hash-DFFrkivP.mjs → hash-Cg0TXJPV.mjs} +8 -4
- package/dist/hash-Cg0TXJPV.mjs.map +1 -0
- package/dist/{hreflang-CIxH_LKz.d.mts → hreflang-BaLCNcDx.d.mts} +2 -2
- package/dist/{hreflang-CIxH_LKz.d.mts.map → hreflang-BaLCNcDx.d.mts.map} +1 -1
- package/dist/{hreflang-CbYeCzl9.mjs → hreflang-BdZuVBhL.mjs} +7 -7
- package/dist/{hreflang-CbYeCzl9.mjs.map → hreflang-BdZuVBhL.mjs.map} +1 -1
- package/dist/{import-oDYCgNYQ.mjs → import-C-9uqyT3.mjs} +6 -6
- package/dist/{import-oDYCgNYQ.mjs.map → import-C-9uqyT3.mjs.map} +1 -1
- package/dist/{index-BZJ_5FOX.d.mts → index-M37iz29I.d.mts} +112 -37
- package/dist/index-M37iz29I.d.mts.map +1 -0
- package/dist/{index-BEui-cRd.d.mts → index-MGw47uWq.d.mts} +3 -3
- package/dist/{index-BEui-cRd.d.mts.map → index-MGw47uWq.d.mts.map} +1 -1
- package/dist/index.d.mts +19 -19
- package/dist/index.mjs +69 -67
- package/dist/{load-Dg5gtWma.mjs → load-DV1DZuUJ.mjs} +2 -2
- package/dist/{load-Dg5gtWma.mjs.map → load-DV1DZuUJ.mjs.map} +1 -1
- package/dist/{loader-D4rigvjR.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-its1WLYv.mjs → media-BP7S-nHT.mjs} +60 -15
- package/dist/media-BP7S-nHT.mjs.map +1 -0
- package/dist/{media-BJ6SRY3g.mjs → media-OhYL-7Io.mjs} +8 -4
- package/dist/{media-BJ6SRY3g.mjs.map → media-OhYL-7Io.mjs.map} +1 -1
- package/dist/{media-allowlist-jUppPWFy.mjs → media-allowlist-D-peH1H5.mjs} +1 -1
- package/dist/{media-allowlist-jUppPWFy.mjs.map → media-allowlist-D-peH1H5.mjs.map} +1 -1
- package/dist/{media-upload-DNu3QySc.mjs → media-upload-DtrwU2B0.mjs} +7 -7
- package/dist/{media-upload-DNu3QySc.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-DPQ3K4xB.mjs → media-usage-BlxfTkN0.mjs} +8 -8
- package/dist/{media-usage-DPQ3K4xB.mjs.map → media-usage-BlxfTkN0.mjs.map} +1 -1
- package/dist/{menus-BMGzWyWH.mjs → menus-BcQWxeXu.mjs} +5 -5
- package/dist/{menus-BMGzWyWH.mjs.map → menus-BcQWxeXu.mjs.map} +1 -1
- package/dist/{menus-CPf_SW7u.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-oqfbBuMH.mjs → oauth-authorization-ClvktmrL.mjs} +5 -5
- package/dist/{oauth-authorization-oqfbBuMH.mjs.map → oauth-authorization-ClvktmrL.mjs.map} +1 -1
- package/dist/{oauth-clients-BlrUHAsf.mjs → oauth-clients-8ao-U66l.mjs} +1 -1
- package/dist/{oauth-clients-BlrUHAsf.mjs.map → oauth-clients-8ao-U66l.mjs.map} +1 -1
- package/dist/{oauth-state-store-DnvjRMy6.mjs → oauth-state-store-B1ofdTiQ.mjs} +1 -1
- package/dist/{oauth-state-store-DnvjRMy6.mjs.map → oauth-state-store-B1ofdTiQ.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-oUllxvAv.mjs → oauth-user-lookup-CscEuIiR.mjs} +1 -1
- package/dist/{oauth-user-lookup-oUllxvAv.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-BqMkWfYa.d.mts → options-CA4eVX6P.d.mts} +3 -3
- package/dist/{options-BqMkWfYa.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-53zyxlpv.mjs → parse-CJKNuewM.mjs} +2 -2
- package/dist/{parse-53zyxlpv.mjs.map → parse-CJKNuewM.mjs.map} +1 -1
- package/dist/{passkey-config-C-SKpc0-.mjs → passkey-config-D-zrzMJI.mjs} +1 -1
- package/dist/{passkey-config-C-SKpc0-.mjs.map → passkey-config-D-zrzMJI.mjs.map} +1 -1
- package/dist/{placeholder-Dop47JMM.d.mts → placeholder-DaeNS-VG.d.mts} +1 -1
- package/dist/{placeholder-Dop47JMM.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-sDj92Kxv.mjs → portable-text-B_kqBmXB.mjs} +1 -1
- package/dist/{portable-text-sDj92Kxv.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-Bz9bWZfm.mjs → query-C5w7PsRQ.mjs} +43 -44
- package/dist/query-C5w7PsRQ.mjs.map +1 -0
- package/dist/{query-DdFGHzQF.mjs → query-rC9HKv1N.mjs} +4 -4
- package/dist/{query-DdFGHzQF.mjs.map → query-rC9HKv1N.mjs.map} +1 -1
- package/dist/{rate-limit-D3IEiUi2.mjs → rate-limit-kug6q99V.mjs} +2 -2
- package/dist/{rate-limit-D3IEiUi2.mjs.map → rate-limit-kug6q99V.mjs.map} +1 -1
- package/dist/{redirect-BoUac4NT.mjs → redirect-DIJxXKOG.mjs} +3 -3
- package/dist/{redirect-BoUac4NT.mjs.map → redirect-DIJxXKOG.mjs.map} +1 -1
- package/dist/{redirect-Botom7X6.mjs → redirect-Egf2R9yP.mjs} +1 -1
- package/dist/{redirect-Botom7X6.mjs.map → redirect-Egf2R9yP.mjs.map} +1 -1
- package/dist/{redirects-ChbpqKiS.mjs → redirects-Bzm812bY.mjs} +5 -5
- package/dist/{redirects-ChbpqKiS.mjs.map → redirects-Bzm812bY.mjs.map} +1 -1
- package/dist/{redirects-D457qwt0.mjs → redirects-G8wAhWAf.mjs} +25 -7
- package/dist/redirects-G8wAhWAf.mjs.map +1 -0
- package/dist/{registry-y21kjhfG.mjs → registry-Dbodb4Uo.mjs} +59 -14
- package/dist/registry-Dbodb4Uo.mjs.map +1 -0
- package/dist/{relation-Du0r04E0.mjs → relation-Cbe3Sd3m.mjs} +3 -3
- package/dist/{relation-Du0r04E0.mjs.map → relation-Cbe3Sd3m.mjs.map} +1 -1
- package/dist/{relations-CZMpBqEd.mjs → relations-Bw_E1TXo.mjs} +3 -3
- package/dist/{relations-CZMpBqEd.mjs.map → relations-Bw_E1TXo.mjs.map} +1 -1
- package/dist/{relations-qKmSj9KM.d.mts → relations-G2ta7GIl.d.mts} +50 -12
- package/dist/relations-G2ta7GIl.d.mts.map +1 -0
- package/dist/{relations-DtX1UMBH.mjs → relations-qHwpUe66.mjs} +6 -6
- package/dist/{relations-DtX1UMBH.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-DFr4kq72.mjs → resolve-DZzG4HqM.mjs} +2 -2
- package/dist/{resolve-DFr4kq72.mjs.map → resolve-DZzG4HqM.mjs.map} +1 -1
- package/dist/{runner-BdeLEgad.mjs → runner-BFTrkYhu.mjs} +497 -213
- package/dist/runner-BFTrkYhu.mjs.map +1 -0
- package/dist/{runner-Dd8m8k9F.d.mts → runner-BaADli8l.d.mts} +2 -2
- package/dist/{runner-Dd8m8k9F.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-BH8P8vaC.mjs → schema-CiQXr6_F.mjs} +3 -3
- package/dist/{schema-BH8P8vaC.mjs.map → schema-CiQXr6_F.mjs.map} +1 -1
- package/dist/{scopes-DTIkIaGA.mjs → scopes-CNJVT5i5.mjs} +3 -3
- package/dist/{scopes-DTIkIaGA.mjs.map → scopes-CNJVT5i5.mjs.map} +1 -1
- package/dist/{search-D-Yhpmvs.mjs → search-FZhx5dDU.mjs} +7 -7
- package/dist/{search-D-Yhpmvs.mjs.map → search-FZhx5dDU.mjs.map} +1 -1
- package/dist/{secrets-CQ-69kF9.mjs → secrets-DLd8RXee.mjs} +4 -4
- package/dist/{secrets-CQ-69kF9.mjs.map → secrets-DLd8RXee.mjs.map} +1 -1
- package/dist/{sections-CzVBAKjw.mjs → sections-BrIrMUCn.mjs} +3 -3
- package/dist/{sections-CzVBAKjw.mjs.map → sections-BrIrMUCn.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +25 -23
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +18 -16
- package/dist/seo/index.mjs.map +1 -1
- 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-kJzVAmmu.mjs → seo-DTHRntNC.mjs} +3 -3
- package/dist/{seo-kJzVAmmu.mjs.map → seo-DTHRntNC.mjs.map} +1 -1
- package/dist/{service-CQnc276a.mjs → service-B-pYGPgR.mjs} +4 -4
- package/dist/{service-CQnc276a.mjs.map → service-B-pYGPgR.mjs.map} +1 -1
- package/dist/{session-user-DbHqKDKe.mjs → session-user-BvM9-zNl.mjs} +2 -2
- package/dist/{session-user-DbHqKDKe.mjs.map → session-user-BvM9-zNl.mjs.map} +1 -1
- package/dist/{settings-Dtc0DU31.mjs → settings-DPHau-WH.mjs} +3 -3
- package/dist/{settings-Dtc0DU31.mjs.map → settings-DPHau-WH.mjs.map} +1 -1
- package/dist/{settings-C2PaBS49.mjs → settings-kJhGiQ4z.mjs} +7 -7
- package/dist/{settings-C2PaBS49.mjs.map → settings-kJhGiQ4z.mjs.map} +1 -1
- package/dist/{setup-complete-CdIlqloh.mjs → setup-complete-u50Qm8rY.mjs} +2 -2
- package/dist/{setup-complete-CdIlqloh.mjs.map → setup-complete-u50Qm8rY.mjs.map} +1 -1
- package/dist/{setup-nonce-DqiIPr-J.mjs → setup-nonce-DCjiiOD2.mjs} +1 -1
- package/dist/{setup-nonce-DqiIPr-J.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 +2 -2
- package/dist/storage/s3.mjs.map +1 -1
- package/dist/{taxonomies-BN6M9Nrv.mjs → taxonomies-CKuaZER5.mjs} +90 -9
- package/dist/taxonomies-CKuaZER5.mjs.map +1 -0
- package/dist/{taxonomies-r7pqLBCn.mjs → taxonomies-CLN1N92E.mjs} +57 -32
- package/dist/taxonomies-CLN1N92E.mjs.map +1 -0
- package/dist/{taxonomy-0mCI25HN.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-Vd7VdqHv.d.mts → transport-CAwTaTp_.d.mts} +1 -1
- package/dist/{transport-Vd7VdqHv.d.mts.map → transport-CAwTaTp_.d.mts.map} +1 -1
- package/dist/{transport-CKrlqSpD.mjs → transport-DVsa5YYo.mjs} +1 -1
- package/dist/{transport-CKrlqSpD.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-BfYUPJdP.d.mts → types-BGWPMiBO.d.mts} +2 -2
- package/dist/{types-BfYUPJdP.d.mts.map → types-BGWPMiBO.d.mts.map} +1 -1
- package/dist/{types-iVeZ5g6N.d.mts → types-BK6U01Ro.d.mts} +1 -1
- package/dist/{types-iVeZ5g6N.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-Kmaxdarz.d.mts → types-BnFP1M3J.d.mts} +22 -1
- package/dist/types-BnFP1M3J.d.mts.map +1 -0
- package/dist/{types-C7U0HlEr.d.mts → types-C8oz_ayJ.d.mts} +1 -1
- package/dist/{types-C7U0HlEr.d.mts.map → types-C8oz_ayJ.d.mts.map} +1 -1
- package/dist/{types-B4vm81VH.d.mts → types-CbUcuxxc.d.mts} +1 -1
- package/dist/{types-B4vm81VH.d.mts.map → types-CbUcuxxc.d.mts.map} +1 -1
- package/dist/{types-CrRUFdej.mjs → types-Cd8iuS1J.mjs} +10 -3
- package/dist/{types-CrRUFdej.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-BvB7gDOD.d.mts → types-Cz8hNch2.d.mts} +5 -5
- package/dist/{types-BvB7gDOD.d.mts.map → types-Cz8hNch2.d.mts.map} +1 -1
- package/dist/{types-B97jg3aW.d.mts → types-DLG4IFEQ.d.mts} +1 -1
- package/dist/{types-B97jg3aW.d.mts.map → types-DLG4IFEQ.d.mts.map} +1 -1
- package/dist/{types-DPKhI5ib.d.mts → types-Dc4ntQjQ.d.mts} +18 -1
- package/dist/types-Dc4ntQjQ.d.mts.map +1 -0
- package/dist/{types-BNfPHfay.d.mts → types-LoagAGzH.d.mts} +1 -1
- package/dist/{types-BNfPHfay.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-D8QAFLUJ.mjs +27 -0
- package/dist/upload-attempts-D8QAFLUJ.mjs.map +1 -0
- package/dist/{user-aTXqmXBz.mjs → user-DBrq4UVq.mjs} +3 -3
- package/dist/{user-aTXqmXBz.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-DULfgpJP.d.mts → validate-C3oSmA7F.d.mts} +15 -5
- package/dist/validate-C3oSmA7F.d.mts.map +1 -0
- package/dist/{validate-CDT1jl6_.mjs → validate-mKo3RxBM.mjs} +4 -4
- package/dist/{validate-CDT1jl6_.mjs.map → validate-mKo3RxBM.mjs.map} +1 -1
- package/dist/{validation-DlD0E35W.mjs → validation-BgpucsvF.mjs} +11 -9
- package/dist/{validation-DlD0E35W.mjs.map → validation-BgpucsvF.mjs.map} +1 -1
- package/dist/version-C4PnpmoV.mjs +7 -0
- package/dist/{version-BRMngh9I.mjs.map → version-C4PnpmoV.mjs.map} +1 -1
- package/dist/{widgets-5fipNkMT.mjs → widgets-CJJtkiKh.mjs} +3 -3
- package/dist/{widgets-5fipNkMT.mjs.map → widgets-CJJtkiKh.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-DrihupaC.mjs → wxr-taxonomies-9PPSy8X6.mjs} +4 -4
- package/dist/{wxr-taxonomies-DrihupaC.mjs.map → wxr-taxonomies-9PPSy8X6.mjs.map} +1 -1
- package/dist/{wxr-taxonomies-B4tMuN5T.d.mts → wxr-taxonomies-Bkpp_2tK.d.mts} +1 -1
- package/dist/{wxr-taxonomies-B4tMuN5T.d.mts.map → wxr-taxonomies-Bkpp_2tK.d.mts.map} +1 -1
- package/dist/{zod-generator-CwkHWz4f.mjs → zod-generator-CG64Hnbh.mjs} +3 -3
- package/dist/{zod-generator-CwkHWz4f.mjs.map → zod-generator-CG64Hnbh.mjs.map} +1 -1
- package/package.json +12 -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/media.ts +4 -4
- 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 +111 -10
- package/src/api/openapi/document.ts +84 -3
- package/src/api/public-url.ts +14 -2
- package/src/api/schemas/media.ts +9 -2
- package/src/api/schemas/schema.ts +13 -0
- package/src/api/schemas/search.ts +2 -0
- package/src/api/schemas/taxonomies.ts +34 -1
- package/src/api/site-url.ts +16 -6
- package/src/astro/integration/routes.ts +19 -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/content/[collection]/[id].ts +3 -1
- package/src/astro/routes/api/media/[id]/confirm.ts +148 -59
- package/src/astro/routes/api/media/[id]/upload.ts +262 -0
- package/src/astro/routes/api/media/[id].ts +19 -10
- package/src/astro/routes/api/media/upload-url.ts +28 -31
- 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/routes/api/taxonomies/[name]/terms/index.ts +6 -3
- package/src/astro/types.ts +7 -0
- package/src/cleanup.ts +54 -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 +175 -31
- package/src/components/OrderedList.astro +14 -0
- package/src/components/PortableText.astro +26 -4
- package/src/components/code-mark.ts +11 -0
- 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 +41 -22
- package/src/database/migrations/054_media_upload_attempts.ts +41 -0
- 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 +12 -0
- package/src/database/repositories/content.ts +193 -183
- package/src/database/repositories/media.ts +158 -28
- 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 +23 -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 +277 -88
- package/src/i18n/config.ts +17 -10
- package/src/index.ts +3 -0
- package/src/loader.ts +46 -24
- package/src/media/upload-attempts.ts +33 -0
- 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 +50 -44
- 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/storage/s3.ts +1 -1
- package/src/taxonomies/index.ts +11 -7
- package/src/taxonomies/term-counts.ts +56 -28
- package/src/ui-comments.ts +19 -0
- package/src/ui.ts +11 -3
- package/src/utils/hash.ts +14 -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-BkqFzIu4.mjs.map +0 -1
- package/dist/apply-DuXsqll7.mjs.map +0 -1
- package/dist/cache-DDwy3JDW.mjs +0 -65
- package/dist/cache-DDwy3JDW.mjs.map +0 -1
- package/dist/config-B6b_BobR.mjs.map +0 -1
- package/dist/content-BC43pICM.mjs.map +0 -1
- package/dist/dialect-helpers-BtOwo2us.mjs.map +0 -1
- package/dist/errors-DtEXIQQV.mjs.map +0 -1
- package/dist/fts-manager-hyCU9OOp.mjs.map +0 -1
- package/dist/hash-DFFrkivP.mjs.map +0 -1
- package/dist/index-BZJ_5FOX.d.mts.map +0 -1
- package/dist/loader-D4rigvjR.mjs.map +0 -1
- package/dist/media-its1WLYv.mjs.map +0 -1
- package/dist/menus-CPf_SW7u.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-Bz9bWZfm.mjs.map +0 -1
- package/dist/redirects-D457qwt0.mjs.map +0 -1
- package/dist/registry-y21kjhfG.mjs.map +0 -1
- package/dist/relations-qKmSj9KM.d.mts.map +0 -1
- package/dist/runner-BdeLEgad.mjs.map +0 -1
- package/dist/site-url-NGJT6NTU.mjs +0 -13
- package/dist/site-url-NGJT6NTU.mjs.map +0 -1
- package/dist/taxonomies-BN6M9Nrv.mjs.map +0 -1
- package/dist/taxonomies-r7pqLBCn.mjs.map +0 -1
- package/dist/taxonomy-0mCI25HN.mjs.map +0 -1
- package/dist/types-DPKhI5ib.d.mts.map +0 -1
- package/dist/types-Kmaxdarz.d.mts.map +0 -1
- package/dist/types-o7xo7VgH.mjs.map +0 -1
- package/dist/validate-DULfgpJP.d.mts.map +0 -1
- package/dist/validate-VPnKoIzW.mjs.map +0 -1
- package/dist/version-BRMngh9I.mjs +0 -7
- /package/dist/{api-tokens-Cvmixds7.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
|
@@ -1,87 +1,90 @@
|
|
|
1
|
-
import { a as runMigrations, n as MIGRATION_RACE_WAIT_MS, t as ConcurrentMigrationTimeoutError } from "../runner-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { t as after } from "../after-B1IIdH3Y.mjs";
|
|
1
|
+
import { a as runMigrations, n as MIGRATION_RACE_WAIT_MS, t as ConcurrentMigrationTimeoutError } from "../runner-BFTrkYhu.mjs";
|
|
2
|
+
import { c as isSqlite, u as listTablesLike } from "../dialect-helpers-BSbfaO3F.mjs";
|
|
3
|
+
import { a as setI18nConfig, n as getI18nConfig } from "../config-DyF3OKg_.mjs";
|
|
4
|
+
import { D as AuditRepository, b as definePlugin, g as EmailPipeline, h as parseRouteInput, m as buildRouteMeta, p as PluginRouteRegistry, t as getMenu, v as createHookPipeline, y as resolveExclusiveHooks } from "../menus-Y54RDPIN.mjs";
|
|
5
|
+
import { n as createDeferredTaskTracker, t as after } from "../after-CBU2vkoO.mjs";
|
|
7
6
|
import { createRequestMetrics, getRequestContext, runWithContext } from "../request-context.mjs";
|
|
8
|
-
import "../object-cache-
|
|
9
|
-
import { r as RevisionRepository, t as ContentRepository } from "../content-
|
|
7
|
+
import { o as getLastContentWriteAt } from "../object-cache-71tPfV4A.mjs";
|
|
8
|
+
import { r as RevisionRepository, t as ContentRepository } from "../content-CJ94NEx5.mjs";
|
|
10
9
|
import { n as isMissingTableError } from "../db-errors-CcWLaRiR.mjs";
|
|
11
10
|
import "../base64-B-PsqheR.mjs";
|
|
12
|
-
import "../types-
|
|
13
|
-
import { t as MediaRepository } from "../media-
|
|
14
|
-
import "../user-
|
|
15
|
-
import "../taxonomy-
|
|
16
|
-
import "../comment-
|
|
17
|
-
import { t as OptionsRepository } from "../options-
|
|
18
|
-
import { r as createSiteInfo } from "../context-
|
|
19
|
-
import "../menus-
|
|
20
|
-
import "../redirect-
|
|
11
|
+
import { t as ContentMutationConflictError } from "../types-Cd8iuS1J.mjs";
|
|
12
|
+
import { t as MediaRepository } from "../media-BP7S-nHT.mjs";
|
|
13
|
+
import "../user-DBrq4UVq.mjs";
|
|
14
|
+
import "../taxonomy-pOrB2kZe.mjs";
|
|
15
|
+
import "../comment-BIkJ6Fil.mjs";
|
|
16
|
+
import { t as OptionsRepository } from "../options-CBXIHUoT.mjs";
|
|
17
|
+
import { r as createSiteInfo } from "../context-C_1nrqnW.mjs";
|
|
18
|
+
import "../menus-BcQWxeXu.mjs";
|
|
19
|
+
import "../redirect-DIJxXKOG.mjs";
|
|
21
20
|
import { i as setRequestCacheEntry, r as requestCached } from "../request-cache-BSUptuJR.mjs";
|
|
22
|
-
import "../byline-registry-
|
|
21
|
+
import "../byline-registry-ZkPKqEwC.mjs";
|
|
23
22
|
import { n as initWithLock, t as createInitLock } from "../init-lock-DJkX6Hto.mjs";
|
|
24
|
-
import "../field-defs-cache-
|
|
25
|
-
import "../byline-
|
|
26
|
-
import "../relation-
|
|
23
|
+
import "../field-defs-cache-WD82dMQq.mjs";
|
|
24
|
+
import "../byline-Cp6csL84.mjs";
|
|
25
|
+
import "../relation-Cbe3Sd3m.mjs";
|
|
27
26
|
import { n as normalizeMediaValue } from "../normalize-C-SHXmra.mjs";
|
|
28
27
|
import "../enrich-CFJJgxs_.mjs";
|
|
29
|
-
import "../seo-
|
|
30
|
-
import { t as
|
|
31
|
-
import "../
|
|
28
|
+
import "../seo-DTHRntNC.mjs";
|
|
29
|
+
import { r as singleFlightCached, t as createSingleFlightCache } from "../single-flight-cache-DW3w11Pu.mjs";
|
|
30
|
+
import "../cache-C9FptTFR.mjs";
|
|
31
|
+
import { t as FTSManager } from "../fts-manager-BITakW_R.mjs";
|
|
32
|
+
import "../resolve-DZzG4HqM.mjs";
|
|
32
33
|
import { createRecorder, flushRecorder, isInstrumentationEnabled, kyselyLogOption } from "../database/instrumentation.mjs";
|
|
33
|
-
import {
|
|
34
|
-
import { a as getTaxonomyDefs, o as getTaxonomyTerms } from "../taxonomies-
|
|
35
|
-
import { $ as
|
|
36
|
-
import "../dashboard-
|
|
37
|
-
import {
|
|
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-
|
|
44
|
-
import "../seo-
|
|
45
|
-
import { t as PluginStateRepository } from "../state-
|
|
46
|
-
import "../sections-
|
|
47
|
-
import {
|
|
48
|
-
import
|
|
49
|
-
import "../
|
|
50
|
-
import "../
|
|
51
|
-
import
|
|
52
|
-
import "../
|
|
53
|
-
import "../
|
|
54
|
-
import "../
|
|
55
|
-
import "../
|
|
56
|
-
import "../
|
|
57
|
-
import "../
|
|
58
|
-
import "../
|
|
59
|
-
import "../
|
|
60
|
-
import
|
|
61
|
-
import "../
|
|
62
|
-
import { t as
|
|
63
|
-
import
|
|
64
|
-
import "../
|
|
65
|
-
import {
|
|
66
|
-
import
|
|
67
|
-
import "../
|
|
68
|
-
import "../
|
|
69
|
-
import "../
|
|
70
|
-
import "../
|
|
71
|
-
import "../
|
|
72
|
-
import "../
|
|
73
|
-
import
|
|
74
|
-
import "../apply-
|
|
75
|
-
import "../load-
|
|
76
|
-
import "../search-
|
|
34
|
+
import { o as getDb } from "../loader-CGugY7Zl.mjs";
|
|
35
|
+
import { a as getTaxonomyDefs, o as getTaxonomyTerms } from "../taxonomies-CLN1N92E.mjs";
|
|
36
|
+
import { $ as handleContentDelete, B as handleMediaDelete, G as handleRevisionList, H as handleMediaList, J as handleContentAuthors, K as handleRevisionRestore, Q as handleContentCreate, U as handleMediaUpdate, V as handleMediaGet, W as handleRevisionGet, X as handleContentCountScheduled, Y as handleContentCompare, Z as handleContentCountTrashed, _ as loadBundleFromR2, at as handleContentListTrashed, ct as handleContentRestore, dt as handleContentUnpublish, et as handleContentDiscardDraft, ft as handleContentUnschedule, it as handleContentList, lt as handleContentSchedule, mt as validateRev, nt as handleContentGet, ot as handleContentPermanentDelete, pt as handleContentUpdate, rt as handleContentGetIncludingTrashed, s as normalizeRegistryConfig, st as handleContentPublish, tt as handleContentDuplicate, ut as handleContentTranslations, v as syncDeclaredStorageIndexes, z as handleMediaCreate } from "../api-D2hunekQ.mjs";
|
|
37
|
+
import "../dashboard-DINnNVVU.mjs";
|
|
38
|
+
import { r as hashString } from "../hash-Cg0TXJPV.mjs";
|
|
39
|
+
import { a as findNonTranslatableSiblingContentIds, c as refreshContentMediaUsageAfterWrite, g as MediaUsageRepository, o as markContentMediaUsageCollectionStale, r as deleteContentMediaUsage } from "../content-refresh-Xw7aKmou.mjs";
|
|
40
|
+
import "../media-usage-BlxfTkN0.mjs";
|
|
41
|
+
import { n as SchemaRegistry } from "../registry-Dbodb4Uo.mjs";
|
|
42
|
+
import "../query-rC9HKv1N.mjs";
|
|
43
|
+
import "../zod-generator-CG64Hnbh.mjs";
|
|
44
|
+
import "../schema-CiQXr6_F.mjs";
|
|
45
|
+
import "../seo-CobNfOvb.mjs";
|
|
46
|
+
import { t as PluginStateRepository } from "../state-CQvoefYP.mjs";
|
|
47
|
+
import "../sections-BrIrMUCn.mjs";
|
|
48
|
+
import { i as getSiteSettings, o as invalidateSiteSettingsCache } from "../settings-kJhGiQ4z.mjs";
|
|
49
|
+
import "../settings-DPHau-WH.mjs";
|
|
50
|
+
import "../taxonomies-CKuaZER5.mjs";
|
|
51
|
+
import { r as normalizeManifestRoute } from "../manifest-schema-Da7kj23y.mjs";
|
|
52
|
+
import "../types-DKuWPYV5.mjs";
|
|
53
|
+
import "../ssrf-CTa6v21i.mjs";
|
|
54
|
+
import "../error-oh_9i6bR.mjs";
|
|
55
|
+
import "../parse-CJKNuewM.mjs";
|
|
56
|
+
import "../media-OhYL-7Io.mjs";
|
|
57
|
+
import "../redirects-G8wAhWAf.mjs";
|
|
58
|
+
import "../relations-Bw_E1TXo.mjs";
|
|
59
|
+
import "../status-CIsmlC1E.mjs";
|
|
60
|
+
import { a as invalidateUrlPatternCache } from "../query-C5w7PsRQ.mjs";
|
|
61
|
+
import "../import-C-9uqyT3.mjs";
|
|
62
|
+
import { t as getTrustedProxyHeaders } from "../trusted-proxy-D20_7fyX.mjs";
|
|
63
|
+
import { n as sanitizeHeadersForSandbox, t as extractRequestMeta } from "../request-meta-Df-jFbAd.mjs";
|
|
64
|
+
import "../ssrf-Cj568Dgs.mjs";
|
|
65
|
+
import { n as CronExecutor } from "../cron-DRV-UC4K.mjs";
|
|
66
|
+
import { r as devConsoleEmailDeliver, t as DEV_CONSOLE_EMAIL_PLUGIN_ID } from "../email-console-C6WdcWbL.mjs";
|
|
67
|
+
import "../utils-hLzi_2Fn.mjs";
|
|
68
|
+
import "../tokens-DagaJGK8.mjs";
|
|
69
|
+
import "../preview-BU6PaLpM.mjs";
|
|
70
|
+
import "../hreflang-BdZuVBhL.mjs";
|
|
71
|
+
import "../comment-reaction-D-laEceb.mjs";
|
|
72
|
+
import "../bylines-CEj5CdT4.mjs";
|
|
73
|
+
import { n as getWidgetAreas } from "../widgets-CJJtkiKh.mjs";
|
|
74
|
+
import "../validate-mKo3RxBM.mjs";
|
|
75
|
+
import "../apply-kwNEJW2l.mjs";
|
|
76
|
+
import "../load-DV1DZuUJ.mjs";
|
|
77
|
+
import "../search-FZhx5dDU.mjs";
|
|
77
78
|
import "../index.mjs";
|
|
78
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
79
|
-
import { t as getAuthMode } from "../mode-
|
|
80
|
-
import "../snapshot-
|
|
81
|
-
import { u as maybeRunScheduledBackup } from "../backup-
|
|
82
|
-
import { t as cleanupExpiredChallenges } from "../challenge-store-
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
79
|
+
import { n as VERSION, t as COMMIT } from "../version-C4PnpmoV.mjs";
|
|
80
|
+
import { t as getAuthMode } from "../mode-BWyTBe3I.mjs";
|
|
81
|
+
import "../snapshot-I_fjLDaD.mjs";
|
|
82
|
+
import { u as maybeRunScheduledBackup } from "../backup-CtA6LDNw.mjs";
|
|
83
|
+
import { t as cleanupExpiredChallenges } from "../challenge-store-D9VNKELo.mjs";
|
|
84
|
+
import { t as removeUploadAttempt } from "../upload-attempts-D8QAFLUJ.mjs";
|
|
85
|
+
import { a as validateEncryptionKeyAtStartup } from "../secrets-DLd8RXee.mjs";
|
|
86
|
+
import { isRecord } from "../plugin-utils.mjs";
|
|
87
|
+
import { t as resolveSessionUser } from "../session-user-BvM9-zNl.mjs";
|
|
85
88
|
import { Kysely, sql } from "kysely";
|
|
86
89
|
import { z } from "zod";
|
|
87
90
|
import { Permissions } from "@emdash-cms/auth";
|
|
@@ -151,6 +154,34 @@ function createSandboxRunnerOptions(options, siteInfo) {
|
|
|
151
154
|
};
|
|
152
155
|
}
|
|
153
156
|
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/media/usage/gc.ts
|
|
159
|
+
/**
|
|
160
|
+
* Only rows older than this are collected. Guarded writers insert occurrence
|
|
161
|
+
* rows before winning the source CAS, so the window must exceed any plausible
|
|
162
|
+
* in-flight write; mirrors the pending-upload abandonment window.
|
|
163
|
+
*/
|
|
164
|
+
const GC_MAX_AGE_MS = 3600 * 1e3;
|
|
165
|
+
/**
|
|
166
|
+
* Per-tick cap on rows considered by each GC method, so a large backlog is
|
|
167
|
+
* amortized across ticks instead of one oversized batch (D1 bind limits).
|
|
168
|
+
*/
|
|
169
|
+
const GC_BATCH_LIMIT = 500;
|
|
170
|
+
/**
|
|
171
|
+
* Delete media-usage occurrence rows that can no longer be read: superseded
|
|
172
|
+
* generations, generations abandoned by losing CAS writers, and occurrences
|
|
173
|
+
* whose source row is gone.
|
|
174
|
+
*/
|
|
175
|
+
async function cleanupMediaUsageGenerations(db) {
|
|
176
|
+
const cutoff = new Date(Date.now() - GC_MAX_AGE_MS).toISOString();
|
|
177
|
+
const repo = new MediaUsageRepository(db);
|
|
178
|
+
return {
|
|
179
|
+
staleGenerations: await repo.deleteStaleGenerationsOlderThan(cutoff, GC_BATCH_LIMIT),
|
|
180
|
+
abandonedGenerations: await repo.deleteAbandonedGenerationsOlderThan(cutoff, GC_BATCH_LIMIT),
|
|
181
|
+
orphanOccurrences: await repo.deleteOrphanOccurrencesOlderThan(cutoff, GC_BATCH_LIMIT)
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
154
185
|
//#endregion
|
|
155
186
|
//#region src/cleanup.ts
|
|
156
187
|
/**
|
|
@@ -163,15 +194,13 @@ function createSandboxRunnerOptions(options, siteInfo) {
|
|
|
163
194
|
* Each subsystem cleanup is independent and non-fatal -- if one fails, the
|
|
164
195
|
* rest still run. Failures are logged but never surface to callers.
|
|
165
196
|
*/
|
|
166
|
-
/** Max revisions to keep per entry during periodic pruning */
|
|
167
197
|
const REVISION_KEEP_COUNT = 50;
|
|
168
|
-
|
|
169
|
-
const REVISION_PRUNE_THRESHOLD = REVISION_KEEP_COUNT;
|
|
198
|
+
const REVISION_PRUNE_BATCH_SIZE = 10;
|
|
170
199
|
/**
|
|
171
200
|
* Run all system cleanup tasks.
|
|
172
201
|
*
|
|
173
|
-
* Safe to call frequently -- each
|
|
174
|
-
*
|
|
202
|
+
* Safe to call frequently -- each subsystem tolerates repeated calls, and
|
|
203
|
+
* repeated calls with nothing to clean are cheap.
|
|
175
204
|
*
|
|
176
205
|
* @param db - The database instance
|
|
177
206
|
* @param storage - Optional storage backend for deleting orphaned files.
|
|
@@ -184,7 +213,11 @@ async function runSystemCleanup(db, storage) {
|
|
|
184
213
|
expiredTokens: -1,
|
|
185
214
|
pendingUploads: -1,
|
|
186
215
|
pendingUploadFiles: -1,
|
|
187
|
-
|
|
216
|
+
uploadAttempts: -1,
|
|
217
|
+
revisionsPruned: -1,
|
|
218
|
+
mediaUsageStaleGenerations: -1,
|
|
219
|
+
mediaUsageAbandonedGenerations: -1,
|
|
220
|
+
mediaUsageOrphanOccurrences: -1
|
|
188
221
|
};
|
|
189
222
|
try {
|
|
190
223
|
result.challenges = await cleanupExpiredChallenges(db);
|
|
@@ -214,29 +247,39 @@ async function runSystemCleanup(db, storage) {
|
|
|
214
247
|
console.error("[cleanup] Failed to clean pending uploads:", error);
|
|
215
248
|
}
|
|
216
249
|
try {
|
|
217
|
-
|
|
250
|
+
const mediaRepo = new MediaRepository(db);
|
|
251
|
+
const completedAttemptsDeleted = await mediaRepo.deleteCompletedUploadAttempts();
|
|
252
|
+
if (!storage) result.uploadAttempts = completedAttemptsDeleted;
|
|
253
|
+
else {
|
|
254
|
+
const storageKeys = await mediaRepo.findUploadAttemptsForCleanup();
|
|
255
|
+
let attemptsDeleted = completedAttemptsDeleted;
|
|
256
|
+
for (const storageKey of storageKeys) if (await removeUploadAttempt(storage, mediaRepo, storageKey)) attemptsDeleted++;
|
|
257
|
+
result.uploadAttempts = attemptsDeleted;
|
|
258
|
+
}
|
|
259
|
+
} catch (error) {
|
|
260
|
+
console.error("[cleanup] Failed to clean media upload attempts:", error);
|
|
261
|
+
}
|
|
262
|
+
try {
|
|
263
|
+
result.revisionsPruned = await pruneQueuedRevisions(db);
|
|
218
264
|
} catch (error) {
|
|
219
265
|
console.error("[cleanup] Failed to prune revisions:", error);
|
|
220
266
|
}
|
|
267
|
+
try {
|
|
268
|
+
const usage = await cleanupMediaUsageGenerations(db);
|
|
269
|
+
result.mediaUsageStaleGenerations = usage.staleGenerations;
|
|
270
|
+
result.mediaUsageAbandonedGenerations = usage.abandonedGenerations;
|
|
271
|
+
result.mediaUsageOrphanOccurrences = usage.orphanOccurrences;
|
|
272
|
+
} catch (error) {
|
|
273
|
+
console.error("[cleanup] Failed to clean media-usage generations:", error);
|
|
274
|
+
}
|
|
221
275
|
return result;
|
|
222
276
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
* them down to REVISION_KEEP_COUNT.
|
|
226
|
-
*/
|
|
227
|
-
async function pruneExcessiveRevisions(db) {
|
|
228
|
-
const entries = await sql`
|
|
229
|
-
SELECT collection, entry_id
|
|
230
|
-
FROM revisions
|
|
231
|
-
GROUP BY collection, entry_id
|
|
232
|
-
HAVING COUNT(*) > ${REVISION_PRUNE_THRESHOLD}
|
|
233
|
-
`.execute(db);
|
|
234
|
-
if (entries.rows.length === 0) return 0;
|
|
277
|
+
async function pruneQueuedRevisions(db) {
|
|
278
|
+
const queued = await db.selectFrom("_emdash_revision_prune_queue").selectAll().orderBy("revision_id").limit(REVISION_PRUNE_BATCH_SIZE).execute();
|
|
235
279
|
const revisionRepo = new RevisionRepository(db);
|
|
236
280
|
let totalPruned = 0;
|
|
237
|
-
for (const row of
|
|
238
|
-
|
|
239
|
-
totalPruned += pruned;
|
|
281
|
+
for (const row of queued) try {
|
|
282
|
+
totalPruned += await revisionRepo.pruneQueuedEntry(row.collection, row.entry_id, row.revision_id, REVISION_KEEP_COUNT);
|
|
240
283
|
} catch (error) {
|
|
241
284
|
console.error(`[cleanup] Failed to prune revisions for ${row.collection}/${row.entry_id}:`, error);
|
|
242
285
|
}
|
|
@@ -314,7 +357,8 @@ async function publishDueContent(db, options = {}) {
|
|
|
314
357
|
const publishedAt = item.publishedAt == null ? item.scheduledAt ?? void 0 : void 0;
|
|
315
358
|
const result = await doPublish(collection.slug, item.id, {
|
|
316
359
|
publishedAt,
|
|
317
|
-
requireScheduledDue: true
|
|
360
|
+
requireScheduledDue: true,
|
|
361
|
+
expectedScheduledAt: item.scheduledAt ?? void 0
|
|
318
362
|
});
|
|
319
363
|
if (result.success) batch.push({
|
|
320
364
|
collection: collection.slug,
|
|
@@ -418,6 +462,13 @@ const FIELD_TYPE_TO_KIND = {
|
|
|
418
462
|
json: "json",
|
|
419
463
|
repeater: "repeater"
|
|
420
464
|
};
|
|
465
|
+
const DRAFT_ONLY_UPDATE_KEYS = new Set([
|
|
466
|
+
"data",
|
|
467
|
+
"slug",
|
|
468
|
+
"locale",
|
|
469
|
+
"skipRevision"
|
|
470
|
+
]);
|
|
471
|
+
const MAX_DRAFT_STAGE_ATTEMPTS = 32;
|
|
421
472
|
/**
|
|
422
473
|
* Convert a ContentItem to Record<string, unknown> for hook consumption.
|
|
423
474
|
* Hooks receive the full item as a flat record.
|
|
@@ -552,6 +603,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
552
603
|
/** All plugins eligible for the hook pipeline (includes built-in plugins).
|
|
553
604
|
* Stored so we can rebuild the pipeline when plugins are enabled/disabled. */
|
|
554
605
|
allPipelinePlugins;
|
|
606
|
+
/** Guards the once-per-process plugin storage-index sync. */
|
|
607
|
+
storageIndexesSynced = false;
|
|
555
608
|
/** Factory options for the hook pipeline context factory */
|
|
556
609
|
pipelineFactoryOptions;
|
|
557
610
|
/** Dependencies needed for exclusive hook resolution */
|
|
@@ -653,10 +706,26 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
653
706
|
} catch (error) {
|
|
654
707
|
console.error("[cleanup] System cleanup failed:", error);
|
|
655
708
|
}
|
|
709
|
+
try {
|
|
710
|
+
await this.syncPluginStorageIndexesOnce();
|
|
711
|
+
} catch (error) {
|
|
712
|
+
console.error("[plugins] Storage index sync failed:", error);
|
|
713
|
+
}
|
|
656
714
|
await maybeRunScheduledBackup(this.db, this.storage ?? void 0);
|
|
657
715
|
return { published };
|
|
658
716
|
}
|
|
659
717
|
/**
|
|
718
|
+
* Materialize plugin-declared storage indexes, once per process.
|
|
719
|
+
*
|
|
720
|
+
* Called from the scheduler path, not from request handlers — configured
|
|
721
|
+
* plugins have no install handler, so the tick is their only sync moment.
|
|
722
|
+
*/
|
|
723
|
+
async syncPluginStorageIndexesOnce() {
|
|
724
|
+
if (this.storageIndexesSynced) return;
|
|
725
|
+
this.storageIndexesSynced = true;
|
|
726
|
+
await syncDeclaredStorageIndexes(this.db, [...this.allPipelinePlugins, ...marketplaceManifestCache.values()]);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
660
729
|
* Stop the cron scheduler gracefully.
|
|
661
730
|
* Call during worker shutdown or hot-reload.
|
|
662
731
|
*/
|
|
@@ -797,7 +866,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
797
866
|
id: bundle.manifest.id,
|
|
798
867
|
version: bundle.manifest.version,
|
|
799
868
|
admin: bundle.manifest.admin,
|
|
800
|
-
mcp: bundle.manifest.mcp
|
|
869
|
+
mcp: bundle.manifest.mcp,
|
|
870
|
+
storage: bundle.manifest.storage
|
|
801
871
|
});
|
|
802
872
|
if (bundle.manifest.routes.length > 0) {
|
|
803
873
|
const routeMetaMap = /* @__PURE__ */ new Map();
|
|
@@ -882,7 +952,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
882
952
|
id: bundle.manifest.id,
|
|
883
953
|
version: bundle.manifest.version,
|
|
884
954
|
admin: bundle.manifest.admin,
|
|
885
|
-
mcp: bundle.manifest.mcp
|
|
955
|
+
mcp: bundle.manifest.mcp,
|
|
956
|
+
storage: bundle.manifest.storage
|
|
886
957
|
});
|
|
887
958
|
if (bundle.manifest.routes.length > 0) {
|
|
888
959
|
const routeMetaMap = /* @__PURE__ */ new Map();
|
|
@@ -1025,9 +1096,9 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1025
1096
|
const seedHolder = getSeedHolder();
|
|
1026
1097
|
try {
|
|
1027
1098
|
await initWithLock(seedHolder.lock, () => seedHolder.done.has(seedKey) ? true : void 0, async () => {
|
|
1028
|
-
const { applySeed } = await import("../apply-
|
|
1029
|
-
const { loadSeed } = await import("../load-
|
|
1030
|
-
const { validateSeed } = await import("../validate-
|
|
1099
|
+
const { applySeed } = await import("../apply-kwNEJW2l.mjs").then((n) => n.n);
|
|
1100
|
+
const { loadSeed } = await import("../load-DV1DZuUJ.mjs").then((n) => n.r);
|
|
1101
|
+
const { validateSeed } = await import("../validate-mKo3RxBM.mjs").then((n) => n.n);
|
|
1031
1102
|
const seed = await loadSeed();
|
|
1032
1103
|
if (validateSeed(seed).valid) {
|
|
1033
1104
|
await applySeed(db, seed, { onConflict: "skip" });
|
|
@@ -1170,6 +1241,11 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1170
1241
|
} catch (error) {
|
|
1171
1242
|
console.error("[cleanup] System cleanup failed:", error);
|
|
1172
1243
|
}
|
|
1244
|
+
try {
|
|
1245
|
+
await runtimeRef.current?.syncPluginStorageIndexesOnce();
|
|
1246
|
+
} catch (error) {
|
|
1247
|
+
console.error("[plugins] Storage index sync failed:", error);
|
|
1248
|
+
}
|
|
1173
1249
|
await maybeRunScheduledBackup(db, storage ?? void 0);
|
|
1174
1250
|
});
|
|
1175
1251
|
scheduler.start();
|
|
@@ -1357,14 +1433,22 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1357
1433
|
capabilities: entry.capabilities ?? [],
|
|
1358
1434
|
allowedHosts: entry.allowedHosts ?? [],
|
|
1359
1435
|
storage: entry.storage ?? {},
|
|
1360
|
-
hooks: [],
|
|
1361
|
-
routes: [],
|
|
1436
|
+
hooks: entry.hooks ?? [],
|
|
1437
|
+
routes: entry.routes ?? [],
|
|
1362
1438
|
admin: {},
|
|
1363
1439
|
mcp: entry.mcp
|
|
1364
1440
|
};
|
|
1365
1441
|
const plugin = await sandboxRunner.load(manifest, entry.code);
|
|
1366
1442
|
sandboxedPluginCache.set(pluginKey, plugin);
|
|
1367
1443
|
console.log(`EmDash: Loaded sandboxed plugin ${pluginKey} with capabilities: [${manifest.capabilities.join(", ")}]`);
|
|
1444
|
+
if (manifest.routes.length > 0) {
|
|
1445
|
+
const routeMetaMap = /* @__PURE__ */ new Map();
|
|
1446
|
+
for (const routeEntry of manifest.routes) {
|
|
1447
|
+
const normalized = normalizeManifestRoute(routeEntry);
|
|
1448
|
+
routeMetaMap.set(normalized.name, buildRouteMeta(normalized));
|
|
1449
|
+
}
|
|
1450
|
+
sandboxedRouteMetaCache.set(entry.id, routeMetaMap);
|
|
1451
|
+
} else sandboxedRouteMetaCache.delete(entry.id);
|
|
1368
1452
|
} catch (error) {
|
|
1369
1453
|
console.error(`EmDash: Failed to load sandboxed plugin ${entry.id}:`, error);
|
|
1370
1454
|
}
|
|
@@ -1421,7 +1505,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1421
1505
|
id: bundle.manifest.id,
|
|
1422
1506
|
version: bundle.manifest.version,
|
|
1423
1507
|
admin: bundle.manifest.admin,
|
|
1424
|
-
mcp: bundle.manifest.mcp
|
|
1508
|
+
mcp: bundle.manifest.mcp,
|
|
1509
|
+
storage: bundle.manifest.storage
|
|
1425
1510
|
});
|
|
1426
1511
|
if (bundle.manifest.routes.length > 0) {
|
|
1427
1512
|
const routeMeta = /* @__PURE__ */ new Map();
|
|
@@ -1471,7 +1556,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1471
1556
|
id: bundle.manifest.id,
|
|
1472
1557
|
version: bundle.manifest.version,
|
|
1473
1558
|
admin: bundle.manifest.admin,
|
|
1474
|
-
mcp: bundle.manifest.mcp
|
|
1559
|
+
mcp: bundle.manifest.mcp,
|
|
1560
|
+
storage: bundle.manifest.storage
|
|
1475
1561
|
});
|
|
1476
1562
|
if (bundle.manifest.routes.length > 0) {
|
|
1477
1563
|
const routeMeta = /* @__PURE__ */ new Map();
|
|
@@ -1593,6 +1679,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1593
1679
|
supports: collection.supports || [],
|
|
1594
1680
|
hasSeo: collection.hasSeo,
|
|
1595
1681
|
urlPattern: collection.urlPattern,
|
|
1682
|
+
...collection.hidden ? { hidden: true } : {},
|
|
1596
1683
|
fields
|
|
1597
1684
|
};
|
|
1598
1685
|
}
|
|
@@ -1787,7 +1874,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1787
1874
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(body.data, collection, true)).content;
|
|
1788
1875
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, true);
|
|
1789
1876
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1790
|
-
const { validateContentData } = await import("../validation-
|
|
1877
|
+
const { validateContentData } = await import("../validation-BgpucsvF.mjs");
|
|
1791
1878
|
const validation = await validateContentData(this.db, collection, processedData, { partial: false });
|
|
1792
1879
|
if (!validation.ok) return {
|
|
1793
1880
|
success: false,
|
|
@@ -1804,7 +1891,6 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1804
1891
|
return result;
|
|
1805
1892
|
}
|
|
1806
1893
|
async handleContentUpdate(collection, id, body) {
|
|
1807
|
-
const { ContentRepository } = await import("../content-BC43pICM.mjs").then((n) => n.n);
|
|
1808
1894
|
const repo = new ContentRepository(this.db);
|
|
1809
1895
|
const resolvedItem = await repo.findByIdOrSlug(collection, id, body.locale);
|
|
1810
1896
|
const resolvedId = resolvedItem?.id ?? id;
|
|
@@ -1831,7 +1917,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1831
1917
|
if (this.hooks.hasHooks("content:beforeSave")) processedData = (await this.hooks.runContentBeforeSave(bodyWithoutRev.data, collection, false)).content;
|
|
1832
1918
|
processedData = await this.runSandboxedBeforeSave(processedData, collection, false);
|
|
1833
1919
|
processedData = await this.normalizeMediaFields(collection, processedData);
|
|
1834
|
-
const { validateContentData } = await import("../validation-
|
|
1920
|
+
const { validateContentData } = await import("../validation-BgpucsvF.mjs");
|
|
1835
1921
|
const validation = await validateContentData(this.db, collection, processedData, { partial: true });
|
|
1836
1922
|
if (!validation.ok) return {
|
|
1837
1923
|
success: false,
|
|
@@ -1840,12 +1926,12 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1840
1926
|
}
|
|
1841
1927
|
let usesDraftRevisions = false;
|
|
1842
1928
|
let draftStorageChanged = false;
|
|
1843
|
-
if (processedData)
|
|
1929
|
+
if (processedData) {
|
|
1844
1930
|
if ((await this.schemaRegistry.getCollectionWithFields(collection))?.supports?.includes("revisions")) {
|
|
1845
1931
|
usesDraftRevisions = true;
|
|
1846
1932
|
const revisionRepo = new RevisionRepository(this.db);
|
|
1847
|
-
|
|
1848
|
-
|
|
1933
|
+
let existing = await repo.findById(collection, resolvedId);
|
|
1934
|
+
for (let attempt = 0; existing && attempt < MAX_DRAFT_STAGE_ATTEMPTS; attempt++) {
|
|
1849
1935
|
let baseData;
|
|
1850
1936
|
if (existing.draftRevisionId) baseData = (await revisionRepo.findById(existing.draftRevisionId))?.data ?? existing.data;
|
|
1851
1937
|
else baseData = existing.data;
|
|
@@ -1854,36 +1940,65 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1854
1940
|
...processedData
|
|
1855
1941
|
};
|
|
1856
1942
|
if (bodyWithoutRev.slug !== void 0) mergedData._slug = bodyWithoutRev.slug;
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1943
|
+
const revision = await revisionRepo.create({
|
|
1944
|
+
collection,
|
|
1945
|
+
entryId: resolvedId,
|
|
1946
|
+
data: mergedData,
|
|
1947
|
+
authorId: bodyWithoutRev.authorId ?? void 0
|
|
1948
|
+
});
|
|
1949
|
+
let staged;
|
|
1950
|
+
try {
|
|
1951
|
+
staged = await repo.replaceDraftRevision(collection, resolvedId, revision.id, existing);
|
|
1952
|
+
} catch (error) {
|
|
1953
|
+
try {
|
|
1954
|
+
await revisionRepo.deleteIfUnreferenced(collection, resolvedId, revision.id);
|
|
1955
|
+
} catch (cleanupError) {
|
|
1956
|
+
console.error(`[emdash] Failed to clean up unstaged revision ${revision.id}:`, cleanupError);
|
|
1957
|
+
}
|
|
1958
|
+
throw error;
|
|
1959
|
+
}
|
|
1960
|
+
if (!staged) {
|
|
1961
|
+
try {
|
|
1962
|
+
await revisionRepo.deleteIfUnreferenced(collection, resolvedId, revision.id);
|
|
1963
|
+
} catch (cleanupError) {
|
|
1964
|
+
console.error(`[emdash] Failed to clean up unstaged revision ${revision.id}:`, cleanupError);
|
|
1965
|
+
}
|
|
1966
|
+
if (body._rev || attempt === MAX_DRAFT_STAGE_ATTEMPTS - 1) return {
|
|
1967
|
+
success: false,
|
|
1968
|
+
error: {
|
|
1969
|
+
code: "CONFLICT",
|
|
1970
|
+
message: new ContentMutationConflictError().message
|
|
1971
|
+
}
|
|
1972
|
+
};
|
|
1973
|
+
existing = await repo.findById(collection, resolvedId);
|
|
1974
|
+
continue;
|
|
1876
1975
|
}
|
|
1976
|
+
draftStorageChanged = true;
|
|
1977
|
+
if (bodyWithoutRev.skipRevision && existing.draftRevisionId) try {
|
|
1978
|
+
await revisionRepo.deleteIfUnreferenced(collection, resolvedId, existing.draftRevisionId);
|
|
1979
|
+
} catch (error) {
|
|
1980
|
+
console.error(`[emdash] Failed to clean up superseded revision ${existing.draftRevisionId}:`, error);
|
|
1981
|
+
}
|
|
1982
|
+
else after(async () => {
|
|
1983
|
+
try {
|
|
1984
|
+
await revisionRepo.pruneQueuedEntry(collection, resolvedId, revision.id, 50);
|
|
1985
|
+
} catch (error) {
|
|
1986
|
+
console.error(`[revisions] Failed to prune revisions for ${collection}/${resolvedId}:`, error);
|
|
1987
|
+
}
|
|
1988
|
+
});
|
|
1989
|
+
break;
|
|
1877
1990
|
}
|
|
1878
1991
|
}
|
|
1879
|
-
}
|
|
1880
|
-
const
|
|
1992
|
+
}
|
|
1993
|
+
const liveMetaTouched = Object.entries(bodyWithoutRev).some(([key, value]) => value !== void 0 && !DRAFT_ONLY_UPDATE_KEYS.has(key));
|
|
1994
|
+
const result = usesDraftRevisions && !liveMetaTouched ? await handleContentGet(this.db, collection, resolvedId) : await handleContentUpdate(this.db, collection, resolvedId, {
|
|
1881
1995
|
...bodyWithoutRev,
|
|
1882
1996
|
data: usesDraftRevisions ? void 0 : processedData,
|
|
1883
1997
|
slug: usesDraftRevisions ? void 0 : bodyWithoutRev.slug,
|
|
1884
1998
|
authorId: bodyWithoutRev.authorId,
|
|
1885
1999
|
bylines: bodyWithoutRev.bylines
|
|
1886
2000
|
});
|
|
2001
|
+
const liveContentChanged = usesDraftRevisions ? liveMetaTouched : Boolean(processedData || bodyWithoutRev.slug !== void 0 || liveMetaTouched);
|
|
1887
2002
|
const hydrated = await this.hydrateDraftData(result);
|
|
1888
2003
|
if (hydrated.success && hydrated.data) {
|
|
1889
2004
|
const contentIdsToRefresh = [resolvedId];
|
|
@@ -1904,6 +2019,10 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
1904
2019
|
console.error(`[media-usage] Failed to mark ${collection} stale:`, error);
|
|
1905
2020
|
}
|
|
1906
2021
|
if (hydrated.success && hydrated.data) this.runAfterSaveHooks(contentItemToRecord(hydrated.data.item), collection, false);
|
|
2022
|
+
if (hydrated.success) return {
|
|
2023
|
+
...hydrated,
|
|
2024
|
+
liveContentChanged
|
|
2025
|
+
};
|
|
1907
2026
|
return hydrated;
|
|
1908
2027
|
}
|
|
1909
2028
|
async handleContentDelete(collection, id) {
|
|
@@ -2058,25 +2177,50 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
2058
2177
|
return this.hydrateDraftData(result);
|
|
2059
2178
|
}
|
|
2060
2179
|
try {
|
|
2180
|
+
const contentRepo = new ContentRepository(this.db);
|
|
2181
|
+
const existing = await contentRepo.findById(revision.collection, revision.entryId);
|
|
2182
|
+
if (!existing) return {
|
|
2183
|
+
success: false,
|
|
2184
|
+
error: {
|
|
2185
|
+
code: "NOT_FOUND",
|
|
2186
|
+
message: `Content item not found: ${revision.entryId}`
|
|
2187
|
+
}
|
|
2188
|
+
};
|
|
2061
2189
|
const newDraft = await revisionRepo.create({
|
|
2062
2190
|
collection: revision.collection,
|
|
2063
2191
|
entryId: revision.entryId,
|
|
2064
2192
|
data: revision.data,
|
|
2065
2193
|
authorId: callerUserId
|
|
2066
2194
|
});
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2195
|
+
try {
|
|
2196
|
+
if (!await contentRepo.replaceDraftRevision(revision.collection, revision.entryId, newDraft.id, existing)) throw new ContentMutationConflictError();
|
|
2197
|
+
} catch (error) {
|
|
2198
|
+
try {
|
|
2199
|
+
await revisionRepo.deleteIfUnreferenced(revision.collection, revision.entryId, newDraft.id);
|
|
2200
|
+
} catch (cleanupError) {
|
|
2201
|
+
console.error(`[emdash] Failed to clean up unrestored revision ${newDraft.id}:`, cleanupError);
|
|
2202
|
+
}
|
|
2203
|
+
throw error;
|
|
2204
|
+
}
|
|
2205
|
+
after(async () => {
|
|
2206
|
+
try {
|
|
2207
|
+
await revisionRepo.pruneQueuedEntry(revision.collection, revision.entryId, newDraft.id, 50);
|
|
2208
|
+
} catch (error) {
|
|
2209
|
+
console.error(`[revisions] Failed to prune revisions for ${revision.collection}/${revision.entryId}:`, error);
|
|
2210
|
+
}
|
|
2211
|
+
});
|
|
2075
2212
|
const refetched = await handleContentGet(this.db, revision.collection, revision.entryId);
|
|
2076
2213
|
const hydrated = await this.hydrateDraftData(refetched);
|
|
2077
2214
|
if (hydrated.success) await this.refreshContentUsageAfterSuccessfulWrite(revision.collection, [revision.entryId]);
|
|
2078
2215
|
return hydrated;
|
|
2079
2216
|
} catch (error) {
|
|
2217
|
+
if (error instanceof ContentMutationConflictError) return {
|
|
2218
|
+
success: false,
|
|
2219
|
+
error: {
|
|
2220
|
+
code: "CONFLICT",
|
|
2221
|
+
message: error.message
|
|
2222
|
+
}
|
|
2223
|
+
};
|
|
2080
2224
|
console.error("[emdash] revision restore failed:", error);
|
|
2081
2225
|
return {
|
|
2082
2226
|
success: false,
|
|
@@ -2159,10 +2303,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
2159
2303
|
});
|
|
2160
2304
|
routeRegistry.register(trustedPlugin);
|
|
2161
2305
|
const routeKey = path.replace(LEADING_SLASH_PATTERN, "");
|
|
2162
|
-
|
|
2163
|
-
try {
|
|
2164
|
-
body = await request.json();
|
|
2165
|
-
} catch {}
|
|
2306
|
+
const body = await parseRouteInput(request);
|
|
2166
2307
|
return routeRegistry.invoke(pluginId, routeKey, {
|
|
2167
2308
|
request,
|
|
2168
2309
|
body
|
|
@@ -2304,7 +2445,8 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
2304
2445
|
}
|
|
2305
2446
|
if (!collectionInfo?.fields) return data;
|
|
2306
2447
|
const imageFields = collectionInfo.fields.filter((f) => f.type === "image" || f.type === "file");
|
|
2307
|
-
|
|
2448
|
+
const repeaterFields = collectionInfo.fields.filter((f) => f.type === "repeater" && Array.isArray(f.validation?.subFields));
|
|
2449
|
+
if (imageFields.length === 0 && repeaterFields.length === 0) return data;
|
|
2308
2450
|
const getProvider = (id) => this.getMediaProvider(id);
|
|
2309
2451
|
const result = { ...data };
|
|
2310
2452
|
for (const field of imageFields) {
|
|
@@ -2315,6 +2457,26 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
2315
2457
|
if (normalized) result[field.slug] = normalized;
|
|
2316
2458
|
} catch {}
|
|
2317
2459
|
}
|
|
2460
|
+
for (const field of repeaterFields) {
|
|
2461
|
+
const value = result[field.slug];
|
|
2462
|
+
if (!Array.isArray(value)) continue;
|
|
2463
|
+
const mediaSubFieldSlugs = (field.validation?.subFields ?? []).filter((sub) => sub.type === "image").map((sub) => sub.slug);
|
|
2464
|
+
if (mediaSubFieldSlugs.length === 0) continue;
|
|
2465
|
+
const items = value;
|
|
2466
|
+
result[field.slug] = await Promise.all(items.map(async (item) => {
|
|
2467
|
+
if (!isRecord(item)) return item;
|
|
2468
|
+
const normalizedItem = { ...item };
|
|
2469
|
+
for (const slug of mediaSubFieldSlugs) {
|
|
2470
|
+
const subValue = normalizedItem[slug];
|
|
2471
|
+
if (subValue == null) continue;
|
|
2472
|
+
try {
|
|
2473
|
+
const normalized = await normalizeMediaValue(subValue, getProvider);
|
|
2474
|
+
if (normalized) normalizedItem[slug] = normalized;
|
|
2475
|
+
} catch {}
|
|
2476
|
+
}
|
|
2477
|
+
return normalizedItem;
|
|
2478
|
+
}));
|
|
2479
|
+
}
|
|
2318
2480
|
return result;
|
|
2319
2481
|
}
|
|
2320
2482
|
async runSandboxedBeforeSave(content, collection, isNew) {
|
|
@@ -2465,10 +2627,7 @@ var EmDashRuntime = class EmDashRuntime {
|
|
|
2465
2627
|
}
|
|
2466
2628
|
async handleSandboxedRoute(plugin, path, request) {
|
|
2467
2629
|
const routeName = path.replace(LEADING_SLASH_PATTERN, "");
|
|
2468
|
-
|
|
2469
|
-
try {
|
|
2470
|
-
body = await request.json();
|
|
2471
|
-
} catch {}
|
|
2630
|
+
const body = await parseRouteInput(request);
|
|
2472
2631
|
try {
|
|
2473
2632
|
const headers = sanitizeHeadersForSandbox(request.headers);
|
|
2474
2633
|
const meta = extractRequestMeta(request, this.config);
|
|
@@ -2601,6 +2760,26 @@ function createPublicMediaUrlResolver(storage) {
|
|
|
2601
2760
|
* middleware.ts.
|
|
2602
2761
|
*/
|
|
2603
2762
|
const ASTRO_COOKIES_SYMBOL = Symbol.for("astro.cookies");
|
|
2763
|
+
/** Hold the real adapter close behind both response and deferred-task completion. */
|
|
2764
|
+
function coordinateScopedDbLifecycle(scoped) {
|
|
2765
|
+
if (!scoped.close) return { lifecycle: scoped };
|
|
2766
|
+
const close = scoped.close;
|
|
2767
|
+
const deferredTasks = createDeferredTaskTracker(() => {
|
|
2768
|
+
try {
|
|
2769
|
+
close();
|
|
2770
|
+
} catch (error) {
|
|
2771
|
+
console.error("[emdash] request-scoped db close failed:", error);
|
|
2772
|
+
}
|
|
2773
|
+
});
|
|
2774
|
+
return {
|
|
2775
|
+
closed: deferredTasks.settled,
|
|
2776
|
+
deferredTasks,
|
|
2777
|
+
lifecycle: {
|
|
2778
|
+
commit: scoped.commit,
|
|
2779
|
+
close: deferredTasks.settle
|
|
2780
|
+
}
|
|
2781
|
+
};
|
|
2782
|
+
}
|
|
2604
2783
|
/**
|
|
2605
2784
|
* Run a request-scoped db's `close()` once the response body has finished
|
|
2606
2785
|
* streaming. Astro streams HTML and components issue DB queries during that
|
|
@@ -2640,9 +2819,9 @@ function wrapResponseForScopedClose(response, close) {
|
|
|
2640
2819
|
* Run the request body under a request-scoped db, then settle its lifecycle:
|
|
2641
2820
|
* `commit()` runs before the response is returned (so per-request state like a
|
|
2642
2821
|
* D1 bookmark cookie is persisted in the headers, even if render throws), while
|
|
2643
|
-
* `close()` (if any) is deferred to
|
|
2644
|
-
* isn't torn down mid-render. On error
|
|
2645
|
-
* before rethrowing so it never leaks.
|
|
2822
|
+
* `close()` (if any) is deferred to lifecycle settlement so a
|
|
2823
|
+
* connection-backed adapter isn't torn down mid-render or mid-task. On error
|
|
2824
|
+
* the lifecycle is settled before rethrowing so it never leaks.
|
|
2646
2825
|
*
|
|
2647
2826
|
* On the error path both `commit()` and `close()` are defended: a throw from
|
|
2648
2827
|
* either is logged and swallowed so it can't replace the propagating render
|
|
@@ -3051,32 +3230,37 @@ async function runOutsideRequest(config, fn) {
|
|
|
3051
3230
|
config: config.database?.config,
|
|
3052
3231
|
isAuthenticated: false,
|
|
3053
3232
|
isWrite: true,
|
|
3233
|
+
canUseCachedBinding: false,
|
|
3054
3234
|
cookies: NOOP_COOKIE_JAR,
|
|
3055
3235
|
url: CRON_EVENT_URL
|
|
3056
3236
|
});
|
|
3057
3237
|
if (!scoped?.close) return fn(runtime);
|
|
3238
|
+
const { closed, deferredTasks, lifecycle } = coordinateScopedDbLifecycle(scoped);
|
|
3058
3239
|
const parent = getRequestContext();
|
|
3059
3240
|
const ctx = parent ? {
|
|
3060
3241
|
...parent,
|
|
3061
|
-
db: scoped.db
|
|
3242
|
+
db: scoped.db,
|
|
3243
|
+
deferredTasks
|
|
3062
3244
|
} : {
|
|
3063
3245
|
editMode: false,
|
|
3064
3246
|
db: scoped.db,
|
|
3065
|
-
metrics: createRequestMetrics(performance.now())
|
|
3247
|
+
metrics: createRequestMetrics(performance.now()),
|
|
3248
|
+
deferredTasks
|
|
3066
3249
|
};
|
|
3067
3250
|
try {
|
|
3068
3251
|
return await runWithContext(ctx, () => fn(runtime));
|
|
3069
3252
|
} finally {
|
|
3070
3253
|
try {
|
|
3071
|
-
|
|
3254
|
+
lifecycle.commit();
|
|
3072
3255
|
} catch (error) {
|
|
3073
3256
|
console.error("[emdash] event-scoped db commit failed:", error);
|
|
3074
3257
|
}
|
|
3075
3258
|
try {
|
|
3076
|
-
|
|
3259
|
+
lifecycle.close?.();
|
|
3077
3260
|
} catch (error) {
|
|
3078
3261
|
console.error("[emdash] event-scoped db close failed:", error);
|
|
3079
3262
|
}
|
|
3263
|
+
await closed;
|
|
3080
3264
|
}
|
|
3081
3265
|
}
|
|
3082
3266
|
/**
|
|
@@ -3192,6 +3376,9 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
3192
3376
|
const hasSessionCookie = cookies.get("astro-session") !== void 0;
|
|
3193
3377
|
const sessionUser = context.isPrerendered || !hasSessionCookie ? null : await resolveSessionUser(context.session);
|
|
3194
3378
|
const hasBearerAuth = (request.headers.get("authorization") ?? "").toLowerCase().startsWith("bearer ");
|
|
3379
|
+
const isWrite = request.method !== "GET" && request.method !== "HEAD";
|
|
3380
|
+
const isAuthenticated = !!sessionUser || hasBearerAuth;
|
|
3381
|
+
const canUseCachedBinding = !isAuthenticated && !isWrite && !playgroundDb && !isEmDashRoute && !hasEditCookie && !hasPreviewToken;
|
|
3195
3382
|
if (!isEmDashRoute && !isPublicRuntimeRoute && !hasEditCookie && !hasPreviewToken) {
|
|
3196
3383
|
if (!sessionUser && !playgroundDb) {
|
|
3197
3384
|
const timings = [];
|
|
@@ -3199,7 +3386,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
3199
3386
|
if (!isSetupVerified() && !context.isPrerendered) {
|
|
3200
3387
|
const t0 = performance.now();
|
|
3201
3388
|
try {
|
|
3202
|
-
const { getDb } = await import("../loader-
|
|
3389
|
+
const { getDb } = await import("../loader-CGugY7Zl.mjs").then((n) => n.s);
|
|
3203
3390
|
await (await getDb()).selectFrom("_emdash_migrations").selectAll().limit(1).execute();
|
|
3204
3391
|
markSetupVerified();
|
|
3205
3392
|
} catch (error) {
|
|
@@ -3239,12 +3426,15 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
3239
3426
|
});
|
|
3240
3427
|
for (const sub of initSubTimings) timings.push(sub);
|
|
3241
3428
|
}
|
|
3429
|
+
const lastContentWriteAt = canUseCachedBinding && config?.database?.needsLastContentWriteAt ? await getLastContentWriteAt() : void 0;
|
|
3242
3430
|
const anonScoped = createRequestScopedDb$1({
|
|
3243
3431
|
config: config?.database?.config,
|
|
3244
|
-
isAuthenticated
|
|
3245
|
-
isWrite
|
|
3432
|
+
isAuthenticated,
|
|
3433
|
+
isWrite,
|
|
3434
|
+
canUseCachedBinding,
|
|
3246
3435
|
cookies,
|
|
3247
|
-
url
|
|
3436
|
+
url,
|
|
3437
|
+
lastContentWriteAt
|
|
3248
3438
|
});
|
|
3249
3439
|
const runAnon = async () => {
|
|
3250
3440
|
const t0 = performance.now();
|
|
@@ -3263,19 +3453,22 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
3263
3453
|
return wrapBodyForStreamMetrics(finalizeResponse(response, timings));
|
|
3264
3454
|
};
|
|
3265
3455
|
if (anonScoped) {
|
|
3456
|
+
const { deferredTasks, lifecycle } = coordinateScopedDbLifecycle(anonScoped);
|
|
3266
3457
|
const parent = getRequestContext();
|
|
3267
3458
|
const ctx = parent ? {
|
|
3268
3459
|
...parent,
|
|
3269
|
-
db: anonScoped.db
|
|
3460
|
+
db: anonScoped.db,
|
|
3461
|
+
deferredTasks
|
|
3270
3462
|
} : {
|
|
3271
3463
|
editMode: false,
|
|
3272
3464
|
db: anonScoped.db,
|
|
3273
|
-
metrics
|
|
3465
|
+
metrics,
|
|
3466
|
+
deferredTasks
|
|
3274
3467
|
};
|
|
3275
3468
|
const acceptsHtml = (request.headers.get("accept") ?? "").split(",", 1)[0].trim().startsWith("text/html");
|
|
3276
3469
|
return runWithContext(ctx, async () => {
|
|
3277
3470
|
if (acceptsHtml) after(() => prefetchLayoutData());
|
|
3278
|
-
return finishScoped(
|
|
3471
|
+
return finishScoped(lifecycle, runAnon);
|
|
3279
3472
|
});
|
|
3280
3473
|
}
|
|
3281
3474
|
return runAnon();
|
|
@@ -3363,12 +3556,15 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
3363
3556
|
} catch (error) {
|
|
3364
3557
|
console.error("EmDash middleware error:", error);
|
|
3365
3558
|
}
|
|
3559
|
+
const lastContentWriteAt = canUseCachedBinding && config?.database?.needsLastContentWriteAt ? await getLastContentWriteAt() : void 0;
|
|
3366
3560
|
const scoped = createRequestScopedDb$1({
|
|
3367
3561
|
config: config?.database?.config,
|
|
3368
|
-
isAuthenticated
|
|
3369
|
-
isWrite
|
|
3562
|
+
isAuthenticated,
|
|
3563
|
+
isWrite,
|
|
3564
|
+
canUseCachedBinding,
|
|
3370
3565
|
cookies: context.cookies,
|
|
3371
|
-
url
|
|
3566
|
+
url,
|
|
3567
|
+
lastContentWriteAt
|
|
3372
3568
|
});
|
|
3373
3569
|
const renderAndFinalize = async () => {
|
|
3374
3570
|
const t0 = performance.now();
|
|
@@ -3387,15 +3583,18 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
3387
3583
|
return wrapBodyForStreamMetrics(finalizeResponse(response, timings));
|
|
3388
3584
|
};
|
|
3389
3585
|
if (scoped) {
|
|
3586
|
+
const { deferredTasks, lifecycle } = coordinateScopedDbLifecycle(scoped);
|
|
3390
3587
|
const parent = getRequestContext();
|
|
3391
3588
|
return runWithContext(parent ? {
|
|
3392
3589
|
...parent,
|
|
3393
|
-
db: scoped.db
|
|
3590
|
+
db: scoped.db,
|
|
3591
|
+
deferredTasks
|
|
3394
3592
|
} : {
|
|
3395
3593
|
editMode: false,
|
|
3396
3594
|
db: scoped.db,
|
|
3397
|
-
metrics
|
|
3398
|
-
|
|
3595
|
+
metrics,
|
|
3596
|
+
deferredTasks
|
|
3597
|
+
}, () => finishScoped(lifecycle, renderAndFinalize));
|
|
3399
3598
|
}
|
|
3400
3599
|
return renderAndFinalize();
|
|
3401
3600
|
};
|