emdash 0.18.0 → 0.20.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-C5AWLJSD.d.mts → adapters-BzIHV3sw.d.mts} +1 -1
- package/dist/{adapters-C5AWLJSD.d.mts.map → adapters-BzIHV3sw.d.mts.map} +1 -1
- package/dist/{allowed-origins-CyYLEJkp.mjs → allowed-origins-B1u7Qnvg.mjs} +2 -2
- package/dist/{allowed-origins-CyYLEJkp.mjs.map → allowed-origins-B1u7Qnvg.mjs.map} +1 -1
- package/dist/api/route-utils.d.mts +3 -3
- package/dist/api/route-utils.mjs +15 -15
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-Cs7DAACP.mjs → api-DStv36ik.mjs} +123 -20
- package/dist/api-DStv36ik.mjs.map +1 -0
- package/dist/{api-tokens-VrXNiNvV.mjs → api-tokens-DPfhPu5V.mjs} +2 -2
- package/dist/{api-tokens-VrXNiNvV.mjs.map → api-tokens-DPfhPu5V.mjs.map} +1 -1
- package/dist/{apply-BWMV4Zmw.mjs → apply-Dr7snAMT.mjs} +23 -23
- package/dist/apply-Dr7snAMT.mjs.map +1 -0
- package/dist/astro/index.d.mts +10 -10
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +115 -25
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +9 -9
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +26 -4
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +242 -259
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +5 -5
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +5 -5
- 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 +12 -12
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +12 -12
- package/dist/astro/routes/api/admin/bylines/index.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +11 -11
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +8 -8
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +5 -5
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +4 -4
- 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 +34 -34
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/index.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +33 -33
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +34 -34
- package/dist/astro/routes/api/admin/plugins/updates.mjs +33 -33
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +33 -33
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +33 -33
- 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 +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +4 -4
- package/dist/astro/routes/api/admin/users/index.mjs +5 -5
- package/dist/astro/routes/api/auth/dev-bypass.mjs +5 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +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 +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/me.mjs +6 -6
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- 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 +5 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +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 +8 -8
- package/dist/astro/routes/api/auth/signup/verify.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +9 -8
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +12 -10
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +11 -11
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +9 -8
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.d.mts +8 -0
- package/dist/astro/routes/api/content/_collection_/authors.d.mts.map +1 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs +19 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs.map +1 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs +6 -6
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
- package/dist/astro/routes/api/dashboard.mjs +7 -7
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/media.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +9 -9
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +9 -9
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +29 -29
- package/dist/astro/routes/api/media/_id_/confirm.mjs +6 -6
- package/dist/astro/routes/api/media/_id_.mjs +6 -6
- package/dist/astro/routes/api/media/file/_...key_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +3 -3
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +3 -3
- package/dist/astro/routes/api/media/providers/index.mjs +3 -3
- package/dist/astro/routes/api/media/upload-url.mjs +7 -7
- package/dist/astro/routes/api/media.mjs +8 -8
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/items.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_/translations.mjs +7 -7
- package/dist/astro/routes/api/menus/_name_.mjs +7 -7
- package/dist/astro/routes/api/menus/index.mjs +7 -7
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/token.mjs +7 -7
- 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 +17 -3
- package/dist/astro/routes/api/openapi.json.mjs.map +1 -1
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +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 +33 -33
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +33 -33
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +33 -33
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +33 -33
- package/dist/astro/routes/api/schema/collections/index.mjs +33 -33
- package/dist/astro/routes/api/schema/index.mjs +9 -14
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +33 -33
- package/dist/astro/routes/api/schema/orphans/index.mjs +33 -33
- package/dist/astro/routes/api/search/enable.mjs +9 -9
- package/dist/astro/routes/api/search/index.mjs +8 -8
- package/dist/astro/routes/api/search/rebuild.mjs +9 -9
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +8 -8
- package/dist/astro/routes/api/sections/_slug_.mjs +8 -8
- package/dist/astro/routes/api/sections/index.mjs +8 -8
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- 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.mjs +23 -23
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.mjs +23 -23
- 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 +11 -11
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +11 -11
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +11 -11
- package/dist/astro/routes/api/taxonomies/index.mjs +11 -11
- package/dist/astro/routes/api/themes/preview.mjs +6 -6
- 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 +6 -6
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +9 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +9 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +6 -5
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +9 -8
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +3 -3
- package/dist/astro/routes/robots.txt.mjs +7 -7
- package/dist/astro/routes/sitemap-_collection_.xml.d.mts.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +16 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +8 -8
- package/dist/astro/types.d.mts +19 -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-CotM4Yiu.mjs → authorize-DsMSVSaY.mjs} +2 -2
- package/dist/{authorize-CotM4Yiu.mjs.map → authorize-DsMSVSaY.mjs.map} +1 -1
- package/dist/{byline-CWQ9aSoz.mjs → byline-DUx48sJp.mjs} +6 -6
- package/dist/{byline-CWQ9aSoz.mjs.map → byline-DUx48sJp.mjs.map} +1 -1
- package/dist/{byline-fields-DC3Wkk-U.mjs → byline-fields--WxSNS79.mjs} +2 -2
- package/dist/{byline-fields-DC3Wkk-U.mjs.map → byline-fields--WxSNS79.mjs.map} +1 -1
- package/dist/{byline-fields-Dr-xcb6S.mjs → byline-fields-8TMtkBnH.mjs} +3 -3
- package/dist/{byline-fields-Dr-xcb6S.mjs.map → byline-fields-8TMtkBnH.mjs.map} +1 -1
- package/dist/{byline-fields-BNy7Ng1U.d.mts → byline-fields-DbibsvTl.d.mts} +30 -2
- package/dist/byline-fields-DbibsvTl.d.mts.map +1 -0
- package/dist/{byline-registry-CxK5g559.mjs → byline-registry-CWP7I71B.mjs} +3 -3
- package/dist/{byline-registry-CxK5g559.mjs.map → byline-registry-CWP7I71B.mjs.map} +1 -1
- package/dist/{bylines-LJMgENMI.mjs → bylines-BdxWCnPL.mjs} +3 -3
- package/dist/{bylines-LJMgENMI.mjs.map → bylines-BdxWCnPL.mjs.map} +1 -1
- package/dist/{bylines-BJSva1Un.mjs → bylines-s8c2DXbH.mjs} +50 -6
- package/dist/{bylines-BJSva1Un.mjs.map → bylines-s8c2DXbH.mjs.map} +1 -1
- package/dist/{cache-lZL7SgVb.mjs → cache-B_HzASVT.mjs} +3 -3
- package/dist/{cache-lZL7SgVb.mjs.map → cache-B_HzASVT.mjs.map} +1 -1
- package/dist/{challenge-store-DGwuCc4R.mjs → challenge-store-DXX3rfdI.mjs} +1 -1
- package/dist/{challenge-store-DGwuCc4R.mjs.map → challenge-store-DXX3rfdI.mjs.map} +1 -1
- package/dist/{chunks-BU-vP9Dh.mjs → chunks-BerYVuve.mjs} +2 -2
- package/dist/{chunks-BU-vP9Dh.mjs.map → chunks-BerYVuve.mjs.map} +1 -1
- package/dist/cli/index.mjs +46 -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 +1 -1
- package/dist/{comment-C4jVbCM8.mjs → comment-sqQxNpN3.mjs} +2 -2
- package/dist/{comment-C4jVbCM8.mjs.map → comment-sqQxNpN3.mjs.map} +1 -1
- package/dist/{comments-BTAbC0Ek.mjs → comments-Vkivawyl.mjs} +3 -3
- package/dist/{comments-BTAbC0Ek.mjs.map → comments-Vkivawyl.mjs.map} +1 -1
- package/dist/{components-CTfpu3PZ.mjs → components-CK0cuUoH.mjs} +1 -1
- package/dist/{components-CTfpu3PZ.mjs.map → components-CK0cuUoH.mjs.map} +1 -1
- package/dist/{content-CyqOmOzm.mjs → content-BIlVx-RX.mjs} +132 -43
- package/dist/content-BIlVx-RX.mjs.map +1 -0
- package/dist/{context-DZ7bEh5-.mjs → context-Y7BRkWes.mjs} +10 -10
- package/dist/{context-DZ7bEh5-.mjs.map → context-Y7BRkWes.mjs.map} +1 -1
- package/dist/{cron-DZovZUnC.mjs → cron-BJ2ClIlj.mjs} +4 -3
- package/dist/cron-BJ2ClIlj.mjs.map +1 -0
- package/dist/{dashboard-B5WQpNTP.mjs → dashboard-2JgAMWxK.mjs} +4 -4
- package/dist/{dashboard-B5WQpNTP.mjs.map → dashboard-2JgAMWxK.mjs.map} +1 -1
- package/dist/database/instrumentation.d.mts +10 -1
- package/dist/database/instrumentation.d.mts.map +1 -1
- package/dist/database/instrumentation.mjs +13 -1
- package/dist/database/instrumentation.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-xLFNSsZ9.mjs → default-IlBaTFxM.mjs} +1 -1
- package/dist/{default-xLFNSsZ9.mjs.map → default-IlBaTFxM.mjs.map} +1 -1
- package/dist/{device-flow-ptLrVINd.mjs → device-flow-R23SIbQ2.mjs} +5 -5
- package/dist/{device-flow-ptLrVINd.mjs.map → device-flow-R23SIbQ2.mjs.map} +1 -1
- package/dist/{error-DJOsMVSt.mjs → error-RwM4dD35.mjs} +2 -2
- package/dist/{error-DJOsMVSt.mjs.map → error-RwM4dD35.mjs.map} +1 -1
- package/dist/{escape-bIyGoW5W.mjs → escape-Ds07EEyu.mjs} +1 -1
- package/dist/{escape-bIyGoW5W.mjs.map → escape-Ds07EEyu.mjs.map} +1 -1
- package/dist/{fts-manager-DR1ERA0c.mjs → fts-manager-1RgHmopc.mjs} +2 -2
- package/dist/{fts-manager-DR1ERA0c.mjs.map → fts-manager-1RgHmopc.mjs.map} +1 -1
- package/dist/{index-CjKdMZ3U.d.mts → index-B1keaX5Y.d.mts} +237 -24
- package/dist/index-B1keaX5Y.d.mts.map +1 -0
- package/dist/{index-D60_SzHG.d.mts → index-DR56od45.d.mts} +3 -3
- package/dist/{index-D60_SzHG.d.mts.map → index-DR56od45.d.mts.map} +1 -1
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +46 -46
- package/dist/{load-6ZrRhepW.mjs → load-BBetCvLC.mjs} +2 -2
- package/dist/{load-6ZrRhepW.mjs.map → load-BBetCvLC.mjs.map} +1 -1
- package/dist/{loader-Dyx8dhFV.mjs → loader-ZN1ll-d-.mjs} +36 -37
- package/dist/loader-ZN1ll-d-.mjs.map +1 -0
- package/dist/{manifest-schema-Cj-YrzrF.mjs → manifest-schema-BtwbL_vj.mjs} +55 -2
- package/dist/manifest-schema-BtwbL_vj.mjs.map +1 -0
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +11 -11
- package/dist/media/local-runtime.mjs +6 -6
- package/dist/{media-C-oovGCG.mjs → media-JOf3pNkw.mjs} +2 -2
- package/dist/{media-C-oovGCG.mjs.map → media-JOf3pNkw.mjs.map} +1 -1
- package/dist/{media-allowlist-CMcoYIjQ.mjs → media-allowlist-Dknq-OFY.mjs} +1 -1
- package/dist/{media-allowlist-CMcoYIjQ.mjs.map → media-allowlist-Dknq-OFY.mjs.map} +1 -1
- package/dist/media-url-VClf8glU.mjs +26 -0
- package/dist/media-url-VClf8glU.mjs.map +1 -0
- package/dist/{menus-DugoYwTX.mjs → menus-DX4_E01q.mjs} +3 -3
- package/dist/{menus-DugoYwTX.mjs.map → menus-DX4_E01q.mjs.map} +1 -1
- package/dist/{menus-BKkxXCmd.mjs → menus-DrQLusqj.mjs} +87 -37
- package/dist/menus-DrQLusqj.mjs.map +1 -0
- package/dist/{mode-BjlXswIw.mjs → mode-CO2vQHfq.mjs} +1 -1
- package/dist/{mode-BjlXswIw.mjs.map → mode-CO2vQHfq.mjs.map} +1 -1
- package/dist/{normalize-DVV8nbrL.mjs → normalize-CK5o04zr.mjs} +2 -2
- package/dist/{normalize-DVV8nbrL.mjs.map → normalize-CK5o04zr.mjs.map} +1 -1
- package/dist/{oauth-authorization-DvBAL75d.mjs → oauth-authorization-Bw4NdF_S.mjs} +5 -5
- package/dist/{oauth-authorization-DvBAL75d.mjs.map → oauth-authorization-Bw4NdF_S.mjs.map} +1 -1
- package/dist/{oauth-clients-8mPDStMv.mjs → oauth-clients-BGGFp57s.mjs} +1 -1
- package/dist/{oauth-clients-8mPDStMv.mjs.map → oauth-clients-BGGFp57s.mjs.map} +1 -1
- package/dist/{oauth-state-store-BJ7YtrfD.mjs → oauth-state-store-97x0xtN2.mjs} +1 -1
- package/dist/{oauth-state-store-BJ7YtrfD.mjs.map → oauth-state-store-97x0xtN2.mjs.map} +1 -1
- package/dist/{oauth-user-lookup-BdDSDvjF.mjs → oauth-user-lookup-B_vnZHKO.mjs} +1 -1
- package/dist/{oauth-user-lookup-BdDSDvjF.mjs.map → oauth-user-lookup-B_vnZHKO.mjs.map} +1 -1
- package/dist/{options-BL4X94qY.mjs → options-BPCVnesz.mjs} +1 -1
- package/dist/{options-BL4X94qY.mjs.map → options-BPCVnesz.mjs.map} +1 -1
- package/dist/{options-tb7DJROi.d.mts → options-DyYIYpPd.d.mts} +3 -3
- package/dist/{options-tb7DJROi.d.mts.map → options-DyYIYpPd.d.mts.map} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/{parse-BBkFmLVr.mjs → parse-CrGndy1A.mjs} +2 -2
- package/dist/{parse-BBkFmLVr.mjs.map → parse-CrGndy1A.mjs.map} +1 -1
- package/dist/{passkey-config-BDVM86Tj.mjs → passkey-config-C3QgnQnU.mjs} +1 -1
- package/dist/{passkey-config-BDVM86Tj.mjs.map → passkey-config-C3QgnQnU.mjs.map} +1 -1
- package/dist/{patterns-CqG5Ya3i.mjs → patterns-p-RBdTbM.mjs} +1 -1
- package/dist/{patterns-CqG5Ya3i.mjs.map → patterns-p-RBdTbM.mjs.map} +1 -1
- package/dist/{placeholder-B9lUUEmj.d.mts → placeholder-CVBv5z8k.d.mts} +1 -1
- package/dist/{placeholder-B9lUUEmj.d.mts.map → placeholder-CVBv5z8k.d.mts.map} +1 -1
- package/dist/plugin-types.d.mts +1 -1
- package/dist/plugin-utils.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +2 -2
- package/dist/{public-url-egRHCy1m.mjs → public-url-BFVC2OTJ.mjs} +1 -1
- package/dist/{public-url-egRHCy1m.mjs.map → public-url-BFVC2OTJ.mjs.map} +1 -1
- package/dist/{query-Ctlq1aOk.mjs → query-CbUcI4Xk.mjs} +33 -17
- package/dist/query-CbUcI4Xk.mjs.map +1 -0
- package/dist/{rate-limit-CH6W6ikK.mjs → rate-limit-C7hjdkS5.mjs} +2 -2
- package/dist/{rate-limit-CH6W6ikK.mjs.map → rate-limit-C7hjdkS5.mjs.map} +1 -1
- package/dist/{redirect-Cw3JTlmj.mjs → redirect-B_q19j4v.mjs} +1 -1
- package/dist/{redirect-Cw3JTlmj.mjs.map → redirect-B_q19j4v.mjs.map} +1 -1
- package/dist/{redirect-C6tJA7tk.mjs → redirect-CRWIt8Zj.mjs} +3 -3
- package/dist/{redirect-C6tJA7tk.mjs.map → redirect-CRWIt8Zj.mjs.map} +1 -1
- package/dist/{redirects-C0L9JUk4.mjs → redirects-CCbCqCCd.mjs} +28 -4
- package/dist/redirects-CCbCqCCd.mjs.map +1 -0
- package/dist/{redirects-CacE9eQa.mjs → redirects-DxVoR7PI.mjs} +5 -5
- package/dist/{redirects-CacE9eQa.mjs.map → redirects-DxVoR7PI.mjs.map} +1 -1
- package/dist/{registry-CIDxZbhh.mjs → registry-brYh-rAT.mjs} +6 -6
- package/dist/{registry-CIDxZbhh.mjs.map → registry-brYh-rAT.mjs.map} +1 -1
- package/dist/{request-cache-BYMs-BGX.mjs → request-cache-D32LpnmI.mjs} +1 -1
- package/dist/{request-cache-BYMs-BGX.mjs.map → request-cache-D32LpnmI.mjs.map} +1 -1
- package/dist/request-context.d.mts +7 -0
- package/dist/request-context.d.mts.map +1 -1
- package/dist/request-context.mjs +2 -1
- package/dist/request-context.mjs.map +1 -1
- package/dist/{runner-pt6Wl-l-.mjs → runner--4wMWwKM.mjs} +217 -166
- package/dist/runner--4wMWwKM.mjs.map +1 -0
- package/dist/{runner-DM1yR5qd.d.mts → runner-DTdhuI9i.d.mts} +2 -2
- package/dist/{runner-DM1yR5qd.d.mts.map → runner-DTdhuI9i.d.mts.map} +1 -1
- package/dist/runtime.d.mts +10 -10
- package/dist/runtime.mjs +2 -2
- package/dist/{schema-B4tk0HAG.mjs → schema-C1E70ug_.mjs} +5 -5
- package/dist/{schema-B4tk0HAG.mjs.map → schema-C1E70ug_.mjs.map} +1 -1
- package/dist/{search-f-fNfwab.mjs → search-B3SGZw91.mjs} +4 -4
- package/dist/{search-f-fNfwab.mjs.map → search-B3SGZw91.mjs.map} +1 -1
- package/dist/{secrets-YYbTgB1w.mjs → secrets-ChPTmy9x.mjs} +2 -2
- package/dist/{secrets-YYbTgB1w.mjs.map → secrets-ChPTmy9x.mjs.map} +1 -1
- package/dist/{sections-biElLfT9.mjs → sections-D_lVzwRZ.mjs} +3 -3
- package/dist/{sections-biElLfT9.mjs.map → sections-D_lVzwRZ.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +17 -17
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.d.mts.map +1 -1
- package/dist/seo/index.mjs +3 -12
- package/dist/seo/index.mjs.map +1 -1
- package/dist/{seo-BR39kvTF.mjs → seo-B5e6y9Wk.mjs} +2 -2
- package/dist/{seo-BR39kvTF.mjs.map → seo-B5e6y9Wk.mjs.map} +1 -1
- package/dist/{seo-DfjLvu8i.mjs → seo-D_LPkOtu.mjs} +4 -3
- package/dist/seo-D_LPkOtu.mjs.map +1 -0
- package/dist/{service-BhR2acnc.mjs → service-ChDcsTBs.mjs} +3 -3
- package/dist/{service-BhR2acnc.mjs.map → service-ChDcsTBs.mjs.map} +1 -1
- package/dist/{settings-D_NJvjgN.mjs → settings-Cv47v9u8.mjs} +3 -3
- package/dist/{settings-D_NJvjgN.mjs.map → settings-Cv47v9u8.mjs.map} +1 -1
- package/dist/settings-DfxiWY_s.mjs +411 -0
- package/dist/settings-DfxiWY_s.mjs.map +1 -0
- package/dist/{setup-complete-VoEZfasi.mjs → setup-complete-yvPE4OsP.mjs} +2 -2
- package/dist/{setup-complete-VoEZfasi.mjs.map → setup-complete-yvPE4OsP.mjs.map} +1 -1
- package/dist/{setup-nonce-Bm0uKqmf.mjs → setup-nonce-C9aFzb94.mjs} +1 -1
- package/dist/{setup-nonce-Bm0uKqmf.mjs.map → setup-nonce-C9aFzb94.mjs.map} +1 -1
- package/dist/{site-url-Cm8-sJy7.mjs → site-url-CnHlmAs9.mjs} +2 -2
- package/dist/{site-url-Cm8-sJy7.mjs.map → site-url-CnHlmAs9.mjs.map} +1 -1
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/{taxonomies-Mhn9rjTQ.mjs → taxonomies-BILwiyGk.mjs} +4 -4
- package/dist/{taxonomies-Mhn9rjTQ.mjs.map → taxonomies-BILwiyGk.mjs.map} +1 -1
- package/dist/{taxonomies-Crtzy4MT.mjs → taxonomies-BdAmbOwx.mjs} +50 -12
- package/dist/taxonomies-BdAmbOwx.mjs.map +1 -0
- package/dist/{taxonomy-DTZrIQpi.mjs → taxonomy-CdllE4oq.mjs} +3 -3
- package/dist/{taxonomy-DTZrIQpi.mjs.map → taxonomy-CdllE4oq.mjs.map} +1 -1
- package/dist/{transaction-NQj4VJ7Z.mjs → transaction-x2tJQ-A1.mjs} +1 -1
- package/dist/{transaction-NQj4VJ7Z.mjs.map → transaction-x2tJQ-A1.mjs.map} +1 -1
- package/dist/{transport-OnMNbsIA.d.mts → transport-B7PPP2CC.d.mts} +1 -1
- package/dist/{transport-OnMNbsIA.d.mts.map → transport-B7PPP2CC.d.mts.map} +1 -1
- package/dist/{transport--Ck3RBin.mjs → transport-CmpLD7W3.mjs} +1 -1
- package/dist/{transport--Ck3RBin.mjs.map → transport-CmpLD7W3.mjs.map} +1 -1
- package/dist/{types-DWnN7weG.d.mts → types-BFgrqwSk.d.mts} +1 -1
- package/dist/{types-DWnN7weG.d.mts.map → types-BFgrqwSk.d.mts.map} +1 -1
- package/dist/{types-Qa7-HJJC.d.mts → types-BH8-30hc.d.mts} +1 -1
- package/dist/{types-Qa7-HJJC.d.mts.map → types-BH8-30hc.d.mts.map} +1 -1
- package/dist/{types-DawhLFwy.d.mts → types-BPzXTV9x.d.mts} +26 -1
- package/dist/{types-DawhLFwy.d.mts.map → types-BPzXTV9x.d.mts.map} +1 -1
- package/dist/{types-DbCWhHet.d.mts → types-BUUVn1zr.d.mts} +2 -2
- package/dist/types-BUUVn1zr.d.mts.map +1 -0
- package/dist/{types-K3MDsxpy.mjs → types-BXSUSAjt.mjs} +16 -3
- package/dist/{types-K3MDsxpy.mjs.map → types-BXSUSAjt.mjs.map} +1 -1
- package/dist/{types-DMwSpvcw.d.mts → types-CPAPl93j.d.mts} +9 -3
- package/dist/{types-DMwSpvcw.d.mts.map → types-CPAPl93j.d.mts.map} +1 -1
- package/dist/types-CZI4E3qG.mjs +3 -0
- package/dist/{types-kwqCOUxj.d.mts → types-D4kUqbHh.d.mts} +1 -1
- package/dist/{types-kwqCOUxj.d.mts.map → types-D4kUqbHh.d.mts.map} +1 -1
- package/dist/{types-i8_uzhMD.d.mts → types-DTniiNto.d.mts} +19 -4
- package/dist/types-DTniiNto.d.mts.map +1 -0
- package/dist/{types-D8bhH891.mjs → types-DZk_y-MU.mjs} +1 -1
- package/dist/types-DZk_y-MU.mjs.map +1 -0
- package/dist/{types-DX6v9KzJ.d.mts → types-S15DXXNi.d.mts} +1 -1
- package/dist/{types-DX6v9KzJ.d.mts.map → types-S15DXXNi.d.mts.map} +1 -1
- package/dist/{user-DzEUl5zA.mjs → user-C0um7wrg.mjs} +18 -2
- package/dist/user-C0um7wrg.mjs.map +1 -0
- package/dist/{validate-JCXcsqiY.mjs → validate-Bz4vqcX1.mjs} +6 -3
- package/dist/validate-Bz4vqcX1.mjs.map +1 -0
- package/dist/{validate-Dy6nkNls.d.mts → validate-CNwkPWzz.d.mts} +13 -5
- package/dist/validate-CNwkPWzz.d.mts.map +1 -0
- package/dist/{validation-Bq-VyKJg.mjs → validation-DgGTJm3u.mjs} +5 -5
- package/dist/{validation-Bq-VyKJg.mjs.map → validation-DgGTJm3u.mjs.map} +1 -1
- package/dist/version-D-5txk2m.mjs +7 -0
- package/dist/{version-CnS-Cr8A.mjs.map → version-D-5txk2m.mjs.map} +1 -1
- package/dist/{widgets-Bap1eS1X.mjs → widgets-DZfmAbE4.mjs} +47 -44
- package/dist/widgets-DZfmAbE4.mjs.map +1 -0
- package/dist/{zod-generator-BSDpkqSH.mjs → zod-generator-Djo_VHCt.mjs} +2 -2
- package/dist/{zod-generator-BSDpkqSH.mjs.map → zod-generator-Djo_VHCt.mjs.map} +1 -1
- package/package.json +10 -10
- package/src/api/handlers/content.ts +107 -8
- package/src/api/handlers/index.ts +2 -0
- package/src/api/handlers/marketplace.ts +2 -5
- package/src/api/handlers/registry.ts +70 -0
- package/src/api/handlers/seo.ts +9 -1
- package/src/api/openapi/document.ts +25 -0
- package/src/api/schemas/content.ts +33 -0
- package/src/api/schemas/schema.ts +13 -1
- package/src/astro/integration/index.ts +98 -0
- package/src/astro/integration/routes.ts +6 -0
- package/src/astro/integration/virtual-modules.ts +39 -0
- package/src/astro/integration/vite-config.ts +12 -0
- package/src/astro/middleware.ts +48 -6
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +8 -4
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +4 -2
- package/src/astro/routes/api/content/[collection]/[id].ts +4 -2
- package/src/astro/routes/api/content/[collection]/authors.ts +34 -0
- package/src/astro/routes/api/schema/index.ts +7 -15
- package/src/astro/routes/sitemap-[collection].xml.ts +13 -2
- package/src/astro/types.ts +8 -1
- package/src/bylines/index.ts +57 -0
- package/src/cli/commands/bundle-utils.ts +2 -0
- package/src/cli/commands/export-seed.ts +28 -12
- package/src/cli/commands/secrets.ts +2 -2
- package/src/components/EmDashImage.astro +22 -4
- package/src/components/Image.astro +20 -3
- package/src/database/instrumentation.ts +13 -0
- package/src/database/migrations/043_content_references.ts +121 -0
- package/src/database/migrations/runner.ts +2 -0
- package/src/database/repositories/content.ts +225 -67
- package/src/database/repositories/index.ts +7 -0
- package/src/database/repositories/relation.ts +467 -0
- package/src/database/repositories/types.ts +31 -0
- package/src/database/repositories/user.ts +18 -0
- package/src/database/types.ts +34 -0
- package/src/emdash-runtime.ts +172 -67
- package/src/index.ts +8 -1
- package/src/loader.ts +81 -39
- package/src/media/responsive.ts +125 -0
- package/src/plugins/cron.ts +3 -2
- package/src/plugins/index.ts +5 -0
- package/src/plugins/manifest-schema.ts +75 -0
- package/src/plugins/marketplace.ts +2 -5
- package/src/plugins/scheduler/node.ts +9 -2
- package/src/plugins/types.ts +12 -0
- package/src/query.ts +45 -7
- package/src/request-context.ts +8 -0
- package/src/scheduled-publish.ts +153 -0
- package/src/schema/types.ts +11 -1
- package/src/seed/apply.ts +16 -6
- package/src/seed/types.ts +9 -0
- package/src/seed/validate.ts +15 -0
- package/src/seo/index.ts +2 -28
- package/src/seo/media-url.ts +32 -0
- package/src/settings/index.ts +32 -40
- package/src/taxonomies/index.ts +79 -12
- package/src/utils/isolate-cache.ts +189 -0
- package/src/virtual-modules.d.ts +11 -0
- package/src/widgets/index.ts +57 -54
- package/dist/api-Cs7DAACP.mjs.map +0 -1
- package/dist/apply-BWMV4Zmw.mjs.map +0 -1
- package/dist/byline-fields-BNy7Ng1U.d.mts.map +0 -1
- package/dist/content-CyqOmOzm.mjs.map +0 -1
- package/dist/cron-DZovZUnC.mjs.map +0 -1
- package/dist/index-CjKdMZ3U.d.mts.map +0 -1
- package/dist/loader-Dyx8dhFV.mjs.map +0 -1
- package/dist/manifest-schema-Cj-YrzrF.mjs.map +0 -1
- package/dist/menus-BKkxXCmd.mjs.map +0 -1
- package/dist/query-Ctlq1aOk.mjs.map +0 -1
- package/dist/redirects-C0L9JUk4.mjs.map +0 -1
- package/dist/runner-pt6Wl-l-.mjs.map +0 -1
- package/dist/seo-DfjLvu8i.mjs.map +0 -1
- package/dist/settings-b5zW1R1T.mjs +0 -235
- package/dist/settings-b5zW1R1T.mjs.map +0 -1
- package/dist/taxonomies-Crtzy4MT.mjs.map +0 -1
- package/dist/types-Cj2S6FuC.mjs +0 -3
- package/dist/types-D8bhH891.mjs.map +0 -1
- package/dist/types-DbCWhHet.d.mts.map +0 -1
- package/dist/types-i8_uzhMD.d.mts.map +0 -1
- package/dist/user-DzEUl5zA.mjs.map +0 -1
- package/dist/validate-Dy6nkNls.d.mts.map +0 -1
- package/dist/validate-JCXcsqiY.mjs.map +0 -1
- package/dist/version-CnS-Cr8A.mjs +0 -7
- package/dist/widgets-Bap1eS1X.mjs.map +0 -1
- package/src/plugins/scheduler/piggyback.ts +0 -71
- /package/dist/{api-tokens-B6VgoE6M.mjs → api-tokens-Oq39ba-Z.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Database } from "./types-
|
|
2
|
-
import { d as ImportSource, g as ProbeResult } from "./types-
|
|
1
|
+
import { t as Database } from "./types-BPzXTV9x.mjs";
|
|
2
|
+
import { d as ImportSource, g as ProbeResult } from "./types-BFgrqwSk.mjs";
|
|
3
3
|
import { Kysely } from "kysely";
|
|
4
4
|
import { Readable } from "node:stream";
|
|
5
5
|
|
|
@@ -259,4 +259,4 @@ declare function parseWxrDate(gmtDate: string | undefined, pubDate: string | und
|
|
|
259
259
|
declare const wordpressRestSource: ImportSource;
|
|
260
260
|
//#endregion
|
|
261
261
|
export { ContentBylineInput as C, decodeSlug as S, WxrSite as _, getAllSources as a, parseWxr as b, getUrlSources as c, importReusableBlocksAsSections as d, WxrAttachment as f, WxrPost as g, WxrData as h, clearSources as i, probeUrl as l, WxrCategory as m, parseWxrDate as n, getFileSources as o, WxrAuthor as p, wxrSource as r, getSource as s, wordpressRestSource as t, registerSource as u, WxrTag as v, parseWxrString as x, WxrTerm as y };
|
|
262
|
-
//# sourceMappingURL=index-
|
|
262
|
+
//# sourceMappingURL=index-DR56od45.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DR56od45.d.mts","names":[],"sources":["../src/database/repositories/byline.ts","../src/utils/slugify.ts","../src/cli/wxr/parser.ts","../src/import/sections.ts","../src/import/registry.ts","../src/import/sources/wxr.ts","../src/import/sources/wordpress-rest.ts"],"mappings":";;;;;;UAiGiB,kBAAA;EAChB,QAAA;EACA,SAAA;AAAA;;;;;;;;;AAFD;;;;;;;AAAA,iBC5EgB,UAAA,CAAW,GAAA;;;;;;UCDV,OAAA;;EAEhB,IAAA,EAAM,OAAA;EDDmB;ECGzB,KAAA,EAAO,OAAA;EDHmB;ECK1B,WAAA,EAAa,aAAA;;EAEb,UAAA,EAAY,WAAA;;EAEZ,IAAA,EAAM,MAAA;EAViB;EAYvB,OAAA,EAAS,SAAA;EAVH;EAYN,KAAA,EAAO,OAAA;EARM;EAUb,QAAA,EAAU,UAAA;AAAA;AAAA,UAGM,OAAA;EAChB,KAAA;EACA,IAAA;EACA,WAAA;EACA,QAAA;EACA,WAAA;EACA,WAAA;AAAA;AAAA,UAGgB,OAAA;EAChB,EAAA;EACA,KAAA;EACA,IAAA;EACA,OAAA;EACA,OAAA;EACA,IAAA;EACA,WAAA;EACA,OAAA;EACA,OAAA;EACA,QAAA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,UAAA;EACA,MAAA;EACA,QAAA;EACA,QAAA;EACA,YAAA;EACA,QAAA;EA1BA;EA4BA,UAAA;EA1BA;EA4BA,SAAA;EACA,UAAA;EACA,IAAA;EA1BgB;EA4BhB,gBAAA,GAAmB,GAAA;;;;;;;;;;EAUnB,cAAA,GAAiB,GAAA;EACjB,IAAA,EAAM,GAAA;EAjCN;;;;;EAuCA,MAAA;EAjCA;;;;;;;EAyCA,gBAAA;AAAA;AAAA,UA8KgB,aAAA;EAChB,EAAA;EACA,KAAA;EACA,GAAA;EACA,QAAA;EACA,IAAA,EAAM,GAAA;AAAA;AAAA,UAGU,WAAA;EAChB,EAAA;EACA,QAAA;EACA,IAAA;EACA,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R,YAAA,CACf,OAAA,sBACA,OAAA,sBACA,SAAA,uBACE,IAAA;;;cC7TU,mBAAA,EAAqB,YAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { _ as UpdateFieldInput, a as ColumnType, d as FieldType, f as FieldValidation, g as UpdateCollectionInput, h as RESERVED_FIELD_SLUGS, i as CollectionWithFields, l as FIELD_TYPE_TO_COLUMN, m as RESERVED_COLLECTION_SLUGS, n as CollectionSource, o as CreateCollectionInput, p as FieldWidgetOptions, r as CollectionSupport, s as CreateFieldInput, t as Collection, u as Field } from "./types-
|
|
2
|
-
import { a as
|
|
3
|
-
import { d as ContentListResponse, f as ContentResponse, h as ManifestResponse, l as ApiContext, m as ListResponse, p as FieldDescriptor, t as OptionsRepository } from "./options-
|
|
4
|
-
import { n as MediaTable, r as UserTable, t as Database } from "./types-
|
|
5
|
-
import { $ as PageMetadataHandler, At as normalizeCapability, B as LogAccess, F as HookName, I as HttpAccess, J as PageFragmentContribution, K as MediaUploadEvent, L as KVAccess, N as FieldWidgetConfig, Ot as isDeprecatedCapability, P as HookConfig, Q as PageMetadataEvent, St as StorageCollection, T as DeprecatedPluginCapability, V as MediaAccess, X as PageFragmentHandler, Y as PageFragmentEvent, Z as PageMetadataContribution, a as CommentAfterCreateHandler, at as PluginAdminPage, b as ContentHookEvent, bt as ResolvedPluginHooks, c as CommentBeforeCreateEvent, ct as PluginDefinition, d as CommentModerateHandler, dt as PluginRoute, f as ContentAccess, ft as PluginStorageConfig, ht as PublicPageContext, i as CommentAfterCreateEvent, it as PluginAdminExports, kt as normalizeCapabilities, l as CommentBeforeCreateHandler, lt as PluginHooks, mt as PortableTextBlockField, n as CAPABILITY_RENAMES, o as CommentAfterModerateEvent, ot as PluginCapability, pt as PortableTextBlockConfig, q as ModerationDecision, r as CollectionCommentSettings, rt as PluginAdminConfig, s as CommentAfterModerateHandler, st as PluginContext, t as BreadcrumbItem, tt as PagePlacement, u as CommentModerateEvent, ut as PluginManifest, vt as ResolvedHook, w as CurrentPluginCapability, wt as StoredComment, x as ContentPublishStateChangeEvent, xt as RouteContext, y as ContentDeleteEvent, yt as ResolvedPlugin } from "./types-
|
|
6
|
-
import "./byline-fields-
|
|
7
|
-
import { _ as MediaValue, n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "./placeholder-
|
|
8
|
-
import { $ as
|
|
9
|
-
import { n as getMigrationStatus, t as MigrationStatus } from "./runner-
|
|
10
|
-
import { S as decodeSlug, _ as WxrSite, a as getAllSources, b as parseWxr, c as getUrlSources, d as importReusableBlocksAsSections, f as WxrAttachment, g as WxrPost, h as WxrData, i as clearSources, l as probeUrl, m as WxrCategory, n as parseWxrDate, o as getFileSources, p as WxrAuthor, r as wxrSource, s as getSource, t as wordpressRestSource, u as registerSource, v as WxrTag, x as parseWxrString, y as WxrTerm } from "./index-
|
|
11
|
-
import { i as SiteSettings, n as SeoSettings, r as SiteSettingKey, t as MediaReference } from "./types-
|
|
12
|
-
import { a as ListOptions, c as S3StorageConfig, d as Storage, f as StorageDescriptor, i as FileInfo, l as SignedUploadOptions, n as DownloadResult, o as ListResult, p as UploadResult, r as EmDashStorageError, s as LocalStorageConfig, t as CreateStorageFn, u as SignedUploadUrl } from "./types-
|
|
1
|
+
import { _ as UpdateFieldInput, a as ColumnType, d as FieldType, f as FieldValidation, g as UpdateCollectionInput, h as RESERVED_FIELD_SLUGS, i as CollectionWithFields, l as FIELD_TYPE_TO_COLUMN, m as RESERVED_COLLECTION_SLUGS, n as CollectionSource, o as CreateCollectionInput, p as FieldWidgetOptions, r as CollectionSupport, s as CreateFieldInput, t as Collection, u as Field } from "./types-BUUVn1zr.mjs";
|
|
2
|
+
import { a as ContentSeo, c as EmDashValidationError, d as InvalidCursorError, f as UpdateContentInput, i as ContentItem, l as FindManyOptions, n as ContentBylineCredit, o as ContentSeoInput, s as CreateContentInput, t as BylineSummary, u as FindManyResult } from "./types-DTniiNto.mjs";
|
|
3
|
+
import { d as ContentListResponse, f as ContentResponse, h as ManifestResponse, l as ApiContext, m as ListResponse, p as FieldDescriptor, t as OptionsRepository } from "./options-DyYIYpPd.mjs";
|
|
4
|
+
import { n as MediaTable, r as UserTable, t as Database } from "./types-BPzXTV9x.mjs";
|
|
5
|
+
import { $ as PageMetadataHandler, At as normalizeCapability, B as LogAccess, F as HookName, I as HttpAccess, J as PageFragmentContribution, K as MediaUploadEvent, L as KVAccess, N as FieldWidgetConfig, Ot as isDeprecatedCapability, P as HookConfig, Q as PageMetadataEvent, St as StorageCollection, T as DeprecatedPluginCapability, V as MediaAccess, X as PageFragmentHandler, Y as PageFragmentEvent, Z as PageMetadataContribution, a as CommentAfterCreateHandler, at as PluginAdminPage, b as ContentHookEvent, bt as ResolvedPluginHooks, c as CommentBeforeCreateEvent, ct as PluginDefinition, d as CommentModerateHandler, dt as PluginRoute, f as ContentAccess, ft as PluginStorageConfig, ht as PublicPageContext, i as CommentAfterCreateEvent, it as PluginAdminExports, kt as normalizeCapabilities, l as CommentBeforeCreateHandler, lt as PluginHooks, mt as PortableTextBlockField, n as CAPABILITY_RENAMES, o as CommentAfterModerateEvent, ot as PluginCapability, pt as PortableTextBlockConfig, q as ModerationDecision, r as CollectionCommentSettings, rt as PluginAdminConfig, s as CommentAfterModerateHandler, st as PluginContext, t as BreadcrumbItem, tt as PagePlacement, u as CommentModerateEvent, ut as PluginManifest, vt as ResolvedHook, w as CurrentPluginCapability, wt as StoredComment, x as ContentPublishStateChangeEvent, xt as RouteContext, y as ContentDeleteEvent, yt as ResolvedPlugin } from "./types-CPAPl93j.mjs";
|
|
6
|
+
import "./byline-fields-DbibsvTl.mjs";
|
|
7
|
+
import { _ as MediaValue, n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "./placeholder-CVBv5z8k.mjs";
|
|
8
|
+
import { $ as ReorderMenuItemsInput, $n as getSections, $r as MediaItem, $t as CacheHint, A as getEntriesByTerm, An as hashString, Ar as handleContentGetIncludingTrashed, At as createPluginManager, B as TaxonomyTerm, Bn as PortableTextUnknownBlock, Br as handleContentUpdate, C as ReorderWidgetsInput, Cn as WhereRange, Cr as handleContentCountScheduled, Ct as NoopSandboxRunner, D as WidgetComponentDef, Dn as isSafeHref, Dr as handleContentDiscardDraft, Dt as CronScheduler, E as WidgetArea, Er as handleContentDelete, Et as NodeCronScheduler, F as getTerm, Fn as PortableTextImageBlock, Fr as handleContentRestore, Ft as HookPipeline, G as getEntriesByByline, Gn as SandboxEmailSendCallback, Gr as FieldDefinition, H as UpdateTermInput, Hn as ProseMirrorMark, Hr as reference, I as getTermsForEntries, In as PortableTextLinkMark, Ir as handleContentSchedule, It as HookResult, J as CreateMenuInput, Jn as SandboxRunnerFactory, Jr as ImageValue, Jt as getFallbackChain, K as getMenu, Kn as SandboxOptions, Kr as FieldUIHints, Kt as definePlugin, L as invalidateTermCache, Ln as PortableTextMarkDef, Lr as handleContentTranslations, Lt as createHookPipeline, M as getTaxonomyDef, Mn as prosemirrorToPortableText, Mr as handleContentListTrashed, Mt as createHttpAccess, N as getTaxonomyDefs, Nn as PortableTextCodeBlock, Nr as handleContentPermanentDelete, Nt as createUnrestrictedHttpAccess, O as WidgetType, On as sanitizeHref, Or as handleContentDuplicate, Ot as SystemCleanupFn, P as getTaxonomyTerms, Pn as PortableTextHtmlBlock, Pr as handleContentPublish, Q as MenuItemType, Qn as getSection, Qr as CreateMediaInput, Qt as after, R as CreateTermInput, Rn as PortableTextSpan, Rr as handleContentUnpublish, Rt as ValidatedPluginManifest, S as PropDef, Sn as EntryFilter, Sr as handleContentCompare, St as verifyPreviewToken, T as Widget, Tr as handleContentCreate, Tt as createNoopSandboxRunner, U as getByline, Un as ProseMirrorNode, Ur as file, V as TaxonomyTermRow, Vn as ProseMirrorDocument, Vr as portableText, Vt as PluginDescriptor, W as getBylineBySlug, Wn as SandboxEmailMessage, Wr as image, X as Menu, Xn as SandboxedPluginInstance, Xr as PluginStorageRepository, Xt as isI18nEnabled, Y as CreateMenuItemInput, Yn as SandboxUnavailableError, Yr as PortableTextBlock, Yt as getI18nConfig, Z as MenuItem, Zn as SerializedRequest, Zr as UserRepository, Zt as WaitUntilFn, _ as getWidgetArea, _n as FieldAnnotation, _r as handleRevisionGet, _t as PreviewTokenPayload, a as search, an as EntryResult, ar as getCollectionInfo, at as getComments, b as CreateWidgetAreaInput, bn as CollectionFilter$1, br as generateManifest, bt as generatePreviewToken, c as FTSManager, cn as TranslationSummary, cr as MediaListResponse, ct as getSiteSetting, d as SearchOptions, dn as getEmDashCollection, dr as handleMediaDelete, dt as getPreviewToken, ei as MediaRepository, en as CollectionFilter, er as CreateSectionInput, et as UpdateMenuInput, f as SearchResponse, fn as getEmDashEntry, fr as handleMediaGet, ft as isPreviewRequest, g as Suggestion, gn as EditProxy, gr as RevisionResponse, gt as GeneratePreviewTokenOptions, h as SuggestOptions, hn as CMSAnnotation, hr as RevisionListResponse, ht as getPreviewUrl, i as getSuggestions, in as EmDashCollections, ir as UpdateSectionInput, it as getCommentCount, j as getEntryTerms, jn as portableTextToProsemirror, jr as handleContentList, jt as PluginRouteError, k as getAllTermsForEntries, kn as computeContentHash, kr as handleContentGet, kt as PluginManager, l as CollectionSearchOptions, ln as TranslationsResult, lr as MediaResponse, lt as getSiteSettings, m as SearchStats, mn as resolveEmDashPath, mr as handleMediaUpdate, mt as buildPreviewUrl, n as extractSearchableFields, ni as DatabaseConfig, nn as ContentEntry, nr as Section, nt as GetCommentsOptions, o as searchCollection, on as InferCollectionData, or as SchemaError, ot as getPluginSetting, p as SearchResult, pn as getTranslations, pr as handleMediaList, pt as GetPreviewUrlOptions, q as getMenus, qn as SandboxRunner, qr as FileValue, qt as I18nConfig, r as getSearchStats, ri as EmDashDatabaseError, rn as EditFieldMeta, rr as SectionSource, rt as GetCommentsResult, s as searchWithDb, sn as ResolvePathResult, sr as SchemaRegistry, st as getPluginSettings, t as extractPlainText, ti as ContentRepository, tn as CollectionResult, tr as GetSectionsOptions, tt as UpdateMenuItemInput, u as SearchConfig, un as getEditMeta, ur as handleMediaCreate, ut as setSiteSettings, v as getWidgetAreas, vn as createEditable, vr as handleRevisionList, vt as VerifyPreviewTokenOptions, w as UpdateWidgetInput, wn as WhereValue, wr as handleContentCountTrashed, wt as SandboxNotAvailableError, x as CreateWidgetInput, xn as EntryData, xr as handleContentAuthors, xt as parseContentId, y as getWidgetComponents, yn as createNoop, yr as handleRevisionRestore, yt as VerifyPreviewTokenResult, z as TaxonomyDef, zn as PortableTextTextBlock, zr as handleContentUnschedule, zt as pluginManifestSchema } from "./index-B1keaX5Y.mjs";
|
|
9
|
+
import { n as getMigrationStatus, t as MigrationStatus } from "./runner-DTdhuI9i.mjs";
|
|
10
|
+
import { S as decodeSlug, _ as WxrSite, a as getAllSources, b as parseWxr, c as getUrlSources, d as importReusableBlocksAsSections, f as WxrAttachment, g as WxrPost, h as WxrData, i as clearSources, l as probeUrl, m as WxrCategory, n as parseWxrDate, o as getFileSources, p as WxrAuthor, r as wxrSource, s as getSource, t as wordpressRestSource, u as registerSource, v as WxrTag, x as parseWxrString, y as WxrTerm } from "./index-DR56od45.mjs";
|
|
11
|
+
import { i as SiteSettings, n as SeoSettings, r as SiteSettingKey, t as MediaReference } from "./types-S15DXXNi.mjs";
|
|
12
|
+
import { a as ListOptions, c as S3StorageConfig, d as Storage, f as StorageDescriptor, i as FileInfo, l as SignedUploadOptions, n as DownloadResult, o as ListResult, p as UploadResult, r as EmDashStorageError, s as LocalStorageConfig, t as CreateStorageFn, u as SignedUploadUrl } from "./types-D4kUqbHh.mjs";
|
|
13
13
|
import { EmDashRequestContext, getRequestContext, runWithContext } from "./request-context.mjs";
|
|
14
|
-
import { a as AuthResult, i as AuthProviderModule, n as AuthProviderAdminExports, o as AuthRouteDescriptor, r as AuthProviderDescriptor, s as ExternalAuthConfig, t as AuthDescriptor } from "./types-
|
|
15
|
-
import { a as SqliteConfig, i as PostgresConfig, n as DatabaseDialectType, r as LibsqlConfig, t as DatabaseDescriptor } from "./adapters-
|
|
14
|
+
import { a as AuthResult, i as AuthProviderModule, n as AuthProviderAdminExports, o as AuthRouteDescriptor, r as AuthProviderDescriptor, s as ExternalAuthConfig, t as AuthDescriptor } from "./types-BH8-30hc.mjs";
|
|
15
|
+
import { a as SqliteConfig, i as PostgresConfig, n as DatabaseDialectType, r as LibsqlConfig, t as DatabaseDescriptor } from "./adapters-BzIHV3sw.mjs";
|
|
16
16
|
import { adaptSandboxEntry } from "./plugins/adapt-sandbox-entry.mjs";
|
|
17
|
-
import { S as UrlInput, _ as SourceAuth, a as FileInput, b as SourceProbeResult, c as ImportContext, d as ImportSource, f as NormalizedItem, g as ProbeResult, h as PostTypeMapping, i as FieldCompatibility, l as ImportFieldDef, m as PostTypeAnalysis, n as CollectionSchemaStatus, o as ImportAnalysis, p as OAuthInput, r as FetchOptions, s as ImportConfig, t as AttachmentInfo, u as ImportResult, v as SourceCapabilities, x as SuggestedAction, y as SourceInput } from "./types-
|
|
17
|
+
import { S as UrlInput, _ as SourceAuth, a as FileInput, b as SourceProbeResult, c as ImportContext, d as ImportSource, f as NormalizedItem, g as ProbeResult, h as PostTypeMapping, i as FieldCompatibility, l as ImportFieldDef, m as PostTypeAnalysis, n as CollectionSchemaStatus, o as ImportAnalysis, p as OAuthInput, r as FetchOptions, s as ImportConfig, t as AttachmentInfo, u as ImportResult, v as SourceCapabilities, x as SuggestedAction, y as SourceInput } from "./types-BFgrqwSk.mjs";
|
|
18
18
|
import { SeoMeta, SeoMetaOptions, getContentSeo, getSeoMeta } from "./seo/index.mjs";
|
|
19
|
-
import { _ as SeedTaxonomyTerm, a as applySeed, b as ValidationResult, c as SeedCollection, d as SeedFile, f as SeedMenu, g as SeedTaxonomy, l as SeedContentEntry, o as SeedApplyOptions, p as SeedMenuItem, s as SeedApplyResult, t as validateSeed, u as SeedField, v as SeedWidget, y as SeedWidgetArea } from "./validate-
|
|
19
|
+
import { _ as SeedTaxonomyTerm, a as applySeed, b as ValidationResult, c as SeedCollection, d as SeedFile, f as SeedMenu, g as SeedTaxonomy, l as SeedContentEntry, o as SeedApplyOptions, p as SeedMenuItem, s as SeedApplyResult, t as validateSeed, u as SeedField, v as SeedWidget, y as SeedWidgetArea } from "./validate-CNwkPWzz.mjs";
|
|
20
20
|
import "./seed/index.mjs";
|
|
21
21
|
import { ulid } from "ulidx";
|
|
22
|
-
export { type ApiContext, type AttachmentInfo, type AuthDescriptor, type AuthProviderAdminExports, type AuthProviderDescriptor, type AuthProviderModule, type AuthResult, type AuthRouteDescriptor, type BreadcrumbItem, type BylineSummary, CAPABILITY_RENAMES, type CMSAnnotation, type CacheHint, type Collection, type CollectionCommentSettings, type CollectionFilter, type CollectionResult, type CollectionSchemaStatus, type CollectionSearchOptions, type CollectionSource, type CollectionSupport, type CollectionWithFields, type ColumnType, type CommentAfterCreateEvent, type CommentAfterCreateHandler, type CommentAfterModerateEvent, type CommentAfterModerateHandler, type CommentBeforeCreateEvent, type CommentBeforeCreateHandler, type CommentModerateEvent, type CommentModerateHandler, type ContentAccess, type ContentBylineCredit, type ContentDeleteEvent, type ContentEntry, type ContentHookEvent, type ContentItem, type ContentListResponse, type ContentPublishStateChangeEvent, ContentRepository, type ContentResponse, type ContentSeo, type ContentSeoInput, type CreateCollectionInput, type CreateContentInput, type CreateFieldInput, type CreateMediaInput, type CreateMenuInput, type CreateMenuItemInput, type CreateSectionInput, type CreateStorageFn, type CreateTermInput, type CreateWidgetAreaInput, type CreateWidgetInput, type CurrentPluginCapability, type Database, type DatabaseConfig, type DatabaseDescriptor, type DatabaseDialectType, type DeprecatedPluginCapability, type DownloadResult, type EditFieldMeta, type EditProxy, type EmDashCollections, EmDashDatabaseError, type EmDashRequestContext, EmDashStorageError, EmDashValidationError, type EntryData, type EntryFilter, type EntryResult, type ExternalAuthConfig, FIELD_TYPE_TO_COLUMN, FTSManager, type FetchOptions, type Field, type FieldAnnotation, type FieldCompatibility, type FieldDefinition, type FieldDescriptor, type FieldType, type FieldUIHints, type FieldValidation, type FieldWidgetConfig, type FieldWidgetOptions, type FileInfo, type FileInput, type FileValue, type FindManyOptions, type FindManyResult, type GeneratePreviewTokenOptions, type GetCommentsOptions, type GetCommentsResult, type GetPreviewUrlOptions, type GetSectionsOptions, type HookConfig, type HookName, HookPipeline, type HookResult, type HttpAccess, type I18nConfig, type ImageValue, type ImportAnalysis, type ImportConfig, type ImportContext, type ImportFieldDef, type ImportResult, type ImportSource, type InferCollectionData, InvalidCursorError, type KVAccess, type LibsqlConfig, type ListOptions, type ListResponse, type ListResult, type CollectionFilter$1 as LoaderCollectionFilter, type LocalStorageConfig, type LogAccess, type ManifestResponse, type MediaAccess, type MediaItem, type MediaListResponse, type MediaReference, MediaRepository, type MediaResponse, type MediaTable, type MediaUploadEvent, type MediaValue, type Menu, type MenuItem, type MenuItemType, type MigrationStatus, type ModerationDecision, NoopSandboxRunner, type NormalizedItem, type OAuthInput, OptionsRepository, type PageFragmentContribution, type PageFragmentEvent, type PageFragmentHandler, type PageMetadataContribution, type PageMetadataEvent, type PageMetadataHandler, type PagePlacement, type PlaceholderData, type PluginAdminConfig, type PluginAdminExports, type PluginAdminPage, type PluginCapability, type PluginContext, type PluginDefinition, type PluginDescriptor, type PluginHooks, PluginManager, type PluginManifest, type PluginRoute, PluginRouteError, type PluginStorageConfig, PluginStorageRepository, type PortableTextBlock, type PortableTextBlockConfig, type PortableTextBlockField, type PortableTextCodeBlock, type PortableTextHtmlBlock, type PortableTextImageBlock, type PortableTextLinkMark, type PortableTextMarkDef, type PortableTextSpan, type PortableTextTextBlock, type PortableTextUnknownBlock, type PostTypeAnalysis, type PostTypeMapping, type PostgresConfig, type PreviewTokenPayload, type ProbeResult, type PropDef, type ProseMirrorDocument, type ProseMirrorMark, type ProseMirrorNode, type PublicPageContext, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, type ReorderMenuItemsInput, type ReorderWidgetsInput, type ResolvePathResult, type ResolvedHook, type ResolvedPlugin, type ResolvedPluginHooks, type RevisionListResponse, type RevisionResponse, type RouteContext, type S3StorageConfig, type SandboxEmailMessage, type SandboxEmailSendCallback, SandboxNotAvailableError, type SandboxOptions, type SandboxRunner, type SandboxRunnerFactory, SandboxUnavailableError, type SandboxedPluginInstance, SchemaError, SchemaRegistry, type SearchConfig, type SearchOptions, type SearchResponse, type SearchResult, type SearchStats, type Section, type SectionSource, type SeedApplyOptions, type SeedApplyResult, type SeedCollection, type SeedContentEntry, type SeedField, type SeedFile, type SeedMenu, type SeedMenuItem, type SeedTaxonomy, type SeedTaxonomyTerm, type SeedWidget, type SeedWidgetArea, type SeoMeta, type SeoMetaOptions, type SeoSettings, type SerializedRequest, type SignedUploadOptions, type SignedUploadUrl, type SiteSettingKey, type SiteSettings, type SourceAuth, type SourceCapabilities, type SourceInput, type SourceProbeResult, type SqliteConfig, type Storage, type StorageCollection, type StorageDescriptor, type StoredComment, type SuggestOptions, type SuggestedAction, type Suggestion, type TaxonomyDef, type TaxonomyTerm, type TaxonomyTermRow, type TranslationSummary, type TranslationsResult, type UpdateCollectionInput, type UpdateContentInput, type UpdateFieldInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdateSectionInput, type UpdateTermInput, type UpdateWidgetInput, type UploadResult, type UrlInput, UserRepository, type UserTable, type ValidatedPluginManifest, type ValidationResult, type VerifyPreviewTokenOptions, type VerifyPreviewTokenResult, type WaitUntilFn, type WhereRange, type WhereValue, type Widget, type WidgetArea, type WidgetComponentDef, type WidgetType, type WxrAttachment, type WxrAuthor, type WxrCategory, type WxrData, type WxrPost, type WxrSite, type WxrTag, type WxrTerm, adaptSandboxEntry, after, applySeed, buildPreviewUrl, clearSources, computeContentHash, createEditable, createHookPipeline, createHttpAccess, createNoop, createNoopSandboxRunner, createPluginManager, createUnrestrictedHttpAccess, decodeSlug, definePlugin, extractPlainText, extractSearchableFields, file, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAllTermsForEntries, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getEditMeta, getEmDashCollection, getEmDashEntry, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, invalidateTermCache, isDeprecatedCapability, isI18nEnabled, isPreviewRequest, isSafeHref, normalizeCapabilities, normalizeCapability, normalizeMediaValue, parseContentId, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, resolveEmDashPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, ulid, validateSeed, verifyPreviewToken, wordpressRestSource, wxrSource };
|
|
22
|
+
export { type ApiContext, type AttachmentInfo, type AuthDescriptor, type AuthProviderAdminExports, type AuthProviderDescriptor, type AuthProviderModule, type AuthResult, type AuthRouteDescriptor, type BreadcrumbItem, type BylineSummary, CAPABILITY_RENAMES, type CMSAnnotation, type CacheHint, type Collection, type CollectionCommentSettings, type CollectionFilter, type CollectionResult, type CollectionSchemaStatus, type CollectionSearchOptions, type CollectionSource, type CollectionSupport, type CollectionWithFields, type ColumnType, type CommentAfterCreateEvent, type CommentAfterCreateHandler, type CommentAfterModerateEvent, type CommentAfterModerateHandler, type CommentBeforeCreateEvent, type CommentBeforeCreateHandler, type CommentModerateEvent, type CommentModerateHandler, type ContentAccess, type ContentBylineCredit, type ContentDeleteEvent, type ContentEntry, type ContentHookEvent, type ContentItem, type ContentListResponse, type ContentPublishStateChangeEvent, ContentRepository, type ContentResponse, type ContentSeo, type ContentSeoInput, type CreateCollectionInput, type CreateContentInput, type CreateFieldInput, type CreateMediaInput, type CreateMenuInput, type CreateMenuItemInput, type CreateSectionInput, type CreateStorageFn, type CreateTermInput, type CreateWidgetAreaInput, type CreateWidgetInput, type CronScheduler, type CurrentPluginCapability, type Database, type DatabaseConfig, type DatabaseDescriptor, type DatabaseDialectType, type DeprecatedPluginCapability, type DownloadResult, type EditFieldMeta, type EditProxy, type EmDashCollections, EmDashDatabaseError, type EmDashRequestContext, EmDashStorageError, EmDashValidationError, type EntryData, type EntryFilter, type EntryResult, type ExternalAuthConfig, FIELD_TYPE_TO_COLUMN, FTSManager, type FetchOptions, type Field, type FieldAnnotation, type FieldCompatibility, type FieldDefinition, type FieldDescriptor, type FieldType, type FieldUIHints, type FieldValidation, type FieldWidgetConfig, type FieldWidgetOptions, type FileInfo, type FileInput, type FileValue, type FindManyOptions, type FindManyResult, type GeneratePreviewTokenOptions, type GetCommentsOptions, type GetCommentsResult, type GetPreviewUrlOptions, type GetSectionsOptions, type HookConfig, type HookName, HookPipeline, type HookResult, type HttpAccess, type I18nConfig, type ImageValue, type ImportAnalysis, type ImportConfig, type ImportContext, type ImportFieldDef, type ImportResult, type ImportSource, type InferCollectionData, InvalidCursorError, type KVAccess, type LibsqlConfig, type ListOptions, type ListResponse, type ListResult, type CollectionFilter$1 as LoaderCollectionFilter, type LocalStorageConfig, type LogAccess, type ManifestResponse, type MediaAccess, type MediaItem, type MediaListResponse, type MediaReference, MediaRepository, type MediaResponse, type MediaTable, type MediaUploadEvent, type MediaValue, type Menu, type MenuItem, type MenuItemType, type MigrationStatus, type ModerationDecision, NodeCronScheduler, NoopSandboxRunner, type NormalizedItem, type OAuthInput, OptionsRepository, type PageFragmentContribution, type PageFragmentEvent, type PageFragmentHandler, type PageMetadataContribution, type PageMetadataEvent, type PageMetadataHandler, type PagePlacement, type PlaceholderData, type PluginAdminConfig, type PluginAdminExports, type PluginAdminPage, type PluginCapability, type PluginContext, type PluginDefinition, type PluginDescriptor, type PluginHooks, PluginManager, type PluginManifest, type PluginRoute, PluginRouteError, type PluginStorageConfig, PluginStorageRepository, type PortableTextBlock, type PortableTextBlockConfig, type PortableTextBlockField, type PortableTextCodeBlock, type PortableTextHtmlBlock, type PortableTextImageBlock, type PortableTextLinkMark, type PortableTextMarkDef, type PortableTextSpan, type PortableTextTextBlock, type PortableTextUnknownBlock, type PostTypeAnalysis, type PostTypeMapping, type PostgresConfig, type PreviewTokenPayload, type ProbeResult, type PropDef, type ProseMirrorDocument, type ProseMirrorMark, type ProseMirrorNode, type PublicPageContext, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, type ReorderMenuItemsInput, type ReorderWidgetsInput, type ResolvePathResult, type ResolvedHook, type ResolvedPlugin, type ResolvedPluginHooks, type RevisionListResponse, type RevisionResponse, type RouteContext, type S3StorageConfig, type SandboxEmailMessage, type SandboxEmailSendCallback, SandboxNotAvailableError, type SandboxOptions, type SandboxRunner, type SandboxRunnerFactory, SandboxUnavailableError, type SandboxedPluginInstance, SchemaError, SchemaRegistry, type SearchConfig, type SearchOptions, type SearchResponse, type SearchResult, type SearchStats, type Section, type SectionSource, type SeedApplyOptions, type SeedApplyResult, type SeedCollection, type SeedContentEntry, type SeedField, type SeedFile, type SeedMenu, type SeedMenuItem, type SeedTaxonomy, type SeedTaxonomyTerm, type SeedWidget, type SeedWidgetArea, type SeoMeta, type SeoMetaOptions, type SeoSettings, type SerializedRequest, type SignedUploadOptions, type SignedUploadUrl, type SiteSettingKey, type SiteSettings, type SourceAuth, type SourceCapabilities, type SourceInput, type SourceProbeResult, type SqliteConfig, type Storage, type StorageCollection, type StorageDescriptor, type StoredComment, type SuggestOptions, type SuggestedAction, type Suggestion, type SystemCleanupFn, type TaxonomyDef, type TaxonomyTerm, type TaxonomyTermRow, type TranslationSummary, type TranslationsResult, type UpdateCollectionInput, type UpdateContentInput, type UpdateFieldInput, type UpdateMenuInput, type UpdateMenuItemInput, type UpdateSectionInput, type UpdateTermInput, type UpdateWidgetInput, type UploadResult, type UrlInput, UserRepository, type UserTable, type ValidatedPluginManifest, type ValidationResult, type VerifyPreviewTokenOptions, type VerifyPreviewTokenResult, type WaitUntilFn, type WhereRange, type WhereValue, type Widget, type WidgetArea, type WidgetComponentDef, type WidgetType, type WxrAttachment, type WxrAuthor, type WxrCategory, type WxrData, type WxrPost, type WxrSite, type WxrTag, type WxrTerm, adaptSandboxEntry, after, applySeed, buildPreviewUrl, clearSources, computeContentHash, createEditable, createHookPipeline, createHttpAccess, createNoop, createNoopSandboxRunner, createPluginManager, createUnrestrictedHttpAccess, decodeSlug, definePlugin, extractPlainText, extractSearchableFields, file, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAllTermsForEntries, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getEditMeta, getEmDashCollection, getEmDashEntry, getEntriesByByline, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentAuthors, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, invalidateTermCache, isDeprecatedCapability, isI18nEnabled, isPreviewRequest, isSafeHref, normalizeCapabilities, normalizeCapability, normalizeMediaValue, parseContentId, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, resolveEmDashPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, ulid, validateSeed, verifyPreviewToken, wordpressRestSource, wxrSource };
|
package/dist/index.mjs
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
import { n as getMigrationStatus } from "./runner
|
|
1
|
+
import { n as getMigrationStatus } from "./runner--4wMWwKM.mjs";
|
|
2
2
|
import { t as EmDashDatabaseError } from "./errors-9P_FDrJ_.mjs";
|
|
3
3
|
import "./dialect-helpers-DRI5pyY3.mjs";
|
|
4
4
|
import { n as getI18nConfig, r as isI18nEnabled, t as getFallbackChain } from "./config-CVssduLe.mjs";
|
|
5
|
-
import { C as file, S as reference,
|
|
5
|
+
import { C as file, S as reference, a as SandboxUnavailableError, b as prosemirrorToPortableText, c as createNoopSandboxRunner, d as createPluginManager, f as PluginRouteError, g as createHookPipeline, h as HookPipeline, i as getComments, l as NodeCronScheduler, n as getMenus, o as NoopSandboxRunner, r as getCommentCount, s as SandboxNotAvailableError, t as getMenu, u as PluginManager, v as definePlugin, w as image, x as portableText, y as portableTextToProsemirror } from "./menus-DrQLusqj.mjs";
|
|
6
6
|
import { t as decodeSlug } from "./slugify-Cjh1ssOZ.mjs";
|
|
7
|
-
import { t as ContentRepository } from "./content-
|
|
7
|
+
import { t as ContentRepository } from "./content-BIlVx-RX.mjs";
|
|
8
8
|
import "./base64-CqR-7kqF.mjs";
|
|
9
|
-
import { n as InvalidCursorError, t as EmDashValidationError } from "./types-
|
|
10
|
-
import { t as MediaRepository } from "./media-
|
|
11
|
-
import { t as UserRepository } from "./user-
|
|
12
|
-
import "./taxonomy-
|
|
13
|
-
import "./comment-
|
|
14
|
-
import { t as OptionsRepository } from "./options-
|
|
15
|
-
import { a as PluginStorageRepository, i as createUnrestrictedHttpAccess, n as createHttpAccess } from "./context-
|
|
16
|
-
import "./menus-
|
|
17
|
-
import "./redirect-
|
|
9
|
+
import { n as InvalidCursorError, t as EmDashValidationError } from "./types-BXSUSAjt.mjs";
|
|
10
|
+
import { t as MediaRepository } from "./media-JOf3pNkw.mjs";
|
|
11
|
+
import { t as UserRepository } from "./user-C0um7wrg.mjs";
|
|
12
|
+
import "./taxonomy-CdllE4oq.mjs";
|
|
13
|
+
import "./comment-sqQxNpN3.mjs";
|
|
14
|
+
import { t as OptionsRepository } from "./options-BPCVnesz.mjs";
|
|
15
|
+
import { a as PluginStorageRepository, i as createUnrestrictedHttpAccess, n as createHttpAccess } from "./context-Y7BRkWes.mjs";
|
|
16
|
+
import "./menus-DX4_E01q.mjs";
|
|
17
|
+
import "./redirect-CRWIt8Zj.mjs";
|
|
18
18
|
import { getRequestContext, runWithContext } from "./request-context.mjs";
|
|
19
|
-
import "./request-cache-
|
|
20
|
-
import { a as RESERVED_COLLECTION_SLUGS, o as RESERVED_FIELD_SLUGS, r as FIELD_TYPE_TO_COLUMN } from "./types-
|
|
21
|
-
import "./byline-registry-
|
|
22
|
-
import "./byline-
|
|
23
|
-
import {
|
|
19
|
+
import "./request-cache-D32LpnmI.mjs";
|
|
20
|
+
import { a as RESERVED_COLLECTION_SLUGS, o as RESERVED_FIELD_SLUGS, r as FIELD_TYPE_TO_COLUMN } from "./types-DZk_y-MU.mjs";
|
|
21
|
+
import "./byline-registry-CWP7I71B.mjs";
|
|
22
|
+
import "./byline-DUx48sJp.mjs";
|
|
23
|
+
import { n as normalizeMediaValue } from "./normalize-CK5o04zr.mjs";
|
|
24
24
|
import { t as generatePlaceholder } from "./placeholder-BZxr8W1j.mjs";
|
|
25
|
-
import "./seo-
|
|
26
|
-
import { $ as
|
|
27
|
-
import "./dashboard-
|
|
25
|
+
import "./seo-B5e6y9Wk.mjs";
|
|
26
|
+
import { $ as handleContentGet, B as handleMediaUpdate, G as handleContentAuthors, H as handleRevisionList, I as handleMediaCreate, J as handleContentCountTrashed, K as handleContentCompare, L as handleMediaDelete, Q as handleContentDuplicate, R as handleMediaGet, U as handleRevisionRestore, V as handleRevisionGet, W as generateManifest, X as handleContentDelete, Y as handleContentCreate, Z as handleContentDiscardDraft, at as handleContentRestore, ct as handleContentUnpublish, et as handleContentGetIncludingTrashed, it as handleContentPublish, lt as handleContentUnschedule, nt as handleContentListTrashed, ot as handleContentSchedule, q as handleContentCountScheduled, rt as handleContentPermanentDelete, st as handleContentTranslations, tt as handleContentList, ut as handleContentUpdate, z as handleMediaList } from "./api-DStv36ik.mjs";
|
|
27
|
+
import "./dashboard-2JgAMWxK.mjs";
|
|
28
28
|
import { n as hashString, t as computeContentHash } from "./hash-9w3pd3-m.mjs";
|
|
29
|
-
import { t as FTSManager } from "./fts-manager-
|
|
30
|
-
import { n as SchemaRegistry, t as SchemaError } from "./registry-
|
|
31
|
-
import "./loader-
|
|
32
|
-
import { n as getCollectionInfo } from "./schema-
|
|
33
|
-
import "./zod-generator-
|
|
34
|
-
import "./seo-
|
|
35
|
-
import { o as getSection, s as getSections } from "./sections-
|
|
36
|
-
import { i as getSiteSettings, n as getPluginSettings, r as getSiteSetting, s as setSiteSettings, t as getPluginSetting } from "./settings-
|
|
37
|
-
import "./settings-
|
|
29
|
+
import { t as FTSManager } from "./fts-manager-1RgHmopc.mjs";
|
|
30
|
+
import { n as SchemaRegistry, t as SchemaError } from "./registry-brYh-rAT.mjs";
|
|
31
|
+
import "./loader-ZN1ll-d-.mjs";
|
|
32
|
+
import { n as getCollectionInfo } from "./schema-C1E70ug_.mjs";
|
|
33
|
+
import "./zod-generator-Djo_VHCt.mjs";
|
|
34
|
+
import "./seo-D_LPkOtu.mjs";
|
|
35
|
+
import { o as getSection, s as getSections } from "./sections-D_lVzwRZ.mjs";
|
|
36
|
+
import { f as after, i as getSiteSettings, n as getPluginSettings, r as getSiteSetting, s as setSiteSettings, t as getPluginSetting } from "./settings-DfxiWY_s.mjs";
|
|
37
|
+
import "./settings-Cv47v9u8.mjs";
|
|
38
38
|
import "./resolve-BqYMVG0D.mjs";
|
|
39
|
-
import { a as getTaxonomyDefs, c as getTermsForEntries, i as getTaxonomyDef, l as invalidateTermCache, n as getEntriesByTerm, o as getTaxonomyTerms, r as getEntryTerms, s as getTerm, t as getAllTermsForEntries } from "./taxonomies-
|
|
40
|
-
import "./taxonomies-
|
|
41
|
-
import { i as pluginManifestSchema } from "./manifest-schema-
|
|
42
|
-
import {
|
|
39
|
+
import { a as getTaxonomyDefs, c as getTermsForEntries, i as getTaxonomyDef, l as invalidateTermCache, n as getEntriesByTerm, o as getTaxonomyTerms, r as getEntryTerms, s as getTerm, t as getAllTermsForEntries } from "./taxonomies-BdAmbOwx.mjs";
|
|
40
|
+
import "./taxonomies-BILwiyGk.mjs";
|
|
41
|
+
import { i as pluginManifestSchema } from "./manifest-schema-BtwbL_vj.mjs";
|
|
42
|
+
import { a as normalizeCapabilities, i as isDeprecatedCapability, o as normalizeCapability, t as CAPABILITY_RENAMES } from "./types-CZI4E3qG.mjs";
|
|
43
43
|
import { t as EmDashStorageError } from "./types-DpFmlNyB.mjs";
|
|
44
44
|
import "./ssrf-BsVGIE0Z.mjs";
|
|
45
|
-
import "./error-
|
|
46
|
-
import "./parse-
|
|
47
|
-
import { dt as sanitizeHref, ut as isSafeHref } from "./redirects-
|
|
48
|
-
import "./byline-fields-
|
|
49
|
-
import { c as createEditable, i as getTranslations, l as createNoop, n as getEmDashCollection, r as getEmDashEntry, s as resolveEmDashPath, t as getEditMeta } from "./query-
|
|
45
|
+
import "./error-RwM4dD35.mjs";
|
|
46
|
+
import "./parse-CrGndy1A.mjs";
|
|
47
|
+
import { dt as sanitizeHref, ut as isSafeHref } from "./redirects-CCbCqCCd.mjs";
|
|
48
|
+
import "./byline-fields-8TMtkBnH.mjs";
|
|
49
|
+
import { c as createEditable, i as getTranslations, l as createNoop, n as getEmDashCollection, r as getEmDashEntry, s as resolveEmDashPath, t as getEditMeta } from "./query-CbUcI4Xk.mjs";
|
|
50
50
|
import { a as getAllSources, c as getUrlSources, d as importReusableBlocksAsSections, f as parseWxr, i as clearSources, l as probeUrl, n as parseWxrDate, o as getFileSources, p as parseWxrString, r as wxrSource, s as getSource, t as wordpressRestSource, u as registerSource } from "./import-Dh8bWmyq.mjs";
|
|
51
51
|
import { adaptSandboxEntry } from "./plugins/adapt-sandbox-entry.mjs";
|
|
52
52
|
import "./ssrf-BvgVcfNQ.mjs";
|
|
53
|
-
import "./cron-
|
|
53
|
+
import "./cron-BJ2ClIlj.mjs";
|
|
54
54
|
import "./email-console-DHT2Fbpj.mjs";
|
|
55
55
|
import "./utils-C4Ih4DML.mjs";
|
|
56
56
|
import { n as parseContentId, r as verifyPreviewToken, t as generatePreviewToken } from "./tokens-Bx2afeT-.mjs";
|
|
57
57
|
import { i as getPreviewUrl, n as isPreviewRequest, r as buildPreviewUrl, t as getPreviewToken } from "./preview-BfuRkVKW.mjs";
|
|
58
58
|
import { getContentSeo, getSeoMeta } from "./seo/index.mjs";
|
|
59
|
-
import { n as getByline, r as getBylineBySlug } from "./bylines-
|
|
60
|
-
import { n as getWidgetAreas, r as getWidgetComponents, t as getWidgetArea } from "./widgets-
|
|
61
|
-
import { t as validateSeed } from "./validate-
|
|
62
|
-
import { t as applySeed } from "./apply-
|
|
63
|
-
import "./load-
|
|
59
|
+
import { i as getEntriesByByline, n as getByline, r as getBylineBySlug } from "./bylines-s8c2DXbH.mjs";
|
|
60
|
+
import { n as getWidgetAreas, r as getWidgetComponents, t as getWidgetArea } from "./widgets-DZfmAbE4.mjs";
|
|
61
|
+
import { t as validateSeed } from "./validate-Bz4vqcX1.mjs";
|
|
62
|
+
import { t as applySeed } from "./apply-Dr7snAMT.mjs";
|
|
63
|
+
import "./load-BBetCvLC.mjs";
|
|
64
64
|
import "./seed/index.mjs";
|
|
65
|
-
import { a as getSuggestions, c as searchWithDb, i as getSearchStats, n as extractPlainText, o as search, r as extractSearchableFields, s as searchCollection } from "./search-
|
|
65
|
+
import { a as getSuggestions, c as searchWithDb, i as getSearchStats, n as extractPlainText, o as search, r as extractSearchableFields, s as searchCollection } from "./search-B3SGZw91.mjs";
|
|
66
66
|
import { ulid } from "ulidx";
|
|
67
67
|
|
|
68
|
-
export { CAPABILITY_RENAMES, ContentRepository, EmDashDatabaseError, EmDashStorageError, EmDashValidationError, FIELD_TYPE_TO_COLUMN, FTSManager, HookPipeline, InvalidCursorError, MediaRepository, NoopSandboxRunner, OptionsRepository, PluginManager, PluginRouteError, PluginStorageRepository, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, SandboxNotAvailableError, SandboxUnavailableError, SchemaError, SchemaRegistry, UserRepository, adaptSandboxEntry, after, applySeed, buildPreviewUrl, clearSources, computeContentHash, createEditable, createHookPipeline, createHttpAccess, createNoop, createNoopSandboxRunner, createPluginManager, createUnrestrictedHttpAccess, decodeSlug, definePlugin, extractPlainText, extractSearchableFields, file, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAllTermsForEntries, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getEditMeta, getEmDashCollection, getEmDashEntry, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, invalidateTermCache, isDeprecatedCapability, isI18nEnabled, isPreviewRequest, isSafeHref, normalizeCapabilities, normalizeCapability, normalizeMediaValue, parseContentId, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, resolveEmDashPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, ulid, validateSeed, verifyPreviewToken, wordpressRestSource, wxrSource };
|
|
68
|
+
export { CAPABILITY_RENAMES, ContentRepository, EmDashDatabaseError, EmDashStorageError, EmDashValidationError, FIELD_TYPE_TO_COLUMN, FTSManager, HookPipeline, InvalidCursorError, MediaRepository, NodeCronScheduler, NoopSandboxRunner, OptionsRepository, PluginManager, PluginRouteError, PluginStorageRepository, RESERVED_COLLECTION_SLUGS, RESERVED_FIELD_SLUGS, SandboxNotAvailableError, SandboxUnavailableError, SchemaError, SchemaRegistry, UserRepository, adaptSandboxEntry, after, applySeed, buildPreviewUrl, clearSources, computeContentHash, createEditable, createHookPipeline, createHttpAccess, createNoop, createNoopSandboxRunner, createPluginManager, createUnrestrictedHttpAccess, decodeSlug, definePlugin, extractPlainText, extractSearchableFields, file, generateManifest, generatePlaceholder, generatePreviewToken, getAllSources, getAllTermsForEntries, getByline, getBylineBySlug, getCollectionInfo, getCommentCount, getComments, getContentSeo, getEditMeta, getEmDashCollection, getEmDashEntry, getEntriesByByline, getEntriesByTerm, getEntryTerms, getFallbackChain, getFileSources, getI18nConfig, getMenu, getMenus, getMigrationStatus, getPluginSetting, getPluginSettings, getPreviewToken, getPreviewUrl, getRequestContext, getSearchStats, getSection, getSections, getSeoMeta, getSiteSetting, getSiteSettings, getSource, getSuggestions, getTaxonomyDef, getTaxonomyDefs, getTaxonomyTerms, getTerm, getTermsForEntries, getTranslations, getUrlSources, getWidgetArea, getWidgetAreas, getWidgetComponents, handleContentAuthors, handleContentCompare, handleContentCountScheduled, handleContentCountTrashed, handleContentCreate, handleContentDelete, handleContentDiscardDraft, handleContentDuplicate, handleContentGet, handleContentGetIncludingTrashed, handleContentList, handleContentListTrashed, handleContentPermanentDelete, handleContentPublish, handleContentRestore, handleContentSchedule, handleContentTranslations, handleContentUnpublish, handleContentUnschedule, handleContentUpdate, handleMediaCreate, handleMediaDelete, handleMediaGet, handleMediaList, handleMediaUpdate, handleRevisionGet, handleRevisionList, handleRevisionRestore, hashString, image, importReusableBlocksAsSections, invalidateTermCache, isDeprecatedCapability, isI18nEnabled, isPreviewRequest, isSafeHref, normalizeCapabilities, normalizeCapability, normalizeMediaValue, parseContentId, parseWxr, parseWxrDate, parseWxrString, pluginManifestSchema, portableText, portableTextToProsemirror, probeUrl, prosemirrorToPortableText, reference, registerSource, resolveEmDashPath, runWithContext, sanitizeHref, search, searchCollection, searchWithDb, setSiteSettings, ulid, validateSeed, verifyPreviewToken, wordpressRestSource, wxrSource };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner
|
|
1
|
+
import { a as __exportAll } from "./runner--4wMWwKM.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/seed/load.ts
|
|
4
4
|
var load_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -25,4 +25,4 @@ async function loadUserSeed() {
|
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
27
|
export { loadUserSeed as n, load_exports as r, loadSeed as t };
|
|
28
|
-
//# sourceMappingURL=load-
|
|
28
|
+
//# sourceMappingURL=load-BBetCvLC.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-
|
|
1
|
+
{"version":3,"file":"load-BBetCvLC.mjs","names":[],"sources":["../src/seed/load.ts"],"sourcesContent":["/**\n * Seed file loading\n *\n * Imports seed data from the virtual module, which embeds the user's seed file\n * (or the default seed) at Vite build time. This avoids runtime filesystem access,\n * which doesn't work in workerd/miniflare where process.cwd() returns \"/\".\n */\n\nimport type { SeedFile } from \"./types.js\";\n\ninterface SeedModule {\n\tseed: SeedFile;\n\tuserSeed: SeedFile | null;\n}\n\nasync function getSeedModule(): Promise<SeedModule> {\n\t// @ts-ignore - virtual module, only available within Vite runtime\n\treturn import(\"virtual:emdash/seed\") as Promise<SeedModule>;\n}\n\n/**\n * Load the seed file (user seed or default).\n */\nexport async function loadSeed(): Promise<SeedFile> {\n\tconst { seed } = await getSeedModule();\n\treturn seed;\n}\n\n/**\n * Load the user's seed file, or null if none exists.\n */\nexport async function loadUserSeed(): Promise<SeedFile | null> {\n\tconst { userSeed } = await getSeedModule();\n\treturn userSeed ?? null;\n}\n"],"mappings":";;;;;;;AAeA,eAAe,gBAAqC;AAEnD,QAAO,OAAO;;;;;AAMf,eAAsB,WAA8B;CACnD,MAAM,EAAE,SAAS,MAAM,eAAe;AACtC,QAAO;;;;;AAMR,eAAsB,eAAyC;CAC9D,MAAM,EAAE,aAAa,MAAM,eAAe;AAC1C,QAAO,YAAY"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner
|
|
1
|
+
import { a as __exportAll } from "./runner--4wMWwKM.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
3
3
|
import { a as isPostgres, i as currentTimestampValue } from "./dialect-helpers-DRI5pyY3.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { a as encodeCursor, i as decodeCursor } from "./types-BXSUSAjt.mjs";
|
|
5
5
|
import { getRequestContext } from "./request-context.mjs";
|
|
6
6
|
import { n as isMissingTableError, t as isMissingColumnError } from "./db-errors-CtzxKBxe.mjs";
|
|
7
7
|
import { kyselyLogOption } from "./database/instrumentation.mjs";
|
|
@@ -391,67 +391,66 @@ function emdashLoader() {
|
|
|
391
391
|
const locale = filter?.locale;
|
|
392
392
|
const fetchLimit = limit ? limit + 1 : void 0;
|
|
393
393
|
const cursorCondition = cursor ? buildCursorCondition(cursor, orderBy) : null;
|
|
394
|
-
const cursorConditionPrefixed = cursor ? buildCursorCondition(cursor, orderBy, tableName) : null;
|
|
395
394
|
let result;
|
|
396
|
-
|
|
395
|
+
const taxonomyFilters = [];
|
|
396
|
+
let bylineFilter = null;
|
|
397
397
|
const fieldFilters = {};
|
|
398
398
|
if (where && Object.keys(where).length > 0) {
|
|
399
399
|
const taxNames = await getTaxonomyNames(db);
|
|
400
400
|
for (const [key, value] of Object.entries(where)) {
|
|
401
401
|
if (value == null) continue;
|
|
402
|
-
if (
|
|
402
|
+
if (key === "byline") {
|
|
403
403
|
if (isWhereRange(value)) {
|
|
404
|
-
console.warn(`[emdash] where filter: range operators are not supported on
|
|
404
|
+
console.warn(`[emdash] where filter: range operators are not supported on "byline", ignored`);
|
|
405
405
|
continue;
|
|
406
406
|
}
|
|
407
|
-
|
|
408
|
-
|
|
407
|
+
bylineFilter = { groups: Array.isArray(value) ? value : [value] };
|
|
408
|
+
} else if (taxNames.has(key)) {
|
|
409
|
+
if (isWhereRange(value)) {
|
|
410
|
+
console.warn(`[emdash] where filter: range operators are not supported on taxonomy "${key}", ignored`);
|
|
409
411
|
continue;
|
|
410
412
|
}
|
|
411
|
-
|
|
413
|
+
const slugs = Array.isArray(value) ? value : [value];
|
|
414
|
+
taxonomyFilters.push({
|
|
412
415
|
name: key,
|
|
413
|
-
slugs
|
|
414
|
-
};
|
|
416
|
+
slugs
|
|
417
|
+
});
|
|
415
418
|
} else fieldFilters[key] = value;
|
|
416
419
|
}
|
|
417
420
|
}
|
|
418
|
-
if (
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
const fieldConds = buildFieldConditions(fieldFilters, tableName);
|
|
424
|
-
const fieldCondsSQL = fieldConds.length > 0 ? sql`${sql.join(fieldConds, sql` AND `)}` : null;
|
|
425
|
-
result = await sql`
|
|
426
|
-
SELECT DISTINCT ${sql.ref(tableName)}.* FROM ${sql.ref(tableName)}
|
|
427
|
-
INNER JOIN content_taxonomies ct
|
|
428
|
-
ON ct.collection = ${type}
|
|
429
|
-
AND ct.entry_id = ${sql.ref(tableName)}.id
|
|
430
|
-
INNER JOIN taxonomies t
|
|
431
|
-
ON t.id = ct.taxonomy_id
|
|
432
|
-
WHERE ${sql.ref(tableName)}.deleted_at IS NULL
|
|
433
|
-
AND ${statusCondition}
|
|
434
|
-
${localeCondition}
|
|
435
|
-
${cursorCond}
|
|
436
|
-
AND t.name = ${taxonomyFilter.name}
|
|
437
|
-
AND t.slug IN (${sql.join(taxonomyFilter.slugs.map((s) => sql`${s}`))})
|
|
438
|
-
${fieldCondsSQL ? sql`AND ${fieldCondsSQL}` : sql``}
|
|
439
|
-
${orderByClause}
|
|
440
|
-
${fetchLimit ? sql`LIMIT ${fetchLimit}` : sql``}
|
|
441
|
-
`.execute(db);
|
|
442
|
-
} else {
|
|
421
|
+
if (bylineFilter && bylineFilter.groups.length === 0 || taxonomyFilters.some((f) => f.slugs.length === 0)) return {
|
|
422
|
+
entries: [],
|
|
423
|
+
cacheHint: { tags: [type] }
|
|
424
|
+
};
|
|
425
|
+
{
|
|
443
426
|
const orderByClause = buildOrderByClause(orderBy);
|
|
444
427
|
const statusCondition = buildStatusCondition(db, status);
|
|
445
428
|
const localeFilter = locale ? sql`AND locale = ${locale}` : sql``;
|
|
446
429
|
const cursorCond = cursorCondition ? sql`AND ${cursorCondition}` : sql``;
|
|
447
430
|
const fieldConds = buildFieldConditions(fieldFilters);
|
|
448
431
|
const fieldCondsSQL = fieldConds.length > 0 ? sql`${sql.join(fieldConds, sql` AND `)}` : null;
|
|
432
|
+
const taxonomyCond = taxonomyFilters.length > 0 ? sql`${sql.join(taxonomyFilters.map((f) => sql`AND EXISTS (
|
|
433
|
+
SELECT 1 FROM content_taxonomies ct
|
|
434
|
+
INNER JOIN taxonomies t ON t.id = ct.taxonomy_id
|
|
435
|
+
WHERE ct.collection = ${type}
|
|
436
|
+
AND ct.entry_id = ${sql.ref(tableName)}.id
|
|
437
|
+
AND t.name = ${f.name}
|
|
438
|
+
AND t.slug IN (${sql.join(f.slugs.map((s) => sql`${s}`))})
|
|
439
|
+
)`), sql` `)}` : sql``;
|
|
440
|
+
const bylineCond = bylineFilter ? sql`AND EXISTS (
|
|
441
|
+
SELECT 1 FROM _emdash_content_bylines cb
|
|
442
|
+
WHERE cb.collection_slug = ${type}
|
|
443
|
+
AND cb.content_id = ${sql.ref(tableName)}.id
|
|
444
|
+
AND cb.byline_id IN (${sql.join(bylineFilter.groups.map((g) => sql`${g}`))})
|
|
445
|
+
)` : sql``;
|
|
449
446
|
result = await sql`
|
|
450
447
|
SELECT * FROM ${sql.ref(tableName)}
|
|
451
448
|
WHERE deleted_at IS NULL
|
|
452
449
|
AND ${statusCondition}
|
|
453
450
|
${localeFilter}
|
|
454
451
|
${cursorCond}
|
|
452
|
+
${taxonomyCond}
|
|
453
|
+
${bylineCond}
|
|
455
454
|
${fieldCondsSQL ? sql`AND ${fieldCondsSQL}` : sql``}
|
|
456
455
|
${orderByClause}
|
|
457
456
|
${fetchLimit ? sql`LIMIT ${fetchLimit}` : sql``}
|
|
@@ -595,4 +594,4 @@ function emdashLoader() {
|
|
|
595
594
|
|
|
596
595
|
//#endregion
|
|
597
596
|
export { loader_exports as i, emdashLoader as n, getDb as r, CURSOR_RAW_VALUES as t };
|
|
598
|
-
//# sourceMappingURL=loader-
|
|
597
|
+
//# sourceMappingURL=loader-ZN1ll-d-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-ZN1ll-d-.mjs","names":[],"sources":["../src/loader.ts"],"sourcesContent":["/**\n * Astro Live Collections loader for EmDash\n *\n * This loader implements the Astro LiveLoader interface to fetch content\n * at runtime from the database, enabling live editing without rebuilds.\n *\n * Architecture:\n * - Single `_emdash` Astro collection handles all content types\n * - Dialect comes from virtual module (configured in astro.config.mjs)\n * - Each content type maps to its own database table: ec_posts, ec_products, etc.\n * - `getEmDashCollection()` / `getEmDashEntry()` wrap Astro's live collection API\n */\n\nimport type { LiveLoader } from \"astro/loaders\";\nimport { Kysely, sql, type Dialect } from \"kysely\";\n\nimport { currentTimestampValue, isPostgres } from \"./database/dialect-helpers.js\";\nimport { kyselyLogOption } from \"./database/instrumentation.js\";\nimport { decodeCursor, encodeCursor } from \"./database/repositories/types.js\";\nimport { validateIdentifier } from \"./database/validate.js\";\nimport type { Database } from \"./index.js\";\nimport { getRequestContext } from \"./request-context.js\";\nimport { isMissingColumnError, isMissingTableError } from \"./utils/db-errors.js\";\n\nconst FIELD_NAME_PATTERN = /^[a-zA-Z_][a-zA-Z0-9_]*$/;\n\n/**\n * SEO columns joined in from `_emdash_seo` on the single-entry path, mapped to\n * aliased result keys. SEO lives in a side table, so a LEFT JOIN folds it into\n * the entry load at zero extra query cost; the result is surfaced as a nested\n * `data.seo` object (see extractSeo) rather than flat fields.\n *\n * The `_emdash_` prefix on the aliases guarantees they can never collide with\n * a content field. Field slugs must match `/^[a-z][a-z0-9_]*$/`, so a user can\n * legitimately define a `seo_title` field; selecting the joined column under\n * its bare name would shadow that field in the result set and drop the user's\n * value. The prefix (illegal as a leading slug char) sidesteps this entirely.\n */\nconst SEO_COLUMN_ALIASES: Record<string, string> = {\n\tseo_title: \"_emdash_seo_title\",\n\tseo_description: \"_emdash_seo_description\",\n\tseo_image: \"_emdash_seo_image\",\n\tseo_canonical: \"_emdash_seo_canonical\",\n\tseo_no_index: \"_emdash_seo_no_index\",\n};\n\n/** Aliased SEO result keys — excluded from generic field mapping. */\nconst SEO_ALIAS_COLUMNS = Object.values(SEO_COLUMN_ALIASES);\n\n/**\n * System columns excluded from entry.data\n * Note: slug is intentionally NOT excluded - it's useful as data.slug in templates\n */\nconst SYSTEM_COLUMNS = new Set([\n\t\"id\",\n\t// \"slug\" - kept in data for template access\n\t\"status\",\n\t\"author_id\",\n\t\"primary_byline_id\",\n\t\"created_at\",\n\t\"updated_at\",\n\t\"published_at\",\n\t\"scheduled_at\",\n\t\"deleted_at\",\n\t\"version\",\n\t\"live_revision_id\",\n\t\"draft_revision_id\",\n\t\"locale\",\n\t\"translation_group\",\n\t// Aliased SEO columns joined from _emdash_seo on the single-entry path.\n\t// Surfaced as a nested data.seo object (see extractSeo), never as flat\n\t// fields. The aliases are _emdash_-prefixed so they can't shadow a user\n\t// field named e.g. `seo_title`.\n\t...SEO_ALIAS_COLUMNS,\n]);\n\n/** Resolved SEO shape attached to `entry.data.seo`. Mirrors `ContentSeo`. */\ninterface EntrySeo {\n\ttitle: string | null;\n\tdescription: string | null;\n\timage: string | null;\n\tcanonical: string | null;\n\tnoIndex: boolean;\n}\n\n/**\n * Build a `data.seo` object from the joined `_emdash_seo` columns on a row.\n *\n * Returns `null` when no SEO row exists (LEFT JOIN miss → `seo_no_index` is\n * NULL, since the column is `NOT NULL DEFAULT 0` whenever a row is present).\n * Returning null keeps the `seo` key off entries that have none, so\n * `getSeoMeta()` falls back to its defaults exactly as before.\n */\nfunction extractSeo(row: Record<string, unknown>): EntrySeo | null {\n\tconst noIndex = row[SEO_COLUMN_ALIASES.seo_no_index];\n\tif (noIndex === null || noIndex === undefined) return null;\n\tconst title = row[SEO_COLUMN_ALIASES.seo_title];\n\tconst description = row[SEO_COLUMN_ALIASES.seo_description];\n\tconst image = row[SEO_COLUMN_ALIASES.seo_image];\n\tconst canonical = row[SEO_COLUMN_ALIASES.seo_canonical];\n\treturn {\n\t\ttitle: typeof title === \"string\" ? title : null,\n\t\tdescription: typeof description === \"string\" ? description : null,\n\t\timage: typeof image === \"string\" ? image : null,\n\t\tcanonical: typeof canonical === \"string\" ? canonical : null,\n\t\tnoIndex: noIndex === 1,\n\t};\n}\n\n/**\n * Get the table name for a collection type\n */\nfunction getTableName(type: string): string {\n\tvalidateIdentifier(type, \"collection type\");\n\treturn `ec_${type}`;\n}\n\n/**\n * Cache for taxonomy names (only used for the primary database).\n * Skipped when a per-request DB override is active (e.g. preview mode)\n * because the override DB may have different taxonomies.\n */\nlet taxonomyNames: Set<string> | null = null;\n\n/**\n * Get all taxonomy names (cached for the primary DB, bypassed only when\n * the per-request DB is an isolated instance — playground / DO preview).\n * Plain D1 Sessions routing shares schema with the singleton, so the\n * module-scoped cache stays valid.\n */\nasync function getTaxonomyNames(db: Kysely<Database>): Promise<Set<string>> {\n\tconst hasIsolatedDb = getRequestContext()?.dbIsIsolated === true;\n\n\tif (!hasIsolatedDb && taxonomyNames) {\n\t\treturn taxonomyNames;\n\t}\n\n\ttry {\n\t\tconst defs = await db.selectFrom(\"_emdash_taxonomy_defs\").select(\"name\").execute();\n\t\tconst names = new Set(defs.map((d) => d.name));\n\t\tif (!hasIsolatedDb) {\n\t\t\ttaxonomyNames = names;\n\t\t}\n\t\treturn names;\n\t} catch {\n\t\t// Table doesn't exist yet, return empty set\n\t\tconst empty = new Set<string>();\n\t\tif (!hasIsolatedDb) {\n\t\t\ttaxonomyNames = empty;\n\t\t}\n\t\treturn empty;\n\t}\n}\n\n/**\n * System columns to include in data (mapped to camelCase where needed)\n */\nconst INCLUDE_IN_DATA: Record<string, string> = {\n\tid: \"id\",\n\tstatus: \"status\",\n\tauthor_id: \"authorId\",\n\tprimary_byline_id: \"primaryBylineId\",\n\tcreated_at: \"createdAt\",\n\tupdated_at: \"updatedAt\",\n\tpublished_at: \"publishedAt\",\n\tscheduled_at: \"scheduledAt\",\n\tdraft_revision_id: \"draftRevisionId\",\n\tlive_revision_id: \"liveRevisionId\",\n\tlocale: \"locale\",\n\ttranslation_group: \"translationGroup\",\n};\n\n/** System date columns that should be converted to Date objects */\nconst DATE_COLUMNS = new Set([\"created_at\", \"updated_at\", \"published_at\", \"scheduled_at\"]);\n\n/**\n * Hidden, symbol-keyed property on each mapped data record carrying the raw\n * DB string for every date column. Lets cursor encoders downstream reproduce\n * the loader's exact `nextCursor` format without round-tripping through\n * `new Date()`, which loses precision for stored values that aren't already\n * ISO-with-milliseconds (e.g. `2026-01-01T00:00:00Z` becomes\n * `2026-01-01T00:00:00.000Z`).\n */\nexport const CURSOR_RAW_VALUES: unique symbol = Symbol(\"emdash:cursorRawValues\");\n\nconst LOCAL_MEDIA_FILE_PREFIX = \"/_emdash/api/media/file/\";\nconst URL_SCHEME_PATTERN = /^[a-zA-Z][a-zA-Z\\d+\\-.]*:/;\n\n/** Safely extract a string value from a record, returning fallback if not a string */\nfunction rowStr(row: Record<string, unknown>, key: string, fallback = \"\"): string {\n\tconst val = row[key];\n\treturn typeof val === \"string\" ? val : fallback;\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n\treturn typeof value === \"object\" && value !== null && !Array.isArray(value);\n}\n\nfunction isBareMediaKey(src: string): boolean {\n\treturn !src.startsWith(\"/\") && !URL_SCHEME_PATTERN.test(src);\n}\n\nfunction normalizeLocalMediaValue(value: unknown): unknown {\n\tif (Array.isArray(value)) {\n\t\treturn value.map(normalizeLocalMediaValue);\n\t}\n\n\tif (!isRecord(value)) {\n\t\treturn value;\n\t}\n\n\tconst normalized: Record<string, unknown> = {};\n\tfor (const [key, child] of Object.entries(value)) {\n\t\tnormalized[key] = normalizeLocalMediaValue(child);\n\t}\n\n\tif (\n\t\tnormalized.provider === \"local\" &&\n\t\ttypeof normalized.src === \"string\" &&\n\t\tnormalized.src.length > 0\n\t) {\n\t\tconst src = normalized.src;\n\t\tif (src.startsWith(LOCAL_MEDIA_FILE_PREFIX)) {\n\t\t\tconst id = src.slice(LOCAL_MEDIA_FILE_PREFIX.length);\n\t\t\tif (!normalized.id && id) {\n\t\t\t\tnormalized.id = id;\n\t\t\t}\n\t\t} else if (isBareMediaKey(src)) {\n\t\t\tif (!normalized.id) {\n\t\t\t\tnormalized.id = src;\n\t\t\t}\n\t\t\tnormalized.src = `${LOCAL_MEDIA_FILE_PREFIX}${src}`;\n\t\t}\n\t}\n\n\treturn normalized;\n}\n\n/**\n * Map a database row to entry data\n * Extracts content fields (non-system columns) and parses JSON where needed.\n * System columns needed for templates (id, status, dates) are included with camelCase names.\n */\nfunction mapRowToData(row: Record<string, unknown>): Record<string, unknown> {\n\tconst data: Record<string, unknown> = {};\n\tconst rawDateValues: Record<string, string> = {};\n\n\tfor (const [key, value] of Object.entries(row)) {\n\t\t// Include certain system columns (mapped to camelCase where needed)\n\t\tif (key in INCLUDE_IN_DATA) {\n\t\t\t// Convert date columns from ISO strings to Date objects\n\t\t\tif (DATE_COLUMNS.has(key)) {\n\t\t\t\tif (typeof value === \"string\") {\n\t\t\t\t\trawDateValues[key] = value;\n\t\t\t\t\tdata[INCLUDE_IN_DATA[key]] = new Date(value);\n\t\t\t\t} else {\n\t\t\t\t\tdata[INCLUDE_IN_DATA[key]] = null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata[INCLUDE_IN_DATA[key]] = value;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (SYSTEM_COLUMNS.has(key)) continue;\n\n\t\t// Try to parse JSON strings (for portableText, json fields, etc.)\n\t\tif (typeof value === \"string\") {\n\t\t\ttry {\n\t\t\t\t// Only parse if it looks like JSON (starts with { or [)\n\t\t\t\tif (value.startsWith(\"{\") || value.startsWith(\"[\")) {\n\t\t\t\t\tdata[key] = normalizeLocalMediaValue(JSON.parse(value));\n\t\t\t\t} else {\n\t\t\t\t\tdata[key] = value;\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\tdata[key] = value;\n\t\t\t}\n\t\t} else {\n\t\t\tdata[key] = value;\n\t\t}\n\t}\n\n\tObject.defineProperty(data, CURSOR_RAW_VALUES, {\n\t\tvalue: rawDateValues,\n\t\tenumerable: false,\n\t\tconfigurable: false,\n\t\twritable: false,\n\t});\n\n\treturn data;\n}\n\n/**\n * Map revision data (already-parsed JSON object) to entry data.\n * Strips _-prefixed metadata keys (e.g. _slug) used internally by revisions.\n */\nfunction mapRevisionData(data: Record<string, unknown>): Record<string, unknown> {\n\tconst result: Record<string, unknown> = {};\n\tfor (const [key, value] of Object.entries(data)) {\n\t\tif (key.startsWith(\"_\")) continue; // revision metadata\n\t\tresult[key] = normalizeLocalMediaValue(value);\n\t}\n\treturn result;\n}\n\n// Virtual module imports are lazy-loaded to avoid errors when importing\n// emdash outside of Astro/Vite context (e.g., in astro.config.mjs)\nlet virtualConfig:\n\t| {\n\t\t\tdatabase?: { config: unknown };\n\t\t\ti18n?: { defaultLocale: string; locales: string[]; prefixDefaultLocale?: boolean } | null;\n\t }\n\t| undefined;\nlet virtualCreateDialect: ((config: unknown) => Dialect) | undefined;\n\nasync function loadVirtualModules() {\n\tif (virtualConfig === undefined) {\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t// @ts-ignore - virtual module\n\t\tconst configModule = await import(\"virtual:emdash/config\");\n\t\tvirtualConfig = configModule.default;\n\t}\n\tif (virtualCreateDialect === undefined) {\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t// @ts-ignore - virtual module\n\t\tconst dialectModule = await import(\"virtual:emdash/dialect\");\n\t\tvirtualCreateDialect = dialectModule.createDialect;\n\t\t// dialectType is no longer needed here — dialect detection is\n\t\t// done via the db adapter instance in dialect-helpers.ts\n\t}\n}\n\n/**\n * Entry data type - generic object\n */\nexport type EntryData = Record<string, unknown>;\n\n/**\n * Sort direction\n */\nexport type SortDirection = \"asc\" | \"desc\";\n\n/**\n * Order by specification - field name to direction\n * @example { created_at: \"desc\" } - Sort by created_at descending\n * @example { title: \"asc\" } - Sort by title ascending\n */\nexport type OrderBySpec = Record<string, SortDirection>;\n\n/**\n * Build WHERE clause for status filtering.\n * When filtering for 'published' status, also include scheduled content\n * whose scheduled_at time has passed (treating it as effectively published).\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any -- accepts any Kysely instance\nfunction buildStatusCondition(\n\tdb: Kysely<any>,\n\tstatus: string,\n\ttablePrefix?: string,\n): ReturnType<typeof sql> {\n\tconst statusField = tablePrefix ? `${tablePrefix}.status` : \"status\";\n\tconst scheduledAtField = tablePrefix ? `${tablePrefix}.scheduled_at` : \"scheduled_at\";\n\n\tif (status === \"published\") {\n\t\t// Include both published content AND scheduled content past its publish time.\n\t\t// scheduled_at is stored as text (ISO 8601). On Postgres, we must cast it\n\t\t// to timestamptz for the comparison with CURRENT_TIMESTAMP to work.\n\t\tconst scheduledAtExpr = isPostgres(db)\n\t\t\t? sql`${sql.ref(scheduledAtField)}::timestamptz`\n\t\t\t: sql.ref(scheduledAtField);\n\t\tconst nowExpr = isPostgres(db)\n\t\t\t? currentTimestampValue(db)\n\t\t\t: sql`strftime('%Y-%m-%dT%H:%M:%fZ', 'now')`;\n\t\treturn sql`(${sql.ref(statusField)} = 'published' OR (${sql.ref(statusField)} = 'scheduled' AND ${scheduledAtExpr} <= ${nowExpr}))`;\n\t}\n\n\treturn sql`${sql.ref(statusField)} = ${status}`;\n}\n\n/**\n * Resolved primary sort field and direction (used for cursor pagination).\n */\ninterface PrimarySort {\n\tfield: string;\n\tdirection: SortDirection;\n}\n\n/**\n * Get the primary sort field from an orderBy spec (first valid field, or default).\n */\nfunction getPrimarySort(orderBy: OrderBySpec | undefined, tablePrefix?: string): PrimarySort {\n\tif (orderBy) {\n\t\tfor (const [field, direction] of Object.entries(orderBy)) {\n\t\t\tif (FIELD_NAME_PATTERN.test(field)) {\n\t\t\t\tconst fullField = tablePrefix ? `${tablePrefix}.${field}` : field;\n\t\t\t\treturn { field: fullField, direction };\n\t\t\t}\n\t\t}\n\t}\n\tconst defaultField = tablePrefix ? `${tablePrefix}.created_at` : \"created_at\";\n\treturn { field: defaultField, direction: \"desc\" };\n}\n\n/**\n * Build ORDER BY clause from orderBy spec\n * Validates field names to prevent SQL injection (alphanumeric + underscore only)\n * Supports multiple sort fields in object key order\n */\nfunction buildOrderByClause(\n\torderBy: OrderBySpec | undefined,\n\ttablePrefix?: string,\n): ReturnType<typeof sql> {\n\t// Default to created_at DESC\n\tif (!orderBy || Object.keys(orderBy).length === 0) {\n\t\tconst field = tablePrefix ? `${tablePrefix}.created_at` : \"created_at\";\n\t\treturn sql`ORDER BY ${sql.ref(field)} DESC, ${sql.ref(tablePrefix ? `${tablePrefix}.id` : \"id\")} DESC`;\n\t}\n\n\tconst sortParts: ReturnType<typeof sql>[] = [];\n\n\tfor (const [field, direction] of Object.entries(orderBy)) {\n\t\t// Validate field name (alphanumeric + underscore only)\n\t\tif (!FIELD_NAME_PATTERN.test(field)) {\n\t\t\tcontinue; // Skip invalid field names\n\t\t}\n\n\t\tconst fullField = tablePrefix ? `${tablePrefix}.${field}` : field;\n\t\tconst dir = direction === \"asc\" ? sql`ASC` : sql`DESC`;\n\t\tsortParts.push(sql`${sql.ref(fullField)} ${dir}`);\n\t}\n\n\t// If no valid sort fields, fall back to default\n\tif (sortParts.length === 0) {\n\t\tconst defaultField = tablePrefix ? `${tablePrefix}.created_at` : \"created_at\";\n\t\treturn sql`ORDER BY ${sql.ref(defaultField)} DESC, ${sql.ref(tablePrefix ? `${tablePrefix}.id` : \"id\")} DESC`;\n\t}\n\n\t// Add id as tiebreaker to ensure stable cursor ordering\n\tconst primary = getPrimarySort(orderBy, tablePrefix);\n\tconst idField = tablePrefix ? `${tablePrefix}.id` : \"id\";\n\tconst idDir = primary.direction === \"asc\" ? sql`ASC` : sql`DESC`;\n\tsortParts.push(sql`${sql.ref(idField)} ${idDir}`);\n\n\treturn sql`ORDER BY ${sql.join(sortParts, sql`, `)}`;\n}\n\n/**\n * Build a cursor WHERE condition for keyset pagination.\n * Uses the primary sort field + id as tiebreaker for stable ordering.\n *\n * Throws `InvalidCursorError` if the cursor is malformed; callers should\n * let this propagate so users see a real error rather than silently\n * falling back to the first page.\n */\nfunction buildCursorCondition(\n\tcursor: string,\n\torderBy: OrderBySpec | undefined,\n\ttablePrefix?: string,\n): ReturnType<typeof sql> {\n\tconst { orderValue, id: cursorId } = decodeCursor(cursor);\n\tconst primary = getPrimarySort(orderBy, tablePrefix);\n\tconst idField = tablePrefix ? `${tablePrefix}.id` : \"id\";\n\n\tif (primary.direction === \"desc\") {\n\t\treturn sql`(${sql.ref(primary.field)} < ${orderValue} OR (${sql.ref(primary.field)} = ${orderValue} AND ${sql.ref(idField)} < ${cursorId}))`;\n\t}\n\treturn sql`(${sql.ref(primary.field)} > ${orderValue} OR (${sql.ref(primary.field)} = ${orderValue} AND ${sql.ref(idField)} > ${cursorId}))`;\n}\n\n/** Type guard: is the where value a range object (not a string or array)? */\nfunction isWhereRange(value: WhereValue): value is WhereRange {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\n/**\n * Build AND conditions for non-taxonomy field filters.\n * Returns an array of sql fragments; empty if no field filters apply.\n * Field names are validated against FIELD_NAME_PATTERN to prevent injection.\n */\nfunction buildFieldConditions(\n\tfields: Record<string, WhereValue>,\n\ttablePrefix?: string,\n): ReturnType<typeof sql>[] {\n\tconst conditions: ReturnType<typeof sql>[] = [];\n\n\tfor (const [key, value] of Object.entries(fields)) {\n\t\tif (!FIELD_NAME_PATTERN.test(key)) {\n\t\t\tconsole.warn(`[emdash] where filter: invalid field name \"${key}\" ignored`);\n\t\t\tcontinue;\n\t\t}\n\t\tif (value == null) continue;\n\t\tconst ref = tablePrefix ? sql.ref(`${tablePrefix}.${key}`) : sql.ref(key);\n\n\t\tif (isWhereRange(value)) {\n\t\t\tif (value.gt !== undefined) conditions.push(sql`${ref} > ${value.gt}`);\n\t\t\tif (value.gte !== undefined) conditions.push(sql`${ref} >= ${value.gte}`);\n\t\t\tif (value.lt !== undefined) conditions.push(sql`${ref} < ${value.lt}`);\n\t\t\tif (value.lte !== undefined) conditions.push(sql`${ref} <= ${value.lte}`);\n\t\t} else if (Array.isArray(value)) {\n\t\t\tif (value.length > 0) {\n\t\t\t\tconditions.push(sql`${ref} IN (${sql.join(value.map((v) => sql`${v}`))})`);\n\t\t\t}\n\t\t} else {\n\t\t\tconditions.push(sql`${ref} = ${value}`);\n\t\t}\n\t}\n\n\treturn conditions;\n}\n\n/**\n * Range filter for comparison operators on field values.\n * Values are compared as strings in the database. This works correctly for\n * ISO 8601 dates (e.g. \"2024-01-01T00:00:00Z\") because lexicographic ordering\n * matches chronological ordering. Ensure date values use a consistent format.\n */\nexport interface WhereRange {\n\tgt?: string;\n\tgte?: string;\n\tlt?: string;\n\tlte?: string;\n}\n\n/**\n * A where clause value: exact match, multi-value match, or range comparison.\n */\nexport type WhereValue = string | string[] | WhereRange;\n\n/**\n * Filter for loadCollection - type is required\n */\nexport interface CollectionFilter {\n\ttype: string;\n\tstatus?: \"draft\" | \"published\" | \"archived\";\n\tlimit?: number;\n\t/**\n\t * Opaque cursor for keyset pagination.\n\t * Pass the `nextCursor` value from a previous result to fetch the next page.\n\t */\n\tcursor?: string;\n\t/**\n\t * Filter by field values, taxonomy terms, byline credits, or ranges.\n\t *\n\t * Taxonomy names are detected automatically and filtered via JOIN.\n\t * The reserved `byline` key filters by byline credit (any credit, not\n\t * just the primary one) via the `_emdash_content_bylines` junction\n\t * table; its value is one or more byline translation groups.\n\t * Other keys are treated as column filters on the content table.\n\t *\n\t * @example { category: 'news' } - taxonomy term\n\t * @example { byline: '01HXYZ...' } - entries credited to a byline (any position)\n\t * @example { series: 'main' } - exact match on a content field\n\t * @example { published_at: { gte: '2024-01-01', lt: '2025-01-01' } } - date range\n\t */\n\twhere?: Record<string, WhereValue>;\n\t/**\n\t * Order results by field(s)\n\t * @default { created_at: \"desc\" }\n\t */\n\torderBy?: OrderBySpec;\n\t/**\n\t * Filter by locale (e.g. 'en', 'fr').\n\t * When set, only returns content in this locale.\n\t */\n\tlocale?: string;\n}\n\n/**\n * Filter for loadEntry - type and id are required\n */\nexport interface EntryFilter {\n\ttype: string;\n\tid: string;\n\t/**\n\t * When set, fetch content data from this revision instead of the content table.\n\t * Used by preview mode to serve draft revision data.\n\t */\n\trevisionId?: string;\n\t/**\n\t * Locale to scope slug lookup. Only affects slug resolution;\n\t * IDs are globally unique and always resolve regardless of locale.\n\t */\n\tlocale?: string;\n}\n\n// Cached database instance (shared across calls)\nlet dbInstance: Kysely<Database> | null = null;\n\n/**\n * Get the database instance. Used by query wrapper functions and middleware.\n *\n * Checks the ALS request context first — if a per-request DB override is set\n * (e.g. by DO preview middleware), it takes precedence over the module-level\n * cached instance. This allows preview mode to route queries to an isolated\n * Durable Object database without modifying any calling code.\n *\n * Initializes the default database on first call using config from virtual module.\n */\nexport async function getDb(): Promise<Kysely<Database>> {\n\t// Per-request DB override via ALS (normal mode)\n\tconst ctx = getRequestContext();\n\tif (ctx?.db) {\n\t\treturn ctx.db as Kysely<Database>; // eslint-disable-line typescript/no-unsafe-type-assertion -- db is typed as unknown in RequestContext to avoid circular deps\n\t}\n\n\tif (!dbInstance) {\n\t\tawait loadVirtualModules();\n\t\tif (!virtualConfig?.database || typeof virtualCreateDialect !== \"function\") {\n\t\t\tthrow new Error(\n\t\t\t\t\"EmDash database not configured. Add database config to emdash() in astro.config.mjs\",\n\t\t\t);\n\t\t}\n\t\tconst dialect = virtualCreateDialect(virtualConfig.database.config);\n\t\tdbInstance = new Kysely<Database>({ dialect, log: kyselyLogOption() });\n\t}\n\treturn dbInstance;\n}\n\n/**\n * Create an EmDash Live Collections loader\n *\n * This loader handles ALL content types in a single Astro collection.\n * Use `getEmDashCollection()` and `getEmDashEntry()` to query\n * specific content types.\n *\n * Database is configured in astro.config.mjs via the emdash() integration.\n *\n * @example\n * ```ts\n * // src/live.config.ts\n * import { defineLiveCollection } from \"astro:content\";\n * import { emdashLoader } from \"emdash\";\n *\n * export const collections = {\n * emdash: defineLiveCollection({\n * loader: emdashLoader(),\n * }),\n * };\n * ```\n */\nexport function emdashLoader(): LiveLoader<EntryData, EntryFilter, CollectionFilter> {\n\treturn {\n\t\tname: \"emdash\",\n\n\t\t/**\n\t\t * Load all entries for a content type\n\t\t */\n\t\tasync loadCollection({ filter }) {\n\t\t\ttry {\n\t\t\t\t// Get DB instance (initializes on first use)\n\t\t\t\tconst db = await getDb();\n\n\t\t\t\t// Type filter is required\n\t\t\t\tconst type = filter?.type;\n\t\t\t\tif (!type) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: new Error(\n\t\t\t\t\t\t\t\"type filter is required. Use getEmDashCollection() instead of getLiveCollection() directly.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Query the per-collection table (ec_posts, ec_products, etc.)\n\t\t\t\tconst tableName = getTableName(type);\n\n\t\t\t\t// Build query with dynamic table name\n\t\t\t\tconst status = filter?.status || \"published\";\n\t\t\t\tconst limit = filter?.limit;\n\t\t\t\tconst cursor = filter?.cursor;\n\t\t\t\tconst where = filter?.where;\n\t\t\t\tconst orderBy = filter?.orderBy;\n\t\t\t\tconst locale = filter?.locale;\n\n\t\t\t\t// Cursor pagination: over-fetch by 1 to detect next page\n\t\t\t\tconst fetchLimit = limit ? limit + 1 : undefined;\n\n\t\t\t\t// Build cursor condition if cursor is provided\n\t\t\t\tconst cursorCondition = cursor ? buildCursorCondition(cursor, orderBy) : null;\n\n\t\t\t\t// Separate taxonomy / byline filters from field filters\n\t\t\t\tlet result: { rows: Record<string, unknown>[] };\n\t\t\t\t// Taxonomy filters AND together: each entry constrains the base\n\t\t\t\t// row to match at least one of its slugs *within that taxonomy*.\n\t\t\t\t// Term slugs are unique only within a taxonomy, so every filter\n\t\t\t\t// keeps its own `name` and emits its own `EXISTS` clause rather\n\t\t\t\t// than pooling slugs into one `IN`.\n\t\t\t\tconst taxonomyFilters: { name: string; slugs: string[] }[] = [];\n\t\t\t\t// A byline filter matches entries credited to any of the given\n\t\t\t\t// byline translation groups via the `_emdash_content_bylines`\n\t\t\t\t// junction table. `null` means no byline filter; an empty\n\t\t\t\t// `groups` array means the filter was requested but matches\n\t\t\t\t// nothing (short-circuited to an empty result below).\n\t\t\t\tlet bylineFilter: { groups: string[] } | null = null;\n\t\t\t\tconst fieldFilters: Record<string, WhereValue> = {};\n\n\t\t\t\tif (where && Object.keys(where).length > 0) {\n\t\t\t\t\tconst taxNames = await getTaxonomyNames(db);\n\n\t\t\t\t\tfor (const [key, value] of Object.entries(where)) {\n\t\t\t\t\t\tif (value == null) continue;\n\t\t\t\t\t\tif (key === \"byline\") {\n\t\t\t\t\t\t\tif (isWhereRange(value)) {\n\t\t\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\t\t`[emdash] where filter: range operators are not supported on \"byline\", ignored`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst groups = Array.isArray(value) ? value : [value];\n\t\t\t\t\t\t\tbylineFilter = { groups };\n\t\t\t\t\t\t} else if (taxNames.has(key)) {\n\t\t\t\t\t\t\tif (isWhereRange(value)) {\n\t\t\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\t\t`[emdash] where filter: range operators are not supported on taxonomy \"${key}\", ignored`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst slugs = Array.isArray(value) ? value : [value];\n\t\t\t\t\t\t\ttaxonomyFilters.push({ name: key, slugs });\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfieldFilters[key] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// A byline or taxonomy filter with no values matches nothing —\n\t\t\t\t// short-circuit before building SQL (an empty `IN ()` is invalid\n\t\t\t\t// SQL on both dialects).\n\t\t\t\tif (\n\t\t\t\t\t(bylineFilter && bylineFilter.groups.length === 0) ||\n\t\t\t\t\ttaxonomyFilters.some((f) => f.slugs.length === 0)\n\t\t\t\t) {\n\t\t\t\t\treturn { entries: [], cacheHint: { tags: [type] } };\n\t\t\t\t}\n\n\t\t\t\t{\n\t\t\t\t\t// Taxonomy and byline filters are applied as correlated\n\t\t\t\t\t// `EXISTS` semi-joins rather than `INNER JOIN ... DISTINCT`.\n\t\t\t\t\t// A join fan-out would force `SELECT DISTINCT table.*`, and\n\t\t\t\t\t// Postgres cannot apply DISTINCT to a row containing a `json`\n\t\t\t\t\t// column (no equality operator), so the join approach throws\n\t\t\t\t\t// there. EXISTS matches \"credited/tagged at least once\"\n\t\t\t\t\t// without duplicating rows, needs no DISTINCT, and works on\n\t\t\t\t\t// both SQLite and Postgres. The base query stays a single-\n\t\t\t\t\t// table `SELECT *`, so all field/status/locale/cursor/order\n\t\t\t\t\t// conditions reference unprefixed columns as before.\n\t\t\t\t\tconst orderByClause = buildOrderByClause(orderBy);\n\t\t\t\t\tconst statusCondition = buildStatusCondition(db, status);\n\t\t\t\t\tconst localeFilter = locale ? sql`AND locale = ${locale}` : sql``;\n\t\t\t\t\tconst cursorCond = cursorCondition ? sql`AND ${cursorCondition}` : sql``;\n\t\t\t\t\tconst fieldConds = buildFieldConditions(fieldFilters);\n\t\t\t\t\tconst fieldCondsSQL =\n\t\t\t\t\t\tfieldConds.length > 0 ? sql`${sql.join(fieldConds, sql` AND `)}` : null;\n\n\t\t\t\t\t// One `EXISTS` per taxonomy, AND'd together: an entry must be\n\t\t\t\t\t// tagged with a matching term in *every* requested taxonomy.\n\t\t\t\t\t// Each clause pins its own `t.name`, so slugs never pool\n\t\t\t\t\t// across taxonomies (they're only unique within one).\n\t\t\t\t\tconst taxonomyCond =\n\t\t\t\t\t\ttaxonomyFilters.length > 0\n\t\t\t\t\t\t\t? sql`${sql.join(\n\t\t\t\t\t\t\t\t\ttaxonomyFilters.map(\n\t\t\t\t\t\t\t\t\t\t(f) => sql`AND EXISTS (\n\t\t\t\t\t\t\tSELECT 1 FROM content_taxonomies ct\n\t\t\t\t\t\t\tINNER JOIN taxonomies t ON t.id = ct.taxonomy_id\n\t\t\t\t\t\t\tWHERE ct.collection = ${type}\n\t\t\t\t\t\t\t\tAND ct.entry_id = ${sql.ref(tableName)}.id\n\t\t\t\t\t\t\t\tAND t.name = ${f.name}\n\t\t\t\t\t\t\t\tAND t.slug IN (${sql.join(f.slugs.map((s) => sql`${s}`))})\n\t\t\t\t\t\t)`,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tsql` `,\n\t\t\t\t\t\t\t\t)}`\n\t\t\t\t\t\t\t: sql``;\n\n\t\t\t\t\t// `_emdash_content_bylines.byline_id` stores the byline's\n\t\t\t\t\t// translation_group (migration 040), so a credit spans every\n\t\t\t\t\t// locale variant of the byline and we match the group directly.\n\t\t\t\t\tconst bylineCond = bylineFilter\n\t\t\t\t\t\t? sql`AND EXISTS (\n\t\t\t\t\t\t\tSELECT 1 FROM _emdash_content_bylines cb\n\t\t\t\t\t\t\tWHERE cb.collection_slug = ${type}\n\t\t\t\t\t\t\t\tAND cb.content_id = ${sql.ref(tableName)}.id\n\t\t\t\t\t\t\t\tAND cb.byline_id IN (${sql.join(bylineFilter.groups.map((g) => sql`${g}`))})\n\t\t\t\t\t\t)`\n\t\t\t\t\t\t: sql``;\n\n\t\t\t\t\tresult = await sql<Record<string, unknown>>`\n\t\t\t\t\t\tSELECT * FROM ${sql.ref(tableName)}\n\t\t\t\t\t\tWHERE deleted_at IS NULL\n\t\t\t\t\t\tAND ${statusCondition}\n\t\t\t\t\t\t${localeFilter}\n\t\t\t\t\t\t${cursorCond}\n\t\t\t\t\t\t${taxonomyCond}\n\t\t\t\t\t\t${bylineCond}\n\t\t\t\t\t\t${fieldCondsSQL ? sql`AND ${fieldCondsSQL}` : sql``}\n\t\t\t\t\t\t${orderByClause}\n\t\t\t\t\t\t${fetchLimit ? sql`LIMIT ${fetchLimit}` : sql``}\n\t\t\t\t\t`.execute(db);\n\t\t\t\t}\n\n\t\t\t\t// Detect whether there are more results (over-fetched by 1)\n\t\t\t\tconst hasMore = limit ? result.rows.length > limit : false;\n\t\t\t\tconst rows = hasMore ? result.rows.slice(0, limit) : result.rows;\n\n\t\t\t\t// Map rows to entries\n\t\t\t\tconst i18nConfig = virtualConfig?.i18n;\n\t\t\t\tconst i18nEnabled = i18nConfig && i18nConfig.locales.length > 1;\n\t\t\t\tconst entries = rows.map((row) => {\n\t\t\t\t\tconst slug = rowStr(row, \"slug\") || rowStr(row, \"id\");\n\t\t\t\t\tconst rowLocale = rowStr(row, \"locale\");\n\t\t\t\t\tconst shouldPrefix =\n\t\t\t\t\t\ti18nEnabled &&\n\t\t\t\t\t\trowLocale !== \"\" &&\n\t\t\t\t\t\t(rowLocale !== i18nConfig.defaultLocale || i18nConfig.prefixDefaultLocale);\n\t\t\t\t\tconst id = shouldPrefix ? `${rowLocale}/${slug}` : slug;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tslug: rowStr(row, \"slug\"),\n\t\t\t\t\t\tstatus: rowStr(row, \"status\", \"draft\"),\n\t\t\t\t\t\tdata: mapRowToData(row),\n\t\t\t\t\t\tcacheHint: {\n\t\t\t\t\t\t\ttags: [rowStr(row, \"id\")],\n\t\t\t\t\t\t\tlastModified: row.updated_at ? new Date(rowStr(row, \"updated_at\")) : undefined,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\t// Encode nextCursor from the last row if there are more results\n\t\t\t\tlet nextCursor: string | undefined;\n\t\t\t\tif (hasMore && rows.length > 0) {\n\t\t\t\t\tconst lastRow = rows.at(-1)!;\n\t\t\t\t\tconst primary = getPrimarySort(orderBy);\n\t\t\t\t\t// Strip table prefix from field name for row lookup\n\t\t\t\t\tconst fieldName = primary.field.includes(\".\")\n\t\t\t\t\t\t? primary.field.split(\".\").pop()!\n\t\t\t\t\t\t: primary.field;\n\t\t\t\t\tconst lastOrderValue = lastRow[fieldName];\n\t\t\t\t\tconst orderStr =\n\t\t\t\t\t\ttypeof lastOrderValue === \"string\" || typeof lastOrderValue === \"number\"\n\t\t\t\t\t\t\t? String(lastOrderValue)\n\t\t\t\t\t\t\t: \"\";\n\t\t\t\t\tnextCursor = encodeCursor(orderStr, String(lastRow.id));\n\t\t\t\t}\n\n\t\t\t\t// Collection-level cache hint uses the most recent updated_at\n\t\t\t\tlet collectionLastModified: Date | undefined;\n\t\t\t\tfor (const row of rows) {\n\t\t\t\t\tif (row.updated_at) {\n\t\t\t\t\t\tconst d = new Date(rowStr(row, \"updated_at\"));\n\t\t\t\t\t\tif (!collectionLastModified || d > collectionLastModified) {\n\t\t\t\t\t\t\tcollectionLastModified = d;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tentries,\n\t\t\t\t\tnextCursor,\n\t\t\t\t\tcacheHint: {\n\t\t\t\t\t\ttags: [type],\n\t\t\t\t\t\tlastModified: collectionLastModified,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\t// Handle missing table/column gracefully - return empty collection.\n\t\t\t\t// Missing table happens before migrations have run.\n\t\t\t\t// Missing column happens when a where filter references a non-existent field.\n\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\tif (isMissingTableError(error) || isMissingColumnError(error)) {\n\t\t\t\t\tif (isMissingColumnError(error)) {\n\t\t\t\t\t\tconsole.warn(`[emdash] where filter: ${message}`);\n\t\t\t\t\t}\n\t\t\t\t\treturn { entries: [] };\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\terror: new Error(`Failed to load collection: ${message}`),\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Load a single entry by type and ID/slug\n\t\t *\n\t\t * When filter.revisionId is set (preview mode), the entry's data\n\t\t * comes from the revisions table instead of the content table columns.\n\t\t */\n\t\tasync loadEntry({ filter }) {\n\t\t\ttry {\n\t\t\t\t// Get DB instance\n\t\t\t\tconst db = await getDb();\n\n\t\t\t\t// Both type and id are required\n\t\t\t\tconst type = filter?.type;\n\t\t\t\tconst id = filter?.id;\n\n\t\t\t\tif (!type || !id) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\terror: new Error(\n\t\t\t\t\t\t\t\"type and id filters are required. Use getEmDashEntry() instead of getLiveEntry() directly.\",\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// Query the per-collection table\n\t\t\t\tconst tableName = getTableName(type);\n\t\t\t\tconst locale = filter?.locale;\n\n\t\t\t\t// Use raw SQL for dynamic table name, match by slug or id\n\t\t\t\t// When locale is specified, prefer locale-scoped slug match,\n\t\t\t\t// but IDs are globally unique so always check id without locale scope.\n\t\t\t\t//\n\t\t\t\t// LEFT JOIN _emdash_seo folds per-entry SEO (canonical, noindex,\n\t\t\t\t// etc.) into this single query at zero extra round-trip cost. The\n\t\t\t\t// joined columns are surfaced as a nested data.seo object via\n\t\t\t\t// extractSeo() and excluded from the generic field mapping. SEO is\n\t\t\t\t// 1:1 with content (PK on collection+content_id), so the join never\n\t\t\t\t// multiplies rows.\n\t\t\t\tconst seoSelect = sql.join(\n\t\t\t\t\tObject.entries(SEO_COLUMN_ALIASES).map(\n\t\t\t\t\t\t([col, alias]) => sql`${sql.ref(`s.${col}`)} AS ${sql.ref(alias)}`,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tconst result = locale\n\t\t\t\t\t? await sql<Record<string, unknown>>`\n\t\t\t\t\t\t\tSELECT c.*, ${seoSelect}\n\t\t\t\t\t\t\tFROM ${sql.ref(tableName)} AS c\n\t\t\t\t\t\t\tLEFT JOIN ${sql.ref(\"_emdash_seo\")} AS s\n\t\t\t\t\t\t\t\tON s.collection = ${type} AND s.content_id = c.id\n\t\t\t\t\t\t\tWHERE c.deleted_at IS NULL\n\t\t\t\t\t\t\tAND ((c.slug = ${id} AND c.locale = ${locale}) OR c.id = ${id})\n\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t`.execute(db)\n\t\t\t\t\t: await sql<Record<string, unknown>>`\n\t\t\t\t\t\t\tSELECT c.*, ${seoSelect}\n\t\t\t\t\t\t\tFROM ${sql.ref(tableName)} AS c\n\t\t\t\t\t\t\tLEFT JOIN ${sql.ref(\"_emdash_seo\")} AS s\n\t\t\t\t\t\t\t\tON s.collection = ${type} AND s.content_id = c.id\n\t\t\t\t\t\t\tWHERE c.deleted_at IS NULL\n\t\t\t\t\t\t\tAND (c.slug = ${id} OR c.id = ${id})\n\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t`.execute(db);\n\n\t\t\t\tconst row = result.rows[0];\n\t\t\t\tif (!row) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst i18nConfig = virtualConfig?.i18n;\n\t\t\t\tconst i18nEnabled = i18nConfig && i18nConfig.locales.length > 1;\n\t\t\t\tconst entrySlug = rowStr(row, \"slug\") || rowStr(row, \"id\");\n\t\t\t\tconst entryLocale = rowStr(row, \"locale\");\n\t\t\t\tconst shouldPrefixEntry =\n\t\t\t\t\ti18nEnabled &&\n\t\t\t\t\tentryLocale !== \"\" &&\n\t\t\t\t\t(entryLocale !== i18nConfig.defaultLocale || i18nConfig.prefixDefaultLocale);\n\t\t\t\tconst entryId = shouldPrefixEntry ? `${entryLocale}/${entrySlug}` : entrySlug;\n\n\t\t\t\t// Preview mode: override content fields with revision data,\n\t\t\t\t// keeping system metadata from the content table row.\n\t\t\t\tconst revisionId = filter?.revisionId;\n\t\t\t\tif (revisionId) {\n\t\t\t\t\tconst revRow = await sql<{ data: string }>`\n\t\t\t\t\t\tSELECT data FROM revisions\n\t\t\t\t\t\tWHERE id = ${revisionId}\n\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t`.execute(db);\n\n\t\t\t\t\tconst revData = revRow.rows[0];\n\t\t\t\t\tif (revData) {\n\t\t\t\t\t\tconst parsed: Record<string, unknown> = JSON.parse(revData.data);\n\t\t\t\t\t\t// System metadata from content table + content fields from revision\n\t\t\t\t\t\tconst systemData: Record<string, unknown> = {};\n\t\t\t\t\t\tfor (const [key, mappedKey] of Object.entries(INCLUDE_IN_DATA)) {\n\t\t\t\t\t\t\tif (key in row) {\n\t\t\t\t\t\t\t\tif (DATE_COLUMNS.has(key)) {\n\t\t\t\t\t\t\t\t\tsystemData[mappedKey] = typeof row[key] === \"string\" ? new Date(row[key]) : null;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tsystemData[mappedKey] = row[key];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Use slug from revision metadata if present, else from content table\n\t\t\t\t\t\tconst slug = typeof parsed._slug === \"string\" ? parsed._slug : rowStr(row, \"slug\");\n\t\t\t\t\t\tconst revSlug = slug || rowStr(row, \"id\");\n\t\t\t\t\t\tconst revLocale = rowStr(row, \"locale\");\n\t\t\t\t\t\tconst shouldPrefixRev =\n\t\t\t\t\t\t\ti18nEnabled &&\n\t\t\t\t\t\t\trevLocale !== \"\" &&\n\t\t\t\t\t\t\t(revLocale !== i18nConfig.defaultLocale || i18nConfig.prefixDefaultLocale);\n\t\t\t\t\t\tconst revId = shouldPrefixRev ? `${revLocale}/${revSlug}` : revSlug;\n\t\t\t\t\t\t// SEO is not revisioned — it comes from the content row's\n\t\t\t\t\t\t// joined _emdash_seo columns, not the revision snapshot.\n\t\t\t\t\t\tconst revEntryData: Record<string, unknown> = {\n\t\t\t\t\t\t\t...systemData,\n\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\t...mapRevisionData(parsed),\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst revSeo = extractSeo(row);\n\t\t\t\t\t\tif (revSeo) revEntryData.seo = revSeo;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tid: revId,\n\t\t\t\t\t\t\tslug,\n\t\t\t\t\t\t\tstatus: rowStr(row, \"status\", \"draft\"),\n\t\t\t\t\t\t\tdata: revEntryData,\n\t\t\t\t\t\t\tcacheHint: {\n\t\t\t\t\t\t\t\ttags: [rowStr(row, \"id\")],\n\t\t\t\t\t\t\t\tlastModified: row.updated_at ? new Date(rowStr(row, \"updated_at\")) : undefined,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst entryData = mapRowToData(row);\n\t\t\t\tconst entrySeo = extractSeo(row);\n\t\t\t\tif (entrySeo) entryData.seo = entrySeo;\n\t\t\t\treturn {\n\t\t\t\t\tid: entryId,\n\t\t\t\t\tslug: rowStr(row, \"slug\"),\n\t\t\t\t\tstatus: rowStr(row, \"status\", \"draft\"),\n\t\t\t\t\tdata: entryData,\n\t\t\t\t\tcacheHint: {\n\t\t\t\t\t\ttags: [rowStr(row, \"id\")],\n\t\t\t\t\t\tlastModified: row.updated_at ? new Date(rowStr(row, \"updated_at\")) : undefined,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t} catch (error) {\n\t\t\t\t// Handle missing table gracefully - return undefined (not found).\n\t\t\t\t// This happens before migrations have run.\n\t\t\t\tif (isMissingTableError(error)) {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\treturn {\n\t\t\t\t\terror: new Error(`Failed to load entry: ${message}`),\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;AAwBA,MAAM,qBAAqB;;;;;;;;;;;;;AAc3B,MAAM,qBAA6C;CAClD,WAAW;CACX,iBAAiB;CACjB,WAAW;CACX,eAAe;CACf,cAAc;CACd;;AAGD,MAAM,oBAAoB,OAAO,OAAO,mBAAmB;;;;;AAM3D,MAAM,iBAAiB,IAAI,IAAI;CAC9B;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CAKA,GAAG;CACH,CAAC;;;;;;;;;AAmBF,SAAS,WAAW,KAA+C;CAClE,MAAM,UAAU,IAAI,mBAAmB;AACvC,KAAI,YAAY,QAAQ,YAAY,OAAW,QAAO;CACtD,MAAM,QAAQ,IAAI,mBAAmB;CACrC,MAAM,cAAc,IAAI,mBAAm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