emdash 0.26.0 → 0.28.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-DAAjOID4.d.mts → adapters-hUy8vOB-.d.mts} +1 -1
- package/dist/{adapters-DAAjOID4.d.mts.map → adapters-hUy8vOB-.d.mts.map} +1 -1
- package/dist/{allowed-origins-D5FxMUo8.mjs → allowed-origins-CRsJ6BPM.mjs} +2 -2
- package/dist/{allowed-origins-D5FxMUo8.mjs.map → allowed-origins-CRsJ6BPM.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +17 -16
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-BMfveMoB.mjs → api-BFURZn1i.mjs} +104 -38
- package/dist/api-BFURZn1i.mjs.map +1 -0
- package/dist/{api-tokens-D6ppjIVi.mjs → api-tokens-DvqeZmVq.mjs} +2 -2
- package/dist/{api-tokens-D6ppjIVi.mjs.map → api-tokens-DvqeZmVq.mjs.map} +1 -1
- package/dist/{apply--IVNSdXn.mjs → apply-Bu-8nYHL.mjs} +113 -76
- package/dist/apply-Bu-8nYHL.mjs.map +1 -0
- package/dist/astro/index.d.mts +12 -11
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +13 -5
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +10 -9
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +52 -12
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/redirect.mjs +5 -5
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +2 -9
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +125 -71
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +6 -6
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +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 +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +8 -8
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +8 -8
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +8 -8
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +14 -14
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +14 -14
- package/dist/astro/routes/api/admin/bylines/index.mjs +14 -14
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/counts.mjs +6 -6
- package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +4 -4
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +4 -4
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +38 -37
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +38 -37
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +37 -36
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +36 -35
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +36 -35
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +37 -36
- 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 +36 -35
- 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 +36 -35
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +36 -35
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +36 -35
- 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 +37 -36
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +36 -35
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +37 -36
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +36 -35
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +36 -35
- 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 +36 -35
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +6 -6
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs +9 -9
- package/dist/astro/routes/api/auth/logout.mjs +3 -3
- package/dist/astro/routes/api/auth/magic-link/send.mjs +9 -9
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.mjs +7 -7
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/request.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +13 -13
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/authors.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/index.mjs +7 -7
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
- package/dist/astro/routes/api/dashboard.mjs +8 -8
- 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 -11
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +11 -40
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +12 -407
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +10 -9
- package/dist/astro/routes/api/import/wordpress/media.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +19 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +97 -79
- 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 -11
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +40 -2
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +519 -39
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.d.mts.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +14 -5
- package/dist/astro/routes/api/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/mcp.mjs +39 -39
- package/dist/astro/routes/api/media/_id_/confirm.mjs +7 -7
- package/dist/astro/routes/api/media/_id_.mjs +7 -7
- package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
- package/dist/astro/routes/api/media/providers/index.mjs +3 -3
- package/dist/astro/routes/api/media/upload-url.mjs +8 -8
- package/dist/astro/routes/api/media.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/items.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_/translations.mjs +9 -9
- package/dist/astro/routes/api/menus/_name_.mjs +9 -9
- package/dist/astro/routes/api/menus/index.mjs +9 -9
- 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 +4 -4
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +9 -9
- package/dist/astro/routes/api/redirects/404s/summary.mjs +9 -9
- package/dist/astro/routes/api/redirects/_id_.mjs +10 -10
- package/dist/astro/routes/api/redirects/index.mjs +10 -10
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +3 -3
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +3 -3
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +36 -35
- 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 +36 -35
- 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 +36 -35
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +36 -35
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +36 -35
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +7 -6
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +36 -35
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +36 -35
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +10 -10
- package/dist/astro/routes/api/search/index.mjs +9 -9
- package/dist/astro/routes/api/search/rebuild.mjs +10 -10
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +9 -9
- package/dist/astro/routes/api/sections/_slug_.mjs +9 -9
- package/dist/astro/routes/api/sections/index.mjs +9 -9
- package/dist/astro/routes/api/settings/email.mjs +4 -4
- package/dist/astro/routes/api/settings.mjs +12 -12
- package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
- package/dist/astro/routes/api/setup/admin.mjs +10 -10
- package/dist/astro/routes/api/setup/dev-bypass.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/dev-bypass.mjs +28 -25
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +26 -25
- 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 +6 -6
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +13 -13
- package/dist/astro/routes/api/taxonomies/index.mjs +13 -13
- package/dist/astro/routes/api/themes/preview.mjs +5 -5
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +7 -7
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +9 -9
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +9 -9
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/index.mjs +9 -9
- package/dist/astro/routes/api/widget-components.mjs +3 -3
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
- package/dist/astro/routes/sitemap.xml.mjs +7 -7
- package/dist/astro/types.d.mts +14 -12
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{authorize-BZnOGJFo.mjs → authorize-Dz88F_Fw.mjs} +2 -2
- package/dist/{authorize-BZnOGJFo.mjs.map → authorize-Dz88F_Fw.mjs.map} +1 -1
- package/dist/{byline-LL8lyqdb.mjs → byline-Bm8ZgUP9.mjs} +6 -6
- package/dist/{byline-LL8lyqdb.mjs.map → byline-Bm8ZgUP9.mjs.map} +1 -1
- package/dist/{byline-fields-eyJMblSr.mjs → byline-fields-2Lp5Hbgf.mjs} +18 -3
- package/dist/byline-fields-2Lp5Hbgf.mjs.map +1 -0
- package/dist/{byline-fields-DaMKzkhO.mjs → byline-fields-CIx_GuN4.mjs} +1 -1
- package/dist/{byline-fields-DaMKzkhO.mjs.map → byline-fields-CIx_GuN4.mjs.map} +1 -1
- package/dist/{byline-fields-KD3JFRuH.d.mts → byline-fields-Cgrt9-aL.d.mts} +18 -3
- package/dist/{byline-fields-KD3JFRuH.d.mts.map → byline-fields-Cgrt9-aL.d.mts.map} +1 -1
- package/dist/{bylines-BmJ7Vg7J.mjs → bylines-6tm9mgQb.mjs} +4 -4
- package/dist/{bylines-BmJ7Vg7J.mjs.map → bylines-6tm9mgQb.mjs.map} +1 -1
- package/dist/{bylines-DE47vP8d.mjs → bylines-Woq87129.mjs} +6 -6
- package/dist/{bylines-DE47vP8d.mjs.map → bylines-Woq87129.mjs.map} +1 -1
- package/dist/{cache-D9jF5bYw.mjs → cache-CEBAZjir.mjs} +2 -2
- package/dist/{cache-D9jF5bYw.mjs.map → cache-CEBAZjir.mjs.map} +1 -1
- package/dist/{challenge-store-LhiqMccz.mjs → challenge-store-anhwVER0.mjs} +1 -1
- package/dist/{challenge-store-LhiqMccz.mjs.map → challenge-store-anhwVER0.mjs.map} +1 -1
- package/dist/{chunks-OCG163rN.mjs → chunks-B2isWQhr.mjs} +2 -2
- package/dist/{chunks-OCG163rN.mjs.map → chunks-B2isWQhr.mjs.map} +1 -1
- package/dist/cli/index.mjs +23 -22
- 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-D9BLDpZI.mjs → comment-CzeatwBV.mjs} +3 -3
- package/dist/{comment-D9BLDpZI.mjs.map → comment-CzeatwBV.mjs.map} +1 -1
- package/dist/{comment-reaction-Drl9SkNu.mjs → comment-reaction-Cj9QJY7I.mjs} +2 -2
- package/dist/{comment-reaction-Drl9SkNu.mjs.map → comment-reaction-Cj9QJY7I.mjs.map} +1 -1
- package/dist/{comments-BjJ9SKGU.mjs → comments-BLE-jv5k.mjs} +3 -3
- package/dist/{comments-BjJ9SKGU.mjs.map → comments-BLE-jv5k.mjs.map} +1 -1
- package/dist/{components-CYt4uVK9.mjs → components-B_sATNUc.mjs} +1 -1
- package/dist/{components-CYt4uVK9.mjs.map → components-B_sATNUc.mjs.map} +1 -1
- package/dist/{content-ncUWWjna.mjs → content-DhgEth4k.mjs} +4 -4
- package/dist/{content-ncUWWjna.mjs.map → content-DhgEth4k.mjs.map} +1 -1
- package/dist/content-refresh-CA4uKwzH.mjs +1531 -0
- package/dist/content-refresh-CA4uKwzH.mjs.map +1 -0
- package/dist/{context-C_g-iJVA.mjs → context-CUsR9dXL.mjs} +76 -54
- package/dist/context-CUsR9dXL.mjs.map +1 -0
- package/dist/{cron-C5LVoNmP.mjs → cron-v4FTEFR_.mjs} +1 -1
- package/dist/{cron-C5LVoNmP.mjs.map → cron-v4FTEFR_.mjs.map} +1 -1
- package/dist/{dashboard-CotyqQrW.mjs → dashboard-EvEKF5en.mjs} +4 -4
- package/dist/{dashboard-CotyqQrW.mjs.map → dashboard-EvEKF5en.mjs.map} +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{default-CeRG-Ot4.mjs → default-CM_D83Mg.mjs} +1 -1
- package/dist/{default-CeRG-Ot4.mjs.map → default-CM_D83Mg.mjs.map} +1 -1
- package/dist/{device-flow-DENDCQ9F.mjs → device-flow-CfGP18Uw.mjs} +4 -4
- package/dist/{device-flow-DENDCQ9F.mjs.map → device-flow-CfGP18Uw.mjs.map} +1 -1
- package/dist/{email-console-DJP32ucW.mjs → email-console-CIf4Lfvv.mjs} +1 -1
- package/dist/{email-console-DJP32ucW.mjs.map → email-console-CIf4Lfvv.mjs.map} +1 -1
- package/dist/{error-rVGiqWDt.mjs → error-CkAseSqZ.mjs} +2 -2
- package/dist/{error-rVGiqWDt.mjs.map → error-CkAseSqZ.mjs.map} +1 -1
- package/dist/{escape-Bjio4ZsM.mjs → escape-DqD0aCKu.mjs} +1 -1
- package/dist/{escape-Bjio4ZsM.mjs.map → escape-DqD0aCKu.mjs.map} +1 -1
- package/dist/{field-defs-cache-ljXzJCfc.mjs → field-defs-cache-WUI88LX5.mjs} +2 -2
- package/dist/{field-defs-cache-ljXzJCfc.mjs.map → field-defs-cache-WUI88LX5.mjs.map} +1 -1
- package/dist/{fts-manager-BbCCbEKA.mjs → fts-manager-BbFaF_V8.mjs} +2 -2
- package/dist/{fts-manager-BbCCbEKA.mjs.map → fts-manager-BbFaF_V8.mjs.map} +1 -1
- package/dist/{import-Bb1T9WJS.mjs → import-fYLf14Co.mjs} +514 -25
- package/dist/import-fYLf14Co.mjs.map +1 -0
- package/dist/{index-BRNabKrx.d.mts → index-B9sIxwe4.d.mts} +2420 -2379
- package/dist/index-B9sIxwe4.d.mts.map +1 -0
- package/dist/{index-Dt0OKJB4.d.mts → index-Bm-Gy8Mh.d.mts} +25 -4
- package/dist/index-Bm-Gy8Mh.d.mts.map +1 -0
- package/dist/index.d.mts +18 -17
- package/dist/index.mjs +54 -53
- package/dist/{load-DMjXghbZ.mjs → load-Djn3HWQS.mjs} +2 -2
- package/dist/{load-DMjXghbZ.mjs.map → load-Djn3HWQS.mjs.map} +1 -1
- package/dist/{loader-BA_zhkS_.mjs → loader-CB6YHeul.mjs} +6 -5
- package/dist/loader-CB6YHeul.mjs.map +1 -0
- package/dist/{manifest-schema-kPGX7VS-.mjs → manifest-schema-BHlgZM1W.mjs} +1 -1
- package/dist/{manifest-schema-kPGX7VS-.mjs.map → manifest-schema-BHlgZM1W.mjs.map} +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/local-runtime.d.mts +12 -11
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +5 -5
- package/dist/{media-C5t_eCnk.mjs → media-BrXIaMFN.mjs} +2 -2
- package/dist/{media-C5t_eCnk.mjs.map → media-BrXIaMFN.mjs.map} +1 -1
- package/dist/{media-allowlist-Du8t1u6a.mjs → media-allowlist-CRHEeJ_i.mjs} +1 -1
- package/dist/{media-allowlist-Du8t1u6a.mjs.map → media-allowlist-CRHEeJ_i.mjs.map} +1 -1
- package/dist/{media-url-O4rm9-SQ.mjs → media-url-CKi5XSw4.mjs} +1 -1
- package/dist/{media-url-O4rm9-SQ.mjs.map → media-url-CKi5XSw4.mjs.map} +1 -1
- package/dist/{menus-CBb6UrMU.mjs → menus-Cfivc2Ad.mjs} +3 -3
- package/dist/{menus-CBb6UrMU.mjs.map → menus-Cfivc2Ad.mjs.map} +1 -1
- package/dist/{menus-CYH09a41.mjs → menus-CsZ2ZEK2.mjs} +16 -12
- package/dist/{menus-CYH09a41.mjs.map → menus-CsZ2ZEK2.mjs.map} +1 -1
- package/dist/{mode-BB0F8xTC.mjs → mode-BM9QgEmt.mjs} +1 -1
- package/dist/{mode-BB0F8xTC.mjs.map → mode-BM9QgEmt.mjs.map} +1 -1
- package/dist/{oauth-authorization-CsvzIp_F.mjs → oauth-authorization-CXWkIGT4.mjs} +4 -4
- package/dist/{oauth-authorization-CsvzIp_F.mjs.map → oauth-authorization-CXWkIGT4.mjs.map} +1 -1
- package/dist/{oauth-clients-C9SYwEbZ.mjs → oauth-clients-BmTI5rsl.mjs} +1 -1
- package/dist/{oauth-clients-C9SYwEbZ.mjs.map → oauth-clients-BmTI5rsl.mjs.map} +1 -1
- package/dist/{oauth-state-store---zrApfB.mjs → oauth-state-store-YLFLcH5F.mjs} +1 -1
- package/dist/{oauth-state-store---zrApfB.mjs.map → oauth-state-store-YLFLcH5F.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-SHsWRlG9.mjs → oauth-user-lookup-Bsc_GsX-.mjs} +1 -1
- package/dist/{oauth-user-lookup-SHsWRlG9.mjs.map → oauth-user-lookup-Bsc_GsX-.mjs.map} +1 -1
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-CHbHv83-.mjs → object-cache-Bok5j2ae.mjs} +43 -3
- package/dist/object-cache-Bok5j2ae.mjs.map +1 -0
- package/dist/{options-41nCWqi9.d.mts → options-iMpRRxIe.d.mts} +3 -3
- package/dist/{options-41nCWqi9.d.mts.map → options-iMpRRxIe.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-BwAdS7FZ.mjs → parse-GmjecGct.mjs} +2 -2
- package/dist/{parse-BwAdS7FZ.mjs.map → parse-GmjecGct.mjs.map} +1 -1
- package/dist/{passkey-config-C0YfSBko.mjs → passkey-config-De0ahnRg.mjs} +1 -1
- package/dist/{passkey-config-C0YfSBko.mjs.map → passkey-config-De0ahnRg.mjs.map} +1 -1
- package/dist/{placeholder-Cuce9U-m.d.mts → placeholder-BSKwzRe4.d.mts} +1 -1
- package/dist/{placeholder-Cuce9U-m.d.mts.map → placeholder-BSKwzRe4.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +10 -9
- package/dist/plugin-utils.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{portable-text-BICg8bTk.mjs → portable-text-cCa0cGV6.mjs} +1 -1
- package/dist/{portable-text-BICg8bTk.mjs.map → portable-text-cCa0cGV6.mjs.map} +1 -1
- package/dist/{preview-DKGCt2_p.mjs → preview-SSXNVPAC.mjs} +2 -2
- package/dist/{preview-DKGCt2_p.mjs.map → preview-SSXNVPAC.mjs.map} +1 -1
- package/dist/{public-url-CTVqgMmg.mjs → public-url-Danv47cS.mjs} +1 -1
- package/dist/{public-url-CTVqgMmg.mjs.map → public-url-Danv47cS.mjs.map} +1 -1
- package/dist/{query-BpQb-blG.mjs → query-ByGq6ver.mjs} +14 -14
- package/dist/{query-BpQb-blG.mjs.map → query-ByGq6ver.mjs.map} +1 -1
- package/dist/{rate-limit-Dap6HMNM.mjs → rate-limit-C_Lf63Dd.mjs} +2 -2
- package/dist/{rate-limit-Dap6HMNM.mjs.map → rate-limit-C_Lf63Dd.mjs.map} +1 -1
- package/dist/{redirect-CS-PHtNh.mjs → redirect-CoW3G-0U.mjs} +1 -1
- package/dist/{redirect-CS-PHtNh.mjs.map → redirect-CoW3G-0U.mjs.map} +1 -1
- package/dist/{redirect-_M0trWoo.mjs → redirect-IyfNirgS.mjs} +2 -2
- package/dist/{redirect-_M0trWoo.mjs.map → redirect-IyfNirgS.mjs.map} +1 -1
- package/dist/{redirects-w0V9vj_j.mjs → redirects-Bs1g42Ri.mjs} +4 -4
- package/dist/{redirects-w0V9vj_j.mjs.map → redirects-Bs1g42Ri.mjs.map} +1 -1
- package/dist/{redirects-Dcbuisoj.mjs → redirects-DXEXBAII.mjs} +2 -2
- package/dist/{redirects-Dcbuisoj.mjs.map → redirects-DXEXBAII.mjs.map} +1 -1
- package/dist/{registry-g8yYt4cC.mjs → registry-B65mUtPa.mjs} +122 -79
- package/dist/registry-B65mUtPa.mjs.map +1 -0
- package/dist/{request-meta-CmS1tDFf.mjs → request-meta-DbvXaAvU.mjs} +2 -2
- package/dist/{request-meta-CmS1tDFf.mjs.map → request-meta-DbvXaAvU.mjs.map} +1 -1
- package/dist/{resolve-C7I0qiR0.mjs → resolve-DR3wqMTy.mjs} +1 -1
- package/dist/{resolve-C7I0qiR0.mjs.map → resolve-DR3wqMTy.mjs.map} +1 -1
- package/dist/{runner-BbR3DfrL.d.mts → runner-DvFWoz8-.d.mts} +2 -2
- package/dist/{runner-BbR3DfrL.d.mts.map → runner-DvFWoz8-.d.mts.map} +1 -1
- package/dist/{runner-DPdt_Wpa.mjs → runner-K8XK101B.mjs} +351 -199
- package/dist/runner-K8XK101B.mjs.map +1 -0
- package/dist/runtime.d.mts +11 -10
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +2 -2
- package/dist/scheduled-publish-Drffrf2a.d.mts +11 -0
- package/dist/scheduled-publish-Drffrf2a.d.mts.map +1 -0
- package/dist/{schema-DoLd3j2e.mjs → schema-Blhoxp3P.mjs} +5 -5
- package/dist/{schema-DoLd3j2e.mjs.map → schema-Blhoxp3P.mjs.map} +1 -1
- package/dist/{search-BR0ZeZmh.mjs → search-DZN2HZ-V.mjs} +6 -4
- package/dist/search-DZN2HZ-V.mjs.map +1 -0
- package/dist/{secrets-BSf9pRRY.mjs → secrets-kp760LlD.mjs} +2 -2
- package/dist/{secrets-BSf9pRRY.mjs.map → secrets-kp760LlD.mjs.map} +1 -1
- package/dist/{sections-5J2YJPqJ.mjs → sections-CpF5SaGr.mjs} +3 -3
- package/dist/{sections-5J2YJPqJ.mjs.map → sections-CpF5SaGr.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +19 -18
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +1 -1
- package/dist/{seo-BkhuuaaE.mjs → seo-89-53DDs.mjs} +1 -1
- package/dist/{seo-BkhuuaaE.mjs.map → seo-89-53DDs.mjs.map} +1 -1
- package/dist/{seo-DKeXHkzE.mjs → seo-DXu2UQnC.mjs} +3 -3
- package/dist/{seo-DKeXHkzE.mjs.map → seo-DXu2UQnC.mjs.map} +1 -1
- package/dist/{service-BbO2s8gT.mjs → service-DQmiBMzt.mjs} +3 -3
- package/dist/{service-BbO2s8gT.mjs.map → service-DQmiBMzt.mjs.map} +1 -1
- package/dist/{session-user-B8aLtKAH.mjs → session-user-Cascbax7.mjs} +1 -1
- package/dist/{session-user-B8aLtKAH.mjs.map → session-user-Cascbax7.mjs.map} +1 -1
- package/dist/{settings-BMNr9Dmi.mjs → settings-rZyHEcNT.mjs} +3 -3
- package/dist/{settings-BMNr9Dmi.mjs.map → settings-rZyHEcNT.mjs.map} +1 -1
- package/dist/{settings-DJeki-97.mjs → settings-zhmdKyJQ.mjs} +5 -5
- package/dist/{settings-DJeki-97.mjs.map → settings-zhmdKyJQ.mjs.map} +1 -1
- package/dist/{setup-complete-gEiySUc-.mjs → setup-complete-Cb3LRyzy.mjs} +1 -1
- package/dist/{setup-complete-gEiySUc-.mjs.map → setup-complete-Cb3LRyzy.mjs.map} +1 -1
- package/dist/{setup-nonce-DzS50zme.mjs → setup-nonce-Z8x0tHf8.mjs} +1 -1
- package/dist/{setup-nonce-DzS50zme.mjs.map → setup-nonce-Z8x0tHf8.mjs.map} +1 -1
- package/dist/{single-flight-cache-Cdfkic3t.mjs → single-flight-cache-BG3B_GhN.mjs} +1 -1
- package/dist/{single-flight-cache-Cdfkic3t.mjs.map → single-flight-cache-BG3B_GhN.mjs.map} +1 -1
- package/dist/{site-url-BLebyON8.mjs → site-url-BBfDTgZB.mjs} +1 -1
- package/dist/{site-url-BLebyON8.mjs.map → site-url-BBfDTgZB.mjs.map} +1 -1
- package/dist/{ssrf-BRKb343l.mjs → ssrf-1g7usGBg.mjs} +1 -1
- package/dist/{ssrf-BRKb343l.mjs.map → ssrf-1g7usGBg.mjs.map} +1 -1
- package/dist/{status-vUK0SA17.mjs → status-CqJQX1QN.mjs} +1 -1
- package/dist/{status-vUK0SA17.mjs.map → status-CqJQX1QN.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/{taxonomies-CM_fUqLU.mjs → taxonomies-BGBd16Eu.mjs} +4 -4
- package/dist/{taxonomies-CM_fUqLU.mjs.map → taxonomies-BGBd16Eu.mjs.map} +1 -1
- package/dist/{taxonomies-D13i2ctt.mjs → taxonomies-Cnb4F-Pb.mjs} +7 -7
- package/dist/{taxonomies-D13i2ctt.mjs.map → taxonomies-Cnb4F-Pb.mjs.map} +1 -1
- package/dist/{taxonomy-BU0LjdVb.mjs → taxonomy-BxGxZZdu.mjs} +4 -4
- package/dist/{taxonomy-BU0LjdVb.mjs.map → taxonomy-BxGxZZdu.mjs.map} +1 -1
- package/dist/{tokens-LeuXF9gG.mjs → tokens-BGT0TUUo.mjs} +1 -1
- package/dist/{tokens-LeuXF9gG.mjs.map → tokens-BGT0TUUo.mjs.map} +1 -1
- package/dist/{transport-BZ-03aFT.d.mts → transport-BMDWHSgZ.d.mts} +1 -1
- package/dist/{transport-BZ-03aFT.d.mts.map → transport-BMDWHSgZ.d.mts.map} +1 -1
- package/dist/{transport-_2nBz7e9.mjs → transport-DPefPMcz.mjs} +1 -1
- package/dist/{transport-_2nBz7e9.mjs.map → transport-DPefPMcz.mjs.map} +1 -1
- package/dist/{trusted-proxy-DZY5WCn2.mjs → trusted-proxy-VTPRiX2s.mjs} +1 -1
- package/dist/{trusted-proxy-DZY5WCn2.mjs.map → trusted-proxy-VTPRiX2s.mjs.map} +1 -1
- package/dist/{types-ETmO_jQr.d.mts → types-BcLUUbbR.d.mts} +2 -2
- package/dist/{types-ETmO_jQr.d.mts.map → types-BcLUUbbR.d.mts.map} +1 -1
- package/dist/{types-BYnDBVwe.d.mts → types-CGbYowGQ.d.mts} +2 -2
- package/dist/{types-BYnDBVwe.d.mts.map → types-CGbYowGQ.d.mts.map} +1 -1
- package/dist/{types-BWqGVhFn.d.mts → types-CgvhU-hF.d.mts} +1 -1
- package/dist/{types-BWqGVhFn.d.mts.map → types-CgvhU-hF.d.mts.map} +1 -1
- package/dist/{types-fS7-VTdR.d.mts → types-ClUkdbWb.d.mts} +1 -1
- package/dist/{types-fS7-VTdR.d.mts.map → types-ClUkdbWb.d.mts.map} +1 -1
- package/dist/{types-CZgK3EMW.mjs → types-CuW0zWDA.mjs} +2 -2
- package/dist/{types-CZgK3EMW.mjs.map → types-CuW0zWDA.mjs.map} +1 -1
- package/dist/{types-BG8_XTLj.d.mts → types-DmHk7vAt.d.mts} +1 -1
- package/dist/{types-BG8_XTLj.d.mts.map → types-DmHk7vAt.d.mts.map} +1 -1
- package/dist/{types-CQAugunJ.mjs → types-Jo3UYd6b.mjs} +1 -1
- package/dist/{types-CQAugunJ.mjs.map → types-Jo3UYd6b.mjs.map} +1 -1
- package/dist/{types-xIfVRNLp.d.mts → types-_HFLRzTn.d.mts} +22 -1
- package/dist/types-_HFLRzTn.d.mts.map +1 -0
- package/dist/{types-DrYMm9s5.d.mts → types-ea9sAPck.d.mts} +1 -1
- package/dist/{types-DrYMm9s5.d.mts.map → types-ea9sAPck.d.mts.map} +1 -1
- package/dist/{types-CNlaBFzx.d.mts → types-g_aFIdW0.d.mts} +1 -1
- package/dist/{types-CNlaBFzx.d.mts.map → types-g_aFIdW0.d.mts.map} +1 -1
- package/dist/{types-CUsXGRVj.d.mts → types-vgEWF18A.d.mts} +19 -1
- package/dist/{types-CUsXGRVj.d.mts.map → types-vgEWF18A.d.mts.map} +1 -1
- package/dist/{user-DkG2jKCp.mjs → user-BjAOvU3Z.mjs} +3 -3
- package/dist/{user-DkG2jKCp.mjs.map → user-BjAOvU3Z.mjs.map} +1 -1
- package/dist/{utils-B7A57fm9.mjs → utils-BJXElxdw.mjs} +156 -7
- package/dist/utils-BJXElxdw.mjs.map +1 -0
- package/dist/{validate-CuJ1Ps9j.mjs → validate-CWSnKVIJ.mjs} +2 -2
- package/dist/{validate-CuJ1Ps9j.mjs.map → validate-CWSnKVIJ.mjs.map} +1 -1
- package/dist/{validate-CG0V0wNR.d.mts → validate-Z1b86_3B.d.mts} +11 -6
- package/dist/{validate-CG0V0wNR.d.mts.map → validate-Z1b86_3B.d.mts.map} +1 -1
- package/dist/{validation-CwUfTdGF.mjs → validation-c8WjhH8z.mjs} +8 -5
- package/dist/{validation-CwUfTdGF.mjs.map → validation-c8WjhH8z.mjs.map} +1 -1
- package/dist/version-CaccU7DM.mjs +7 -0
- package/dist/{version-BoNBItP_.mjs.map → version-CaccU7DM.mjs.map} +1 -1
- package/dist/{widgets-BfOZ-ajY.mjs → widgets-hWcIicX8.mjs} +3 -3
- package/dist/{widgets-BfOZ-ajY.mjs.map → widgets-hWcIicX8.mjs.map} +1 -1
- package/dist/wxr-taxonomies-0_uxSrmf.d.mts +34 -0
- package/dist/wxr-taxonomies-0_uxSrmf.d.mts.map +1 -0
- package/dist/wxr-taxonomies-BC3OYpvx.mjs +425 -0
- package/dist/wxr-taxonomies-BC3OYpvx.mjs.map +1 -0
- package/dist/{zod-generator-gFsRuNNy.mjs → zod-generator-CacrR-i8.mjs} +2 -2
- package/dist/{zod-generator-gFsRuNNy.mjs.map → zod-generator-CacrR-i8.mjs.map} +1 -1
- package/package.json +6 -6
- package/src/api/handlers/content.ts +69 -23
- package/src/api/handlers/plugins.ts +77 -10
- package/src/api/schemas/import.ts +19 -0
- package/src/astro/integration/runtime.ts +3 -6
- package/src/astro/integration/vite-config.ts +19 -1
- package/src/astro/middleware/auth.ts +10 -3
- package/src/astro/middleware/csp.ts +54 -3
- package/src/astro/middleware.ts +1 -0
- package/src/astro/routes/admin.astro +9 -0
- package/src/astro/routes/api/admin/plugins/[id]/disable.ts +6 -1
- package/src/astro/routes/api/admin/plugins/[id]/enable.ts +6 -1
- package/src/astro/routes/api/admin/plugins/[id]/index.ts +1 -0
- package/src/astro/routes/api/admin/plugins/index.ts +1 -0
- package/src/astro/routes/api/import/wordpress/rewrite-urls.ts +122 -98
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +794 -44
- package/src/astro/routes/api/manifest.ts +20 -1
- package/src/astro/routes/api/setup/dev-bypass.ts +7 -2
- package/src/astro/types.ts +4 -0
- package/src/cli/commands/seed.ts +1 -1
- package/src/components/EmDashImage.astro +59 -23
- package/src/components/Image.astro +36 -35
- package/src/components/LiveSearch.astro +40 -4
- package/src/components/live-search-routing.ts +30 -0
- package/src/database/migrations/036_i18n_menus_and_taxonomies.ts +23 -18
- package/src/database/migrations/048_restore_content_taxonomies_term_index.ts +32 -0
- package/src/database/migrations/049_taxonomies_name_locale_index.ts +42 -0
- package/src/database/migrations/050_media_usage_index_status.ts +142 -0
- package/src/database/migrations/runner.ts +6 -0
- package/src/database/repositories/media-usage.ts +932 -58
- package/src/database/types.ts +22 -0
- package/src/emdash-runtime.ts +123 -3
- package/src/import/comments.ts +159 -0
- package/src/import/index.ts +8 -1
- package/src/import/settings.ts +65 -189
- package/src/import/sources/wordpress-plugin.ts +338 -42
- package/src/import/sources/wxr.ts +4 -1
- package/src/import/types.ts +12 -0
- package/src/import/utils.ts +207 -0
- package/src/import/wxr-taxonomies.ts +39 -0
- package/src/loader.ts +13 -2
- package/src/media/usage/content-fields.ts +119 -0
- package/src/media/usage/content-refresh.ts +524 -0
- package/src/media/usage/content-repair.ts +491 -0
- package/src/media/usage/content-snapshots.ts +435 -0
- package/src/media/usage/extractor.ts +4 -4
- package/src/media/usage/source-key.ts +22 -0
- package/src/menus/index.ts +17 -1
- package/src/object-cache/index.ts +82 -7
- package/src/plugins/context.ts +100 -71
- package/src/schema/registry.ts +240 -154
- package/src/search/query.ts +3 -0
- package/src/search/types.ts +2 -0
- package/src/seed/apply.ts +158 -101
- package/src/seed/types.ts +6 -1
- package/dist/api-BMfveMoB.mjs.map +0 -1
- package/dist/apply--IVNSdXn.mjs.map +0 -1
- package/dist/byline-fields-eyJMblSr.mjs.map +0 -1
- package/dist/context-C_g-iJVA.mjs.map +0 -1
- package/dist/import-Bb1T9WJS.mjs.map +0 -1
- package/dist/index-BRNabKrx.d.mts.map +0 -1
- package/dist/index-Dt0OKJB4.d.mts.map +0 -1
- package/dist/loader-BA_zhkS_.mjs.map +0 -1
- package/dist/object-cache-CHbHv83-.mjs.map +0 -1
- package/dist/registry-g8yYt4cC.mjs.map +0 -1
- package/dist/runner-DPdt_Wpa.mjs.map +0 -1
- package/dist/search-BR0ZeZmh.mjs.map +0 -1
- package/dist/types-xIfVRNLp.d.mts.map +0 -1
- package/dist/utils-B7A57fm9.mjs.map +0 -1
- package/dist/version-BoNBItP_.mjs +0 -7
- /package/dist/{api-tokens-B4BQybOp.mjs → api-tokens-DsvvCtdh.mjs} +0 -0
- /package/dist/{ssrf-CcX9zvMK.mjs → ssrf-CmuGgCq3.mjs} +0 -0
- /package/dist/{types-BvbeGEtr.mjs → types-DROWRxYV.mjs} +0 -0
|
@@ -444,7 +444,18 @@ export function createViteConfig(
|
|
|
444
444
|
// during pre-bundling and can't resolve them. Vite's exclude
|
|
445
445
|
// uses prefix matching (id.startsWith(m + "/")), so
|
|
446
446
|
// "virtual:emdash" matches all "virtual:emdash/*" imports.
|
|
447
|
-
|
|
447
|
+
//
|
|
448
|
+
// First-party packages must also stay excluded. In a
|
|
449
|
+
// real install (unlike the workspace symlink, which Vite never
|
|
450
|
+
// optimizes), the optimizer bundles their dist and code-splits
|
|
451
|
+
// lazily-executed dynamic imports (MCP tools, content
|
|
452
|
+
// validation) into hashed chunks. A mid-session re-optimization
|
|
453
|
+
// deletes those chunks while loaded modules still reference
|
|
454
|
+
// them, so every content write fails with "The file does not
|
|
455
|
+
// exist at .../deps_ssr/..." until the dev server restarts.
|
|
456
|
+
// Their CJS deps are still pre-bundled via the "parent > dep"
|
|
457
|
+
// include entries below, which resolve through excluded parents.
|
|
458
|
+
exclude: ["virtual:emdash", "emdash", "@emdash-cms/admin", "@emdash-cms/cloudflare"],
|
|
448
459
|
include: [
|
|
449
460
|
// EmDash direct deps
|
|
450
461
|
"emdash > @portabletext/toolkit",
|
|
@@ -455,6 +466,9 @@ export function createViteConfig(
|
|
|
455
466
|
"emdash > jose",
|
|
456
467
|
"emdash > jpeg-js",
|
|
457
468
|
"emdash > kysely",
|
|
469
|
+
// Only imported by the migration runner, so the first
|
|
470
|
+
// dev-bypass/setup request would otherwise discover it.
|
|
471
|
+
"emdash > kysely/migration",
|
|
458
472
|
"emdash > mime/lite",
|
|
459
473
|
"emdash > modern-tar",
|
|
460
474
|
"emdash > sanitize-html",
|
|
@@ -496,6 +510,7 @@ export function createViteConfig(
|
|
|
496
510
|
// Top-level deps (use astro > path for pnpm compat)
|
|
497
511
|
"astro > zod/v4",
|
|
498
512
|
"astro > zod/v4/core",
|
|
513
|
+
"astro/zod",
|
|
499
514
|
// zod-generator imports the bare `zod` entry, not `zod/v4`
|
|
500
515
|
"emdash > zod",
|
|
501
516
|
"@emdash-cms/cloudflare > kysely-d1",
|
|
@@ -507,6 +522,9 @@ export function createViteConfig(
|
|
|
507
522
|
"astro/assets/fonts/runtime.js",
|
|
508
523
|
"astro/assets/services/noop",
|
|
509
524
|
"@astrojs/cloudflare/image-service",
|
|
525
|
+
// Only imported by the /_image route, so the first image
|
|
526
|
+
// request would otherwise discover it.
|
|
527
|
+
"@astrojs/cloudflare/image-transform-endpoint",
|
|
510
528
|
],
|
|
511
529
|
},
|
|
512
530
|
}
|
|
@@ -34,7 +34,7 @@ import { getAuthMode, type ExternalAuthMode } from "../../auth/mode.js";
|
|
|
34
34
|
import type { ExternalAuthConfig } from "../../auth/types.js";
|
|
35
35
|
import { resolveSessionUser } from "../session-user.js";
|
|
36
36
|
import type { EmDashHandlers } from "../types.js";
|
|
37
|
-
import { buildEmDashCsp } from "./csp.js";
|
|
37
|
+
import { buildEmDashCsp, getConfiguredStorageEndpoint } from "./csp.js";
|
|
38
38
|
|
|
39
39
|
declare global {
|
|
40
40
|
namespace App {
|
|
@@ -120,6 +120,7 @@ const PUBLIC_API_EXACT = new Set([
|
|
|
120
120
|
// so unauthenticated callers only see published content. Admin endpoints
|
|
121
121
|
// (/enable, /rebuild, /stats) remain private because they're not in this set.
|
|
122
122
|
"/_emdash/api/search",
|
|
123
|
+
"/_emdash/api/search/suggest",
|
|
123
124
|
]);
|
|
124
125
|
|
|
125
126
|
// Build merged public routes at module load from auth provider descriptors.
|
|
@@ -305,7 +306,10 @@ export const onRequest = defineMiddleware(async (context, next) => {
|
|
|
305
306
|
if (!import.meta.env.DEV) {
|
|
306
307
|
response.headers.set(
|
|
307
308
|
"Content-Security-Policy",
|
|
308
|
-
buildEmDashCsp(
|
|
309
|
+
buildEmDashCsp(
|
|
310
|
+
context.locals.emdash?.config.experimental?.registry,
|
|
311
|
+
getConfiguredStorageEndpoint(context.locals.emdash?.config.storage),
|
|
312
|
+
),
|
|
309
313
|
);
|
|
310
314
|
}
|
|
311
315
|
return response;
|
|
@@ -317,7 +321,10 @@ export const onRequest = defineMiddleware(async (context, next) => {
|
|
|
317
321
|
if (!import.meta.env.DEV) {
|
|
318
322
|
response.headers.set(
|
|
319
323
|
"Content-Security-Policy",
|
|
320
|
-
buildEmDashCsp(
|
|
324
|
+
buildEmDashCsp(
|
|
325
|
+
context.locals.emdash?.config.experimental?.registry,
|
|
326
|
+
getConfiguredStorageEndpoint(context.locals.emdash?.config.storage),
|
|
327
|
+
),
|
|
321
328
|
);
|
|
322
329
|
}
|
|
323
330
|
|
|
@@ -9,9 +9,44 @@
|
|
|
9
9
|
* may reference external images (migrations, external hosting, embeds).
|
|
10
10
|
* Plugin security does not rely on img-src -- plugins run in V8 isolates with
|
|
11
11
|
* no DOM access. connect-src stays at 'self' unless the experimental registry
|
|
12
|
-
*
|
|
12
|
+
* and/or the configured storage endpoint (for direct-to-S3 signed uploads)
|
|
13
|
+
* are configured, in which case those origins are allowed too.
|
|
13
14
|
*/
|
|
14
15
|
import type { RegistryConfigInput } from "../../registry/types.js";
|
|
16
|
+
import type { StorageDescriptor } from "../storage/types.js";
|
|
17
|
+
|
|
18
|
+
/** Entrypoint constant used by the `s3()` adapter (see `astro/storage/adapters.ts`). */
|
|
19
|
+
const S3_ADAPTER_ENTRYPOINT = "emdash/storage/s3";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Storage entrypoints are free to shape their config however they like, so
|
|
23
|
+
* `endpoint` isn't a known field on `StorageDescriptor["config"]` -- only
|
|
24
|
+
* S3-compatible adapters (R2, S3, Minio, ...) set it. Anything else (e.g.
|
|
25
|
+
* local filesystem storage) simply has no `endpoint` to allow.
|
|
26
|
+
*
|
|
27
|
+
* The `s3()` adapter resolves any field omitted from its config -- including
|
|
28
|
+
* `endpoint` -- from the matching `S3_*` env var at runtime (see
|
|
29
|
+
* `storage/s3.ts`'s `resolveS3Config`). A site configured as `s3({ ... })`
|
|
30
|
+
* with only `S3_ENDPOINT` set has no `endpoint` in the descriptor's config,
|
|
31
|
+
* so fall back to that env var for S3-adapter storage before giving up.
|
|
32
|
+
*/
|
|
33
|
+
export function getConfiguredStorageEndpoint(
|
|
34
|
+
storage: StorageDescriptor | undefined,
|
|
35
|
+
): string | undefined {
|
|
36
|
+
const config = storage?.config;
|
|
37
|
+
if (typeof config === "object" && config !== null && "endpoint" in config) {
|
|
38
|
+
const endpoint = config.endpoint;
|
|
39
|
+
if (typeof endpoint === "string") return endpoint;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (storage?.entrypoint === S3_ADAPTER_ENTRYPOINT) {
|
|
43
|
+
const envEndpoint =
|
|
44
|
+
typeof process !== "undefined" && process.env ? process.env.S3_ENDPOINT : undefined;
|
|
45
|
+
if (envEndpoint) return envEndpoint;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
15
50
|
|
|
16
51
|
function getRegistryAggregatorOrigin(
|
|
17
52
|
registry: RegistryConfigInput | undefined,
|
|
@@ -28,10 +63,26 @@ function getRegistryAggregatorOrigin(
|
|
|
28
63
|
}
|
|
29
64
|
}
|
|
30
65
|
|
|
31
|
-
|
|
66
|
+
function getHttpOrigin(rawUrl: string | undefined): string | undefined {
|
|
67
|
+
if (!rawUrl) return undefined;
|
|
68
|
+
|
|
69
|
+
try {
|
|
70
|
+
const url = new URL(rawUrl);
|
|
71
|
+
if (url.protocol !== "http:" && url.protocol !== "https:") return undefined;
|
|
72
|
+
return url.origin;
|
|
73
|
+
} catch {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function buildEmDashCsp(registry?: RegistryConfigInput, storageEndpoint?: string): string {
|
|
32
79
|
const connectSrc = ["connect-src 'self'"];
|
|
80
|
+
const origins = new Set<string>();
|
|
33
81
|
const registryAggregatorOrigin = getRegistryAggregatorOrigin(registry);
|
|
34
|
-
if (registryAggregatorOrigin)
|
|
82
|
+
if (registryAggregatorOrigin) origins.add(registryAggregatorOrigin);
|
|
83
|
+
const storageOrigin = getHttpOrigin(storageEndpoint);
|
|
84
|
+
if (storageOrigin) origins.add(storageOrigin);
|
|
85
|
+
connectSrc.push(...origins);
|
|
35
86
|
|
|
36
87
|
return [
|
|
37
88
|
"default-src 'self'",
|
package/src/astro/middleware.ts
CHANGED
|
@@ -752,6 +752,7 @@ export const onRequest = defineMiddleware(async (context, next) => {
|
|
|
752
752
|
hooks: runtime.hooks,
|
|
753
753
|
email: runtime.email,
|
|
754
754
|
configuredPlugins: runtime.configuredPlugins,
|
|
755
|
+
sandboxedPluginEntries: runtime.sandboxedPluginEntries,
|
|
755
756
|
|
|
756
757
|
// Configuration (for checking database type, auth mode, etc.)
|
|
757
758
|
config,
|
|
@@ -24,6 +24,15 @@ const messages = await loadMessages(resolvedLocale);
|
|
|
24
24
|
|
|
25
25
|
const adminConfig = Astro.locals.emdash?.config?.admin;
|
|
26
26
|
const pageTitle = adminConfig?.siteName ? `${adminConfig.siteName} Admin` : "EmDash Admin";
|
|
27
|
+
|
|
28
|
+
// The admin shell must never be stored by a shared cache. Without an explicit
|
|
29
|
+
// Cache-Control, caches fall back to RFC 9111 heuristic freshness — e.g.
|
|
30
|
+
// Cloudflare's Workers Cache stores header-less 200s for 2 hours — so an
|
|
31
|
+
// authenticated editor's 200 could be replayed to anonymous visitors instead
|
|
32
|
+
// of the login redirect. The shell is also personalized per request (locale
|
|
33
|
+
// via cookie/Accept-Language). API routes already send `private, no-store`
|
|
34
|
+
// (API_CACHE_HEADERS); this closes the same gap for the admin HTML.
|
|
35
|
+
Astro.response.headers.set("Cache-Control", "private, no-store");
|
|
27
36
|
---
|
|
28
37
|
|
|
29
38
|
<!doctype html>
|
|
@@ -28,7 +28,12 @@ export const POST: APIRoute = async ({ params, locals }) => {
|
|
|
28
28
|
return apiError("INVALID_REQUEST", "Plugin ID required", 400);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const result = await handlePluginDisable(
|
|
31
|
+
const result = await handlePluginDisable(
|
|
32
|
+
emdash.db,
|
|
33
|
+
emdash.configuredPlugins,
|
|
34
|
+
emdash.sandboxedPluginEntries,
|
|
35
|
+
id,
|
|
36
|
+
);
|
|
32
37
|
|
|
33
38
|
if (!result.success) return unwrapResult(result);
|
|
34
39
|
|
|
@@ -28,7 +28,12 @@ export const POST: APIRoute = async ({ params, locals }) => {
|
|
|
28
28
|
return apiError("INVALID_REQUEST", "Plugin ID required", 400);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const result = await handlePluginEnable(
|
|
31
|
+
const result = await handlePluginEnable(
|
|
32
|
+
emdash.db,
|
|
33
|
+
emdash.configuredPlugins,
|
|
34
|
+
emdash.sandboxedPluginEntries,
|
|
35
|
+
id,
|
|
36
|
+
);
|
|
32
37
|
|
|
33
38
|
if (!result.success) return unwrapResult(result);
|
|
34
39
|
|
|
@@ -20,6 +20,7 @@ import { wpRewriteUrlsBody } from "#api/schemas.js";
|
|
|
20
20
|
import { validateIdentifier } from "#db/validate.js";
|
|
21
21
|
import { normalizeMediaValue } from "#media/normalize.js";
|
|
22
22
|
import type { MediaProvider } from "#media/types.js";
|
|
23
|
+
import { markContentMediaUsageCollectionStaleSafely } from "#media/usage/content-refresh.js";
|
|
23
24
|
import type { EmDashHandlers } from "#types";
|
|
24
25
|
|
|
25
26
|
import {
|
|
@@ -77,11 +78,12 @@ export const POST: APIRoute = async ({ request, locals }) => {
|
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
80
|
|
|
80
|
-
async function rewriteUrls(
|
|
81
|
+
export async function rewriteUrls(
|
|
81
82
|
db: NonNullable<EmDashHandlers["db"]>,
|
|
82
83
|
urlMap: Record<string, string>,
|
|
83
84
|
getProvider: (id: string) => MediaProvider | undefined,
|
|
84
85
|
collections?: string[],
|
|
86
|
+
markUsageCollectionStale: typeof markContentMediaUsageCollectionStaleSafely = markContentMediaUsageCollectionStaleSafely,
|
|
85
87
|
): Promise<RewriteUrlsResult> {
|
|
86
88
|
const { SchemaRegistry } = await import("#schema/registry.js");
|
|
87
89
|
const registry = new SchemaRegistry(db);
|
|
@@ -92,6 +94,18 @@ async function rewriteUrls(
|
|
|
92
94
|
urlsRewritten: 0,
|
|
93
95
|
errors: [],
|
|
94
96
|
};
|
|
97
|
+
const staleMarkedCollections = new Set<string>();
|
|
98
|
+
const staleMarkFailedCollections = new Set<string>();
|
|
99
|
+
const markCollectionStale = async (collectionSlug: string): Promise<void> => {
|
|
100
|
+
if (staleMarkedCollections.has(collectionSlug)) return;
|
|
101
|
+
const marked = await markUsageCollectionStale(db, collectionSlug, "CONTENT_USAGE_STALE");
|
|
102
|
+
if (marked) {
|
|
103
|
+
staleMarkedCollections.add(collectionSlug);
|
|
104
|
+
staleMarkFailedCollections.delete(collectionSlug);
|
|
105
|
+
} else {
|
|
106
|
+
staleMarkFailedCollections.add(collectionSlug);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
95
109
|
|
|
96
110
|
// Build base URL map for flexible matching
|
|
97
111
|
const baseMap = buildBaseUrlMap(urlMap);
|
|
@@ -102,52 +116,67 @@ async function rewriteUrls(
|
|
|
102
116
|
? allCollections.filter((c) => collections.includes(c.slug))
|
|
103
117
|
: allCollections;
|
|
104
118
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
try {
|
|
120
|
+
for (const collection of targetCollections) {
|
|
121
|
+
// Get fields that might contain URLs
|
|
122
|
+
const fields = await registry.listFields(collection.id);
|
|
123
|
+
const portableTextFields = fields.filter((f) => f.type === "portableText");
|
|
124
|
+
const stringFields = fields.filter((f) => ["text", "string"].includes(f.type));
|
|
125
|
+
// Image and file fields store URLs directly as TEXT
|
|
126
|
+
const mediaFields = fields.filter((f) => ["image", "file"].includes(f.type));
|
|
127
|
+
|
|
128
|
+
if (portableTextFields.length === 0 && stringFields.length === 0 && mediaFields.length === 0)
|
|
129
|
+
continue;
|
|
130
|
+
|
|
131
|
+
// Get table name
|
|
132
|
+
validateIdentifier(collection.slug, "collection slug");
|
|
133
|
+
const tableName = `ec_${collection.slug}`;
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
// Query all rows
|
|
137
|
+
const rows = await sql<{ id: string; [key: string]: unknown }>`
|
|
123
138
|
SELECT * FROM ${sql.ref(tableName)}
|
|
124
139
|
WHERE deleted_at IS NULL
|
|
125
140
|
`.execute(db);
|
|
126
141
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
142
|
+
for (const row of rows.rows) {
|
|
143
|
+
let rowUpdated = false;
|
|
144
|
+
const updates: Record<string, unknown> = {};
|
|
145
|
+
let rowUrlsRewritten = 0;
|
|
131
146
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
// Handle Portable Text fields - parse JSON and rewrite URLs in blocks
|
|
148
|
+
for (const field of portableTextFields) {
|
|
149
|
+
const value = row[field.slug];
|
|
150
|
+
if (!value || typeof value !== "string") continue;
|
|
136
151
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
152
|
+
try {
|
|
153
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- JSON.parse returns unknown; validated by Array.isArray below
|
|
154
|
+
const blocks = JSON.parse(value) as PortableTextBlock[];
|
|
155
|
+
if (!Array.isArray(blocks)) continue;
|
|
141
156
|
|
|
142
|
-
|
|
157
|
+
const rewriteResult = rewritePortableTextUrls(blocks, urlMap, baseMap);
|
|
143
158
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
159
|
+
if (rewriteResult.changed) {
|
|
160
|
+
updates[field.slug] = JSON.stringify(blocks);
|
|
161
|
+
rowUpdated = true;
|
|
162
|
+
rowUrlsRewritten += rewriteResult.urlsRewritten;
|
|
163
|
+
}
|
|
164
|
+
} catch {
|
|
165
|
+
// Not valid JSON, try string replacement as fallback
|
|
166
|
+
const stringResult = rewriteStringUrls(value, urlMap, baseMap);
|
|
167
|
+
if (stringResult.changed) {
|
|
168
|
+
updates[field.slug] = stringResult.newValue;
|
|
169
|
+
rowUpdated = true;
|
|
170
|
+
rowUrlsRewritten += stringResult.urlsRewritten;
|
|
171
|
+
}
|
|
148
172
|
}
|
|
149
|
-
}
|
|
150
|
-
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// Handle string/text fields - simple string replacement
|
|
176
|
+
for (const field of stringFields) {
|
|
177
|
+
const value = row[field.slug];
|
|
178
|
+
if (!value || typeof value !== "string") continue;
|
|
179
|
+
|
|
151
180
|
const stringResult = rewriteStringUrls(value, urlMap, baseMap);
|
|
152
181
|
if (stringResult.changed) {
|
|
153
182
|
updates[field.slug] = stringResult.newValue;
|
|
@@ -155,74 +184,69 @@ async function rewriteUrls(
|
|
|
155
184
|
rowUrlsRewritten += stringResult.urlsRewritten;
|
|
156
185
|
}
|
|
157
186
|
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// Handle string/text fields - simple string replacement
|
|
161
|
-
for (const field of stringFields) {
|
|
162
|
-
const value = row[field.slug];
|
|
163
|
-
if (!value || typeof value !== "string") continue;
|
|
164
|
-
|
|
165
|
-
const stringResult = rewriteStringUrls(value, urlMap, baseMap);
|
|
166
|
-
if (stringResult.changed) {
|
|
167
|
-
updates[field.slug] = stringResult.newValue;
|
|
168
|
-
rowUpdated = true;
|
|
169
|
-
rowUrlsRewritten += stringResult.urlsRewritten;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
187
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
// Handle image/file fields - normalize to MediaValue objects
|
|
189
|
+
for (const field of mediaFields) {
|
|
190
|
+
const value = row[field.slug];
|
|
191
|
+
if (!value || typeof value !== "string") continue;
|
|
192
|
+
|
|
193
|
+
// Values are stored as JSON MediaValue objects (e.g. featured_image from
|
|
194
|
+
// import normalizes to {"provider":"external","src":"<wp url>"}). Match on the
|
|
195
|
+
// inner `src`, falling back to the raw value for legacy bare-URL rows.
|
|
196
|
+
const newUrl = findMatchingUrl(extractMediaUrl(value), urlMap, baseMap);
|
|
197
|
+
if (newUrl) {
|
|
198
|
+
// Normalize into a proper MediaValue instead of storing a bare URL
|
|
199
|
+
try {
|
|
200
|
+
const normalized = await normalizeMediaValue(newUrl, getProvider);
|
|
201
|
+
updates[field.slug] = normalized ? JSON.stringify(normalized) : newUrl;
|
|
202
|
+
} catch {
|
|
203
|
+
updates[field.slug] = newUrl;
|
|
204
|
+
}
|
|
205
|
+
rowUpdated = true;
|
|
206
|
+
rowUrlsRewritten++;
|
|
189
207
|
}
|
|
190
|
-
rowUpdated = true;
|
|
191
|
-
rowUrlsRewritten++;
|
|
192
208
|
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (rowUpdated) {
|
|
196
|
-
try {
|
|
197
|
-
// Build update query dynamically
|
|
198
|
-
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- Kysely dynamic table requires type assertion
|
|
199
|
-
let query = db.updateTable(tableName as any).where("id", "=", row.id);
|
|
200
209
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
210
|
+
if (rowUpdated) {
|
|
211
|
+
try {
|
|
212
|
+
// Build update query dynamically
|
|
213
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- Kysely dynamic table requires type assertion
|
|
214
|
+
let query = db.updateTable(tableName as any).where("id", "=", row.id);
|
|
215
|
+
|
|
216
|
+
for (const [key, value] of Object.entries(updates)) {
|
|
217
|
+
// eslint-disable-next-line typescript/no-unsafe-type-assertion -- Kysely dynamic column update requires type assertion
|
|
218
|
+
query = query.set({ [key]: value } as any);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
await query.execute();
|
|
222
|
+
|
|
223
|
+
result.updated++;
|
|
224
|
+
result.urlsRewritten += rowUrlsRewritten;
|
|
225
|
+
result.byCollection[collection.slug] =
|
|
226
|
+
(result.byCollection[collection.slug] || 0) + 1;
|
|
227
|
+
await markCollectionStale(collection.slug);
|
|
228
|
+
} catch (updateError) {
|
|
229
|
+
result.errors.push({
|
|
230
|
+
collection: collection.slug,
|
|
231
|
+
id: row.id,
|
|
232
|
+
error: updateError instanceof Error ? updateError.message : "Update failed",
|
|
233
|
+
});
|
|
204
234
|
}
|
|
205
|
-
|
|
206
|
-
await query.execute();
|
|
207
|
-
|
|
208
|
-
result.updated++;
|
|
209
|
-
result.urlsRewritten += rowUrlsRewritten;
|
|
210
|
-
result.byCollection[collection.slug] = (result.byCollection[collection.slug] || 0) + 1;
|
|
211
|
-
} catch (updateError) {
|
|
212
|
-
result.errors.push({
|
|
213
|
-
collection: collection.slug,
|
|
214
|
-
id: row.id,
|
|
215
|
-
error: updateError instanceof Error ? updateError.message : "Update failed",
|
|
216
|
-
});
|
|
217
235
|
}
|
|
218
236
|
}
|
|
237
|
+
} catch (queryError) {
|
|
238
|
+
result.errors.push({
|
|
239
|
+
collection: collection.slug,
|
|
240
|
+
id: "*",
|
|
241
|
+
error: queryError instanceof Error ? queryError.message : "Query failed for collection",
|
|
242
|
+
});
|
|
219
243
|
}
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
244
|
+
}
|
|
245
|
+
} finally {
|
|
246
|
+
for (const collectionSlug of staleMarkFailedCollections) {
|
|
247
|
+
if (staleMarkedCollections.has(collectionSlug)) continue;
|
|
248
|
+
const marked = await markUsageCollectionStale(db, collectionSlug, "CONTENT_USAGE_STALE");
|
|
249
|
+
if (marked) staleMarkedCollections.add(collectionSlug);
|
|
226
250
|
}
|
|
227
251
|
}
|
|
228
252
|
|