emdash 1.2.0 → 1.3.1
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/action-token-B1ds4laA.mjs +26 -0
- package/dist/action-token-B1ds4laA.mjs.map +1 -0
- package/dist/activation-sGF9br3X.mjs +387 -0
- package/dist/activation-sGF9br3X.mjs.map +1 -0
- package/dist/adapters-BOMSX9PU.d.mts +173 -0
- package/dist/adapters-BOMSX9PU.d.mts.map +1 -0
- package/dist/allowed-origins-CovsTkm3.mjs +116 -0
- package/dist/allowed-origins-CovsTkm3.mjs.map +1 -0
- package/dist/api/route-utils.d.mts +4 -4
- package/dist/api/route-utils.mjs +59 -55
- package/dist/api/route-utils.mjs.map +1 -1
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +11 -11
- package/dist/api-C_LxFnOm.mjs +5077 -0
- package/dist/api-C_LxFnOm.mjs.map +1 -0
- package/dist/api-tokens-DQ9Ee-vP.mjs +173 -0
- package/dist/api-tokens-DQ9Ee-vP.mjs.map +1 -0
- package/dist/apply-CLjfxvyH.mjs +1758 -0
- package/dist/apply-CLjfxvyH.mjs.map +1 -0
- package/dist/approvals-ocK89i4H.mjs +460 -0
- package/dist/approvals-ocK89i4H.mjs.map +1 -0
- package/dist/artifact-fetch-CgvvpoWQ.mjs +659 -0
- package/dist/artifact-fetch-CgvvpoWQ.mjs.map +1 -0
- package/dist/artifacts-DwOYYBQm.mjs +323 -0
- package/dist/artifacts-DwOYYBQm.mjs.map +1 -0
- package/dist/astro/image-endpoint.mjs +12 -2
- package/dist/astro/image-endpoint.mjs.map +1 -1
- package/dist/astro/index.d.mts +14 -14
- package/dist/astro/index.d.mts.map +1 -1
- package/dist/astro/index.mjs +122 -20
- package/dist/astro/index.mjs.map +1 -1
- package/dist/astro/middleware/auth.d.mts +12 -12
- package/dist/astro/middleware/auth.d.mts.map +1 -1
- package/dist/astro/middleware/auth.mjs +12 -11
- package/dist/astro/middleware/auth.mjs.map +1 -1
- package/dist/astro/middleware/media-usage-write-fence.mjs +5 -5
- package/dist/astro/middleware/redirect.d.mts.map +1 -1
- package/dist/astro/middleware/redirect.mjs +161 -61
- package/dist/astro/middleware/redirect.mjs.map +1 -1
- package/dist/astro/middleware/request-context.d.mts.map +1 -1
- package/dist/astro/middleware/request-context.mjs +58 -20
- package/dist/astro/middleware/request-context.mjs.map +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +12 -12
- package/dist/astro/middleware.d.mts.map +1 -1
- package/dist/astro/middleware.mjs +137 -419
- package/dist/astro/middleware.mjs.map +1 -1
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +16 -16
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +16 -16
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +7 -7
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +19 -19
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +19 -19
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +19 -19
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +29 -27
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +29 -27
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/admin/bylines/index.mjs +29 -27
- package/dist/astro/routes/api/admin/bylines/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +21 -21
- package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/bulk.mjs +20 -20
- package/dist/astro/routes/api/admin/comments/counts.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/index.mjs +20 -20
- package/dist/astro/routes/api/admin/core-update.mjs +7 -7
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +6 -6
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +5 -5
- package/dist/astro/routes/api/admin/media-usage/activation.mjs +22 -22
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/index.mjs +23 -23
- package/dist/astro/routes/api/admin/media-usage/collection-deletions/retry.mjs +23 -23
- package/dist/astro/routes/api/admin/media-usage/progress.mjs +27 -25
- package/dist/astro/routes/api/admin/media-usage/progress.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/repair.mjs +33 -31
- package/dist/astro/routes/api/admin/media-usage/repair.mjs.map +1 -1
- package/dist/astro/routes/api/admin/media-usage/work/index.mjs +23 -23
- package/dist/astro/routes/api/admin/media-usage/work/retry.mjs +23 -23
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +8 -8
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +81 -77
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/mcp.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs +80 -76
- package/dist/astro/routes/api/admin/plugins/_id_/settings.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +80 -77
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +91 -88
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/index.mjs +81 -77
- package/dist/astro/routes/api/admin/plugins/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +80 -76
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +90 -87
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +80 -76
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs +80 -77
- package/dist/astro/routes/api/admin/plugins/registry/_id_/uninstall.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs +92 -89
- package/dist/astro/routes/api/admin/plugins/registry/_id_/update.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs +10 -10
- package/dist/astro/routes/api/admin/plugins/registry/artifact.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs +82 -79
- package/dist/astro/routes/api/admin/plugins/registry/install.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/registry/publisher-handle.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs +81 -77
- package/dist/astro/routes/api/admin/plugins/registry/verify.mjs.map +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +80 -76
- package/dist/astro/routes/api/admin/plugins/updates.mjs.map +1 -1
- package/dist/astro/routes/api/admin/scheduled-policy-rejections/_collection_/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +80 -76
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +7 -7
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +80 -76
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/_...path_.mjs +4 -4
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs +45 -42
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/approve.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs +45 -42
- package/dist/astro/routes/api/admin/transfer/approvals/_id_/deny.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/approvals/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/capabilities.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/exports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs +48 -45
- package/dist/astro/routes/api/admin/transfer/exports/_id_/archive.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs +48 -45
- package/dist/astro/routes/api/admin/transfer/exports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/exports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs +48 -45
- package/dist/astro/routes/api/admin/transfer/exports/_id_/manifest.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs +49 -46
- package/dist/astro/routes/api/admin/transfer/exports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/imports/_id_/abandon.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/imports/_id_/advance.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs +49 -46
- package/dist/astro/routes/api/admin/transfer/imports/_id_/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/imports/_id_/cancel.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs +49 -46
- package/dist/astro/routes/api/admin/transfer/imports/_id_/execute.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/imports/_id_/files/_...path_.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/imports/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs +49 -46
- package/dist/astro/routes/api/admin/transfer/imports/_id_/missing.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/imports/_id_/plan.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs +47 -44
- package/dist/astro/routes/api/admin/transfer/imports/_id_/receipt.mjs.map +1 -1
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs +49 -46
- package/dist/astro/routes/api/admin/transfer/imports/index.mjs.map +1 -1
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +5 -5
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +4 -4
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +17 -17
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +6 -6
- package/dist/astro/routes/api/admin/users/index.mjs +16 -16
- package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -6
- package/dist/astro/routes/api/auth/handover.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/accept.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/complete.mjs +21 -21
- package/dist/astro/routes/api/auth/invite/index.mjs +18 -18
- package/dist/astro/routes/api/auth/invite/register-options.mjs +19 -19
- package/dist/astro/routes/api/auth/logout.mjs +5 -5
- package/dist/astro/routes/api/auth/magic-link/send.mjs +20 -20
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +17 -17
- package/dist/astro/routes/api/auth/me.mjs +17 -17
- package/dist/astro/routes/api/auth/mode.mjs +5 -5
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +8 -8
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +16 -16
- package/dist/astro/routes/api/auth/passkey/index.mjs +4 -4
- package/dist/astro/routes/api/auth/passkey/options.mjs +21 -21
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +19 -19
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +20 -20
- package/dist/astro/routes/api/auth/passkey/verify.mjs +21 -21
- package/dist/astro/routes/api/auth/signup/complete.mjs +21 -21
- package/dist/astro/routes/api/auth/signup/request.mjs +19 -19
- package/dist/astro/routes/api/auth/signup/verify.mjs +4 -4
- package/dist/astro/routes/api/calendar.mjs +17 -17
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +21 -21
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +21 -20
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +7 -10
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs +23 -20
- package/dist/astro/routes/api/content/_collection_/_id_/lock.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +7 -6
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/plugin-extensions/_pluginId_/_kind_/_extensionId_.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +36 -34
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +21 -20
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs +40 -38
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/children.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs +40 -38
- package/dist/astro/routes/api/content/_collection_/_id_/references/_relation_/parents.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +7 -6
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +22 -21
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +46 -33
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +9 -5
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +21 -20
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +30 -23
- package/dist/astro/routes/api/content/_collection_/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/authors.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/index.mjs +20 -23
- package/dist/astro/routes/api/content/_collection_/index.mjs.map +1 -1
- package/dist/astro/routes/api/content/_collection_/trash.mjs +17 -17
- package/dist/astro/routes/api/dashboard.d.mts.map +1 -1
- package/dist/astro/routes/api/dashboard.mjs +27 -15
- package/dist/astro/routes/api/dashboard.mjs.map +1 -1
- package/dist/astro/routes/api/dev/emails.mjs +5 -5
- package/dist/astro/routes/api/dev/scheduled-tasks.d.mts +12 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.d.mts.map +1 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs +142 -0
- package/dist/astro/routes/api/dev/scheduled-tasks.mjs.map +1 -0
- package/dist/astro/routes/api/health.mjs +6 -6
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +31 -27
- package/dist/astro/routes/api/import/probe.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -21
- package/dist/astro/routes/api/import/wordpress/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +15 -14
- package/dist/astro/routes/api/import/wordpress/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +36 -36
- package/dist/astro/routes/api/import/wordpress/execute.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/media.d.mts +12 -12
- package/dist/astro/routes/api/import/wordpress/media.mjs +21 -21
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +22 -20
- package/dist/astro/routes/api/import/wordpress/prepare.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +32 -30
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +32 -27
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +13 -13
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts.map +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +66 -43
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs.map +1 -1
- package/dist/astro/routes/api/manifest.mjs +6 -6
- package/dist/astro/routes/api/mcp.mjs +160 -109
- package/dist/astro/routes/api/mcp.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_/confirm.mjs +21 -21
- package/dist/astro/routes/api/media/_id_/replace.mjs +18 -18
- package/dist/astro/routes/api/media/_id_/upload.mjs +9 -9
- package/dist/astro/routes/api/media/_id_/usage.mjs +35 -33
- package/dist/astro/routes/api/media/_id_/usage.mjs.map +1 -1
- package/dist/astro/routes/api/media/_id_.mjs +33 -31
- package/dist/astro/routes/api/media/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/media/asset/_id_/_filename_.mjs +6 -6
- package/dist/astro/routes/api/media/file/_...key_.mjs +21 -13
- package/dist/astro/routes/api/media/file/_...key_.mjs.map +1 -1
- package/dist/astro/routes/api/media/folders/_id_.mjs +18 -18
- package/dist/astro/routes/api/media/folders/index.mjs +18 -18
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +5 -5
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +5 -5
- package/dist/astro/routes/api/media/providers/index.mjs +5 -5
- package/dist/astro/routes/api/media/upload-url.mjs +20 -20
- package/dist/astro/routes/api/media.mjs +37 -35
- package/dist/astro/routes/api/media.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +24 -22
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/items.mjs +23 -21
- package/dist/astro/routes/api/menus/_name_/items.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +23 -21
- package/dist/astro/routes/api/menus/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_/translations.mjs +23 -21
- package/dist/astro/routes/api/menus/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/menus/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/_name_.mjs +24 -22
- package/dist/astro/routes/api/menus/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/menus/index.d.mts.map +1 -1
- package/dist/astro/routes/api/menus/index.mjs +23 -21
- package/dist/astro/routes/api/menus/index.mjs.map +1 -1
- package/dist/astro/routes/api/oauth/authorize.mjs +6 -6
- package/dist/astro/routes/api/oauth/device/authorize.mjs +8 -8
- package/dist/astro/routes/api/oauth/device/code.mjs +11 -11
- package/dist/astro/routes/api/oauth/device/token.mjs +10 -10
- package/dist/astro/routes/api/oauth/register.mjs +7 -7
- package/dist/astro/routes/api/oauth/token/refresh.mjs +8 -8
- package/dist/astro/routes/api/oauth/token/revoke.mjs +8 -8
- package/dist/astro/routes/api/oauth/token.mjs +8 -8
- package/dist/astro/routes/api/openapi.json.mjs +22 -22
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +12 -12
- package/dist/astro/routes/api/redirects/404s/index.mjs +23 -22
- package/dist/astro/routes/api/redirects/404s/index.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/404s/summary.mjs +23 -22
- package/dist/astro/routes/api/redirects/404s/summary.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +36 -26
- package/dist/astro/routes/api/redirects/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/redirects/index.d.mts.map +1 -1
- package/dist/astro/routes/api/redirects/index.mjs +28 -24
- package/dist/astro/routes/api/redirects/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/_id_/index.mjs +40 -38
- package/dist/astro/routes/api/relations/_id_/index.mjs.map +1 -1
- package/dist/astro/routes/api/relations/index.mjs +40 -38
- package/dist/astro/routes/api/relations/index.mjs.map +1 -1
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +5 -5
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +19 -19
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs +80 -76
- package/dist/astro/routes/api/schema/block-types/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs +80 -76
- package/dist/astro/routes/api/schema/block-types/_slug_/versions/_version_/activate.mjs.map +1 -1
- package/dist/astro/routes/api/schema/block-types/index.mjs +80 -76
- package/dist/astro/routes/api/schema/block-types/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +80 -76
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +80 -76
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +80 -76
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +80 -76
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +80 -76
- package/dist/astro/routes/api/schema/collections/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/collections/reorder.mjs +80 -76
- package/dist/astro/routes/api/schema/collections/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/schema/index.mjs +20 -18
- package/dist/astro/routes/api/schema/index.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +80 -76
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +80 -76
- package/dist/astro/routes/api/schema/orphans/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/enable.mjs +23 -21
- package/dist/astro/routes/api/search/enable.mjs.map +1 -1
- package/dist/astro/routes/api/search/index.mjs +22 -20
- package/dist/astro/routes/api/search/index.mjs.map +1 -1
- package/dist/astro/routes/api/search/rebuild.mjs +23 -21
- package/dist/astro/routes/api/search/rebuild.mjs.map +1 -1
- package/dist/astro/routes/api/search/stats.mjs +12 -10
- package/dist/astro/routes/api/search/stats.mjs.map +1 -1
- package/dist/astro/routes/api/search/suggest.mjs +22 -20
- package/dist/astro/routes/api/search/suggest.mjs.map +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +22 -20
- package/dist/astro/routes/api/sections/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/sections/index.mjs +22 -20
- package/dist/astro/routes/api/sections/index.mjs.map +1 -1
- package/dist/astro/routes/api/settings/backups/archives/_name_.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/archives/index.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/export.mjs +7 -7
- package/dist/astro/routes/api/settings/backups/index.mjs +8 -8
- package/dist/astro/routes/api/settings/domain-notify.mjs +9 -9
- package/dist/astro/routes/api/settings/domain.d.mts.map +1 -1
- package/dist/astro/routes/api/settings/domain.mjs +23 -18
- package/dist/astro/routes/api/settings/domain.mjs.map +1 -1
- package/dist/astro/routes/api/settings/email.mjs +6 -6
- package/dist/astro/routes/api/settings.d.mts.map +1 -1
- package/dist/astro/routes/api/settings.mjs +30 -25
- package/dist/astro/routes/api/settings.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.d.mts.map +1 -1
- package/dist/astro/routes/api/setup/admin-verify.mjs +27 -23
- package/dist/astro/routes/api/setup/admin-verify.mjs.map +1 -1
- package/dist/astro/routes/api/setup/admin.mjs +20 -20
- package/dist/astro/routes/api/setup/dev-bypass.mjs +52 -48
- package/dist/astro/routes/api/setup/dev-bypass.mjs.map +1 -1
- package/dist/astro/routes/api/setup/dev-reset.mjs +4 -4
- package/dist/astro/routes/api/setup/index.mjs +58 -54
- package/dist/astro/routes/api/setup/index.mjs.map +1 -1
- package/dist/astro/routes/api/setup/status.mjs +6 -6
- package/dist/astro/routes/api/site/domain-proof.mjs +16 -12
- package/dist/astro/routes/api/site/domain-proof.mjs.map +1 -1
- package/dist/astro/routes/api/snapshot.mjs +8 -8
- package/dist/astro/routes/api/taxonomies/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs +31 -28
- package/dist/astro/routes/api/taxonomies/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +31 -28
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +32 -29
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +31 -28
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs +28 -26
- package/dist/astro/routes/api/taxonomies/_name_/translations.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/_name_.mjs +32 -29
- package/dist/astro/routes/api/taxonomies/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs +44 -42
- package/dist/astro/routes/api/taxonomies/bulk-tag.mjs.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.d.mts.map +1 -1
- package/dist/astro/routes/api/taxonomies/index.mjs +31 -28
- package/dist/astro/routes/api/taxonomies/index.mjs.map +1 -1
- package/dist/astro/routes/api/themes/preview.mjs +6 -6
- package/dist/astro/routes/api/typegen.mjs +6 -6
- package/dist/astro/routes/api/visual-editing/action-token.mjs +6 -6
- package/dist/astro/routes/api/visual-editing/content/_collection_/_id_/publish.mjs +21 -21
- package/dist/astro/routes/api/visual-editing/toolbar-labels.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +20 -19
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +26 -23
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +25 -22
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/_name_.mjs +14 -11
- package/dist/astro/routes/api/widget-areas/_name_.mjs.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.d.mts.map +1 -1
- package/dist/astro/routes/api/widget-areas/index.mjs +25 -22
- package/dist/astro/routes/api/widget-areas/index.mjs.map +1 -1
- package/dist/astro/routes/api/widget-components.mjs +5 -5
- package/dist/astro/routes/robots.txt.d.mts.map +1 -1
- package/dist/astro/routes/robots.txt.mjs +43 -8
- package/dist/astro/routes/robots.txt.mjs.map +1 -1
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +19 -12
- package/dist/astro/routes/sitemap-_collection_.xml.mjs.map +1 -1
- package/dist/astro/routes/sitemap.xml.mjs +16 -9
- package/dist/astro/routes/sitemap.xml.mjs.map +1 -1
- package/dist/astro/types.d.mts +19 -17
- package/dist/astro/types.d.mts.map +1 -1
- package/dist/audit-B8XE-0UV.mjs +127 -0
- package/dist/audit-B8XE-0UV.mjs.map +1 -0
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/auth/providers/microsoft.d.mts +1 -1
- package/dist/authoritative-records-LPtrIGOY.mjs +5183 -0
- package/dist/authoritative-records-LPtrIGOY.mjs.map +1 -0
- package/dist/authorize-CoDsRRp5.mjs +74 -0
- package/dist/authorize-CoDsRRp5.mjs.map +1 -0
- package/dist/backup-2Wj-hTCN.mjs +246 -0
- package/dist/backup-2Wj-hTCN.mjs.map +1 -0
- package/dist/block-types-C3gJEe7l.mjs +132 -0
- package/dist/block-types-C3gJEe7l.mjs.map +1 -0
- package/dist/block-values-CgbMtSGU.mjs +215 -0
- package/dist/block-values-CgbMtSGU.mjs.map +1 -0
- package/dist/byline-CzGZC2Zs.mjs +922 -0
- package/dist/byline-CzGZC2Zs.mjs.map +1 -0
- package/dist/byline-fields-B1qHvRps.mjs +280 -0
- package/dist/byline-fields-B1qHvRps.mjs.map +1 -0
- package/dist/byline-fields-vYd_4Q1e.mjs +123 -0
- package/dist/byline-fields-vYd_4Q1e.mjs.map +1 -0
- package/dist/byline-registry-BhzpO41z.mjs +406 -0
- package/dist/byline-registry-BhzpO41z.mjs.map +1 -0
- package/dist/bylines-BF555iIz.mjs +150 -0
- package/dist/bylines-BF555iIz.mjs.map +1 -0
- package/dist/bylines-DJx6IWWi.mjs +234 -0
- package/dist/bylines-DJx6IWWi.mjs.map +1 -0
- package/dist/cache-BWzswWB-.mjs +151 -0
- package/dist/cache-BWzswWB-.mjs.map +1 -0
- package/dist/canonical-DjF_z6GI.mjs +174 -0
- package/dist/canonical-DjF_z6GI.mjs.map +1 -0
- package/dist/capture-triggers-D7g3fOZj.mjs +362 -0
- package/dist/capture-triggers-D7g3fOZj.mjs.map +1 -0
- package/dist/challenge-store-Cfjdvw86.mjs +51 -0
- package/dist/challenge-store-Cfjdvw86.mjs.map +1 -0
- package/dist/checksum-BF4acJwn.mjs +162 -0
- package/dist/checksum-BF4acJwn.mjs.map +1 -0
- package/dist/chrome-tags-BDs29G3g.mjs +24 -0
- package/dist/chrome-tags-BDs29G3g.mjs.map +1 -0
- package/dist/chunks-CYBOL-zn.mjs +25 -0
- package/dist/chunks-CYBOL-zn.mjs.map +1 -0
- package/dist/cli/index.mjs +146 -130
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/cf-access.d.mts +1 -1
- package/dist/client/index.d.mts +47 -47
- package/dist/client/index.d.mts.map +1 -1
- package/dist/client/index.mjs +14 -11
- package/dist/client/index.mjs.map +1 -1
- package/dist/collection-slugs-cache-B2J5aESO.mjs +91 -0
- package/dist/collection-slugs-cache-B2J5aESO.mjs.map +1 -0
- package/dist/comment-DV7dybcs.mjs +335 -0
- package/dist/comment-DV7dybcs.mjs.map +1 -0
- package/dist/comment-reaction-CWwqiT6x.mjs +85 -0
- package/dist/comment-reaction-CWwqiT6x.mjs.map +1 -0
- package/dist/comments-DVjWJm8X.mjs +99 -0
- package/dist/comments-DVjWJm8X.mjs.map +1 -0
- package/dist/comments-Q-ILHCEI.mjs +195 -0
- package/dist/comments-Q-ILHCEI.mjs.map +1 -0
- package/dist/components-DnOmvvgg.mjs +112 -0
- package/dist/components-DnOmvvgg.mjs.map +1 -0
- package/dist/config-9IzA83_U.d.mts +6811 -0
- package/dist/config-9IzA83_U.d.mts.map +1 -0
- package/dist/config-BdQzFtmR.mjs +228 -0
- package/dist/config-BdQzFtmR.mjs.map +1 -0
- package/dist/config-Cs2RBkJ6.d.mts +41 -0
- package/dist/config-Cs2RBkJ6.d.mts.map +1 -0
- package/dist/config-Cs_AwWXI.mjs +106 -0
- package/dist/config-Cs_AwWXI.mjs.map +1 -0
- package/dist/connection-CiXgZyCY.mjs +36 -0
- package/dist/connection-CiXgZyCY.mjs.map +1 -0
- package/dist/content-Dt0Os_WQ.mjs +2109 -0
- package/dist/content-Dt0Os_WQ.mjs.map +1 -0
- package/dist/content-list-query-BK26u9Ly.d.mts +26 -0
- package/dist/content-list-query-BK26u9Ly.d.mts.map +1 -0
- package/dist/content-policy-BLDbNJOb.mjs +46 -0
- package/dist/content-policy-BLDbNJOb.mjs.map +1 -0
- package/dist/content-repair-CjwbLy4m.mjs +442 -0
- package/dist/content-repair-CjwbLy4m.mjs.map +1 -0
- package/dist/context-ErV7UdQY.mjs +2089 -0
- package/dist/context-ErV7UdQY.mjs.map +1 -0
- package/dist/credits-BRyjafiF.mjs +110 -0
- package/dist/credits-BRyjafiF.mjs.map +1 -0
- package/dist/cron-Bm5xa7tv.mjs +306 -0
- package/dist/cron-Bm5xa7tv.mjs.map +1 -0
- package/dist/dashboard-DVxQ5XiI.mjs +168 -0
- package/dist/dashboard-DVxQ5XiI.mjs.map +1 -0
- package/dist/database/migration-lock.d.mts +17 -4
- package/dist/database/migration-lock.d.mts.map +1 -1
- package/dist/database/migration-lock.mjs +33 -6
- package/dist/database/migration-lock.mjs.map +1 -1
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +2 -2
- package/dist/db/libsql-migrations.d.mts +1 -1
- package/dist/db/libsql-migrations.mjs +5 -5
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres-migrations.d.mts +1 -1
- package/dist/db/postgres-migrations.mjs +5 -5
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite-migrations.d.mts +1 -1
- package/dist/db/sqlite-migrations.mjs +5 -5
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/db/sqlite.mjs +1 -1
- package/dist/db-errors-unnO6yiZ.mjs +65 -0
- package/dist/db-errors-unnO6yiZ.mjs.map +1 -0
- package/dist/default-B9Tf2n94.mjs +81 -0
- package/dist/default-B9Tf2n94.mjs.map +1 -0
- package/dist/deferred-tasks-CpPEqsga.d.mts +9 -0
- package/dist/deferred-tasks-CpPEqsga.d.mts.map +1 -0
- package/dist/destination-DR3IHjmy.mjs +18 -0
- package/dist/destination-DR3IHjmy.mjs.map +1 -0
- package/dist/dev-typegen-ZeWYV8Jp.mjs +29 -0
- package/dist/dev-typegen-ZeWYV8Jp.mjs.map +1 -0
- package/dist/device-flow-BbYNZ9Xi.mjs +521 -0
- package/dist/device-flow-BbYNZ9Xi.mjs.map +1 -0
- package/dist/digest-DlBa7kJl.mjs +194 -0
- package/dist/digest-DlBa7kJl.mjs.map +1 -0
- package/dist/direct-executor-5T8gkhvA.mjs +117 -0
- package/dist/direct-executor-5T8gkhvA.mjs.map +1 -0
- package/dist/dist-DY0aOmAP.mjs +810 -0
- package/dist/dist-DY0aOmAP.mjs.map +1 -0
- package/dist/email-console-v3OM8It-.mjs +50 -0
- package/dist/email-console-v3OM8It-.mjs.map +1 -0
- package/dist/email-locale-CoZo-oZx.mjs +25 -0
- package/dist/email-locale-CoZo-oZx.mjs.map +1 -0
- package/dist/emdash-runtime-DwezbIqQ.mjs +4392 -0
- package/dist/emdash-runtime-DwezbIqQ.mjs.map +1 -0
- package/dist/enrich-C3XIJi0O.mjs +194 -0
- package/dist/enrich-C3XIJi0O.mjs.map +1 -0
- package/dist/entry-lock-CY7XpdSw.d.mts +4568 -0
- package/dist/entry-lock-CY7XpdSw.d.mts.map +1 -0
- package/dist/entry-lock-DDuWaAiP.mjs +1211 -0
- package/dist/entry-lock-DDuWaAiP.mjs.map +1 -0
- package/dist/entry-lock-D_Og9Gy3.mjs +163 -0
- package/dist/entry-lock-D_Og9Gy3.mjs.map +1 -0
- package/dist/entry-locks-Cp8_BcQQ.mjs +167 -0
- package/dist/entry-locks-Cp8_BcQQ.mjs.map +1 -0
- package/dist/env-types-Br8uywYA.mjs +38 -0
- package/dist/env-types-Br8uywYA.mjs.map +1 -0
- package/dist/error-CT2SsX5S.mjs +90 -0
- package/dist/error-CT2SsX5S.mjs.map +1 -0
- package/dist/errors-BMaCpLeS.mjs +479 -0
- package/dist/errors-BMaCpLeS.mjs.map +1 -0
- package/dist/errors-DlJwot7q.mjs +120 -0
- package/dist/errors-DlJwot7q.mjs.map +1 -0
- package/dist/escape-BfbDyuQ-.mjs +9 -0
- package/dist/escape-BfbDyuQ-.mjs.map +1 -0
- package/dist/fence-BOD3SxZG.mjs +162 -0
- package/dist/fence-BOD3SxZG.mjs.map +1 -0
- package/dist/field-defs-cache-C7sR7ZeU.mjs +77 -0
- package/dist/field-defs-cache-C7sR7ZeU.mjs.map +1 -0
- package/dist/field-map-C_rDXfdJ.mjs +84 -0
- package/dist/field-map-C_rDXfdJ.mjs.map +1 -0
- package/dist/focal-point-CgCcr1Ca.mjs +23 -0
- package/dist/focal-point-CgCcr1Ca.mjs.map +1 -0
- package/dist/fts-manager-BzFo0xx6.mjs +483 -0
- package/dist/fts-manager-BzFo0xx6.mjs.map +1 -0
- package/dist/gc-B_c3DPpi.mjs +75 -0
- package/dist/gc-B_c3DPpi.mjs.map +1 -0
- package/dist/hash-A-o2ZX8O.mjs +37 -0
- package/dist/hash-A-o2ZX8O.mjs.map +1 -0
- package/dist/hook-result-f8t7hIuu.d.mts +31 -0
- package/dist/hook-result-f8t7hIuu.d.mts.map +1 -0
- package/dist/hreflang-BpUK9Lcu.mjs +105 -0
- package/dist/hreflang-BpUK9Lcu.mjs.map +1 -0
- package/dist/hreflang-D07R-RbI.d.mts +50 -0
- package/dist/hreflang-D07R-RbI.d.mts.map +1 -0
- package/dist/http-route-dispatch-C2Ep2Uf6.mjs +342 -0
- package/dist/http-route-dispatch-C2Ep2Uf6.mjs.map +1 -0
- package/dist/identity-BivQ8wkV.mjs +35 -0
- package/dist/identity-BivQ8wkV.mjs.map +1 -0
- package/dist/import-B4UvHNJz.mjs +2126 -0
- package/dist/import-B4UvHNJz.mjs.map +1 -0
- package/dist/index-C37Ty40w.d.mts +623 -0
- package/dist/index-C37Ty40w.d.mts.map +1 -0
- package/dist/index.d.mts +23 -23
- package/dist/index.mjs +112 -108
- package/dist/install-finalization-BbYaB4wj.mjs +58 -0
- package/dist/install-finalization-BbYaB4wj.mjs.map +1 -0
- package/dist/json-recordset-BjYIWFkV.mjs +12 -0
- package/dist/json-recordset-BjYIWFkV.mjs.map +1 -0
- package/dist/json-schema-Cde7le0s.mjs +15 -0
- package/dist/json-schema-Cde7le0s.mjs.map +1 -0
- package/dist/keys-CusTXpw-.mjs +61 -0
- package/dist/keys-CusTXpw-.mjs.map +1 -0
- package/dist/kinds-DogmNB6n.mjs +974 -0
- package/dist/kinds-DogmNB6n.mjs.map +1 -0
- package/dist/lifecycle-BLCoCz4T.mjs +25 -0
- package/dist/lifecycle-BLCoCz4T.mjs.map +1 -0
- package/dist/load-Dds3KhXr.mjs +28 -0
- package/dist/load-Dds3KhXr.mjs.map +1 -0
- package/dist/loader-D4w4XE7q.mjs +1420 -0
- package/dist/loader-D4w4XE7q.mjs.map +1 -0
- package/dist/loops-IYgzQdQu.mjs +205 -0
- package/dist/loops-IYgzQdQu.mjs.map +1 -0
- package/dist/manifest-builder-CGF5kujD.mjs +196 -0
- package/dist/manifest-builder-CGF5kujD.mjs.map +1 -0
- package/dist/manifest-schema-B0BxPSjB.mjs +497 -0
- package/dist/manifest-schema-B0BxPSjB.mjs.map +1 -0
- package/dist/marketplace-DNvEGLqU.mjs +257 -0
- package/dist/marketplace-DNvEGLqU.mjs.map +1 -0
- package/dist/media/image-endpoint.d.mts +3 -2
- package/dist/media/image-endpoint.d.mts.map +1 -1
- package/dist/media/image-endpoint.mjs +17 -8
- package/dist/media/image-endpoint.mjs.map +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +7 -6
- package/dist/media/index.mjs.map +1 -1
- package/dist/media/local-runtime.d.mts +14 -14
- package/dist/media/local-runtime.d.mts.map +1 -1
- package/dist/media/local-runtime.mjs +18 -8
- package/dist/media/local-runtime.mjs.map +1 -1
- package/dist/media-BL9MRrSG.mjs +294 -0
- package/dist/media-BL9MRrSG.mjs.map +1 -0
- package/dist/media-B_x5B9EA.mjs +373 -0
- package/dist/media-B_x5B9EA.mjs.map +1 -0
- package/dist/media-allowlist-CpmqBbIQ.mjs +45 -0
- package/dist/media-allowlist-CpmqBbIQ.mjs.map +1 -0
- package/dist/media-folders-CNs_A_B-.mjs +210 -0
- package/dist/media-folders-CNs_A_B-.mjs.map +1 -0
- package/dist/media-qTTHVkls.mjs +416 -0
- package/dist/media-qTTHVkls.mjs.map +1 -0
- package/dist/media-url-GJboA1fl.mjs +43 -0
- package/dist/media-url-GJboA1fl.mjs.map +1 -0
- package/dist/media-usage-ClWgrX0d.mjs +282 -0
- package/dist/media-usage-ClWgrX0d.mjs.map +1 -0
- package/dist/media-usage-activation-B8Fjtq0h.mjs +78 -0
- package/dist/media-usage-activation-B8Fjtq0h.mjs.map +1 -0
- package/dist/media-usage-work-L8-Au4j-.mjs +1036 -0
- package/dist/media-usage-work-L8-Au4j-.mjs.map +1 -0
- package/dist/media-usage-work-LXgze5j9.mjs +151 -0
- package/dist/media-usage-work-LXgze5j9.mjs.map +1 -0
- package/dist/menus-BAxcbsbv.mjs +818 -0
- package/dist/menus-BAxcbsbv.mjs.map +1 -0
- package/dist/menus-BI6oBXco.mjs +92 -0
- package/dist/menus-BI6oBXco.mjs.map +1 -0
- package/dist/menus-fvGFd4m6.mjs +3725 -0
- package/dist/menus-fvGFd4m6.mjs.map +1 -0
- package/dist/migrations/index.d.mts +1 -1
- package/dist/migrations/index.d.mts.map +1 -1
- package/dist/migrations/index.mjs +4 -4
- package/dist/mime-DwhtRyUt.mjs +81 -0
- package/dist/mime-DwhtRyUt.mjs.map +1 -0
- package/dist/mode-DIDSUwuN.mjs +23 -0
- package/dist/mode-DIDSUwuN.mjs.map +1 -0
- package/dist/node-sqlite-compat-Ddr_mlR9.mjs +63 -0
- package/dist/node-sqlite-compat-Ddr_mlR9.mjs.map +1 -0
- package/dist/normalize-Ip_hFAm8.mjs +216 -0
- package/dist/normalize-Ip_hFAm8.mjs.map +1 -0
- package/dist/oauth-authorization-CcMgeT8R.mjs +274 -0
- package/dist/oauth-authorization-CcMgeT8R.mjs.map +1 -0
- package/dist/oauth-clients-C_osi0PU.mjs +266 -0
- package/dist/oauth-clients-C_osi0PU.mjs.map +1 -0
- package/dist/oauth-state-store-DGLP-6CK.mjs +50 -0
- package/dist/oauth-state-store-DGLP-6CK.mjs.map +1 -0
- package/dist/oauth-user-lookup-z77Ee0Hm.mjs +26 -0
- package/dist/oauth-user-lookup-z77Ee0Hm.mjs.map +1 -0
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/object-cache-EjasjtoQ.mjs +586 -0
- package/dist/object-cache-EjasjtoQ.mjs.map +1 -0
- package/dist/options-CmUpkyKW.d.mts +81 -0
- package/dist/options-CmUpkyKW.d.mts.map +1 -0
- package/dist/ownership-DCk5NutQ.mjs +12 -0
- package/dist/ownership-DCk5NutQ.mjs.map +1 -0
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +14 -7
- package/dist/page/index.mjs.map +1 -1
- package/dist/parse-2W-E2f7w.mjs +81 -0
- package/dist/parse-2W-E2f7w.mjs.map +1 -0
- package/dist/parse-6pN8Xqg5.d.mts +176 -0
- package/dist/parse-6pN8Xqg5.d.mts.map +1 -0
- package/dist/passkey-config-DTTZB6EI.mjs +46 -0
- package/dist/passkey-config-DTTZB6EI.mjs.map +1 -0
- package/dist/paths-CQA62503.mjs +77 -0
- package/dist/paths-CQA62503.mjs.map +1 -0
- package/dist/patterns-CryGz_EV.mjs +159 -0
- package/dist/patterns-CryGz_EV.mjs.map +1 -0
- package/dist/placeholder-BlfXkucE.d.mts +313 -0
- package/dist/placeholder-BlfXkucE.d.mts.map +1 -0
- package/dist/plan-B95eiwnF.mjs +135 -0
- package/dist/plan-B95eiwnF.mjs.map +1 -0
- package/dist/plugin-test-runtime.d.mts +14 -14
- package/dist/plugin-test-runtime.d.mts.map +1 -1
- package/dist/plugin-test-runtime.mjs +121 -117
- package/dist/plugin-tool-name-BDA7m4Xa.mjs +27 -0
- package/dist/plugin-tool-name-BDA7m4Xa.mjs.map +1 -0
- package/dist/plugin-types.d.mts +2 -2
- package/dist/plugin-utils.d.mts +12 -12
- package/dist/plugins/adapt-sandbox-entry.d.mts +12 -12
- package/dist/plugins/adapt-sandbox-entry.d.mts.map +1 -1
- package/dist/plugins/adapt-sandbox-entry.mjs +9 -8
- package/dist/plugins/adapt-sandbox-entry.mjs.map +1 -1
- package/dist/plugins/host.d.mts +5 -5
- package/dist/plugins/host.mjs +57 -51
- package/dist/plugins-BhxLJ008.mjs +261 -0
- package/dist/plugins-BhxLJ008.mjs.map +1 -0
- package/dist/policy-DOJ2sPqB.mjs +53 -0
- package/dist/policy-DOJ2sPqB.mjs.map +1 -0
- package/dist/portable-text-RCMpCj47.mjs +311 -0
- package/dist/portable-text-RCMpCj47.mjs.map +1 -0
- package/dist/preview-DFwL5APO.mjs +107 -0
- package/dist/preview-DFwL5APO.mjs.map +1 -0
- package/dist/protocol-B-ztxp_y.d.mts +65 -0
- package/dist/protocol-B-ztxp_y.d.mts.map +1 -0
- package/dist/public-plugin-api-routes-ik4fPZMv.mjs +316 -0
- package/dist/public-plugin-api-routes-ik4fPZMv.mjs.map +1 -0
- package/dist/public-submission-C5JZIykp.mjs +251 -0
- package/dist/public-submission-C5JZIykp.mjs.map +1 -0
- package/dist/public-url-CQwzRljH.mjs +101 -0
- package/dist/public-url-CQwzRljH.mjs.map +1 -0
- package/dist/query-BFHjCzSh.mjs +37 -0
- package/dist/query-BFHjCzSh.mjs.map +1 -0
- package/dist/query-DuwyFr5Z.mjs +41 -0
- package/dist/query-DuwyFr5Z.mjs.map +1 -0
- package/dist/query-eR_Nz70M.mjs +1157 -0
- package/dist/query-eR_Nz70M.mjs.map +1 -0
- package/dist/range-BQWPjWgQ.mjs +51 -0
- package/dist/range-BQWPjWgQ.mjs.map +1 -0
- package/dist/rate-limit-mPKeQ3sm.mjs +127 -0
- package/dist/rate-limit-mPKeQ3sm.mjs.map +1 -0
- package/dist/receipt-CmUpyuW5.mjs +43 -0
- package/dist/receipt-CmUpyuW5.mjs.map +1 -0
- package/dist/redirect-BtiMkehU.mjs +19 -0
- package/dist/redirect-BtiMkehU.mjs.map +1 -0
- package/dist/redirect-DcmNMvOs.mjs +423 -0
- package/dist/redirect-DcmNMvOs.mjs.map +1 -0
- package/dist/redirect-paths-K5i3xYfR.mjs +36 -0
- package/dist/redirect-paths-K5i3xYfR.mjs.map +1 -0
- package/dist/redirects-BA_TvtuH.mjs +148 -0
- package/dist/redirects-BA_TvtuH.mjs.map +1 -0
- package/dist/redirects-BIrRvgn4.mjs +446 -0
- package/dist/redirects-BIrRvgn4.mjs.map +1 -0
- package/dist/registry/testing.mjs +3 -3
- package/dist/registry-DymfZkAN.mjs +8374 -0
- package/dist/registry-DymfZkAN.mjs.map +1 -0
- package/dist/relations-DrEs3Sc1.mjs +789 -0
- package/dist/relations-DrEs3Sc1.mjs.map +1 -0
- package/dist/request-cache-5z2WzWmh.mjs +104 -0
- package/dist/request-cache-5z2WzWmh.mjs.map +1 -0
- package/dist/request-context.d.mts +12 -1
- package/dist/request-context.d.mts.map +1 -1
- package/dist/request-context.mjs.map +1 -1
- package/dist/request-meta-o8RIf9pa.mjs +141 -0
- package/dist/request-meta-o8RIf9pa.mjs.map +1 -0
- package/dist/resolve-CVy9xgy_.mjs +102 -0
- package/dist/resolve-CVy9xgy_.mjs.map +1 -0
- package/dist/resolve-DdNXBJSr.mjs +199 -0
- package/dist/resolve-DdNXBJSr.mjs.map +1 -0
- package/dist/revision-Dx7Uth1X.mjs +374 -0
- package/dist/revision-Dx7Uth1X.mjs.map +1 -0
- package/dist/route-cache-DAG5dPhh.mjs +20 -0
- package/dist/route-cache-DAG5dPhh.mjs.map +1 -0
- package/dist/route-wire-Xbsu8Vih.mjs +197 -0
- package/dist/route-wire-Xbsu8Vih.mjs.map +1 -0
- package/dist/routes-YQkSOsws.mjs +272 -0
- package/dist/routes-YQkSOsws.mjs.map +1 -0
- package/dist/runner-CLorw5vo.mjs +6669 -0
- package/dist/runner-CLorw5vo.mjs.map +1 -0
- package/dist/runner-g1A9P-wD.d.mts +73 -0
- package/dist/runner-g1A9P-wD.d.mts.map +1 -0
- package/dist/runtime.d.mts +13 -13
- package/dist/runtime.mjs +6 -4
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema/project-env-types.mjs +49 -43
- package/dist/schema/project-env-types.mjs.map +1 -1
- package/dist/schema-Bss8qImF.mjs +13 -0
- package/dist/schema-Bss8qImF.mjs.map +1 -0
- package/dist/schema-C036pqEw.mjs +815 -0
- package/dist/schema-C036pqEw.mjs.map +1 -0
- package/dist/scopes-C_SoYl9x.mjs +34 -0
- package/dist/scopes-C_SoYl9x.mjs.map +1 -0
- package/dist/search-uNqCgePJ.mjs +450 -0
- package/dist/search-uNqCgePJ.mjs.map +1 -0
- package/dist/sections-BLusMa96.mjs +346 -0
- package/dist/sections-BLusMa96.mjs.map +1 -0
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +47 -41
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +32 -26
- package/dist/seo/index.mjs.map +1 -1
- package/dist/seo-BodxIpws.mjs +188 -0
- package/dist/seo-BodxIpws.mjs.map +1 -0
- package/dist/seo-DaMYIQY8.mjs +133 -0
- package/dist/seo-DaMYIQY8.mjs.map +1 -0
- package/dist/service-BuM1BRsA.mjs +150 -0
- package/dist/service-BuM1BRsA.mjs.map +1 -0
- package/dist/session-user-2DpQDMKw.mjs +61 -0
- package/dist/session-user-2DpQDMKw.mjs.map +1 -0
- package/dist/settings-B3ZmPF_8.mjs +73 -0
- package/dist/settings-B3ZmPF_8.mjs.map +1 -0
- package/dist/settings-P5hwPX6_.mjs +66 -0
- package/dist/settings-P5hwPX6_.mjs.map +1 -0
- package/dist/settings-yIqoN-Ok.mjs +519 -0
- package/dist/settings-yIqoN-Ok.mjs.map +1 -0
- package/dist/setup-complete-eu6MUQnt.mjs +65 -0
- package/dist/setup-complete-eu6MUQnt.mjs.map +1 -0
- package/dist/setup-nonce-CyPOapqY.mjs +25 -0
- package/dist/setup-nonce-CyPOapqY.mjs.map +1 -0
- package/dist/site-domain-8lEJl_0U.mjs +131 -0
- package/dist/site-domain-8lEJl_0U.mjs.map +1 -0
- package/dist/site-settings-uPkW0e6o.mjs +50 -0
- package/dist/site-settings-uPkW0e6o.mjs.map +1 -0
- package/dist/site-url-25SGVXwL.mjs +45 -0
- package/dist/site-url-25SGVXwL.mjs.map +1 -0
- package/dist/sitemap-name-DTK7CYnY.mjs +26 -0
- package/dist/sitemap-name-DTK7CYnY.mjs.map +1 -0
- package/dist/slug-BEDl2IJY.mjs +16 -0
- package/dist/slug-BEDl2IJY.mjs.map +1 -0
- package/dist/slugify-BDEG9pLk.mjs +22 -0
- package/dist/slugify-BDEG9pLk.mjs.map +1 -0
- package/dist/snapshot-CvkIBRLY.mjs +414 -0
- package/dist/snapshot-CvkIBRLY.mjs.map +1 -0
- package/dist/ssrf-mcCKMH6B.mjs +406 -0
- package/dist/ssrf-mcCKMH6B.mjs.map +1 -0
- package/dist/stage-BQfGzGOy.mjs +662 -0
- package/dist/stage-BQfGzGOy.mjs.map +1 -0
- package/dist/staged-B5vQGeSf.mjs +686 -0
- package/dist/staged-B5vQGeSf.mjs.map +1 -0
- package/dist/state-dO6t6OxV.mjs +178 -0
- package/dist/state-dO6t6OxV.mjs.map +1 -0
- package/dist/status-DSURZwKS.mjs +30 -0
- package/dist/status-DSURZwKS.mjs.map +1 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +3 -3
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +1 -1
- package/dist/storage-query-Cy0SZ8iG.d.mts +1619 -0
- package/dist/storage-query-Cy0SZ8iG.d.mts.map +1 -0
- package/dist/tar-DWzcUZ_Q.mjs +449 -0
- package/dist/tar-DWzcUZ_Q.mjs.map +1 -0
- package/dist/target-C9htUbrT.mjs +27 -0
- package/dist/target-C9htUbrT.mjs.map +1 -0
- package/dist/taxonomies-By2aGvq2.mjs +729 -0
- package/dist/taxonomies-By2aGvq2.mjs.map +1 -0
- package/dist/taxonomies-CVRd_jz0.mjs +937 -0
- package/dist/taxonomies-CVRd_jz0.mjs.map +1 -0
- package/dist/taxonomy-BG_xu2Qf.mjs +563 -0
- package/dist/taxonomy-BG_xu2Qf.mjs.map +1 -0
- package/dist/tokens-U5vzgSrM.mjs +171 -0
- package/dist/tokens-U5vzgSrM.mjs.map +1 -0
- package/dist/transaction-CkoQ5wqQ.mjs +29 -0
- package/dist/transaction-CkoQ5wqQ.mjs.map +1 -0
- package/dist/transfer-DA0OSfaT.mjs +8873 -0
- package/dist/transfer-DA0OSfaT.mjs.map +1 -0
- package/dist/transfer-Pyf3d7ka.mjs +166 -0
- package/dist/transfer-Pyf3d7ka.mjs.map +1 -0
- package/dist/transfer-download-cX7SuWEy.mjs +33 -0
- package/dist/transfer-download-cX7SuWEy.mjs.map +1 -0
- package/dist/transformations-DczubD4j.mjs +196 -0
- package/dist/transformations-DczubD4j.mjs.map +1 -0
- package/dist/transport-Dm5QzpT_.d.mts +42 -0
- package/dist/transport-Dm5QzpT_.d.mts.map +1 -0
- package/dist/transport-DtIrjEFO.mjs +137 -0
- package/dist/transport-DtIrjEFO.mjs.map +1 -0
- package/dist/trusted-proxy-CDRd5Kmw.mjs +51 -0
- package/dist/trusted-proxy-CDRd5Kmw.mjs.map +1 -0
- package/dist/turnstile-Ct5YuFNY.mjs +58 -0
- package/dist/turnstile-Ct5YuFNY.mjs.map +1 -0
- package/dist/types-Bgujop4S.d.mts +374 -0
- package/dist/types-Bgujop4S.d.mts.map +1 -0
- package/dist/types-BirHUEXt.mjs +18 -0
- package/dist/types-BirHUEXt.mjs.map +1 -0
- package/dist/types-BqJgTL_y.d.mts +293 -0
- package/dist/types-BqJgTL_y.d.mts.map +1 -0
- package/dist/types-C-lrOt9T.d.mts +87 -0
- package/dist/types-C-lrOt9T.d.mts.map +1 -0
- package/dist/types-CCEHAhOv.d.mts +916 -0
- package/dist/types-CCEHAhOv.d.mts.map +1 -0
- package/dist/types-CLVwYRBr.d.mts +227 -0
- package/dist/types-CLVwYRBr.d.mts.map +1 -0
- package/dist/types-C_asjp1J.mjs +201 -0
- package/dist/types-C_asjp1J.mjs.map +1 -0
- package/dist/types-CadaL_k8.d.mts +366 -0
- package/dist/types-CadaL_k8.d.mts.map +1 -0
- package/dist/types-DVbTb4Hk.mjs +77 -0
- package/dist/types-DVbTb4Hk.mjs.map +1 -0
- package/dist/types-Ddku19Zw.d.mts +209 -0
- package/dist/types-Ddku19Zw.d.mts.map +1 -0
- package/dist/types-DwhEvIVb.mjs +133 -0
- package/dist/types-DwhEvIVb.mjs.map +1 -0
- package/dist/types-FIiGQ3PE.mjs +16 -0
- package/dist/types-FIiGQ3PE.mjs.map +1 -0
- package/dist/types-OauzCOY0.mjs +37 -0
- package/dist/types-OauzCOY0.mjs.map +1 -0
- package/dist/types-mQGTpP-4.d.mts +1741 -0
- package/dist/types-mQGTpP-4.d.mts.map +1 -0
- package/dist/types-nbjz3Mgm.d.mts +125 -0
- package/dist/types-nbjz3Mgm.d.mts.map +1 -0
- package/dist/update-check-hW32-0pf.mjs +161 -0
- package/dist/update-check-hW32-0pf.mjs.map +1 -0
- package/dist/upload-attempts-Bpik1TLF.mjs +32 -0
- package/dist/upload-attempts-Bpik1TLF.mjs.map +1 -0
- package/dist/url-DTfGDJhI.mjs +104 -0
- package/dist/url-DTfGDJhI.mjs.map +1 -0
- package/dist/url-pattern-CJeCyNij.mjs +41 -0
- package/dist/url-pattern-CJeCyNij.mjs.map +1 -0
- package/dist/user-nQInBZbE.mjs +171 -0
- package/dist/user-nQInBZbE.mjs.map +1 -0
- package/dist/utils-govudc_U.mjs +442 -0
- package/dist/utils-govudc_U.mjs.map +1 -0
- package/dist/validate-BxLvcDYh.mjs +524 -0
- package/dist/validate-BxLvcDYh.mjs.map +1 -0
- package/dist/validate-mnoVfASU.d.mts +468 -0
- package/dist/validate-mnoVfASU.d.mts.map +1 -0
- package/dist/validation-DQDEvh87.mjs +221 -0
- package/dist/validation-DQDEvh87.mjs.map +1 -0
- package/dist/version-BOFfLiVT.mjs +49 -0
- package/dist/version-BOFfLiVT.mjs.map +1 -0
- package/dist/version-Dcvx_C9g.mjs +7 -0
- package/dist/version-Dcvx_C9g.mjs.map +1 -0
- package/dist/version-DzTJ3gD7.mjs +9 -0
- package/dist/version-DzTJ3gD7.mjs.map +1 -0
- package/dist/video-BX7AI5nJ.mjs +54 -0
- package/dist/video-BX7AI5nJ.mjs.map +1 -0
- package/dist/virtual-modules-CU29aip9.mjs +515 -0
- package/dist/virtual-modules-CU29aip9.mjs.map +1 -0
- package/dist/widgets-HIeFmZxt.mjs +121 -0
- package/dist/widgets-HIeFmZxt.mjs.map +1 -0
- package/dist/wxr-taxonomies-Dy2i2ON3.d.mts +34 -0
- package/dist/wxr-taxonomies-Dy2i2ON3.d.mts.map +1 -0
- package/dist/wxr-taxonomies-DyOGhl8W.mjs +454 -0
- package/dist/wxr-taxonomies-DyOGhl8W.mjs.map +1 -0
- package/dist/zod-generator-VxCPVDpo.mjs +425 -0
- package/dist/zod-generator-VxCPVDpo.mjs.map +1 -0
- package/package.json +7 -6
- package/src/api/authorize.ts +42 -0
- package/src/api/handlers/bulk-tag.ts +11 -3
- package/src/api/handlers/bylines.ts +6 -2
- package/src/api/handlers/content.ts +107 -7
- package/src/api/handlers/dashboard.ts +44 -14
- package/src/api/handlers/manifest.ts +1 -0
- package/src/api/handlers/menus.ts +24 -10
- package/src/api/handlers/plugins.ts +1 -0
- package/src/api/handlers/relations.ts +15 -1
- package/src/api/handlers/revision.ts +6 -2
- package/src/api/handlers/site-domain.ts +26 -10
- package/src/api/handlers/taxonomies.ts +27 -17
- package/src/api/schemas/settings.ts +2 -0
- package/src/api/types.ts +2 -0
- package/src/astro/image-endpoint.ts +23 -2
- package/src/astro/integration/dev-scheduler-bridge.ts +91 -0
- package/src/astro/integration/index.ts +48 -1
- package/src/astro/integration/routes.ts +8 -0
- package/src/astro/integration/runtime.ts +2 -1
- package/src/astro/integration/virtual-modules.ts +9 -16
- package/src/astro/integration/vite-config.ts +20 -23
- package/src/astro/middleware/auth.ts +3 -1
- package/src/astro/middleware/redirect.ts +202 -78
- package/src/astro/middleware/request-context.ts +1 -0
- package/src/astro/middleware.ts +35 -7
- package/src/astro/prefetch.ts +7 -5
- package/src/astro/public-plugin-api-routes.ts +10 -2
- package/src/astro/routes/api/admin/plugins/registry/artifact.ts +1 -1
- package/src/astro/routes/api/content/[collection]/[id]/discard-draft.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/duplicate.ts +1 -5
- package/src/astro/routes/api/content/[collection]/[id]/lock.ts +2 -2
- package/src/astro/routes/api/content/[collection]/[id]/permanent.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/publish.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/restore.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id]/schedule.ts +3 -2
- package/src/astro/routes/api/content/[collection]/[id]/terms/[taxonomy].ts +9 -5
- package/src/astro/routes/api/content/[collection]/[id]/translations.ts +14 -1
- package/src/astro/routes/api/content/[collection]/[id]/unpublish.ts +2 -1
- package/src/astro/routes/api/content/[collection]/[id].ts +18 -6
- package/src/astro/routes/api/content/[collection]/index.ts +1 -5
- package/src/astro/routes/api/dashboard.ts +6 -1
- package/src/astro/routes/api/dev/scheduled-tasks.ts +20 -0
- package/src/astro/routes/api/import/wordpress/analyze.ts +1 -16
- package/src/astro/routes/api/import/wordpress/execute.ts +8 -3
- package/src/astro/routes/api/import/wordpress-plugin/analyze.ts +4 -1
- package/src/astro/routes/api/import/wordpress-plugin/execute.ts +34 -5
- package/src/astro/routes/api/media/file/[...key].ts +13 -3
- package/src/astro/routes/api/menus/[name]/items/[id].ts +3 -2
- package/src/astro/routes/api/menus/[name]/items.ts +2 -1
- package/src/astro/routes/api/menus/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/menus/[name]/translations.ts +2 -1
- package/src/astro/routes/api/menus/[name].ts +3 -2
- package/src/astro/routes/api/menus/index.ts +2 -1
- package/src/astro/routes/api/redirects/[id].ts +15 -2
- package/src/astro/routes/api/redirects/index.ts +5 -1
- package/src/astro/routes/api/settings/domain.ts +2 -1
- package/src/astro/routes/api/settings.ts +2 -1
- package/src/astro/routes/api/setup/admin-verify.ts +7 -1
- package/src/astro/routes/api/taxonomies/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug]/translations.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name]/terms/[slug].ts +3 -2
- package/src/astro/routes/api/taxonomies/[name]/terms/index.ts +2 -1
- package/src/astro/routes/api/taxonomies/[name].ts +3 -2
- package/src/astro/routes/api/taxonomies/index.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name]/reorder.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name]/widgets/[id].ts +3 -2
- package/src/astro/routes/api/widget-areas/[name]/widgets.ts +2 -1
- package/src/astro/routes/api/widget-areas/[name].ts +2 -1
- package/src/astro/routes/api/widget-areas/index.ts +2 -1
- package/src/astro/routes/robots.txt.ts +33 -2
- package/src/astro/types.ts +10 -1
- package/src/auth/types.ts +10 -4
- package/src/cache/redirect-paths.ts +56 -0
- package/src/cache/route-cache.ts +22 -0
- package/src/cli/commands/export-seed.ts +6 -4
- package/src/cli/commands/import/wordpress.ts +3 -27
- package/src/cli/commands/login.ts +37 -47
- package/src/cli/commands/migrate.ts +36 -4
- package/src/cli/commands/seed.ts +18 -8
- package/src/cli/wxr/parser.ts +2 -2
- package/src/client/index.ts +13 -2
- package/src/client/portable-text.ts +21 -7
- package/src/client/transport.ts +11 -7
- package/src/comments/query.ts +8 -2
- package/src/components/CommentForm.astro +2 -2
- package/src/components/Comments.astro +1 -1
- package/src/components/EmDashImage.astro +14 -2
- package/src/components/InlinePortableTextEditor.tsx +156 -1326
- package/src/components/inline-block-types.ts +278 -0
- package/src/components/inline-bubble-menu.tsx +696 -0
- package/src/components/inline-editor-ui.tsx +1192 -0
- package/src/components/inline-image.tsx +722 -0
- package/src/components/inline-media-picker.tsx +1221 -0
- package/src/components/inline-slash-menu.tsx +556 -0
- package/src/database/collection-cleanup.ts +30 -0
- package/src/database/datetime-storage.ts +337 -60
- package/src/database/migration-lock.ts +43 -7
- package/src/database/migrations/content-sized.ts +82 -0
- package/src/database/migrations/policy.ts +28 -2
- package/src/database/migrations/runner.ts +48 -0
- package/src/database/repositories/byline.ts +73 -17
- package/src/database/repositories/comment.ts +17 -7
- package/src/database/repositories/content.ts +82 -20
- package/src/database/repositories/menu.ts +77 -11
- package/src/database/repositories/plugin-storage.ts +109 -8
- package/src/database/repositories/revision.ts +24 -6
- package/src/database/repositories/taxonomy-def.ts +9 -2
- package/src/database/repositories/taxonomy.ts +47 -14
- package/src/database/repositories/types.ts +76 -7
- package/src/emdash-runtime.ts +213 -170
- package/src/fields/image.ts +1 -0
- package/src/i18n/config.ts +58 -10
- package/src/i18n/normalize.ts +16 -2
- package/src/i18n/query.ts +47 -0
- package/src/i18n/resolve.ts +8 -3
- package/src/import/index.ts +1 -0
- package/src/import/registry.ts +17 -0
- package/src/import/sources/wordpress-plugin.ts +151 -9
- package/src/import/types.ts +3 -0
- package/src/import/utils.ts +5 -0
- package/src/import/wxr-taxonomies.ts +3 -2
- package/src/loader.ts +116 -24
- package/src/mcp/json-schema.ts +14 -0
- package/src/mcp/plugin-tool-name.ts +36 -0
- package/src/mcp/server.ts +102 -16
- package/src/media/caption.ts +30 -0
- package/src/media/image-endpoint.ts +13 -6
- package/src/media/local-runtime.ts +3 -0
- package/src/media/normalize.ts +15 -8
- package/src/media/responsive.ts +12 -2
- package/src/media/types.ts +16 -3
- package/src/media/usage/collection-deletion.ts +4 -0
- package/src/menus/index.ts +21 -11
- package/src/migrations/direct-executor.ts +42 -12
- package/src/migrations/manifest.ts +1 -0
- package/src/migrations/protocol.ts +6 -2
- package/src/plugins/adapt-sandbox-entry.ts +16 -6
- package/src/plugins/byline-access.ts +3 -1
- package/src/plugins/context.ts +1 -2
- package/src/plugins/state.ts +5 -8
- package/src/plugins/storage-indexes.ts +7 -3
- package/src/query.ts +74 -23
- package/src/redirects/artifacts.ts +39 -5
- package/src/redirects/cache.ts +34 -2
- package/src/references/field-map.ts +6 -4
- package/src/request-context.ts +8 -0
- package/src/schema/block-values.ts +80 -17
- package/src/schema/collection-slugs-cache.ts +31 -17
- package/src/schema/registry.ts +18 -1
- package/src/schema/zod-generator.ts +2 -1
- package/src/search/fts-manager.ts +98 -28
- package/src/search/query.ts +34 -65
- package/src/seed/apply.ts +222 -94
- package/src/seed/types.ts +3 -1
- package/src/settings/index.ts +155 -35
- package/src/settings/types.ts +2 -0
- package/src/settings/version.ts +54 -0
- package/src/taxonomies/index.ts +95 -52
- package/src/taxonomies/term-counts.ts +2 -1
- package/src/utils/db-errors.ts +15 -0
- package/src/virtual-modules.d.ts +1 -0
- package/src/visual-editing/toolbar.ts +46 -12
- package/dist/action-token-BdWad2YG.mjs +0 -26
- package/dist/action-token-BdWad2YG.mjs.map +0 -1
- package/dist/activation-xomsCMJg.mjs +0 -387
- package/dist/activation-xomsCMJg.mjs.map +0 -1
- package/dist/adapters-B4-nbElt.d.mts +0 -173
- package/dist/adapters-B4-nbElt.d.mts.map +0 -1
- package/dist/allowed-origins-CLpHGGlc.mjs +0 -116
- package/dist/allowed-origins-CLpHGGlc.mjs.map +0 -1
- package/dist/api-DBw_IWoi.mjs +0 -5024
- package/dist/api-DBw_IWoi.mjs.map +0 -1
- package/dist/api-tokens-B0ZipcZ-.mjs +0 -173
- package/dist/api-tokens-B0ZipcZ-.mjs.map +0 -1
- package/dist/apply-Cx48saFC.mjs +0 -1680
- package/dist/apply-Cx48saFC.mjs.map +0 -1
- package/dist/approvals-BXgtXA2s.mjs +0 -460
- package/dist/approvals-BXgtXA2s.mjs.map +0 -1
- package/dist/artifact-fetch-DsRczRGG.mjs +0 -659
- package/dist/artifact-fetch-DsRczRGG.mjs.map +0 -1
- package/dist/artifacts-D-O-qj9C.mjs +0 -307
- package/dist/artifacts-D-O-qj9C.mjs.map +0 -1
- package/dist/audit-CCH3MA4Y.mjs +0 -127
- package/dist/audit-CCH3MA4Y.mjs.map +0 -1
- package/dist/authoritative-records-Dcs7l2H5.mjs +0 -5183
- package/dist/authoritative-records-Dcs7l2H5.mjs.map +0 -1
- package/dist/authorize-TdIGpRSE.mjs +0 -49
- package/dist/authorize-TdIGpRSE.mjs.map +0 -1
- package/dist/backup-CZt5Mzwx.mjs +0 -246
- package/dist/backup-CZt5Mzwx.mjs.map +0 -1
- package/dist/block-types-DHnkzE6u.mjs +0 -132
- package/dist/block-types-DHnkzE6u.mjs.map +0 -1
- package/dist/block-values-C4N_F2-G.mjs +0 -175
- package/dist/block-values-C4N_F2-G.mjs.map +0 -1
- package/dist/byline-BmVKOQ8l.mjs +0 -909
- package/dist/byline-BmVKOQ8l.mjs.map +0 -1
- package/dist/byline-fields-B8SDs3M_.mjs +0 -123
- package/dist/byline-fields-B8SDs3M_.mjs.map +0 -1
- package/dist/byline-fields-Bze3ZdAw.mjs +0 -280
- package/dist/byline-fields-Bze3ZdAw.mjs.map +0 -1
- package/dist/byline-registry-dvt4N3xV.mjs +0 -406
- package/dist/byline-registry-dvt4N3xV.mjs.map +0 -1
- package/dist/bylines-CHhR28r9.mjs +0 -150
- package/dist/bylines-CHhR28r9.mjs.map +0 -1
- package/dist/bylines-DZS4OflA.mjs +0 -234
- package/dist/bylines-DZS4OflA.mjs.map +0 -1
- package/dist/cache-x0z8t_m9.mjs +0 -133
- package/dist/cache-x0z8t_m9.mjs.map +0 -1
- package/dist/canonical-BUcKRYpG.mjs +0 -174
- package/dist/canonical-BUcKRYpG.mjs.map +0 -1
- package/dist/capture-triggers-C9JKoIdT.mjs +0 -362
- package/dist/capture-triggers-C9JKoIdT.mjs.map +0 -1
- package/dist/challenge-store-BHgdPVze.mjs +0 -51
- package/dist/challenge-store-BHgdPVze.mjs.map +0 -1
- package/dist/checksum-BYR5i7qe.mjs +0 -162
- package/dist/checksum-BYR5i7qe.mjs.map +0 -1
- package/dist/chrome-tags-BIKBMZYO.mjs +0 -24
- package/dist/chrome-tags-BIKBMZYO.mjs.map +0 -1
- package/dist/chunks-Dr5Vr0zA.mjs +0 -25
- package/dist/chunks-Dr5Vr0zA.mjs.map +0 -1
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs +0 -85
- package/dist/collection-slugs-cache-B2Gs9Jwx.mjs.map +0 -1
- package/dist/comment-CWla6OHV.mjs +0 -325
- package/dist/comment-CWla6OHV.mjs.map +0 -1
- package/dist/comment-reaction-RZrcs5cW.mjs +0 -85
- package/dist/comment-reaction-RZrcs5cW.mjs.map +0 -1
- package/dist/comments-BzmIKVb2.mjs +0 -99
- package/dist/comments-BzmIKVb2.mjs.map +0 -1
- package/dist/comments-Da_dI2O1.mjs +0 -195
- package/dist/comments-Da_dI2O1.mjs.map +0 -1
- package/dist/components-oFXumpf5.mjs +0 -112
- package/dist/components-oFXumpf5.mjs.map +0 -1
- package/dist/config--wamYxBW.d.mts +0 -39
- package/dist/config--wamYxBW.d.mts.map +0 -1
- package/dist/config-Bo4eOOdV.mjs +0 -228
- package/dist/config-Bo4eOOdV.mjs.map +0 -1
- package/dist/config-C4-UxIk7.d.mts +0 -6790
- package/dist/config-C4-UxIk7.d.mts.map +0 -1
- package/dist/config-CvmjJcVw.mjs +0 -73
- package/dist/config-CvmjJcVw.mjs.map +0 -1
- package/dist/connection-UpzYxtE2.mjs +0 -36
- package/dist/connection-UpzYxtE2.mjs.map +0 -1
- package/dist/content-CcHrqkgp.mjs +0 -2072
- package/dist/content-CcHrqkgp.mjs.map +0 -1
- package/dist/content-list-query-Bxxdd9fv.d.mts +0 -26
- package/dist/content-list-query-Bxxdd9fv.d.mts.map +0 -1
- package/dist/content-policy-Dm32n9C6.mjs +0 -46
- package/dist/content-policy-Dm32n9C6.mjs.map +0 -1
- package/dist/content-repair-havk1F0-.mjs +0 -442
- package/dist/content-repair-havk1F0-.mjs.map +0 -1
- package/dist/context-CvhgHgSH.mjs +0 -2043
- package/dist/context-CvhgHgSH.mjs.map +0 -1
- package/dist/credits-CygUrPOi.mjs +0 -110
- package/dist/credits-CygUrPOi.mjs.map +0 -1
- package/dist/cron-C6ytTOLw.mjs +0 -306
- package/dist/cron-C6ytTOLw.mjs.map +0 -1
- package/dist/dashboard-7_FYfafc.mjs +0 -151
- package/dist/dashboard-7_FYfafc.mjs.map +0 -1
- package/dist/db-errors-CBD5yMro.mjs +0 -55
- package/dist/db-errors-CBD5yMro.mjs.map +0 -1
- package/dist/default-CHCUkV4Z.mjs +0 -81
- package/dist/default-CHCUkV4Z.mjs.map +0 -1
- package/dist/deferred-tasks-G0xhcJTl.d.mts +0 -9
- package/dist/deferred-tasks-G0xhcJTl.d.mts.map +0 -1
- package/dist/destination-r2zIAZ2S.mjs +0 -18
- package/dist/destination-r2zIAZ2S.mjs.map +0 -1
- package/dist/dev-typegen-Dtl8AfS6.mjs +0 -29
- package/dist/dev-typegen-Dtl8AfS6.mjs.map +0 -1
- package/dist/device-flow-CzDJmQ1q.mjs +0 -521
- package/dist/device-flow-CzDJmQ1q.mjs.map +0 -1
- package/dist/digest-xJmyPv2r.mjs +0 -194
- package/dist/digest-xJmyPv2r.mjs.map +0 -1
- package/dist/direct-executor-BXiYIVJ9.mjs +0 -104
- package/dist/direct-executor-BXiYIVJ9.mjs.map +0 -1
- package/dist/dist-Cfu8mMBs.mjs +0 -810
- package/dist/dist-Cfu8mMBs.mjs.map +0 -1
- package/dist/email-console-7ZPApLlm.mjs +0 -50
- package/dist/email-console-7ZPApLlm.mjs.map +0 -1
- package/dist/email-locale-DFdUA6UF.mjs +0 -25
- package/dist/email-locale-DFdUA6UF.mjs.map +0 -1
- package/dist/emdash-runtime-C4oFeVpN.mjs +0 -4363
- package/dist/emdash-runtime-C4oFeVpN.mjs.map +0 -1
- package/dist/enrich-Duu4sV3a.mjs +0 -194
- package/dist/enrich-Duu4sV3a.mjs.map +0 -1
- package/dist/entry-lock-B4n0HdQ_.mjs +0 -163
- package/dist/entry-lock-B4n0HdQ_.mjs.map +0 -1
- package/dist/entry-lock-BAAlKYrz.d.mts +0 -4566
- package/dist/entry-lock-BAAlKYrz.d.mts.map +0 -1
- package/dist/entry-lock-Cjz0h45X.mjs +0 -1209
- package/dist/entry-lock-Cjz0h45X.mjs.map +0 -1
- package/dist/entry-locks-DJAqVweV.mjs +0 -167
- package/dist/entry-locks-DJAqVweV.mjs.map +0 -1
- package/dist/env-types-4bkF6Bqg.mjs +0 -38
- package/dist/env-types-4bkF6Bqg.mjs.map +0 -1
- package/dist/error-DxgQdaZ_.mjs +0 -90
- package/dist/error-DxgQdaZ_.mjs.map +0 -1
- package/dist/errors-CjtE5aWF.mjs +0 -120
- package/dist/errors-CjtE5aWF.mjs.map +0 -1
- package/dist/errors-hskQ0C8G.mjs +0 -479
- package/dist/errors-hskQ0C8G.mjs.map +0 -1
- package/dist/escape-ESFhYzwG.mjs +0 -9
- package/dist/escape-ESFhYzwG.mjs.map +0 -1
- package/dist/fence-vc3aHgRA.mjs +0 -162
- package/dist/fence-vc3aHgRA.mjs.map +0 -1
- package/dist/field-defs-cache-zoow36nz.mjs +0 -77
- package/dist/field-defs-cache-zoow36nz.mjs.map +0 -1
- package/dist/field-map-JD1wG0Tq.mjs +0 -83
- package/dist/field-map-JD1wG0Tq.mjs.map +0 -1
- package/dist/focal-point-JX8kcOTQ.mjs +0 -23
- package/dist/focal-point-JX8kcOTQ.mjs.map +0 -1
- package/dist/fts-manager-WJCN8uU6.mjs +0 -443
- package/dist/fts-manager-WJCN8uU6.mjs.map +0 -1
- package/dist/gc-CsGZiKdH.mjs +0 -75
- package/dist/gc-CsGZiKdH.mjs.map +0 -1
- package/dist/hash-C4DFoJ7Z.mjs +0 -37
- package/dist/hash-C4DFoJ7Z.mjs.map +0 -1
- package/dist/hook-result-CXjtMk7Q.d.mts +0 -31
- package/dist/hook-result-CXjtMk7Q.d.mts.map +0 -1
- package/dist/hreflang-BAma7iRr.mjs +0 -105
- package/dist/hreflang-BAma7iRr.mjs.map +0 -1
- package/dist/hreflang-BsYo4x_M.d.mts +0 -50
- package/dist/hreflang-BsYo4x_M.d.mts.map +0 -1
- package/dist/http-route-dispatch-C8G7hAK6.mjs +0 -342
- package/dist/http-route-dispatch-C8G7hAK6.mjs.map +0 -1
- package/dist/identity-BwBKM1fH.mjs +0 -35
- package/dist/identity-BwBKM1fH.mjs.map +0 -1
- package/dist/import-DJ3Z2wxE.mjs +0 -2021
- package/dist/import-DJ3Z2wxE.mjs.map +0 -1
- package/dist/index-DYsn97dY.d.mts +0 -623
- package/dist/index-DYsn97dY.d.mts.map +0 -1
- package/dist/install-finalization-DCFnFSHv.mjs +0 -58
- package/dist/install-finalization-DCFnFSHv.mjs.map +0 -1
- package/dist/keys-CGvAndSp.mjs +0 -61
- package/dist/keys-CGvAndSp.mjs.map +0 -1
- package/dist/kinds-DT1W4T4Y.mjs +0 -974
- package/dist/kinds-DT1W4T4Y.mjs.map +0 -1
- package/dist/lifecycle-BzglCSY0.mjs +0 -25
- package/dist/lifecycle-BzglCSY0.mjs.map +0 -1
- package/dist/load-DjUqmf3s.mjs +0 -28
- package/dist/load-DjUqmf3s.mjs.map +0 -1
- package/dist/loader-CetY659y.mjs +0 -1355
- package/dist/loader-CetY659y.mjs.map +0 -1
- package/dist/loops-DkT1zkPH.mjs +0 -205
- package/dist/loops-DkT1zkPH.mjs.map +0 -1
- package/dist/manifest-builder-BOFCd9rX.mjs +0 -189
- package/dist/manifest-builder-BOFCd9rX.mjs.map +0 -1
- package/dist/manifest-schema-BiFBPEsp.mjs +0 -497
- package/dist/manifest-schema-BiFBPEsp.mjs.map +0 -1
- package/dist/marketplace-CUlenvZm.mjs +0 -257
- package/dist/marketplace-CUlenvZm.mjs.map +0 -1
- package/dist/media-CRKsKlfK.mjs +0 -416
- package/dist/media-CRKsKlfK.mjs.map +0 -1
- package/dist/media-C_z7sRuC.mjs +0 -294
- package/dist/media-C_z7sRuC.mjs.map +0 -1
- package/dist/media-IT8hQleU.mjs +0 -373
- package/dist/media-IT8hQleU.mjs.map +0 -1
- package/dist/media-allowlist-Ct6wvnT2.mjs +0 -45
- package/dist/media-allowlist-Ct6wvnT2.mjs.map +0 -1
- package/dist/media-folders-DtMt-vAA.mjs +0 -210
- package/dist/media-folders-DtMt-vAA.mjs.map +0 -1
- package/dist/media-url-BpXLqCmf.mjs +0 -43
- package/dist/media-url-BpXLqCmf.mjs.map +0 -1
- package/dist/media-usage-DEPHZZ9X.mjs +0 -282
- package/dist/media-usage-DEPHZZ9X.mjs.map +0 -1
- package/dist/media-usage-activation-V2Siabtw.mjs +0 -78
- package/dist/media-usage-activation-V2Siabtw.mjs.map +0 -1
- package/dist/media-usage-work-Cv1OE59F.mjs +0 -151
- package/dist/media-usage-work-Cv1OE59F.mjs.map +0 -1
- package/dist/media-usage-work-cgDYGvrt.mjs +0 -1015
- package/dist/media-usage-work-cgDYGvrt.mjs.map +0 -1
- package/dist/menus-CvVYfsuk.mjs +0 -753
- package/dist/menus-CvVYfsuk.mjs.map +0 -1
- package/dist/menus-D1HC8npj.mjs +0 -92
- package/dist/menus-D1HC8npj.mjs.map +0 -1
- package/dist/menus-DL8IPIcm.mjs +0 -3721
- package/dist/menus-DL8IPIcm.mjs.map +0 -1
- package/dist/mime-B5M9R53H.mjs +0 -81
- package/dist/mime-B5M9R53H.mjs.map +0 -1
- package/dist/mode-eieqAWLe.mjs +0 -23
- package/dist/mode-eieqAWLe.mjs.map +0 -1
- package/dist/node-sqlite-compat-VuyzJw1b.mjs +0 -63
- package/dist/node-sqlite-compat-VuyzJw1b.mjs.map +0 -1
- package/dist/normalize-BuWa0lvd.mjs +0 -191
- package/dist/normalize-BuWa0lvd.mjs.map +0 -1
- package/dist/oauth-authorization-B6ZJbMd2.mjs +0 -274
- package/dist/oauth-authorization-B6ZJbMd2.mjs.map +0 -1
- package/dist/oauth-clients-DVjRc9v3.mjs +0 -266
- package/dist/oauth-clients-DVjRc9v3.mjs.map +0 -1
- package/dist/oauth-state-store-CnmYYsVQ.mjs +0 -50
- package/dist/oauth-state-store-CnmYYsVQ.mjs.map +0 -1
- package/dist/oauth-user-lookup-Dz1_R5vT.mjs +0 -26
- package/dist/oauth-user-lookup-Dz1_R5vT.mjs.map +0 -1
- package/dist/object-cache-Bo6DGaC9.mjs +0 -586
- package/dist/object-cache-Bo6DGaC9.mjs.map +0 -1
- package/dist/options-BR9XZl7h.d.mts +0 -81
- package/dist/options-BR9XZl7h.d.mts.map +0 -1
- package/dist/ownership-COPyVysP.mjs +0 -12
- package/dist/ownership-COPyVysP.mjs.map +0 -1
- package/dist/parse-BOGhrwSq.d.mts +0 -174
- package/dist/parse-BOGhrwSq.d.mts.map +0 -1
- package/dist/parse-Cn5aSk1N.mjs +0 -81
- package/dist/parse-Cn5aSk1N.mjs.map +0 -1
- package/dist/passkey-config-mMFRQUCj.mjs +0 -46
- package/dist/passkey-config-mMFRQUCj.mjs.map +0 -1
- package/dist/paths-BmcAdBo9.mjs +0 -77
- package/dist/paths-BmcAdBo9.mjs.map +0 -1
- package/dist/patterns-CMNnYCgf.mjs +0 -159
- package/dist/patterns-CMNnYCgf.mjs.map +0 -1
- package/dist/placeholder-nOep3_Gn.d.mts +0 -306
- package/dist/placeholder-nOep3_Gn.d.mts.map +0 -1
- package/dist/plan-CDY4K8CH.mjs +0 -135
- package/dist/plan-CDY4K8CH.mjs.map +0 -1
- package/dist/plugins-DFBpfbO3.mjs +0 -261
- package/dist/plugins-DFBpfbO3.mjs.map +0 -1
- package/dist/policy-B_2qnHSy.mjs +0 -45
- package/dist/policy-B_2qnHSy.mjs.map +0 -1
- package/dist/portable-text-Dc2YAusw.mjs +0 -307
- package/dist/portable-text-Dc2YAusw.mjs.map +0 -1
- package/dist/preview-BtzikJ9O.mjs +0 -107
- package/dist/preview-BtzikJ9O.mjs.map +0 -1
- package/dist/protocol-M268ox8L.d.mts +0 -61
- package/dist/protocol-M268ox8L.d.mts.map +0 -1
- package/dist/public-submission-BQZavgZU.mjs +0 -251
- package/dist/public-submission-BQZavgZU.mjs.map +0 -1
- package/dist/public-url-uT1Ok2Tu.mjs +0 -101
- package/dist/public-url-uT1Ok2Tu.mjs.map +0 -1
- package/dist/query-BGG3sDEd.mjs +0 -1127
- package/dist/query-BGG3sDEd.mjs.map +0 -1
- package/dist/query-C_CWlifp.mjs +0 -41
- package/dist/query-C_CWlifp.mjs.map +0 -1
- package/dist/range-CXK_kDbI.mjs +0 -51
- package/dist/range-CXK_kDbI.mjs.map +0 -1
- package/dist/rate-limit-Dvamvay-.mjs +0 -127
- package/dist/rate-limit-Dvamvay-.mjs.map +0 -1
- package/dist/receipt-BmQGzquP.mjs +0 -43
- package/dist/receipt-BmQGzquP.mjs.map +0 -1
- package/dist/redirect-B39kTQ_0.mjs +0 -423
- package/dist/redirect-B39kTQ_0.mjs.map +0 -1
- package/dist/redirect-BguJ00Pv.mjs +0 -19
- package/dist/redirect-BguJ00Pv.mjs.map +0 -1
- package/dist/redirects-C8G4BsfP.mjs +0 -446
- package/dist/redirects-C8G4BsfP.mjs.map +0 -1
- package/dist/redirects-DFT7Wr-e.mjs +0 -148
- package/dist/redirects-DFT7Wr-e.mjs.map +0 -1
- package/dist/registry-DeZ27gVi.mjs +0 -8374
- package/dist/registry-DeZ27gVi.mjs.map +0 -1
- package/dist/relations-DBB1bRJW.mjs +0 -776
- package/dist/relations-DBB1bRJW.mjs.map +0 -1
- package/dist/request-cache-C4CIo5ad.mjs +0 -104
- package/dist/request-cache-C4CIo5ad.mjs.map +0 -1
- package/dist/request-meta-BSvkhIBX.mjs +0 -141
- package/dist/request-meta-BSvkhIBX.mjs.map +0 -1
- package/dist/resolve-BxH64HN9.mjs +0 -100
- package/dist/resolve-BxH64HN9.mjs.map +0 -1
- package/dist/resolve-D-kqyKns.mjs +0 -199
- package/dist/resolve-D-kqyKns.mjs.map +0 -1
- package/dist/revision-BWEH2qQB.mjs +0 -368
- package/dist/revision-BWEH2qQB.mjs.map +0 -1
- package/dist/route-wire-CwbWB_6O.mjs +0 -197
- package/dist/route-wire-CwbWB_6O.mjs.map +0 -1
- package/dist/routes-BfIxc7ft.mjs +0 -272
- package/dist/routes-BfIxc7ft.mjs.map +0 -1
- package/dist/runner-DkeafPBA.d.mts +0 -68
- package/dist/runner-DkeafPBA.d.mts.map +0 -1
- package/dist/runner-wqt4BrIW.mjs +0 -6383
- package/dist/runner-wqt4BrIW.mjs.map +0 -1
- package/dist/schema-BXIW-JHi.mjs +0 -815
- package/dist/schema-BXIW-JHi.mjs.map +0 -1
- package/dist/schema-I74JwYte.mjs +0 -13
- package/dist/schema-I74JwYte.mjs.map +0 -1
- package/dist/scopes-RWZ5ft_Z.mjs +0 -34
- package/dist/scopes-RWZ5ft_Z.mjs.map +0 -1
- package/dist/search-DxwagyWS.mjs +0 -450
- package/dist/search-DxwagyWS.mjs.map +0 -1
- package/dist/sections-Ccq9ZgyD.mjs +0 -346
- package/dist/sections-Ccq9ZgyD.mjs.map +0 -1
- package/dist/seo-CCnfPWAQ.mjs +0 -133
- package/dist/seo-CCnfPWAQ.mjs.map +0 -1
- package/dist/seo-QCtJ1jjV.mjs +0 -188
- package/dist/seo-QCtJ1jjV.mjs.map +0 -1
- package/dist/service-DX84s2rw.mjs +0 -150
- package/dist/service-DX84s2rw.mjs.map +0 -1
- package/dist/session-user-1dtJc2zv.mjs +0 -61
- package/dist/session-user-1dtJc2zv.mjs.map +0 -1
- package/dist/settings-B1jOxAIl.mjs +0 -443
- package/dist/settings-B1jOxAIl.mjs.map +0 -1
- package/dist/settings-Bc1IBl1t.mjs +0 -66
- package/dist/settings-Bc1IBl1t.mjs.map +0 -1
- package/dist/settings-GaZ5sVgg.mjs +0 -73
- package/dist/settings-GaZ5sVgg.mjs.map +0 -1
- package/dist/setup-complete-DidMAWJS.mjs +0 -65
- package/dist/setup-complete-DidMAWJS.mjs.map +0 -1
- package/dist/setup-nonce-DKl4S4c6.mjs +0 -25
- package/dist/setup-nonce-DKl4S4c6.mjs.map +0 -1
- package/dist/site-domain-CbI51Pc2.mjs +0 -113
- package/dist/site-domain-CbI51Pc2.mjs.map +0 -1
- package/dist/site-settings-CDdT4mVm.mjs +0 -50
- package/dist/site-settings-CDdT4mVm.mjs.map +0 -1
- package/dist/site-url-CrDZaAvo.mjs +0 -45
- package/dist/site-url-CrDZaAvo.mjs.map +0 -1
- package/dist/sitemap-name-W3BTor6X.mjs +0 -26
- package/dist/sitemap-name-W3BTor6X.mjs.map +0 -1
- package/dist/slug-BJhHKoOH.mjs +0 -16
- package/dist/slug-BJhHKoOH.mjs.map +0 -1
- package/dist/slugify-bu2-jKia.mjs +0 -22
- package/dist/slugify-bu2-jKia.mjs.map +0 -1
- package/dist/snapshot-BuI_2uDe.mjs +0 -414
- package/dist/snapshot-BuI_2uDe.mjs.map +0 -1
- package/dist/ssrf-LM_0wpGA.mjs +0 -406
- package/dist/ssrf-LM_0wpGA.mjs.map +0 -1
- package/dist/stage-DhzZuYaT.mjs +0 -662
- package/dist/stage-DhzZuYaT.mjs.map +0 -1
- package/dist/staged-DboEaWsV.mjs +0 -686
- package/dist/staged-DboEaWsV.mjs.map +0 -1
- package/dist/state-DCXDzjHq.mjs +0 -178
- package/dist/state-DCXDzjHq.mjs.map +0 -1
- package/dist/status-Dl85BK39.mjs +0 -30
- package/dist/status-Dl85BK39.mjs.map +0 -1
- package/dist/storage-query-BOBmeDMD.d.mts +0 -1615
- package/dist/storage-query-BOBmeDMD.d.mts.map +0 -1
- package/dist/tar-K40edFMt.mjs +0 -449
- package/dist/tar-K40edFMt.mjs.map +0 -1
- package/dist/target-BOighEY1.mjs +0 -27
- package/dist/target-BOighEY1.mjs.map +0 -1
- package/dist/taxonomies-DQSywBvX.mjs +0 -697
- package/dist/taxonomies-DQSywBvX.mjs.map +0 -1
- package/dist/taxonomies-Dj5eaobC.mjs +0 -939
- package/dist/taxonomies-Dj5eaobC.mjs.map +0 -1
- package/dist/taxonomy-QrNmTfIZ.mjs +0 -550
- package/dist/taxonomy-QrNmTfIZ.mjs.map +0 -1
- package/dist/tokens-j5L0as2H.mjs +0 -171
- package/dist/tokens-j5L0as2H.mjs.map +0 -1
- package/dist/transaction-BVYIo_yu.mjs +0 -29
- package/dist/transaction-BVYIo_yu.mjs.map +0 -1
- package/dist/transfer-CYEw8Tu4.mjs +0 -8873
- package/dist/transfer-CYEw8Tu4.mjs.map +0 -1
- package/dist/transfer-DDX10hkD.mjs +0 -166
- package/dist/transfer-DDX10hkD.mjs.map +0 -1
- package/dist/transfer-download-BAqq6GJv.mjs +0 -33
- package/dist/transfer-download-BAqq6GJv.mjs.map +0 -1
- package/dist/transformations-De44wqV_.mjs +0 -196
- package/dist/transformations-De44wqV_.mjs.map +0 -1
- package/dist/transport-1QjUhCRO.d.mts +0 -42
- package/dist/transport-1QjUhCRO.d.mts.map +0 -1
- package/dist/transport-Ds5pVX7p.mjs +0 -136
- package/dist/transport-Ds5pVX7p.mjs.map +0 -1
- package/dist/trusted-proxy-d4Tk6biT.mjs +0 -51
- package/dist/trusted-proxy-d4Tk6biT.mjs.map +0 -1
- package/dist/turnstile-DaFLtyrs.mjs +0 -58
- package/dist/turnstile-DaFLtyrs.mjs.map +0 -1
- package/dist/types-B4-1P2DK.d.mts +0 -227
- package/dist/types-B4-1P2DK.d.mts.map +0 -1
- package/dist/types-BGmQ0uXs.mjs +0 -201
- package/dist/types-BGmQ0uXs.mjs.map +0 -1
- package/dist/types-BKXA0f-c.mjs +0 -16
- package/dist/types-BKXA0f-c.mjs.map +0 -1
- package/dist/types-BiHcpUoO.d.mts +0 -374
- package/dist/types-BiHcpUoO.d.mts.map +0 -1
- package/dist/types-BihhvkyN.d.mts +0 -85
- package/dist/types-BihhvkyN.d.mts.map +0 -1
- package/dist/types-Bq9Wohd7.d.mts +0 -363
- package/dist/types-Bq9Wohd7.d.mts.map +0 -1
- package/dist/types-C-Xp0CcN.mjs +0 -103
- package/dist/types-C-Xp0CcN.mjs.map +0 -1
- package/dist/types-C4P7F1Vq.d.mts +0 -1741
- package/dist/types-C4P7F1Vq.d.mts.map +0 -1
- package/dist/types-CGaqwHw4.mjs +0 -37
- package/dist/types-CGaqwHw4.mjs.map +0 -1
- package/dist/types-Cj0_yZkn.mjs +0 -18
- package/dist/types-Cj0_yZkn.mjs.map +0 -1
- package/dist/types-D4ECCE4X.mjs +0 -77
- package/dist/types-D4ECCE4X.mjs.map +0 -1
- package/dist/types-DcRJp0vS.d.mts +0 -125
- package/dist/types-DcRJp0vS.d.mts.map +0 -1
- package/dist/types-Ff85fTzU.d.mts +0 -289
- package/dist/types-Ff85fTzU.d.mts.map +0 -1
- package/dist/types-UKr5Sf4y.d.mts +0 -916
- package/dist/types-UKr5Sf4y.d.mts.map +0 -1
- package/dist/types-YpN8hZW7.d.mts +0 -204
- package/dist/types-YpN8hZW7.d.mts.map +0 -1
- package/dist/update-check-DrlsK-tt.mjs +0 -161
- package/dist/update-check-DrlsK-tt.mjs.map +0 -1
- package/dist/upload-attempts-D8CPPvRU.mjs +0 -32
- package/dist/upload-attempts-D8CPPvRU.mjs.map +0 -1
- package/dist/url-Dn3IStq8.mjs +0 -104
- package/dist/url-Dn3IStq8.mjs.map +0 -1
- package/dist/url-pattern-Di4Nn3vP.mjs +0 -41
- package/dist/url-pattern-Di4Nn3vP.mjs.map +0 -1
- package/dist/user-B-ZdGjhI.mjs +0 -171
- package/dist/user-B-ZdGjhI.mjs.map +0 -1
- package/dist/utils-D7wL3r6-.mjs +0 -437
- package/dist/utils-D7wL3r6-.mjs.map +0 -1
- package/dist/validate-BSZbSUDk.mjs +0 -524
- package/dist/validate-BSZbSUDk.mjs.map +0 -1
- package/dist/validate-Dfv0DpZi.d.mts +0 -468
- package/dist/validate-Dfv0DpZi.d.mts.map +0 -1
- package/dist/validation-DRyC_Vm5.mjs +0 -219
- package/dist/validation-DRyC_Vm5.mjs.map +0 -1
- package/dist/version-C4kz0PcO.mjs +0 -7
- package/dist/version-C4kz0PcO.mjs.map +0 -1
- package/dist/version-jhs2BRtl.mjs +0 -9
- package/dist/version-jhs2BRtl.mjs.map +0 -1
- package/dist/video-DReZ48Un.mjs +0 -54
- package/dist/video-DReZ48Un.mjs.map +0 -1
- package/dist/virtual-modules-D0e6VbEv.mjs +0 -516
- package/dist/virtual-modules-D0e6VbEv.mjs.map +0 -1
- package/dist/widgets-BkcMzKct.mjs +0 -121
- package/dist/widgets-BkcMzKct.mjs.map +0 -1
- package/dist/wxr-taxonomies-BxI0CbTg.mjs +0 -453
- package/dist/wxr-taxonomies-BxI0CbTg.mjs.map +0 -1
- package/dist/wxr-taxonomies-Dad33GJi.d.mts +0 -34
- package/dist/wxr-taxonomies-Dad33GJi.d.mts.map +0 -1
- package/dist/zod-generator-BQilAboC.mjs +0 -424
- package/dist/zod-generator-BQilAboC.mjs.map +0 -1
- /package/dist/{api-tokens-D2zgAIEt.mjs → api-tokens-C7l0GUAF.mjs} +0 -0
- /package/dist/{ssrf-BvNItdxk.mjs → ssrf-BBXcxG-f.mjs} +0 -0
|
@@ -1,776 +0,0 @@
|
|
|
1
|
-
import { t as ContentRepository } from "./content-CcHrqkgp.mjs";
|
|
2
|
-
import { l as invalidateCollectionCache } from "./object-cache-Bo6DGaC9.mjs";
|
|
3
|
-
import { r as requestCached } from "./request-cache-C4CIo5ad.mjs";
|
|
4
|
-
import { i as InvalidCursorError } from "./types-C-Xp0CcN.mjs";
|
|
5
|
-
import { t as RevisionRepository } from "./revision-BWEH2qQB.mjs";
|
|
6
|
-
import { t as withTransaction } from "./transaction-BVYIo_yu.mjs";
|
|
7
|
-
import { d as RelationRepository, l as readStagedReferences, s as pageStagedGroups } from "./staged-DboEaWsV.mjs";
|
|
8
|
-
import { n as SchemaRegistry } from "./registry-DeZ27gVi.mjs";
|
|
9
|
-
import { s as invalidateSchemaCache } from "./zod-generator-BQilAboC.mjs";
|
|
10
|
-
|
|
11
|
-
//#region src/api/handlers/validate-references.ts
|
|
12
|
-
function validationError(message) {
|
|
13
|
-
return {
|
|
14
|
-
success: false,
|
|
15
|
-
error: {
|
|
16
|
-
code: "VALIDATION_ERROR",
|
|
17
|
-
message
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
function isRecord$1(value) {
|
|
22
|
-
return typeof value === "object" && value !== null;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Every reference field on a collection that is bound to a relation, by field
|
|
26
|
-
* slug — the key the entry API takes a selection under.
|
|
27
|
-
*/
|
|
28
|
-
function referenceFieldConstraints(db, collection) {
|
|
29
|
-
return requestCached(`reference-field-constraints:${collection}`, async () => {
|
|
30
|
-
const fields = await db.selectFrom("_emdash_fields").innerJoin("_emdash_collections", "_emdash_collections.id", "_emdash_fields.collection_id").select([
|
|
31
|
-
"_emdash_fields.slug",
|
|
32
|
-
"_emdash_fields.required",
|
|
33
|
-
"_emdash_fields.validation"
|
|
34
|
-
]).where("_emdash_collections.slug", "=", collection).where("_emdash_fields.type", "=", "reference").execute();
|
|
35
|
-
const relations = await db.selectFrom("_emdash_relations").select([
|
|
36
|
-
"id",
|
|
37
|
-
"slug",
|
|
38
|
-
"max_children_per_parent",
|
|
39
|
-
"max_parents_per_child"
|
|
40
|
-
]).execute();
|
|
41
|
-
const limits = new Map(relations.map((r) => [r.slug, r]));
|
|
42
|
-
const constraints = /* @__PURE__ */ new Map();
|
|
43
|
-
for (const field of fields) {
|
|
44
|
-
if (!field.validation) continue;
|
|
45
|
-
let parsed;
|
|
46
|
-
try {
|
|
47
|
-
parsed = JSON.parse(field.validation);
|
|
48
|
-
} catch {
|
|
49
|
-
continue;
|
|
50
|
-
}
|
|
51
|
-
if (!isRecord$1(parsed) || typeof parsed.relation !== "string") continue;
|
|
52
|
-
const relation = limits.get(parsed.relation);
|
|
53
|
-
const relationSide = parsed.relationSide === "child" ? "child" : "parent";
|
|
54
|
-
const onChildSide = relationSide === "child";
|
|
55
|
-
constraints.set(field.slug, {
|
|
56
|
-
slug: field.slug,
|
|
57
|
-
relation: parsed.relation,
|
|
58
|
-
relationId: relation?.id ?? null,
|
|
59
|
-
relationSide,
|
|
60
|
-
maxSelected: onChildSide ? relation?.max_parents_per_child ?? null : relation?.max_children_per_parent ?? null,
|
|
61
|
-
maxOpposite: onChildSide ? relation?.max_children_per_parent ?? null : relation?.max_parents_per_child ?? null,
|
|
62
|
-
required: field.required === 1
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
return constraints;
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* The field viewing one end of a relation, for the relation-scoped routes, which
|
|
70
|
-
* address a relation rather than a field. At most one field binds each
|
|
71
|
-
* (relation, side), so this is unambiguous.
|
|
72
|
-
*/
|
|
73
|
-
function constraintsForRelationSide(constraints, relation, side) {
|
|
74
|
-
for (const field of constraints.values()) if (field.relation === relation && field.relationSide === side) return field;
|
|
75
|
-
}
|
|
76
|
-
function validateReferenceSelection(constraints, childIds) {
|
|
77
|
-
const max = constraints.maxSelected;
|
|
78
|
-
if (max !== null && childIds.length > max) return validationError(max === 1 ? `Field '${constraints.slug}' accepts a single reference, received ${childIds.length}.` : `Field '${constraints.slug}' accepts at most ${max} references, received ${childIds.length}.`);
|
|
79
|
-
if (constraints.required && childIds.length === 0) return validationError(`Field '${constraints.slug}' is required and must reference at least one entry.`);
|
|
80
|
-
return {
|
|
81
|
-
success: true,
|
|
82
|
-
data: true
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
async function validateRequiredReferencesPresent(db, collection, references, translationOf) {
|
|
86
|
-
if (translationOf) return {
|
|
87
|
-
success: true,
|
|
88
|
-
data: true
|
|
89
|
-
};
|
|
90
|
-
const constraints = await referenceFieldConstraints(db, collection);
|
|
91
|
-
for (const field of constraints.values()) {
|
|
92
|
-
if (!field.required) continue;
|
|
93
|
-
if (references && Object.hasOwn(references, field.slug)) continue;
|
|
94
|
-
return validationError(`Field '${field.slug}' is required and must reference at least one entry.`);
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
success: true,
|
|
98
|
-
data: true
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/api/handlers/relations.ts
|
|
104
|
-
/** Map an edge-read failure: a bad pagination cursor is a 400 client error,
|
|
105
|
-
* everything else is the generic 500-shaped reference-read error. */
|
|
106
|
-
function referencesGetError(error) {
|
|
107
|
-
if (error instanceof InvalidCursorError) return {
|
|
108
|
-
success: false,
|
|
109
|
-
error: {
|
|
110
|
-
code: "INVALID_CURSOR",
|
|
111
|
-
message: error.message
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
return {
|
|
115
|
-
success: false,
|
|
116
|
-
error: {
|
|
117
|
-
code: "REFERENCES_GET_ERROR",
|
|
118
|
-
message: "Failed to get references"
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
function isRecord(value) {
|
|
123
|
-
return typeof value === "object" && value !== null;
|
|
124
|
-
}
|
|
125
|
-
/** True for SQLite UNIQUE / Postgres unique_violation messages (matches the
|
|
126
|
-
* fingerprint used in the content handlers). Narrow enough not to catch NOT
|
|
127
|
-
* NULL / CHECK violations whose messages also say "constraint". */
|
|
128
|
-
function isUniqueViolation(error) {
|
|
129
|
-
const message = error instanceof Error ? error.message.toLowerCase() : "";
|
|
130
|
-
return message.includes("unique constraint failed") || message.includes("duplicate key");
|
|
131
|
-
}
|
|
132
|
-
async function handleRelationCreate(db, input) {
|
|
133
|
-
try {
|
|
134
|
-
const repo = new RelationRepository(db);
|
|
135
|
-
const registry = new SchemaRegistry(db);
|
|
136
|
-
for (const collection of [input.parentCollection, input.childCollection]) if (!await registry.getCollection(collection)) return {
|
|
137
|
-
success: false,
|
|
138
|
-
error: {
|
|
139
|
-
code: "COLLECTION_NOT_FOUND",
|
|
140
|
-
message: `Collection '${collection}' not found`
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
return {
|
|
144
|
-
success: true,
|
|
145
|
-
data: { relation: await repo.create(input) }
|
|
146
|
-
};
|
|
147
|
-
} catch (error) {
|
|
148
|
-
if (isUniqueViolation(error)) return {
|
|
149
|
-
success: false,
|
|
150
|
-
error: {
|
|
151
|
-
code: "CONFLICT",
|
|
152
|
-
message: "A relation with this slug already exists"
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
return {
|
|
156
|
-
success: false,
|
|
157
|
-
error: {
|
|
158
|
-
code: "RELATION_CREATE_ERROR",
|
|
159
|
-
message: "Failed to create relation"
|
|
160
|
-
}
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
async function handleRelationGet(db, id) {
|
|
165
|
-
try {
|
|
166
|
-
const repo = new RelationRepository(db);
|
|
167
|
-
const relation = await repo.findById(id);
|
|
168
|
-
if (!relation) return {
|
|
169
|
-
success: false,
|
|
170
|
-
error: {
|
|
171
|
-
code: "NOT_FOUND",
|
|
172
|
-
message: "Relation not found"
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
const [boundFields, edgeCounts] = await Promise.all([fieldsBoundToRelation(db, relation.slug), repo.countEdgesByRelation()]);
|
|
176
|
-
return {
|
|
177
|
-
success: true,
|
|
178
|
-
data: { relation: {
|
|
179
|
-
...relation,
|
|
180
|
-
boundFields,
|
|
181
|
-
linkCount: edgeCounts.get(relation.id) ?? 0
|
|
182
|
-
} }
|
|
183
|
-
};
|
|
184
|
-
} catch {
|
|
185
|
-
return {
|
|
186
|
-
success: false,
|
|
187
|
-
error: {
|
|
188
|
-
code: "RELATION_GET_ERROR",
|
|
189
|
-
message: "Failed to get relation"
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* List relations, optionally only those `collection` takes part in.
|
|
196
|
-
*
|
|
197
|
-
* The admin's relation picker filters this way: a reference field can only bind
|
|
198
|
-
* to a relation with its own collection on one end.
|
|
199
|
-
*/
|
|
200
|
-
async function handleRelationList(db, opts = {}) {
|
|
201
|
-
try {
|
|
202
|
-
const repo = new RelationRepository(db);
|
|
203
|
-
const [relations, boundByRelation, edgeCounts] = await Promise.all([
|
|
204
|
-
opts.collection ? repo.findForCollection(opts.collection) : repo.list(),
|
|
205
|
-
fieldsBoundByRelation(db),
|
|
206
|
-
repo.countEdgesByRelation()
|
|
207
|
-
]);
|
|
208
|
-
return {
|
|
209
|
-
success: true,
|
|
210
|
-
data: { relations: relations.map((relation) => ({
|
|
211
|
-
...relation,
|
|
212
|
-
boundFields: boundByRelation.get(relation.slug) ?? [],
|
|
213
|
-
linkCount: edgeCounts.get(relation.id) ?? 0
|
|
214
|
-
})) }
|
|
215
|
-
};
|
|
216
|
-
} catch {
|
|
217
|
-
return {
|
|
218
|
-
success: false,
|
|
219
|
-
error: {
|
|
220
|
-
code: "RELATION_LIST_ERROR",
|
|
221
|
-
message: "Failed to list relations"
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
async function handleRelationUpdate(db, id, input) {
|
|
227
|
-
try {
|
|
228
|
-
const relation = await new RelationRepository(db).update(id, input);
|
|
229
|
-
if (!relation) return {
|
|
230
|
-
success: false,
|
|
231
|
-
error: {
|
|
232
|
-
code: "NOT_FOUND",
|
|
233
|
-
message: "Relation not found"
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
return {
|
|
237
|
-
success: true,
|
|
238
|
-
data: { relation }
|
|
239
|
-
};
|
|
240
|
-
} catch {
|
|
241
|
-
return {
|
|
242
|
-
success: false,
|
|
243
|
-
error: {
|
|
244
|
-
code: "RELATION_UPDATE_ERROR",
|
|
245
|
-
message: "Failed to update relation"
|
|
246
|
-
}
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Every reference field on the site, grouped by the slug of the relation it
|
|
252
|
-
* binds.
|
|
253
|
-
*
|
|
254
|
-
* Filtered in JS rather than through `json_extract`: `_emdash_fields` holds one
|
|
255
|
-
* row per field on the whole site, and the reference-typed subset of that is
|
|
256
|
-
* small enough that a scan beats a dialect-specific JSON path. Grouping the
|
|
257
|
-
* whole set in one pass also keeps the relations list to a single scan instead
|
|
258
|
-
* of one per row.
|
|
259
|
-
*/
|
|
260
|
-
async function fieldsBoundByRelation(db) {
|
|
261
|
-
const rows = await db.selectFrom("_emdash_fields").innerJoin("_emdash_collections", "_emdash_collections.id", "_emdash_fields.collection_id").select([
|
|
262
|
-
"_emdash_fields.slug as fieldSlug",
|
|
263
|
-
"_emdash_collections.slug as collectionSlug",
|
|
264
|
-
"_emdash_fields.validation as validation"
|
|
265
|
-
]).where("_emdash_fields.type", "=", "reference").execute();
|
|
266
|
-
const byRelation = /* @__PURE__ */ new Map();
|
|
267
|
-
for (const row of rows) {
|
|
268
|
-
if (!row.validation) continue;
|
|
269
|
-
let parsed;
|
|
270
|
-
try {
|
|
271
|
-
parsed = JSON.parse(row.validation);
|
|
272
|
-
} catch {
|
|
273
|
-
continue;
|
|
274
|
-
}
|
|
275
|
-
if (!isRecord(parsed) || typeof parsed.relation !== "string") continue;
|
|
276
|
-
const bound = {
|
|
277
|
-
collectionSlug: row.collectionSlug,
|
|
278
|
-
fieldSlug: row.fieldSlug,
|
|
279
|
-
side: parsed.relationSide === "child" ? "child" : "parent"
|
|
280
|
-
};
|
|
281
|
-
const list = byRelation.get(parsed.relation);
|
|
282
|
-
if (list) list.push(bound);
|
|
283
|
-
else byRelation.set(parsed.relation, [bound]);
|
|
284
|
-
}
|
|
285
|
-
return byRelation;
|
|
286
|
-
}
|
|
287
|
-
/** Every reference field bound to one relation, across both of its ends. */
|
|
288
|
-
async function fieldsBoundToRelation(db, relationSlug) {
|
|
289
|
-
return (await fieldsBoundByRelation(db)).get(relationSlug) ?? [];
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Delete a relation, the reference fields bound to it, and its edges.
|
|
293
|
-
*
|
|
294
|
-
* A relation is only ever deleted deliberately — from the relations admin page,
|
|
295
|
-
* or by the checkbox on a field delete — and it cannot leave a field pointing at
|
|
296
|
-
* nothing, so the fields go with it either way. Callers show the count first;
|
|
297
|
-
* `deletedFields` reports what actually went.
|
|
298
|
-
*
|
|
299
|
-
* Order matters: fields first, then the relation row and its edges. On D1
|
|
300
|
-
* `withTransaction` degrades to sequential statements, so an interrupted run
|
|
301
|
-
* leaves a relation with fewer bound fields — visible on the relations page and
|
|
302
|
-
* finishable — rather than fields pointing at a relation that no longer exists.
|
|
303
|
-
*/
|
|
304
|
-
async function handleRelationDelete(db, id) {
|
|
305
|
-
try {
|
|
306
|
-
const relation = await new RelationRepository(db).findById(id);
|
|
307
|
-
if (!relation) return {
|
|
308
|
-
success: false,
|
|
309
|
-
error: {
|
|
310
|
-
code: "NOT_FOUND",
|
|
311
|
-
message: "Relation not found"
|
|
312
|
-
}
|
|
313
|
-
};
|
|
314
|
-
const bound = await fieldsBoundToRelation(db, relation.slug);
|
|
315
|
-
if (!await withTransaction(db, async (trx) => {
|
|
316
|
-
const registry = new SchemaRegistry(trx);
|
|
317
|
-
for (const field of bound) await registry.deleteField(field.collectionSlug, field.fieldSlug);
|
|
318
|
-
return new RelationRepository(trx).delete(id);
|
|
319
|
-
})) return {
|
|
320
|
-
success: false,
|
|
321
|
-
error: {
|
|
322
|
-
code: "NOT_FOUND",
|
|
323
|
-
message: "Relation not found"
|
|
324
|
-
}
|
|
325
|
-
};
|
|
326
|
-
for (const collection of new Set(bound.map((f) => f.collectionSlug))) {
|
|
327
|
-
invalidateCollectionCache(collection);
|
|
328
|
-
invalidateSchemaCache(collection);
|
|
329
|
-
}
|
|
330
|
-
return {
|
|
331
|
-
success: true,
|
|
332
|
-
data: {
|
|
333
|
-
deleted: true,
|
|
334
|
-
deletedFields: bound.map((f) => `${f.collectionSlug}.${f.fieldSlug}`)
|
|
335
|
-
}
|
|
336
|
-
};
|
|
337
|
-
} catch (error) {
|
|
338
|
-
console.error("Relation delete error:", error);
|
|
339
|
-
return {
|
|
340
|
-
success: false,
|
|
341
|
-
error: {
|
|
342
|
-
code: "RELATION_DELETE_ERROR",
|
|
343
|
-
message: "Failed to delete relation"
|
|
344
|
-
}
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Display title for a resolved entry: the collection's configured `titleField`,
|
|
350
|
-
* then `title`, then `name`, else null.
|
|
351
|
-
*/
|
|
352
|
-
function entryTitle(data, titleField) {
|
|
353
|
-
if (titleField) {
|
|
354
|
-
const configured = data[titleField];
|
|
355
|
-
if (typeof configured === "string" && configured.length > 0) return configured;
|
|
356
|
-
}
|
|
357
|
-
if (typeof data.title === "string" && data.title.length > 0) return data.title;
|
|
358
|
-
if (typeof data.name === "string" && data.name.length > 0) return data.name;
|
|
359
|
-
return null;
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* The collection's configured `titleField`, memoized for the request: a single
|
|
363
|
-
* content read hydrates every reference field, and several of them commonly
|
|
364
|
-
* target the same collection.
|
|
365
|
-
*/
|
|
366
|
-
async function getReferenceTitleField(db, collection) {
|
|
367
|
-
return requestCached(`reference-title-field:${collection}`, async () => {
|
|
368
|
-
return (await db.selectFrom("_emdash_collections").select("title_field").where("slug", "=", collection).executeTakeFirst())?.title_field ?? void 0;
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
/** Resolve a relation from an id OR its slug. */
|
|
372
|
-
async function resolveRelation(repo, idOrSlug) {
|
|
373
|
-
return await repo.findById(idOrSlug) ?? await repo.findBySlug(idOrSlug);
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* Pick the locale variant matching `locale`, falling back to the first entry
|
|
377
|
-
* (lowest locale code). The fallback is intentional — an edge is keyed by
|
|
378
|
-
* `translation_group`, so a referenced entry that exists only in another locale
|
|
379
|
-
* is still a real reference — but the returned ref carries the variant's actual
|
|
380
|
-
* `locale` so callers never mistake a fallback for the requested locale.
|
|
381
|
-
*/
|
|
382
|
-
function pickVariant(items, locale) {
|
|
383
|
-
return items.find((i) => i.locale === locale) ?? items[0];
|
|
384
|
-
}
|
|
385
|
-
/**
|
|
386
|
-
* Resolve edge groups to loadable entries in `collection` at `locale`.
|
|
387
|
-
* Dangling groups (no surviving entry) are skipped — cleanup is a later slice.
|
|
388
|
-
*
|
|
389
|
-
* All groups are loaded in one batched query (chunked at `SQL_BATCH_SIZE`)
|
|
390
|
-
* rather than a `findTranslations` per edge, so a parent with N children costs
|
|
391
|
-
* a constant number of queries, not N+1. Edge order (the caller's `sort_order`)
|
|
392
|
-
* is preserved by iterating `edges`.
|
|
393
|
-
*
|
|
394
|
-
* `includeDrafts` is false for callers without `content:read_drafts`: the load
|
|
395
|
-
* is restricted to published entries so a draft/scheduled entry referenced by an
|
|
396
|
-
* edge is skipped exactly like a dangling one, never leaking its id/slug/locale.
|
|
397
|
-
*/
|
|
398
|
-
function resolveEntries(content, collection, edges, pick, locale, includeDrafts, titleField) {
|
|
399
|
-
return resolveGroupSelection(content, collection, edges.map((edge) => ({
|
|
400
|
-
group: pick(edge),
|
|
401
|
-
sortOrder: edge.sortOrder
|
|
402
|
-
})), locale, includeDrafts, titleField);
|
|
403
|
-
}
|
|
404
|
-
/**
|
|
405
|
-
* `resolveEntries` for a selection that has no links behind it yet — a pending
|
|
406
|
-
* one staged in a draft revision, which is already a list of translation groups
|
|
407
|
-
* in the order the editor chose. Position stands in for the `sort_order` the
|
|
408
|
-
* links will carry once it is published.
|
|
409
|
-
*/
|
|
410
|
-
function resolveEntryGroups(content, collection, groups, locale, includeDrafts, titleField) {
|
|
411
|
-
return resolveGroupSelection(content, collection, groups.map((group, index) => ({
|
|
412
|
-
group,
|
|
413
|
-
sortOrder: index
|
|
414
|
-
})), locale, includeDrafts, titleField);
|
|
415
|
-
}
|
|
416
|
-
async function resolveGroupSelection(content, collection, selection, locale, includeDrafts, titleField) {
|
|
417
|
-
const all = await content.findTranslationsForGroups(collection, selection.map((entry) => entry.group), { publishedOnly: !includeDrafts });
|
|
418
|
-
const variantsByGroup = /* @__PURE__ */ new Map();
|
|
419
|
-
for (const item of all) {
|
|
420
|
-
if (item.translationGroup == null) continue;
|
|
421
|
-
const list = variantsByGroup.get(item.translationGroup);
|
|
422
|
-
if (list) list.push(item);
|
|
423
|
-
else variantsByGroup.set(item.translationGroup, [item]);
|
|
424
|
-
}
|
|
425
|
-
const refs = [];
|
|
426
|
-
for (const selected of selection) {
|
|
427
|
-
const variants = variantsByGroup.get(selected.group);
|
|
428
|
-
if (!variants) continue;
|
|
429
|
-
const entry = pickVariant(variants, locale);
|
|
430
|
-
if (!entry) continue;
|
|
431
|
-
refs.push({
|
|
432
|
-
id: entry.id,
|
|
433
|
-
slug: entry.slug,
|
|
434
|
-
collection,
|
|
435
|
-
title: entryTitle(entry.data, titleField),
|
|
436
|
-
locale: entry.locale,
|
|
437
|
-
translationGroup: entry.translationGroup,
|
|
438
|
-
sortOrder: selected.sortOrder
|
|
439
|
-
});
|
|
440
|
-
}
|
|
441
|
-
return refs;
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* The page of a pending selection this end stages, when there is one.
|
|
445
|
-
*
|
|
446
|
-
* These routes address a relation and a side; a staged selection is keyed by the
|
|
447
|
-
* field slug the entry API takes it under, so the field viewing this end is what
|
|
448
|
-
* connects them. Returns undefined when the caller may not see drafts, the entry
|
|
449
|
-
* has no draft, or the draft stages nothing for this field — all of which mean
|
|
450
|
-
* the published links are the answer.
|
|
451
|
-
*/
|
|
452
|
-
async function stagedPageFor(db, options) {
|
|
453
|
-
if (!options.includeDrafts || !options.draftRevisionId) return void 0;
|
|
454
|
-
const field = constraintsForRelationSide(await referenceFieldConstraints(db, options.collection), options.relationSlug, options.side);
|
|
455
|
-
if (!field) return void 0;
|
|
456
|
-
const groups = readStagedReferences((await new RevisionRepository(db).findById(options.draftRevisionId))?.data)?.[field.slug];
|
|
457
|
-
if (!groups) return void 0;
|
|
458
|
-
return pageStagedGroups(groups, options.page);
|
|
459
|
-
}
|
|
460
|
-
async function handleReferenceChildrenGet(db, collection, entryId, relation, page = {}, includeDrafts = false) {
|
|
461
|
-
try {
|
|
462
|
-
const repo = new RelationRepository(db);
|
|
463
|
-
const content = new ContentRepository(db);
|
|
464
|
-
const rel = await resolveRelation(repo, relation);
|
|
465
|
-
if (!rel) return {
|
|
466
|
-
success: false,
|
|
467
|
-
error: {
|
|
468
|
-
code: "NOT_FOUND",
|
|
469
|
-
message: "Relation not found"
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
if (collection !== rel.parentCollection) return {
|
|
473
|
-
success: false,
|
|
474
|
-
error: {
|
|
475
|
-
code: "VALIDATION_ERROR",
|
|
476
|
-
message: "Entry is not the parent side of this relation"
|
|
477
|
-
}
|
|
478
|
-
};
|
|
479
|
-
const entry = await content.findByIdOrSlug(collection, entryId);
|
|
480
|
-
if (!entry?.translationGroup || !includeDrafts && entry.status !== "published") return {
|
|
481
|
-
success: false,
|
|
482
|
-
error: {
|
|
483
|
-
code: "NOT_FOUND",
|
|
484
|
-
message: "Content entry not found"
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
const titleField = await getReferenceTitleField(db, rel.childCollection);
|
|
488
|
-
const staged = await stagedPageFor(db, {
|
|
489
|
-
collection,
|
|
490
|
-
relationSlug: rel.slug,
|
|
491
|
-
side: "parent",
|
|
492
|
-
draftRevisionId: entry.draftRevisionId,
|
|
493
|
-
includeDrafts,
|
|
494
|
-
page
|
|
495
|
-
});
|
|
496
|
-
if (staged) return {
|
|
497
|
-
success: true,
|
|
498
|
-
data: {
|
|
499
|
-
children: await resolveEntryGroups(content, rel.childCollection, staged.groups, entry.locale, includeDrafts, titleField),
|
|
500
|
-
nextCursor: staged.nextCursor
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
const edges = await repo.getChildrenPage(rel.id, entry.translationGroup, page);
|
|
504
|
-
return {
|
|
505
|
-
success: true,
|
|
506
|
-
data: {
|
|
507
|
-
children: await resolveEntries(content, rel.childCollection, edges.items, (e) => e.childGroup, entry.locale, includeDrafts, titleField),
|
|
508
|
-
nextCursor: edges.nextCursor
|
|
509
|
-
}
|
|
510
|
-
};
|
|
511
|
-
} catch (error) {
|
|
512
|
-
return referencesGetError(error);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Resolve a bound field's selection to what the link table stores, without
|
|
517
|
-
* writing anything and without needing the selecting entry to exist.
|
|
518
|
-
*
|
|
519
|
-
* The field decides the relation and the end it views: a field on the `parent`
|
|
520
|
-
* end selects children, one on the `child` end selects the parents pointing at
|
|
521
|
-
* it. `entryGroup` is the selecting entry's own translation group when it has
|
|
522
|
-
* one — the far-side count discounts links it already holds, since replacing a
|
|
523
|
-
* selection with itself adds nothing. A new entry passes `null`: it holds no
|
|
524
|
-
* links yet.
|
|
525
|
-
*/
|
|
526
|
-
async function resolveReferenceTargets(db, collection, constraints, selectedIds, entryGroup) {
|
|
527
|
-
const repo = new RelationRepository(db);
|
|
528
|
-
const content = new ContentRepository(db);
|
|
529
|
-
const side = constraints.relationSide;
|
|
530
|
-
const rel = await resolveRelation(repo, constraints.relation);
|
|
531
|
-
if (!rel) return {
|
|
532
|
-
success: false,
|
|
533
|
-
error: {
|
|
534
|
-
code: "NOT_FOUND",
|
|
535
|
-
message: "Relation not found"
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
const ownCollection = side === "parent" ? rel.parentCollection : rel.childCollection;
|
|
539
|
-
const otherCollection = side === "parent" ? rel.childCollection : rel.parentCollection;
|
|
540
|
-
if (collection !== ownCollection) return {
|
|
541
|
-
success: false,
|
|
542
|
-
error: {
|
|
543
|
-
code: "VALIDATION_ERROR",
|
|
544
|
-
message: `Entry is not the ${side} side of this relation`
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
const selection = validateReferenceSelection(constraints, selectedIds);
|
|
548
|
-
if (!selection.success) return selection;
|
|
549
|
-
const resolved = await content.findManyByIdOrSlug(otherCollection, selectedIds);
|
|
550
|
-
const groups = [];
|
|
551
|
-
for (const selectedId of selectedIds) {
|
|
552
|
-
const other = resolved.get(selectedId);
|
|
553
|
-
if (!other?.translationGroup) return {
|
|
554
|
-
success: false,
|
|
555
|
-
error: {
|
|
556
|
-
code: "NOT_FOUND",
|
|
557
|
-
message: `${side === "parent" ? "Child" : "Parent"} entry '${selectedId}' not found in ${otherCollection}`
|
|
558
|
-
}
|
|
559
|
-
};
|
|
560
|
-
groups.push(other.translationGroup);
|
|
561
|
-
}
|
|
562
|
-
const far = await validateOppositeSideLimit(db, {
|
|
563
|
-
relationId: rel.id,
|
|
564
|
-
farLimit: side === "parent" ? rel.maxParentsPerChild : rel.maxChildrenPerParent,
|
|
565
|
-
side,
|
|
566
|
-
entryGroup,
|
|
567
|
-
groups,
|
|
568
|
-
labels: selectedIds
|
|
569
|
-
});
|
|
570
|
-
if (!far.success) return far;
|
|
571
|
-
return {
|
|
572
|
-
success: true,
|
|
573
|
-
data: {
|
|
574
|
-
relation: rel.id,
|
|
575
|
-
side,
|
|
576
|
-
groups
|
|
577
|
-
}
|
|
578
|
-
};
|
|
579
|
-
}
|
|
580
|
-
/**
|
|
581
|
-
* Check what a selection does to the *other* end's cardinality.
|
|
582
|
-
*
|
|
583
|
-
* Cardinality binds both ends, but only one end ever selects: a field on the
|
|
584
|
-
* parent side that hands a child its second parent breaks `maxParentsPerChild`
|
|
585
|
-
* even though the parent's own limit is untouched. Links the selecting entry
|
|
586
|
-
* already holds are discounted — replacing a selection with itself adds nothing.
|
|
587
|
-
*
|
|
588
|
-
* `labels` names each group the way the caller addressed it, so the message
|
|
589
|
-
* quotes the id someone typed. Publication has only the groups, which it stages;
|
|
590
|
-
* it quotes those.
|
|
591
|
-
*/
|
|
592
|
-
async function validateOppositeSideLimit(db, options) {
|
|
593
|
-
const { farLimit, side, groups } = options;
|
|
594
|
-
if (farLimit === null || groups.length === 0) return {
|
|
595
|
-
success: true,
|
|
596
|
-
data: true
|
|
597
|
-
};
|
|
598
|
-
const counts = await new RelationRepository(db).countEdgesByGroup(options.relationId, side === "parent" ? "child" : "parent", groups, options.entryGroup);
|
|
599
|
-
for (const [index, group] of groups.entries()) {
|
|
600
|
-
if ((counts.get(group) ?? 0) + 1 <= farLimit) continue;
|
|
601
|
-
const farSide = side === "parent" ? "parent" : "child";
|
|
602
|
-
const label = options.labels?.[index] ?? group;
|
|
603
|
-
return {
|
|
604
|
-
success: false,
|
|
605
|
-
error: {
|
|
606
|
-
code: "VALIDATION_ERROR",
|
|
607
|
-
message: farLimit === 1 ? `Entry '${label}' already has a ${farSide} on this relation, which allows one.` : `Entry '${label}' already has the maximum of ${farLimit} ${farSide} entries on this relation.`
|
|
608
|
-
}
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
return {
|
|
612
|
-
success: true,
|
|
613
|
-
data: true
|
|
614
|
-
};
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* {@link resolveReferenceTargets} for an entry that already exists, anchoring the
|
|
618
|
-
* selection on that entry's translation group.
|
|
619
|
-
*/
|
|
620
|
-
async function resolveReferenceSide(db, collection, entryId, constraints, selectedIds) {
|
|
621
|
-
const entry = await new ContentRepository(db).findByIdOrSlug(collection, entryId);
|
|
622
|
-
if (!entry?.translationGroup) return {
|
|
623
|
-
success: false,
|
|
624
|
-
error: {
|
|
625
|
-
code: "NOT_FOUND",
|
|
626
|
-
message: "Content entry not found"
|
|
627
|
-
}
|
|
628
|
-
};
|
|
629
|
-
const resolved = await resolveReferenceTargets(db, collection, constraints, selectedIds, entry.translationGroup);
|
|
630
|
-
if (!resolved.success) return resolved;
|
|
631
|
-
return {
|
|
632
|
-
success: true,
|
|
633
|
-
data: {
|
|
634
|
-
...resolved.data,
|
|
635
|
-
entryGroup: entry.translationGroup
|
|
636
|
-
}
|
|
637
|
-
};
|
|
638
|
-
}
|
|
639
|
-
/**
|
|
640
|
-
* Replace one end's links from an already-resolved selection.
|
|
641
|
-
*
|
|
642
|
-
* Resolution has already proved the relation, the entry and every selected entry
|
|
643
|
-
* exist, so nothing here fails on the caller's input. What it can still hit is
|
|
644
|
-
* the far end's limit closing between resolving and writing — a slot another
|
|
645
|
-
* request took in that window. The write refuses the edge rather than exceeding
|
|
646
|
-
* the limit, and throws so the save reports it; the throw carries an `apiError`
|
|
647
|
-
* the content handlers map to a response.
|
|
648
|
-
*/
|
|
649
|
-
async function writeReferenceSelection(db, selection) {
|
|
650
|
-
const repo = new RelationRepository(db);
|
|
651
|
-
const rel = await resolveRelation(repo, selection.relation);
|
|
652
|
-
if (!rel) return;
|
|
653
|
-
const rejected = selection.side === "parent" ? await repo.setChildren(rel.id, selection.entryGroup, selection.groups) : await repo.setParents(rel.id, selection.entryGroup, selection.groups);
|
|
654
|
-
if (rejected.length > 0) {
|
|
655
|
-
const farSide = selection.side === "parent" ? "parent" : "child";
|
|
656
|
-
throw Object.assign(/* @__PURE__ */ new Error(`Entry '${rejected[0]}' already has the maximum number of ${farSide} entries on this relation.`), { apiError: { code: "VALIDATION_ERROR" } });
|
|
657
|
-
}
|
|
658
|
-
invalidateCollectionCache(rel.parentCollection);
|
|
659
|
-
if (rel.childCollection !== rel.parentCollection) invalidateCollectionCache(rel.childCollection);
|
|
660
|
-
}
|
|
661
|
-
/**
|
|
662
|
-
* Replace a reference field's selection on one entry, addressed by field slug.
|
|
663
|
-
*
|
|
664
|
-
* The field decides which relation and which end: a field bound to the parent
|
|
665
|
-
* end replaces that entry's children, one bound to the child end replaces the
|
|
666
|
-
* parents pointing at it. This is what the entry create/update body writes
|
|
667
|
-
* through, so a site addresses a selection the way it addresses any other field.
|
|
668
|
-
*/
|
|
669
|
-
async function setReferenceSelection(db, collection, entryId, fieldSlug, selectedIds) {
|
|
670
|
-
const resolved = await resolveReferenceSelection(db, collection, entryId, fieldSlug, selectedIds);
|
|
671
|
-
if (!resolved.success) return resolved;
|
|
672
|
-
await writeReferenceSelection(db, resolved.data);
|
|
673
|
-
return {
|
|
674
|
-
success: true,
|
|
675
|
-
data: {
|
|
676
|
-
relationId: resolved.data.relation,
|
|
677
|
-
entryGroup: resolved.data.entryGroup
|
|
678
|
-
}
|
|
679
|
-
};
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* `setReferenceSelection` up to but not including the write.
|
|
683
|
-
*
|
|
684
|
-
* A collection that keeps drafts stages the result in its draft revision instead
|
|
685
|
-
* of writing links, so a save reports a bad id or an over-long selection exactly
|
|
686
|
-
* as a direct write would, and publication has nothing left to resolve.
|
|
687
|
-
*/
|
|
688
|
-
async function resolveReferenceSelection(db, collection, entryId, fieldSlug, selectedIds) {
|
|
689
|
-
const constraints = (await referenceFieldConstraints(db, collection)).get(fieldSlug);
|
|
690
|
-
if (!constraints) return notAReferenceField(fieldSlug, collection);
|
|
691
|
-
return resolveReferenceSide(db, collection, entryId, constraints, selectedIds);
|
|
692
|
-
}
|
|
693
|
-
/**
|
|
694
|
-
* `resolveReferenceSelection` for an entry that does not exist yet.
|
|
695
|
-
*
|
|
696
|
-
* A create resolves its whole payload before it writes its row, because on D1
|
|
697
|
-
* that row is committed the moment it is written: a selection that cannot be
|
|
698
|
-
* resolved has to be refused while there is still nothing to take back.
|
|
699
|
-
*
|
|
700
|
-
* `entryGroup` is the group the new row will join — a new translation inherits
|
|
701
|
-
* the source's — or null when the row starts a group of its own and so holds no
|
|
702
|
-
* links yet.
|
|
703
|
-
*/
|
|
704
|
-
async function resolveReferenceSelectionTargets(db, collection, fieldSlug, selectedIds, entryGroup) {
|
|
705
|
-
const constraints = (await referenceFieldConstraints(db, collection)).get(fieldSlug);
|
|
706
|
-
if (!constraints) return notAReferenceField(fieldSlug, collection);
|
|
707
|
-
return resolveReferenceTargets(db, collection, constraints, selectedIds, entryGroup);
|
|
708
|
-
}
|
|
709
|
-
function notAReferenceField(fieldSlug, collection) {
|
|
710
|
-
return {
|
|
711
|
-
success: false,
|
|
712
|
-
error: {
|
|
713
|
-
code: "VALIDATION_ERROR",
|
|
714
|
-
message: `Field '${fieldSlug}' is not a reference field on ${collection}`
|
|
715
|
-
}
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
async function handleReferenceParentsGet(db, collection, entryId, relation, page = {}, includeDrafts = false) {
|
|
719
|
-
try {
|
|
720
|
-
const repo = new RelationRepository(db);
|
|
721
|
-
const content = new ContentRepository(db);
|
|
722
|
-
const rel = await resolveRelation(repo, relation);
|
|
723
|
-
if (!rel) return {
|
|
724
|
-
success: false,
|
|
725
|
-
error: {
|
|
726
|
-
code: "NOT_FOUND",
|
|
727
|
-
message: "Relation not found"
|
|
728
|
-
}
|
|
729
|
-
};
|
|
730
|
-
if (collection !== rel.childCollection) return {
|
|
731
|
-
success: false,
|
|
732
|
-
error: {
|
|
733
|
-
code: "VALIDATION_ERROR",
|
|
734
|
-
message: "Entry is not the child side of this relation"
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
const entry = await content.findByIdOrSlug(collection, entryId);
|
|
738
|
-
if (!entry?.translationGroup || !includeDrafts && entry.status !== "published") return {
|
|
739
|
-
success: false,
|
|
740
|
-
error: {
|
|
741
|
-
code: "NOT_FOUND",
|
|
742
|
-
message: "Content entry not found"
|
|
743
|
-
}
|
|
744
|
-
};
|
|
745
|
-
const titleField = await getReferenceTitleField(db, rel.parentCollection);
|
|
746
|
-
const staged = await stagedPageFor(db, {
|
|
747
|
-
collection,
|
|
748
|
-
relationSlug: rel.slug,
|
|
749
|
-
side: "child",
|
|
750
|
-
draftRevisionId: entry.draftRevisionId,
|
|
751
|
-
includeDrafts,
|
|
752
|
-
page
|
|
753
|
-
});
|
|
754
|
-
if (staged) return {
|
|
755
|
-
success: true,
|
|
756
|
-
data: {
|
|
757
|
-
parents: await resolveEntryGroups(content, rel.parentCollection, staged.groups, entry.locale, includeDrafts, titleField),
|
|
758
|
-
nextCursor: staged.nextCursor
|
|
759
|
-
}
|
|
760
|
-
};
|
|
761
|
-
const edges = await repo.getParentsPage(rel.id, entry.translationGroup, page);
|
|
762
|
-
return {
|
|
763
|
-
success: true,
|
|
764
|
-
data: {
|
|
765
|
-
parents: await resolveEntries(content, rel.parentCollection, edges.items, (e) => e.parentGroup, entry.locale, includeDrafts, titleField),
|
|
766
|
-
nextCursor: edges.nextCursor
|
|
767
|
-
}
|
|
768
|
-
};
|
|
769
|
-
} catch (error) {
|
|
770
|
-
return referencesGetError(error);
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
//#endregion
|
|
775
|
-
export { referenceFieldConstraints as _, handleRelationCreate as a, handleRelationList as c, resolveEntryGroups as d, resolveReferenceSelection as f, writeReferenceSelection as g, validateOppositeSideLimit as h, handleReferenceParentsGet as i, handleRelationUpdate as l, setReferenceSelection as m, getReferenceTitleField as n, handleRelationDelete as o, resolveReferenceSelectionTargets as p, handleReferenceChildrenGet as r, handleRelationGet as s, fieldsBoundToRelation as t, resolveEntries as u, validateReferenceSelection as v, validateRequiredReferencesPresent as y };
|
|
776
|
-
//# sourceMappingURL=relations-DBB1bRJW.mjs.map
|