emdash 0.18.0 → 0.19.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/api/route-utils.d.mts +2 -2
- package/dist/api/route-utils.mjs +14 -14
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-Cs7DAACP.mjs → api-BZ6bhjYs.mjs} +88 -16
- package/dist/api-BZ6bhjYs.mjs.map +1 -0
- package/dist/{apply-BWMV4Zmw.mjs → apply-hQkKKBCf.mjs} +23 -23
- package/dist/apply-hQkKKBCf.mjs.map +1 -0
- package/dist/astro/index.d.mts +8 -8
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +113 -23
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +7 -7
- package/dist/astro/middleware/auth.mjs +2 -2
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware.d.mts +26 -4
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +205 -173
- 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 +2 -2
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +3 -3
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +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 +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +31 -31
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +31 -31
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +31 -31
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +30 -30
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +31 -31
- package/dist/astro/routes/api/admin/plugins/updates.mjs +30 -30
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +30 -30
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +3 -3
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +30 -30
- 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 +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/complete.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs +6 -6
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +6 -6
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.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 +7 -7
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/verify.mjs +6 -6
- package/dist/astro/routes/api/auth/signup/complete.mjs +6 -6
- package/dist/astro/routes/api/auth/signup/request.mjs +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 +2 -2
- 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 +7 -7
- 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.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +9 -9
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/mcp.mjs +28 -28
- 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 +6 -6
- package/dist/astro/routes/api/media.mjs +7 -7
- 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 +1 -1
- package/dist/astro/routes/api/oauth/device/authorize.mjs +4 -4
- package/dist/astro/routes/api/oauth/device/code.mjs +5 -5
- package/dist/astro/routes/api/oauth/device/token.mjs +5 -5
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/revoke.mjs +4 -4
- package/dist/astro/routes/api/oauth/token.mjs +4 -4
- 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 +3 -3
- 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 +30 -30
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +30 -30
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +30 -30
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +30 -30
- package/dist/astro/routes/api/schema/collections/index.mjs +30 -30
- package/dist/astro/routes/api/schema/index.mjs +6 -6
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +30 -30
- package/dist/astro/routes/api/schema/orphans/index.mjs +30 -30
- 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 +6 -6
- package/dist/astro/routes/api/setup/admin.mjs +6 -6
- package/dist/astro/routes/api/setup/dev-bypass.mjs +18 -18
- package/dist/astro/routes/api/setup/dev-reset.mjs +3 -3
- package/dist/astro/routes/api/setup/index.mjs +21 -21
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +5 -5
- 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 +5 -5
- package/dist/astro/routes/api/typegen.mjs +5 -5
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +6 -6
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +8 -8
- package/dist/astro/routes/api/widget-areas/_name_.mjs +5 -5
- package/dist/astro/routes/api/widget-areas/index.mjs +8 -8
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +6 -6
- package/dist/astro/routes/sitemap.xml.mjs +6 -6
- package/dist/astro/types.d.mts +15 -8
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/{authorize-CotM4Yiu.mjs → authorize-C_8t2KGa.mjs} +2 -2
- package/dist/{authorize-CotM4Yiu.mjs.map → authorize-C_8t2KGa.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-Dr-xcb6S.mjs → byline-fields-51kg6Vuv.mjs} +3 -3
- package/dist/{byline-fields-Dr-xcb6S.mjs.map → byline-fields-51kg6Vuv.mjs.map} +1 -1
- package/dist/{byline-fields-DC3Wkk-U.mjs → byline-fields-C_OsR-KF.mjs} +2 -2
- package/dist/{byline-fields-DC3Wkk-U.mjs.map → byline-fields-C_OsR-KF.mjs.map} +1 -1
- package/dist/{byline-fields-BNy7Ng1U.d.mts → byline-fields-DYXKDuNX.d.mts} +26 -2
- package/dist/byline-fields-DYXKDuNX.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-Cx5n-WqP.mjs} +3 -3
- package/dist/{bylines-LJMgENMI.mjs.map → bylines-Cx5n-WqP.mjs.map} +1 -1
- package/dist/{bylines-BJSva1Un.mjs → bylines-wurS258E.mjs} +50 -6
- package/dist/{bylines-BJSva1Un.mjs.map → bylines-wurS258E.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/{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 +40 -27
- 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/{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-CJ0RZsYR.mjs} +3 -3
- package/dist/{comments-BTAbC0Ek.mjs.map → comments-CJ0RZsYR.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-GG52SPgh.mjs} +10 -10
- package/dist/{context-DZ7bEh5-.mjs.map → context-GG52SPgh.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/db/index.d.mts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{device-flow-ptLrVINd.mjs → device-flow-s6_q3T7A.mjs} +2 -2
- package/dist/{device-flow-ptLrVINd.mjs.map → device-flow-s6_q3T7A.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/{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-D60_SzHG.d.mts → index-BpYeJO1E.d.mts} +2 -2
- package/dist/{index-D60_SzHG.d.mts.map → index-BpYeJO1E.d.mts.map} +1 -1
- package/dist/{index-CjKdMZ3U.d.mts → index-FfiTQJq2.d.mts} +199 -17
- package/dist/index-FfiTQJq2.d.mts.map +1 -0
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +43 -43
- package/dist/{load-6ZrRhepW.mjs → load-B84ohfBk.mjs} +2 -2
- package/dist/{load-6ZrRhepW.mjs.map → load-B84ohfBk.mjs.map} +1 -1
- package/dist/{loader-Dyx8dhFV.mjs → loader-CpZKpFz0.mjs} +32 -30
- package/dist/loader-CpZKpFz0.mjs.map +1 -0
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +7 -7
- 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/{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-Dp9xporj.mjs} +86 -9
- package/dist/menus-Dp9xporj.mjs.map +1 -0
- 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-1aPAYjiC.mjs} +2 -2
- package/dist/{oauth-authorization-DvBAL75d.mjs.map → oauth-authorization-1aPAYjiC.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-D4MnavW_.d.mts} +3 -3
- package/dist/{options-tb7DJROi.d.mts.map → options-D4MnavW_.d.mts.map} +1 -1
- package/dist/{parse-BBkFmLVr.mjs → parse-CrGndy1A.mjs} +2 -2
- package/dist/{parse-BBkFmLVr.mjs.map → parse-CrGndy1A.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/plugin-utils.d.mts +7 -7
- package/dist/plugins/adapt-sandbox-entry.d.mts +7 -7
- package/dist/{query-Ctlq1aOk.mjs → query-BFQ029Ts.mjs} +21 -15
- package/dist/query-BFQ029Ts.mjs.map +1 -0
- package/dist/{rate-limit-CH6W6ikK.mjs → rate-limit-ClFFUga6.mjs} +2 -2
- package/dist/{rate-limit-CH6W6ikK.mjs.map → rate-limit-ClFFUga6.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-DEygMrRO.mjs} +25 -3
- package/dist/redirects-DEygMrRO.mjs.map +1 -0
- package/dist/{redirects-CacE9eQa.mjs → redirects-OIu6vQ2i.mjs} +5 -5
- package/dist/{redirects-CacE9eQa.mjs.map → redirects-OIu6vQ2i.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/{runner-pt6Wl-l-.mjs → runner--4wMWwKM.mjs} +217 -166
- package/dist/runner--4wMWwKM.mjs.map +1 -0
- package/dist/{runner-DM1yR5qd.d.mts → runner-BcRuXq_h.d.mts} +2 -2
- package/dist/{runner-DM1yR5qd.d.mts.map → runner-BcRuXq_h.d.mts.map} +1 -1
- package/dist/runtime.d.mts +7 -7
- package/dist/runtime.mjs +2 -2
- package/dist/{schema-B4tk0HAG.mjs → schema-CS7Eg5gh.mjs} +5 -5
- package/dist/{schema-B4tk0HAG.mjs.map → schema-CS7Eg5gh.mjs.map} +1 -1
- package/dist/{search-f-fNfwab.mjs → search-o-aQzHI1.mjs} +4 -4
- package/dist/{search-f-fNfwab.mjs.map → search-o-aQzHI1.mjs.map} +1 -1
- package/dist/{secrets-YYbTgB1w.mjs → secrets-C_ZtRos3.mjs} +2 -2
- package/dist/{secrets-YYbTgB1w.mjs.map → secrets-C_ZtRos3.mjs.map} +1 -1
- package/dist/{sections-biElLfT9.mjs → sections-DhsZ0ns9.mjs} +3 -3
- package/dist/{sections-biElLfT9.mjs.map → sections-DhsZ0ns9.mjs.map} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +16 -16
- package/dist/seo/index.d.mts +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/{service-BhR2acnc.mjs → service-DAxg8RPR.mjs} +2 -2
- package/dist/{service-BhR2acnc.mjs.map → service-DAxg8RPR.mjs.map} +1 -1
- package/dist/{settings-b5zW1R1T.mjs → settings-B1p-gPUK.mjs} +5 -5
- package/dist/{settings-b5zW1R1T.mjs.map → settings-B1p-gPUK.mjs.map} +1 -1
- package/dist/{settings-D_NJvjgN.mjs → settings-DIsbHTRE.mjs} +3 -3
- package/dist/{settings-D_NJvjgN.mjs.map → settings-DIsbHTRE.mjs.map} +1 -1
- package/dist/{setup-complete-VoEZfasi.mjs → setup-complete-Yuv78yua.mjs} +2 -2
- package/dist/{setup-complete-VoEZfasi.mjs.map → setup-complete-Yuv78yua.mjs.map} +1 -1
- package/dist/{site-url-Cm8-sJy7.mjs → site-url-mEVmwIFi.mjs} +2 -2
- package/dist/{site-url-Cm8-sJy7.mjs.map → site-url-mEVmwIFi.mjs.map} +1 -1
- package/dist/{taxonomies-Crtzy4MT.mjs → taxonomies-BEW7S5AI.mjs} +7 -6
- package/dist/taxonomies-BEW7S5AI.mjs.map +1 -0
- package/dist/{taxonomies-Mhn9rjTQ.mjs → taxonomies-UusDXv3C.mjs} +4 -4
- package/dist/{taxonomies-Mhn9rjTQ.mjs.map → taxonomies-UusDXv3C.mjs.map} +1 -1
- 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-BwQeeY2p.d.mts} +1 -1
- package/dist/{transport-OnMNbsIA.d.mts.map → transport-BwQeeY2p.d.mts.map} +1 -1
- 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-D8bhH891.mjs → types-DZk_y-MU.mjs} +1 -1
- package/dist/{types-D8bhH891.mjs.map → types-DZk_y-MU.mjs.map} +1 -1
- package/dist/{types-DawhLFwy.d.mts → types-OT_Es5mp.d.mts} +26 -1
- package/dist/{types-DawhLFwy.d.mts.map → types-OT_Es5mp.d.mts.map} +1 -1
- package/dist/{types-i8_uzhMD.d.mts → types-WVmpZBJV.d.mts} +18 -3
- package/dist/types-WVmpZBJV.d.mts.map +1 -0
- package/dist/{user-DzEUl5zA.mjs → user-C0um7wrg.mjs} +18 -2
- package/dist/user-C0um7wrg.mjs.map +1 -0
- package/dist/{validate-Dy6nkNls.d.mts → validate-BPAHUSge.d.mts} +10 -2
- package/dist/validate-BPAHUSge.d.mts.map +1 -0
- package/dist/{validate-JCXcsqiY.mjs → validate-ZP9Dvg0P.mjs} +6 -3
- package/dist/validate-ZP9Dvg0P.mjs.map +1 -0
- package/dist/{validation-Bq-VyKJg.mjs → validation-CE5i4q0c.mjs} +5 -5
- package/dist/{validation-Bq-VyKJg.mjs.map → validation-CE5i4q0c.mjs.map} +1 -1
- package/dist/version-Dw0JXu45.mjs +7 -0
- package/dist/{version-CnS-Cr8A.mjs.map → version-Dw0JXu45.mjs.map} +1 -1
- package/dist/{widgets-Bap1eS1X.mjs → widgets-ClEnYQCH.mjs} +2 -2
- package/dist/{widgets-Bap1eS1X.mjs.map → widgets-ClEnYQCH.mjs.map} +1 -1
- 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 +5 -5
- package/src/api/handlers/content.ts +107 -8
- package/src/api/handlers/index.ts +2 -0
- package/src/api/openapi/document.ts +25 -0
- package/src/api/schemas/content.ts +33 -0
- 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 +28 -0
- 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/types.ts +8 -1
- package/src/bylines/index.ts +57 -0
- package/src/cli/commands/export-seed.ts +28 -12
- package/src/components/EmDashImage.astro +22 -4
- package/src/components/Image.astro +20 -3
- 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 +141 -42
- package/src/index.ts +8 -1
- package/src/loader.ts +67 -34
- package/src/media/responsive.ts +125 -0
- package/src/plugins/cron.ts +3 -2
- package/src/plugins/index.ts +5 -0
- package/src/plugins/scheduler/node.ts +9 -2
- package/src/query.ts +32 -5
- package/src/scheduled-publish.ts +153 -0
- package/src/seed/apply.ts +16 -6
- package/src/seed/types.ts +9 -0
- package/src/seed/validate.ts +15 -0
- package/src/taxonomies/index.ts +1 -0
- package/src/virtual-modules.d.ts +11 -0
- 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/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/taxonomies-Crtzy4MT.mjs.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/src/plugins/scheduler/piggyback.ts +0 -71
|
@@ -24,8 +24,8 @@ var __exportAll = (all, no_symbols) => {
|
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/database/migrations/001_initial.ts
|
|
26
26
|
var _001_initial_exports = /* @__PURE__ */ __exportAll({
|
|
27
|
-
down: () => down$
|
|
28
|
-
up: () => up$
|
|
27
|
+
down: () => down$41,
|
|
28
|
+
up: () => up$41
|
|
29
29
|
});
|
|
30
30
|
/**
|
|
31
31
|
* Initial schema migration
|
|
@@ -34,7 +34,7 @@ var _001_initial_exports = /* @__PURE__ */ __exportAll({
|
|
|
34
34
|
* by the SchemaRegistry when collections are added via the admin UI.
|
|
35
35
|
* This migration only creates system tables.
|
|
36
36
|
*/
|
|
37
|
-
async function up$
|
|
37
|
+
async function up$41(db) {
|
|
38
38
|
await db.schema.createTable("revisions").ifNotExists().addColumn("id", "text", (col) => col.primaryKey()).addColumn("collection", "text", (col) => col.notNull()).addColumn("entry_id", "text", (col) => col.notNull()).addColumn("data", "text", (col) => col.notNull()).addColumn("author_id", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
39
39
|
await db.schema.createIndex("idx_revisions_entry").ifNotExists().on("revisions").columns(["collection", "entry_id"]).execute();
|
|
40
40
|
await db.schema.createTable("taxonomies").ifNotExists().addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull()).addColumn("slug", "text", (col) => col.notNull()).addColumn("label", "text", (col) => col.notNull()).addColumn("parent_id", "text").addColumn("data", "text").addUniqueConstraint("taxonomies_name_slug_unique", ["name", "slug"]).addForeignKeyConstraint("taxonomies_parent_fk", ["parent_id"], "taxonomies", ["id"], (cb) => cb.onDelete("set null")).execute();
|
|
@@ -54,7 +54,7 @@ async function up$40(db) {
|
|
|
54
54
|
await db.schema.createIndex("idx_audit_action").ifNotExists().on("audit_logs").column("action").execute();
|
|
55
55
|
await db.schema.createIndex("idx_audit_timestamp").ifNotExists().on("audit_logs").column("timestamp").execute();
|
|
56
56
|
}
|
|
57
|
-
async function down$
|
|
57
|
+
async function down$41(db) {
|
|
58
58
|
await db.schema.dropTable("audit_logs").execute();
|
|
59
59
|
await db.schema.dropTable("options").execute();
|
|
60
60
|
await db.schema.dropTable("users").execute();
|
|
@@ -67,26 +67,26 @@ async function down$40(db) {
|
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/database/migrations/002_media_status.ts
|
|
69
69
|
var _002_media_status_exports = /* @__PURE__ */ __exportAll({
|
|
70
|
-
down: () => down$
|
|
71
|
-
up: () => up$
|
|
70
|
+
down: () => down$40,
|
|
71
|
+
up: () => up$40
|
|
72
72
|
});
|
|
73
73
|
/**
|
|
74
74
|
* Add status column to media table for tracking upload state.
|
|
75
75
|
* Status values: 'pending' | 'ready' | 'failed'
|
|
76
76
|
*/
|
|
77
|
-
async function up$
|
|
77
|
+
async function up$40(db) {
|
|
78
78
|
await db.schema.alterTable("media").addColumn("status", "text", (col) => col.notNull().defaultTo("ready")).execute();
|
|
79
79
|
await db.schema.createIndex("idx_media_status").on("media").column("status").execute();
|
|
80
80
|
}
|
|
81
|
-
async function down$
|
|
81
|
+
async function down$40(db) {
|
|
82
82
|
await db.schema.dropIndex("idx_media_status").execute();
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/database/migrations/003_schema_registry.ts
|
|
87
87
|
var _003_schema_registry_exports = /* @__PURE__ */ __exportAll({
|
|
88
|
-
down: () => down$
|
|
89
|
-
up: () => up$
|
|
88
|
+
down: () => down$39,
|
|
89
|
+
up: () => up$39
|
|
90
90
|
});
|
|
91
91
|
/**
|
|
92
92
|
* Migration: Schema Registry Tables
|
|
@@ -94,14 +94,14 @@ var _003_schema_registry_exports = /* @__PURE__ */ __exportAll({
|
|
|
94
94
|
* Creates the schema registry tables that store collection and field definitions.
|
|
95
95
|
* This enables dynamic schema management where D1 is the source of truth.
|
|
96
96
|
*/
|
|
97
|
-
async function up$
|
|
97
|
+
async function up$39(db) {
|
|
98
98
|
await db.schema.createTable("_emdash_collections").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("label_singular", "text").addColumn("description", "text").addColumn("icon", "text").addColumn("supports", "text").addColumn("source", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
99
99
|
await db.schema.createTable("_emdash_fields").addColumn("id", "text", (col) => col.primaryKey()).addColumn("collection_id", "text", (col) => col.notNull()).addColumn("slug", "text", (col) => col.notNull()).addColumn("label", "text", (col) => col.notNull()).addColumn("type", "text", (col) => col.notNull()).addColumn("column_type", "text", (col) => col.notNull()).addColumn("required", "integer", (col) => col.defaultTo(0)).addColumn("unique", "integer", (col) => col.defaultTo(0)).addColumn("default_value", "text").addColumn("validation", "text").addColumn("widget", "text").addColumn("options", "text").addColumn("sort_order", "integer", (col) => col.defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("fields_collection_fk", ["collection_id"], "_emdash_collections", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
100
100
|
await db.schema.createIndex("idx_fields_collection_slug").on("_emdash_fields").columns(["collection_id", "slug"]).unique().execute();
|
|
101
101
|
await db.schema.createIndex("idx_fields_collection").on("_emdash_fields").column("collection_id").execute();
|
|
102
102
|
await db.schema.createIndex("idx_fields_sort").on("_emdash_fields").columns(["collection_id", "sort_order"]).execute();
|
|
103
103
|
}
|
|
104
|
-
async function down$
|
|
104
|
+
async function down$39(db) {
|
|
105
105
|
await db.schema.dropTable("_emdash_fields").execute();
|
|
106
106
|
await db.schema.dropTable("_emdash_collections").execute();
|
|
107
107
|
}
|
|
@@ -109,8 +109,8 @@ async function down$38(db) {
|
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/database/migrations/004_plugins.ts
|
|
111
111
|
var _004_plugins_exports = /* @__PURE__ */ __exportAll({
|
|
112
|
-
down: () => down$
|
|
113
|
-
up: () => up$
|
|
112
|
+
down: () => down$38,
|
|
113
|
+
up: () => up$38
|
|
114
114
|
});
|
|
115
115
|
/**
|
|
116
116
|
* Migration: Plugin System Tables
|
|
@@ -120,7 +120,7 @@ var _004_plugins_exports = /* @__PURE__ */ __exportAll({
|
|
|
120
120
|
*
|
|
121
121
|
* @see PLUGIN-SYSTEM.md § Plugin Storage
|
|
122
122
|
*/
|
|
123
|
-
async function up$
|
|
123
|
+
async function up$38(db) {
|
|
124
124
|
await db.schema.createTable("_plugin_storage").addColumn("plugin_id", "text", (col) => col.notNull()).addColumn("collection", "text", (col) => col.notNull()).addColumn("id", "text", (col) => col.notNull()).addColumn("data", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addPrimaryKeyConstraint("pk_plugin_storage", [
|
|
125
125
|
"plugin_id",
|
|
126
126
|
"collection",
|
|
@@ -138,7 +138,7 @@ async function up$37(db) {
|
|
|
138
138
|
"index_name"
|
|
139
139
|
]).execute();
|
|
140
140
|
}
|
|
141
|
-
async function down$
|
|
141
|
+
async function down$38(db) {
|
|
142
142
|
await db.schema.dropTable("_plugin_indexes").execute();
|
|
143
143
|
await db.schema.dropTable("_plugin_state").execute();
|
|
144
144
|
await db.schema.dropTable("_plugin_storage").execute();
|
|
@@ -147,8 +147,8 @@ async function down$37(db) {
|
|
|
147
147
|
//#endregion
|
|
148
148
|
//#region src/database/migrations/005_menus.ts
|
|
149
149
|
var _005_menus_exports = /* @__PURE__ */ __exportAll({
|
|
150
|
-
down: () => down$
|
|
151
|
-
up: () => up$
|
|
150
|
+
down: () => down$37,
|
|
151
|
+
up: () => up$37
|
|
152
152
|
});
|
|
153
153
|
/**
|
|
154
154
|
* Navigation Menus migration
|
|
@@ -156,13 +156,13 @@ var _005_menus_exports = /* @__PURE__ */ __exportAll({
|
|
|
156
156
|
* Creates tables for admin-editable navigation menus.
|
|
157
157
|
* Menu items can reference content entries, taxonomy terms, or custom URLs.
|
|
158
158
|
*/
|
|
159
|
-
async function up$
|
|
159
|
+
async function up$37(db) {
|
|
160
160
|
await db.schema.createTable("_emdash_menus").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
161
161
|
await db.schema.createTable("_emdash_menu_items").addColumn("id", "text", (col) => col.primaryKey()).addColumn("menu_id", "text", (col) => col.notNull()).addColumn("parent_id", "text").addColumn("sort_order", "integer", (col) => col.notNull().defaultTo(0)).addColumn("type", "text", (col) => col.notNull()).addColumn("reference_collection", "text").addColumn("reference_id", "text").addColumn("custom_url", "text").addColumn("label", "text", (col) => col.notNull()).addColumn("title_attr", "text").addColumn("target", "text").addColumn("css_classes", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("menu_items_menu_fk", ["menu_id"], "_emdash_menus", ["id"], (cb) => cb.onDelete("cascade")).addForeignKeyConstraint("menu_items_parent_fk", ["parent_id"], "_emdash_menu_items", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
162
162
|
await db.schema.createIndex("idx_menu_items_menu").on("_emdash_menu_items").columns(["menu_id", "sort_order"]).execute();
|
|
163
163
|
await db.schema.createIndex("idx_menu_items_parent").on("_emdash_menu_items").column("parent_id").execute();
|
|
164
164
|
}
|
|
165
|
-
async function down$
|
|
165
|
+
async function down$37(db) {
|
|
166
166
|
await db.schema.dropTable("_emdash_menu_items").execute();
|
|
167
167
|
await db.schema.dropTable("_emdash_menus").execute();
|
|
168
168
|
}
|
|
@@ -170,8 +170,8 @@ async function down$36(db) {
|
|
|
170
170
|
//#endregion
|
|
171
171
|
//#region src/database/migrations/006_taxonomy_defs.ts
|
|
172
172
|
var _006_taxonomy_defs_exports = /* @__PURE__ */ __exportAll({
|
|
173
|
-
down: () => down$
|
|
174
|
-
up: () => up$
|
|
173
|
+
down: () => down$36,
|
|
174
|
+
up: () => up$36
|
|
175
175
|
});
|
|
176
176
|
/**
|
|
177
177
|
* Taxonomy definitions migration
|
|
@@ -179,7 +179,7 @@ var _006_taxonomy_defs_exports = /* @__PURE__ */ __exportAll({
|
|
|
179
179
|
* Adds _emdash_taxonomy_defs table to store taxonomy definitions (category, tag, custom)
|
|
180
180
|
* and seeds default category and tag taxonomies.
|
|
181
181
|
*/
|
|
182
|
-
async function up$
|
|
182
|
+
async function up$36(db) {
|
|
183
183
|
await db.schema.createTable("_emdash_taxonomy_defs").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("label_singular", "text").addColumn("hierarchical", "integer", (col) => col.defaultTo(0)).addColumn("collections", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
184
184
|
await db.insertInto("_emdash_taxonomy_defs").values([{
|
|
185
185
|
id: "taxdef_category",
|
|
@@ -197,22 +197,22 @@ async function up$35(db) {
|
|
|
197
197
|
collections: JSON.stringify(["posts"])
|
|
198
198
|
}]).execute();
|
|
199
199
|
}
|
|
200
|
-
async function down$
|
|
200
|
+
async function down$36(db) {
|
|
201
201
|
await db.schema.dropTable("_emdash_taxonomy_defs").execute();
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
//#endregion
|
|
205
205
|
//#region src/database/migrations/007_widgets.ts
|
|
206
206
|
var _007_widgets_exports = /* @__PURE__ */ __exportAll({
|
|
207
|
-
down: () => down$
|
|
208
|
-
up: () => up$
|
|
207
|
+
down: () => down$35,
|
|
208
|
+
up: () => up$35
|
|
209
209
|
});
|
|
210
|
-
async function up$
|
|
210
|
+
async function up$35(db) {
|
|
211
211
|
await db.schema.createTable("_emdash_widget_areas").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("description", "text").addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
212
212
|
await db.schema.createTable("_emdash_widgets").addColumn("id", "text", (col) => col.primaryKey()).addColumn("area_id", "text", (col) => col.notNull().references("_emdash_widget_areas.id").onDelete("cascade")).addColumn("sort_order", "integer", (col) => col.notNull().defaultTo(0)).addColumn("type", "text", (col) => col.notNull()).addColumn("title", "text").addColumn("content", "text").addColumn("menu_name", "text").addColumn("component_id", "text").addColumn("component_props", "text").addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
213
213
|
await db.schema.createIndex("idx_widgets_area").on("_emdash_widgets").columns(["area_id", "sort_order"]).execute();
|
|
214
214
|
}
|
|
215
|
-
async function down$
|
|
215
|
+
async function down$35(db) {
|
|
216
216
|
await db.schema.dropTable("_emdash_widgets").execute();
|
|
217
217
|
await db.schema.dropTable("_emdash_widget_areas").execute();
|
|
218
218
|
}
|
|
@@ -220,8 +220,8 @@ async function down$34(db) {
|
|
|
220
220
|
//#endregion
|
|
221
221
|
//#region src/database/migrations/008_auth.ts
|
|
222
222
|
var _008_auth_exports = /* @__PURE__ */ __exportAll({
|
|
223
|
-
down: () => down$
|
|
224
|
-
up: () => up$
|
|
223
|
+
down: () => down$34,
|
|
224
|
+
up: () => up$34
|
|
225
225
|
});
|
|
226
226
|
/**
|
|
227
227
|
* Auth migration - passkey-first authentication
|
|
@@ -235,7 +235,7 @@ var _008_auth_exports = /* @__PURE__ */ __exportAll({
|
|
|
235
235
|
* - Creates oauth_accounts table (external provider links)
|
|
236
236
|
* - Creates allowed_domains table (self-signup)
|
|
237
237
|
*/
|
|
238
|
-
async function up$
|
|
238
|
+
async function up$34(db) {
|
|
239
239
|
await db.schema.createTable("users_new").addColumn("id", "text", (col) => col.primaryKey()).addColumn("email", "text", (col) => col.notNull().unique()).addColumn("name", "text").addColumn("avatar_url", "text").addColumn("role", "integer", (col) => col.notNull().defaultTo(10)).addColumn("email_verified", "integer", (col) => col.notNull().defaultTo(0)).addColumn("data", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
240
240
|
await sql`
|
|
241
241
|
INSERT INTO users_new (id, email, name, role, data, created_at, updated_at)
|
|
@@ -268,7 +268,7 @@ async function up$33(db) {
|
|
|
268
268
|
await db.schema.createTable("auth_challenges").addColumn("challenge", "text", (col) => col.primaryKey()).addColumn("type", "text", (col) => col.notNull()).addColumn("user_id", "text").addColumn("data", "text").addColumn("expires_at", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
269
269
|
await db.schema.createIndex("idx_auth_challenges_expires").on("auth_challenges").column("expires_at").execute();
|
|
270
270
|
}
|
|
271
|
-
async function down$
|
|
271
|
+
async function down$34(db) {
|
|
272
272
|
await db.schema.dropTable("auth_challenges").execute();
|
|
273
273
|
await db.schema.dropTable("allowed_domains").execute();
|
|
274
274
|
await db.schema.dropTable("oauth_accounts").execute();
|
|
@@ -301,8 +301,8 @@ async function down$33(db) {
|
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region src/database/migrations/009_user_disabled.ts
|
|
303
303
|
var _009_user_disabled_exports = /* @__PURE__ */ __exportAll({
|
|
304
|
-
down: () => down$
|
|
305
|
-
up: () => up$
|
|
304
|
+
down: () => down$33,
|
|
305
|
+
up: () => up$33
|
|
306
306
|
});
|
|
307
307
|
/**
|
|
308
308
|
* User disabled column - for soft-disabling users
|
|
@@ -311,19 +311,19 @@ var _009_user_disabled_exports = /* @__PURE__ */ __exportAll({
|
|
|
311
311
|
* - Adds disabled column to users table (INTEGER, default 0)
|
|
312
312
|
* - Disabled users cannot log in
|
|
313
313
|
*/
|
|
314
|
-
async function up$
|
|
314
|
+
async function up$33(db) {
|
|
315
315
|
await sql`ALTER TABLE users ADD COLUMN disabled INTEGER NOT NULL DEFAULT 0`.execute(db);
|
|
316
316
|
await db.schema.createIndex("idx_users_disabled").on("users").column("disabled").execute();
|
|
317
317
|
}
|
|
318
|
-
async function down$
|
|
318
|
+
async function down$33(db) {
|
|
319
319
|
await db.schema.dropIndex("idx_users_disabled").execute();
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
//#endregion
|
|
323
323
|
//#region src/database/migrations/011_sections.ts
|
|
324
324
|
var _011_sections_exports = /* @__PURE__ */ __exportAll({
|
|
325
|
-
down: () => down$
|
|
326
|
-
up: () => up$
|
|
325
|
+
down: () => down$32,
|
|
326
|
+
up: () => up$32
|
|
327
327
|
});
|
|
328
328
|
/**
|
|
329
329
|
* Migration: Add sections tables and performance indexes
|
|
@@ -332,13 +332,13 @@ var _011_sections_exports = /* @__PURE__ */ __exportAll({
|
|
|
332
332
|
* They provide a library of pre-built page sections (heroes, CTAs, testimonials, etc.)
|
|
333
333
|
* that content authors can browse and insert with a single click.
|
|
334
334
|
*/
|
|
335
|
-
async function up$
|
|
335
|
+
async function up$32(db) {
|
|
336
336
|
await db.schema.createTable("_emdash_section_categories").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("sort_order", "integer", (col) => col.defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
337
337
|
await db.schema.createTable("_emdash_sections").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("title", "text", (col) => col.notNull()).addColumn("description", "text").addColumn("category_id", "text", (col) => col.references("_emdash_section_categories.id").onDelete("set null")).addColumn("keywords", "text").addColumn("content", "text", (col) => col.notNull()).addColumn("preview_media_id", "text").addColumn("source", "text", (col) => col.notNull().defaultTo("user")).addColumn("theme_id", "text").addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).addColumn("updated_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
338
338
|
await db.schema.createIndex("idx_sections_category").on("_emdash_sections").columns(["category_id"]).execute();
|
|
339
339
|
await db.schema.createIndex("idx_sections_source").on("_emdash_sections").columns(["source"]).execute();
|
|
340
340
|
}
|
|
341
|
-
async function down$
|
|
341
|
+
async function down$32(db) {
|
|
342
342
|
await db.schema.dropIndex("idx_sections_source").execute();
|
|
343
343
|
await db.schema.dropIndex("idx_sections_category").execute();
|
|
344
344
|
await db.schema.dropTable("_emdash_sections").execute();
|
|
@@ -348,8 +348,8 @@ async function down$31(db) {
|
|
|
348
348
|
//#endregion
|
|
349
349
|
//#region src/database/migrations/012_search.ts
|
|
350
350
|
var _012_search_exports = /* @__PURE__ */ __exportAll({
|
|
351
|
-
down: () => down$
|
|
352
|
-
up: () => up$
|
|
351
|
+
down: () => down$31,
|
|
352
|
+
up: () => up$31
|
|
353
353
|
});
|
|
354
354
|
/**
|
|
355
355
|
* Migration: Search Support
|
|
@@ -357,11 +357,11 @@ var _012_search_exports = /* @__PURE__ */ __exportAll({
|
|
|
357
357
|
* Adds search configuration to collections and searchable flag to fields.
|
|
358
358
|
* FTS5 tables are created dynamically when search is enabled for a collection.
|
|
359
359
|
*/
|
|
360
|
-
async function up$
|
|
360
|
+
async function up$31(db) {
|
|
361
361
|
await db.schema.alterTable("_emdash_collections").addColumn("search_config", "text").execute();
|
|
362
362
|
await db.schema.alterTable("_emdash_fields").addColumn("searchable", "integer", (col) => col.defaultTo(0)).execute();
|
|
363
363
|
}
|
|
364
|
-
async function down$
|
|
364
|
+
async function down$31(db) {
|
|
365
365
|
await db.schema.alterTable("_emdash_fields").dropColumn("searchable").execute();
|
|
366
366
|
await db.schema.alterTable("_emdash_collections").dropColumn("search_config").execute();
|
|
367
367
|
}
|
|
@@ -369,8 +369,8 @@ async function down$30(db) {
|
|
|
369
369
|
//#endregion
|
|
370
370
|
//#region src/database/migrations/013_scheduled_publishing.ts
|
|
371
371
|
var _013_scheduled_publishing_exports = /* @__PURE__ */ __exportAll({
|
|
372
|
-
down: () => down$
|
|
373
|
-
up: () => up$
|
|
372
|
+
down: () => down$30,
|
|
373
|
+
up: () => up$30
|
|
374
374
|
});
|
|
375
375
|
/**
|
|
376
376
|
* Migration: Add scheduled publishing support
|
|
@@ -379,7 +379,7 @@ var _013_scheduled_publishing_exports = /* @__PURE__ */ __exportAll({
|
|
|
379
379
|
* When scheduled_at is set and status is 'scheduled', the content
|
|
380
380
|
* will be auto-published when the scheduled time is reached.
|
|
381
381
|
*/
|
|
382
|
-
async function up$
|
|
382
|
+
async function up$30(db) {
|
|
383
383
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
384
384
|
for (const tableName of tableNames) {
|
|
385
385
|
const table = { name: tableName };
|
|
@@ -394,7 +394,7 @@ async function up$29(db) {
|
|
|
394
394
|
`.execute(db);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
|
-
async function down$
|
|
397
|
+
async function down$30(db) {
|
|
398
398
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
399
399
|
for (const tableName of tableNames) {
|
|
400
400
|
const table = { name: tableName };
|
|
@@ -411,10 +411,10 @@ async function down$29(db) {
|
|
|
411
411
|
//#endregion
|
|
412
412
|
//#region src/database/migrations/014_draft_revisions.ts
|
|
413
413
|
var _014_draft_revisions_exports = /* @__PURE__ */ __exportAll({
|
|
414
|
-
down: () => down$
|
|
415
|
-
up: () => up$
|
|
414
|
+
down: () => down$29,
|
|
415
|
+
up: () => up$29
|
|
416
416
|
});
|
|
417
|
-
async function up$
|
|
417
|
+
async function up$29(db) {
|
|
418
418
|
const tables = await db.selectFrom("_emdash_collections").select("slug").execute();
|
|
419
419
|
for (const row of tables) {
|
|
420
420
|
const tableName = `ec_${row.slug}`;
|
|
@@ -436,7 +436,7 @@ async function up$28(db) {
|
|
|
436
436
|
`.execute(db);
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
async function down$
|
|
439
|
+
async function down$29(db) {
|
|
440
440
|
const tables = await db.selectFrom("_emdash_collections").select("slug").execute();
|
|
441
441
|
for (const row of tables) {
|
|
442
442
|
const tableName = `ec_${row.slug}`;
|
|
@@ -460,8 +460,8 @@ async function down$28(db) {
|
|
|
460
460
|
//#endregion
|
|
461
461
|
//#region src/database/migrations/015_indexes.ts
|
|
462
462
|
var _015_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
463
|
-
down: () => down$
|
|
464
|
-
up: () => up$
|
|
463
|
+
down: () => down$28,
|
|
464
|
+
up: () => up$28
|
|
465
465
|
});
|
|
466
466
|
/**
|
|
467
467
|
* Add performance indexes for common query patterns.
|
|
@@ -474,7 +474,7 @@ var _015_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
|
474
474
|
* 5. Retroactive author_id + updated_at on existing ec_* content tables
|
|
475
475
|
* (new tables get these from createContentTable() in registry.ts)
|
|
476
476
|
*/
|
|
477
|
-
async function up$
|
|
477
|
+
async function up$28(db) {
|
|
478
478
|
await db.schema.createIndex("idx_media_mime_type").on("media").column("mime_type").execute();
|
|
479
479
|
await db.schema.createIndex("idx_media_filename").on("media").column("filename").execute();
|
|
480
480
|
await db.schema.createIndex("idx_media_created_at").on("media").column("created_at").execute();
|
|
@@ -494,7 +494,7 @@ async function up$27(db) {
|
|
|
494
494
|
`.execute(db);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
async function down$
|
|
497
|
+
async function down$28(db) {
|
|
498
498
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
499
499
|
for (const tableName of tableNames) {
|
|
500
500
|
const table = { name: tableName };
|
|
@@ -512,8 +512,8 @@ async function down$27(db) {
|
|
|
512
512
|
//#endregion
|
|
513
513
|
//#region src/database/migrations/016_api_tokens.ts
|
|
514
514
|
var _016_api_tokens_exports = /* @__PURE__ */ __exportAll({
|
|
515
|
-
down: () => down$
|
|
516
|
-
up: () => up$
|
|
515
|
+
down: () => down$27,
|
|
516
|
+
up: () => up$27
|
|
517
517
|
});
|
|
518
518
|
/**
|
|
519
519
|
* API token tables for programmatic access.
|
|
@@ -531,7 +531,7 @@ var _016_api_tokens_exports = /* @__PURE__ */ __exportAll({
|
|
|
531
531
|
* top. Without these guards, the retry crashed with `table ... already
|
|
532
532
|
* exists` and blocked every subsequent boot of the Worker.
|
|
533
533
|
*/
|
|
534
|
-
async function up$
|
|
534
|
+
async function up$27(db) {
|
|
535
535
|
await db.schema.createTable("_emdash_api_tokens").ifNotExists().addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull()).addColumn("token_hash", "text", (col) => col.notNull().unique()).addColumn("prefix", "text", (col) => col.notNull()).addColumn("user_id", "text", (col) => col.notNull()).addColumn("scopes", "text", (col) => col.notNull()).addColumn("expires_at", "text").addColumn("last_used_at", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("api_tokens_user_fk", ["user_id"], "users", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
536
536
|
await db.schema.createIndex("idx_api_tokens_token_hash").ifNotExists().on("_emdash_api_tokens").column("token_hash").execute();
|
|
537
537
|
await db.schema.createIndex("idx_api_tokens_user_id").ifNotExists().on("_emdash_api_tokens").column("user_id").execute();
|
|
@@ -540,7 +540,7 @@ async function up$26(db) {
|
|
|
540
540
|
await db.schema.createIndex("idx_oauth_tokens_expires").ifNotExists().on("_emdash_oauth_tokens").column("expires_at").execute();
|
|
541
541
|
await db.schema.createTable("_emdash_device_codes").ifNotExists().addColumn("device_code", "text", (col) => col.primaryKey()).addColumn("user_code", "text", (col) => col.notNull().unique()).addColumn("scopes", "text", (col) => col.notNull()).addColumn("user_id", "text").addColumn("status", "text", (col) => col.notNull().defaultTo("pending")).addColumn("expires_at", "text", (col) => col.notNull()).addColumn("interval", "integer", (col) => col.notNull().defaultTo(5)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
542
542
|
}
|
|
543
|
-
async function down$
|
|
543
|
+
async function down$27(db) {
|
|
544
544
|
await db.schema.dropTable("_emdash_device_codes").ifExists().execute();
|
|
545
545
|
await db.schema.dropTable("_emdash_oauth_tokens").ifExists().execute();
|
|
546
546
|
await db.schema.dropTable("_emdash_api_tokens").ifExists().execute();
|
|
@@ -549,8 +549,8 @@ async function down$26(db) {
|
|
|
549
549
|
//#endregion
|
|
550
550
|
//#region src/database/migrations/017_authorization_codes.ts
|
|
551
551
|
var _017_authorization_codes_exports = /* @__PURE__ */ __exportAll({
|
|
552
|
-
down: () => down$
|
|
553
|
-
up: () => up$
|
|
552
|
+
down: () => down$26,
|
|
553
|
+
up: () => up$26
|
|
554
554
|
});
|
|
555
555
|
/**
|
|
556
556
|
* Authorization codes for OAuth 2.1 Authorization Code + PKCE flow.
|
|
@@ -560,20 +560,20 @@ var _017_authorization_codes_exports = /* @__PURE__ */ __exportAll({
|
|
|
560
560
|
*
|
|
561
561
|
* Also adds client_id tracking to oauth_tokens for per-client revocation.
|
|
562
562
|
*/
|
|
563
|
-
async function up$
|
|
563
|
+
async function up$26(db) {
|
|
564
564
|
await db.schema.createTable("_emdash_authorization_codes").addColumn("code_hash", "text", (col) => col.primaryKey()).addColumn("client_id", "text", (col) => col.notNull()).addColumn("redirect_uri", "text", (col) => col.notNull()).addColumn("user_id", "text", (col) => col.notNull()).addColumn("scopes", "text", (col) => col.notNull()).addColumn("code_challenge", "text", (col) => col.notNull()).addColumn("code_challenge_method", "text", (col) => col.notNull().defaultTo("S256")).addColumn("resource", "text").addColumn("expires_at", "text", (col) => col.notNull()).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addForeignKeyConstraint("auth_codes_user_fk", ["user_id"], "users", ["id"], (cb) => cb.onDelete("cascade")).execute();
|
|
565
565
|
await db.schema.createIndex("idx_auth_codes_expires").on("_emdash_authorization_codes").column("expires_at").execute();
|
|
566
566
|
await sql`ALTER TABLE _emdash_oauth_tokens ADD COLUMN client_id TEXT`.execute(db);
|
|
567
567
|
}
|
|
568
|
-
async function down$
|
|
568
|
+
async function down$26(db) {
|
|
569
569
|
await db.schema.dropTable("_emdash_authorization_codes").execute();
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
//#endregion
|
|
573
573
|
//#region src/database/migrations/018_seo.ts
|
|
574
574
|
var _018_seo_exports = /* @__PURE__ */ __exportAll({
|
|
575
|
-
down: () => down$
|
|
576
|
-
up: () => up$
|
|
575
|
+
down: () => down$25,
|
|
576
|
+
up: () => up$25
|
|
577
577
|
});
|
|
578
578
|
/**
|
|
579
579
|
* Migration: SEO support
|
|
@@ -586,7 +586,7 @@ var _018_seo_exports = /* @__PURE__ */ __exportAll({
|
|
|
586
586
|
* need it. The `has_seo` flag controls whether the admin shows SEO fields
|
|
587
587
|
* and whether the collection's content appears in sitemaps.
|
|
588
588
|
*/
|
|
589
|
-
async function up$
|
|
589
|
+
async function up$25(db) {
|
|
590
590
|
await db.schema.createTable("_emdash_seo").addColumn("collection", "text", (col) => col.notNull()).addColumn("content_id", "text", (col) => col.notNull()).addColumn("seo_title", "text").addColumn("seo_description", "text").addColumn("seo_image", "text").addColumn("seo_canonical", "text").addColumn("seo_no_index", "integer", (col) => col.notNull().defaultTo(0)).addColumn("created_at", "text", (col) => col.notNull().defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.notNull().defaultTo(currentTimestamp(db))).addPrimaryKeyConstraint("_emdash_seo_pk", ["collection", "content_id"]).execute();
|
|
591
591
|
await sql`
|
|
592
592
|
CREATE INDEX idx_emdash_seo_collection
|
|
@@ -597,7 +597,7 @@ async function up$24(db) {
|
|
|
597
597
|
ADD COLUMN has_seo INTEGER NOT NULL DEFAULT 0
|
|
598
598
|
`.execute(db);
|
|
599
599
|
}
|
|
600
|
-
async function down$
|
|
600
|
+
async function down$25(db) {
|
|
601
601
|
await sql`DROP TABLE IF EXISTS _emdash_seo`.execute(db);
|
|
602
602
|
await sql`
|
|
603
603
|
ALTER TABLE _emdash_collections
|
|
@@ -608,8 +608,8 @@ async function down$24(db) {
|
|
|
608
608
|
//#endregion
|
|
609
609
|
//#region src/database/migrations/019_i18n.ts
|
|
610
610
|
var _019_i18n_exports = /* @__PURE__ */ __exportAll({
|
|
611
|
-
down: () => down$
|
|
612
|
-
up: () => up$
|
|
611
|
+
down: () => down$24,
|
|
612
|
+
up: () => up$24
|
|
613
613
|
});
|
|
614
614
|
/**
|
|
615
615
|
* Quote an identifier for use in raw SQL. Escapes embedded double-quotes
|
|
@@ -722,7 +722,7 @@ async function upPostgres$1(db) {
|
|
|
722
722
|
ADD COLUMN translatable INTEGER NOT NULL DEFAULT 1
|
|
723
723
|
`.execute(db);
|
|
724
724
|
}
|
|
725
|
-
async function up$
|
|
725
|
+
async function up$24(db) {
|
|
726
726
|
if (!isSqlite(db)) return upPostgres$1(db);
|
|
727
727
|
const orphanedTmps = await listTablesLike(db, "ec_%_i18n_tmp");
|
|
728
728
|
for (const tmpName of orphanedTmps) {
|
|
@@ -839,7 +839,7 @@ async function downPostgres(db) {
|
|
|
839
839
|
await sql`ALTER TABLE ${sql.ref(t)} DROP COLUMN translation_group`.execute(db);
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
async function down$
|
|
842
|
+
async function down$24(db) {
|
|
843
843
|
if (!isSqlite(db)) return downPostgres(db);
|
|
844
844
|
await sql`
|
|
845
845
|
ALTER TABLE _emdash_fields
|
|
@@ -946,8 +946,8 @@ async function down$23(db) {
|
|
|
946
946
|
//#endregion
|
|
947
947
|
//#region src/database/migrations/020_collection_url_pattern.ts
|
|
948
948
|
var _020_collection_url_pattern_exports = /* @__PURE__ */ __exportAll({
|
|
949
|
-
down: () => down$
|
|
950
|
-
up: () => up$
|
|
949
|
+
down: () => down$23,
|
|
950
|
+
up: () => up$23
|
|
951
951
|
});
|
|
952
952
|
/**
|
|
953
953
|
* Migration: URL pattern for collections
|
|
@@ -956,13 +956,13 @@ var _020_collection_url_pattern_exports = /* @__PURE__ */ __exportAll({
|
|
|
956
956
|
* can declare its own URL structure (e.g. "/{slug}" for pages, "/blog/{slug}"
|
|
957
957
|
* for posts). Used for menu URL resolution, sitemaps, and path-based lookups.
|
|
958
958
|
*/
|
|
959
|
-
async function up$
|
|
959
|
+
async function up$23(db) {
|
|
960
960
|
await sql`
|
|
961
961
|
ALTER TABLE _emdash_collections
|
|
962
962
|
ADD COLUMN url_pattern TEXT
|
|
963
963
|
`.execute(db);
|
|
964
964
|
}
|
|
965
|
-
async function down$
|
|
965
|
+
async function down$23(db) {
|
|
966
966
|
await sql`
|
|
967
967
|
ALTER TABLE _emdash_collections
|
|
968
968
|
DROP COLUMN url_pattern
|
|
@@ -972,8 +972,8 @@ async function down$22(db) {
|
|
|
972
972
|
//#endregion
|
|
973
973
|
//#region src/database/migrations/021_remove_section_categories.ts
|
|
974
974
|
var _021_remove_section_categories_exports = /* @__PURE__ */ __exportAll({
|
|
975
|
-
down: () => down$
|
|
976
|
-
up: () => up$
|
|
975
|
+
down: () => down$22,
|
|
976
|
+
up: () => up$22
|
|
977
977
|
});
|
|
978
978
|
/**
|
|
979
979
|
* Migration: Remove section categories
|
|
@@ -982,12 +982,12 @@ var _021_remove_section_categories_exports = /* @__PURE__ */ __exportAll({
|
|
|
982
982
|
* Rather than building the missing UI for a feature with very little need at this stage,
|
|
983
983
|
* we're removing the feature entirely.
|
|
984
984
|
*/
|
|
985
|
-
async function up$
|
|
985
|
+
async function up$22(db) {
|
|
986
986
|
await db.schema.dropIndex("idx_sections_category").ifExists().execute();
|
|
987
987
|
await db.schema.alterTable("_emdash_sections").dropColumn("category_id").execute();
|
|
988
988
|
await db.schema.dropTable("_emdash_section_categories").execute();
|
|
989
989
|
}
|
|
990
|
-
async function down$
|
|
990
|
+
async function down$22(db) {
|
|
991
991
|
await db.schema.createTable("_emdash_section_categories").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("sort_order", "integer", (col) => col.defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(sql`CURRENT_TIMESTAMP`)).execute();
|
|
992
992
|
await db.schema.alterTable("_emdash_sections").addColumn("category_id", "text", (col) => col.references("_emdash_section_categories.id").onDelete("set null")).execute();
|
|
993
993
|
await db.schema.createIndex("idx_sections_category").on("_emdash_sections").columns(["category_id"]).execute();
|
|
@@ -996,8 +996,8 @@ async function down$21(db) {
|
|
|
996
996
|
//#endregion
|
|
997
997
|
//#region src/database/migrations/022_marketplace_plugin_state.ts
|
|
998
998
|
var _022_marketplace_plugin_state_exports = /* @__PURE__ */ __exportAll({
|
|
999
|
-
down: () => down$
|
|
1000
|
-
up: () => up$
|
|
999
|
+
down: () => down$21,
|
|
1000
|
+
up: () => up$21
|
|
1001
1001
|
});
|
|
1002
1002
|
/**
|
|
1003
1003
|
* Migration: Add marketplace fields to _plugin_state
|
|
@@ -1006,7 +1006,7 @@ var _022_marketplace_plugin_state_exports = /* @__PURE__ */ __exportAll({
|
|
|
1006
1006
|
* whether a plugin was installed from config or marketplace,
|
|
1007
1007
|
* and which marketplace version is installed.
|
|
1008
1008
|
*/
|
|
1009
|
-
async function up$
|
|
1009
|
+
async function up$21(db) {
|
|
1010
1010
|
await sql`
|
|
1011
1011
|
ALTER TABLE _plugin_state
|
|
1012
1012
|
ADD COLUMN source TEXT NOT NULL DEFAULT 'config'
|
|
@@ -1021,7 +1021,7 @@ async function up$20(db) {
|
|
|
1021
1021
|
WHERE source = 'marketplace'
|
|
1022
1022
|
`.execute(db);
|
|
1023
1023
|
}
|
|
1024
|
-
async function down$
|
|
1024
|
+
async function down$21(db) {
|
|
1025
1025
|
await sql`
|
|
1026
1026
|
DROP INDEX IF EXISTS idx_plugin_state_source
|
|
1027
1027
|
`.execute(db);
|
|
@@ -1038,8 +1038,8 @@ async function down$20(db) {
|
|
|
1038
1038
|
//#endregion
|
|
1039
1039
|
//#region src/database/migrations/023_plugin_metadata.ts
|
|
1040
1040
|
var _023_plugin_metadata_exports = /* @__PURE__ */ __exportAll({
|
|
1041
|
-
down: () => down$
|
|
1042
|
-
up: () => up$
|
|
1041
|
+
down: () => down$20,
|
|
1042
|
+
up: () => up$20
|
|
1043
1043
|
});
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Migration: Add display metadata to _plugin_state
|
|
@@ -1048,7 +1048,7 @@ var _023_plugin_metadata_exports = /* @__PURE__ */ __exportAll({
|
|
|
1048
1048
|
* so the admin UI can show meaningful info without re-fetching
|
|
1049
1049
|
* from the marketplace on every page load.
|
|
1050
1050
|
*/
|
|
1051
|
-
async function up$
|
|
1051
|
+
async function up$20(db) {
|
|
1052
1052
|
await sql`
|
|
1053
1053
|
ALTER TABLE _plugin_state
|
|
1054
1054
|
ADD COLUMN display_name TEXT
|
|
@@ -1058,7 +1058,7 @@ async function up$19(db) {
|
|
|
1058
1058
|
ADD COLUMN description TEXT
|
|
1059
1059
|
`.execute(db);
|
|
1060
1060
|
}
|
|
1061
|
-
async function down$
|
|
1061
|
+
async function down$20(db) {
|
|
1062
1062
|
await sql`
|
|
1063
1063
|
ALTER TABLE _plugin_state
|
|
1064
1064
|
DROP COLUMN description
|
|
@@ -1072,8 +1072,8 @@ async function down$19(db) {
|
|
|
1072
1072
|
//#endregion
|
|
1073
1073
|
//#region src/database/migrations/024_media_placeholders.ts
|
|
1074
1074
|
var _024_media_placeholders_exports = /* @__PURE__ */ __exportAll({
|
|
1075
|
-
down: () => down$
|
|
1076
|
-
up: () => up$
|
|
1075
|
+
down: () => down$19,
|
|
1076
|
+
up: () => up$19
|
|
1077
1077
|
});
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Migration: Add placeholder columns to media table
|
|
@@ -1081,7 +1081,7 @@ var _024_media_placeholders_exports = /* @__PURE__ */ __exportAll({
|
|
|
1081
1081
|
* Stores blurhash and dominant_color for LQIP (Low Quality Image Placeholder)
|
|
1082
1082
|
* support. Generated at upload time from image pixel data.
|
|
1083
1083
|
*/
|
|
1084
|
-
async function up$
|
|
1084
|
+
async function up$19(db) {
|
|
1085
1085
|
await sql`
|
|
1086
1086
|
ALTER TABLE media
|
|
1087
1087
|
ADD COLUMN blurhash TEXT
|
|
@@ -1091,7 +1091,7 @@ async function up$18(db) {
|
|
|
1091
1091
|
ADD COLUMN dominant_color TEXT
|
|
1092
1092
|
`.execute(db);
|
|
1093
1093
|
}
|
|
1094
|
-
async function down$
|
|
1094
|
+
async function down$19(db) {
|
|
1095
1095
|
await sql`
|
|
1096
1096
|
ALTER TABLE media
|
|
1097
1097
|
DROP COLUMN dominant_color
|
|
@@ -1105,8 +1105,8 @@ async function down$18(db) {
|
|
|
1105
1105
|
//#endregion
|
|
1106
1106
|
//#region src/database/migrations/025_oauth_clients.ts
|
|
1107
1107
|
var _025_oauth_clients_exports = /* @__PURE__ */ __exportAll({
|
|
1108
|
-
down: () => down$
|
|
1109
|
-
up: () => up$
|
|
1108
|
+
down: () => down$18,
|
|
1109
|
+
up: () => up$18
|
|
1110
1110
|
});
|
|
1111
1111
|
/**
|
|
1112
1112
|
* Migration: Create OAuth clients table
|
|
@@ -1117,18 +1117,18 @@ var _025_oauth_clients_exports = /* @__PURE__ */ __exportAll({
|
|
|
1117
1117
|
* Each client has a set of pre-registered redirect URIs (JSON array).
|
|
1118
1118
|
* The authorize endpoint rejects any redirect_uri not in the client's list.
|
|
1119
1119
|
*/
|
|
1120
|
-
async function up$
|
|
1120
|
+
async function up$18(db) {
|
|
1121
1121
|
await db.schema.createTable("_emdash_oauth_clients").addColumn("id", "text", (col) => col.primaryKey()).addColumn("name", "text", (col) => col.notNull()).addColumn("redirect_uris", "text", (col) => col.notNull()).addColumn("scopes", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1122
1122
|
}
|
|
1123
|
-
async function down$
|
|
1123
|
+
async function down$18(db) {
|
|
1124
1124
|
await db.schema.dropTable("_emdash_oauth_clients").execute();
|
|
1125
1125
|
}
|
|
1126
1126
|
|
|
1127
1127
|
//#endregion
|
|
1128
1128
|
//#region src/database/migrations/026_cron_tasks.ts
|
|
1129
1129
|
var _026_cron_tasks_exports = /* @__PURE__ */ __exportAll({
|
|
1130
|
-
down: () => down$
|
|
1131
|
-
up: () => up$
|
|
1130
|
+
down: () => down$17,
|
|
1131
|
+
up: () => up$17
|
|
1132
1132
|
});
|
|
1133
1133
|
/**
|
|
1134
1134
|
* Migration: Create cron tasks table for plugin scheduled tasks.
|
|
@@ -1139,7 +1139,7 @@ var _026_cron_tasks_exports = /* @__PURE__ */ __exportAll({
|
|
|
1139
1139
|
* The `next_run_at` + `status` + `enabled` index drives the "find overdue
|
|
1140
1140
|
* tasks" query used by CronExecutor.tick().
|
|
1141
1141
|
*/
|
|
1142
|
-
async function up$
|
|
1142
|
+
async function up$17(db) {
|
|
1143
1143
|
await db.schema.createTable("_emdash_cron_tasks").addColumn("id", "text", (col) => col.primaryKey()).addColumn("plugin_id", "text", (col) => col.notNull()).addColumn("task_name", "text", (col) => col.notNull()).addColumn("schedule", "text", (col) => col.notNull()).addColumn("is_oneshot", "integer", (col) => col.notNull().defaultTo(0)).addColumn("data", "text").addColumn("next_run_at", "text", (col) => col.notNull()).addColumn("last_run_at", "text").addColumn("status", "text", (col) => col.notNull().defaultTo("idle")).addColumn("locked_at", "text").addColumn("enabled", "integer", (col) => col.notNull().defaultTo(1)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addUniqueConstraint("uq_cron_tasks_plugin_task", ["plugin_id", "task_name"]).execute();
|
|
1144
1144
|
await db.schema.createIndex("idx_cron_tasks_due").on("_emdash_cron_tasks").columns([
|
|
1145
1145
|
"enabled",
|
|
@@ -1148,17 +1148,17 @@ async function up$16(db) {
|
|
|
1148
1148
|
]).execute();
|
|
1149
1149
|
await db.schema.createIndex("idx_cron_tasks_plugin").on("_emdash_cron_tasks").column("plugin_id").execute();
|
|
1150
1150
|
}
|
|
1151
|
-
async function down$
|
|
1151
|
+
async function down$17(db) {
|
|
1152
1152
|
await db.schema.dropTable("_emdash_cron_tasks").execute();
|
|
1153
1153
|
}
|
|
1154
1154
|
|
|
1155
1155
|
//#endregion
|
|
1156
1156
|
//#region src/database/migrations/027_comments.ts
|
|
1157
1157
|
var _027_comments_exports = /* @__PURE__ */ __exportAll({
|
|
1158
|
-
down: () => down$
|
|
1159
|
-
up: () => up$
|
|
1158
|
+
down: () => down$16,
|
|
1159
|
+
up: () => up$16
|
|
1160
1160
|
});
|
|
1161
|
-
async function up$
|
|
1161
|
+
async function up$16(db) {
|
|
1162
1162
|
await db.schema.createTable("_emdash_comments").addColumn("id", "text", (col) => col.primaryKey()).addColumn("collection", "text", (col) => col.notNull()).addColumn("content_id", "text", (col) => col.notNull()).addColumn("parent_id", "text", (col) => col.references("_emdash_comments.id").onDelete("cascade")).addColumn("author_name", "text", (col) => col.notNull()).addColumn("author_email", "text", (col) => col.notNull()).addColumn("author_url", "text").addColumn("author_user_id", "text", (col) => col.references("users.id").onDelete("set null")).addColumn("body", "text", (col) => col.notNull()).addColumn("status", "text", (col) => col.notNull().defaultTo("pending")).addColumn("ip_hash", "text").addColumn("user_agent", "text").addColumn("moderation_metadata", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1163
1163
|
await db.schema.createIndex("idx_comments_content").on("_emdash_comments").columns([
|
|
1164
1164
|
"collection",
|
|
@@ -1174,30 +1174,30 @@ async function up$15(db) {
|
|
|
1174
1174
|
await db.schema.alterTable("_emdash_collections").addColumn("comments_closed_after_days", "integer", (col) => col.defaultTo(90)).execute();
|
|
1175
1175
|
await db.schema.alterTable("_emdash_collections").addColumn("comments_auto_approve_users", "integer", (col) => col.defaultTo(1)).execute();
|
|
1176
1176
|
}
|
|
1177
|
-
async function down$
|
|
1177
|
+
async function down$16(db) {
|
|
1178
1178
|
await db.schema.dropTable("_emdash_comments").execute();
|
|
1179
1179
|
}
|
|
1180
1180
|
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
//#region src/database/migrations/028_drop_author_url.ts
|
|
1183
1183
|
var _028_drop_author_url_exports = /* @__PURE__ */ __exportAll({
|
|
1184
|
-
down: () => down$
|
|
1185
|
-
up: () => up$
|
|
1184
|
+
down: () => down$15,
|
|
1185
|
+
up: () => up$15
|
|
1186
1186
|
});
|
|
1187
|
-
async function up$
|
|
1187
|
+
async function up$15(db) {
|
|
1188
1188
|
await sql`ALTER TABLE _emdash_comments DROP COLUMN author_url`.execute(db);
|
|
1189
1189
|
}
|
|
1190
|
-
async function down$
|
|
1190
|
+
async function down$15(db) {
|
|
1191
1191
|
await db.schema.alterTable("_emdash_comments").addColumn("author_url", "text").execute();
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
//#endregion
|
|
1195
1195
|
//#region src/database/migrations/029_redirects.ts
|
|
1196
1196
|
var _029_redirects_exports = /* @__PURE__ */ __exportAll({
|
|
1197
|
-
down: () => down$
|
|
1198
|
-
up: () => up$
|
|
1197
|
+
down: () => down$14,
|
|
1198
|
+
up: () => up$14
|
|
1199
1199
|
});
|
|
1200
|
-
async function up$
|
|
1200
|
+
async function up$14(db) {
|
|
1201
1201
|
await db.schema.createTable("_emdash_redirects").addColumn("id", "text", (col) => col.primaryKey()).addColumn("source", "text", (col) => col.notNull()).addColumn("destination", "text", (col) => col.notNull()).addColumn("type", "integer", (col) => col.notNull().defaultTo(301)).addColumn("is_pattern", "integer", (col) => col.notNull().defaultTo(0)).addColumn("enabled", "integer", (col) => col.notNull().defaultTo(1)).addColumn("hits", "integer", (col) => col.notNull().defaultTo(0)).addColumn("last_hit_at", "text").addColumn("group_name", "text").addColumn("auto", "integer", (col) => col.notNull().defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1202
1202
|
await db.schema.createIndex("idx_redirects_source").on("_emdash_redirects").column("source").execute();
|
|
1203
1203
|
await db.schema.createIndex("idx_redirects_enabled").on("_emdash_redirects").column("enabled").execute();
|
|
@@ -1206,7 +1206,7 @@ async function up$13(db) {
|
|
|
1206
1206
|
await db.schema.createIndex("idx_404_log_path").on("_emdash_404_log").column("path").execute();
|
|
1207
1207
|
await db.schema.createIndex("idx_404_log_created").on("_emdash_404_log").column("created_at").execute();
|
|
1208
1208
|
}
|
|
1209
|
-
async function down$
|
|
1209
|
+
async function down$14(db) {
|
|
1210
1210
|
await db.schema.dropTable("_emdash_404_log").execute();
|
|
1211
1211
|
await db.schema.dropTable("_emdash_redirects").execute();
|
|
1212
1212
|
}
|
|
@@ -1214,8 +1214,8 @@ async function down$13(db) {
|
|
|
1214
1214
|
//#endregion
|
|
1215
1215
|
//#region src/database/migrations/030_widen_scheduled_index.ts
|
|
1216
1216
|
var _030_widen_scheduled_index_exports = /* @__PURE__ */ __exportAll({
|
|
1217
|
-
down: () => down$
|
|
1218
|
-
up: () => up$
|
|
1217
|
+
down: () => down$13,
|
|
1218
|
+
up: () => up$13
|
|
1219
1219
|
});
|
|
1220
1220
|
/**
|
|
1221
1221
|
* Migration: Widen scheduled publishing index
|
|
@@ -1224,7 +1224,7 @@ var _030_widen_scheduled_index_exports = /* @__PURE__ */ __exportAll({
|
|
|
1224
1224
|
* Published posts can now have scheduled draft changes, so widen the
|
|
1225
1225
|
* index to cover all rows where scheduled_at IS NOT NULL.
|
|
1226
1226
|
*/
|
|
1227
|
-
async function up$
|
|
1227
|
+
async function up$13(db) {
|
|
1228
1228
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1229
1229
|
for (const tableName of tableNames) {
|
|
1230
1230
|
const table = { name: tableName };
|
|
@@ -1238,7 +1238,7 @@ async function up$12(db) {
|
|
|
1238
1238
|
`.execute(db);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
|
-
async function down$
|
|
1241
|
+
async function down$13(db) {
|
|
1242
1242
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1243
1243
|
for (const tableName of tableNames) {
|
|
1244
1244
|
const table = { name: tableName };
|
|
@@ -1256,10 +1256,10 @@ async function down$12(db) {
|
|
|
1256
1256
|
//#endregion
|
|
1257
1257
|
//#region src/database/migrations/031_bylines.ts
|
|
1258
1258
|
var _031_bylines_exports = /* @__PURE__ */ __exportAll({
|
|
1259
|
-
down: () => down$
|
|
1260
|
-
up: () => up$
|
|
1259
|
+
down: () => down$12,
|
|
1260
|
+
up: () => up$12
|
|
1261
1261
|
});
|
|
1262
|
-
async function up$
|
|
1262
|
+
async function up$12(db) {
|
|
1263
1263
|
await db.schema.createTable("_emdash_bylines").addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("display_name", "text", (col) => col.notNull()).addColumn("bio", "text").addColumn("avatar_media_id", "text", (col) => col.references("media.id").onDelete("set null")).addColumn("website_url", "text").addColumn("user_id", "text", (col) => col.references("users.id").onDelete("set null")).addColumn("is_guest", "integer", (col) => col.notNull().defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
1264
1264
|
await sql`
|
|
1265
1265
|
CREATE UNIQUE INDEX ${sql.ref("idx_bylines_user_id_unique")}
|
|
@@ -1291,7 +1291,7 @@ async function up$11(db) {
|
|
|
1291
1291
|
`.execute(db);
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
async function down$
|
|
1294
|
+
async function down$12(db) {
|
|
1295
1295
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1296
1296
|
for (const tableName of tableNames) {
|
|
1297
1297
|
await sql`
|
|
@@ -1309,8 +1309,8 @@ async function down$11(db) {
|
|
|
1309
1309
|
//#endregion
|
|
1310
1310
|
//#region src/database/migrations/032_rate_limits.ts
|
|
1311
1311
|
var _032_rate_limits_exports = /* @__PURE__ */ __exportAll({
|
|
1312
|
-
down: () => down$
|
|
1313
|
-
up: () => up$
|
|
1312
|
+
down: () => down$11,
|
|
1313
|
+
up: () => up$11
|
|
1314
1314
|
});
|
|
1315
1315
|
/**
|
|
1316
1316
|
* Migration: Rate limits table + device code polling tracking.
|
|
@@ -1321,12 +1321,12 @@ var _032_rate_limits_exports = /* @__PURE__ */ __exportAll({
|
|
|
1321
1321
|
* 2. Add last_polled_at column to _emdash_device_codes for
|
|
1322
1322
|
* RFC 8628 slow_down enforcement.
|
|
1323
1323
|
*/
|
|
1324
|
-
async function up$
|
|
1324
|
+
async function up$11(db) {
|
|
1325
1325
|
await db.schema.createTable("_emdash_rate_limits").addColumn("key", "text", (col) => col.notNull()).addColumn("window", "text", (col) => col.notNull()).addColumn("count", "integer", (col) => col.notNull().defaultTo(1)).addPrimaryKeyConstraint("pk_rate_limits", ["key", "window"]).execute();
|
|
1326
1326
|
await db.schema.createIndex("idx_rate_limits_window").on("_emdash_rate_limits").column("window").execute();
|
|
1327
1327
|
await db.schema.alterTable("_emdash_device_codes").addColumn("last_polled_at", "text").execute();
|
|
1328
1328
|
}
|
|
1329
|
-
async function down$
|
|
1329
|
+
async function down$11(db) {
|
|
1330
1330
|
await db.schema.dropTable("_emdash_rate_limits").execute();
|
|
1331
1331
|
await db.schema.alterTable("_emdash_device_codes").dropColumn("last_polled_at").execute();
|
|
1332
1332
|
}
|
|
@@ -1334,8 +1334,8 @@ async function down$10(db) {
|
|
|
1334
1334
|
//#endregion
|
|
1335
1335
|
//#region src/database/migrations/033_optimize_content_indexes.ts
|
|
1336
1336
|
var _033_optimize_content_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
1337
|
-
down: () => down$
|
|
1338
|
-
up: () => up$
|
|
1337
|
+
down: () => down$10,
|
|
1338
|
+
up: () => up$10
|
|
1339
1339
|
});
|
|
1340
1340
|
/**
|
|
1341
1341
|
* Migration: Optimize content table indexes for D1 performance
|
|
@@ -1348,7 +1348,7 @@ var _033_optimize_content_indexes_exports = /* @__PURE__ */ __exportAll({
|
|
|
1348
1348
|
*
|
|
1349
1349
|
* Impact: Reduces D1 row reads by 90%+ for admin panel operations.
|
|
1350
1350
|
*/
|
|
1351
|
-
async function up$
|
|
1351
|
+
async function up$10(db) {
|
|
1352
1352
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1353
1353
|
for (const tableName of tableNames) {
|
|
1354
1354
|
const table = { name: tableName };
|
|
@@ -1390,7 +1390,7 @@ async function up$9(db) {
|
|
|
1390
1390
|
WHERE status = 'trash'
|
|
1391
1391
|
`.execute(db);
|
|
1392
1392
|
}
|
|
1393
|
-
async function down$
|
|
1393
|
+
async function down$10(db) {
|
|
1394
1394
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1395
1395
|
for (const tableName of tableNames) {
|
|
1396
1396
|
const table = { name: tableName };
|
|
@@ -1423,10 +1423,10 @@ async function down$9(db) {
|
|
|
1423
1423
|
//#endregion
|
|
1424
1424
|
//#region src/database/migrations/034_published_at_index.ts
|
|
1425
1425
|
var _034_published_at_index_exports = /* @__PURE__ */ __exportAll({
|
|
1426
|
-
down: () => down$
|
|
1427
|
-
up: () => up$
|
|
1426
|
+
down: () => down$9,
|
|
1427
|
+
up: () => up$9
|
|
1428
1428
|
});
|
|
1429
|
-
async function up$
|
|
1429
|
+
async function up$9(db) {
|
|
1430
1430
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1431
1431
|
for (const tableName of tableNames) {
|
|
1432
1432
|
const table = { name: tableName };
|
|
@@ -1436,7 +1436,7 @@ async function up$8(db) {
|
|
|
1436
1436
|
`.execute(db);
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
async function down$
|
|
1439
|
+
async function down$9(db) {
|
|
1440
1440
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
1441
1441
|
for (const tableName of tableNames) {
|
|
1442
1442
|
const table = { name: tableName };
|
|
@@ -1447,8 +1447,8 @@ async function down$8(db) {
|
|
|
1447
1447
|
//#endregion
|
|
1448
1448
|
//#region src/database/migrations/035_bounded_404_log.ts
|
|
1449
1449
|
var _035_bounded_404_log_exports = /* @__PURE__ */ __exportAll({
|
|
1450
|
-
down: () => down$
|
|
1451
|
-
up: () => up$
|
|
1450
|
+
down: () => down$8,
|
|
1451
|
+
up: () => up$8
|
|
1452
1452
|
});
|
|
1453
1453
|
/**
|
|
1454
1454
|
* Migration: Bounded 404 logging
|
|
@@ -1466,7 +1466,7 @@ var _035_bounded_404_log_exports = /* @__PURE__ */ __exportAll({
|
|
|
1466
1466
|
* path and summing hits
|
|
1467
1467
|
* - Adds a UNIQUE index on `path` so upsert semantics work
|
|
1468
1468
|
*/
|
|
1469
|
-
async function up$
|
|
1469
|
+
async function up$8(db) {
|
|
1470
1470
|
const hitsExists = await columnExists(db, "_emdash_404_log", "hits");
|
|
1471
1471
|
if (!hitsExists) await db.schema.alterTable("_emdash_404_log").addColumn("hits", "integer", (col) => col.notNull().defaultTo(1)).execute();
|
|
1472
1472
|
if (!await columnExists(db, "_emdash_404_log", "last_seen_at")) await db.schema.alterTable("_emdash_404_log").addColumn("last_seen_at", "text").execute();
|
|
@@ -1515,7 +1515,7 @@ async function up$7(db) {
|
|
|
1515
1515
|
await db.schema.dropIndex("idx_404_log_path").ifExists().execute();
|
|
1516
1516
|
await db.schema.createIndex("idx_404_log_last_seen").ifNotExists().on("_emdash_404_log").column("last_seen_at").execute();
|
|
1517
1517
|
}
|
|
1518
|
-
async function down$
|
|
1518
|
+
async function down$8(db) {
|
|
1519
1519
|
await db.schema.dropIndex("idx_404_log_last_seen").ifExists().execute();
|
|
1520
1520
|
await db.schema.dropIndex("idx_404_log_path_unique").ifExists().execute();
|
|
1521
1521
|
await db.schema.createIndex("idx_404_log_path").ifNotExists().on("_emdash_404_log").column("path").execute();
|
|
@@ -1526,8 +1526,8 @@ async function down$7(db) {
|
|
|
1526
1526
|
//#endregion
|
|
1527
1527
|
//#region src/database/migrations/036_i18n_menus_and_taxonomies.ts
|
|
1528
1528
|
var _036_i18n_menus_and_taxonomies_exports = /* @__PURE__ */ __exportAll({
|
|
1529
|
-
down: () => down$
|
|
1530
|
-
up: () => up$
|
|
1529
|
+
down: () => down$7,
|
|
1530
|
+
up: () => up$7
|
|
1531
1531
|
});
|
|
1532
1532
|
/**
|
|
1533
1533
|
* i18n for menus + taxonomies. Adds `locale` + `translation_group` to system
|
|
@@ -1538,7 +1538,7 @@ var _036_i18n_menus_and_taxonomies_exports = /* @__PURE__ */ __exportAll({
|
|
|
1538
1538
|
function getDefaultLocale$1() {
|
|
1539
1539
|
return getI18nConfig()?.defaultLocale ?? "en";
|
|
1540
1540
|
}
|
|
1541
|
-
async function up$
|
|
1541
|
+
async function up$7(db) {
|
|
1542
1542
|
const defaultLocale = getDefaultLocale$1();
|
|
1543
1543
|
if (isSqlite(db)) {
|
|
1544
1544
|
await rebuildContentTaxonomies(db);
|
|
@@ -1751,7 +1751,7 @@ async function assertSingleLocale$1(db, defaultLocale) {
|
|
|
1751
1751
|
if (count > 0) throw new Error(`Cannot revert migration 036_i18n_menus_and_taxonomies: ${count} row(s) in "${table}" use a non-default locale (defaultLocale="${defaultLocale}"). Reverting would drop them silently. Export translations first (or delete them) and re-run the rollback. See packages/core/src/database/migrations/036_i18n_menus_and_taxonomies.ts.`);
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
|
-
async function down$
|
|
1754
|
+
async function down$7(db) {
|
|
1755
1755
|
const defaultLocale = getDefaultLocale$1();
|
|
1756
1756
|
await assertSingleLocale$1(db, defaultLocale);
|
|
1757
1757
|
await assertContentTaxonomiesResolve(db, defaultLocale);
|
|
@@ -1848,21 +1848,21 @@ async function rebuildTaxonomyDefsDown(db) {
|
|
|
1848
1848
|
//#endregion
|
|
1849
1849
|
//#region src/database/migrations/037_credential_algorithm.ts
|
|
1850
1850
|
var _037_credential_algorithm_exports = /* @__PURE__ */ __exportAll({
|
|
1851
|
-
down: () => down$
|
|
1852
|
-
up: () => up$
|
|
1851
|
+
down: () => down$6,
|
|
1852
|
+
up: () => up$6
|
|
1853
1853
|
});
|
|
1854
|
-
async function up$
|
|
1854
|
+
async function up$6(db) {
|
|
1855
1855
|
if (!await columnExists(db, "credentials", "algorithm")) await db.schema.alterTable("credentials").addColumn("algorithm", "integer", (col) => col.notNull().defaultTo(-7)).execute();
|
|
1856
1856
|
}
|
|
1857
|
-
async function down$
|
|
1857
|
+
async function down$6(db) {
|
|
1858
1858
|
if (await columnExists(db, "credentials", "algorithm")) await db.schema.alterTable("credentials").dropColumn("algorithm").execute();
|
|
1859
1859
|
}
|
|
1860
1860
|
|
|
1861
1861
|
//#endregion
|
|
1862
1862
|
//#region src/database/migrations/038_registry_plugin_state.ts
|
|
1863
1863
|
var _038_registry_plugin_state_exports = /* @__PURE__ */ __exportAll({
|
|
1864
|
-
down: () => down$
|
|
1865
|
-
up: () => up$
|
|
1864
|
+
down: () => down$5,
|
|
1865
|
+
up: () => up$5
|
|
1866
1866
|
});
|
|
1867
1867
|
/**
|
|
1868
1868
|
* Migration: Add registry fields to _plugin_state
|
|
@@ -1890,7 +1890,7 @@ var _038_registry_plugin_state_exports = /* @__PURE__ */ __exportAll({
|
|
|
1890
1890
|
* checks before adding to keep the migration safe under partial
|
|
1891
1891
|
* re-application. The same pattern is used in 019_i18n.ts.
|
|
1892
1892
|
*/
|
|
1893
|
-
async function up$
|
|
1893
|
+
async function up$5(db) {
|
|
1894
1894
|
if (isSqlite(db)) await upSqlite(db);
|
|
1895
1895
|
else await upPostgres(db);
|
|
1896
1896
|
}
|
|
@@ -1933,7 +1933,7 @@ async function upPostgres(db) {
|
|
|
1933
1933
|
WHERE source = 'registry'
|
|
1934
1934
|
`.execute(db);
|
|
1935
1935
|
}
|
|
1936
|
-
async function down$
|
|
1936
|
+
async function down$5(db) {
|
|
1937
1937
|
await sql`
|
|
1938
1938
|
DROP INDEX IF EXISTS idx_plugin_state_registry
|
|
1939
1939
|
`.execute(db);
|
|
@@ -1950,10 +1950,10 @@ async function down$4(db) {
|
|
|
1950
1950
|
//#endregion
|
|
1951
1951
|
//#region src/database/migrations/039_fix_fts5_triggers.ts
|
|
1952
1952
|
var _039_fix_fts5_triggers_exports = /* @__PURE__ */ __exportAll({
|
|
1953
|
-
down: () => down$
|
|
1954
|
-
up: () => up$
|
|
1953
|
+
down: () => down$4,
|
|
1954
|
+
up: () => up$4
|
|
1955
1955
|
});
|
|
1956
|
-
async function up$
|
|
1956
|
+
async function up$4(db) {
|
|
1957
1957
|
if (!isSqlite(db)) return;
|
|
1958
1958
|
const collections = await sql`
|
|
1959
1959
|
SELECT slug, search_config FROM _emdash_collections
|
|
@@ -1987,7 +1987,7 @@ async function up$3(db) {
|
|
|
1987
1987
|
* at runtime, not by this migration, so leaving them in their
|
|
1988
1988
|
* corruption-safe state on rollback is correct.
|
|
1989
1989
|
*/
|
|
1990
|
-
async function down$
|
|
1990
|
+
async function down$4(_db) {}
|
|
1991
1991
|
function isSearchEnabled(searchConfig) {
|
|
1992
1992
|
if (!searchConfig) return false;
|
|
1993
1993
|
try {
|
|
@@ -2079,8 +2079,8 @@ async function dropFtsObjects(db, collectionSlug) {
|
|
|
2079
2079
|
//#endregion
|
|
2080
2080
|
//#region src/database/migrations/040_byline_i18n.ts
|
|
2081
2081
|
var _040_byline_i18n_exports = /* @__PURE__ */ __exportAll({
|
|
2082
|
-
down: () => down$
|
|
2083
|
-
up: () => up$
|
|
2082
|
+
down: () => down$3,
|
|
2083
|
+
up: () => up$3
|
|
2084
2084
|
});
|
|
2085
2085
|
/**
|
|
2086
2086
|
* i18n for bylines. Adds `locale` + `translation_group` to `_emdash_bylines`
|
|
@@ -2108,7 +2108,7 @@ var _040_byline_i18n_exports = /* @__PURE__ */ __exportAll({
|
|
|
2108
2108
|
function getDefaultLocale() {
|
|
2109
2109
|
return getI18nConfig()?.defaultLocale ?? "en";
|
|
2110
2110
|
}
|
|
2111
|
-
async function up$
|
|
2111
|
+
async function up$3(db) {
|
|
2112
2112
|
const defaultLocale = getDefaultLocale();
|
|
2113
2113
|
if (isSqlite(db)) {
|
|
2114
2114
|
await rebuildContentBylines(db);
|
|
@@ -2265,7 +2265,7 @@ async function assertSingleLocale(db, defaultLocale) {
|
|
|
2265
2265
|
const count = Number(result.rows[0]?.count ?? 0);
|
|
2266
2266
|
if (count > 0) throw new Error(`Cannot revert migration 040_byline_i18n: ${count} row(s) in "_emdash_bylines" use a non-default locale (defaultLocale="${defaultLocale}"). Reverting would drop them silently. Export translations first (or delete them) and re-run the rollback. See packages/core/src/database/migrations/040_byline_i18n.ts.`);
|
|
2267
2267
|
}
|
|
2268
|
-
async function down$
|
|
2268
|
+
async function down$3(db) {
|
|
2269
2269
|
const defaultLocale = getDefaultLocale();
|
|
2270
2270
|
await assertSingleLocale(db, defaultLocale);
|
|
2271
2271
|
await assertContentBylinesResolve(db, defaultLocale);
|
|
@@ -2384,8 +2384,8 @@ async function restoreContentBylinesFk(db) {
|
|
|
2384
2384
|
//#endregion
|
|
2385
2385
|
//#region src/database/migrations/041_content_locale_list_index.ts
|
|
2386
2386
|
var _041_content_locale_list_index_exports = /* @__PURE__ */ __exportAll({
|
|
2387
|
-
down: () => down$
|
|
2388
|
-
up: () => up$
|
|
2387
|
+
down: () => down$2,
|
|
2388
|
+
up: () => up$2
|
|
2389
2389
|
});
|
|
2390
2390
|
/**
|
|
2391
2391
|
* Migration: locale-aware composite indexes for content list queries.
|
|
@@ -2405,7 +2405,7 @@ var _041_content_locale_list_index_exports = /* @__PURE__ */ __exportAll({
|
|
|
2405
2405
|
* slugs as short as 40 chars, making both names truncate to the same string.
|
|
2406
2406
|
* Keep these identical to the names in `schema/registry.ts`.
|
|
2407
2407
|
*/
|
|
2408
|
-
async function up$
|
|
2408
|
+
async function up$2(db) {
|
|
2409
2409
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
2410
2410
|
for (const tableName of tableNames) {
|
|
2411
2411
|
await sql`
|
|
@@ -2418,7 +2418,7 @@ async function up$1(db) {
|
|
|
2418
2418
|
`.execute(db);
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
|
-
async function down$
|
|
2421
|
+
async function down$2(db) {
|
|
2422
2422
|
const tableNames = await listTablesLike(db, "ec_%");
|
|
2423
2423
|
for (const tableName of tableNames) {
|
|
2424
2424
|
await sql`DROP INDEX IF EXISTS ${sql.ref(`idx_${tableName}_loc_upd`)}`.execute(db);
|
|
@@ -2429,8 +2429,8 @@ async function down$1(db) {
|
|
|
2429
2429
|
//#endregion
|
|
2430
2430
|
//#region src/database/migrations/042_byline_fields.ts
|
|
2431
2431
|
var _042_byline_fields_exports = /* @__PURE__ */ __exportAll({
|
|
2432
|
-
down: () => down,
|
|
2433
|
-
up: () => up
|
|
2432
|
+
down: () => down$1,
|
|
2433
|
+
up: () => up$1
|
|
2434
2434
|
});
|
|
2435
2435
|
/**
|
|
2436
2436
|
* Byline custom fields (Discussion #1174). Adds three tables and a
|
|
@@ -2475,7 +2475,7 @@ var _042_byline_fields_exports = /* @__PURE__ */ __exportAll({
|
|
|
2475
2475
|
* reference it. If `down()` runs after a partial `up()`, missing tables
|
|
2476
2476
|
* are tolerated (`DROP TABLE IF EXISTS`).
|
|
2477
2477
|
*/
|
|
2478
|
-
async function up(db) {
|
|
2478
|
+
async function up$1(db) {
|
|
2479
2479
|
await db.schema.createTable("_emdash_byline_fields").ifNotExists().addColumn("id", "text", (col) => col.primaryKey()).addColumn("slug", "text", (col) => col.notNull().unique()).addColumn("label", "text", (col) => col.notNull()).addColumn("type", "text", (col) => col.notNull()).addColumn("required", "integer", (col) => col.notNull().defaultTo(0)).addColumn("translatable", "integer", (col) => col.notNull().defaultTo(1)).addColumn("validation", "text").addColumn("sort_order", "integer", (col) => col.notNull().defaultTo(0)).addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).execute();
|
|
2480
2480
|
await db.schema.createIndex("idx__emdash_byline_fields_sort_order").ifNotExists().on("_emdash_byline_fields").column("sort_order").execute();
|
|
2481
2481
|
await db.schema.createTable("_emdash_byline_field_values").ifNotExists().addColumn("byline_id", "text", (col) => col.notNull().references("_emdash_bylines.id").onDelete("cascade")).addColumn("field_id", "text", (col) => col.notNull().references("_emdash_byline_fields.id").onDelete("cascade")).addColumn("value", "text").addColumn("created_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (col) => col.defaultTo(currentTimestamp(db))).addPrimaryKeyConstraint("_emdash_byline_field_values_pk", ["byline_id", "field_id"]).execute();
|
|
@@ -2498,13 +2498,63 @@ async function up(db) {
|
|
|
2498
2498
|
* `up()` (only one or two tables landed) still settles the database back
|
|
2499
2499
|
* to its pre-042 state.
|
|
2500
2500
|
*/
|
|
2501
|
-
async function down(db) {
|
|
2501
|
+
async function down$1(db) {
|
|
2502
2502
|
await db.schema.dropTable("_emdash_byline_field_group_values").ifExists().execute();
|
|
2503
2503
|
await db.schema.dropTable("_emdash_byline_field_values").ifExists().execute();
|
|
2504
2504
|
await db.schema.dropTable("_emdash_byline_fields").ifExists().execute();
|
|
2505
2505
|
await sql`DELETE FROM options WHERE name = 'byline_fields_version'`.execute(db);
|
|
2506
2506
|
}
|
|
2507
2507
|
|
|
2508
|
+
//#endregion
|
|
2509
|
+
//#region src/database/migrations/043_content_references.ts
|
|
2510
|
+
var _043_content_references_exports = /* @__PURE__ */ __exportAll({
|
|
2511
|
+
down: () => down,
|
|
2512
|
+
up: () => up
|
|
2513
|
+
});
|
|
2514
|
+
/**
|
|
2515
|
+
* Content references.
|
|
2516
|
+
*
|
|
2517
|
+
* `_emdash_relations` defines relationship types (row-per-locale, mirroring
|
|
2518
|
+
* `_emdash_taxonomy_defs`): which collection is the parent, which is the child
|
|
2519
|
+
* (the side that may multiply), and localized labels for each role.
|
|
2520
|
+
*
|
|
2521
|
+
* `_emdash_content_references` holds directed `parent → child` edges between
|
|
2522
|
+
* content entries. Both endpoints and the relation are referenced by
|
|
2523
|
+
* `translation_group`, so edges are locale-agnostic. As with
|
|
2524
|
+
* `content_taxonomies`, group-linking precludes SQL foreign keys; referential
|
|
2525
|
+
* cleanup is an application-layer concern.
|
|
2526
|
+
*
|
|
2527
|
+
* Idempotency: every `CREATE TABLE` and `CREATE INDEX` uses `.ifNotExists()`,
|
|
2528
|
+
* so a partial prior run (a crash mid-migration, or a retry after the runner's
|
|
2529
|
+
* race-recovery path) re-applies cleanly — including any indexes that landed in
|
|
2530
|
+
* the failed pass after their table.
|
|
2531
|
+
*/
|
|
2532
|
+
async function up(db) {
|
|
2533
|
+
const defaultLocale = getI18nConfig()?.defaultLocale ?? "en";
|
|
2534
|
+
await db.schema.createTable("_emdash_relations").ifNotExists().addColumn("id", "text", (c) => c.primaryKey()).addColumn("name", "text", (c) => c.notNull()).addColumn("parent_collection", "text", (c) => c.notNull()).addColumn("child_collection", "text", (c) => c.notNull()).addColumn("parent_label", "text", (c) => c.notNull()).addColumn("child_label", "text", (c) => c.notNull()).addColumn("locale", "text", (c) => c.notNull().defaultTo(defaultLocale)).addColumn("translation_group", "text", (c) => c.notNull()).addColumn("created_at", "text", (c) => c.defaultTo(currentTimestamp(db))).addColumn("updated_at", "text", (c) => c.defaultTo(currentTimestamp(db))).addUniqueConstraint("_emdash_relations_name_locale_unique", ["name", "locale"]).execute();
|
|
2535
|
+
await db.schema.createIndex("idx__emdash_relations_locale").ifNotExists().on("_emdash_relations").column("locale").execute();
|
|
2536
|
+
await db.schema.createIndex("idx__emdash_relations_translation_group").ifNotExists().on("_emdash_relations").column("translation_group").execute();
|
|
2537
|
+
await db.schema.createIndex("idx__emdash_relations_parent_collection").ifNotExists().on("_emdash_relations").column("parent_collection").execute();
|
|
2538
|
+
await db.schema.createIndex("idx__emdash_relations_child_collection").ifNotExists().on("_emdash_relations").column("child_collection").execute();
|
|
2539
|
+
await db.schema.createIndex("idx__emdash_relations_group_locale_unique").ifNotExists().unique().on("_emdash_relations").columns(["translation_group", "locale"]).execute();
|
|
2540
|
+
await db.schema.createTable("_emdash_content_references").ifNotExists().addColumn("id", "text", (c) => c.primaryKey()).addColumn("relation_group", "text", (c) => c.notNull()).addColumn("parent_group", "text", (c) => c.notNull()).addColumn("child_group", "text", (c) => c.notNull()).addColumn("sort_order", "integer", (c) => c.notNull().defaultTo(0)).addColumn("created_at", "text", (c) => c.defaultTo(currentTimestamp(db))).addUniqueConstraint("content_references_unique", [
|
|
2541
|
+
"relation_group",
|
|
2542
|
+
"parent_group",
|
|
2543
|
+
"child_group"
|
|
2544
|
+
]).execute();
|
|
2545
|
+
await db.schema.createIndex("idx__emdash_content_references_parent").ifNotExists().on("_emdash_content_references").columns([
|
|
2546
|
+
"parent_group",
|
|
2547
|
+
"relation_group",
|
|
2548
|
+
"sort_order"
|
|
2549
|
+
]).execute();
|
|
2550
|
+
await db.schema.createIndex("idx__emdash_content_references_child").ifNotExists().on("_emdash_content_references").columns(["child_group", "relation_group"]).execute();
|
|
2551
|
+
await db.schema.createIndex("idx__emdash_content_references_relation").ifNotExists().on("_emdash_content_references").column("relation_group").execute();
|
|
2552
|
+
}
|
|
2553
|
+
async function down(db) {
|
|
2554
|
+
await db.schema.dropTable("_emdash_content_references").ifExists().execute();
|
|
2555
|
+
await db.schema.dropTable("_emdash_relations").ifExists().execute();
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2508
2558
|
//#endregion
|
|
2509
2559
|
//#region src/database/migrations/runner.ts
|
|
2510
2560
|
const MIGRATIONS = Object.freeze({
|
|
@@ -2548,7 +2598,8 @@ const MIGRATIONS = Object.freeze({
|
|
|
2548
2598
|
"039_fix_fts5_triggers": _039_fix_fts5_triggers_exports,
|
|
2549
2599
|
"040_byline_i18n": _040_byline_i18n_exports,
|
|
2550
2600
|
"041_content_locale_list_index": _041_content_locale_list_index_exports,
|
|
2551
|
-
"042_byline_fields": _042_byline_fields_exports
|
|
2601
|
+
"042_byline_fields": _042_byline_fields_exports,
|
|
2602
|
+
"043_content_references": _043_content_references_exports
|
|
2552
2603
|
});
|
|
2553
2604
|
/** Total number of registered migrations. Exported for use in tests. */
|
|
2554
2605
|
const MIGRATION_COUNT = Object.keys(MIGRATIONS).length;
|
|
@@ -2746,4 +2797,4 @@ async function rollbackMigration(db, options) {
|
|
|
2746
2797
|
|
|
2747
2798
|
//#endregion
|
|
2748
2799
|
export { __exportAll as a, runMigrations as i, getMigrationStatus as n, rollbackMigration as r, MIGRATION_RACE_WAIT_MS as t };
|
|
2749
|
-
//# sourceMappingURL=runner
|
|
2800
|
+
//# sourceMappingURL=runner--4wMWwKM.mjs.map
|